1
0
Fork 0
alistair23-linux/arch/mips/include/asm/octeon
Paul Burton 0228ecf612
MIPS: octeon: Include required header; fix octeon ethernet build
Commit 171a9bae68 ("staging/octeon: Allow test build on !MIPS") moved
the inclusion of a bunch of headers by various files in the Octeon
ethernet driver into a common header, but in doing so it changed the
order in which those headers are included.

Prior to the referenced commit drivers/staging/octeon/ethernet.c
included asm/octeon/cvmx-pip.h before asm/octeon/cvmx-ipd.h, which makes
use of the CVMX_PIP_SFT_RST definition pulled in by the former. After
commit 171a9bae68 ("staging/octeon: Allow test build on !MIPS") we
pull in asm/octeon/cvmx-ipd.h first & builds fail with:

  In file included from drivers/staging/octeon/octeon-ethernet.h:27,
                   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;
                             ^~~~~~~~~~~
  make[4]: *** [scripts/Makefile.build:266: drivers/staging/octeon/ethernet.o]
    Error 1
  make[3]: *** [scripts/Makefile.build:509: drivers/staging/octeon] Error 2

Fix this by having asm/octeon/cvmx-ipd.h include the
asm/octeon/cvmx-pip-defs.h header that it is reliant upon, rather than
requiring its users to pull in that header before it.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Fixes: 171a9bae68 ("staging/octeon: Allow test build on !MIPS")
Cc: David S. Miller <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: linux-mips@vger.kernel.org
Cc: David S . Miller <davem@davemloft.net>
Cc: Matthew Wilcox <willy@infradead.org>
2019-10-02 10:08:20 -07:00
..
cvmx-address.h MIPS: Octeon: Turn hardware bitfields and structures inside out. 2015-04-01 17:22:14 +02:00
cvmx-agl-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-asm.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
cvmx-asxx-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-boot-vector.h MIPS: Octeon: Add support for accessing the boot vector. 2017-09-04 21:19:03 +02:00
cvmx-bootinfo.h MIPS: Octeon: board_type_to_string: return NULL for unsupported board 2016-05-13 14:01:41 +02:00
cvmx-bootmem.h MIPS: OCTEON: cvmx-bootmem: make more functions static 2018-11-21 15:36:47 -08:00
cvmx-ciu-defs.h MIPS: Octeon: Simplify CIU register functions. 2018-07-03 16:01:36 -07:00
cvmx-ciu2-defs.h MIPS: OCTEON: cvmx-ciu2-defs.h: delete unused unions 2018-11-21 15:36:49 -08:00
cvmx-ciu3-defs.h MIPS: OCTEON: Add register definitions for cn73xx, cnf75xx and cn78xx. 2016-05-13 14:01:40 +02:00
cvmx-cmd-queue.h MIPS: Cavium: Fix typo 2016-05-28 12:35:07 +02:00
cvmx-config.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cvmx-coremask.h MIPS: OCTEON: Extend number of supported CPUs past 32 2016-05-13 14:01:39 +02:00
cvmx-dbg-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-dpi-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-fau.h MIPS: Octeon: Reverse the order of register accesses to the FAU 2015-04-01 17:22:14 +02:00
cvmx-fpa-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-fpa.h MIPS: Octeon: Remove usage of cvmx_wait() everywhere. 2017-11-07 18:33:14 +00:00
cvmx-gmxx-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-gpio-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-helper-board.h MIPS: OCTEON: program rx/tx-delay always from DT 2019-02-07 15:22:38 -08:00
cvmx-helper-errata.h MIPS: Add Cavium OCTEON PCI support. 2009-06-17 11:06:25 +01:00
cvmx-helper-jtag.h MIPS: Add Cavium OCTEON PCI support. 2009-06-17 11:06:25 +01:00
cvmx-helper-loop.h MIPS: Octeon: Rearrange CVMX files in preperation for device tree 2011-12-07 22:03:29 +00:00
cvmx-helper-npi.h MIPS: Octeon: Rearrange CVMX files in preperation for device tree 2011-12-07 22:03:29 +00:00
cvmx-helper-rgmii.h MIPS: OCTEON: delete unused loopback configuration functions 2018-11-21 15:36:41 -08:00
cvmx-helper-sgmii.h MIPS: OCTEON: delete unused loopback configuration functions 2018-11-21 15:36:41 -08:00
cvmx-helper-spi.h MIPS: Octeon: Kill cvmx_helper_link_autoconf() 2017-01-03 16:34:32 +01:00
cvmx-helper-util.h MIPS: OCTEON: cvmx-helper-util: make cvmx_helper_setup_red_queue static 2018-11-21 15:36:46 -08:00
cvmx-helper-xaui.h MIPS: OCTEON: delete unused loopback configuration functions 2018-11-21 15:36:41 -08:00
cvmx-helper.h MIPS: OCTEON: delete cvmx override functions 2018-11-21 15:36:47 -08:00
cvmx-iob-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-ipd-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-ipd.h MIPS: octeon: Include required header; fix octeon ethernet build 2019-10-02 10:08:20 -07:00
cvmx-l2c-defs.h MIPS: Octeon: Fix broken EDAC driver. 2017-08-07 11:58:48 +02:00
cvmx-l2c.h MIPS: Octeon: Remove unused L2C types and macros. 2017-04-10 11:56:06 +02:00
cvmx-l2d-defs.h MIPS: Octeon: Fix broken EDAC driver. 2017-08-07 11:58:48 +02:00
cvmx-l2t-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-led-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-lmcx-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-mio-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-mixx-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-npei-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-npi-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-packet.h MIPS: Octeon: Turn hardware bitfields and structures inside out. 2015-04-01 17:22:14 +02:00
cvmx-pci-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-pciercx-defs.h MIPS: Octeon: Remove unused PCIERCX types and macros. 2017-04-10 11:56:07 +02:00
cvmx-pcsx-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-pcsxx-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-pemx-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-pescx-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-pexp-defs.h MIPS: OCTEON: Update register definitions. 2012-08-31 10:46:53 -07:00
cvmx-pip-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-pip.h MIPS: Octeon: Support all PIP input ports on CN68XX 2015-09-03 12:08:08 +02:00
cvmx-pko-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-pko.h MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible definition 2018-12-04 15:51:12 -08:00
cvmx-pow-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-pow.h MIPS: Cavium: Fix typo 2016-05-28 12:35:07 +02:00
cvmx-rnm-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-rst-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-scratch.h MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
cvmx-sli-defs.h MIPS: Octeon: Mark expected switch fall-through 2019-08-20 19:43:47 -05:00
cvmx-spi.h MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
cvmx-spinlock.h MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
cvmx-spxx-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-sriox-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-srxx-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-stxx-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-sysinfo.h MIPS: OCTEON: Extend number of supported CPUs past 32 2016-05-13 14:01:39 +02:00
cvmx-uctlx-defs.h MIPS: OCTEON: delete redundant register definitions 2018-12-04 15:57:30 -08:00
cvmx-wqe.h STAGING: Octeon: Support CN68XX style WQE 2015-09-03 12:08:10 +02:00
cvmx.h MIPS: Octeon: Remove usage of cvmx_wait() everywhere. 2017-11-07 18:33:14 +00:00
octeon-feature.h MIPS: OCTEON: Add model checking support for cn73xx, cnf75xx and cn78xx 2016-05-13 14:01:40 +02:00
octeon-model.h MIPS: OCTEON: Add model checking support for cn73xx, cnf75xx and cn78xx 2016-05-13 14:01:40 +02:00
octeon.h MIPS: Octeon: Fix a typo in #define OCTOEN_SERIAL_LEN 2019-08-19 22:15:12 +01:00
pci-octeon.h MIPS: Octeon: move swiotlb declarations out of dma-coherence.h 2018-06-24 09:26:03 -07:00