Date: Wed, 25 Oct 2017 17:49:17 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324994 - in head/sys: dev/liquidio dev/liquidio/base modules Message-ID: <201710251749.v9PHnH3Z076163@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sbruno Date: Wed Oct 25 17:49:17 2017 New Revision: 324994 URL: https://svnweb.freebsd.org/changeset/base/324994 Log: Enable i386 build of the Cavium LiquidIO driver (lio) module. Submitted by: pkanneganti@cavium.com (Prasad V Kanneganti) MFC after: 1 week Sponsored by: Cavium Networks Differential Revision: https://reviews.freebsd.org/D12415 Modified: head/sys/dev/liquidio/base/cn23xx_pf_device.c head/sys/dev/liquidio/base/lio_device.c head/sys/dev/liquidio/base/lio_device.h head/sys/dev/liquidio/base/lio_droq.c head/sys/dev/liquidio/base/lio_mem_ops.c head/sys/dev/liquidio/base/lio_request_manager.c head/sys/dev/liquidio/lio_main.c head/sys/dev/liquidio/lio_main.h head/sys/dev/liquidio/lio_rxtx.c head/sys/dev/liquidio/lio_sysctl.c head/sys/modules/Makefile Modified: head/sys/dev/liquidio/base/cn23xx_pf_device.c ============================================================================== --- head/sys/dev/liquidio/base/cn23xx_pf_device.c Wed Oct 25 17:23:33 2017 (r324993) +++ head/sys/dev/liquidio/base/cn23xx_pf_device.c Wed Oct 25 17:49:17 2017 (r324994) @@ -162,11 +162,11 @@ lio_cn23xx_pf_setup_global_mac_regs(struct octeon_devi lio_write_csr64(oct, LIO_CN23XX_SLI_PKT_MAC_RINFO64(mac_no, pf_num), reg_val); - lio_dev_dbg(oct, "SLI_PKT_MAC(%d)_PF(%d)_RINFO : 0x%016lx\n", mac_no, + lio_dev_dbg(oct, "SLI_PKT_MAC(%d)_PF(%d)_RINFO : 0x%016llx\n", mac_no, pf_num, - lio_read_csr64(oct, + LIO_CAST64(lio_read_csr64(oct, LIO_CN23XX_SLI_PKT_MAC_RINFO64(mac_no, - pf_num))); + pf_num)))); } static int Modified: head/sys/dev/liquidio/base/lio_device.c ============================================================================== --- head/sys/dev/liquidio/base/lio_device.c Wed Oct 25 17:23:33 2017 (r324993) +++ head/sys/dev/liquidio/base/lio_device.c Wed Oct 25 17:49:17 2017 (r324994) @@ -817,8 +817,8 @@ lio_core_drv_init(struct lio_recv_info *recv_info, voi cs = &core_setup[oct->octeon_id]; if (recv_pkt->buffer_size[0] != (sizeof(*cs) + LIO_DROQ_INFO_SIZE)) { - lio_dev_dbg(oct, "Core setup bytes expected %lu found %d\n", - (uint32_t)sizeof(*cs) + LIO_DROQ_INFO_SIZE, + lio_dev_dbg(oct, "Core setup bytes expected %llu found %d\n", + LIO_CAST64(sizeof(*cs) + LIO_DROQ_INFO_SIZE), recv_pkt->buffer_size[0]); } Modified: head/sys/dev/liquidio/base/lio_device.h ============================================================================== --- head/sys/dev/liquidio/base/lio_device.h Wed Oct 25 17:23:33 2017 (r324993) +++ head/sys/dev/liquidio/base/lio_device.h Wed Oct 25 17:49:17 2017 (r324994) @@ -873,16 +873,26 @@ static inline uint64_t lio_read_csr64(struct octeon_device *oct, uint32_t reg) { +#ifdef __i386__ + return (lio_read_csr32(oct, reg) | + ((uint64_t)lio_read_csr32(oct, reg + 4) << 32)); +#else return (bus_space_read_8(oct->mem_bus_space[0].tag, oct->mem_bus_space[0].handle, reg)); +#endif } static inline void lio_write_csr64(struct octeon_device *oct, uint32_t reg, uint64_t val) { +#ifdef __i386__ + lio_write_csr32(oct, reg, (uint32_t)val); + lio_write_csr32(oct, reg + 4, val >> 32); +#else bus_space_write_8(oct->mem_bus_space[0].tag, oct->mem_bus_space[0].handle, reg, val); +#endif } #endif /* _LIO_DEVICE_H_ */ Modified: head/sys/dev/liquidio/base/lio_droq.c ============================================================================== --- head/sys/dev/liquidio/base/lio_droq.c Wed Oct 25 17:23:33 2017 (r324993) +++ head/sys/dev/liquidio/base/lio_droq.c Wed Oct 25 17:49:17 2017 (r324994) @@ -294,8 +294,8 @@ lio_init_droq(struct octeon_device *oct, uint32_t q_no return (1); } - lio_dev_dbg(oct, "droq[%d]: desc_ring: virt: 0x%p, dma: %lx\n", q_no, - droq->desc_ring, droq->desc_ring_dma); + lio_dev_dbg(oct, "droq[%d]: desc_ring: virt: 0x%p, dma: %llx\n", q_no, + droq->desc_ring, LIO_CAST64(droq->desc_ring_dma)); lio_dev_dbg(oct, "droq[%d]: num_desc: %d\n", q_no, droq->max_count); size = droq->max_count * LIO_DROQ_RECVBUF_SIZE; Modified: head/sys/dev/liquidio/base/lio_mem_ops.c ============================================================================== --- head/sys/dev/liquidio/base/lio_mem_ops.c Wed Oct 25 17:23:33 2017 (r324993) +++ head/sys/dev/liquidio/base/lio_mem_ops.c Wed Oct 25 17:49:17 2017 (r324994) @@ -65,20 +65,48 @@ lio_write_bar1_mem8(struct octeon_device *oct, uint32_ oct->mem_bus_space[1].handle, reg, val); } +#ifdef __i386__ +static inline uint32_t +lio_read_bar1_mem32(struct octeon_device *oct, uint32_t reg) +{ + + return (bus_space_read_4(oct->mem_bus_space[1].tag, + oct->mem_bus_space[1].handle, reg)); +} + +static inline void +lio_write_bar1_mem32(struct octeon_device *oct, uint32_t reg, uint32_t val) +{ + + bus_space_write_4(oct->mem_bus_space[1].tag, + oct->mem_bus_space[1].handle, reg, val); +} +#endif + static inline uint64_t lio_read_bar1_mem64(struct octeon_device *oct, uint32_t reg) { +#ifdef __i386__ + return (lio_read_bar1_mem32(oct, reg) | + ((uint64_t)lio_read_bar1_mem32(oct, reg + 4) << 32)); +#else return (bus_space_read_8(oct->mem_bus_space[1].tag, oct->mem_bus_space[1].handle, reg)); +#endif } static inline void lio_write_bar1_mem64(struct octeon_device *oct, uint32_t reg, uint64_t val) { +#ifdef __i386__ + lio_write_bar1_mem32(oct, reg, (uint32_t)val); + lio_write_bar1_mem32(oct, reg + 4, val >> 32); +#else bus_space_write_8(oct->mem_bus_space[1].tag, oct->mem_bus_space[1].handle, reg, val); +#endif } static void Modified: head/sys/dev/liquidio/base/lio_request_manager.c ============================================================================== --- head/sys/dev/liquidio/base/lio_request_manager.c Wed Oct 25 17:23:33 2017 (r324993) +++ head/sys/dev/liquidio/base/lio_request_manager.c Wed Oct 25 17:49:17 2017 (r324994) @@ -97,7 +97,7 @@ lio_init_instr_queue(struct octeon_device *oct, union return (1); } - iq->base_addr = lio_dma_alloc(q_size, &iq->base_addr_dma); + iq->base_addr = lio_dma_alloc(q_size, (vm_paddr_t *)&iq->base_addr_dma); if (!iq->base_addr) { lio_dev_err(oct, "Cannot allocate memory for instr queue %d\n", iq_no); @@ -118,8 +118,9 @@ lio_init_instr_queue(struct octeon_device *oct, union return (1); } - lio_dev_dbg(oct, "IQ[%d]: base: %p basedma: %lx count: %d\n", - iq_no, iq->base_addr, iq->base_addr_dma, iq->max_count); + lio_dev_dbg(oct, "IQ[%d]: base: %p basedma: %llx count: %d\n", + iq_no, iq->base_addr, LIO_CAST64(iq->base_addr_dma), + iq->max_count); /* Create the descriptor buffer dma maps */ request_buf = iq->request_list; @@ -736,7 +737,7 @@ lio_setup_sc_buffer_pool(struct octeon_device *oct) for (i = 0; i < LIO_MAX_SOFT_COMMAND_BUFFERS; i++) { sc = (struct lio_soft_command *) - lio_dma_alloc(LIO_SOFT_COMMAND_BUFFER_SIZE, &dma_addr); + lio_dma_alloc(LIO_SOFT_COMMAND_BUFFER_SIZE, (vm_paddr_t *)&dma_addr); if (sc == NULL) { lio_free_sc_buffer_pool(oct); return (1); Modified: head/sys/dev/liquidio/lio_main.c ============================================================================== --- head/sys/dev/liquidio/lio_main.c Wed Oct 25 17:23:33 2017 (r324993) +++ head/sys/dev/liquidio/lio_main.c Wed Oct 25 17:49:17 2017 (r324994) @@ -1013,7 +1013,7 @@ lio_get_media_subtype(struct octeon_device *oct) return (IFM_10G_SR); } -static unsigned long +static uint64_t lio_get_baudrate(struct octeon_device *oct) { @@ -1318,15 +1318,16 @@ lio_setup_nic_devices(struct octeon_device *octeon_dev if (!(num_iqueues) || !(num_oqueues)) { lio_dev_err(octeon_dev, - "Got bad iqueues (%016lX) or oqueues (%016lX) from firmware.\n", - resp->cfg_info.iqmask, - resp->cfg_info.oqmask); + "Got bad iqueues (%016llX) or oqueues (%016llX) from firmware.\n", + LIO_CAST64(resp->cfg_info.iqmask), + LIO_CAST64(resp->cfg_info.oqmask)); goto setup_nic_dev_fail; } lio_dev_dbg(octeon_dev, - "interface %d, iqmask %016lx, oqmask %016lx, numiqueues %d, numoqueues %d\n", - i, resp->cfg_info.iqmask, resp->cfg_info.oqmask, + "interface %d, iqmask %016llx, oqmask %016llx, numiqueues %d, numoqueues %d\n", + i, LIO_CAST64(resp->cfg_info.iqmask), + LIO_CAST64(resp->cfg_info.oqmask), num_iqueues, num_oqueues); ifp = if_alloc(IFT_ETHER); Modified: head/sys/dev/liquidio/lio_main.h ============================================================================== --- head/sys/dev/liquidio/lio_main.h Wed Oct 25 17:23:33 2017 (r324993) +++ head/sys/dev/liquidio/lio_main.h Wed Oct 25 17:49:17 2017 (r324994) @@ -43,11 +43,7 @@ extern unsigned int lio_hwlro; -#ifdef __LP64__ #define LIO_CAST64(v) ((long long)(long)(v)) -#else -#error "Unknown system architecture" -#endif #define LIO_DRV_NAME "lio" @@ -107,9 +103,9 @@ lio_map_pci_barx(struct octeon_device *oct, int baridx oct->mem_bus_space[baridx].handle = rman_get_bushandle(oct->mem_bus_space[baridx].pci_mem); - lio_dev_dbg(oct, "BAR%d Tag 0x%lx Handle 0x%lx\n", - baridx, oct->mem_bus_space[baridx].tag, - oct->mem_bus_space[baridx].handle); + lio_dev_dbg(oct, "BAR%d Tag 0x%llx Handle 0x%llx\n", + baridx, LIO_CAST64(oct->mem_bus_space[baridx].tag), + LIO_CAST64(oct->mem_bus_space[baridx].handle)); return (0); } Modified: head/sys/dev/liquidio/lio_rxtx.c ============================================================================== --- head/sys/dev/liquidio/lio_rxtx.c Wed Oct 25 17:23:33 2017 (r324993) +++ head/sys/dev/liquidio/lio_rxtx.c Wed Oct 25 17:49:17 2017 (r324994) @@ -218,8 +218,8 @@ retry: drop_packet: stats->tx_dropped++; - lio_dev_err(oct, "IQ%d Transmit dropped: %lu\n", iq_no, - stats->tx_dropped); + lio_dev_err(oct, "IQ%d Transmit dropped: %llu\n", iq_no, + LIO_CAST64(stats->tx_dropped)); m_freem(*m_headp); *m_headp = NULL; Modified: head/sys/dev/liquidio/lio_sysctl.c ============================================================================== --- head/sys/dev/liquidio/lio_sysctl.c Wed Oct 25 17:23:33 2017 (r324993) +++ head/sys/dev/liquidio/lio_sysctl.c Wed Oct 25 17:49:17 2017 (r324994) @@ -634,13 +634,15 @@ lio_get_eeprom(SYSCTL_HANDLER_ARGS) board_info = (struct lio_board_info *)(&oct_dev->boardinfo); if (oct_dev->uboot_len == 0) - sprintf(buf, "boardname:%s serialnum:%s maj:%ld min:%ld", + sprintf(buf, "boardname:%s serialnum:%s maj:%lld min:%lld", board_info->name, board_info->serial_number, - board_info->major, board_info->minor); + LIO_CAST64(board_info->major), + LIO_CAST64(board_info->minor)); else { - sprintf(buf, "boardname:%s serialnum:%s maj:%ld min:%ld\n%s", + sprintf(buf, "boardname:%s serialnum:%s maj:%lld min:%lld\n%s", board_info->name, board_info->serial_number, - board_info->major, board_info->minor, + LIO_CAST64(board_info->major), + LIO_CAST64(board_info->minor), &oct_dev->uboot_version[oct_dev->uboot_sidx]); } @@ -777,184 +779,184 @@ lio_cn23xx_pf_read_csr_reg(char *s, struct octeon_devi /* 0x29030 or 0x29040 */ reg = LIO_CN23XX_SLI_PKT_MAC_RINFO64(oct->pcie_port, oct->pf_num); - len += sprintf(s + len, "[%08x] (SLI_PKT_MAC%d_PF%d_RINFO): %016lx\n", + len += sprintf(s + len, "[%08x] (SLI_PKT_MAC%d_PF%d_RINFO): %016llx\n", reg, oct->pcie_port, oct->pf_num, - lio_read_csr64(oct, reg)); + LIO_CAST64(lio_read_csr64(oct, reg))); /* 0x27080 or 0x27090 */ reg = LIO_CN23XX_SLI_MAC_PF_INT_ENB64(oct->pcie_port, oct->pf_num); - len += sprintf(s + len, "[%08x] (SLI_MAC%d_PF%d_INT_ENB): %016lx\n", + len += sprintf(s + len, "[%08x] (SLI_MAC%d_PF%d_INT_ENB): %016llx\n", reg, oct->pcie_port, oct->pf_num, - lio_read_csr64(oct, reg)); + LIO_CAST64(lio_read_csr64(oct, reg))); /* 0x27000 or 0x27010 */ reg = LIO_CN23XX_SLI_MAC_PF_INT_SUM64(oct->pcie_port, oct->pf_num); - len += sprintf(s + len, "[%08x] (SLI_MAC%d_PF%d_INT_SUM): %016lx\n", + len += sprintf(s + len, "[%08x] (SLI_MAC%d_PF%d_INT_SUM): %016llx\n", reg, oct->pcie_port, oct->pf_num, - lio_read_csr64(oct, reg)); + LIO_CAST64(lio_read_csr64(oct, reg))); /* 0x29120 */ reg = 0x29120; - len += sprintf(s + len, "[%08x] (SLI_PKT_MEM_CTL): %016lx\n", reg, - lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT_MEM_CTL): %016llx\n", reg, + LIO_CAST64(lio_read_csr64(oct, reg))); /* 0x27300 */ reg = 0x27300 + oct->pcie_port * LIO_CN23XX_MAC_INT_OFFSET + (oct->pf_num) * LIO_CN23XX_PF_INT_OFFSET; - len += sprintf(s + len, "[%08x] (SLI_MAC%d_PF%d_PKT_VF_INT): %016lx\n", + len += sprintf(s + len, "[%08x] (SLI_MAC%d_PF%d_PKT_VF_INT): %016llx\n", reg, oct->pcie_port, oct->pf_num, - lio_read_csr64(oct, reg)); + LIO_CAST64(lio_read_csr64(oct, reg))); /* 0x27200 */ reg = 0x27200 + oct->pcie_port * LIO_CN23XX_MAC_INT_OFFSET + (oct->pf_num) * LIO_CN23XX_PF_INT_OFFSET; - len += sprintf(s + len, "[%08x] (SLI_MAC%d_PF%d_PP_VF_INT): %016lx\n", + len += sprintf(s + len, "[%08x] (SLI_MAC%d_PF%d_PP_VF_INT): %016llx\n", reg, oct->pcie_port, oct->pf_num, - lio_read_csr64(oct, reg)); + LIO_CAST64(lio_read_csr64(oct, reg))); /* 29130 */ reg = LIO_CN23XX_SLI_PKT_CNT_INT; - len += sprintf(s + len, "[%08x] (SLI_PKT_CNT_INT): %016lx\n", reg, - lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT_CNT_INT): %016llx\n", reg, + LIO_CAST64(lio_read_csr64(oct, reg))); /* 0x29140 */ reg = LIO_CN23XX_SLI_PKT_TIME_INT; - len += sprintf(s + len, "[%08x] (SLI_PKT_TIME_INT): %016lx\n", reg, - lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT_TIME_INT): %016llx\n", reg, + LIO_CAST64(lio_read_csr64(oct, reg))); /* 0x29160 */ reg = 0x29160; - len += sprintf(s + len, "[%08x] (SLI_PKT_INT): %016lx\n", reg, - lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT_INT): %016llx\n", reg, + LIO_CAST64(lio_read_csr64(oct, reg))); /* 0x29180 */ reg = LIO_CN23XX_SLI_OQ_WMARK; - len += sprintf(s + len, "[%08x] (SLI_PKT_OUTPUT_WMARK): %016lx\n", - reg, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT_OUTPUT_WMARK): %016llx\n", + reg, LIO_CAST64(lio_read_csr64(oct, reg))); /* 0x291E0 */ reg = LIO_CN23XX_SLI_PKT_IOQ_RING_RST; - len += sprintf(s + len, "[%08x] (SLI_PKT_RING_RST): %016lx\n", reg, - lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT_RING_RST): %016llx\n", reg, + LIO_CAST64(lio_read_csr64(oct, reg))); /* 0x29210 */ reg = LIO_CN23XX_SLI_GBL_CONTROL; - len += sprintf(s + len, "[%08x] (SLI_PKT_GBL_CONTROL): %016lx\n", reg, - lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT_GBL_CONTROL): %016llx\n", reg, + LIO_CAST64(lio_read_csr64(oct, reg))); /* 0x29220 */ reg = 0x29220; - len += sprintf(s + len, "[%08x] (SLI_PKT_BIST_STATUS): %016lx\n", - reg, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT_BIST_STATUS): %016llx\n", + reg, LIO_CAST64(lio_read_csr64(oct, reg))); /* PF only */ if (pf_num == 0) { /* 0x29260 */ reg = LIO_CN23XX_SLI_OUT_BP_EN_W1S; - len += sprintf(s + len, "[%08x] (SLI_PKT_OUT_BP_EN_W1S): %016lx\n", - reg, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT_OUT_BP_EN_W1S): %016llx\n", + reg, LIO_CAST64(lio_read_csr64(oct, reg))); } else if (pf_num == 1) { /* 0x29270 */ reg = LIO_CN23XX_SLI_OUT_BP_EN2_W1S; - len += sprintf(s + len, "[%08x] (SLI_PKT_OUT_BP_EN2_W1S): %016lx\n", - reg, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT_OUT_BP_EN2_W1S): %016llx\n", + reg, LIO_CAST64(lio_read_csr64(oct, reg))); } for (i = 0; i < LIO_CN23XX_PF_MAX_OUTPUT_QUEUES; i++) { reg = LIO_CN23XX_SLI_OQ_BUFF_INFO_SIZE(i); - len += sprintf(s + len, "[%08x] (SLI_PKT%d_OUT_SIZE): %016lx\n", - reg, i, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT%d_OUT_SIZE): %016llx\n", + reg, i, LIO_CAST64(lio_read_csr64(oct, reg))); } /* 0x10040 */ for (i = 0; i < LIO_CN23XX_PF_MAX_INPUT_QUEUES; i++) { reg = LIO_CN23XX_SLI_IQ_INSTR_COUNT64(i); - len += sprintf(s + len, "[%08x] (SLI_PKT_IN_DONE%d_CNTS): %016lx\n", - reg, i, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT_IN_DONE%d_CNTS): %016llx\n", + reg, i, LIO_CAST64(lio_read_csr64(oct, reg))); } /* 0x10080 */ for (i = 0; i < LIO_CN23XX_PF_MAX_OUTPUT_QUEUES; i++) { reg = LIO_CN23XX_SLI_OQ_PKTS_CREDIT(i); - len += sprintf(s + len, "[%08x] (SLI_PKT%d_SLIST_BAOFF_DBELL): %016lx\n", - reg, i, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT%d_SLIST_BAOFF_DBELL): %016llx\n", + reg, i, LIO_CAST64(lio_read_csr64(oct, reg))); } /* 0x10090 */ for (i = 0; i < LIO_CN23XX_PF_MAX_OUTPUT_QUEUES; i++) { reg = LIO_CN23XX_SLI_OQ_SIZE(i); - len += sprintf(s + len, "[%08x] (SLI_PKT%d_SLIST_FIFO_RSIZE): %016lx\n", - reg, i, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT%d_SLIST_FIFO_RSIZE): %016llx\n", + reg, i, LIO_CAST64(lio_read_csr64(oct, reg))); } /* 0x10050 */ for (i = 0; i < LIO_CN23XX_PF_MAX_OUTPUT_QUEUES; i++) { reg = LIO_CN23XX_SLI_OQ_PKT_CONTROL(i); - len += sprintf(s + len, "[%08x] (SLI_PKT%d__OUTPUT_CONTROL): %016lx\n", - reg, i, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT%d__OUTPUT_CONTROL): %016llx\n", + reg, i, LIO_CAST64(lio_read_csr64(oct, reg))); } /* 0x10070 */ for (i = 0; i < LIO_CN23XX_PF_MAX_OUTPUT_QUEUES; i++) { reg = LIO_CN23XX_SLI_OQ_BASE_ADDR64(i); - len += sprintf(s + len, "[%08x] (SLI_PKT%d_SLIST_BADDR): %016lx\n", - reg, i, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT%d_SLIST_BADDR): %016llx\n", + reg, i, LIO_CAST64(lio_read_csr64(oct, reg))); } /* 0x100a0 */ for (i = 0; i < LIO_CN23XX_PF_MAX_OUTPUT_QUEUES; i++) { reg = LIO_CN23XX_SLI_OQ_PKT_INT_LEVELS(i); - len += sprintf(s + len, "[%08x] (SLI_PKT%d_INT_LEVELS): %016lx\n", - reg, i, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT%d_INT_LEVELS): %016llx\n", + reg, i, LIO_CAST64(lio_read_csr64(oct, reg))); } /* 0x100b0 */ for (i = 0; i < LIO_CN23XX_PF_MAX_OUTPUT_QUEUES; i++) { reg = LIO_CN23XX_SLI_OQ_PKTS_SENT(i); - len += sprintf(s + len, "[%08x] (SLI_PKT%d_CNTS): %016lx\n", - reg, i, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT%d_CNTS): %016llx\n", + reg, i, LIO_CAST64(lio_read_csr64(oct, reg))); } /* 0x100c0 */ for (i = 0; i < LIO_CN23XX_PF_MAX_OUTPUT_QUEUES; i++) { reg = 0x100c0 + i * LIO_CN23XX_OQ_OFFSET; - len += sprintf(s + len, "[%08x] (SLI_PKT%d_ERROR_INFO): %016lx\n", - reg, i, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT%d_ERROR_INFO): %016llx\n", + reg, i, LIO_CAST64(lio_read_csr64(oct, reg))); } /* 0x10000 */ for (i = 0; i < LIO_CN23XX_PF_MAX_INPUT_QUEUES; i++) { reg = LIO_CN23XX_SLI_IQ_PKT_CONTROL64(i); - len += sprintf(s + len, "[%08x] (SLI_PKT%d_INPUT_CONTROL): %016lx\n", - reg, i, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT%d_INPUT_CONTROL): %016llx\n", + reg, i, LIO_CAST64(lio_read_csr64(oct, reg))); } /* 0x10010 */ for (i = 0; i < LIO_CN23XX_PF_MAX_INPUT_QUEUES; i++) { reg = LIO_CN23XX_SLI_IQ_BASE_ADDR64(i); - len += sprintf(s + len, "[%08x] (SLI_PKT%d_INSTR_BADDR): %016lx\n", - reg, i, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT%d_INSTR_BADDR): %016llx\n", + reg, i, LIO_CAST64(lio_read_csr64(oct, reg))); } /* 0x10020 */ for (i = 0; i < LIO_CN23XX_PF_MAX_INPUT_QUEUES; i++) { reg = LIO_CN23XX_SLI_IQ_DOORBELL(i); - len += sprintf(s + len, "[%08x] (SLI_PKT%d_INSTR_BAOFF_DBELL): %016lx\n", - reg, i, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT%d_INSTR_BAOFF_DBELL): %016llx\n", + reg, i, LIO_CAST64(lio_read_csr64(oct, reg))); } /* 0x10030 */ for (i = 0; i < LIO_CN23XX_PF_MAX_INPUT_QUEUES; i++) { reg = LIO_CN23XX_SLI_IQ_SIZE(i); - len += sprintf(s + len, "[%08x] (SLI_PKT%d_INSTR_FIFO_RSIZE): %016lx\n", - reg, i, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT%d_INSTR_FIFO_RSIZE): %016llx\n", + reg, i, LIO_CAST64(lio_read_csr64(oct, reg))); } /* 0x10040 */ for (i = 0; i < LIO_CN23XX_PF_MAX_INPUT_QUEUES; i++) reg = LIO_CN23XX_SLI_IQ_INSTR_COUNT64(i); - len += sprintf(s + len, "[%08x] (SLI_PKT_IN_DONE%d_CNTS): %016lx\n", - reg, i, lio_read_csr64(oct, reg)); + len += sprintf(s + len, "[%08x] (SLI_PKT_IN_DONE%d_CNTS): %016llx\n", + reg, i, LIO_CAST64(lio_read_csr64(oct, reg))); return (len); } @@ -1574,8 +1576,8 @@ lio_set_intrmod_cfg(struct lio *lio, struct octeon_int lio_dev_err(oct_dev, "intrmod config failed. Status: %llx\n", LIO_CAST64(retval)); else - lio_dev_info(oct_dev, "Rx-Adaptive Interrupt moderation enabled:%lx\n", - intr_cfg->rx_enable); + lio_dev_info(oct_dev, "Rx-Adaptive Interrupt moderation enabled:%llx\n", + LIO_CAST64(intr_cfg->rx_enable)); lio_free_soft_command(oct_dev, sc); Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Wed Oct 25 17:23:33 2017 (r324993) +++ head/sys/modules/Makefile Wed Oct 25 17:49:17 2017 (r324994) @@ -603,6 +603,9 @@ _ixv= ixv _linprocfs= linprocfs _linsysfs= linsysfs _linux= linux +.if ${MK_SOURCELESS_UCODE} != "no" +_lio= lio +.endif _nctgpio= nctgpio _ndis= ndis _pccard= pccard @@ -711,9 +714,6 @@ _ixl= ixl _ixlv= ixlv _linux64= linux64 _linux_common= linux_common -.if ${MK_SOURCELESS_UCODE} != "no" -_lio= lio -.endif _ntb= ntb _pms= pms _qlxge= qlxge
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710251749.v9PHnH3Z076163>