d3e53912d2
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match predicate passed to pciide_compat_intr_establish() should ever modify their pci_attach_args argument, so make their pci_attach_args arguments const and deal with the fallout throughout the kernel. For the most part, these changes add a 'const' where there was no 'const' before, however, some drivers and MD code used to modify pci_attach_args. Now those drivers either copy their pci_attach_args and modify the copy, or refrain from modifying pci_attach_args: Xen: according to Manuel Bouyer, writing to pci_attach_args in pci_intr_map() was a leftover from Xen 2. Probably a bug. I stopped writing it. I have not tested this change. siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args. Probably a bug. I use a temporary variable. I have not tested this change. slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args. Probably a bug. Use a local pci_attach_args. I have not tested this change. viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the caller's pci_attach_args. Probably a bug. Make a local copy of the caller's pci_attach_args and modify the copy. I have not tested this change. While I'm here, make pci_mapreg_submap() static. With these changes in place, I have tested the compilation of these kernels: alpha GENERIC amd64 GENERIC XEN3_DOM0 arc GENERIC atari HADES MILAN-PCIIDE bebox GENERIC cats GENERIC cobalt GENERIC evbarm-eb NSLU2 evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200 KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425 evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3 evbmips64-el XLSATX evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266 OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT hp700 GENERIC i386 ALL XEN3_DOM0 XEN3_DOMU ibmnws GENERIC macppc GENERIC mvmeppc GENERIC netwinder GENERIC ofppc GENERIC prep GENERIC sandpoint GENERIC sgimips GENERIC32_IP2x sparc GENERIC_SUN4U KRUPS sparc64 GENERIC As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels with or without my patches in place: ### evbmips-el GDIUM nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop ### evbarm-el MPCSA_GENERIC src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc' ### ia64 GENERIC /tmp/genassym.28085/assym.c: In function 'f111': /tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb' /tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type ### sgimips GENERIC32_IP3x crmfb.o: In function `crmfb_attach': crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid' crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid' crmfb.c:(.text+0x234c): undefined reference to `edid_parse' crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse' crmfb.c:(.text+0x2354): undefined reference to `edid_print' crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print' |
||
---|---|---|
.. | ||
acorn26 | ||
acorn32 | ||
algor | ||
alpha | ||
amd64 | ||
amiga | ||
amigappc | ||
arc | ||
arm | ||
atari | ||
bebox | ||
cats | ||
cesfic | ||
cobalt | ||
dreamcast | ||
emips | ||
evbarm | ||
evbmips | ||
evbppc | ||
evbsh3 | ||
evbsh5 | ||
ews4800mips | ||
hp300 | ||
hp700 | ||
hpc | ||
hpcarm | ||
hpcmips | ||
hpcsh | ||
hppa | ||
i386 | ||
ia64 | ||
ibmnws | ||
iyonix | ||
landisk | ||
luna68k | ||
m68k | ||
mac68k | ||
macppc | ||
mips | ||
mipsco | ||
mmeye | ||
mvme68k | ||
mvmeppc | ||
netwinder | ||
news68k | ||
newsmips | ||
next68k | ||
ofppc | ||
pmax | ||
powerpc | ||
prep | ||
rs6000 | ||
sandpoint | ||
sbmips | ||
sgimips | ||
sh3 | ||
sh5 | ||
shark | ||
sparc | ||
sparc64 | ||
sun2 | ||
sun3 | ||
sun68k | ||
usermode | ||
vax | ||
x68k | ||
x86 | ||
xen | ||
zaurus | ||
Makefile | ||
README |
$NetBSD: README,v 1.54 2011/01/27 19:09:06 pooka Exp $ acorn26: Acorn ARM2- and ARM3-based machines (arm, 20000509) acorn32: Acorn computers Ltd. ARM 6/7/SA based machines (arm, 20011118) algor: Algorithmics, Ltd. MIPS evaluation boards (mips, 20010528) alpha: Compaq (formerly Digital Equipment Corp.) Alpha (alpha, 19950213) amd64: AMD's x86 64 bit architecture (x86_64, 20010619) amiga: Commodore et al. Amiga (m68k, 19930902) amigappc: Phase 5 Amiga (powerpc, 20000525) arc: MIPS Advanced Risc Computing spec machines (mips, 20000123) atari: Atari TT30, Falcon, and Hades (m68k, 19950326) bebox: Be Inc. BeBox (powerpc, 19971014) cats: Chalice Technologies, CATS motherboard (arm, 19981005) cesfic: FIC8234 VME processor board (m68k, 20010514) cobalt: Cobalt Networks Microservers (mips, 20000319) dreamcast: SEGA Dreamcast (sh3, 20010107) emips: Machines based on Extensible MIPS (mips, 20110126) evbarm: ARM-based eval boards (arm, 20010905) evbmips: MIPS-based eval boards (mips, 20020307) evbppc: PowerPC-based eval boards (powerpc, 20021209) evbsh3: Hitachi SuperH(TM) sh3 and sh4 eval boards (sh3, 20010206) ews4800mips: NEC's MIPS based EWS4800 workstations (ews4800mips, 20051229) hp300: Hewlett Packard 300- and 400-series machines (m68k, 19930512) hp700: Hewlett Packard 700-series machines (hppa, 20020606) hpcarm: ARM based handheld PCs (arm, 20010220) hpcmips: MIPS based handheld PCs (mips, 19990925) hpcsh: Hitachi SuperH(TM) based handheld PCs (sh3, 20010117) i386: Intel/AMD etc. x86 processor line (i386, 19930321) ia64: Intel Itanium/Itanium2 processor based workstations (ia64, -) ibmnws: IBM Network Station Thin Clients (powerpc, -) iyonix: Castle Technology xscale based workstations (arm, 20040713) landisk: SH4 processor based NAS appliances by I-O DATA (sh3, 20060901) luna68k: LUNA product line of OMRON Tateishi Electric (m68k, 20000105) mac68k: Apple Macintosh (m68k, 19930929) macppc: Apple Power Macintosh and clones (powerpc, 19980515) mipsco: MIPS Corp Magnum 3000 computers (mips, 20000812) mmeye: Hitachi SuperH(TM) computer controlled camera (sh3) mvme68k: Motorola's VMEbus 68K based single board computers (m68k, 19950725) mvmeppc: Motorola's PowerPC machines running older PPCBUG (powerpc, 20020227) netwinder: StrongARM based Netwinder machines (arm, 20010609) news68k: Sony's m68k based NET WORK STATION (m68k, 19991209) newsmips: Sony's MIPS based NET WORK STATION (mips, 19980218) next68k: NeXT Computer's cubes and slabs (m68k, 19980609) ofppc: Open Firmware based PowerPC machines (powerpc, 19980528) pmax: Digital Equipment Corp. MIPS based machines (mips, 19931012) prep: PowerPC Reference Platform machines (powerpc, 20000229) sandpoint: Motorola Sandpoint reference platform and DINK32 machines (powerpc, 20010211) sbmips: Broadcom's SiByte processor evaluation boards (mips, 20020306) sgimips: MIPS based Silicon Graphics machines (mips, 20000614) shark: Digital Network Appliance Reference Design ("Shark") (arm, 19960131) sparc: Sun Microsystems SPARC (sun4, sun4c, sun4m) 32 bit machines (sparc, 19931002) sparc64: Sun Microsystems UltraSPARC 64 bit machines (sparc64/sparc, 19980620) sun2: Sun m68010 based machines (m68k, 20010328) sun3: Sun m680[23]0 based machines (m68k, 19930625) vax: Digital Equipment Corp. VAX machines (vax, 19940802) x68k: Sharp X68000, X68030 (m68k, 19960505) xen: Xen virtual machine monitor (xen, 20040311) zaurus: Sharp Zaurus C3x00 PDAs (arm, 20061217) Generic cpu features shared among multiple ports arm: ARM CPU based platform files hppa: Hewlett Packard PA-RISC CPU based platform files m68k: Motorola 680x0 CPU based platform files mips: MIPS CPU based platform files powerpc: PowerPC CPU based platform files sh3: Hitachi SuperH(TM) sh3 and sh4 CPU based platform files sparc: Sun Microsystems SPARC(TM) CPU based platform files x86: Intel x86 based platform files. Generic architectural features shared among multiple ports hpc: Handheld PC reference platform files sun68k: Sun Microsystems Motorola 680x0 CPU based platform files Single port cpu families alpha: Digital Equipment Alpha processor ia64: Intel Itanium/Itanium2 processor