linux/drivers/staging/octeon
Paul Burton 17a29fea08 staging/octeon: Use stubs for MIPS && !CAVIUM_OCTEON_SOC
When building for a non-Cavium MIPS system with COMPILE_TEST=y, the
Octeon ethernet driver hits a number of issues due to use of macros
provided only for CONFIG_CAVIUM_OCTEON_SOC=y configurations. For
example:

  drivers/staging/octeon/ethernet-rx.c:190:6: error:
    'CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE' undeclared (first use in this function)
  drivers/staging/octeon/ethernet-rx.c:472:25: error:
    'OCTEON_IRQ_WORKQ0' undeclared (first use in this function)

These come from various asm/ headers that a non-Octeon build will be
using a non-Octeon version of.

Fix this by using the octeon-stubs.h header for non-Cavium MIPS builds,
and only using the real asm/octeon/ headers when building a Cavium
Octeon kernel configuration.

This requires that octeon-stubs.h doesn't redefine XKPHYS_TO_PHYS, which
is defined for MIPS by asm/addrspace.h which is pulled in by many other
common asm/ headers.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
URL: https://lore.kernel.org/linux-mips/CAMuHMdXvu+BppwzsU9imNWVKea_hoLcRt9N+a29Q-QsjW=ip2g@mail.gmail.com/
Fixes: 171a9bae68 ("staging/octeon: Allow test build on !MIPS")
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: David S. Miller <davem@davemloft.net>

Link: https://lore.kernel.org/r/20191007231741.2012860-1-paul.burton@mips.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-08 14:50:15 +02:00
..
ethernet-defines.h staging/octeon: Allow test build on !MIPS 2019-07-29 10:35:41 -07:00
ethernet-mdio.c staging/octeon: Allow test build on !MIPS 2019-07-29 10:35:41 -07:00
ethernet-mdio.h staging: octeon: remove redundant license text 2018-01-15 16:03:45 +01:00
ethernet-mem.c staging/octeon: Allow test build on !MIPS 2019-07-29 10:35:41 -07:00
ethernet-mem.h staging: octeon: remove redundant license text 2018-01-15 16:03:45 +01:00
ethernet-rgmii.c staging/octeon: Allow test build on !MIPS 2019-07-29 10:35:41 -07:00
ethernet-rx.c staging/octeon: Allow test build on !MIPS 2019-07-29 10:35:41 -07:00
ethernet-rx.h staging/octeon: Allow test build on !MIPS 2019-07-29 10:35:41 -07:00
ethernet-sgmii.c staging/octeon: Allow test build on !MIPS 2019-07-29 10:35:41 -07:00
ethernet-spi.c staging/octeon: Allow test build on !MIPS 2019-07-29 10:35:41 -07:00
ethernet-tx.c staging/octeon: Allow test build on !MIPS 2019-07-29 10:35:41 -07:00
ethernet-tx.h staging: octeon: remove redundant license text 2018-01-15 16:03:45 +01:00
ethernet-util.h staging/octeon: Allow test build on !MIPS 2019-07-29 10:35:41 -07:00
ethernet.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2019-09-18 12:34:53 -07:00
Kconfig staging/octeon: Fix build error without CONFIG_NETDEVICES 2019-07-31 09:07:05 -07:00
Makefile staging: octeon: remove redundant license text 2018-01-15 16:03:45 +01:00
octeon-ethernet.h staging/octeon: Use stubs for MIPS && !CAVIUM_OCTEON_SOC 2019-10-08 14:50:15 +02:00
octeon-stubs.h staging/octeon: Use stubs for MIPS && !CAVIUM_OCTEON_SOC 2019-10-08 14:50:15 +02:00
TODO staging: octeon-ethernet: add TODO 2019-04-30 15:00:30 +02:00