linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE
  2023-01-02 19:41 [PATCH v1 0/3] PS3 patches Geoff Levand
@ 2023-01-02 19:41 ` Geoff Levand
  2023-01-03  2:03   ` Rob Herring
  2023-01-02 19:41 ` [PATCH v1 2/3] powerpc/ps3: Change updateboltedpp panic to info Geoff Levand
  2023-01-02 19:41 ` [PATCH v1 3/3] powerpc/ps3: Refresh ps3_defconfig Geoff Levand
  2 siblings, 1 reply; 7+ messages in thread
From: Geoff Levand @ 2023-01-02 19:41 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: Alexander Sverdlin, linuxppc-dev, Rob Herring

Commit a7d550f82b445cf218b47a2c1a9c56e97ecb8c7a (of: fdt: Honor CONFIG_CMDLINE*
even without /chosen node) moved the processing of the kernel built-in command
line (CONFIG_CMDLINE) from the early_init_dt_scan_chosen routine to the
early_init_dt_scan_nodes routine.

The current powerpc startup code does not call into early_init_dt_scan_nodes, so
processing of CONFIG_CMDLINE never happens, even if CONFIG_CMDLINE_FORCE=y.
The result is an empty kernel command line, and mounting of the root file system
then fails with a kernel panic (not syncing: VFS: Unable to mount root fs).

The early_init_dt_scan routine calls into early_init_dt_verify and then
early_init_dt_scan_nodes.  The powerpc startup routine early_init_devtree
currently has a call to early_init_dt_verify.  This change replaces that
early_init_dt_verify call to a call to early_init_dt_scan.

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 arch/powerpc/kernel/prom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 4f1c920aa13e..82c9cd3bdbec 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -761,7 +761,7 @@ void __init early_init_devtree(void *params)
 	DBG(" -> early_init_devtree(%px)\n", params);
 
 	/* Too early to BUG_ON(), do it by hand */
-	if (!early_init_dt_verify(params))
+	if (!early_init_dt_scan(params))
 		panic("BUG: Failed verifying flat device tree, bad version?");
 
 	of_scan_flat_dt(early_init_dt_scan_model, NULL);
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v1 2/3] powerpc/ps3: Change updateboltedpp panic to info
  2023-01-02 19:41 [PATCH v1 0/3] PS3 patches Geoff Levand
  2023-01-02 19:41 ` [PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE Geoff Levand
@ 2023-01-02 19:41 ` Geoff Levand
  2023-01-02 19:41 ` [PATCH v1 3/3] powerpc/ps3: Refresh ps3_defconfig Geoff Levand
  2 siblings, 0 replies; 7+ messages in thread
From: Geoff Levand @ 2023-01-02 19:41 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

Commit fdacae8a84024474afff234bdd1dbe19ad597a10 (powerpc: Activate
CONFIG_STRICT_KERNEL_RWX by default) causes ps3_hpte_updateboltedpp()
to be called.  Change the panic statment in ps3_hpte_updateboltedpp()
to a pr_info statement so that bootup can continue.

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 arch/powerpc/platforms/ps3/htab.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c
index c27e6cf85272..9de62bd52650 100644
--- a/arch/powerpc/platforms/ps3/htab.c
+++ b/arch/powerpc/platforms/ps3/htab.c
@@ -146,7 +146,7 @@ static long ps3_hpte_updatepp(unsigned long slot, unsigned long newpp,
 static void ps3_hpte_updateboltedpp(unsigned long newpp, unsigned long ea,
 	int psize, int ssize)
 {
-	panic("ps3_hpte_updateboltedpp() not implemented");
+	pr_info("ps3_hpte_updateboltedpp() not implemented");
 }
 
 static void ps3_hpte_invalidate(unsigned long slot, unsigned long vpn,
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v1 0/3] PS3 patches
@ 2023-01-02 19:41 Geoff Levand
  2023-01-02 19:41 ` [PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE Geoff Levand
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Geoff Levand @ 2023-01-02 19:41 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: Alexander Sverdlin, linuxppc-dev, Rob Herring

Hi Michael,

Here are three patches.  One is a general powerpc fix for a change commited in
v6.2-rc1.  I didn't see anything on the mail list related to this.  The other
two patches are updates for PS3.

The following changes since commit 88603b6dc419445847923fcb7fe5080067a30f98:

  Linux 6.2-rc2 (2023-01-01 13:53:16 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git for-merge-powerpc-1

for you to fetch changes up to 760a803c300cb2d10548633fc13ed37a5703b026:

  powerpc/ps3: Refresh ps3_defconfig (2023-01-02 11:24:20 -0800)

----------------------------------------------------------------
Geoff Levand (3):
      powerpc: Fix processing of CONFIG_CMDLINE
      powerpc/ps3: Change updateboltedpp panic to info
      powerpc/ps3: Refresh ps3_defconfig

 arch/powerpc/configs/ps3_defconfig | 39 +++++++++++++++++---------------------
 arch/powerpc/kernel/prom.c         |  2 +-
 arch/powerpc/platforms/ps3/htab.c  |  2 +-
 3 files changed, 19 insertions(+), 24 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v1 3/3] powerpc/ps3: Refresh ps3_defconfig
  2023-01-02 19:41 [PATCH v1 0/3] PS3 patches Geoff Levand
  2023-01-02 19:41 ` [PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE Geoff Levand
  2023-01-02 19:41 ` [PATCH v1 2/3] powerpc/ps3: Change updateboltedpp panic to info Geoff Levand
@ 2023-01-02 19:41 ` Geoff Levand
  2 siblings, 0 replies; 7+ messages in thread
From: Geoff Levand @ 2023-01-02 19:41 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

Refresh ps3_defconfig for v6.2.

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 arch/powerpc/configs/ps3_defconfig | 39 +++++++++++++-----------------
 1 file changed, 17 insertions(+), 22 deletions(-)

diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index 0a1b42c4f26a..52a8c5450ecb 100644
--- a/arch/powerpc/configs/ps3_defconfig
+++ b/arch/powerpc/configs/ps3_defconfig
@@ -1,8 +1,3 @@
-CONFIG_PPC64=y
-CONFIG_CELL_CPU=y
-CONFIG_ALTIVEC=y
-CONFIG_SMP=y
-CONFIG_NR_CPUS=2
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
 CONFIG_HIGH_RES_TIMERS=y
@@ -10,11 +5,12 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_EMBEDDED=y
 # CONFIG_PERF_EVENTS is not set
-# CONFIG_COMPAT_BRK is not set
-CONFIG_SLAB=y
 CONFIG_PROFILING=y
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
+CONFIG_PPC64=y
+CONFIG_CELL_CPU=y
+CONFIG_ALTIVEC=y
+CONFIG_SMP=y
+CONFIG_NR_CPUS=2
 # CONFIG_PPC_POWERNV is not set
 # CONFIG_PPC_PSERIES is not set
 # CONFIG_PPC_PMAC is not set
@@ -27,17 +23,20 @@ CONFIG_PS3_FLASH=y
 CONFIG_PS3_VRAM=m
 CONFIG_PS3_LPM=m
 # CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
-# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
-CONFIG_BINFMT_MISC=y
 CONFIG_KEXEC=y
 CONFIG_PPC_4K_PAGES=y
-# CONFIG_SPARSEMEM_VMEMMAP is not set
-# CONFIG_COMPACTION is not set
 CONFIG_SCHED_SMT=y
 CONFIG_PM=y
 CONFIG_PM_DEBUG=y
 # CONFIG_SECCOMP is not set
-# CONFIG_PCI is not set
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_BINFMT_MISC=y
+CONFIG_SLAB=y
+# CONFIG_COMPAT_BRK is not set
+# CONFIG_SPARSEMEM_VMEMMAP is not set
+# CONFIG_COMPACTION is not set
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_UNIX=y
@@ -87,7 +86,6 @@ CONFIG_USB_USBNET=m
 # CONFIG_USB_NET_NET1080 is not set
 # CONFIG_USB_NET_CDC_SUBSET is not set
 # CONFIG_USB_NET_ZAURUS is not set
-CONFIG_INPUT_FF_MEMLESS=m
 CONFIG_INPUT_JOYDEV=m
 CONFIG_INPUT_EVDEV=m
 # CONFIG_INPUT_KEYBOARD is not set
@@ -110,13 +108,10 @@ CONFIG_SND=m
 # CONFIG_SND_DRIVERS is not set
 CONFIG_SND_USB_AUDIO=m
 CONFIG_HIDRAW=y
-CONFIG_HID_APPLE=m
 CONFIG_HID_BELKIN=m
 CONFIG_HID_CHERRY=m
 CONFIG_HID_EZKEY=m
 CONFIG_HID_TWINHAN=m
-CONFIG_HID_LOGITECH=m
-CONFIG_HID_LOGITECH_DJ=m
 CONFIG_HID_MICROSOFT=m
 CONFIG_HID_SUNPLUS=m
 CONFIG_HID_SMARTJOYPLUS=m
@@ -151,8 +146,12 @@ CONFIG_CIFS=m
 CONFIG_NLS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_LZO=m
 CONFIG_CRC_CCITT=m
 CONFIG_CRC_T10DIF=y
+CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_MEMORY_INIT=y
@@ -163,7 +162,3 @@ CONFIG_DEBUG_LOCKDEP=y
 CONFIG_DEBUG_LIST=y
 CONFIG_RCU_CPU_STALL_TIMEOUT=60
 # CONFIG_FTRACE is not set
-CONFIG_CRYPTO_PCBC=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_LZO=m
-CONFIG_PRINTK_TIME=y
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE
  2023-01-02 19:41 ` [PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE Geoff Levand
@ 2023-01-03  2:03   ` Rob Herring
  2023-01-03 16:44     ` Geoff Levand
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2023-01-03  2:03 UTC (permalink / raw)
  To: Geoff Levand; +Cc: Alexander Sverdlin, linuxppc-dev

On Mon, Jan 2, 2023 at 1:41 PM Geoff Levand <geoff@infradead.org> wrote:
>
> Commit a7d550f82b445cf218b47a2c1a9c56e97ecb8c7a (of: fdt: Honor CONFIG_CMDLINE*
> even without /chosen node) moved the processing of the kernel built-in command
> line (CONFIG_CMDLINE) from the early_init_dt_scan_chosen routine to the
> early_init_dt_scan_nodes routine.
>
> The current powerpc startup code does not call into early_init_dt_scan_nodes, so
> processing of CONFIG_CMDLINE never happens, even if CONFIG_CMDLINE_FORCE=y.
> The result is an empty kernel command line, and mounting of the root file system
> then fails with a kernel panic (not syncing: VFS: Unable to mount root fs).
>
> The early_init_dt_scan routine calls into early_init_dt_verify and then
> early_init_dt_scan_nodes.  The powerpc startup routine early_init_devtree
> currently has a call to early_init_dt_verify.  This change replaces that
> early_init_dt_verify call to a call to early_init_dt_scan.
>
> Signed-off-by: Geoff Levand <geoff@infradead.org>
> ---
>  arch/powerpc/kernel/prom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 4f1c920aa13e..82c9cd3bdbec 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -761,7 +761,7 @@ void __init early_init_devtree(void *params)
>         DBG(" -> early_init_devtree(%px)\n", params);
>
>         /* Too early to BUG_ON(), do it by hand */
> -       if (!early_init_dt_verify(params))
> +       if (!early_init_dt_scan(params))

It would be nice if this could be used instead, but it does other
things like memory setup which I think will not work for some PPC
platforms.

Rob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE
  2023-01-03  2:03   ` Rob Herring
@ 2023-01-03 16:44     ` Geoff Levand
  2023-01-03 17:06       ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Geoff Levand @ 2023-01-03 16:44 UTC (permalink / raw)
  To: Rob Herring; +Cc: Alexander Sverdlin, linuxppc-dev

Hi Rob,

On 1/2/23 18:03, Rob Herring wrote:
> On Mon, Jan 2, 2023 at 1:41 PM Geoff Levand <geoff@infradead.org> wrote:

>> --- a/arch/powerpc/kernel/prom.c
>> +++ b/arch/powerpc/kernel/prom.c
>> @@ -761,7 +761,7 @@ void __init early_init_devtree(void *params)
>>         DBG(" -> early_init_devtree(%px)\n", params);
>>
>>         /* Too early to BUG_ON(), do it by hand */
>> -       if (!early_init_dt_verify(params))
>> +       if (!early_init_dt_scan(params))
> 
> It would be nice if this could be used instead, but it does other
> things like memory setup which I think will not work for some PPC
> platforms.

It seems like what we need is to pull out the command line processing
code from early_init_dt_scan_nodes and put that into a new function,
say early_init_setup_cmdline, then have both early_init_dt_scan_nodes
and powerpc's early_init_devtree call early_init_setup_cmdline.

I'll split this series into two, one for the PS3 updates, and one
that adds early_init_setup_cmdline.

-Geoff


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE
  2023-01-03 16:44     ` Geoff Levand
@ 2023-01-03 17:06       ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2023-01-03 17:06 UTC (permalink / raw)
  To: Geoff Levand; +Cc: Alexander Sverdlin, linuxppc-dev

On Tue, Jan 3, 2023 at 10:45 AM Geoff Levand <geoff@infradead.org> wrote:
>
> Hi Rob,
>
> On 1/2/23 18:03, Rob Herring wrote:
> > On Mon, Jan 2, 2023 at 1:41 PM Geoff Levand <geoff@infradead.org> wrote:
>
> >> --- a/arch/powerpc/kernel/prom.c
> >> +++ b/arch/powerpc/kernel/prom.c
> >> @@ -761,7 +761,7 @@ void __init early_init_devtree(void *params)
> >>         DBG(" -> early_init_devtree(%px)\n", params);
> >>
> >>         /* Too early to BUG_ON(), do it by hand */
> >> -       if (!early_init_dt_verify(params))
> >> +       if (!early_init_dt_scan(params))
> >
> > It would be nice if this could be used instead, but it does other
> > things like memory setup which I think will not work for some PPC
> > platforms.
>
> It seems like what we need is to pull out the command line processing
> code from early_init_dt_scan_nodes and put that into a new function,
> say early_init_setup_cmdline, then have both early_init_dt_scan_nodes
> and powerpc's early_init_devtree call early_init_setup_cmdline.
>
> I'll split this series into two, one for the PS3 updates, and one
> that adds early_init_setup_cmdline.

What is really needed is to make progress on the generic command line
handling, but the 2 different implementations can't seem to work
together to resolve the differences.

Short of that, I don't really want to see another function exposed to
the arch as I've been trying to reduce them. I'll post an alternative
shortly.

Rob

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-03 17:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-02 19:41 [PATCH v1 0/3] PS3 patches Geoff Levand
2023-01-02 19:41 ` [PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE Geoff Levand
2023-01-03  2:03   ` Rob Herring
2023-01-03 16:44     ` Geoff Levand
2023-01-03 17:06       ` Rob Herring
2023-01-02 19:41 ` [PATCH v1 2/3] powerpc/ps3: Change updateboltedpp panic to info Geoff Levand
2023-01-02 19:41 ` [PATCH v1 3/3] powerpc/ps3: Refresh ps3_defconfig Geoff Levand

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).