[RTEMS Project] #3260: libpci depends on BSP-specific header files

RTEMS trac trac at rtems.org
Tue Dec 12 07:46:12 UTC 2017


#3260: libpci depends on BSP-specific header files
-----------------------------+-----------------------------
 Reporter:  Sebastian Huber  |      Owner:  Sebastian Huber
     Type:  defect           |     Status:  assigned
 Priority:  normal           |  Milestone:  5.1
Component:  arch/sparc       |    Version:  5
 Severity:  normal           |   Keywords:
-----------------------------+-----------------------------
 The libpci is currently only used on SPARC. It is in cpukit, so BSP-
 specific header files are not allowed. Unfortunately this is not the case
 for libpci. However, it seems the the routines depending on
 BSP_PCI_BIG_ENDIAN are not used:

 grep -r 'pci_[ldst]\{2\}_' .
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE uint16_t
 pci_ld_le16(volatile uint16_t *addr)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE void
 pci_st_le16(volatile uint16_t *addr, uint16_t val)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE uint32_t
 pci_ld_le32(volatile uint32_t *addr)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE void
 pci_st_le32(volatile uint32_t *addr, uint32_t val)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE uint16_t
 pci_ld_be16(volatile uint16_t *addr)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE void
 pci_st_be16(volatile uint16_t *addr, uint16_t val)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE uint32_t
 pci_ld_be32(volatile uint32_t *addr)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE void
 pci_st_be32(volatile uint32_t *addr, uint32_t val)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE uint16_t
 pci_ld_le16(volatile uint16_t *addr)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE void
 pci_st_le16(volatile uint16_t *addr, uint16_t val)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE uint32_t
 pci_ld_le32(volatile uint32_t *addr)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE void
 pci_st_le32(volatile uint32_t *addr, uint32_t val)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE uint16_t
 pci_ld_be16(volatile uint16_t *addr)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE void
 pci_st_be16(volatile uint16_t *addr, uint16_t val)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE uint32_t
 pci_ld_be32(volatile uint32_t *addr)
 ./cpukit/libpci/pci/access.h:RTEMS_INLINE_ROUTINE void
 pci_st_be32(volatile uint32_t *addr, uint32_t val)

 Is this dead code and can I remove BSP_PCI_BIG_ENDIAN?

 Another issue is the use of a BSP-specific interrupt API in
 cpukit/libpci/pci/irq.h.

 The missing functions should be added to <rtems/irq-extension.h>.

--
Ticket URL: <http://devel.rtems.org/ticket/3260>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list