aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-05-25 11:13:33 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-05-25 13:27:03 +0200
commitc2aa6a6a11c062dbf11dcbc757d10751bab393a5 (patch)
tree11b837dc798cd54aa3dba2acf3ab5049a4336064
parent4a020bbc0dd5e6025f92b47f829561df249e6cc6 (diff)
downloadqboot-c2aa6a6a11c062dbf11dcbc757d10751bab393a5.zip
qboot-c2aa6a6a11c062dbf11dcbc757d10751bab393a5.tar.gz
qboot-c2aa6a6a11c062dbf11dcbc757d10751bab393a5.tar.bz2
make pci_config_* inline
Small thinko... Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--include/pci.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/pci.h b/include/pci.h
index e6b445c..c12a784 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -9,31 +9,31 @@ static inline void pci_config_writel(uint16_t bdf, uint32_t addr, uint32_t val)
outl(0xcfc, val);
}
-void pci_config_writew(uint16_t bdf, uint32_t addr, uint16_t val)
+static inline void pci_config_writew(uint16_t bdf, uint32_t addr, uint16_t val)
{
outl(0xcf8, 0x80000000 | (bdf << 8) | (addr & 0xfc));
outw(0xcfc | (addr & 2), val);
}
-void pci_config_writeb(uint16_t bdf, uint32_t addr, uint8_t val)
+static inline void pci_config_writeb(uint16_t bdf, uint32_t addr, uint8_t val)
{
outl(0xcf8, 0x80000000 | (bdf << 8) | (addr & 0xfc));
outb(0xcfc | (addr & 3), val);
}
-uint32_t pci_config_readl(uint16_t bdf, uint32_t addr)
+static inline uint32_t pci_config_readl(uint16_t bdf, uint32_t addr)
{
outl(0xcf8, 0x80000000 | (bdf << 8) | (addr & 0xfc));
return inl(0xcfc);
}
-uint16_t pci_config_readw(uint16_t bdf, uint32_t addr)
+static inline uint16_t pci_config_readw(uint16_t bdf, uint32_t addr)
{
outl(0xcf8, 0x80000000 | (bdf << 8) | (addr & 0xfc));
return inw(0xcfc | (addr & 2));
}
-uint8_t pci_config_readb(uint16_t bdf, uint32_t addr)
+static inline uint8_t pci_config_readb(uint16_t bdf, uint32_t addr)
{
outl(0xcf8, 0x80000000 | (bdf << 8) | (addr & 0xfc));
return inb(0xcfc | (addr & 3));