lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201908111026.mZDdajPY%lkp@intel.com>
Date:   Sun, 11 Aug 2019 10:35:34 +0800
From:   kbuild test robot <lkp@...el.com>
To:     "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc:     kbuild-all@...org, netdev@...r.kernel.org
Subject: [net-next:master 57/138]
 arch/mips/include/asm/octeon/cvmx-ipd.h:330:27: error: storage size of
 'pip_sft_rst' isn't known

Hi Matthew,

FYI, the error/warning still remains.

tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/davem/net-next.git master
head:   2cc2743d8feec87b0bc0c9c1106136852d97f566
commit: 171a9bae68c72f2d1260c3825203760856e6793b [57/138] staging/octeon: Allow test build on !MIPS
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 171a9bae68c72f2d1260c3825203760856e6793b
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   In file included from arch/mips/include/asm/octeon/octeon.h:11:0,
                    from drivers/staging/octeon/octeon-ethernet.h:19,
                    from drivers/staging/octeon/ethernet.c:22:
   arch/mips/include/asm/octeon/cvmx.h: In function 'cvmx_writeq_csr':
   arch/mips/include/asm/octeon/cvmx.h:282:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     cvmx_write_csr((__force uint64_t)csr_addr, val);
                    ^
   arch/mips/include/asm/octeon/cvmx.h: In function 'cvmx_readq_csr':
   arch/mips/include/asm/octeon/cvmx.h:299:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     return cvmx_read_csr((__force uint64_t) csr_addr);
                          ^
   In file included from drivers/staging/octeon/octeon-ethernet.h:27:0,
                    from drivers/staging/octeon/ethernet.c:22:
   arch/mips/include/asm/octeon/cvmx-ipd.h: In function 'cvmx_ipd_free_ptr':
>> arch/mips/include/asm/octeon/cvmx-ipd.h:330:27: error: storage size of 'pip_sft_rst' isn't known
       union cvmx_pip_sft_rst pip_sft_rst;
                              ^~~~~~~~~~~
>> arch/mips/include/asm/octeon/cvmx-ipd.h:331:36: error: 'CVMX_PIP_SFT_RST' undeclared (first use in this function); did you mean 'CVMX_CIU_SOFT_RST'?
       pip_sft_rst.u64 = cvmx_read_csr(CVMX_PIP_SFT_RST);
                                       ^~~~~~~~~~~~~~~~
                                       CVMX_CIU_SOFT_RST
   arch/mips/include/asm/octeon/cvmx-ipd.h:331:36: note: each undeclared identifier is reported only once for each function it appears in
   arch/mips/include/asm/octeon/cvmx-ipd.h:330:27: warning: unused variable 'pip_sft_rst' [-Wunused-variable]
       union cvmx_pip_sft_rst pip_sft_rst;
                              ^~~~~~~~~~~
--
   In file included from arch/mips/include/asm/octeon/octeon.h:11:0,
                    from drivers/staging/octeon/octeon-ethernet.h:19,
                    from drivers/staging/octeon/ethernet-rx.c:26:
   arch/mips/include/asm/octeon/cvmx.h: In function 'cvmx_writeq_csr':
   arch/mips/include/asm/octeon/cvmx.h:282:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     cvmx_write_csr((__force uint64_t)csr_addr, val);
                    ^
   arch/mips/include/asm/octeon/cvmx.h: In function 'cvmx_readq_csr':
   arch/mips/include/asm/octeon/cvmx.h:299:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     return cvmx_read_csr((__force uint64_t) csr_addr);
                          ^
   In file included from drivers/staging/octeon/octeon-ethernet.h:27:0,
                    from drivers/staging/octeon/ethernet-rx.c:26:
   arch/mips/include/asm/octeon/cvmx-ipd.h: In function 'cvmx_ipd_free_ptr':
>> arch/mips/include/asm/octeon/cvmx-ipd.h:330:27: error: storage size of 'pip_sft_rst' isn't known
       union cvmx_pip_sft_rst pip_sft_rst;
                              ^~~~~~~~~~~
>> arch/mips/include/asm/octeon/cvmx-ipd.h:331:36: error: 'CVMX_PIP_SFT_RST' undeclared (first use in this function); did you mean 'CVMX_CIU_SOFT_RST'?
       pip_sft_rst.u64 = cvmx_read_csr(CVMX_PIP_SFT_RST);
                                       ^~~~~~~~~~~~~~~~
                                       CVMX_CIU_SOFT_RST
   arch/mips/include/asm/octeon/cvmx-ipd.h:331:36: note: each undeclared identifier is reported only once for each function it appears in
   arch/mips/include/asm/octeon/cvmx-ipd.h:330:27: warning: unused variable 'pip_sft_rst' [-Wunused-variable]
       union cvmx_pip_sft_rst pip_sft_rst;
                              ^~~~~~~~~~~
   In file included from drivers/staging/octeon/ethernet-rx.c:27:0:
   drivers/staging/octeon/ethernet-rx.c: In function 'cvm_oct_poll':
>> drivers/staging/octeon/ethernet-defines.h:30:38: error: 'CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE' undeclared (first use in this function); did you mean 'CONFIG_MDIO_OCTEON_MODULE'?
    #define USE_ASYNC_IOBDMA            (CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE > 0)
                                         ^
   drivers/staging/octeon/ethernet-rx.c:190:6: note: in expansion of macro 'USE_ASYNC_IOBDMA'
     if (USE_ASYNC_IOBDMA) {
         ^~~~~~~~~~~~~~~~
   drivers/staging/octeon/ethernet-rx.c: In function 'cvm_oct_rx_initialize':
>> drivers/staging/octeon/ethernet-rx.c:472:25: error: 'OCTEON_IRQ_WORKQ0' undeclared (first use in this function); did you mean 'OCTEON_IS_MODEL'?
      oct_rx_group[i].irq = OCTEON_IRQ_WORKQ0 + i;
                            ^~~~~~~~~~~~~~~~~
                            OCTEON_IS_MODEL
--
   In file included from arch/mips/include/asm/octeon/octeon.h:11:0,
                    from drivers/staging/octeon/octeon-ethernet.h:19,
                    from drivers/staging/octeon/ethernet-spi.c:13:
   arch/mips/include/asm/octeon/cvmx.h: In function 'cvmx_writeq_csr':
   arch/mips/include/asm/octeon/cvmx.h:282:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     cvmx_write_csr((__force uint64_t)csr_addr, val);
                    ^
   arch/mips/include/asm/octeon/cvmx.h: In function 'cvmx_readq_csr':
   arch/mips/include/asm/octeon/cvmx.h:299:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     return cvmx_read_csr((__force uint64_t) csr_addr);
                          ^
   In file included from drivers/staging/octeon/octeon-ethernet.h:27:0,
                    from drivers/staging/octeon/ethernet-spi.c:13:
   arch/mips/include/asm/octeon/cvmx-ipd.h: In function 'cvmx_ipd_free_ptr':
>> arch/mips/include/asm/octeon/cvmx-ipd.h:330:27: error: storage size of 'pip_sft_rst' isn't known
       union cvmx_pip_sft_rst pip_sft_rst;
                              ^~~~~~~~~~~
>> arch/mips/include/asm/octeon/cvmx-ipd.h:331:36: error: 'CVMX_PIP_SFT_RST' undeclared (first use in this function); did you mean 'CVMX_CIU_SOFT_RST'?
       pip_sft_rst.u64 = cvmx_read_csr(CVMX_PIP_SFT_RST);
                                       ^~~~~~~~~~~~~~~~
                                       CVMX_CIU_SOFT_RST
   arch/mips/include/asm/octeon/cvmx-ipd.h:331:36: note: each undeclared identifier is reported only once for each function it appears in
   arch/mips/include/asm/octeon/cvmx-ipd.h:330:27: warning: unused variable 'pip_sft_rst' [-Wunused-variable]
       union cvmx_pip_sft_rst pip_sft_rst;
                              ^~~~~~~~~~~
   drivers/staging/octeon/ethernet-spi.c: In function 'cvm_oct_spi_init':
>> drivers/staging/octeon/ethernet-spi.c:198:19: error: 'OCTEON_IRQ_RML' undeclared (first use in this function); did you mean 'OCTEON_IS_MODEL'?
      r = request_irq(OCTEON_IRQ_RML, cvm_oct_spi_rml_interrupt,
                      ^~~~~~~~~~~~~~
                      OCTEON_IS_MODEL
   drivers/staging/octeon/ethernet-spi.c: In function 'cvm_oct_spi_uninit':
   drivers/staging/octeon/ethernet-spi.c:224:12: error: 'OCTEON_IRQ_RML' undeclared (first use in this function); did you mean 'OCTEON_IS_MODEL'?
      free_irq(OCTEON_IRQ_RML, &number_spi_ports);
               ^~~~~~~~~~~~~~
               OCTEON_IS_MODEL
--
   In file included from arch/mips/include/asm/octeon/octeon.h:11:0,
                    from drivers/staging/octeon/octeon-ethernet.h:19,
                    from drivers/staging/octeon/ethernet-tx.c:25:
   arch/mips/include/asm/octeon/cvmx.h: In function 'cvmx_writeq_csr':
   arch/mips/include/asm/octeon/cvmx.h:282:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     cvmx_write_csr((__force uint64_t)csr_addr, val);
                    ^
   arch/mips/include/asm/octeon/cvmx.h: In function 'cvmx_readq_csr':
   arch/mips/include/asm/octeon/cvmx.h:299:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     return cvmx_read_csr((__force uint64_t) csr_addr);
                          ^
   In file included from drivers/staging/octeon/octeon-ethernet.h:27:0,
                    from drivers/staging/octeon/ethernet-tx.c:25:
   arch/mips/include/asm/octeon/cvmx-ipd.h: In function 'cvmx_ipd_free_ptr':
>> arch/mips/include/asm/octeon/cvmx-ipd.h:330:27: error: storage size of 'pip_sft_rst' isn't known
       union cvmx_pip_sft_rst pip_sft_rst;
                              ^~~~~~~~~~~
>> arch/mips/include/asm/octeon/cvmx-ipd.h:331:36: error: 'CVMX_PIP_SFT_RST' undeclared (first use in this function); did you mean 'CVMX_CIU_SOFT_RST'?
       pip_sft_rst.u64 = cvmx_read_csr(CVMX_PIP_SFT_RST);
                                       ^~~~~~~~~~~~~~~~
                                       CVMX_CIU_SOFT_RST
   arch/mips/include/asm/octeon/cvmx-ipd.h:331:36: note: each undeclared identifier is reported only once for each function it appears in
   arch/mips/include/asm/octeon/cvmx-ipd.h:330:27: warning: unused variable 'pip_sft_rst' [-Wunused-variable]
       union cvmx_pip_sft_rst pip_sft_rst;
                              ^~~~~~~~~~~
   In file included from drivers/staging/octeon/ethernet-tx.c:26:0:
   drivers/staging/octeon/ethernet-tx.c: In function 'cvm_oct_xmit':
>> drivers/staging/octeon/ethernet-defines.h:30:38: error: 'CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE' undeclared (first use in this function); did you mean 'CONFIG_MDIO_OCTEON_MODULE'?
    #define USE_ASYNC_IOBDMA            (CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE > 0)
                                         ^
   drivers/staging/octeon/ethernet-tx.c:169:6: note: in expansion of macro 'USE_ASYNC_IOBDMA'
     if (USE_ASYNC_IOBDMA) {
         ^~~~~~~~~~~~~~~~
   In file included from arch/mips/include/asm/barrier.h:11:0,
                    from include/linux/compiler.h:256,
                    from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/module.h:9,
                    from drivers/staging/octeon/ethernet-tx.c:8:
   drivers/staging/octeon/ethernet-tx.c:264:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      hw_buffer.s.addr = XKPHYS_TO_PHYS((u64)skb->data);
                                        ^
   arch/mips/include/asm/addrspace.h:128:30: note: in definition of macro 'XKPHYS_TO_PHYS'
    #define XKPHYS_TO_PHYS(p)  ((p) & TO_PHYS_MASK)
                                 ^
   drivers/staging/octeon/ethernet-tx.c:268:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      hw_buffer.s.addr = XKPHYS_TO_PHYS((u64)skb->data);
                                        ^
   arch/mips/include/asm/addrspace.h:128:30: note: in definition of macro 'XKPHYS_TO_PHYS'
    #define XKPHYS_TO_PHYS(p)  ((p) & TO_PHYS_MASK)
                                 ^
   drivers/staging/octeon/ethernet-tx.c:276:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
        XKPHYS_TO_PHYS((u64)skb_frag_address(fs));
                       ^
   arch/mips/include/asm/addrspace.h:128:30: note: in definition of macro 'XKPHYS_TO_PHYS'
    #define XKPHYS_TO_PHYS(p)  ((p) & TO_PHYS_MASK)
                                 ^
   drivers/staging/octeon/ethernet-tx.c:280:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      hw_buffer.s.addr = XKPHYS_TO_PHYS((u64)CVM_OCT_SKB_CB(skb));
                                        ^
   arch/mips/include/asm/addrspace.h:128:30: note: in definition of macro 'XKPHYS_TO_PHYS'
    #define XKPHYS_TO_PHYS(p)  ((p) & TO_PHYS_MASK)
                                 ^
   drivers/staging/octeon/ethernet-tx.c: In function 'cvm_oct_tx_initialize':
>> drivers/staging/octeon/ethernet-tx.c:706:18: error: 'OCTEON_IRQ_TIMER1' undeclared (first use in this function); did you mean 'OCTEON_IS_MODEL'?
     i = request_irq(OCTEON_IRQ_TIMER1,
                     ^~~~~~~~~~~~~~~~~
                     OCTEON_IS_MODEL
   drivers/staging/octeon/ethernet-tx.c: In function 'cvm_oct_tx_shutdown':
   drivers/staging/octeon/ethernet-tx.c:717:11: error: 'OCTEON_IRQ_TIMER1' undeclared (first use in this function); did you mean 'OCTEON_IS_MODEL'?
     free_irq(OCTEON_IRQ_TIMER1, cvm_oct_device);
              ^~~~~~~~~~~~~~~~~
              OCTEON_IS_MODEL

vim +330 arch/mips/include/asm/octeon/cvmx-ipd.h

80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  154  
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  155  /**
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  156   * Supportive function for cvmx_fpa_shutdown_pool.
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  157   */
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  158  static inline void cvmx_ipd_free_ptr(void)
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  159  {
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  160  	/* Only CN38XXp{1,2} cannot read pointer out of the IPD */
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  161  	if (!OCTEON_IS_MODEL(OCTEON_CN38XX_PASS1)
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  162  	    && !OCTEON_IS_MODEL(OCTEON_CN38XX_PASS2)) {
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  163  		int no_wptr = 0;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  164  		union cvmx_ipd_ptr_count ipd_ptr_count;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  165  		ipd_ptr_count.u64 = cvmx_read_csr(CVMX_IPD_PTR_COUNT);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  166  
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  167  		/* Handle Work Queue Entry in cn56xx and cn52xx */
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  168  		if (octeon_has_feature(OCTEON_FEATURE_NO_WPTR)) {
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  169  			union cvmx_ipd_ctl_status ipd_ctl_status;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  170  			ipd_ctl_status.u64 = cvmx_read_csr(CVMX_IPD_CTL_STATUS);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  171  			if (ipd_ctl_status.s.no_wptr)
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  172  				no_wptr = 1;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  173  		}
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  174  
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  175  		/* Free the prefetched WQE */
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  176  		if (ipd_ptr_count.s.wqev_cnt) {
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  177  			union cvmx_ipd_wqe_ptr_valid ipd_wqe_ptr_valid;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  178  			ipd_wqe_ptr_valid.u64 =
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  179  			    cvmx_read_csr(CVMX_IPD_WQE_PTR_VALID);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  180  			if (no_wptr)
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  181  				cvmx_fpa_free(cvmx_phys_to_ptr
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  182  					      ((uint64_t) ipd_wqe_ptr_valid.s.
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  183  					       ptr << 7), CVMX_FPA_PACKET_POOL,
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  184  					      0);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  185  			else
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  186  				cvmx_fpa_free(cvmx_phys_to_ptr
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  187  					      ((uint64_t) ipd_wqe_ptr_valid.s.
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  188  					       ptr << 7), CVMX_FPA_WQE_POOL, 0);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  189  		}
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  190  
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  191  		/* Free all WQE in the fifo */
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  192  		if (ipd_ptr_count.s.wqe_pcnt) {
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  193  			int i;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  194  			union cvmx_ipd_pwp_ptr_fifo_ctl ipd_pwp_ptr_fifo_ctl;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  195  			ipd_pwp_ptr_fifo_ctl.u64 =
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  196  			    cvmx_read_csr(CVMX_IPD_PWP_PTR_FIFO_CTL);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  197  			for (i = 0; i < ipd_ptr_count.s.wqe_pcnt; i++) {
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  198  				ipd_pwp_ptr_fifo_ctl.s.cena = 0;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  199  				ipd_pwp_ptr_fifo_ctl.s.raddr =
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  200  				    ipd_pwp_ptr_fifo_ctl.s.max_cnts +
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  201  				    (ipd_pwp_ptr_fifo_ctl.s.wraddr +
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  202  				     i) % ipd_pwp_ptr_fifo_ctl.s.max_cnts;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  203  				cvmx_write_csr(CVMX_IPD_PWP_PTR_FIFO_CTL,
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  204  					       ipd_pwp_ptr_fifo_ctl.u64);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  205  				ipd_pwp_ptr_fifo_ctl.u64 =
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  206  				    cvmx_read_csr(CVMX_IPD_PWP_PTR_FIFO_CTL);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  207  				if (no_wptr)
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  208  					cvmx_fpa_free(cvmx_phys_to_ptr
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  209  						      ((uint64_t)
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  210  						       ipd_pwp_ptr_fifo_ctl.s.
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  211  						       ptr << 7),
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  212  						      CVMX_FPA_PACKET_POOL, 0);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  213  				else
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  214  					cvmx_fpa_free(cvmx_phys_to_ptr
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  215  						      ((uint64_t)
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  216  						       ipd_pwp_ptr_fifo_ctl.s.
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  217  						       ptr << 7),
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  218  						      CVMX_FPA_WQE_POOL, 0);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  219  			}
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  220  			ipd_pwp_ptr_fifo_ctl.s.cena = 1;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  221  			cvmx_write_csr(CVMX_IPD_PWP_PTR_FIFO_CTL,
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  222  				       ipd_pwp_ptr_fifo_ctl.u64);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  223  		}
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  224  
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  225  		/* Free the prefetched packet */
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  226  		if (ipd_ptr_count.s.pktv_cnt) {
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  227  			union cvmx_ipd_pkt_ptr_valid ipd_pkt_ptr_valid;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  228  			ipd_pkt_ptr_valid.u64 =
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  229  			    cvmx_read_csr(CVMX_IPD_PKT_PTR_VALID);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  230  			cvmx_fpa_free(cvmx_phys_to_ptr
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  231  				      (ipd_pkt_ptr_valid.s.ptr << 7),
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  232  				      CVMX_FPA_PACKET_POOL, 0);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  233  		}
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  234  
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  235  		/* Free the per port prefetched packets */
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  236  		if (1) {
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  237  			int i;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  238  			union cvmx_ipd_prc_port_ptr_fifo_ctl
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  239  			    ipd_prc_port_ptr_fifo_ctl;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  240  			ipd_prc_port_ptr_fifo_ctl.u64 =
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  241  			    cvmx_read_csr(CVMX_IPD_PRC_PORT_PTR_FIFO_CTL);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  242  
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  243  			for (i = 0; i < ipd_prc_port_ptr_fifo_ctl.s.max_pkt;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  244  			     i++) {
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  245  				ipd_prc_port_ptr_fifo_ctl.s.cena = 0;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  246  				ipd_prc_port_ptr_fifo_ctl.s.raddr =
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  247  				    i % ipd_prc_port_ptr_fifo_ctl.s.max_pkt;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  248  				cvmx_write_csr(CVMX_IPD_PRC_PORT_PTR_FIFO_CTL,
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  249  					       ipd_prc_port_ptr_fifo_ctl.u64);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  250  				ipd_prc_port_ptr_fifo_ctl.u64 =
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  251  				    cvmx_read_csr
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  252  				    (CVMX_IPD_PRC_PORT_PTR_FIFO_CTL);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  253  				cvmx_fpa_free(cvmx_phys_to_ptr
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  254  					      ((uint64_t)
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  255  					       ipd_prc_port_ptr_fifo_ctl.s.
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  256  					       ptr << 7), CVMX_FPA_PACKET_POOL,
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  257  					      0);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  258  			}
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  259  			ipd_prc_port_ptr_fifo_ctl.s.cena = 1;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  260  			cvmx_write_csr(CVMX_IPD_PRC_PORT_PTR_FIFO_CTL,
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  261  				       ipd_prc_port_ptr_fifo_ctl.u64);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  262  		}
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  263  
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  264  		/* Free all packets in the holding fifo */
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  265  		if (ipd_ptr_count.s.pfif_cnt) {
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  266  			int i;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  267  			union cvmx_ipd_prc_hold_ptr_fifo_ctl
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  268  			    ipd_prc_hold_ptr_fifo_ctl;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  269  
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  270  			ipd_prc_hold_ptr_fifo_ctl.u64 =
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  271  			    cvmx_read_csr(CVMX_IPD_PRC_HOLD_PTR_FIFO_CTL);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  272  
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  273  			for (i = 0; i < ipd_ptr_count.s.pfif_cnt; i++) {
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  274  				ipd_prc_hold_ptr_fifo_ctl.s.cena = 0;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  275  				ipd_prc_hold_ptr_fifo_ctl.s.raddr =
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  276  				    (ipd_prc_hold_ptr_fifo_ctl.s.praddr +
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  277  				     i) % ipd_prc_hold_ptr_fifo_ctl.s.max_pkt;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  278  				cvmx_write_csr(CVMX_IPD_PRC_HOLD_PTR_FIFO_CTL,
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  279  					       ipd_prc_hold_ptr_fifo_ctl.u64);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  280  				ipd_prc_hold_ptr_fifo_ctl.u64 =
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  281  				    cvmx_read_csr
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  282  				    (CVMX_IPD_PRC_HOLD_PTR_FIFO_CTL);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  283  				cvmx_fpa_free(cvmx_phys_to_ptr
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  284  					      ((uint64_t)
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  285  					       ipd_prc_hold_ptr_fifo_ctl.s.
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  286  					       ptr << 7), CVMX_FPA_PACKET_POOL,
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  287  					      0);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  288  			}
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  289  			ipd_prc_hold_ptr_fifo_ctl.s.cena = 1;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  290  			cvmx_write_csr(CVMX_IPD_PRC_HOLD_PTR_FIFO_CTL,
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  291  				       ipd_prc_hold_ptr_fifo_ctl.u64);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  292  		}
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  293  
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  294  		/* Free all packets in the fifo */
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  295  		if (ipd_ptr_count.s.pkt_pcnt) {
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  296  			int i;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  297  			union cvmx_ipd_pwp_ptr_fifo_ctl ipd_pwp_ptr_fifo_ctl;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  298  			ipd_pwp_ptr_fifo_ctl.u64 =
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  299  			    cvmx_read_csr(CVMX_IPD_PWP_PTR_FIFO_CTL);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  300  
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  301  			for (i = 0; i < ipd_ptr_count.s.pkt_pcnt; i++) {
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  302  				ipd_pwp_ptr_fifo_ctl.s.cena = 0;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  303  				ipd_pwp_ptr_fifo_ctl.s.raddr =
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  304  				    (ipd_pwp_ptr_fifo_ctl.s.praddr +
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  305  				     i) % ipd_pwp_ptr_fifo_ctl.s.max_cnts;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  306  				cvmx_write_csr(CVMX_IPD_PWP_PTR_FIFO_CTL,
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  307  					       ipd_pwp_ptr_fifo_ctl.u64);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  308  				ipd_pwp_ptr_fifo_ctl.u64 =
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  309  				    cvmx_read_csr(CVMX_IPD_PWP_PTR_FIFO_CTL);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  310  				cvmx_fpa_free(cvmx_phys_to_ptr
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  311  					      ((uint64_t) ipd_pwp_ptr_fifo_ctl.
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  312  					       s.ptr << 7),
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  313  					      CVMX_FPA_PACKET_POOL, 0);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  314  			}
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  315  			ipd_pwp_ptr_fifo_ctl.s.cena = 1;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  316  			cvmx_write_csr(CVMX_IPD_PWP_PTR_FIFO_CTL,
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  317  				       ipd_pwp_ptr_fifo_ctl.u64);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  318  		}
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  319  
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  320  		/* Reset the IPD to get all buffers out of it */
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  321  		{
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  322  			union cvmx_ipd_ctl_status ipd_ctl_status;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  323  			ipd_ctl_status.u64 = cvmx_read_csr(CVMX_IPD_CTL_STATUS);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  324  			ipd_ctl_status.s.reset = 1;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  325  			cvmx_write_csr(CVMX_IPD_CTL_STATUS, ipd_ctl_status.u64);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  326  		}
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  327  
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  328  		/* Reset the PIP */
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  329  		{
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05 @330  			union cvmx_pip_sft_rst pip_sft_rst;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05 @331  			pip_sft_rst.u64 = cvmx_read_csr(CVMX_PIP_SFT_RST);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  332  			pip_sft_rst.s.rst = 1;
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  333  			cvmx_write_csr(CVMX_PIP_SFT_RST, pip_sft_rst.u64);
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  334  		}
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  335  	}
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  336  }
80ff0fd3ab6451 drivers/staging/octeon/cvmx-ipd.h David Daney 2009-05-05  337  

:::::: The code at line 330 was first introduced by commit
:::::: 80ff0fd3ab6451407a20c19b80c1643c4a6d6434 Staging: Add octeon-ethernet driver files.

:::::: TO: David Daney <ddaney@...iumnetworks.com>
:::::: CC: Ralf Baechle <ralf@...ux-mips.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (61512 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ