diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-06-01 21:50:53 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-06-01 21:50:53 +0000 |
commit | 6ab935bb92607650348a00b14fa187d8de7e580b (patch) | |
tree | 1c497060fd20ac9b826fd567cdd7426a51943142 /sys | |
parent | 2c857e286a26062ca542a7a95e993107dc8c82e6 (diff) |
De-inline if option SMALL_KERNEL on alpha; saves 4KB off RAMDISK{,B}, other
kernels and platforms unaffected.
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/pciide.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index eb0c8401203..a8646e5df7b 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide.c,v 1.193 2005/05/26 17:43:24 jsg Exp $ */ +/* $OpenBSD: pciide.c,v 1.194 2005/06/01 21:50:52 miod Exp $ */ /* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */ /* @@ -129,19 +129,26 @@ int wdcdebug_pciide_mask = WDCDEBUG_PCIIDE_MASK; #include <dev/pci/cy82c693var.h> /* inlines for reading/writing 8-bit PCI registers */ -static __inline u_int8_t pciide_pci_read(pci_chipset_tag_t, pcitag_t, + +#if defined(SMALL_KERNEL) && defined(__alpha__) +#define INLINE +#else +#define INLINE __inline +#endif + +static INLINE u_int8_t pciide_pci_read(pci_chipset_tag_t, pcitag_t, int); -static __inline void pciide_pci_write(pci_chipset_tag_t, pcitag_t, +static INLINE void pciide_pci_write(pci_chipset_tag_t, pcitag_t, int, u_int8_t); -static __inline u_int8_t +static INLINE u_int8_t pciide_pci_read(pci_chipset_tag_t pc, pcitag_t pa, int reg) { return (pci_conf_read(pc, pa, (reg & ~0x03)) >> ((reg & 0x03) * 8) & 0xff); } -static __inline void +static INLINE void pciide_pci_write(pci_chipset_tag_t pc, pcitag_t pa, int reg, u_int8_t val) { pcireg_t pcival; @@ -5423,7 +5430,7 @@ hpt_pci_intr(void *arg) (sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_PDC20277 || \ (sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_PDC20376) -static __inline u_int8_t +static INLINE u_int8_t pdc268_config_read(struct channel_softc *chp, int index) { struct pciide_channel *cp = (struct pciide_channel *)chp; @@ -5436,6 +5443,7 @@ pdc268_config_read(struct channel_softc *chp, int index) PDC268_DATA(channel))); } +/* unused */ static __inline void pdc268_config_write(struct channel_softc *chp, int index, u_int8_t value) { |