diff options
author | Dan McDonald <danmcd@mnx.io> | 2022-11-01 09:26:12 -0400 |
---|---|---|
committer | Dan McDonald <danmcd@mnx.io> | 2022-11-01 09:26:12 -0400 |
commit | 279bc6e4c74b723dfe8bee682c5347bf84e6eeb4 (patch) | |
tree | 1fd4402c9fc970eac3265bb8b37e913d9dbb8c50 | |
parent | 95c2a7d60701668efed9d53aa153487d0c7b1655 (diff) | |
parent | 9ef4124554445942a71f4cd7e4228ea9b576bfd4 (diff) | |
download | illumos-joyent-279bc6e4c74b723dfe8bee682c5347bf84e6eeb4.tar.gz |
[illumos-gate merge]
commit 9ef4124554445942a71f4cd7e4228ea9b576bfd4
15066 pcie: unused functions
commit 78a707fc31d439235af1e35322a24644770753e9
15131 libctf depends on libavl
-rw-r--r-- | usr/src/lib/Makefile | 2 | ||||
-rw-r--r-- | usr/src/uts/common/io/pciex/pcie.c | 79 |
2 files changed, 1 insertions, 80 deletions
diff --git a/usr/src/lib/Makefile b/usr/src/lib/Makefile index da6b179a0d..411e315b5f 100644 --- a/usr/src/lib/Makefile +++ b/usr/src/lib/Makefile @@ -601,7 +601,7 @@ libcontract: libnvpair libcmdutils: libavl libnvpair libcpc: libpctx libcrypt: libgen -libctf: libdwarf +libctf: libavl libdwarf libdemangle: libcustr libdevice: libnvpair libdevid: libdevinfo diff --git a/usr/src/uts/common/io/pciex/pcie.c b/usr/src/uts/common/io/pciex/pcie.c index 0f461da167..c97c28e6f9 100644 --- a/usr/src/uts/common/io/pciex/pcie.c +++ b/usr/src/uts/common/io/pciex/pcie.c @@ -609,12 +609,6 @@ uint32_t pcie_link_retrain_delay_ms = 10; taskq_t *pcie_link_tq; kmutex_t pcie_link_tq_mutex; -static void pcie_scan_mps(dev_info_t *rc_dip, dev_info_t *dip, - int *max_supported); -static int pcie_get_max_supported(dev_info_t *dip, void *arg); -static int pcie_map_phys(dev_info_t *dip, pci_regspec_t *phys_spec, - caddr_t *addrp, ddi_acc_handle_t *handlep); -static void pcie_unmap_phys(ddi_acc_handle_t *handlep, pci_regspec_t *ph); static int pcie_link_bw_intr(dev_info_t *); static void pcie_capture_speeds(dev_info_t *); @@ -2810,79 +2804,6 @@ pcie_dev(dev_info_t *dip) return (rc); } -/* - * Function to map in a device's memory space. - */ -static int -pcie_map_phys(dev_info_t *dip, pci_regspec_t *phys_spec, - caddr_t *addrp, ddi_acc_handle_t *handlep) -{ - ddi_map_req_t mr; - ddi_acc_hdl_t *hp; - int result; - ddi_device_acc_attr_t attr; - - attr.devacc_attr_version = DDI_DEVICE_ATTR_V0; - attr.devacc_attr_endian_flags = DDI_STRUCTURE_LE_ACC; - attr.devacc_attr_dataorder = DDI_STRICTORDER_ACC; - attr.devacc_attr_access = DDI_CAUTIOUS_ACC; - - *handlep = impl_acc_hdl_alloc(KM_SLEEP, NULL); - hp = impl_acc_hdl_get(*handlep); - hp->ah_vers = VERS_ACCHDL; - hp->ah_dip = dip; - hp->ah_rnumber = 0; - hp->ah_offset = 0; - hp->ah_len = 0; - hp->ah_acc = attr; - - mr.map_op = DDI_MO_MAP_LOCKED; - mr.map_type = DDI_MT_REGSPEC; - mr.map_obj.rp = (struct regspec *)phys_spec; - mr.map_prot = PROT_READ | PROT_WRITE; - mr.map_flags = DDI_MF_KERNEL_MAPPING; - mr.map_handlep = hp; - mr.map_vers = DDI_MAP_VERSION; - - result = ddi_map(dip, &mr, 0, 0, addrp); - - if (result != DDI_SUCCESS) { - impl_acc_hdl_free(*handlep); - *handlep = (ddi_acc_handle_t)NULL; - } else { - hp->ah_addr = *addrp; - } - - return (result); -} - -/* - * Map out memory that was mapped in with pcie_map_phys(); - */ -static void -pcie_unmap_phys(ddi_acc_handle_t *handlep, pci_regspec_t *ph) -{ - ddi_map_req_t mr; - ddi_acc_hdl_t *hp; - - hp = impl_acc_hdl_get(*handlep); - ASSERT(hp); - - mr.map_op = DDI_MO_UNMAP; - mr.map_type = DDI_MT_REGSPEC; - mr.map_obj.rp = (struct regspec *)ph; - mr.map_prot = PROT_READ | PROT_WRITE; - mr.map_flags = DDI_MF_KERNEL_MAPPING; - mr.map_handlep = hp; - mr.map_vers = DDI_MAP_VERSION; - - (void) ddi_map(hp->ah_dip, &mr, hp->ah_offset, - hp->ah_len, &hp->ah_addr); - - impl_acc_hdl_free(*handlep); - *handlep = (ddi_acc_handle_t)NULL; -} - void pcie_set_rber_fatal(dev_info_t *dip, boolean_t val) { |