* [PATCH 0/7 v4] sh: various doc, build, init fixes
@ 2023-03-06 4:00 Randy Dunlap
2023-03-06 4:00 ` [PATCH 3/7 v4] sh: init: use OF_EARLY_FLATTREE for early init Randy Dunlap
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Randy Dunlap @ 2023-03-06 4:00 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, John Paul Adrian Glaubitz, Yoshinori Sato,
Rich Felker, Geert Uytterhoeven, Hitoshi Mitake, linux-sh,
Frank Rowand, devicetree, Arnd Bergmann
All of these patches have been sent previously, anywhere from
one to 3 times. All patches are now called "v4".
This refresh/resend is to assist the new SH maintainer.
[PATCH 1/7 v4] sh: SH2007: drop the bad URL info
[PATCH 2/7 v4] sh: nmi_debug: fix return value of __setup handler
[PATCH 3/7 v4] sh: init: use OF_EARLY_FLATTREE for early init
[PATCH 4/7 v4] sh: math-emu: fix macro redefined warning
[PATCH 5/7 v4] sh: remove sh5/sh64 last fragments
[PATCH 6/7 v4] sh: fix Kconfig entry for NUMA => SMP
[PATCH 7/7 v4] sh: mcount.S: fix build error when PRINTK is not enabled
diffstat:
Documentation/kbuild/kbuild.rst | 1 -
Documentation/scheduler/sched-arch.rst | 2 --
Documentation/translations/zh_CN/scheduler/sched-arch.rst | 2 --
arch/sh/Kconfig | 4 ++++
arch/sh/Kconfig.debug | 2 +-
arch/sh/boards/Kconfig | 1 -
arch/sh/kernel/head_32.S | 6 +++---
arch/sh/kernel/nmi_debug.c | 4 ++--
arch/sh/kernel/setup.c | 4 ++--
arch/sh/math-emu/sfp-util.h | 4 ----
scripts/checkstack.pl | 7 -------
tools/perf/arch/common.c | 2 --
tools/scripts/Makefile.arch | 5 -----
tools/testing/selftests/mm/Makefile | 2 +-
tools/testing/selftests/mm/run_vmtests.sh | 2 +-
15 files changed, 14 insertions(+), 34 deletions(-)
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: linux-sh@vger.kernel.org
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: devicetree@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/7 v4] sh: init: use OF_EARLY_FLATTREE for early init
2023-03-06 4:00 [PATCH 0/7 v4] sh: various doc, build, init fixes Randy Dunlap
@ 2023-03-06 4:00 ` Randy Dunlap
2023-03-19 19:48 ` John Paul Adrian Glaubitz
2023-03-07 15:18 ` [PATCH 0/7 v4] sh: various doc, build, init fixes John Paul Adrian Glaubitz
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2023-03-06 4:00 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Rob Herring, Frank Rowand, devicetree, Rich Felker,
Yoshinori Sato, Geert Uytterhoeven, John Paul Adrian Glaubitz,
linux-sh, stable
When CONFIG_OF_EARLY_FLATTREE and CONFIG_SH_DEVICE_TREE are not set,
SH3 build fails with a call to early_init_dt_scan(), so in
arch/sh/kernel/setup.c and arch/sh/kernel/head_32.S, use
CONFIG_OF_EARLY_FLATTREE instead of CONFIG_OF_FLATTREE.
Fixes this build error:
../arch/sh/kernel/setup.c: In function 'sh_fdt_init':
../arch/sh/kernel/setup.c:262:26: error: implicit declaration of function 'early_init_dt_scan' [-Werror=implicit-function-declaration]
262 | if (!dt_virt || !early_init_dt_scan(dt_virt)) {
Fixes: 03767daa1387 ("sh: fix build regression with CONFIG_OF && !CONFIG_OF_FLATTREE")
Fixes: eb6b6930a70f ("sh: fix memory corruption of unflattened device tree")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: devicetree@vger.kernel.org
Cc: Rich Felker <dalias@libc.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: linux-sh@vger.kernel.org
Cc: stable@vger.kernel.org
---
v2: use Suggested-by: for Rob.
add more Cc's.
v3: skipped
v4: update Cc's, refresh & resend
arch/sh/kernel/head_32.S | 6 +++---
arch/sh/kernel/setup.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff arch/sh/kernel/setup.c arch/sh/kernel/setup.c
diff -- a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -244,7 +244,7 @@ void __init __weak plat_early_device_set
{
}
-#ifdef CONFIG_OF_FLATTREE
+#ifdef CONFIG_OF_EARLY_FLATTREE
void __ref sh_fdt_init(phys_addr_t dt_phys)
{
static int done = 0;
@@ -326,7 +326,7 @@ void __init setup_arch(char **cmdline_p)
/* Let earlyprintk output early console messages */
sh_early_platform_driver_probe("earlyprintk", 1, 1);
-#ifdef CONFIG_OF_FLATTREE
+#ifdef CONFIG_OF_EARLY_FLATTREE
#ifdef CONFIG_USE_BUILTIN_DTB
unflatten_and_copy_device_tree();
#else
diff -- a/arch/sh/kernel/head_32.S b/arch/sh/kernel/head_32.S
--- a/arch/sh/kernel/head_32.S
+++ b/arch/sh/kernel/head_32.S
@@ -64,7 +64,7 @@ ENTRY(_stext)
ldc r0, r6_bank
#endif
-#ifdef CONFIG_OF_FLATTREE
+#ifdef CONFIG_OF_EARLY_FLATTREE
mov r4, r12 ! Store device tree blob pointer in r12
#endif
@@ -315,7 +315,7 @@ ENTRY(_stext)
10:
#endif
-#ifdef CONFIG_OF_FLATTREE
+#ifdef CONFIG_OF_EARLY_FLATTREE
mov.l 8f, r0 ! Make flat device tree available early.
jsr @r0
mov r12, r4
@@ -346,7 +346,7 @@ ENTRY(stack_start)
5: .long start_kernel
6: .long cpu_init
7: .long init_thread_union
-#if defined(CONFIG_OF_FLATTREE)
+#if defined(CONFIG_OF_EARLY_FLATTREE)
8: .long sh_fdt_init
#endif
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/7 v4] sh: various doc, build, init fixes
2023-03-06 4:00 [PATCH 0/7 v4] sh: various doc, build, init fixes Randy Dunlap
2023-03-06 4:00 ` [PATCH 3/7 v4] sh: init: use OF_EARLY_FLATTREE for early init Randy Dunlap
@ 2023-03-07 15:18 ` John Paul Adrian Glaubitz
2023-03-16 13:26 ` John Paul Adrian Glaubitz
2023-03-23 9:41 ` John Paul Adrian Glaubitz
3 siblings, 0 replies; 6+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-03-07 15:18 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Yoshinori Sato, Rich Felker, Geert Uytterhoeven, Hitoshi Mitake,
linux-sh, Frank Rowand, devicetree, Arnd Bergmann
Hi Randy!
On Sun, 2023-03-05 at 20:00 -0800, Randy Dunlap wrote:
> All of these patches have been sent previously, anywhere from
> one to 3 times. All patches are now called "v4".
>
> This refresh/resend is to assist the new SH maintainer.
>
> [PATCH 1/7 v4] sh: SH2007: drop the bad URL info
> [PATCH 2/7 v4] sh: nmi_debug: fix return value of __setup handler
> [PATCH 3/7 v4] sh: init: use OF_EARLY_FLATTREE for early init
> [PATCH 4/7 v4] sh: math-emu: fix macro redefined warning
> [PATCH 5/7 v4] sh: remove sh5/sh64 last fragments
> [PATCH 6/7 v4] sh: fix Kconfig entry for NUMA => SMP
> [PATCH 7/7 v4] sh: mcount.S: fix build error when PRINTK is not enabled
>
> diffstat:
> Documentation/kbuild/kbuild.rst | 1 -
> Documentation/scheduler/sched-arch.rst | 2 --
> Documentation/translations/zh_CN/scheduler/sched-arch.rst | 2 --
> arch/sh/Kconfig | 4 ++++
> arch/sh/Kconfig.debug | 2 +-
> arch/sh/boards/Kconfig | 1 -
> arch/sh/kernel/head_32.S | 6 +++---
> arch/sh/kernel/nmi_debug.c | 4 ++--
> arch/sh/kernel/setup.c | 4 ++--
> arch/sh/math-emu/sfp-util.h | 4 ----
> scripts/checkstack.pl | 7 -------
> tools/perf/arch/common.c | 2 --
> tools/scripts/Makefile.arch | 5 -----
> tools/testing/selftests/mm/Makefile | 2 +-
> tools/testing/selftests/mm/run_vmtests.sh | 2 +-
> 15 files changed, 14 insertions(+), 34 deletions(-)
>
> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
> Cc: linux-sh@vger.kernel.org
> Cc: Frank Rowand <frowand.list@gmail.com>
> Cc: devicetree@vger.kernel.org
> Cc: Arnd Bergmann <arnd@arndb.de>
Thanks for these fixes. All changes look good to me and I'm going to test
them on my SH-7785LCR board on top of 6.3-rc1 and report back. The documentation
changes obviously won't have any impact in this regard.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/7 v4] sh: various doc, build, init fixes
2023-03-06 4:00 [PATCH 0/7 v4] sh: various doc, build, init fixes Randy Dunlap
2023-03-06 4:00 ` [PATCH 3/7 v4] sh: init: use OF_EARLY_FLATTREE for early init Randy Dunlap
2023-03-07 15:18 ` [PATCH 0/7 v4] sh: various doc, build, init fixes John Paul Adrian Glaubitz
@ 2023-03-16 13:26 ` John Paul Adrian Glaubitz
2023-03-23 9:41 ` John Paul Adrian Glaubitz
3 siblings, 0 replies; 6+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-03-16 13:26 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Yoshinori Sato, Rich Felker, Geert Uytterhoeven, Hitoshi Mitake,
linux-sh, Frank Rowand, devicetree, Arnd Bergmann
Hi Randy!
On Sun, 2023-03-05 at 20:00 -0800, Randy Dunlap wrote:
> All of these patches have been sent previously, anywhere from
> one to 3 times. All patches are now called "v4".
>
> This refresh/resend is to assist the new SH maintainer.
>
> [PATCH 1/7 v4] sh: SH2007: drop the bad URL info
> [PATCH 2/7 v4] sh: nmi_debug: fix return value of __setup handler
> [PATCH 3/7 v4] sh: init: use OF_EARLY_FLATTREE for early init
> [PATCH 4/7 v4] sh: math-emu: fix macro redefined warning
> [PATCH 5/7 v4] sh: remove sh5/sh64 last fragments
> [PATCH 6/7 v4] sh: fix Kconfig entry for NUMA => SMP
> [PATCH 7/7 v4] sh: mcount.S: fix build error when PRINTK is not enabled
I have successfully applied, built and booted all patches on my SH7785LCR evaluation
board except for patch #5.
I'll do the review next, then include them in my for-next tree for 6.4.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/7 v4] sh: init: use OF_EARLY_FLATTREE for early init
2023-03-06 4:00 ` [PATCH 3/7 v4] sh: init: use OF_EARLY_FLATTREE for early init Randy Dunlap
@ 2023-03-19 19:48 ` John Paul Adrian Glaubitz
0 siblings, 0 replies; 6+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-03-19 19:48 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Rob Herring, Frank Rowand, devicetree, Rich Felker,
Yoshinori Sato, Geert Uytterhoeven, linux-sh, stable
On Sun, 2023-03-05 at 20:00 -0800, Randy Dunlap wrote:
> When CONFIG_OF_EARLY_FLATTREE and CONFIG_SH_DEVICE_TREE are not set,
> SH3 build fails with a call to early_init_dt_scan(), so in
> arch/sh/kernel/setup.c and arch/sh/kernel/head_32.S, use
> CONFIG_OF_EARLY_FLATTREE instead of CONFIG_OF_FLATTREE.
>
> Fixes this build error:
> ../arch/sh/kernel/setup.c: In function 'sh_fdt_init':
> ../arch/sh/kernel/setup.c:262:26: error: implicit declaration of function 'early_init_dt_scan' [-Werror=implicit-function-declaration]
> 262 | if (!dt_virt || !early_init_dt_scan(dt_virt)) {
>
> Fixes: 03767daa1387 ("sh: fix build regression with CONFIG_OF && !CONFIG_OF_FLATTREE")
> Fixes: eb6b6930a70f ("sh: fix memory corruption of unflattened device tree")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Rob Herring <robh+dt@kernel.org>
> Cc: Frank Rowand <frowand.list@gmail.com>
> Cc: devicetree@vger.kernel.org
> Cc: Rich Felker <dalias@libc.org>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Cc: linux-sh@vger.kernel.org
> Cc: stable@vger.kernel.org
> ---
> v2: use Suggested-by: for Rob.
> add more Cc's.
> v3: skipped
> v4: update Cc's, refresh & resend
>
> arch/sh/kernel/head_32.S | 6 +++---
> arch/sh/kernel/setup.c | 4 ++--
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff arch/sh/kernel/setup.c arch/sh/kernel/setup.c
> diff -- a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
> --- a/arch/sh/kernel/setup.c
> +++ b/arch/sh/kernel/setup.c
> @@ -244,7 +244,7 @@ void __init __weak plat_early_device_set
> {
> }
>
> -#ifdef CONFIG_OF_FLATTREE
> +#ifdef CONFIG_OF_EARLY_FLATTREE
> void __ref sh_fdt_init(phys_addr_t dt_phys)
> {
> static int done = 0;
> @@ -326,7 +326,7 @@ void __init setup_arch(char **cmdline_p)
> /* Let earlyprintk output early console messages */
> sh_early_platform_driver_probe("earlyprintk", 1, 1);
>
> -#ifdef CONFIG_OF_FLATTREE
> +#ifdef CONFIG_OF_EARLY_FLATTREE
> #ifdef CONFIG_USE_BUILTIN_DTB
> unflatten_and_copy_device_tree();
> #else
> diff -- a/arch/sh/kernel/head_32.S b/arch/sh/kernel/head_32.S
> --- a/arch/sh/kernel/head_32.S
> +++ b/arch/sh/kernel/head_32.S
> @@ -64,7 +64,7 @@ ENTRY(_stext)
> ldc r0, r6_bank
> #endif
>
> -#ifdef CONFIG_OF_FLATTREE
> +#ifdef CONFIG_OF_EARLY_FLATTREE
> mov r4, r12 ! Store device tree blob pointer in r12
> #endif
>
> @@ -315,7 +315,7 @@ ENTRY(_stext)
> 10:
> #endif
>
> -#ifdef CONFIG_OF_FLATTREE
> +#ifdef CONFIG_OF_EARLY_FLATTREE
> mov.l 8f, r0 ! Make flat device tree available early.
> jsr @r0
> mov r12, r4
> @@ -346,7 +346,7 @@ ENTRY(stack_start)
> 5: .long start_kernel
> 6: .long cpu_init
> 7: .long init_thread_union
> -#if defined(CONFIG_OF_FLATTREE)
> +#if defined(CONFIG_OF_EARLY_FLATTREE)
> 8: .long sh_fdt_init
> #endif
>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/7 v4] sh: various doc, build, init fixes
2023-03-06 4:00 [PATCH 0/7 v4] sh: various doc, build, init fixes Randy Dunlap
` (2 preceding siblings ...)
2023-03-16 13:26 ` John Paul Adrian Glaubitz
@ 2023-03-23 9:41 ` John Paul Adrian Glaubitz
3 siblings, 0 replies; 6+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-03-23 9:41 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Yoshinori Sato, Rich Felker, Geert Uytterhoeven, Hitoshi Mitake,
linux-sh, Frank Rowand, devicetree, Arnd Bergmann
Hi Randy!
On Sun, 2023-03-05 at 20:00 -0800, Randy Dunlap wrote:
> All of these patches have been sent previously, anywhere from
> one to 3 times. All patches are now called "v4".
>
> This refresh/resend is to assist the new SH maintainer.
>
> [PATCH 1/7 v4] sh: SH2007: drop the bad URL info
> [PATCH 2/7 v4] sh: nmi_debug: fix return value of __setup handler
> [PATCH 3/7 v4] sh: init: use OF_EARLY_FLATTREE for early init
> [PATCH 4/7 v4] sh: math-emu: fix macro redefined warning
> [PATCH 5/7 v4] sh: remove sh5/sh64 last fragments
> [PATCH 6/7 v4] sh: fix Kconfig entry for NUMA => SMP
> [PATCH 7/7 v4] sh: mcount.S: fix build error when PRINTK is not enabled
>
> diffstat:
> Documentation/kbuild/kbuild.rst | 1 -
> Documentation/scheduler/sched-arch.rst | 2 --
> Documentation/translations/zh_CN/scheduler/sched-arch.rst | 2 --
> arch/sh/Kconfig | 4 ++++
> arch/sh/Kconfig.debug | 2 +-
> arch/sh/boards/Kconfig | 1 -
> arch/sh/kernel/head_32.S | 6 +++---
> arch/sh/kernel/nmi_debug.c | 4 ++--
> arch/sh/kernel/setup.c | 4 ++--
> arch/sh/math-emu/sfp-util.h | 4 ----
> scripts/checkstack.pl | 7 -------
> tools/perf/arch/common.c | 2 --
> tools/scripts/Makefile.arch | 5 -----
> tools/testing/selftests/mm/Makefile | 2 +-
> tools/testing/selftests/mm/run_vmtests.sh | 2 +-
> 15 files changed, 14 insertions(+), 34 deletions(-)
>
> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
> Cc: linux-sh@vger.kernel.org
> Cc: Frank Rowand <frowand.list@gmail.com>
> Cc: devicetree@vger.kernel.org
> Cc: Arnd Bergmann <arnd@arndb.de>
All applied to sh-linux/for-next now except for patch number 6.
Apologies that it took so long, I'm still learning :-).
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-03-23 9:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-06 4:00 [PATCH 0/7 v4] sh: various doc, build, init fixes Randy Dunlap
2023-03-06 4:00 ` [PATCH 3/7 v4] sh: init: use OF_EARLY_FLATTREE for early init Randy Dunlap
2023-03-19 19:48 ` John Paul Adrian Glaubitz
2023-03-07 15:18 ` [PATCH 0/7 v4] sh: various doc, build, init fixes John Paul Adrian Glaubitz
2023-03-16 13:26 ` John Paul Adrian Glaubitz
2023-03-23 9:41 ` John Paul Adrian Glaubitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).