* [PATCH for-4.15] MIPS: Fix undefined reference to physical_memsize
@ 2018-01-15 20:54 James Hogan
2018-01-16 3:10 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: James Hogan @ 2018-01-15 20:54 UTC (permalink / raw)
To: Ralf Baechle, linux-mips
Cc: James Hogan, John Crispin, Hauke Mehrtens, Paul Burton,
Matt Redfearn, Guenter Roeck
Since commit d41e6858ba58 ("MIPS: Kconfig: Set default MIPS system type
as generic") switched the default platform to the "generic" platform,
allmodconfig has been failing with the following linker error (among
other errors):
arch/mips/kernel/vpe-mt.o In function `vpe_run':
(.text+0x59c): undefined reference to `physical_memsize'
The Lantiq platform already worked around the same issue in commit
9050d50e2244 ("MIPS: lantiq: Set physical_memsize") by declaring
physical_memsize with the initial value of 0 (on the assumption that the
actual memory size will be hard-coded in the loaded VPE firmware), and
the Malta platform already provided physical_memsize.
Since all other platforms will fail to link with the VPE loader enabled,
only allow Lantiq and Malta platforms to enable it, by way of a
SYS_SUPPORTS_VPE_LOADER which is selected by those two platforms and
which MIPS_VPE_LOADER depends on. SYS_SUPPORTS_MULTITHREADING is now a
dependency of SYS_SUPPORTS_VPE_LOADER so that Kconfig emits a warning if
SYS_SUPPORTS_VPE_LOADER is selected without SYS_SUPPORTS_MULTITHREADING.
Fixes: d41e6858ba58 ("MIPS: Kconfig: Set default MIPS system type as generic")
Signed-off-by: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: John Crispin <john@phrozen.org>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-mips@linux-mips.org
---
arch/mips/Kconfig | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 659e0079487f..8e0b3702f1c0 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -390,6 +390,7 @@ config LANTIQ
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_MIPS16
select SYS_SUPPORTS_MULTITHREADING
+ select SYS_SUPPORTS_VPE_LOADER
select SYS_HAS_EARLY_PRINTK
select GPIOLIB
select SWAP_IO_SPACE
@@ -517,6 +518,7 @@ config MIPS_MALTA
select SYS_SUPPORTS_MIPS16
select SYS_SUPPORTS_MULTITHREADING
select SYS_SUPPORTS_SMARTMIPS
+ select SYS_SUPPORTS_VPE_LOADER
select SYS_SUPPORTS_ZBOOT
select SYS_SUPPORTS_RELOCATABLE
select USE_OF
@@ -2282,9 +2284,16 @@ config MIPSR2_TO_R6_EMULATOR
The only reason this is a build-time option is to save ~14K from the
final kernel image.
+config SYS_SUPPORTS_VPE_LOADER
+ bool
+ depends on SYS_SUPPORTS_MULTITHREADING
+ help
+ Indicates that the platform supports the VPE loader, and provides
+ physical_memsize.
+
config MIPS_VPE_LOADER
bool "VPE loader support."
- depends on SYS_SUPPORTS_MULTITHREADING && MODULES
+ depends on SYS_SUPPORTS_VPE_LOADER && MODULES
select CPU_MIPSR2_IRQ_VI
select CPU_MIPSR2_IRQ_EI
select MIPS_MT
--
2.13.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH for-4.15] MIPS: Fix undefined reference to physical_memsize
2018-01-15 20:54 [PATCH for-4.15] MIPS: Fix undefined reference to physical_memsize James Hogan
@ 2018-01-16 3:10 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2018-01-16 3:10 UTC (permalink / raw)
To: James Hogan, Ralf Baechle, linux-mips
Cc: John Crispin, Hauke Mehrtens, Paul Burton, Matt Redfearn
On 01/15/2018 12:54 PM, James Hogan wrote:
> Since commit d41e6858ba58 ("MIPS: Kconfig: Set default MIPS system type
> as generic") switched the default platform to the "generic" platform,
> allmodconfig has been failing with the following linker error (among
> other errors):
>
> arch/mips/kernel/vpe-mt.o In function `vpe_run':
> (.text+0x59c): undefined reference to `physical_memsize'
>
> The Lantiq platform already worked around the same issue in commit
> 9050d50e2244 ("MIPS: lantiq: Set physical_memsize") by declaring
> physical_memsize with the initial value of 0 (on the assumption that the
> actual memory size will be hard-coded in the loaded VPE firmware), and
> the Malta platform already provided physical_memsize.
>
> Since all other platforms will fail to link with the VPE loader enabled,
> only allow Lantiq and Malta platforms to enable it, by way of a
> SYS_SUPPORTS_VPE_LOADER which is selected by those two platforms and
> which MIPS_VPE_LOADER depends on. SYS_SUPPORTS_MULTITHREADING is now a
> dependency of SYS_SUPPORTS_VPE_LOADER so that Kconfig emits a warning if
> SYS_SUPPORTS_VPE_LOADER is selected without SYS_SUPPORTS_MULTITHREADING.
>
> Fixes: d41e6858ba58 ("MIPS: Kconfig: Set default MIPS system type as generic")
> Signed-off-by: James Hogan <jhogan@kernel.org>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: John Crispin <john@phrozen.org>
> Cc: Hauke Mehrtens <hauke@hauke-m.de>
> Cc: Paul Burton <paul.burton@mips.com>
> Cc: Matt Redfearn <matt.redfearn@imgtec.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: linux-mips@linux-mips.org
Tested-by: Guenter Roeck <linux@roeck-us.net>
> ---
> arch/mips/Kconfig | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 659e0079487f..8e0b3702f1c0 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -390,6 +390,7 @@ config LANTIQ
> select SYS_SUPPORTS_32BIT_KERNEL
> select SYS_SUPPORTS_MIPS16
> select SYS_SUPPORTS_MULTITHREADING
> + select SYS_SUPPORTS_VPE_LOADER
> select SYS_HAS_EARLY_PRINTK
> select GPIOLIB
> select SWAP_IO_SPACE
> @@ -517,6 +518,7 @@ config MIPS_MALTA
> select SYS_SUPPORTS_MIPS16
> select SYS_SUPPORTS_MULTITHREADING
> select SYS_SUPPORTS_SMARTMIPS
> + select SYS_SUPPORTS_VPE_LOADER
> select SYS_SUPPORTS_ZBOOT
> select SYS_SUPPORTS_RELOCATABLE
> select USE_OF
> @@ -2282,9 +2284,16 @@ config MIPSR2_TO_R6_EMULATOR
> The only reason this is a build-time option is to save ~14K from the
> final kernel image.
>
> +config SYS_SUPPORTS_VPE_LOADER
> + bool
> + depends on SYS_SUPPORTS_MULTITHREADING
> + help
> + Indicates that the platform supports the VPE loader, and provides
> + physical_memsize.
> +
> config MIPS_VPE_LOADER
> bool "VPE loader support."
> - depends on SYS_SUPPORTS_MULTITHREADING && MODULES
> + depends on SYS_SUPPORTS_VPE_LOADER && MODULES
> select CPU_MIPSR2_IRQ_VI
> select CPU_MIPSR2_IRQ_EI
> select MIPS_MT
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-16 3:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-15 20:54 [PATCH for-4.15] MIPS: Fix undefined reference to physical_memsize James Hogan
2018-01-16 3:10 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox