[PATCH 2/2] ARM: bcm2835_defconfig: Enable SMP support

Jonathan Neuschäfer posted 2 patches 1 year, 7 months ago
[PATCH 2/2] ARM: bcm2835_defconfig: Enable SMP support
Posted by Jonathan Neuschäfer 1 year, 7 months ago
Since there is only one Raspberry Pi related defconfig in the mainline
kernel, it's useful to have to work well on all 32-bit Raspberry Pis.
To that end, this patch enables CONFIG_SMP and CONFIG_SMP_ON_UP, which
allows the kernel to run well on multi- and single-CPU systems.

PM and suspend support is necessary in order to keep KEXEC enabled.

Tested on:
- Raspberry Pi 2 Model B V1.1 (BCM2836, SMP)
- Raspberry Pi Model B (BCM2835, UP)

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
 arch/arm/configs/bcm2835_defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig
index da49dcfd359050..d505058715b66f 100644
--- a/arch/arm/configs/bcm2835_defconfig
+++ b/arch/arm/configs/bcm2835_defconfig
@@ -24,6 +24,7 @@ CONFIG_KEXEC=y
 CONFIG_ARCH_MULTI_V6=y
 CONFIG_ARCH_BCM=y
 CONFIG_ARCH_BCM2835=y
+CONFIG_SMP=y
 CONFIG_CPU_FREQ=y
 CONFIG_CPU_FREQ_STAT=y
 CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
@@ -33,8 +34,6 @@ CONFIG_CPU_FREQ_GOV_ONDEMAND=y
 CONFIG_CPUFREQ_DT=y
 CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
 CONFIG_VFP=y
-# CONFIG_SUSPEND is not set
-CONFIG_PM=y
 CONFIG_JUMP_LABEL=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
@@ -175,6 +174,7 @@ CONFIG_DEBUG_FS=y
 CONFIG_KGDB=y
 CONFIG_KGDB_KDB=y
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_RCU_TRACE is not set
 CONFIG_FUNCTION_PROFILER=y
 CONFIG_STACK_TRACER=y
 CONFIG_SCHED_TRACER=y

--
2.43.0
Re: [PATCH 2/2] ARM: bcm2835_defconfig: Enable SMP support
Posted by Stefan Wahren 1 year, 7 months ago
Hi Jonathan,

Am 07.07.24 um 23:48 schrieb Jonathan Neuschäfer:
> Since there is only one Raspberry Pi related defconfig in the mainline
> kernel, it's useful to have to work well on all 32-bit Raspberry Pis.
this wasn't intention of bcm2835_defconfig. It's more focused on BCM2835
SOC and kernel-ci (both non-SMP). If you want to use the BCM2836 &
BCM2837 (incl. SMP), please use multi_v7_defconfig instead. Applying
this change would decrease the test coverage.
> To that end, this patch enables CONFIG_SMP and CONFIG_SMP_ON_UP, which
> allows the kernel to run well on multi- and single-CPU systems.
>
> PM and suspend support is necessary in order to keep KEXEC enabled.
In this case the subject contains only half of the truth.

Regards
> - Raspberry Pi 2 Model B V1.1 (BCM2836, SMP)
> - Raspberry Pi Model B (BCM2835, UP)
>
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> ---
>   arch/arm/configs/bcm2835_defconfig | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig
> index da49dcfd359050..d505058715b66f 100644
> --- a/arch/arm/configs/bcm2835_defconfig
> +++ b/arch/arm/configs/bcm2835_defconfig
> @@ -24,6 +24,7 @@ CONFIG_KEXEC=y
>   CONFIG_ARCH_MULTI_V6=y
>   CONFIG_ARCH_BCM=y
>   CONFIG_ARCH_BCM2835=y
> +CONFIG_SMP=y
>   CONFIG_CPU_FREQ=y
>   CONFIG_CPU_FREQ_STAT=y
>   CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
> @@ -33,8 +34,6 @@ CONFIG_CPU_FREQ_GOV_ONDEMAND=y
>   CONFIG_CPUFREQ_DT=y
>   CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
>   CONFIG_VFP=y
> -# CONFIG_SUSPEND is not set
> -CONFIG_PM=y
>   CONFIG_JUMP_LABEL=y
>   CONFIG_MODULES=y
>   CONFIG_MODULE_UNLOAD=y
> @@ -175,6 +174,7 @@ CONFIG_DEBUG_FS=y
>   CONFIG_KGDB=y
>   CONFIG_KGDB_KDB=y
>   CONFIG_DEBUG_MEMORY_INIT=y
> +# CONFIG_RCU_TRACE is not set
>   CONFIG_FUNCTION_PROFILER=y
>   CONFIG_STACK_TRACER=y
>   CONFIG_SCHED_TRACER=y
>
> --
> 2.43.0
>
>
Re: [PATCH 2/2] ARM: bcm2835_defconfig: Enable SMP support
Posted by J. Neuschäfer 1 year, 7 months ago
On Mon, Jul 08, 2024 at 05:54:25PM +0200, Stefan Wahren wrote:
> Hi Jonathan,
>
> Am 07.07.24 um 23:48 schrieb Jonathan Neuschäfer:
> > Since there is only one Raspberry Pi related defconfig in the mainline
> > kernel, it's useful to have to work well on all 32-bit Raspberry Pis.
> this wasn't intention of bcm2835_defconfig. It's more focused on BCM2835
> SOC and kernel-ci (both non-SMP). If you want to use the BCM2836 &
> BCM2837 (incl. SMP), please use multi_v7_defconfig instead. Applying
> this change would decrease the test coverage.

Ah, fair enough.


Jonathan
Re: [PATCH 2/2] ARM: bcm2835_defconfig: Enable SMP support
Posted by Florian Fainelli 1 year, 4 months ago
On 7/9/24 12:33, J. Neuschäfer wrote:
> On Mon, Jul 08, 2024 at 05:54:25PM +0200, Stefan Wahren wrote:
>> Hi Jonathan,
>>
>> Am 07.07.24 um 23:48 schrieb Jonathan Neuschäfer:
>>> Since there is only one Raspberry Pi related defconfig in the mainline
>>> kernel, it's useful to have to work well on all 32-bit Raspberry Pis.
>> this wasn't intention of bcm2835_defconfig. It's more focused on BCM2835
>> SOC and kernel-ci (both non-SMP). If you want to use the BCM2836 &
>> BCM2837 (incl. SMP), please use multi_v7_defconfig instead. Applying
>> this change would decrease the test coverage.
> 
> Ah, fair enough.

It is fair that CONFIG_SMP_ON_UP is different from not enabling 
CONFIG_SMP, but if we care to test CONFIG_SMP disabled, should not there 
be a specific modification of multi_v7_defconfig or another 
configuration specifically for that purpose?
-- 
Florian