* removed musl and openssl from btrfs-progs.cache
[t2sde.git] / package / kernel / linux / hotfix-sunw-poweroff.patch
blob45ead1d94cd8b0c0d8f116d6591a9cc6009e0a2d
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/linux/hotfix-sunw-poweroff.patch
3 # Copyright (C) 2023 The T2 SDE Project
4 #
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7 #
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 Instead of open coding an inf. loop around prom power-off and reboot,
15 let's reuse machine_halt so we get to see an actual error (panic) if
16 it ever fails.
18 Signed-off-by: René Rebe <rene@exactcode.de>
20 --- linux-6.5/arch/sparc/include/asm/oplib_64.h.vanilla 2023-09-07 13:11:02.018226643 +0200
21 +++ linux-6.5/arch/sparc/include/asm/oplib_64.h 2023-09-07 13:11:21.690225350 +0200
22 @@ -85,10 +85,10 @@
23 /* Enter the prom, with no chance of continuation for the stand-alone
24 * which calls this.
26 -void prom_halt(void) __attribute__ ((noreturn));
27 +void prom_halt(void);
29 /* Halt and power-off the machine. */
30 -void prom_halt_power_off(void) __attribute__ ((noreturn));
31 +void prom_halt_power_off(void);
33 /* Acquire the IDPROM of the root node in the prom device tree. This
34 * gets passed a buffer where you would like it stuffed. The return value
35 --- linux-6.5/arch/sparc/prom/misc_64.c.old 2023-08-27 23:49:51.000000000 +0200
36 +++ linux-6.5/arch/sparc/prom/misc_64.c 2023-09-02 22:52:06.515405612 +0200
37 @@ -120,12 +120,10 @@
38 if (ldom_domaining_enabled)
39 ldom_power_off();
40 #endif
41 -again:
42 args[0] = (unsigned long) "exit";
43 args[1] = 0;
44 args[2] = 0;
45 p1275_cmd_direct(args);
46 - goto again; /* PROM is out to get me -DaveM */
49 void prom_halt_power_off(void)
50 @@ -140,9 +138,6 @@
51 args[1] = 0;
52 args[2] = 0;
53 p1275_cmd_direct(args);
55 - /* if nothing else helps, we just halt */
56 - prom_halt();
59 /* Get the idprom and stuff it into buffer 'idbuf'. Returns the
60 --- linux-6.5/arch/sparc/kernel/reboot.c.old 2023-08-27 23:49:51.000000000 +0200
61 +++ linux-6.5/arch/sparc/kernel/reboot.c 2023-09-02 22:53:54.458398515 +0200
62 @@ -29,7 +29,7 @@
63 if (!of_node_is_type(of_console_device, "serial") || scons_pwroff)
64 prom_halt_power_off();
66 - prom_halt();
67 + machine_halt();
70 void machine_halt(void)