Hi Michael,
Here are a few PS3 specific patches. A few remove some reduntant messages,
a few add some minor debugging support, and a few fix some problems during
system boot.
Please consider for v5.7.
-Geoff
The following changes since commit 16fbf79b0f83bc752cee8589279f1ebfe57b3b6e:
Linux 5.6-rc7 (2020-03-22 18:31:56 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git for-merge-ps3
for you to fetch changes up to 1333a8985c4190763c9c0312bcefad8b1ea863c7:
powerpc/ps3: Add udbg_panic (2020-03-27 13:07:31 -0700)
----------------------------------------------------------------
Dan Carpenter (1):
powerpc/ps3: remove an unneeded NULL check
Emmanuel Nicolet (1):
ps3disk: use the default segment boundary
Geoff Levand (4):
powerpc/ps3: Set CONFIG_UEVENT_HELPER=y in ps3_defconfig
powerpc/ps3: Add check for otheros image size
powerpc/ps3: Add lv1_panic
powerpc/ps3: Add udbg_panic
Markus Elfring (3):
powerpc/ps3: Remove duplicate error messages
drivers/ps3: Remove duplicate error messages
net/ps3_gelic_net: Remove duplicate error message
arch/powerpc/boot/ppc_asm.h | 6 ++++++
arch/powerpc/boot/wrapper | 13 +++++++++++--
arch/powerpc/configs/ps3_defconfig | 2 ++
arch/powerpc/include/asm/ppc_asm.h | 6 ++++++
arch/powerpc/platforms/ps3/mm.c | 9 ++++++++-
arch/powerpc/platforms/ps3/os-area.c | 4 +---
drivers/block/ps3disk.c | 1 -
drivers/net/ethernet/toshiba/ps3_gelic_net.c | 2 --
drivers/ps3/ps3-lpm.c | 2 --
drivers/ps3/ps3-vuart.c | 1 -
drivers/ps3/sys-manager-core.c | 2 +-
11 files changed, 35 insertions(+), 13 deletions(-)
--
2.20.1
@@ -613,10 +613,8 @@ static int update_flash_db(void)/* Read in header and db from flash. */header=kmalloc(buf_len,GFP_KERNEL);-if(!header){-pr_debug("%s: kmalloc failed\n",__func__);+if(!header)return-ENOMEM;-}count=os_area_flash_read(header,buf_len,0);if(count<0){
The ps3's otheros flash loader has a size limit of 16 MiB for the
uncompressed image. If that limit will be reached output the
flash image file as 'otheros-too-big.bld'.
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/boot/wrapper | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
@@ -570,7 +570,16 @@ ps3) count=$overlay_size bs=1 odir="$(dirname "$ofile.bin")"- rm -f "$odir/otheros.bld"- gzip -n --force -9 --stdout "$ofile.bin" > "$odir/otheros.bld"++ # The ps3's flash loader has a size limit of 16 MiB for the uncompressed+ # image. If a compressed image that exceeded this limit is written to+ # flash the loader will decompress that image until the 16 MiB limit is+ # reached, then enter the system reset vector of the partially decompressed+ # image. No warning is issued.+ rm -f "$odir"/{otheros,otheros-too-big}.bld+ size=$(${CROSS}nm --no-sort --radix=d "$ofile" | egrep ' _end$' | cut -d' ' -f1)+ bld="otheros.bld"+ [ $size -le 16777216 ] || bld="otheros-too-big.bld"+ gzip -n --force -9 --stdout "$ofile.bin" > "$odir/$bld" ;; esac
From: Dan Carpenter <redacted>
Static checkers don't like the inconsistent NULL checking on "ops".
This function is only called once and "ops" isn't NULL so the check can
be removed.
Signed-off-by: Dan Carpenter <redacted>
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
drivers/ps3/sys-manager-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
lv1_panic takes a single parameter, 0=halt, 1=reboot, and it will
never return.
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/boot/ppc_asm.h | 6 ++++++
arch/powerpc/include/asm/ppc_asm.h | 6 ++++++
2 files changed, 12 insertions(+)
From: Markus Elfring <redacted>
Remove an extra message for a memory allocation failure in
function gelic_descr_prepare_rx().
Signed-off-by: Markus Elfring <redacted>
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
drivers/net/ethernet/toshiba/ps3_gelic_net.c | 2 --
1 file changed, 2 deletions(-)
BUG_ON() won't work in the early init code, so replace it with
a new routine udbg_panic() that uses udbg_printf() and lv1_panic().
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/platforms/ps3/mm.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
Set CONFIG_UEVENT_HELPER=y in ps3_defconfig.
commit 1be01d4a57142ded23bdb9e0c8d9369e693b26cc (driver: base: Disable
CONFIG_UEVENT_HELPER by default) disabled the CONFIG_UEVENT_HELPER option
that is needed for hotplug and module loading by most older 32bit powerpc
distributions that users typically install on the PS3.
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/configs/ps3_defconfig | 2 ++
1 file changed, 2 insertions(+)
Hi Geoff,
On Fri, Mar 27, 2020 at 9:26 PM Geoff Levand [off-list ref] wrote:
The ps3's otheros flash loader has a size limit of 16 MiB for the
uncompressed image. If that limit will be reached output the
flash image file as 'otheros-too-big.bld'.
Signed-off-by: Geoff Levand <geoff@infradead.org>
@@ -570,7 +570,16 @@ ps3) count=$overlay_size bs=1 odir="$(dirname "$ofile.bin")"- rm -f "$odir/otheros.bld"- gzip -n --force -9 --stdout "$ofile.bin" > "$odir/otheros.bld"++ # The ps3's flash loader has a size limit of 16 MiB for the uncompressed+ # image. If a compressed image that exceeded this limit is written to+ # flash the loader will decompress that image until the 16 MiB limit is+ # reached, then enter the system reset vector of the partially decompressed+ # image. No warning is issued.+ rm -f "$odir"/{otheros,otheros-too-big}.bld+ size=$(${CROSS}nm --no-sort --radix=d "$ofile" | egrep ' _end$' | cut -d' ' -f1)+ bld="otheros.bld"+ [ $size -le 16777216 ] || bld="otheros-too-big.bld"+ gzip -n --force -9 --stdout "$ofile.bin" > "$odir/$bld" ;; esac
Why not print an error message and exit 1 instead, like is done for
other fatal errors?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Geert,
On 3/29/20 7:00 AM, Geert Uytterhoeven wrote:
quoted
--- a/arch/powerpc/boot/wrapper+++ b/arch/powerpc/boot/wrapper
odir="$(dirname "$ofile.bin")"
- rm -f "$odir/otheros.bld"
- gzip -n --force -9 --stdout "$ofile.bin" > "$odir/otheros.bld"
+
+ # The ps3's flash loader has a size limit of 16 MiB for the uncompressed
+ # image. If a compressed image that exceeded this limit is written to
+ # flash the loader will decompress that image until the 16 MiB limit is
+ # reached, then enter the system reset vector of the partially decompressed
+ # image. No warning is issued.
+ rm -f "$odir"/{otheros,otheros-too-big}.bld
+ size=$(${CROSS}nm --no-sort --radix=d "$ofile" | egrep ' _end$' | cut -d' ' -f1)
+ bld="otheros.bld"
+ [ $size -le 16777216 ] || bld="otheros-too-big.bld"
+ gzip -n --force -9 --stdout "$ofile.bin" > "$odir/$bld"
;;
esac
Why not print an error message and exit 1 instead, like is done for
other fatal errors?
This is not really a fatal error for the entire build. The default
make target will build both a vmlinux file and a .bld file. The
.bld file is the one that can be programmed to the OtherOS flash
memory (bld = boot loader). Even if the .bld file is too big, a
big vmlinux file from such a build would be completely fine for
petitboot to load.
It may be good to print an 'info' message though. I'll post an
updated patch.
-Geoff
The ps3's otheros flash loader has a size limit of 16 MiB for the
uncompressed image. If that limit will be reached output the
flash image file as 'otheros-too-big.bld'.
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/boot/wrapper | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
@@ -571,7 +571,20 @@ ps3) count=$overlay_size bs=1 odir="$(dirname "$ofile.bin")"- rm -f "$odir/otheros.bld"- gzip -n --force -9 --stdout "$ofile.bin" > "$odir/otheros.bld"++ # The ps3's flash loader has a size limit of 16 MiB for the uncompressed+ # image. If a compressed image that exceeded this limit is written to+ # flash the loader will decompress that image until the 16 MiB limit is+ # reached, then enter the system reset vector of the partially decompressed+ # image. No warning is issued.+ rm -f "$odir"/{otheros,otheros-too-big}.bld+ size=$(${CROSS}nm --no-sort --radix=d "$ofile" | egrep ' _end$' | cut -d' ' -f1)+ bld="otheros.bld"+ if [ $size -gt $((0x1000000)) ]; then+ bld="otheros-too-big.bld"+ echo " INFO: Uncompressed kernel is too large to program into PS3 flash memory;" \+ "size=0x$(printf "%x\n" $size), limit=0x1000000."+ fi+ gzip -n --force -9 --stdout "$ofile.bin" > "$odir/$bld" ;; esac
From: Michael Ellerman <hidden> Date: 2020-04-06 13:33:13
On Fri, 2020-03-27 at 20:26:23 UTC, Geoff Levand wrote:
From: Dan Carpenter <redacted>
Static checkers don't like the inconsistent NULL checking on "ops".
This function is only called once and "ops" isn't NULL so the check can
be removed.
Signed-off-by: Dan Carpenter <redacted>
Signed-off-by: Geoff Levand <geoff@infradead.org>
From: Michael Ellerman <hidden> Date: 2020-04-06 13:38:45
On Fri, 2020-03-27 at 20:26:23 UTC, Geoff Levand wrote:
Set CONFIG_UEVENT_HELPER=y in ps3_defconfig.
commit 1be01d4a57142ded23bdb9e0c8d9369e693b26cc (driver: base: Disable
CONFIG_UEVENT_HELPER by default) disabled the CONFIG_UEVENT_HELPER option
that is needed for hotplug and module loading by most older 32bit powerpc
distributions that users typically install on the PS3.
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>