From: Linus Torvalds Date: Tue, 31 Mar 2020 02:14:28 +0000 (-0700) Subject: Merge tag 'x86-entry-2020-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git... X-Git-Tag: v5.10.7~2973 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5f744f9a2ac9ca6d5baf72e97ce6dc4c2f19fe4;p=platform%2Fkernel%2Flinux-rpi.git Merge tag 'x86-entry-2020-03-30' of git://git./linux/kernel/git/tip/tip Pull x86 entry code updates from Thomas Gleixner: - Convert the 32bit syscalls to be pt_regs based which removes the requirement to push all 6 potential arguments onto the stack and consolidates the interface with the 64bit variant - The first small portion of the exception and syscall related entry code consolidation which aims to address the recently discovered issues vs. RCU, int3, NMI and some other exceptions which can interrupt any context. The bulk of the changes is still work in progress and aimed for 5.8. - A few lockdep namespace cleanups which have been applied into this branch to keep the prerequisites for the ongoing work confined. * tag 'x86-entry-2020-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (35 commits) x86/entry: Fix build error x86 with !CONFIG_POSIX_TIMERS lockdep: Rename trace_{hard,soft}{irq_context,irqs_enabled}() lockdep: Rename trace_softirqs_{on,off}() lockdep: Rename trace_hardirq_{enter,exit}() x86/entry: Rename ___preempt_schedule x86: Remove unneeded includes x86/entry: Drop asmlinkage from syscalls x86/entry/32: Enable pt_regs based syscalls x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments x86/entry/32: Rename 32-bit specific syscalls x86/entry/32: Clean up syscall_32.tbl x86/entry: Remove ABI prefixes from functions in syscall tables x86/entry/64: Add __SYSCALL_COMMON() x86/entry: Remove syscall qualifier support x86/entry/64: Remove ptregs qualifier from syscall table x86/entry: Move max syscall number calculation to syscallhdr.sh x86/entry/64: Split X32 syscall table into its own file x86/entry/64: Move sys_ni_syscall stub to common.c x86/entry/64: Use syscall wrappers for x32_rt_sigreturn x86/entry: Refactor SYS_NI macros ... --- d5f744f9a2ac9ca6d5baf72e97ce6dc4c2f19fe4 diff --cc arch/x86/kernel/asm-offsets_32.c index 2b4256e,0dcac420b..6e043f2 --- a/arch/x86/kernel/asm-offsets_32.c +++ b/arch/x86/kernel/asm-offsets_32.c @@@ -3,15 -3,8 +3,10 @@@ # error "Please do not build this file directly, build asm-offsets.c instead" #endif +#include + #include - #define __SYSCALL_I386(nr, sym, qual) [nr] = 1, - static char syscalls[] = { - #include - }; - /* workaround for a warning with -Wmissing-prototypes */ void foo(void); @@@ -62,11 -55,4 +57,7 @@@ void foo(void BLANK(); OFFSET(stack_canary_offset, stack_canary, canary); #endif + + BLANK(); - DEFINE(__NR_syscall_max, sizeof(syscalls) - 1); - DEFINE(NR_syscalls, sizeof(syscalls)); - - BLANK(); + DEFINE(EFI_svam, offsetof(efi_runtime_services_t, set_virtual_address_map)); } diff --cc include/linux/irqflags.h index a16adbb,f4c3907..ceca42de --- a/include/linux/irqflags.h +++ b/include/linux/irqflags.h @@@ -31,20 -31,15 +31,20 @@@ #ifdef CONFIG_TRACE_IRQFLAGS extern void trace_hardirqs_on(void); extern void trace_hardirqs_off(void); - # define trace_hardirq_context(p) ((p)->hardirq_context) - # define trace_softirq_context(p) ((p)->softirq_context) - # define trace_hardirqs_enabled(p) ((p)->hardirqs_enabled) - # define trace_softirqs_enabled(p) ((p)->softirqs_enabled) - # define trace_hardirq_enter() \ + # define lockdep_hardirq_context(p) ((p)->hardirq_context) + # define lockdep_softirq_context(p) ((p)->softirq_context) + # define lockdep_hardirqs_enabled(p) ((p)->hardirqs_enabled) + # define lockdep_softirqs_enabled(p) ((p)->softirqs_enabled) + # define lockdep_hardirq_enter() \ do { \ - current->hardirq_context++; \ + if (!current->hardirq_context++) \ + current->hardirq_threaded = 0; \ +} while (0) - # define trace_hardirq_threaded() \ ++# define lockdep_hardirq_threaded() \ +do { \ + current->hardirq_threaded = 1; \ } while (0) - # define trace_hardirq_exit() \ + # define lockdep_hardirq_exit() \ do { \ current->hardirq_context--; \ } while (0) @@@ -93,21 -54,14 +93,21 @@@ do { #else # define trace_hardirqs_on() do { } while (0) # define trace_hardirqs_off() do { } while (0) - # define trace_hardirq_context(p) 0 - # define trace_softirq_context(p) 0 - # define trace_hardirqs_enabled(p) 0 - # define trace_softirqs_enabled(p) 0 - # define trace_hardirq_enter() do { } while (0) - # define trace_hardirq_threaded() do { } while (0) - # define trace_hardirq_exit() do { } while (0) + # define lockdep_hardirq_context(p) 0 + # define lockdep_softirq_context(p) 0 + # define lockdep_hardirqs_enabled(p) 0 + # define lockdep_softirqs_enabled(p) 0 + # define lockdep_hardirq_enter() do { } while (0) ++# define lockdep_hardirq_threaded() do { } while (0) + # define lockdep_hardirq_exit() do { } while (0) # define lockdep_softirq_enter() do { } while (0) # define lockdep_softirq_exit() do { } while (0) +# define lockdep_hrtimer_enter(__hrtimer) do { } while (0) +# define lockdep_hrtimer_exit(__hrtimer) do { } while (0) +# define lockdep_posixtimer_enter() do { } while (0) +# define lockdep_posixtimer_exit() do { } while (0) +# define lockdep_irq_work_enter(__work) do { } while (0) +# define lockdep_irq_work_exit(__work) do { } while (0) #endif #if defined(CONFIG_IRQSOFF_TRACER) || \ diff --cc kernel/irq/handle.c index 16ee716,a4ace61..a8e14c8 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c @@@ -145,13 -145,6 +145,13 @@@ irqreturn_t __handle_irq_event_percpu(s for_each_action_of_desc(desc, action) { irqreturn_t res; + /* + * If this IRQ would be threaded under force_irqthreads, mark it so. + */ + if (irq_settings_can_thread(desc) && + !(action->flags & (IRQF_NO_THREAD | IRQF_PERCPU | IRQF_ONESHOT))) - trace_hardirq_threaded(); ++ lockdep_hardirq_threaded(); + trace_irq_handler_entry(irq, action); res = action->handler(irq, action->dev_id); trace_irq_handler_exit(irq, action, res);