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 'xtensa-20260422' of https://github.com/jcmvbkbc/linux-xtensa

Pull Xtensa updates from Max Filippov:

- use register_sys_off_handler(SYS_OFF_MODE_RESTART) instead of
the deprecated register_restart_handler()

- drop custom ucontext.h and reuse asm-generic ucontext.h

* tag 'xtensa-20260422' of https://github.com/jcmvbkbc/linux-xtensa:
xtensa: uapi: Reuse asm-generic ucontext.h
xtensa: xtfpga: Use register_sys_off_handler(SYS_OFF_MODE_RESTART)
xtensa: xt2000: Use register_sys_off_handler(SYS_OFF_MODE_RESTART)
xtensa: ISS: Use register_sys_off_handler(SYS_OFF_MODE_RESTART)

+13 -43
-22
arch/xtensa/include/asm/ucontext.h
··· 1 - /* 2 - * include/asm-xtensa/ucontext.h 3 - * 4 - * This file is subject to the terms and conditions of the GNU General Public 5 - * License. See the file "COPYING" in the main directory of this archive 6 - * for more details. 7 - * 8 - * Copyright (C) 2001 - 2005 Tensilica Inc. 9 - */ 10 - 11 - #ifndef _XTENSA_UCONTEXT_H 12 - #define _XTENSA_UCONTEXT_H 13 - 14 - struct ucontext { 15 - unsigned long uc_flags; 16 - struct ucontext *uc_link; 17 - stack_t uc_stack; 18 - struct sigcontext uc_mcontext; 19 - sigset_t uc_sigmask; /* mask last for extensibility */ 20 - }; 21 - 22 - #endif /* _XTENSA_UCONTEXT_H */
+1
arch/xtensa/include/uapi/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 generated-y += unistd_32.h 3 + generic-y += ucontext.h
+4 -7
arch/xtensa/platforms/iss/setup.c
··· 32 32 return NOTIFY_DONE; 33 33 } 34 34 35 - static int iss_restart(struct notifier_block *this, 36 - unsigned long event, void *ptr) 35 + static int iss_restart(struct sys_off_data *unused) 37 36 { 38 37 /* Flush and reset the mmu, simulate a processor reset, and 39 38 * jump to the reset vector. */ ··· 40 41 41 42 return NOTIFY_DONE; 42 43 } 43 - 44 - static struct notifier_block iss_restart_block = { 45 - .notifier_call = iss_restart, 46 - }; 47 44 48 45 static int 49 46 iss_panic_event(struct notifier_block *this, unsigned long event, void *ptr) ··· 79 84 } 80 85 81 86 atomic_notifier_chain_register(&panic_notifier_list, &iss_panic_block); 82 - register_restart_handler(&iss_restart_block); 87 + register_sys_off_handler(SYS_OFF_MODE_RESTART, 88 + SYS_OFF_PRIO_PLATFORM, 89 + iss_restart, NULL); 83 90 register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, 84 91 SYS_OFF_PRIO_PLATFORM, 85 92 iss_power_off, NULL);
+4 -7
arch/xtensa/platforms/xt2000/setup.c
··· 50 50 return NOTIFY_DONE; 51 51 } 52 52 53 - static int xt2000_restart(struct notifier_block *this, 54 - unsigned long event, void *ptr) 53 + static int xt2000_restart(struct sys_off_data *unused) 55 54 { 56 55 /* Flush and reset the mmu, simulate a processor reset, and 57 56 * jump to the reset vector. */ ··· 58 59 59 60 return NOTIFY_DONE; 60 61 } 61 - 62 - static struct notifier_block xt2000_restart_block = { 63 - .notifier_call = xt2000_restart, 64 - }; 65 62 66 63 void __init platform_setup(char** cmdline) 67 64 { ··· 135 140 platform_device_register(&xt2000_serial8250_device); 136 141 platform_device_register(&xt2000_sonic_device); 137 142 mod_timer(&heartbeat_timer, jiffies + HZ / 2); 138 - register_restart_handler(&xt2000_restart_block); 143 + register_sys_off_handler(SYS_OFF_MODE_RESTART, 144 + SYS_OFF_PRIO_PLATFORM, 145 + xt2000_restart, NULL); 139 146 register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, 140 147 SYS_OFF_PRIO_DEFAULT, 141 148 xt2000_power_off, NULL);
+4 -7
arch/xtensa/platforms/xtfpga/setup.c
··· 42 42 return NOTIFY_DONE; 43 43 } 44 44 45 - static int xtfpga_restart(struct notifier_block *this, 46 - unsigned long event, void *ptr) 45 + static int xtfpga_restart(struct sys_off_data *unused) 47 46 { 48 47 /* Try software reset first. */ 49 48 WRITE_ONCE(*(u32 *)XTFPGA_SWRST_VADDR, 0xdead); ··· 55 56 return NOTIFY_DONE; 56 57 } 57 58 58 - static struct notifier_block xtfpga_restart_block = { 59 - .notifier_call = xtfpga_restart, 60 - }; 61 - 62 59 #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT 63 60 64 61 void __init platform_calibrate_ccount(void) ··· 66 71 67 72 static void __init xtfpga_register_handlers(void) 68 73 { 69 - register_restart_handler(&xtfpga_restart_block); 74 + register_sys_off_handler(SYS_OFF_MODE_RESTART, 75 + SYS_OFF_PRIO_PLATFORM, 76 + xtfpga_restart, NULL); 70 77 register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, 71 78 SYS_OFF_PRIO_DEFAULT, 72 79 xtfpga_power_off, NULL);