Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'smp_urgent_for_v6.10_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull smp fixes from Borislav Petkov:

- Fix "nosmp" and "maxcpus=0" after the parallel CPU bringup work went
in and broke them

- Make sure CPU hotplug dynamic prepare states are actually executed

* tag 'smp_urgent_for_v6.10_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
cpu: Fix broken cmdline "nosmp" and "maxcpus=0"
cpu/hotplug: Fix dynstate assignment in __cpuhp_setup_state_cpuslocked()

+7 -4
+7 -4
kernel/cpu.c
··· 1859 1859 1860 1860 void __init bringup_nonboot_cpus(unsigned int max_cpus) 1861 1861 { 1862 + if (!max_cpus) 1863 + return; 1864 + 1862 1865 /* Try parallel bringup optimization if enabled */ 1863 1866 if (cpuhp_bringup_cpus_parallel(max_cpus)) 1864 1867 return; ··· 2449 2446 * The caller needs to hold cpus read locked while calling this function. 2450 2447 * Return: 2451 2448 * On success: 2452 - * Positive state number if @state is CPUHP_AP_ONLINE_DYN; 2449 + * Positive state number if @state is CPUHP_AP_ONLINE_DYN or CPUHP_BP_PREPARE_DYN; 2453 2450 * 0 for all other states 2454 2451 * On failure: proper (negative) error code 2455 2452 */ ··· 2472 2469 ret = cpuhp_store_callbacks(state, name, startup, teardown, 2473 2470 multi_instance); 2474 2471 2475 - dynstate = state == CPUHP_AP_ONLINE_DYN; 2472 + dynstate = state == CPUHP_AP_ONLINE_DYN || state == CPUHP_BP_PREPARE_DYN; 2476 2473 if (ret > 0 && dynstate) { 2477 2474 state = ret; 2478 2475 ret = 0; ··· 2503 2500 out: 2504 2501 mutex_unlock(&cpuhp_state_mutex); 2505 2502 /* 2506 - * If the requested state is CPUHP_AP_ONLINE_DYN, return the 2507 - * dynamically allocated state in case of success. 2503 + * If the requested state is CPUHP_AP_ONLINE_DYN or CPUHP_BP_PREPARE_DYN, 2504 + * return the dynamically allocated state in case of success. 2508 2505 */ 2509 2506 if (!ret && dynstate) 2510 2507 return state;