#3260 closed defect (fixed)

libpci depends on BSP-specific header files

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: arch/sparc Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

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>.

Change History (5)

comment:1 Changed on Jan 4, 2018 at 6:20:11 AM by Sebastian Huber <sebastian.huber@…>

In 7190005/rtems:

sparc: Move <libcpu/byteorder.h>

Update #3254.
Update #3260.

comment:2 Changed on Jan 4, 2018 at 6:20:23 AM by Sebastian Huber <sebastian.huber@…>

In 3b392b6/rtems:

sparc: Remove BSP specifics from <pci/access.h>

Update #3254.
Update #3260.

comment:3 Changed on Jan 4, 2018 at 6:20:36 AM by Sebastian Huber <sebastian.huber@…>

In 569fd50/rtems:

sparc: Remove BSP specifics from <pci/irq.h>

Update #3254.
Update #3260.
Update #3269.

comment:4 Changed on Jan 4, 2018 at 6:20:49 AM by Sebastian Huber <sebastian.huber@…>

In 4e100058/rtems:

sparc: Remove <bsp.h> from PCI shell command

Update #3254.
Update #3260.

comment:5 Changed on Jan 4, 2018 at 6:21:50 AM by Sebastian Huber

Resolution: fixed
Status: assignedclosed

See also #3269.

Note: See TracTickets for help on using tickets.