Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hp700/dev Make the pdc_pat_io_num and pdc_pat_pci_r...



details:   https://anonhg.NetBSD.org/src/rev/b0d3ae6a4678
branches:  trunk
changeset: 749579:b0d3ae6a4678
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Dec 03 11:54:09 2009 +0000

description:
Make the pdc_pat_io_num and pdc_pat_pci_rt structures static so they're
definitely VA==PA. Being on a stack doesn't guarantee this.

diffstat:

 sys/arch/hp700/dev/apic.c |  11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diffs (27 lines):

diff -r af0e375b63f0 -r b0d3ae6a4678 sys/arch/hp700/dev/apic.c
--- a/sys/arch/hp700/dev/apic.c Thu Dec 03 11:37:55 2009 +0000
+++ b/sys/arch/hp700/dev/apic.c Thu Dec 03 11:54:09 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: apic.c,v 1.4 2009/11/29 10:30:07 skrll Exp $   */
+/*     $NetBSD: apic.c,v 1.5 2009/12/03 11:54:09 skrll Exp $   */
 
 /*     $OpenBSD: apic.c,v 1.7 2007/10/06 23:50:54 krw Exp $    */
 
@@ -258,15 +258,10 @@
 void
 apic_get_int_tbl(struct elroy_softc *sc)
 {
-       struct pdc_pat_io_num int_tbl_sz PDC_ALIGNMENT;
-       struct pdc_pat_pci_rt int_tbl[MAX_INT_TBL_SZ] PDC_ALIGNMENT;
+       static struct pdc_pat_io_num int_tbl_sz PDC_ALIGNMENT;
+       static struct pdc_pat_pci_rt int_tbl[MAX_INT_TBL_SZ] PDC_ALIGNMENT;
        size_t size;
 
-       /*
-        * XXX int_tbl should not be allocated on the stack, but we need a
-        * 1:1 mapping, and malloc doesn't provide that.
-        */
-
        if (pdc_call((iodcio_t)pdc, 0, PDC_PCI_INDEX, PDC_PCI_GET_INT_TBL_SZ,
            &int_tbl_sz, 0, 0, 0, 0, 0))
                return;



Home | Main Index | Thread Index | Old Index