sparc64: unify thread stack sizing and add explicit 32KB stack
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 11 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | sparc64: unify thread stack sizing and add explicit 32KB stackarch/ | +14 | 7 replies |
Reviews trailers per patch
The patch has no Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Nathaniel Roach | Imre Kaloz | Andreas Larsson | Jan Engelhardt |
|---|---|---|---|---|
| Series | T-b T-b | R-b | T-b | |
| 1/1 | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH 0/1] sparc64: unify thread stack sizing and add explicit 32KB stack
This patch fixes a reproducible stack exhaustion issue on SPARC64 that occurs during USB hub enumeration. This regression may have started sometime after kernel v6.12. With the default 16KB kernel stack, the following panic is triggered early in boot:
[ 25.528399] Call Trace:
[ 25.528403] [<0000000000433cd4>] dump_stack+0x8/0x18
[ 25.528419] [<00000000004297ac>] vpanic+0xdc/0x318
[ 25.528429] [<0000000000429a0c>] panic+0x24/0x30
[ 25.528436] [<0000000000be2280>] __schedule+0xa8/0x7bc
[ 25.528445] [<0000000000be2b60>] schedule+0x24/0x4c
[ 25.528452] [<0000000000be6970>] schedule_timeout+0xc8/0xe4
[ 25.528459] [<0000000000be3318>] __wait_for_common+0x78/0xf0
[ 25.528466] [<0000000000be3550>] wait_for_completion_timeout+0x1c/0x2c
[ 25.528473] [<000000001005e2f4>] usb_start_wait_urb+0x68/0x128 [usbcore]
[ 25.528502] [<000000001005e468>] usb_control_msg+0xb4/0xf8 [usbcore]
[ 25.528518] [<0000000010051180>] set_port_feature+0x44/0x54 [usbcore]
[ 25.528530] [<00000000100530f0>] hub_power_on+0xc8/0xe8 [usbcore]
[ 25.528543] [<0000000010054fd8>] hub_activate+0x12c/0x644 [usbcore]
[ 25.528557] [<0000000010059438>] hub_probe+0xdd4/0xeb0 [usbcore]
[ 25.528570] [<0000000010062360>] usb_probe_interface+0x234/0x26c [usbcore]
[ 25.528585] [<0000000000a10a40>] really_probe+0x1ac/0x3b0This is caused by large SPARC64 trapframes, register-window spills, and deep call paths in usbcore. A 16KB stack is insufficient for this workload.
The new logic is:
SPARC64:
THREAD_SIZE = 4 * PAGE_SIZE (32KB)
THREAD_SHIFT = PAGE_SHIFT + 2
THREAD_SIZE_ORDER = 2
Non‑SPARC64 with PAGE_SHIFT == 13:
Retains the existing 16KB stack behavior
Fallback:
Retains the existing 8KB stack behavior
Tony Rodriguez (1):
sparc64: unify thread stack sizing and add explicit 32KB stack
arch/sparc/include/asm/thread_info_64.h | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-)
--
2.53.0