Skip to contentSkip to conversation

PS3 patches

PATCH Superseded Geoff Levand 2 participants 7 messages Jan 2, 2023 – Jan 3, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Geoff Levand

author maintainer
#0 lore raw

cover PS3 patches

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(-)
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH 1/3 powerpc: Fix processing of CONFIG_CMDLINE

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.

---
 arch/powerpc/kernel/prom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/prom.c +1 -1
index 4f1c920aa13e..82c9cd3bdbec 100644
@@ -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);
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE

Quoted 26 lines · Geoff Levand

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.

---
 arch/powerpc/kernel/prom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/prom.c +0 -0
index 4f1c920aa13e..82c9cd3bdbec 100644

arch/powerpc/kernel/prom.c void __init early_init_devtree(void *params) · line 764

Quoted 5 lines
arch/powerpc/kernel/prom.c +1 -1
@@ -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

author maintainer
#3 lore raw

Re: [PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE

Hi Rob,

Quoted 7 lines · Rob Herring
Quoted 5 lines · Geoff Levand
arch/powerpc/kernel/prom.c +0 -0
@@ -761,7 +761,7 @@ void __init early_init_devtree(void *params)
        DBG(" -> early_init_devtree(%px)\n", params);
 
Quoted 7 lines

arch/powerpc/kernel/prom.c void __init early_init_devtree(void *params) · line 764

Quoted 3 lines
arch/powerpc/kernel/prom.c +1 -1
        /* 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

#4 lore raw

Re: [PATCH v1 1/3] powerpc: Fix processing of CONFIG_CMDLINE

Quoted 19 lines · Geoff Levand

Hi Rob,

Quoted 7 lines · Rob Herring
Quoted 5 lines · Geoff Levand
arch/powerpc/kernel/prom.c +0 -0
@@ -761,7 +761,7 @@ void __init early_init_devtree(void *params)
        DBG(" -> early_init_devtree(%px)\n", params);
 
Quoted 7 lines

arch/powerpc/kernel/prom.c void __init early_init_devtree(void *params) · line 764

Quoted 3 lines
arch/powerpc/kernel/prom.c +1 -1
        /* 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.

Quoted 7 lines

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

author maintainer
#5 lore raw

PATCH 2/3 powerpc/ps3: Change updateboltedpp panic to info

In reply to Geoff Levand

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.

---
 arch/powerpc/platforms/ps3/htab.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/ps3/htab.c +1 -1
index c27e6cf85272..9de62bd52650 100644
@@ -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,
Signature · 1 line
2.34.1
author maintainer
#6 lore raw

PATCH 3/3 powerpc/ps3: Refresh ps3_defconfig

In reply to Geoff Levand

Refresh ps3_defconfig for v6.2.

---
 arch/powerpc/configs/ps3_defconfig | 39 +++++++++++++-----------------
 1 file changed, 17 insertions(+), 22 deletions(-)
arch/powerpc/configs/ps3_defconfig +17 -22
index 0a1b42c4f26a..52a8c5450ecb 100644
@@ -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
Signature · 1 line
2.34.1