MDSv6
Subsystems (248)
PATCH v6 1/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: x86/speculation/mds: Add basic bug infrastructure
for MDS
MDS is micro architectural data sampling, which is a side channel attack on internal buffers in Intel CPUs.
MDS consists of multiple sub-vulnerabilities:
Microarchitectural Store Buffer Data Sampling (MSBDS) (CVE-2018-12126) Microarchitectual Fill Buffer Data Sampling (MFBDS) (CVE-2018-12130) Microarchitectual Load Port Data (MLPDS) (CVE-2018-12127), with the first leaking store data, and the second loads and sometimes store data, and the third load data.
They all have the same mitigations for single thread, so we lump them all together as a single MDS issue.
This patch adds the basic infrastructure to detect if the current CPU is affected by MDS, and if yes set the right BUG bits.
--- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/msr-index.h | 1 + arch/x86/kernel/cpu/common.c | 13 +++++++++++++ 3 files changed, 15 insertions(+)
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -381,5 +381,6 @@#define X86_BUG_SPECTRE_V2 X86_BUG(16)/* CPU is affected by Spectre variant 2 attack with indirect branches */ #define X86_BUG_SPEC_STORE_BYPASS X86_BUG(17)/* CPU is affected by speculative store bypass attack */ #define X86_BUG_L1TF X86_BUG(18)/* CPU is affected by L1 Terminal Fault */ +#define X86_BUG_MDS X86_BUG(19)/* CPU is affected by Microarchitectural data sampling */ #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/include/asm/msr-index.h +1 -0
@@ -77,6 +77,7 @@* attack, so no Speculative Store Bypass * control required. */ +#define ARCH_CAP_MDS_NO (1 << 5)/* No Microarchitectural data sampling */ #define MSR_IA32_FLUSH_CMD 0x0000010b#define L1D_FLUSH (1 << 0)/*
arch/x86/kernel/cpu/common.c +13 -0
@@ -998,6 +998,14 @@ static const __initconst struct x86_cpu_id cpu_no_l1tf[] = { {} }; +static const __initconst struct x86_cpu_id cpu_no_mds[] = { +/* in addition to cpu_no_speculation */ + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_ATOM_GOLDMONT }, + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_ATOM_GOLDMONT_X }, + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_ATOM_GOLDMONT_PLUS }, + {} +}; +static void __init cpu_set_bug_bits (struct cpuinfo_x86 *c) {u64 ia32_cap =0 ;
@@ -1019,6 +1027,11 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c)if (ia32_cap &ARCH_CAP_IBRS_ALL )setup_force_cpu_cap (X86_FEATURE_IBRS_ENHANCED ); +if ((boot_cpu_data.x86_vendor ==X86_VENDOR_INTEL && + !x86_match_cpu (cpu_no_mds)) && + !(ia32_cap &ARCH_CAP_MDS_NO )) +setup_force_cpu_bug (X86_BUG_MDS ); +if (x86_match_cpu (cpu_no_meltdown))return ;
Signature · 1 line
2.17.2
PATCH v6 33/43 MDSv6
In reply to Andi KleenFor DVB we consider image data sensitive.
Most DVB drivers do not touch user data in interrupts / timers, but when the software filter is active it might. Schedule a clear cpu from the filter code.
--- drivers/media/dvb-core/dvb_demux.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/media/dvb-core/dvb_demux.c +3 -0
@@ -28,6 +28,7 @@#include <linux/string.h> #include <linux/crc32.h> #include <linux/uaccess.h> +#include <linux/clearcpu.h> #include <asm/div64.h> #include <media/dvb_demux.h>
@@ -515,6 +516,8 @@ void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf, }spin_unlock_irqrestore (&demux->lock, flags); + +lazy_clear_cpu_interrupt (); }EXPORT_SYMBOL (dvb_dmx_swfilter_packets);
Signature · 1 line
2.17.2
PATCH v6 14/43 MDSv6
In reply to Andi KleenAdd trace points for clear_cpu and lazy_clear_cpu. This is useful for debugging and performance testing.
The trace points have to be partially out of line to avoid include loops, but the fast path jump labels are inlined.
The idle case cannot be traced because trace points don't like idle context.
--- arch/x86/include/asm/clearcpu.h | 36 +++++++++++++++++++++++++-- arch/x86/include/asm/trace/clearcpu.h | 27 ++++++++++++++++++++ arch/x86/kernel/cpu/bugs.c | 17 +++++++++++++ 3 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 arch/x86/include/asm/trace/clearcpu.h
arch/x86/include/asm/clearcpu.h +34 -2
@@ -6,6 +6,29 @@#include <linux/sched/smt.h> #include <asm/alternative.h> +/* +* We cannot directly include the trace point header here +* because it leads to include loops with other trace point +* files pulling this one in. Define the static +* key manually here, which handles noping the fast path, +* and the actual tracing is done out of line. +*/ +#ifdef CONFIG_TRACEPOINTS +#include <asm/atomic.h> +#include <linux/tracepoint-defs.h> + +extern struct tracepoint __tracepoint_clear_cpu; +extern struct tracepoint __tracepoint_lazy_clear_cpu; +#define cc_tracepoint_active (t) static_key_false(&(t).key) + +extern void do_trace_clear_cpu (void ); +extern void do_trace_lazy_clear_cpu (void ); +#else +#define cc_tracepoint_active (t) false +static inline void do_trace_clear_cpu (void ) {} +static inline void do_trace_lazy_clear_cpu (void ) {} +#endif +DECLARE_PER_CPU (bool, clear_cpu_flag);/*
@@ -13,7 +36,7 @@ DECLARE_PER_CPU(bool, clear_cpu_flag);* We use microcode as a side effect of the obsolete VERW instruction */ -static inline void clear_cpu (void ) +static inline void __clear_cpu (void ) {unsigned kernel_ds = __KERNEL_DS;/* Has to be memory form, don't modify to use an register */
@@ -21,6 +44,13 @@ static inline void clear_cpu(void) [kernelds] "m" (kernel_ds)); } +static inline void clear_cpu (void ) +{ +if (cc_tracepoint_active (__tracepoint_clear_cpu)) +do_trace_clear_cpu (); +__clear_cpu (); +} +/* * Clear CPU buffers before going idle, so that no state is leaked to SMT * siblings taking over thread resources.
@@ -37,12 +67,14 @@ static inline void clear_cpu_idle(void) {if (sched_smt_active ()) {__this_cpu_write (clear_cpu_flag, false); -clear_cpu (); +__clear_cpu (); } }static inline void lazy_clear_cpu (void ) { +if (cc_tracepoint_active (__tracepoint_lazy_clear_cpu)) +do_trace_lazy_clear_cpu ();__this_cpu_write (clear_cpu_flag, true); }
arch/x86/include/asm/trace/clearcpu.h new file +27 -0
@@ -0,0 +1,27 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM clearcpu + +#if !defined(_TRACE_CLEARCPU_H) || defined(TRACE_HEADER_MULTI_READ ) + +#include <linux/tracepoint.h> + +DECLARE_EVENT_CLASS (clear_cpu, + TP_PROTO(int dummy), +TP_ARGS (dummy), +TP_STRUCT__entry (__field (int, dummy)), +TP_fast_assign (), +TP_printk ("%d" , __entry->dummy)); + +DEFINE_EVENT(clear_cpu, clear_cpu, TP_PROTO(int dummy), TP_ARGS(dummy)); +DEFINE_EVENT(clear_cpu, lazy_clear_cpu, TP_PROTO(int dummy), TP_ARGS(dummy)); + +#define _TRACE_CLEARCPU_H + +#undef TRACE_INCLUDE_PATH +#define TRACE_INCLUDE_PATH asm/trace/ +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_FILE clearcpu +#endif /* _TRACE_CLEARCPU_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h>
arch/x86/kernel/cpu/bugs.c +17 -0
@@ -1061,6 +1061,23 @@ early_param("l1tf", l1tf_cmdline);#undef pr_fmt +#define CREATE_TRACE_POINTS +#include <asm/trace/clearcpu.h> + +void do_trace_clear_cpu (void ) +{ +trace_clear_cpu (0 ); +} +EXPORT_SYMBOL (do_trace_clear_cpu); +EXPORT_TRACEPOINT_SYMBOL (clear_cpu); + +void do_trace_lazy_clear_cpu (void ) +{ +trace_lazy_clear_cpu (0 ); +} +EXPORT_SYMBOL (do_trace_lazy_clear_cpu); +EXPORT_TRACEPOINT_SYMBOL (lazy_clear_cpu); +DEFINE_PER_CPU (bool, clear_cpu_flag);EXPORT_PER_CPU_SYMBOL (clear_cpu_flag);
Signature · 1 line
2.17.2
PATCH v6 15/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: x86/speculation/mds: Schedule cpu clear on context
switch
On context switch we need to schedule a cpu clear on the next kernel exit when:
- We're switching between different processes
- We're switching from a kernel thread
For kernel threads like work queue assume they might contain sensitive (other user's or crypto) data.
switch_mm already distinguishes these cases. We either schedule a flush when the mm is different, or we were in lazy mm mode, which means a kernel thread ran before.
--- arch/x86/kernel/process.h | 1 + arch/x86/mm/tlb.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+)
arch/x86/kernel/process.h +1 -0
@@ -2,6 +2,7 @@// // Code shared between 32 and 64 bit +#include <linux/clearcpu.h> #include <asm/spec-ctrl.h> void __switch_to_xtra (struct task_struct *prev_p,struct task_struct *next_p);
arch/x86/mm/tlb.c +14 -0
@@ -342,6 +342,13 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next, !cpumask_test_cpu(cpu, mm_cpumask(next))))cpumask_set_cpu (cpu,mm_cpumask (next)); +/* +* We switched through a kernel thread, so schedule +* a cpu clear to protect the thread. +*/ +if (static_cpu_has_bug (X86_BUG_MDS ) && was_lazy) +lazy_clear_cpu (); +/* * If the CPU is not in lazy TLB mode, we are just switching * from one thread in a process to another thread in the same
@@ -376,6 +383,13 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,*/ cond_ibpb (tsk); +/* +* We're switching to a different process, so schedule +* a cpu clear. +*/ +if (static_cpu_has_bug (X86_BUG_MDS )) +lazy_clear_cpu (); +if (IS_ENABLED (CONFIG_VMAP_STACK )) {/* * If our current stack is in vmalloc space and isn't
Signature · 1 line
2.17.2
PATCH v6 3/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: x86/speculation/mds: Clear CPU buffers on entering
idle
When entering idle the internal state of the current CPU might become visible to the thread sibling because the CPU "frees" some internal resources.
To ensure there is no MDS leakage always clear the CPU state before doing any idling. We only do this if SMT is enabled, as otherwise there is no leakage possible.
Not needed for idle poll because it does not share resources.
In a Hypervisor we might not know the true SMT state, but in this case idle does exit, and we assume the hypervisor takes care of any needed clears during the next entry.
--- arch/x86/include/asm/clearcpu.h | 18 ++++++++++++++++++ arch/x86/kernel/acpi/cstate.c | 2 ++ arch/x86/kernel/kvm.c | 3 +++ arch/x86/kernel/process.c | 5 +++++ arch/x86/kernel/smpboot.c | 3 +++ drivers/acpi/acpi_pad.c | 2 ++ drivers/acpi/processor_idle.c | 3 +++ drivers/idle/intel_idle.c | 5 +++++ 8 files changed, 41 insertions(+)
arch/x86/include/asm/clearcpu.h +18 -0
@@ -20,4 +20,22 @@ static inline void clear_cpu(void) [kernelds] "m" (kernel_ds)); } +/* +* Clear CPU buffers before going idle, so that no state is leaked to SMT +* siblings taking over thread resources. +* Out of line to avoid include hell. +* +* Assumes that interrupts are disabled and only get reenabled +* before idle, otherwise the data from a racing interrupt might not +* get cleared. There are some callers who violate this, +* but they are only used in unattackable cases, like CPU +* offlining. +*/ + +static inline void clear_cpu_idle (void ) +{ +if (sched_smt_active ()) +clear_cpu (); +} +#endif
arch/x86/kernel/acpi/cstate.c +2 -0
@@ -14,6 +14,7 @@#include <acpi/processor.h> #include <asm/mwait.h> #include <asm/special_insns.h> +#include <asm/clearcpu.h> /* * Initialize bm_flags based on the CPU cache properties
@@ -157,6 +158,7 @@ void __cpuidle acpi_processor_ffh_cstate_enter(struct acpi_processor_cx *cx)unsigned int cpu =smp_processor_id ();struct cstate_entry *percpu_entry; +clear_cpu_idle (); percpu_entry =per_cpu_ptr (cpu_cstate_entry, cpu);mwait_idle_with_hints (percpu_entry->states[cx->index].eax, percpu_entry->states[cx->index].ecx);
arch/x86/kernel/kvm.c +3 -0
@@ -159,6 +159,7 @@ void kvm_async_pf_task_wait(u32 token, int interrupt_kernel)/* * We cannot reschedule. So halt. */ +clear_cpu_idle ();native_safe_halt ();local_irq_disable (); }
@@ -788,6 +789,8 @@ static void kvm_wait(u8 *ptr, u8 val)if (READ_ONCE (*ptr) != val) goto out; +clear_cpu_idle (); +/* * halt until it's our turn and kicked. Note that we do safe halt * for irq enabled case to avoid hang when lock info is overwritten
arch/x86/kernel/process.c +5 -0
@@ -42,6 +42,7 @@#include <asm/prctl.h> #include <asm/spec-ctrl.h> #include <asm/proto.h> +#include <asm/clearcpu.h> #include "process.h"
@@ -589,6 +590,8 @@ void stop_this_cpu(void *dummy)disable_local_APIC ();mcheck_cpu_clear (this_cpu_ptr (&cpu_info)); +clear_cpu_idle (); +/* * Use wbinvd on processors that support SME. This provides support * for performing a successful kexec when going from SME inactive
@@ -675,6 +678,8 @@ static __cpuidle void mwait_idle(void)mb ();/* quirk */ } +clear_cpu_idle (); +__monitor ((void *)¤t_thread_info ()->flags,0 ,0 );if (!need_resched ())__sti_mwait (0 ,0 );
arch/x86/kernel/smpboot.c +3 -0
@@ -81,6 +81,7 @@#include <asm/cpu_device_id.h> #include <asm/spec-ctrl.h> #include <asm/hw_irq.h> +#include <asm/clearcpu.h> /* representing HT siblings of each logical CPU */ DEFINE_PER_CPU_READ_MOSTLY (cpumask_var_t, cpu_sibling_map);
@@ -1635,6 +1636,7 @@ static inline void mwait_play_dead(void)wbinvd ();while (1 ) { +clear_cpu_idle ();/* * The CLFLUSH is a workaround for erratum AAI65 for * the Xeon 7400 series. It's not clear it is actually
@@ -1662,6 +1664,7 @@ void hlt_play_dead(void)wbinvd ();while (1 ) { +clear_cpu_idle ();native_halt ();/* * If NMI wants to wake up CPU0, start CPU0.
drivers/acpi/acpi_pad.c +2 -0
@@ -26,6 +26,7 @@#include <linux/tick.h> #include <linux/slab.h> #include <linux/acpi.h> +#include <linux/clearcpu.h> #include <asm/mwait.h> #include <xen/xen.h>
@@ -175,6 +176,7 @@ static int power_saving_thread(void *data)tick_broadcast_enable ();tick_broadcast_enter ();stop_critical_timings (); +clear_cpu_idle ();mwait_idle_with_hints (power_saving_mwait_eax,1 );
drivers/acpi/processor_idle.c +3 -0
@@ -33,6 +33,7 @@#include <linux/cpuidle.h> #include <linux/cpu.h> #include <acpi/processor.h> +#include <asm/clearcpu.h> /* * Include the apic definitions for x86 to have the APIC timer related defines
@@ -121,6 +122,7 @@ static const struct dmi_system_id processor_power_dmi_table[] = { static void __cpuidle acpi_safe_halt(void) {if (!tif_need_resched ()) { +clear_cpu_idle ();safe_halt ();local_irq_disable (); }
@@ -681,6 +683,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index)ACPI_FLUSH_CPU_CACHE (); +clear_cpu_idle ();while (1 ) {if (cx->entry_method ==ACPI_CSTATE_HALT )
drivers/idle/intel_idle.c +5 -0
@@ -65,6 +65,7 @@#include <asm/intel-family.h> #include <asm/mwait.h> #include <asm/msr.h> +#include <asm/clearcpu.h> #define INTEL_IDLE_VERSION "0.4.1"
@@ -933,6 +934,8 @@ static __cpuidle int intel_idle(struct cpuidle_device *dev, } } +clear_cpu_idle (); +mwait_idle_with_hints (eax, ecx);if (!static_cpu_has (X86_FEATURE_ARAT ) && tick)
@@ -953,6 +956,8 @@ static void intel_idle_s2idle(struct cpuidle_device *dev,unsigned long ecx =1 ;/* break on interrupt flag */ unsigned long eax =flg2MWAIT (drv->states[index].flags); +clear_cpu_idle (); +mwait_idle_with_hints (eax, ecx); }
Signature · 1 line
2.17.2
PATCH v6 25/43 MDSv6
In reply to Andi KleenBPF allows the user to run untrusted code in the kernel.
Normally MDS would allow some information leakage either from other processes or sensitive kernel code to the user controlled BPF code. We cannot rule out that BPF code contains an MDS exploit and it is difficult to pattern match gadgets.
The patch aims to add limited number of clear cpus before BPF executions to guarantee EBPF executions cannot leak data.
Assume BPF execution does not touch other user's data, so does not need to schedule a clear for itself.
For EBPF programs loaded privileged (by root) we never clear, because we already assume they are trusted.
When the BPF program was loaded unprivileged clear the CPU before the BPF execution, depending on the context it is running in:
We only do this when running in an interrupt, or if an clear cpu is already scheduled (which means for example there was a context switch, or crypto operation before)
In process context we check if the current process context has the same userns+euid as the process who created the BPF.
This handles the common seccomp filter case without
any extra clears, but still adds clears when e.g. a socket filter runs on a socket inherited to a process with different user id. It also handles various other common cases.
Technically we would only need to do this if the BPF program contains conditional branches and loads dominated by them, but let's assume that near all do.
For example for running chromium with seccomp filters I see only 15-18% of all sandbox system calls have a clear, most are likely caused by context switches
Unprivileged EBPF usages in interrupts currently always clear.
This could be further optimized by allowing callers that do a lot of individual BPF runs and are sure they don't touch other user's data (that is not accessible to the EBPF anyways) inbetween to do the clear only once at the beginning. We can add such optimizations later based on profile data.
--- arch/x86/include/asm/clearbpf.h | 29 +++++++++++++++++++++++++++++ include/linux/filter.h | 21 +++++++++++++++++++-- kernel/bpf/core.c | 2 ++ kernel/bpf/cpumap.c | 3 +++ 4 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 arch/x86/include/asm/clearbpf.h
arch/x86/include/asm/clearbpf.h new file +29 -0
@@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_CLEARBPF_H +#define _ASM_CLEARBPF_H 1 + +#include <linux/clearcpu.h> +#include <linux/cred.h> +#include <asm/cpufeatures.h> + +/* +* When the BPF program was loaded unprivileged, clear the CPU +* to prevent any exploits written in BPF using side channels to read +* data leaked from other kernel code. In some cases, like +* process context with the same uid, we can avoid it. +* +* See Documentation/clearcpu.txt for more details. +*/ +static inline void arch_bpf_prepare_nonpriv (kuid_t uid) +{ +if (!static_cpu_has (X86_BUG_MDS )) +return ; +if (in_interrupt () || +__this_cpu_read (clear_cpu_flag) || + !uid_eq (current_euid (), uid)) { +clear_cpu (); +__this_cpu_write (clear_cpu_flag,0 ); + } +} + +#endif
include/linux/filter.h +19 -2
@@ -20,12 +20,21 @@#include <linux/set_memory.h> #include <linux/kallsyms.h> #include <linux/if_vlan.h> +#include <linux/clearcpu.h> #include <net/sch_generic.h> #include <uapi/linux/filter.h> #include <uapi/linux/bpf.h> +#ifdef CONFIG_ARCH_HAS_CLEAR_CPU +#include <asm/clearbpf.h> +#else +static inline void arch_bpf_prepare_nonpriv (kuid_t uid) +{ +} +#endif +struct sk_buff ;struct sock ;struct seccomp_data ;
@@ -490,7 +499,9 @@ struct bpf_prog { blinded:1, /* Was blinded */ is_func:1, /* program is a bpf function */ kprobe_override:1, /* Do we override a kprobe? */ - has_callchain_buf:1; /* callchain buffer allocated? */ + has_callchain_buf:1, /* callchain buffer allocated? */ + priv:1; /* Was loaded privileged */ +kuid_t uid;/* Original uid who created it */ enum bpf_prog_type type;/* Type of BPF program */ enum bpf_attach_type expected_attach_type;/* For some prog types */ u32 len;/* Number of filter blocks */
@@ -513,7 +524,13 @@ struct sk_filter {struct bpf_prog *prog; }; -#define BPF_PROG_RUN (filter, ctx) (*(filter)->bpf_func)(ctx, (filter)->insnsi) +static inline unsigned _bpf_prog_run (const struct bpf_prog *bp,const void *ctx) +{ +if (!bp->priv) +arch_bpf_prepare_nonpriv (bp->uid); +return bp->bpf_func (ctx, bp->insnsi); +} +#define BPF_PROG_RUN (filter, ctx) _bpf_prog_run(filter, ctx)#define BPF_SKB_CB_LEN QDISC_CB_PRIV_LEN
kernel/bpf/core.c +2 -0
@@ -99,6 +99,8 @@ struct bpf_prog *bpf_prog_alloc(unsigned int size, gfp_t gfp_extra_flags) fp->aux = aux; fp->aux->prog = fp; fp->jit_requested =ebpf_jit_enabled (); + fp->priv = !!capable (CAP_SYS_ADMIN ); + fp->uid =current_euid ();INIT_LIST_HEAD_RCU (&fp->aux->ksym_lnode);
kernel/bpf/cpumap.c +3 -0
@@ -376,6 +376,9 @@ static void __cpu_map_entry_free(struct rcu_head *rcu)/* No concurrent bq_enqueue can run at this point */ bq_flush_to_queue (rcpu, bq, false); + +/* Do lazy_clear_cpu_interrupt here? */ + }free_percpu (rcpu->bulkq);/* Cannot kthread_stop() here, last put free rcpu resources */
Signature · 1 line
2.17.2
PATCH v6 11/43 MDSv6
In reply to Andi KleenAdd basic infrastructure for code to request CPU buffer clearing on the next kernel exit.
We have two functions lazy_clear_cpu to request clearing, and lazy_clear_cpu_interrupt to request clearing if running in an interrupt.
Non architecture specific code can include linux/clearcpu.h and use lazy_clear_cpu / lazy_clear_interrupt. On x86 we provide low level implementations that sets a per cpu flag to request cpu clearing on the next kernel exit.
--- arch/Kconfig | 3 +++ arch/x86/Kconfig | 1 + arch/x86/include/asm/clearcpu.h | 12 +++++++++-- arch/x86/kernel/cpu/bugs.c | 3 +++ include/linux/clearcpu.h | 36 +++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 include/linux/clearcpu.h
arch/Kconfig +3 -0
@@ -808,6 +808,9 @@ config VMAP_STACK the stack to map directly to the KASAN shadow map using a formula that is incorrect if the stack is in vmalloc space. +config ARCH_HAS_CLEAR_CPU + def_bool n + config ARCH_OPTIONAL_KERNEL_RWX def_bool n
arch/x86/Kconfig +1 -0
@@ -84,6 +84,7 @@ config X86 select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH select ARCH_WANTS_DYNAMIC_TASK_STRUCT select ARCH_WANTS_THP_SWAP if X86_64 + select ARCH_HAS_CLEAR_CPU select BUILDTIME_EXTABLE_SORT select CLKEVT_I8253 select CLOCKSOURCE_VALIDATE_LAST_CYCLE
arch/x86/include/asm/clearcpu.h +10 -2
@@ -5,7 +5,8 @@#include <linux/jump_label.h> #include <linux/sched/smt.h> #include <asm/alternative.h> -#include <linux/thread_info.h> + +DECLARE_PER_CPU (bool, clear_cpu_flag);/* * Clear CPU buffers to avoid side channels.
@@ -34,8 +35,15 @@ static inline void clear_cpu(void)static inline void clear_cpu_idle (void ) { -if (sched_smt_active ()) +if (sched_smt_active ()) { +__this_cpu_write (clear_cpu_flag, false);clear_cpu (); + } +} + +static inline void lazy_clear_cpu (void ) +{ +__this_cpu_write (clear_cpu_flag, true); }#endif
arch/x86/kernel/cpu/bugs.c +3 -0
@@ -1061,6 +1061,9 @@ early_param("l1tf", l1tf_cmdline);#undef pr_fmt +DEFINE_PER_CPU (bool, clear_cpu_flag); +EXPORT_PER_CPU_SYMBOL (clear_cpu_flag); +static void mds_select_mitigation (void ) {if (!boot_cpu_has (X86_BUG_MDS ))
include/linux/clearcpu.h new file +36 -0
@@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_CLEARCPU_H +#define _LINUX_CLEARCPU_H 1 + +#include <linux/preempt.h> + +#ifdef CONFIG_ARCH_HAS_CLEAR_CPU +#include <asm/clearcpu.h> +#else +static inline void lazy_clear_cpu (void ) +{ +} +#endif + +/* +* Use this function when potentially touching (reading or writing) +* user data in an interrupt. In this case schedule to clear the +* CPU buffers on kernel exit to avoid any potential side channels. +* +* If not in an interrupt we assume the touched data belongs to the +* current process and doesn't need to be cleared. +* +* This version is for code who might be in an interrupt. +* If you know for sure you're in interrupt context call +* lazy_clear_cpu directly. +* +* lazy_clear_cpu is reasonably cheap (just sets a bit) and +* can be used in fast paths. +*/ +static inline void lazy_clear_cpu_interrupt (void ) +{ +if (in_interrupt ()) +lazy_clear_cpu (); +} + +#endif
Signature · 1 line
2.17.2
PATCH v6 22/43 MDSv6
In reply to Andi KleenSchedule a cpu clear on next kernel exit for swiotlb running in interrupt context, since it touches user data with the CPU.
--- kernel/dma/swiotlb.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/dma/swiotlb.c +2 -0
@@ -34,6 +34,7 @@#include <linux/scatterlist.h> #include <linux/mem_encrypt.h> #include <linux/set_memory.h> +#include <linux/clearcpu.h> #include <asm/io.h> #include <asm/dma.h>
@@ -422,6 +423,7 @@ static void swiotlb_bounce(phys_addr_t orig_addr, phys_addr_t tlb_addr, }else {memcpy (phys_to_virt (orig_addr), vaddr, size); } +lazy_clear_cpu_interrupt (); } phys_addr_t swiotlb_tbl_map_single(struct device *hwdev,
Signature · 1 line
2.17.2
PATCH v6 36/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: mds sweep: Make Amazon ena driver management
interrupt clear cpu
Most of the Amazon ena interrupt handlers do not touch user data, but the management interrupt does complicated things and should not be performance critical. Mark the management interrupt only as clear cpu. This needs some minor changes to the table driven interrupt setup.
--- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 +++-- drivers/net/ethernet/amazon/ena/ena_netdev.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/amazon/ena/ena_netdev.c +3 -2
@@ -1357,6 +1357,7 @@ static void ena_setup_mgmnt_intr(struct ena_adapter *adapter)snprintf (adapter->irq_tbl[ENA_MGMNT_IRQ_IDX ].name,ENA_IRQNAME_SIZE ,"ena-mgmnt@pci:%s" ,pci_name (adapter->pdev)); + adapter->irq_tbl[ENA_MGMNT_IRQ_IDX ].flags =IRQF_USER_DATA ; adapter->irq_tbl[ENA_MGMNT_IRQ_IDX ].handler = ena_intr_msix_mgmnt; adapter->irq_tbl[ENA_MGMNT_IRQ_IDX ].data = adapter;
@@ -1381,6 +1382,7 @@ static void ena_setup_io_intr(struct ena_adapter *adapter)snprintf (adapter->irq_tbl[irq_idx].name,ENA_IRQNAME_SIZE ,"%s-Tx-Rx-%d" , netdev->name, i); + adapter->irq_tbl[irq_idx].flags =0 ; adapter->irq_tbl[irq_idx].handler = ena_intr_msix_io; adapter->irq_tbl[irq_idx].data = &adapter->ena_napi[i]; adapter->irq_tbl[irq_idx].vector =
@@ -1394,12 +1396,11 @@ static void ena_setup_io_intr(struct ena_adapter *adapter)static int ena_request_mgmnt_irq (struct ena_adapter *adapter) { -unsigned long flags =0 ;struct ena_irq *irq;int rc; irq = &adapter->irq_tbl[ENA_MGMNT_IRQ_IDX ]; - rc =request_irq (irq->vector, irq->handler, flags, irq->name, + rc =request_irq (irq->vector, irq->handler, irq->flags, irq->name, irq->data);if (rc) { netif_err(adapter, probe, adapter->netdev,
drivers/net/ethernet/amazon/ena/ena_netdev.h +1 -0
@@ -140,6 +140,7 @@struct ena_irq {irq_handler_t handler; +unsigned flags;void *data;int cpu;u32 vector;
Signature · 1 line
2.17.2
PATCH v6 13/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: x86/speculation/mds: Check lazy clear in kernel exit
Add support for only clearing on kernel exit when the per cpu clear flag is set. This will be the base of lazy clearing.
Right now this is a nop because mds=full is still default.
--- arch/x86/entry/common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
arch/x86/entry/common.c +5 -1
@@ -212,8 +212,12 @@ __visible inline void prepare_exit_to_usermode(struct pt_regs *regs) ti->status &= ~(TS_COMPAT |TS_I386_REGS_POKED );#endif -if (static_key_enabled (&force_cpu_clear)) +if (static_cpu_has (X86_BUG_MDS ) && + (static_key_enabled (&force_cpu_clear) || +__this_cpu_read (clear_cpu_flag))) {clear_cpu (); +__this_cpu_write (clear_cpu_flag, false); + }user_enter_irqoff (); }
Signature · 1 line
2.17.2
PATCH v6 6/43 MDSv6
In reply to Andi KleenAdd a Documentation file for administrators that describes MDS on a high level.
Needs updates later for public URLs of supporting documentation.
--- Documentation/admin-guide/mds.rst | 95 +++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 Documentation/admin-guide/mds.rst
Documentation/admin-guide/mds.rst new file +95 -0
@@ -0,0 +1,95 @@ +MDS - Microarchitectural Data Sampling) +======================================= + +Microarchitectural Data Sampling is a side channel vulnerability that +allows an attacker to sample data that has been earlier used during +program execution. Internal buffers in the CPU may keep old data +for some limited time, which can the later be determined by an attacker +with side channel analysis. MDS can be used to occasionaly observe +some values accessed earlier, but it cannot be used to observe values +not recently touched by other code running on the same core. + +It is difficult to target particular data on a system using MDS, +but attackers may be able to infer secrets by collecting +and analyzing large amounts of data. MDS does not modify +memory. + +MDS consists of multiple sub-vulnerabilities: +Microarchitectural Store Buffer Data Sampling (MSBDS) (CVE-2018-12126) +Microarchitectual Fill Buffer Data Sampling (MFBDS) (CVE-2018-12130) +Microarchitectual Load Port Data (MLPDS) (CVE-2018-12127), +with the first leaking store data, and the second loads and sometimes +store data, and the third load data. + +The effects and mitigations are similar for all three, so the Linux +kernel handles and reports them all as a single vulnerability called +MDS. This also reduces the number of acronyms in use. + +Affected processors +------------------- + +This vulnerability affects a wide range of Intel processors. +Not all CPUs are affected by all of the sub vulnerabilities, +however the kernel handles it always the same. + +The vulnerability is not present in + + - Some Atoms (Bonnell, Saltwell, Goldmont, GoldmontPlus) + +The kernel will automatically detect future CPUs with hardware +mitigations for these issues and disable any workarounds. + +The kernel reports if the current CPU is vulnerable and any +mitigations used in + +/sys/devices/system/cpu/vulnerabilities/mds + +Kernel mitigation +----------------- + +The mitigation is automatically enabled, but can be further controlled +with the command line options documented below. + +The kernel clears the CPU buffers at every kernel exit. + +The mitigation can be done with microcode support, requiring +updated microcode. + +The microcode should be loaded at early boot using the initrd. Hot +updating microcode will not enable the mitigations. + +Virtual machine mitigation +-------------------------- + +The mitigation is enabled by default and controlled by the same options +as L1TF cache clearing. See l1tf.rst for more details. In the default +setting MDS for leaking data out of the guest into other processes +will be mitigated. + +Kernel command line options +--------------------------- + +Normally the kernel selects reasonable defaults and no special configuration +is needed. The default behavior can be overriden by the mds= kernel +command line options. + +These options can be specified in the boot loader. Any changes require a reboot. + +When the system only runs trusted code, MDS mitigation can be disabled with +mds=off as a performance optimization. + + - mds=off Disable workarounds if the CPU is not affected. + + - mds=auto Automatically select mitigation. + + - mds=full Currently equivalent to default. + +References +---------- + +Fore more details on the kernel internal implementation of the MDS mitigations, +please see Documentation/clearcpu.txt + +TBD Add URL for Intel white paper + +TBD add reference to microcodes
Signature · 1 line
2.17.2
PATCH v6 10/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: mds: Add documentation for clear cpu usage
Including the theory, and some guide lines for subsystem/driver maintainers.
--- Documentation/clearcpu.txt | 261 +++++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 Documentation/clearcpu.txt
Documentation/clearcpu.txt new file +261 -0
@@ -0,0 +1,261 @@ + +Security model for Microarchitectural Data Sampling +=================================================== + +Some CPUs can leave read or written data in internal buffers, +which then later might be sampled through side effects. +For more details see CVE-2018-12126 CVE-2018-12130 CVE-2018-12127 + +This can be avoided by explicitly clearing the CPU state. + +We attempt to avoid leaking data between different processes, +and also some sensitive data, like cryptographic data, to +user space. + +We support three modes: + +(1) mitigation off (mds=off) +(2) clear only when needed (default) +(3) clear on every kernel exit, or guest entry (mds=full) + +(1) and (3) are trivial, the rest of the document discusses (2) + +In general option (3) is the most conservative choice. It does +not make ST assumptions about leaking data. + +Basic requirements and assumptions +---------------------------------- + +Kernel addresses and kernel temporary data are not sensitive. + +User data is sensitive, but only for other processes. + +User data is anything in the user address space, or data buffers +directly copied from/to the user (e.g. read/write). It does not +include metadata, or flag settings. For example packet headers +or file names are not sensitive in this model. + +Block IO data (but not meta data) is sensitive. + +Most data structures in the kernel are not sensitive. + +Kernel data is sensitive when it involves cryptographic keys. + +We consider data from input devices (such as key presses) +sensitive. We also consider sound data or terminal +data sensitive. + +We assume that only data actually accessed by the kernel by explicit +instructions can be leaked. Note that this may not be always +true, in theory prefetching or speculation may touch more. The assumption +is that if any such happens it will be very low bandwidth and hard +to control due to the existing Spectre and other mitigations, +such as memory randomization. If a user is concerned about this they +need to use mds=full. + +Guidance for driver/subsystem developers +---------------------------------------- + +[These generally need to be enforced in code review for new code now] + +When you touch user supplied data of *other* processes in system call +context add lazy_clear_cpu(). + +For the cases below we care only about data from other processes. +Touching non cryptographic data from the current process is always allowed. + +Touching only pointers to user data is always allowed. + +When your interrupt does touch user data directly mark it with IRQF_USER_DATA. + +When your tasklet does touch user data directly, mark it TASKLET_USER_DATA +using tasklet_init_flags/or DECLARE_TASKLET_USERDATA*. + +When your timer does touch user data mark it with TIMER_USER_DATA +If it is a hrtimer and touches user data, mark it with HRTIMER_MODE_USER_DATA. + +When your irq poll handler does touch user data, mark it lazy_clear_cpu(). + +For networking code, make sure to only touch user data through +skb_push/put/copy [add more], unless it is data from the current +process. If that is not ensured add lazy_clear_cpu or +lazy_clear_cpu_interrupt. + +Any cryptographic code touching key data should use memzero_explicit +or kzfree to free the data. + +If your RCU callback touches user data add lazy_clear_cpu(). + +These steps are currently only needed for code that runs on MDS affected +CPUs, which is currently only x86. But might be worth being prepared +if other architectures become affected too. + +Implementation details/assumptions +---------------------------------- + +Any buffer clearing is done lazily on next kernel exit. lazy_clear* +is only a few fast instructions with no cache misses setting +a flag and can be used frequently even in fast paths. + +Protecting process data +----------------------- + +If a system call touches data of its own process, CPU state does not +need to be cleared, because it has already access to it. + +On context switching we clear data, unless the context switch is +inside a process. We also clear after any context switches from kernel +threads. + +Cryptographic keys inside the kernel should be protected. +We assume they use kzfree() or memzero_explicit() to clear +state, so these functions trigger a cpu clear. + +Hard Interrupts and tasklets +---------------------------- + +Most interrupt handlers for modern devices do not touch +user data, because they rely on DMA and only manipulate +pointers. They have been audited. + +Some handlers copy data, but often use strategic +functions which can be marked with a lazy clear. +For example memcpy_from/to_io, swiotlb (see below +for a full list) + +Some handlers touch user data without using these strategic +functions, these have to be marked with IRQF_USER_DATA. +All in tree handlers have been audited. + +Softirqs +-------- + +Softirqs are handled case by case: + + TIMER: see timers below. + NET_*: see networking below. + BLOCK: do not touch user data, except + for a few using kmap_atomic. We have a lazy_clear_cpu_interrupt() + in kmap_atomic for this case. + + IRQ_POLL: generally do not touch user data + TASKLET: see tasklets below + SCHED: only touches scheduler metadata + RCU: RCU handlers generally only free. + +Networking +---------- + +This is only about network code running in hard interrupt +or softirq or timer context. Per process network code +generally only touches data for the current process, +so does not need any changes. + +In principle packet data should be encrypted anyways for the wire, +but we try to avoid leaking it anyways. + +For networking code, any skb functions that are likely +touching non header packet data schedule a clear cpu at next +kernel exit. This includes skb_copy and related, skb_put/push, +checksum functions. We assume that any networking code touching +packet data uses these functions. + +NMIs / machine checks +--------------------- + +Assume they don't touch other processes user data. Most NMI +handlers are fairly simple and trivial and only concerned with +some non user hardware state. The machine check handlers and perf PMI +handlers are complicated (e.g. perf can touch user stack), but they +never touch any data not of the current process. + +Other interrupts +---------------- + +SMP function interrupt call backs have been audited and don't touch +any user data. + +Clear points +------------ + +We schedule clears in some centralized functions to minimize impact +on the overall code. + +Always clear: + +kernel preemption undefined state, need to always clear +context switch protect user / kernel thread data +VM entry protect host against guest + +Always schedule clear for next kernel exit: + +kzfree / memzero_explicit keys and crypto data + +Only schedule clear for next exit when called in interrupts: + +kmap_atomic block drivers touching user process data +memcpy_from/to_io drivers copying IO data +insw*, outs* +input_event input drivers touching user IO data +serio_interrupt +tty_insert_* tty drivers touching user input IO data +swiotlb bounce buffers touching IO data +sg_copy_* scsi drivers touching IO data in interrupts +skb_put, skb_copy_* networking code touching IO data +skb_*csum* +snd_pcm_period_elapsed, sound drivers touching IO data +snd_rawmidi_transmit/receive +snd_timer_interrupt + +Sandboxes +--------- + +We don't do anything special for seccomp processes + +If there is a sandbox inside the process the process should take care +itself of clearing its own sensitive data before running sandbox +code. This would include data touched by system calls. + +BPF +--- + +Assume BPF execution does not touch other user's data, so does +not need to schedule a clear for itself. + +BPF could attack the rest of the kernel if it can successfully +measure side channel side effects. + +When the BPF program was loaded unprivileged, always clear the CPU +to prevent any exploits written in BPF using side channels to read +data leaked from other kernel code + +We only do this when running in an interrupt, or if an clear cpu is +already scheduled (which means for example there was a context +switch, or crypto operation before) + +In process context we assume the code only accesses data of the +current user and check that the BPF running was loaded by the +same user so even if data leaked it would not cross privilege +boundaries. + +Technically we would only need to do this if the BPF program +contains conditional branches and loads dominated by them, but +let's assume that nearly all do. + +This could be further optimized by batching clears for +many similar EBPF executions in a row (e.g. for packet +processing). This would need ensuring that no sensitive +data is touched inbetween the EBPF executions, and also +that all EBPF scripts are set up by the same uid. +We could add such optimizations later based on +profile data. + +Virtualization +-------------- + +When entering a guest in KVM we clear to avoid any leakage to a guest. +Normally this is done implicitly as part of the L1TF mitigation, +except on a few CPUs that are not vulnerable to L1TF and need +explicit clear. It relies on L1TF being enabled. It also uses the +"fast exit" optimization that only clears if an interrupt or context switch +happened during a VMexit, unless mds=full is used.
Signature · 1 line
2.17.2
PATCH v6 43/43 MDSv6
In reply to Andi KleenMark tasklets that touch user data based on an audit. This was a conservative audit, either the tasklets clearly touched user data, or were too complicated and for slow devices.
Some other tasklets that also touch user data have not been marked, instead those rely on hooks in commonly called functions
Changes done with the appended cocci.script, and sed for DECLARE_TASKLET
// SPDX-License-Identifier: GPL-2.0
@@
expression a, b, c;
@@
- tasklet_init(a, b, c)
+ tasklet_init_flags(a, b, c, TASKLET_USER_DATA)
@@
expression a, b, c, d;
@@
- tasklet_hrtimer_init(a, b, c, d)
+ tasklet_hrtimer_init(a, b, c, d | HRTIMER_MODE_USER_DATA)
--- drivers/atm/eni.c | 3 ++- drivers/atm/he.c | 3 ++- drivers/block/xsysace.c | 3 ++- drivers/crypto/ixp4xx_crypto.c | 3 ++- drivers/crypto/qat/qat_common/adf_isr.c | 7 ++++--- drivers/crypto/qat/qat_common/adf_sriov.c | 6 +++--- drivers/crypto/qat/qat_common/adf_vf_isr.c | 10 ++++++---- drivers/dma/dw/core.c | 3 ++- drivers/dma/ioat/init.c | 3 ++- drivers/dma/virt-dma.c | 3 ++- drivers/gpu/drm/i915/intel_lrc.c | 5 +++-- drivers/hv/channel_mgmt.c | 4 ++-- drivers/hv/hv.c | 4 ++-- drivers/infiniband/hw/bnxt_re/qplib_fp.c | 4 ++-- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 4 ++-- drivers/infiniband/hw/i40iw/i40iw_main.c | 9 ++++++--- drivers/infiniband/hw/qib/qib_sdma.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_cq.c | 3 ++- drivers/input/serio/hil_mlc.c | 2 +- drivers/isdn/gigaset/bas-gigaset.c | 8 ++++---- drivers/isdn/gigaset/common.c | 4 ++-- drivers/isdn/gigaset/ser-gigaset.c | 4 ++-- drivers/isdn/gigaset/usb-gigaset.c | 4 ++-- drivers/media/pci/bt8xx/dvb-bt8xx.c | 3 ++- drivers/media/pci/mantis/mantis_dvb.c | 3 ++- drivers/media/pci/smipcie/smipcie-main.c | 3 ++- drivers/media/pci/ttpci/av7110.c | 12 +++++++---- drivers/media/pci/ttpci/budget-ci.c | 9 ++++++--- drivers/media/pci/ttpci/budget-core.c | 3 ++- drivers/media/pci/tw5864/tw5864-video.c | 4 ++-- .../media/platform/marvell-ccic/mcam-core.c | 4 ++-- drivers/media/radio/wl128x/fmdrv_common.c | 6 ++++-- drivers/media/usb/ttusb-dec/ttusb_dec.c | 5 +++-- drivers/memstick/host/jmb38x_ms.c | 3 ++- drivers/misc/vmw_vmci/vmci_guest.c | 8 ++++---- drivers/mmc/host/wbsd.c | 20 +++++++++---------- drivers/net/ethernet/broadcom/cnic.c | 8 ++++---- drivers/net/ethernet/cadence/macb_main.c | 4 ++-- drivers/net/ethernet/micrel/ks8842.c | 7 ++++--- drivers/net/ppp/ppp_async.c | 3 ++- drivers/net/ppp/ppp_synctty.c | 3 ++- drivers/net/usb/cdc_ncm.c | 3 ++- drivers/net/usb/hso.c | 6 +++--- drivers/net/wan/farsync.c | 4 ++-- drivers/net/wireless/ath/carl9170/usb.c | 4 ++-- .../net/wireless/broadcom/b43legacy/main.c | 6 +++--- drivers/net/wireless/broadcom/b43legacy/pio.c | 4 ++-- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 5 +++-- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 5 +++-- .../net/wireless/intel/iwlegacy/3945-mac.c | 6 +++--- .../net/wireless/intel/iwlegacy/4965-mac.c | 6 +++--- drivers/net/wireless/intersil/orinoco/main.c | 4 ++-- drivers/net/wireless/mac80211_hwsim.c | 6 +++--- drivers/net/wireless/marvell/mwl8k.c | 6 ++++-- drivers/net/wireless/realtek/rtlwifi/pci.c | 12 +++++------ drivers/scsi/aic94xx/aic94xx_hwi.c | 4 ++-- drivers/staging/ks7010/ks_hostif.c | 3 ++- .../staging/rtl8188eu/hal/rtl8188eu_recv.c | 6 +++--- .../staging/rtl8188eu/hal/rtl8188eu_xmit.c | 6 +++--- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 18 ++++++++--------- drivers/staging/rtl8192e/rtllib_softmac.c | 6 +++--- drivers/staging/rtl8712/rtl8712_recv.c | 6 +++--- drivers/staging/rtl8712/rtl871x_xmit.c | 6 +++--- .../staging/rtl8723bs/hal/rtl8723bs_recv.c | 8 +++----- drivers/tty/ipwireless/hardware.c | 3 ++- drivers/tty/serial/ifx6x60.c | 4 ++-- drivers/usb/atm/usbatm.c | 6 ++++-- drivers/usb/gadget/function/f_midi.c | 3 ++- drivers/usb/serial/mos7720.c | 4 ++-- net/atm/pppoatm.c | 2 +- net/mac80211/main.c | 14 ++++++------- net/rds/ib_cm.c | 8 ++++---- net/xfrm/xfrm_state.c | 3 ++- sound/core/timer.c | 4 ++-- sound/pci/asihpi/asihpi.c | 4 ++-- sound/pci/rme9652/hdsp.c | 3 ++- sound/pci/rme9652/hdspm.c | 4 ++-- sound/usb/midi.c | 3 ++- sound/usb/misc/ua101.c | 4 ++-- 79 files changed, 232 insertions(+), 188 deletions(-)
drivers/atm/eni.c +2 -1
@@ -1841,7 +1841,8 @@ static int eni_start(struct atm_dev *dev) eni_dev->vci,eni_dev->rx_dma,eni_dev->tx_dma, eni_dev->service,buf);spin_lock_init (&eni_dev->lock); -tasklet_init (&eni_dev->task,eni_tasklet,(unsigned long ) dev); +tasklet_init_flags (&eni_dev->task, eni_tasklet, (unsigned long )dev, +TASKLET_USER_DATA ); eni_dev->events =0 ;/* initialize memory management */ buffer_mem = eni_dev->mem - (buf - eni_dev->ram);
drivers/atm/he.c +2 -1
@@ -383,7 +383,8 @@ static int he_init_one(struct pci_dev *pci_dev, he_dev->atm_dev->dev_data = he_dev; atm_dev->dev_data = he_dev; he_dev->number = atm_dev->number; -tasklet_init (&he_dev->tasklet, he_tasklet, (unsigned long ) he_dev); +tasklet_init_flags (&he_dev->tasklet, he_tasklet, + (unsigned long )he_dev,TASKLET_USER_DATA );spin_lock_init (&he_dev->global_lock);if (he_start (atm_dev)) {
drivers/block/xsysace.c +2 -1
@@ -1004,7 +1004,8 @@ static int ace_setup(struct ace_device *ace)/* * Initialize the state machine tasklet and stall timer */ -tasklet_init (&ace->fsm_tasklet, ace_fsm_tasklet, (unsigned long )ace); +tasklet_init_flags (&ace->fsm_tasklet, ace_fsm_tasklet, + (unsigned long )ace,TASKLET_USER_DATA );timer_setup (&ace->stall_timer, ace_stall_timer,TIMER_USER_DATA );/*
drivers/crypto/ixp4xx_crypto.c +2 -1
@@ -499,7 +499,8 @@ static int init_ixp_crypto(struct device *dev) goto err; }qmgr_set_irq (RECV_QID ,QUEUE_IRQ_SRC_NOT_EMPTY , irqhandler,NULL ); -tasklet_init (&crypto_done_tasklet, crypto_done_action,0 ); +tasklet_init_flags (&crypto_done_tasklet, crypto_done_action,0 , +TASKLET_USER_DATA );qmgr_enable_irq (RECV_QID );return 0 ;
drivers/crypto/qat/qat_common/adf_isr.c +4 -3
@@ -283,9 +283,10 @@ static int adf_setup_bh(struct adf_accel_dev *accel_dev)int i;for (i =0 ; i < hw_data->num_banks; i++) -tasklet_init (&priv_data->banks[i].resp_handler, - adf_response_handler, - (unsigned long )&priv_data->banks[i]); +tasklet_init_flags (&priv_data->banks[i].resp_handler, + adf_response_handler, + (unsigned long )&priv_data->banks[i], +TASKLET_USER_DATA );return 0 ; }
drivers/crypto/qat/qat_common/adf_sriov.c +3 -3
@@ -125,9 +125,9 @@ static int adf_enable_sriov(struct adf_accel_dev *accel_dev) vf_info->accel_dev = accel_dev; vf_info->vf_nr = i; -tasklet_init (&vf_info->vf2pf_bh_tasklet, - (void *)adf_vf2pf_bh_handler, - (unsigned long )vf_info); +tasklet_init_flags (&vf_info->vf2pf_bh_tasklet, + (void *)adf_vf2pf_bh_handler, + (unsigned long )vf_info,TASKLET_USER_DATA );mutex_init (&vf_info->pf2vf_lock); ratelimit_state_init(&vf_info->vf2pf_ratelimit, DEFAULT_RATELIMIT_INTERVAL,
drivers/crypto/qat/qat_common/adf_vf_isr.c +6 -4
@@ -182,8 +182,9 @@ static void adf_pf2vf_bh_handler(void *data)static int adf_setup_pf2vf_bh (struct adf_accel_dev *accel_dev) { -tasklet_init (&accel_dev->vf.pf2vf_bh_tasklet, - (void *)adf_pf2vf_bh_handler, (unsigned long )accel_dev); +tasklet_init_flags (&accel_dev->vf.pf2vf_bh_tasklet, + (void *)adf_pf2vf_bh_handler, + (unsigned long )accel_dev,TASKLET_USER_DATA );mutex_init (&accel_dev->vf.vf2pf_lock);return 0 ;
@@ -259,8 +260,9 @@ static int adf_setup_bh(struct adf_accel_dev *accel_dev) {struct adf_etr_data *priv_data = accel_dev->transport; -tasklet_init (&priv_data->banks[0 ].resp_handler, adf_response_handler, - (unsigned long )priv_data->banks); +tasklet_init_flags (&priv_data->banks[0 ].resp_handler, + adf_response_handler, + (unsigned long )priv_data->banks,TASKLET_USER_DATA );return 0 ; }
drivers/dma/dw/core.c +2 -1
@@ -1271,7 +1271,8 @@ int dw_dma_probe(struct dw_dma_chip *chip) goto err_pdata; } -tasklet_init (&dw->tasklet, dw_dma_tasklet, (unsigned long )dw); +tasklet_init_flags (&dw->tasklet, dw_dma_tasklet, (unsigned long )dw, +TASKLET_USER_DATA ); err =request_irq (chip->irq, dw_dma_interrupt,IRQF_SHARED , dw->name, dw);
drivers/dma/ioat/init.c +2 -1
@@ -760,7 +760,8 @@ ioat_init_channel(struct ioatdma_device *ioat_dma,list_add_tail (&ioat_chan->dma_chan.device_node, &dma->channels); ioat_dma->idx[idx] = ioat_chan;timer_setup (&ioat_chan->timer, ioat_timer_event,0 ); -tasklet_init (&ioat_chan->cleanup_task, ioat_cleanup_event, data); +tasklet_init_flags (&ioat_chan->cleanup_task, ioat_cleanup_event, data, +TASKLET_USER_DATA ); }#define IOAT_NUM_SRC_TEST 6/* must be <= 8 */
drivers/dma/virt-dma.c +2 -1
@@ -139,7 +139,8 @@ void vchan_init(struct virt_dma_chan *vc, struct dma_device *dmadev)INIT_LIST_HEAD (&vc->desc_issued);INIT_LIST_HEAD (&vc->desc_completed); -tasklet_init (&vc->task, vchan_complete, (unsigned long )vc); +tasklet_init_flags (&vc->task, vchan_complete, (unsigned long )vc, +TASKLET_USER_DATA ); vc->chan.device = dmadev;list_add_tail (&vc->chan.device_node, &dmadev->channels);
drivers/gpu/drm/i915/intel_lrc.c +3 -2
@@ -2231,8 +2231,9 @@ logical_ring_setup(struct intel_engine_cs *engine)/* Intentionally left blank. */ engine->buffer =NULL ; -tasklet_init (&engine->execlists.tasklet, - execlists_submission_tasklet, (unsigned long )engine); +tasklet_init_flags (&engine->execlists.tasklet, + execlists_submission_tasklet, + (unsigned long )engine,TASKLET_USER_DATA );logical_ring_default_vfuncs (engine);logical_ring_default_irqs (engine);
drivers/hv/channel_mgmt.c +2 -2
@@ -333,8 +333,8 @@ static struct vmbus_channel *alloc_channel(void)INIT_LIST_HEAD (&channel->sc_list);INIT_LIST_HEAD (&channel->percpu_list); -tasklet_init (&channel->callback_event, - vmbus_on_event, (unsigned long )channel); +tasklet_init_flags (&channel->callback_event, vmbus_on_event, + (unsigned long )channel,TASKLET_USER_DATA );return channel; }
drivers/hv/hv.c +2 -2
@@ -209,8 +209,8 @@ int hv_synic_alloc(void)for_each_present_cpu (cpu) { hv_cpu =per_cpu_ptr (hv_context.cpu_context, cpu); -tasklet_init (&hv_cpu->msg_dpc, - vmbus_on_msg_dpc, (unsigned long ) hv_cpu); +tasklet_init_flags (&hv_cpu->msg_dpc, vmbus_on_msg_dpc, + (unsigned long )hv_cpu,TASKLET_USER_DATA ); hv_cpu->clk_evt =kzalloc (sizeof (struct clock_event_device ),GFP_KERNEL );
drivers/infiniband/hw/bnxt_re/qplib_fp.c +2 -2
@@ -380,8 +380,8 @@ int bnxt_qplib_nq_start_irq(struct bnxt_qplib_nq *nq, int nq_indx, nq->vector = msix_vector;if (need_init) -tasklet_init (&nq->worker, bnxt_qplib_service_nq, - (unsigned long )nq); +tasklet_init_flags (&nq->worker, bnxt_qplib_service_nq, + (unsigned long )nq,TASKLET_USER_DATA );else tasklet_enable (&nq->worker);
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +2 -2
@@ -654,8 +654,8 @@ int bnxt_qplib_rcfw_start_irq(struct bnxt_qplib_rcfw *rcfw, int msix_vector, rcfw->vector = msix_vector;if (need_init) -tasklet_init (&rcfw->worker, - bnxt_qplib_service_creq, (unsigned long )rcfw); +tasklet_init_flags (&rcfw->worker, bnxt_qplib_service_creq, + (unsigned long )rcfw,TASKLET_USER_DATA );else tasklet_enable (&rcfw->worker); rc = request_irq(rcfw->vector, bnxt_qplib_creq_irq, 0,
drivers/infiniband/hw/i40iw/i40iw_main.c +6 -3
@@ -689,10 +689,12 @@ static enum i40iw_status_code i40iw_configure_ceq_vector(struct i40iw_device *iwenum i40iw_status_code status;if (iwdev->msix_shared && !ceq_id) { -tasklet_init (&iwdev->dpc_tasklet, i40iw_dpc, (unsigned long )iwdev); +tasklet_init_flags (&iwdev->dpc_tasklet, i40iw_dpc, + (unsigned long )iwdev,TASKLET_USER_DATA ); status =request_irq (msix_vec->irq, i40iw_irq_handler,0 ,"AEQCEQ" , iwdev); }else { -tasklet_init (&iwceq->dpc_tasklet, i40iw_ceq_dpc, (unsigned long )iwceq); +tasklet_init_flags (&iwceq->dpc_tasklet, i40iw_ceq_dpc, + (unsigned long )iwceq,TASKLET_USER_DATA ); status =request_irq (msix_vec->irq, i40iw_ceq_handler,0 ,"CEQ" , iwceq); }
@@ -841,7 +843,8 @@ static enum i40iw_status_code i40iw_configure_aeq_vector(struct i40iw_device *iwu32 ret =0 ;if (!iwdev->msix_shared) { -tasklet_init (&iwdev->dpc_tasklet, i40iw_dpc, (unsigned long )iwdev); +tasklet_init_flags (&iwdev->dpc_tasklet, i40iw_dpc, + (unsigned long )iwdev,TASKLET_USER_DATA ); ret =request_irq (msix_vec->irq, i40iw_irq_handler,0 ,"i40iw" , iwdev); }if (ret) {
drivers/infiniband/hw/qib/qib_sdma.c +2 -2
@@ -436,8 +436,8 @@ int qib_setup_sdma(struct qib_pportdata *ppd)INIT_LIST_HEAD (&ppd->sdma_activelist); -tasklet_init (&ppd->sdma_sw_clean_up_task, sdma_sw_clean_up_task, - (unsigned long )ppd); +tasklet_init_flags (&ppd->sdma_sw_clean_up_task, sdma_sw_clean_up_task, + (unsigned long )ppd,TASKLET_USER_DATA ); ret = dd->f_init_sdma_regs (ppd);if (ret)
drivers/infiniband/sw/rxe/rxe_cq.c +2 -1
@@ -107,7 +107,8 @@ int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe, cq->is_dying = false; -tasklet_init (&cq->comp_task, rxe_send_complete, (unsigned long )cq); +tasklet_init_flags (&cq->comp_task, rxe_send_complete, + (unsigned long )cq,TASKLET_USER_DATA );spin_lock_init (&cq->cq_lock); cq->ibcq.cqe = cqe;
drivers/input/serio/hil_mlc.c +1 -1
@@ -77,7 +77,7 @@ static struct timer_list hil_mlcs_kicker;static int hil_mlcs_probe;static void hil_mlcs_process (unsigned long unused); -static DECLARE_TASKLET_DISABLED(hil_mlcs_tasklet, hil_mlcs_process, 0); +static DECLARE_TASKLET_USERDATA_DISABLED(hil_mlcs_tasklet, hil_mlcs_process, 0);/* #define HIL_MLC_DEBUG */
drivers/isdn/gigaset/bas-gigaset.c +4 -4
@@ -2146,8 +2146,8 @@ static int gigaset_initbcshw(struct bc_state *bcs) bcs->hw.bas =NULL ;return -ENOMEM ; } -tasklet_init (&ubc->sent_tasklet, - write_iso_tasklet, (unsigned long ) bcs); +tasklet_init_flags (&ubc->sent_tasklet, write_iso_tasklet, + (unsigned long )bcs,TASKLET_USER_DATA );spin_lock_init (&ubc->isoinlock);for (i =0 ; i <BAS_INURBS ; ++i)
@@ -2167,8 +2167,8 @@ static int gigaset_initbcshw(struct bc_state *bcs) ubc->aborts =0 ; ubc->shared0s =0 ; ubc->stolen0s =0 ; -tasklet_init (&ubc->rcvd_tasklet, - read_iso_tasklet, (unsigned long ) bcs); +tasklet_init_flags (&ubc->rcvd_tasklet, read_iso_tasklet, + (unsigned long )bcs,TASKLET_USER_DATA );return 0 ; }
drivers/isdn/gigaset/common.c +2 -2
@@ -692,8 +692,8 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, cs->ev_tail =0 ; cs->ev_head =0 ; -tasklet_init (&cs->event_tasklet, gigaset_handle_event, - (unsigned long ) cs); +tasklet_init_flags (&cs->event_tasklet, gigaset_handle_event, + (unsigned long )cs,TASKLET_USER_DATA );tty_port_init (&cs->port); cs->commands_pending =0 ; cs->cur_at_seq =0 ;
drivers/isdn/gigaset/ser-gigaset.c +2 -2
@@ -403,8 +403,8 @@ static int gigaset_initcshw(struct cardstate *cs)return rc; } -tasklet_init (&cs->write_tasklet, - gigaset_modem_fill, (unsigned long ) cs); +tasklet_init_flags (&cs->write_tasklet, gigaset_modem_fill, + (unsigned long )cs,TASKLET_USER_DATA );return 0 ; }
drivers/isdn/gigaset/usb-gigaset.c +2 -2
@@ -590,8 +590,8 @@ static int gigaset_initcshw(struct cardstate *cs) ucs->bulk_out_buffer =NULL ; ucs->bulk_out_urb =NULL ; ucs->read_urb =NULL ; -tasklet_init (&cs->write_tasklet, - gigaset_modem_fill, (unsigned long ) cs); +tasklet_init_flags (&cs->write_tasklet, gigaset_modem_fill, + (unsigned long )cs,TASKLET_USER_DATA );return 0 ; }
drivers/media/pci/bt8xx/dvb-bt8xx.c +2 -1
@@ -787,7 +787,8 @@ static int dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type) goto err_disconnect_frontend; } -tasklet_init (&card->bt->tasklet, dvb_bt8xx_task, (unsigned long ) card); +tasklet_init_flags (&card->bt->tasklet, dvb_bt8xx_task, + (unsigned long )card,TASKLET_USER_DATA );frontend_init (card, type);
drivers/media/pci/mantis/mantis_dvb.c +2 -1
@@ -217,7 +217,8 @@ int mantis_dvb_init(struct mantis_pci *mantis) }dvb_net_init (&mantis->dvb_adapter, &mantis->dvbnet, &mantis->demux.dmx); -tasklet_init (&mantis->tasklet, mantis_dma_xfer, (unsigned long ) mantis); +tasklet_init_flags (&mantis->tasklet, mantis_dma_xfer, + (unsigned long )mantis,TASKLET_USER_DATA );tasklet_disable (&mantis->tasklet);if (mantis->hwconfig) { result = config->frontend_init (mantis, mantis->fe);
drivers/media/pci/smipcie/smipcie-main.c +2 -1
@@ -431,7 +431,8 @@ static int smi_port_init(struct smi_port *port, int dmaChanUsed) }smi_port_disableInterrupt (port); -tasklet_init (&port->tasklet, smi_dma_xfer, (unsigned long )port); +tasklet_init_flags (&port->tasklet, smi_dma_xfer, (unsigned long )port, +TASKLET_USER_DATA );tasklet_disable (&port->tasklet); port->enable =1 ;return 0 ;
drivers/media/pci/ttpci/av7110.c +8 -4
@@ -2533,7 +2533,8 @@ static int av7110_attach(struct saa7146_dev* dev,saa7146_write (dev,NUM_LINE_BYTE3 , (TS_HEIGHT <<16 ) |TS_WIDTH );saa7146_write (dev,MC2 ,MASK_04 |MASK_20 ); -tasklet_init (&av7110->vpe_tasklet, vpeirq, (unsigned long ) av7110); +tasklet_init_flags (&av7110->vpe_tasklet, vpeirq, + (unsigned long )av7110,TASKLET_USER_DATA ); }else if (budgetpatch) {spin_lock_init (&av7110->feedlock1);
@@ -2614,7 +2615,8 @@ static int av7110_attach(struct saa7146_dev* dev,saa7146_write (dev,MC1 , (MASK_13 |MASK_29 ));/* end of budgetpatch register initialization */ -tasklet_init (&av7110->vpe_tasklet, vpeirq, (unsigned long ) av7110); +tasklet_init_flags (&av7110->vpe_tasklet, vpeirq, + (unsigned long )av7110,TASKLET_USER_DATA ); }else {saa7146_write (dev,PCI_BT_V1 ,0x1c00101f );saa7146_write (dev,BCS_CTRL ,0x80400040 );
@@ -2629,8 +2631,10 @@ static int av7110_attach(struct saa7146_dev* dev,saa7146_write (dev,GPIO_CTRL ,0x000000 ); } -tasklet_init (&av7110->debi_tasklet, debiirq, (unsigned long ) av7110); -tasklet_init (&av7110->gpio_tasklet, gpioirq, (unsigned long ) av7110); +tasklet_init_flags (&av7110->debi_tasklet, debiirq, + (unsigned long )av7110,TASKLET_USER_DATA ); +tasklet_init_flags (&av7110->gpio_tasklet, gpioirq, + (unsigned long )av7110,TASKLET_USER_DATA );mutex_init (&av7110->pid_mutex);
drivers/media/pci/ttpci/budget-ci.c +6 -3
@@ -243,8 +243,9 @@ static int msp430_ir_init(struct budget_ci *budget_ci) budget_ci->ir.dev = dev; -tasklet_init (&budget_ci->ir.msp430_irq_tasklet, msp430_ir_interrupt, - (unsigned long ) budget_ci); +tasklet_init_flags (&budget_ci->ir.msp430_irq_tasklet, + msp430_ir_interrupt, (unsigned long )budget_ci, +TASKLET_USER_DATA );SAA7146_IER_ENABLE (saa,MASK_06 );saa7146_setgpio (saa,3 ,SAA7146_GPIO_IRQHI );
@@ -505,7 +506,9 @@ static int ciintf_init(struct budget_ci *budget_ci)// Setup CI slot IRQ if (budget_ci->ci_irq) { -tasklet_init (&budget_ci->ciintf_irq_tasklet, ciintf_interrupt, (unsigned long ) budget_ci); +tasklet_init_flags (&budget_ci->ciintf_irq_tasklet, + ciintf_interrupt, (unsigned long )budget_ci, +TASKLET_USER_DATA );if (budget_ci->slot_status !=SLOTSTATUS_NONE ) {saa7146_setgpio (saa,0 ,SAA7146_GPIO_IRQLO ); }else {
drivers/media/pci/ttpci/budget-core.c +2 -1
@@ -528,7 +528,8 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,/* upload all */ saa7146_write (dev,GPIO_CTRL ,0x000000 ); -tasklet_init (&budget->vpe_tasklet, vpeirq, (unsigned long ) budget); +tasklet_init_flags (&budget->vpe_tasklet, vpeirq, + (unsigned long )budget,TASKLET_USER_DATA );/* frontend power on */ if (bi->type !=BUDGET_FS_ACTIVY )
drivers/media/pci/tw5864/tw5864-video.c +2 -2
@@ -1066,8 +1066,8 @@ int tw5864_video_init(struct tw5864_dev *dev, int *video_nr) dev->irqmask |=TW5864_INTR_VLC_DONE |TW5864_INTR_TIMER ;tw5864_irqmask_apply (dev); -tasklet_init (&dev->tasklet, tw5864_handle_frame_task, - (unsigned long )dev); +tasklet_init_flags (&dev->tasklet, tw5864_handle_frame_task, + (unsigned long )dev,TASKLET_USER_DATA );for (i =0 ; i <TW5864_INPUTS ; i++) { dev->inputs[i].root = dev;
drivers/media/platform/marvell-ccic/mcam-core.c +2 -2
@@ -1280,8 +1280,8 @@ static int mcam_setup_vb2(struct mcam_camera *cam)break ;case B_vmalloc:#ifdef MCAM_MODE_VMALLOC -tasklet_init (&cam->s_tasklet, mcam_frame_tasklet, - (unsigned long ) cam); +tasklet_init_flags (&cam->s_tasklet, mcam_frame_tasklet, + (unsigned long )cam,TASKLET_USER_DATA ); vq->ops = &mcam_vb2_ops; vq->mem_ops = &vb2_vmalloc_memops; cam->dma_setup = mcam_ctlr_dma_vmalloc;
drivers/media/radio/wl128x/fmdrv_common.c +4 -2
@@ -1540,11 +1540,13 @@ int fmc_prepare(struct fmdev *fmdev)/* Initialize TX queue and TX tasklet */ skb_queue_head_init (&fmdev->tx_q); -tasklet_init (&fmdev->tx_task, send_tasklet, (unsigned long )fmdev); +tasklet_init_flags (&fmdev->tx_task, send_tasklet, + (unsigned long )fmdev,TASKLET_USER_DATA );/* Initialize RX Queue and RX tasklet */ skb_queue_head_init (&fmdev->rx_q); -tasklet_init (&fmdev->rx_task, recv_tasklet, (unsigned long )fmdev); +tasklet_init_flags (&fmdev->rx_task, recv_tasklet, + (unsigned long )fmdev,TASKLET_USER_DATA ); fmdev->irq_info.stage =0 ;atomic_set (&fmdev->tx_cnt,1 );
drivers/media/usb/ttusb-dec/ttusb_dec.c +3 -2
@@ -1218,8 +1218,9 @@ static void ttusb_dec_init_tasklet(struct ttusb_dec *dec) {spin_lock_init (&dec->urb_frame_list_lock);INIT_LIST_HEAD (&dec->urb_frame_list); -tasklet_init (&dec->urb_tasklet, ttusb_dec_process_urb_frame_list, - (unsigned long )dec); +tasklet_init_flags (&dec->urb_tasklet, + ttusb_dec_process_urb_frame_list, + (unsigned long )dec,TASKLET_USER_DATA ); }static int ttusb_init_rc (struct ttusb_dec *dec)
drivers/memstick/host/jmb38x_ms.c +2 -1
@@ -893,7 +893,8 @@ static struct memstick_host *jmb38x_ms_alloc_host(struct jmb38x_ms *jm, int cnt) host->irq = jm->pdev->irq; host->timeout_jiffies =msecs_to_jiffies (1000 ); -tasklet_init (&host->notify, jmb38x_ms_req_tasklet, (unsigned long )msh); +tasklet_init_flags (&host->notify, jmb38x_ms_req_tasklet, + (unsigned long )msh,TASKLET_USER_DATA ); msh->request = jmb38x_ms_submit_req; msh->set_param = jmb38x_ms_set_param;
drivers/misc/vmw_vmci/vmci_guest.c +4 -4
@@ -467,10 +467,10 @@ static int vmci_guest_probe_device(struct pci_dev *pdev, vmci_dev->exclusive_vectors = false; vmci_dev->iobase = iobase; -tasklet_init (&vmci_dev->datagram_tasklet, - vmci_dispatch_dgs, (unsigned long )vmci_dev); -tasklet_init (&vmci_dev->bm_tasklet, - vmci_process_bitmap, (unsigned long )vmci_dev); +tasklet_init_flags (&vmci_dev->datagram_tasklet, vmci_dispatch_dgs, + (unsigned long )vmci_dev,TASKLET_USER_DATA ); +tasklet_init_flags (&vmci_dev->bm_tasklet, vmci_process_bitmap, + (unsigned long )vmci_dev,TASKLET_USER_DATA ); vmci_dev->data_buffer =vmalloc (VMCI_MAX_DG_SIZE );if (!vmci_dev->data_buffer) {
drivers/mmc/host/wbsd.c +10 -10
@@ -1452,16 +1452,16 @@ static int wbsd_request_irq(struct wbsd_host *host, int irq)/* * Set up tasklets. Must be done before requesting interrupt. */ -tasklet_init (&host->card_tasklet, wbsd_tasklet_card, - (unsigned long )host); -tasklet_init (&host->fifo_tasklet, wbsd_tasklet_fifo, - (unsigned long )host); -tasklet_init (&host->crc_tasklet, wbsd_tasklet_crc, - (unsigned long )host); -tasklet_init (&host->timeout_tasklet, wbsd_tasklet_timeout, - (unsigned long )host); -tasklet_init (&host->finish_tasklet, wbsd_tasklet_finish, - (unsigned long )host); +tasklet_init_flags (&host->card_tasklet, wbsd_tasklet_card, + (unsigned long )host,TASKLET_USER_DATA ); +tasklet_init_flags (&host->fifo_tasklet, wbsd_tasklet_fifo, + (unsigned long )host,TASKLET_USER_DATA ); +tasklet_init_flags (&host->crc_tasklet, wbsd_tasklet_crc, + (unsigned long )host,TASKLET_USER_DATA ); +tasklet_init_flags (&host->timeout_tasklet, wbsd_tasklet_timeout, + (unsigned long )host,TASKLET_USER_DATA ); +tasklet_init_flags (&host->finish_tasklet, wbsd_tasklet_finish, + (unsigned long )host,TASKLET_USER_DATA );/* * Allocate interrupt.
drivers/net/ethernet/broadcom/cnic.c +4 -4
@@ -4456,8 +4456,8 @@ static int cnic_init_bnx2_irq(struct cnic_dev *dev)CNIC_WR (dev, base +BNX2_HC_CMD_TICKS_OFF , (64 <<16 ) |220 ); cp->last_status_idx = cp->status_blk.bnx2->status_idx; -tasklet_init (&cp->cnic_irq_task, cnic_service_bnx2_msix, - (unsigned long ) dev); +tasklet_init_flags (&cp->cnic_irq_task, cnic_service_bnx2_msix, + (unsigned long )dev,TASKLET_USER_DATA ); err =cnic_request_irq (dev);if (err)return err;
@@ -4866,8 +4866,8 @@ static int cnic_init_bnx2x_irq(struct cnic_dev *dev)struct cnic_eth_dev *ethdev = cp->ethdev;int err =0 ; -tasklet_init (&cp->cnic_irq_task, cnic_service_bnx2x_bh, - (unsigned long ) dev); +tasklet_init_flags (&cp->cnic_irq_task, cnic_service_bnx2x_bh, + (unsigned long )dev,TASKLET_USER_DATA );if (ethdev->drv_state &CNIC_DRV_STATE_USING_MSIX ) err =cnic_request_irq (dev);
drivers/net/ethernet/cadence/macb_main.c +2 -2
@@ -4131,8 +4131,8 @@ static int macb_probe(struct platform_device *pdev) goto err_out_unregister_mdio; } -tasklet_init (&bp->hresp_err_tasklet, macb_hresp_error_task, - (unsigned long )bp); +tasklet_init_flags (&bp->hresp_err_tasklet, macb_hresp_error_task, + (unsigned long )bp,TASKLET_USER_DATA );phy_attached_info (phydev);
drivers/net/ethernet/micrel/ks8842.c +4 -3
@@ -967,8 +967,8 @@ static int ks8842_alloc_dma_bufs(struct net_device *netdev) goto err; } -tasklet_init (&rx_ctl->tasklet, ks8842_rx_frame_dma_tasklet, - (unsigned long )netdev); +tasklet_init_flags (&rx_ctl->tasklet, ks8842_rx_frame_dma_tasklet, + (unsigned long )netdev,TASKLET_USER_DATA );return 0 ; err:
@@ -1187,7 +1187,8 @@ static int ks8842_probe(struct platform_device *pdev) adapter->dma_tx.channel =-1 ; } -tasklet_init (&adapter->tasklet, ks8842_tasklet, (unsigned long )netdev); +tasklet_init_flags (&adapter->tasklet, ks8842_tasklet, + (unsigned long )netdev,TASKLET_USER_DATA );spin_lock_init (&adapter->lock); netdev->netdev_ops = &ks8842_netdev_ops;
drivers/net/ppp/ppp_async.c +2 -1
@@ -183,7 +183,8 @@ ppp_asynctty_open(struct tty_struct *tty) ap->lcp_fcs =-1 ;skb_queue_head_init (&ap->rqueue); -tasklet_init (&ap->tsk, ppp_async_process, (unsigned long ) ap); +tasklet_init_flags (&ap->tsk, ppp_async_process, (unsigned long )ap, +TASKLET_USER_DATA );refcount_set (&ap->refcnt,1 );init_completion (&ap->dead);
drivers/net/ppp/ppp_synctty.c +2 -1
@@ -181,7 +181,8 @@ ppp_sync_open(struct tty_struct *tty) ap->raccm = ~0U ;skb_queue_head_init (&ap->rqueue); -tasklet_init (&ap->tsk, ppp_sync_process, (unsigned long ) ap); +tasklet_init_flags (&ap->tsk, ppp_sync_process, (unsigned long )ap, +TASKLET_USER_DATA );refcount_set (&ap->refcnt,1 );init_completion (&ap->dead_cmp);
drivers/net/usb/cdc_ncm.c +2 -1
@@ -779,7 +779,8 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_hrtimer_init (&ctx->tx_timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); ctx->tx_timer.function = &cdc_ncm_tx_timer_cb; -tasklet_init (&ctx->bh, cdc_ncm_txpath_bh, (unsigned long )dev); +tasklet_init_flags (&ctx->bh, cdc_ncm_txpath_bh, (unsigned long )dev, +TASKLET_USER_DATA );atomic_set (&ctx->stop,0 );spin_lock_init (&ctx->mtx);
drivers/net/usb/hso.c +3 -3
@@ -1278,9 +1278,9 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp) serial->rx_state =RX_IDLE ;/* Force default termio settings */ _hso_serial_set_termios (tty,NULL ); -tasklet_init (&serial->unthrottle_tasklet, - (void (*)(unsigned long ))hso_unthrottle_tasklet, - (unsigned long )serial); +tasklet_init_flags (&serial->unthrottle_tasklet, + (void (*)(unsigned long ))hso_unthrottle_tasklet, + (unsigned long )serial,TASKLET_USER_DATA ); result =hso_start_serial_device (serial->parent,GFP_KERNEL );if (result) {hso_stop_serial_device (serial->parent);
drivers/net/wan/farsync.c +2 -2
@@ -573,8 +573,8 @@ static void do_bottom_half_rx(struct fst_card_info *card);static void fst_process_tx_work_q (unsigned long work_q);static void fst_process_int_work_q (unsigned long work_q); -static DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0); -static DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0); +static DECLARE_TASKLET_USERDATA(fst_tx_task, fst_process_tx_work_q, 0); +static DECLARE_TASKLET_USERDATA(fst_int_task, fst_process_int_work_q, 0);static struct fst_card_info *fst_card_array[FST_MAX_CARDS ];static spinlock_t fst_work_q_lock;
drivers/net/wireless/ath/carl9170/usb.c +2 -2
@@ -1085,8 +1085,8 @@ static int carl9170_usb_probe(struct usb_interface *intf,init_completion (&ar->cmd_wait);init_completion (&ar->fw_boot_wait);init_completion (&ar->fw_load_wait); -tasklet_init (&ar->usb_tasklet, carl9170_usb_tasklet, - (unsigned long )ar); +tasklet_init_flags (&ar->usb_tasklet, carl9170_usb_tasklet, + (unsigned long )ar,TASKLET_USER_DATA );atomic_set (&ar->tx_cmd_urbs,0 );atomic_set (&ar->tx_anch_urbs,0 );
drivers/net/wireless/broadcom/b43legacy/main.c +3 -3
@@ -3774,9 +3774,9 @@ static int b43legacy_one_core_attach(struct ssb_device *dev, wldev->wl = wl;b43legacy_set_status (wldev, B43legacy_STAT_UNINIT); wldev->bad_frames_preempt = modparam_bad_frames_preempt; -tasklet_init (&wldev->isr_tasklet, - (void (*)(unsigned long ))b43legacy_interrupt_tasklet, - (unsigned long )wldev); +tasklet_init_flags (&wldev->isr_tasklet, + (void (*)(unsigned long ))b43legacy_interrupt_tasklet, + (unsigned long )wldev,TASKLET_USER_DATA );if (modparam_pio) wldev->__using_pio = true;INIT_LIST_HEAD (&wldev->list);
drivers/net/wireless/broadcom/b43legacy/pio.c +2 -2
@@ -344,8 +344,8 @@ struct b43legacy_pioqueue *b43legacy_setup_pioqueue(struct b43legacy_wldev *dev,INIT_LIST_HEAD (&queue->txfree);INIT_LIST_HEAD (&queue->txqueue);INIT_LIST_HEAD (&queue->txrunning); -tasklet_init (&queue->txtask, tx_tasklet, - (unsigned long )queue); +tasklet_init_flags (&queue->txtask, tx_tasklet, (unsigned long )queue, +TASKLET_USER_DATA ); value =b43legacy_read32 (dev, B43legacy_MMIO_MACCTL); value &= ~B43legacy_MACCTL_BE;
drivers/net/wireless/intel/ipw2x00/ipw2100.c +3 -2
@@ -6151,8 +6151,9 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev,INIT_DELAYED_WORK (&priv->rf_kill, ipw2100_rf_kill);INIT_DELAYED_WORK (&priv->scan_event, ipw2100_scan_event); -tasklet_init (&priv->irq_tasklet, (void (*)(unsigned long )) - ipw2100_irq_tasklet, (unsigned long )priv); +tasklet_init_flags (&priv->irq_tasklet, + (void (*)(unsigned long ))ipw2100_irq_tasklet, + (unsigned long )priv,TASKLET_USER_DATA );/* NOTE: We do not start the deferred work for status checks yet */ priv->stop_rf_kill =1 ;
drivers/net/wireless/intel/ipw2x00/ipw2200.c +3 -2
@@ -10694,8 +10694,9 @@ static int ipw_setup_deferred_work(struct ipw_priv *priv)INIT_WORK (&priv->qos_activate, ipw_bg_qos_activate);#endif /* CONFIG_IPW2200_QOS */ -tasklet_init (&priv->irq_tasklet, (void (*)(unsigned long )) - ipw_irq_tasklet, (unsigned long )priv); +tasklet_init_flags (&priv->irq_tasklet, + (void (*)(unsigned long ))ipw_irq_tasklet, + (unsigned long )priv,TASKLET_USER_DATA );return ret; }
drivers/net/wireless/intel/iwlegacy/3945-mac.c +3 -3
@@ -3418,9 +3418,9 @@ il3945_setup_deferred_work(struct il_priv *il)timer_setup (&il->watchdog, il_bg_watchdog,0 ); -tasklet_init (&il->irq_tasklet, - (void (*)(unsigned long ))il3945_irq_tasklet, - (unsigned long )il); +tasklet_init_flags (&il->irq_tasklet, + (void (*)(unsigned long ))il3945_irq_tasklet, + (unsigned long )il,TASKLET_USER_DATA ); } static void
drivers/net/wireless/intel/iwlegacy/4965-mac.c +3 -3
@@ -6256,9 +6256,9 @@ il4965_setup_deferred_work(struct il_priv *il)timer_setup (&il->watchdog, il_bg_watchdog,0 ); -tasklet_init (&il->irq_tasklet, - (void (*)(unsigned long ))il4965_irq_tasklet, - (unsigned long )il); +tasklet_init_flags (&il->irq_tasklet, + (void (*)(unsigned long ))il4965_irq_tasklet, + (unsigned long )il,TASKLET_USER_DATA ); } static void
drivers/net/wireless/intersil/orinoco/main.c +2 -2
@@ -2198,8 +2198,8 @@ struct orinoco_privateINIT_WORK (&priv->wevent_work, orinoco_send_wevents);INIT_LIST_HEAD (&priv->rx_list); -tasklet_init (&priv->rx_tasklet, orinoco_rx_isr_tasklet, - (unsigned long ) priv); +tasklet_init_flags (&priv->rx_tasklet, orinoco_rx_isr_tasklet, + (unsigned long )priv,TASKLET_USER_DATA );spin_lock_init (&priv->scan_lock);INIT_LIST_HEAD (&priv->scan_list);
drivers/net/wireless/mac80211_hwsim.c +3 -3
@@ -2919,9 +2919,9 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,wiphy_ext_feature_set (hw->wiphy,NL80211_EXT_FEATURE_CQM_RSSI_LIST ); -tasklet_hrtimer_init (&data->beacon_timer, - mac80211_hwsim_beacon, -CLOCK_MONOTONIC ,HRTIMER_MODE_ABS ); +tasklet_hrtimer_init (&data->beacon_timer, mac80211_hwsim_beacon, +CLOCK_MONOTONIC , +HRTIMER_MODE_ABS |HRTIMER_MODE_USER_DATA ); err =ieee80211_register_hw (hw);if (err <0 ) {
drivers/net/wireless/marvell/mwl8k.c +4 -2
@@ -6112,9 +6112,11 @@ static int mwl8k_firmware_load_success(struct mwl8k_priv *priv)INIT_WORK (&priv->fw_reload, mwl8k_hw_restart_work);/* TX reclaim and RX tasklets. */ -tasklet_init (&priv->poll_tx_task, mwl8k_tx_poll, (unsigned long )hw); +tasklet_init_flags (&priv->poll_tx_task, mwl8k_tx_poll, + (unsigned long )hw,TASKLET_USER_DATA );tasklet_disable (&priv->poll_tx_task); -tasklet_init (&priv->poll_rx_task, mwl8k_rx_poll, (unsigned long )hw); +tasklet_init_flags (&priv->poll_rx_task, mwl8k_rx_poll, + (unsigned long )hw,TASKLET_USER_DATA );tasklet_disable (&priv->poll_rx_task);/* Power management cookie */
drivers/net/wireless/realtek/rtlwifi/pci.c +6 -6
@@ -1213,12 +1213,12 @@ static void _rtl_pci_init_struct(struct ieee80211_hw *hw, rtlpci->acm_method =EACMWAY2_SW ;/*task */ -tasklet_init (&rtlpriv->works.irq_tasklet, - (void (*)(unsigned long ))_rtl_pci_irq_tasklet, - (unsigned long )hw); -tasklet_init (&rtlpriv->works.irq_prepare_bcn_tasklet, - (void (*)(unsigned long ))_rtl_pci_prepare_bcn_tasklet, - (unsigned long )hw); +tasklet_init_flags (&rtlpriv->works.irq_tasklet, + (void (*)(unsigned long ))_rtl_pci_irq_tasklet, + (unsigned long )hw,TASKLET_USER_DATA ); +tasklet_init_flags (&rtlpriv->works.irq_prepare_bcn_tasklet, + (void (*)(unsigned long ))_rtl_pci_prepare_bcn_tasklet, + (unsigned long )hw,TASKLET_USER_DATA );INIT_WORK (&rtlpriv->works.lps_change_work, rtl_lps_change_work_callback); }
drivers/scsi/aic94xx/aic94xx_hwi.c +2 -2
@@ -279,8 +279,8 @@ static int asd_init_dl(struct asd_ha_struct *asd_ha) asd_ha->seq.dl = asd_ha->seq.actual_dl->vaddr; asd_ha->seq.dl_toggle =ASD_DEF_DL_TOGGLE ; asd_ha->seq.dl_next =0 ; -tasklet_init (&asd_ha->seq.dl_tasklet, asd_dl_tasklet_handler, - (unsigned long ) asd_ha); +tasklet_init_flags (&asd_ha->seq.dl_tasklet, asd_dl_tasklet_handler, + (unsigned long )asd_ha,TASKLET_USER_DATA );return 0 ; }
drivers/staging/ks7010/ks_hostif.c +2 -1
@@ -2194,7 +2194,8 @@ static inline void hostif_sme_init(struct ks_wlan_private *priv) priv->sme_i.qtail =0 ;spin_lock_init (&priv->sme_i.sme_spin); priv->sme_i.sme_flag =0 ; -tasklet_init (&priv->sme_task, hostif_sme_task, (unsigned long )priv); +tasklet_init_flags (&priv->sme_task, hostif_sme_task, + (unsigned long )priv,TASKLET_USER_DATA ); }static inline void hostif_wpa_init (struct ks_wlan_private *priv)
drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +3 -3
@@ -22,9 +22,9 @@ int rtw_hal_init_recv_priv(struct adapter *padapter)int i, res = _SUCCESS;struct recv_buf *precvbuf; -tasklet_init (&precvpriv->recv_tasklet, - (void (*)(unsigned long ))rtl8188eu_recv_tasklet, - (unsigned long )padapter); +tasklet_init_flags (&precvpriv->recv_tasklet, + (void (*)(unsigned long ))rtl8188eu_recv_tasklet, + (unsigned long )padapter,TASKLET_USER_DATA );/* init recv_buf */ _rtw_init_queue (&precvpriv->free_recv_buf_queue);
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c +3 -3
@@ -17,9 +17,9 @@ s32 rtw_hal_init_xmit_priv(struct adapter *adapt) {struct xmit_priv *pxmitpriv = &adapt->xmitpriv; -tasklet_init (&pxmitpriv->xmit_tasklet, - (void (*)(unsigned long ))rtl8188eu_xmit_tasklet, - (unsigned long )adapt); +tasklet_init_flags (&pxmitpriv->xmit_tasklet, + (void (*)(unsigned long ))rtl8188eu_xmit_tasklet, + (unsigned long )adapt,TASKLET_USER_DATA );return _SUCCESS; }
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +9 -9
@@ -1018,15 +1018,15 @@ static void _rtl92e_init_priv_task(struct net_device *dev) (void *)rtl92e_hw_wakeup_wq, dev);INIT_DELAYED_WORK_RSL (&priv->rtllib->hw_sleep_wq, (void *)rtl92e_hw_sleep_wq, dev); -tasklet_init (&priv->irq_rx_tasklet, - (void (*)(unsigned long ))_rtl92e_irq_rx_tasklet, - (unsigned long )priv); -tasklet_init (&priv->irq_tx_tasklet, - (void (*)(unsigned long ))_rtl92e_irq_tx_tasklet, - (unsigned long )priv); -tasklet_init (&priv->irq_prepare_beacon_tasklet, - (void (*)(unsigned long ))_rtl92e_prepare_beacon, - (unsigned long )priv); +tasklet_init_flags (&priv->irq_rx_tasklet, + (void (*)(unsigned long ))_rtl92e_irq_rx_tasklet, + (unsigned long )priv,TASKLET_USER_DATA ); +tasklet_init_flags (&priv->irq_tx_tasklet, + (void (*)(unsigned long ))_rtl92e_irq_tx_tasklet, + (unsigned long )priv,TASKLET_USER_DATA ); +tasklet_init_flags (&priv->irq_prepare_beacon_tasklet, + (void (*)(unsigned long ))_rtl92e_prepare_beacon, + (unsigned long )priv,TASKLET_USER_DATA ); }static short _rtl92e_get_channel_map (struct net_device *dev)
drivers/staging/rtl8192e/rtllib_softmac.c +3 -3
@@ -3040,9 +3040,9 @@ void rtllib_softmac_init(struct rtllib_device *ieee)spin_lock_init (&ieee->mgmt_tx_lock);spin_lock_init (&ieee->beacon_lock); -tasklet_init (&ieee->ps_task, - (void (*)(unsigned long )) rtllib_sta_ps, - (unsigned long )ieee); +tasklet_init_flags (&ieee->ps_task, + (void (*)(unsigned long ))rtllib_sta_ps, + (unsigned long )ieee,TASKLET_USER_DATA ); }
drivers/staging/rtl8712/rtl8712_recv.c +3 -3
@@ -66,9 +66,9 @@ int r8712_init_recv_priv(struct recv_priv *precvpriv, struct _adapter *padapter) precvbuf++; } precvpriv->free_recv_buf_queue_cnt =NR_RECVBUFF ; -tasklet_init (&precvpriv->recv_tasklet, - (void (*)(unsigned long ))recv_tasklet, - (unsigned long )padapter); +tasklet_init_flags (&precvpriv->recv_tasklet, + (void (*)(unsigned long ))recv_tasklet, + (unsigned long )padapter,TASKLET_USER_DATA );skb_queue_head_init (&precvpriv->rx_skb_queue);skb_queue_head_init (&precvpriv->free_recv_skb_queue);
drivers/staging/rtl8712/rtl871x_xmit.c +3 -3
@@ -142,9 +142,9 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,INIT_WORK (&padapter->wkFilterRxFF0, r8712_SetFilter);alloc_hwxmits (padapter);init_hwxmits (pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry); -tasklet_init (&pxmitpriv->xmit_tasklet, - (void (*)(unsigned long ))r8712_xmit_bh, - (unsigned long )padapter); +tasklet_init_flags (&pxmitpriv->xmit_tasklet, + (void (*)(unsigned long ))r8712_xmit_bh, + (unsigned long )padapter,TASKLET_USER_DATA );return _SUCCESS; }
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c +3 -5
@@ -468,11 +468,9 @@ s32 rtl8723bs_init_recv_priv(struct adapter *padapter) goto initbuferror;/* 3 2. init tasklet */ -tasklet_init ( - &precvpriv->recv_tasklet, - (void (*)(unsigned long ))rtl8723bs_recv_tasklet, - (unsigned long )padapter - ); +tasklet_init_flags (&precvpriv->recv_tasklet, + (void (*)(unsigned long ))rtl8723bs_recv_tasklet, + (unsigned long )padapter,TASKLET_USER_DATA ); goto exit;
drivers/tty/ipwireless/hardware.c +2 -1
@@ -1633,7 +1633,8 @@ struct ipw_hardware *ipwireless_hardware_create(void)INIT_LIST_HEAD (&hw->rx_queue);INIT_LIST_HEAD (&hw->rx_pool);spin_lock_init (&hw->lock); -tasklet_init (&hw->tasklet, ipwireless_do_tasklet, (unsigned long ) hw); +tasklet_init_flags (&hw->tasklet, ipwireless_do_tasklet, + (unsigned long )hw,TASKLET_USER_DATA );INIT_WORK (&hw->work_rx, ipw_receive_data_work);timer_setup (&hw->setup_timer, ipwireless_setup_timer,0 );
drivers/tty/serial/ifx6x60.c +2 -2
@@ -1067,8 +1067,8 @@ static int ifx_spi_spi_probe(struct spi_device *spi)init_waitqueue_head (&ifx_dev->mdm_reset_wait);spi_set_drvdata (spi, ifx_dev); -tasklet_init (&ifx_dev->io_work_tasklet, ifx_spi_io, - (unsigned long )ifx_dev); +tasklet_init_flags (&ifx_dev->io_work_tasklet, ifx_spi_io, + (unsigned long )ifx_dev,TASKLET_USER_DATA );set_bit (IFX_SPI_STATE_PRESENT , &ifx_dev->flags);
drivers/usb/atm/usbatm.c +4 -2
@@ -1069,8 +1069,10 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,usbatm_init_channel (&instance->rx_channel);usbatm_init_channel (&instance->tx_channel); -tasklet_init (&instance->rx_channel.tasklet, usbatm_rx_process, (unsigned long )instance); -tasklet_init (&instance->tx_channel.tasklet, usbatm_tx_process, (unsigned long )instance); +tasklet_init_flags (&instance->rx_channel.tasklet, usbatm_rx_process, + (unsigned long )instance,TASKLET_USER_DATA ); +tasklet_init_flags (&instance->tx_channel.tasklet, usbatm_tx_process, + (unsigned long )instance,TASKLET_USER_DATA ); instance->rx_channel.stride =ATM_CELL_SIZE + driver->rx_padding; instance->tx_channel.stride =ATM_CELL_SIZE + driver->tx_padding; instance->rx_channel.usbatm = instance->tx_channel.usbatm = instance;
drivers/usb/gadget/function/f_midi.c +2 -1
@@ -875,7 +875,8 @@ static int f_midi_bind(struct usb_configuration *c, struct usb_function *f)int status, n, jack =1 , i =0 , endpoint_descriptor_index =0 ; midi->gadget = cdev->gadget; -tasklet_init (&midi->tasklet, f_midi_in_tasklet, (unsigned long ) midi); +tasklet_init_flags (&midi->tasklet, f_midi_in_tasklet, + (unsigned long )midi,TASKLET_USER_DATA ); status =f_midi_register_card (midi);if (status <0 ) goto fail_register;
drivers/usb/serial/mos7720.c +2 -2
@@ -716,8 +716,8 @@ static int mos7715_parport_init(struct usb_serial *serial)INIT_LIST_HEAD (&mos_parport->deferred_urbs);usb_set_serial_data (serial, mos_parport);/* hijack private pointer */ mos_parport->serial = serial; -tasklet_init (&mos_parport->urb_tasklet, send_deferred_urbs, - (unsigned long ) mos_parport); +tasklet_init_flags (&mos_parport->urb_tasklet, send_deferred_urbs, + (unsigned long )mos_parport,TASKLET_USER_DATA );init_completion (&mos_parport->syncmsg_compl);/* cycle parallel port reset bit */
net/atm/pppoatm.c +1 -1
@@ -398,7 +398,7 @@ static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, void __user *arg)* Each PPPoATM instance has its own tasklet - this is just a * prototypical one used to initialize them */ - static const DECLARE_TASKLET(tasklet_proto, pppoatm_wakeup_sender, 0); + static const DECLARE_TASKLET_USERDATA(tasklet_proto, pppoatm_wakeup_sender, 0);if (copy_from_user (&be, arg,sizeof be))return -EFAULT ; if (be.encaps != PPPOATM_ENCAPS_AUTODETECT &&
net/mac80211/main.c +7 -7
@@ -694,16 +694,16 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,skb_queue_head_init (&local->pending[i]);atomic_set (&local->agg_queue_stop[i],0 ); } -tasklet_init (&local->tx_pending_tasklet, ieee80211_tx_pending, - (unsigned long )local); +tasklet_init_flags (&local->tx_pending_tasklet, ieee80211_tx_pending, + (unsigned long )local,TASKLET_USER_DATA );if (ops->wake_tx_queue) -tasklet_init (&local->wake_txqs_tasklet, ieee80211_wake_txqs, - (unsigned long )local); +tasklet_init_flags (&local->wake_txqs_tasklet, + ieee80211_wake_txqs, (unsigned long )local, +TASKLET_USER_DATA ); -tasklet_init (&local->tasklet, - ieee80211_tasklet_handler, - (unsigned long ) local); +tasklet_init_flags (&local->tasklet, ieee80211_tasklet_handler, + (unsigned long )local,TASKLET_USER_DATA );skb_queue_head_init (&local->skb_queue);skb_queue_head_init (&local->skb_queue_unreliable);
net/rds/ib_cm.c +4 -4
@@ -1118,10 +1118,10 @@ int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp) }INIT_LIST_HEAD (&ic->ib_node); -tasklet_init (&ic->i_send_tasklet, rds_ib_tasklet_fn_send, - (unsigned long )ic); -tasklet_init (&ic->i_recv_tasklet, rds_ib_tasklet_fn_recv, - (unsigned long )ic); +tasklet_init_flags (&ic->i_send_tasklet, rds_ib_tasklet_fn_send, + (unsigned long )ic,TASKLET_USER_DATA ); +tasklet_init_flags (&ic->i_recv_tasklet, rds_ib_tasklet_fn_recv, + (unsigned long )ic,TASKLET_USER_DATA );mutex_init (&ic->i_recv_mutex);#ifndef KERNEL_HAS_ATOMIC64 spin_lock_init (&ic->i_ack_lock);
net/xfrm/xfrm_state.c +2 -1
@@ -581,7 +581,8 @@ struct xfrm_state *xfrm_state_alloc(struct net *net)INIT_HLIST_NODE (&x->bysrc);INIT_HLIST_NODE (&x->byspi);tasklet_hrtimer_init (&x->mtimer, xfrm_timer_handler, -CLOCK_BOOTTIME ,HRTIMER_MODE_ABS ); +CLOCK_BOOTTIME , +HRTIMER_MODE_ABS |HRTIMER_MODE_USER_DATA );timer_setup (&x->rtimer, xfrm_replay_timer_handler,0 ); x->curlft.add_time =ktime_get_real_seconds (); x->lft.soft_byte_limit =XFRM_INF ;
sound/core/timer.c +2 -2
@@ -909,8 +909,8 @@ int snd_timer_new(struct snd_card *card, char *id, struct snd_timer_id *tid,INIT_LIST_HEAD (&timer->ack_list_head);INIT_LIST_HEAD (&timer->sack_list_head);spin_lock_init (&timer->lock); -tasklet_init (&timer->task_queue, snd_timer_tasklet, - (unsigned long )timer); +tasklet_init_flags (&timer->task_queue, snd_timer_tasklet, + (unsigned long )timer,TASKLET_USER_DATA ); timer->max_instances =1000 ;/* default limit per timer */ if (card !=NULL ) { timer->module = card->module;
sound/pci/asihpi/asihpi.c +2 -2
@@ -2912,8 +2912,8 @@ static int snd_asihpi_probe(struct pci_dev *pci_dev,if (hpi->interrupt_mode) { asihpi->pcm_start = snd_card_asihpi_pcm_int_start; asihpi->pcm_stop = snd_card_asihpi_pcm_int_stop; -tasklet_init (&asihpi->t, snd_card_asihpi_int_task, - (unsigned long )hpi); +tasklet_init_flags (&asihpi->t, snd_card_asihpi_int_task, + (unsigned long )hpi,TASKLET_USER_DATA ); hpi->interrupt_callback = snd_card_asihpi_isr; }else { asihpi->pcm_start = snd_card_asihpi_pcm_timer_start;
sound/pci/rme9652/hdsp.c +2 -1
@@ -5204,7 +5204,8 @@ static int snd_hdsp_create(struct snd_card *card,spin_lock_init (&hdsp->lock); -tasklet_init (&hdsp->midi_tasklet, hdsp_midi_tasklet, (unsigned long )hdsp); +tasklet_init_flags (&hdsp->midi_tasklet, hdsp_midi_tasklet, + (unsigned long )hdsp,TASKLET_USER_DATA );pci_read_config_word (hdsp->pci,PCI_CLASS_REVISION , &hdsp->firmware_rev); hdsp->firmware_rev &=0xff ;
sound/pci/rme9652/hdspm.c +2 -2
@@ -6856,8 +6856,8 @@ static int snd_hdspm_create(struct snd_card *card, } -tasklet_init (&hdspm->midi_tasklet, - hdspm_midi_tasklet, (unsigned long ) hdspm); +tasklet_init_flags (&hdspm->midi_tasklet, hdspm_midi_tasklet, + (unsigned long )hdspm,TASKLET_USER_DATA );if (hdspm->io_type != MADIface) {
sound/usb/midi.c +2 -1
@@ -1441,7 +1441,8 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi *umidi, }spin_lock_init (&ep->buffer_lock); -tasklet_init (&ep->tasklet, snd_usbmidi_out_tasklet, (unsigned long )ep); +tasklet_init_flags (&ep->tasklet, snd_usbmidi_out_tasklet, + (unsigned long )ep,TASKLET_USER_DATA );init_waitqueue_head (&ep->drain_wait);for (i =0 ; i <0x10 ; ++i)
sound/usb/misc/ua101.c +2 -2
@@ -1247,8 +1247,8 @@ static int ua101_probe(struct usb_interface *interface,spin_lock_init (&ua->lock);mutex_init (&ua->mutex);INIT_LIST_HEAD (&ua->ready_playback_urbs); -tasklet_init (&ua->playback_tasklet, - playback_tasklet, (unsigned long )ua); +tasklet_init_flags (&ua->playback_tasklet, playback_tasklet, + (unsigned long )ua,TASKLET_USER_DATA );init_waitqueue_head (&ua->alsa_capture_wait);init_waitqueue_head (&ua->rate_feedback_wait);init_waitqueue_head (&ua->alsa_playback_wait);
Signature · 1 line
2.17.2
PATCH v6 7/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: x86/speculation/mds: Export MD_CLEAR CPUID to KVM
guests.
Export the MD_CLEAR CPUID set by new microcode to signal that VERW implements the clear cpu side effect to KVM guests.
Also requires corresponding qemu patches
--- arch/x86/kvm/cpuid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kvm/cpuid.c +2 -1
@@ -409,7 +409,8 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,/* cpuid 7.0.edx*/ const u32 kvm_cpuid_7_0_edx_x86_features =F (AVX512_4VNNIW ) |F (AVX512_4FMAPS ) |F (SPEC_CTRL ) | -F (SPEC_CTRL_SSBD ) |F (ARCH_CAPABILITIES ) |F (INTEL_STIBP ); +F (SPEC_CTRL_SSBD ) |F (ARCH_CAPABILITIES ) |F (INTEL_STIBP ) | +F (MD_CLEAR );/* all calls to cpuid_count() should be made on the same cpu */ get_cpu ();
Signature · 1 line
2.17.2
PATCH v6 35/43 MDSv6
In reply to Andi KleenOld style IDE drivers sometimes do PIO, and are really slow anyways, so default them all the clear the CPU.
--- drivers/ide/ide-probe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/ide/ide-probe.c +2 -1
@@ -881,7 +881,8 @@ static int init_irq (ide_hwif_t *hwif) irq_handler = ide_intr;if (!host->get_lock) -if (request_irq (hwif->irq, irq_handler, sa, hwif->name, hwif)) +if (request_irq (hwif->irq, irq_handler, sa |IRQF_USER_DATA , + hwif->name, hwif)) goto out_up;#if !defined(__mc68000__)
Signature · 1 line
2.17.2
PATCH v6 19/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: mds: Support cpu clear after tasklets
tasklets run asynchronously to user processes.
Most tasklets don't touch user data, but some do. Add a per tasklet flag to request CPU clearing after the tasklet executes.
Later patches will use this to mark tasklets that need it.
--- include/linux/interrupt.h | 16 +++++++++++++++- kernel/softirq.c | 25 +++++++++++++++++++------ 2 files changed, 34 insertions(+), 7 deletions(-)
include/linux/interrupt.h +15 -1
@@ -572,11 +572,22 @@ struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(0), func, data }#define DECLARE_TASKLET_DISABLED (name, func, data) \ struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data } +#define DECLARE_TASKLET_USERDATA (name, func, data) \ +struct tasklet_struct name = { NULL, TASKLET_USER_DATA, ATOMIC_INIT(0), func, data } + +#define DECLARE_TASKLET_USERDATA_DISABLED (name, func, data) \ +struct tasklet_struct name = { NULL, TASKLET_USER_DATA, ATOMIC_INIT(1), func, data }enum {TASKLET_STATE_SCHED ,/* Tasklet is scheduled for execution */ -TASKLET_STATE_RUN /* Tasklet is running (SMP only) */ +TASKLET_STATE_RUN ,/* Tasklet is running (SMP only) */ + +/* +* Set this flag when the tasklet is known to touch user data, +* so needs extra CPU state clearing. +*/ +TASKLET_USER_DATA =1 <<5 , };#ifdef CONFIG_SMP
@@ -640,6 +651,9 @@ extern void tasklet_kill(struct tasklet_struct *t);extern void tasklet_kill_immediate (struct tasklet_struct *t,unsigned int cpu);extern void tasklet_init (struct tasklet_struct *t,void (*func)(unsigned long ),unsigned long data); +extern void tasklet_init_flags (struct tasklet_struct *t, +void (*func)(unsigned long ),unsigned long data, +unsigned flags);struct tasklet_hrtimer {struct hrtimer timer;
kernel/softirq.c +19 -6
@@ -26,6 +26,7 @@#include <linux/smpboot.h> #include <linux/tick.h> #include <linux/irq.h> +#include <linux/clearcpu.h> #define CREATE_TRACE_POINTS #include <trace/events/irq.h>
@@ -522,6 +523,8 @@ static void tasklet_action_common(struct softirq_action *a,BUG (); t->func (t->data);tasklet_unlock (t); +if (t->state &TASKLET_USER_DATA ) +lazy_clear_cpu ();continue ; }tasklet_unlock (t);
@@ -546,15 +549,23 @@ static __latent_entropy void tasklet_hi_action(struct softirq_action *a)tasklet_action_common (a,this_cpu_ptr (&tasklet_hi_vec),HI_SOFTIRQ ); } -void tasklet_init (struct tasklet_struct *t, -void (*func)(unsigned long ),unsigned long data) +void tasklet_init_flags (struct tasklet_struct *t, +void (*func)(unsigned long ),unsigned long data, +unsigned flags) { t->next =NULL ; - t->state =0 ; + t->state = flags;atomic_set (&t->count,0 ); t->func = func; t->data = data; } +EXPORT_SYMBOL (tasklet_init_flags); + +void tasklet_init (struct tasklet_struct *t, +void (*func)(unsigned long ),unsigned long data) +{ +tasklet_init_flags (t, func, data,0 ); +}EXPORT_SYMBOL (tasklet_init);void tasklet_kill (struct tasklet_struct *t)
@@ -609,7 +620,8 @@ static void __tasklet_hrtimer_trampoline(unsigned long data)* @ttimer: tasklet_hrtimer which is initialized * @function: hrtimer callback function which gets called from softirq context * @which_clock: clock id (CLOCK_MONOTONIC/CLOCK_REALTIME) -* @mode: hrtimer mode (HRTIMER_MODE_ABS/HRTIMER_MODE_REL) +* @mode: hrtimer mode (HRTIMER_MODE_ABS/HRTIMER_MODE_REL), +* HRTIMER_MODE_NO_USER */ void tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer, enum hrtimer_restart (*function)(struct hrtimer *),
@@ -617,8 +629,9 @@ void tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer, {hrtimer_init (&ttimer->timer, which_clock, mode); ttimer->timer.function = __hrtimer_tasklet_trampoline; -tasklet_init (&ttimer->tasklet, __tasklet_hrtimer_trampoline, - (unsigned long )ttimer); +tasklet_init_flags (&ttimer->tasklet, __tasklet_hrtimer_trampoline, + (unsigned long )ttimer, + (mode &HRTIMER_MODE_USER_DATA ) ?TASKLET_USER_DATA :0 ); ttimer->function = function; }EXPORT_SYMBOL_GPL (tasklet_hrtimer_init);
Signature · 1 line
2.17.2
PATCH v6 5/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: x86/speculation/mds: Add sysfs reporting
Report mds mitigation state in sysfs vulnerabilities.
--- .../ABI/testing/sysfs-devices-system-cpu | 1 + arch/x86/kernel/cpu/bugs.c | 24 +++++++++++++++++++ drivers/base/cpu.c | 8 +++++++ 3 files changed, 33 insertions(+)
Documentation/ABI/testing/sysfs-devices-system-cpu +1 -0
@@ -484,6 +484,7 @@ What: /sys/devices/system/cpu/vulnerabilities /sys/devices/system/cpu/vulnerabilities/spectre_v2 /sys/devices/system/cpu/vulnerabilities/spec_store_bypass /sys/devices/system/cpu/vulnerabilities/l1tf + /sys/devices/system/cpu/vulnerabilities/mds Date: January 2018 Contact: Linux kernel mailing list <[email protected]> Description: Information about CPU vulnerabilities
arch/x86/kernel/cpu/bugs.c +24 -0
@@ -1192,6 +1192,24 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attrif (boot_cpu_has (X86_FEATURE_L1TF_PTEINV ))return l1tf_show_state (buf);break ; + +case X86_BUG_MDS : +if (boot_cpu_has (X86_FEATURE_VERW ) && +boot_cpu_has (X86_FEATURE_MD_CLEAR )) { +if (cpu_smt_control !=CPU_SMT_ENABLED ) { +/* +* Avoid lying when a hypervisor didn't export +* the SMT state. +*/ +if (boot_cpu_has (X86_FEATURE_HYPERVISOR )) +return sprintf (buf, +"Mitigation: microcode, SMT potentially vulnerable\n" ); +return sprintf (buf,"Mitigation: microcode\n" ); + } +return sprintf (buf,"Mitigation: microcode, SMT vulnerable\n" ); + } +return sprintf (buf,"Vulnerable\n" ); +default :break ; }
@@ -1223,4 +1241,10 @@ ssize_t cpu_show_l1tf(struct device *dev, struct device_attribute *attr, char *b {return cpu_show_common (dev, attr, buf,X86_BUG_L1TF ); } + +ssize_t cpu_show_mds (struct device *dev,struct device_attribute *attr,char *buf) +{ +return cpu_show_common (dev, attr, buf,X86_BUG_MDS ); +} +#endif
drivers/base/cpu.c +8 -0
@@ -546,11 +546,18 @@ ssize_t __weak cpu_show_l1tf(struct device *dev,return sprintf (buf,"Not affected\n" ); } +ssize_t __weak cpu_show_mds (struct device *dev, +struct device_attribute *attr,char *buf) +{ +return sprintf (buf,"Not affected\n" ); +} + static DEVICE_ATTR(meltdown, 0444, cpu_show_meltdown, NULL); static DEVICE_ATTR(spectre_v1, 0444, cpu_show_spectre_v1, NULL); static DEVICE_ATTR(spectre_v2, 0444, cpu_show_spectre_v2, NULL); static DEVICE_ATTR(spec_store_bypass, 0444, cpu_show_spec_store_bypass, NULL); static DEVICE_ATTR(l1tf, 0444, cpu_show_l1tf, NULL); +static DEVICE_ATTR(mds, 0444, cpu_show_mds, NULL);static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_meltdown.attr,
@@ -558,6 +565,7 @@ static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_spectre_v2.attr, &dev_attr_spec_store_bypass.attr, &dev_attr_l1tf.attr, + &dev_attr_mds.attr, NULL };
Signature · 1 line
2.17.2
PATCH v6 23/43 MDSv6
In reply to Andi KleenInstrument some strategic skbuff functions that either touch packet data directly, or are likely followed by a user data touch like a memcpy, to schedule a cpu clear on next kernel exit. This is only done inside interrupts, outside we assume it only touches the current processes' data.
In principle network data should be encrypted anyways, but it's better to not leak it.
This provides protection for the network softirq.
Needs more auditing.
--- include/linux/skbuff.h | 2 ++ net/core/skbuff.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+)
include/linux/skbuff.h +2 -0
@@ -40,6 +40,7 @@#include <linux/in6.h> #include <linux/if_packet.h> #include <net/flow.h> +#include <linux/clearcpu.h> /* The interface for checksum offload between the stack and networking drivers * is as follows...
@@ -2093,6 +2094,7 @@ static inline void *__skb_put(struct sk_buff *skb, unsigned int len)SKB_LINEAR_ASSERT (skb); skb->tail += len; skb->len += len; +lazy_clear_cpu_interrupt ();return tmp; }
net/core/skbuff.c +32 -0
@@ -63,6 +63,7 @@#include <linux/errqueue.h> #include <linux/prefetch.h> #include <linux/if_vlan.h> +#include <linux/clearcpu.h> #include <net/protocol.h> #include <net/dst.h>
@@ -1189,6 +1190,9 @@ int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask)if (!num_frags) goto release; +/* Likely to copy user data */ +lazy_clear_cpu_interrupt (); + new_frags = (__skb_pagelen (skb) +PAGE_SIZE -1 ) >>PAGE_SHIFT ;for (i =0 ; i < new_frags; i++) { page =alloc_page (gfp_mask);
@@ -1353,6 +1357,9 @@ struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t gfp_mask)if (!n)return NULL ; +/* Copies user data */ +lazy_clear_cpu_interrupt (); +/* Set the data pointer */ skb_reserve (n, headerlen);/* Set the tail pointer and length */
@@ -1460,6 +1467,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, size =SKB_DATA_ALIGN (size); +lazy_clear_cpu_interrupt ();if (skb_pfmemalloc (skb)) gfp_mask |= __GFP_MEMALLOC; data = kmalloc_reserve(size + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)),
@@ -1524,6 +1532,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,if (!skb->sk || skb->destructor == sock_edemux) skb->truesize += size - osize; +return 0 ; nofrags:
@@ -1588,6 +1597,9 @@ struct sk_buff *skb_copy_expand(const struct sk_buff *skb,if (!n)return NULL ; +/* May copy user data */ +lazy_clear_cpu_interrupt (); +skb_reserve (n, newheadroom);/* Set the tail pointer and length */
@@ -1676,6 +1688,8 @@ EXPORT_SYMBOL(__skb_pad);void *pskb_put (struct sk_buff *skb,struct sk_buff *tail,int len) { +/* Likely to be followed by a user data copy */ +lazy_clear_cpu_interrupt ();if (tail != skb) { skb->data_len += len; skb->len += len;
@@ -1701,6 +1715,8 @@ void *skb_put(struct sk_buff *skb, unsigned int len) skb->len += len;if (unlikely (skb->tail > skb->end))skb_over_panic (skb, len,__builtin_return_address (0 )); +/* Likely to be followed by a user data copy */ +lazy_clear_cpu_interrupt ();return tmp; }EXPORT_SYMBOL (skb_put);
@@ -1720,6 +1736,7 @@ void *skb_push(struct sk_buff *skb, unsigned int len) skb->len += len;if (unlikely (skb->data < skb->head))skb_under_panic (skb, len,__builtin_return_address (0 )); +/* No clear cpu, assume this is only header data */ return skb->data; }EXPORT_SYMBOL (skb_push);
@@ -2026,6 +2043,9 @@ int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len)struct sk_buff *frag_iter;int i, copy; +/* Copies user data */ +lazy_clear_cpu_interrupt (); +if (offset > (int )skb->len - len) goto fault;
@@ -2113,6 +2133,8 @@ static struct page *linear_to_page(struct page *page, unsigned int *len, {struct page_frag *pfrag =sk_page_frag (sk); +lazy_clear_cpu_interrupt (); +if (!sk_page_frag_refill (sk, pfrag))return NULL ;
@@ -2387,6 +2409,9 @@ int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len)struct sk_buff *frag_iter;int i, copy; +/* Copies user data */ +lazy_clear_cpu_interrupt (); +if (offset > (int )skb->len - len) goto fault;
@@ -2467,6 +2492,9 @@ __wsum __skb_checksum(const struct sk_buff *skb, int offset, int len,struct sk_buff *frag_iter;int pos =0 ; +/* Reads packet data */ +lazy_clear_cpu_interrupt (); +/* Checksum header. */ if (copy >0 ) {if (copy > len)
@@ -2559,6 +2587,9 @@ __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset,struct sk_buff *frag_iter;int pos =0 ; +/* Reads packet data */ +lazy_clear_cpu_interrupt (); +/* Copy header. */ if (copy >0 ) {if (copy > len)
@@ -3445,6 +3476,7 @@ void *skb_pull_rcsum(struct sk_buff *skb, unsigned int len)BUG_ON (len > skb->len);__skb_pull (skb, len);skb_postpull_rcsum (skb, data, len); +lazy_clear_cpu_interrupt ();return skb->data; }EXPORT_SYMBOL_GPL (skb_pull_rcsum);
Signature · 1 line
2.17.2
PATCH v6 27/43 MDSv6
In reply to Andi KleenAdd lazy_clear_cpu_interrupt() in sound core functions that are generally associated with touching user data in interrupt handlers. We consider all actual sound data as user data.
--- sound/core/pcm_lib.c | 3 +++ sound/core/rawmidi.c | 3 +++ sound/core/timer.c | 3 +++ 3 files changed, 9 insertions(+)
sound/core/pcm_lib.c +3 -0
@@ -25,6 +25,7 @@#include <linux/time.h> #include <linux/math64.h> #include <linux/export.h> +#include <linux/clearcpu.h> #include <sound/core.h> #include <sound/control.h> #include <sound/tlv.h>
@@ -1801,6 +1802,8 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)return ; runtime = substream->runtime; +lazy_clear_cpu (); +snd_pcm_stream_lock_irqsave (substream, flags);if (!snd_pcm_running (substream) ||snd_pcm_update_hw_ptr0 (substream,1 ) <0 )
sound/core/rawmidi.c +3 -0
@@ -30,6 +30,7 @@#include <linux/module.h> #include <linux/delay.h> #include <linux/mm.h> +#include <linux/clearcpu.h> #include <sound/rawmidi.h> #include <sound/info.h> #include <sound/control.h>
@@ -946,6 +947,7 @@ int snd_rawmidi_receive(struct snd_rawmidi_substream *substream,wake_up (&runtime->sleep); }spin_unlock_irqrestore (&runtime->lock, flags); +lazy_clear_cpu ();return result; }EXPORT_SYMBOL (snd_rawmidi_receive);
@@ -1232,6 +1234,7 @@ int snd_rawmidi_transmit(struct snd_rawmidi_substream *substream, result =__snd_rawmidi_transmit_ack (substream, count); }spin_unlock_irqrestore (&runtime->lock, flags); +lazy_clear_cpu ();return result; }EXPORT_SYMBOL (snd_rawmidi_transmit);
sound/core/timer.c +3 -0
@@ -27,6 +27,7 @@#include <linux/device.h> #include <linux/module.h> #include <linux/string.h> +#include <linux/clearcpu.h> #include <linux/sched/signal.h> #include <sound/core.h> #include <sound/timer.h>
@@ -863,6 +864,8 @@ void snd_timer_interrupt(struct snd_timer * timer, unsigned long ticks_left)if (use_tasklet)tasklet_schedule (&timer->task_queue); + +lazy_clear_cpu (); }EXPORT_SYMBOL (snd_timer_interrupt);
Signature · 1 line
2.17.2
PATCH v6 29/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: mds sweep: Clear cpu on processing input layer data
Schedule a clear cpu if input layer data is processed from an interrupt or timer. User key presses and mouse data is considered sensitive. We patch some strategic places in the input subsystem
to avoid touching a lot of drivers.
--- drivers/input/input.c | 3 +++ drivers/input/serio/serio.c | 3 +++ 2 files changed, 6 insertions(+)
drivers/input/input.c +3 -0
@@ -27,6 +27,7 @@#include <linux/device.h> #include <linux/mutex.h> #include <linux/rcupdate.h> +#include <linux/clearcpu.h> #include "input-compat.h" MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>" );
@@ -436,6 +437,7 @@ void input_event(struct input_dev *dev,input_handle_event (dev, type, code, value);spin_unlock_irqrestore (&dev->event_lock, flags); } +lazy_clear_cpu_interrupt (); }EXPORT_SYMBOL (input_event);
@@ -468,6 +470,7 @@ void input_inject_event(struct input_handle *handle,spin_unlock_irqrestore (&dev->event_lock, flags); } +lazy_clear_cpu_interrupt (); }EXPORT_SYMBOL (input_inject_event);
drivers/input/serio/serio.c +3 -0
@@ -32,6 +32,7 @@#include <linux/slab.h> #include <linux/workqueue.h> #include <linux/mutex.h> +#include <linux/clearcpu.h> MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>" );MODULE_DESCRIPTION ("Serio abstraction core" );
@@ -1017,6 +1018,8 @@ irqreturn_t serio_interrupt(struct serio *serio, ret =IRQ_HANDLED ; } +lazy_clear_cpu_interrupt (); +spin_unlock_irqrestore (&serio->lock, flags);return ret;
Signature · 1 line
2.17.2
PATCH v6 9/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: x86/speculation/mds: Handle VMENTRY clear for CPUs
without l1tf
Some Atom CPUs don't have L1TF, but have (parts of) MDS.
Normally we rely on the L1TF L1D clear on vm entry to avoid leaking data to the guest. But these Atom CPUs don't support the L1D clear MSR. Add special code to trigger VERW explicitly on KVM guest entry.
We use similar logic as the conditional l1d flush, which is default and currently cannot be overriden.
--- arch/x86/include/asm/cpufeatures.h | 4 ++++ arch/x86/kernel/cpu/bugs.c | 3 +++ arch/x86/kernel/cpu/common.c | 14 +++++++++++++- arch/x86/kvm/vmx/vmx.c | 20 +++++++++++++++----- 4 files changed, 35 insertions(+), 6 deletions(-)
arch/x86/include/asm/cpufeatures.h +4 -0
@@ -353,6 +353,9 @@#define X86_FEATURE_ARCH_CAPABILITIES (18*32+29)/* IA32_ARCH_CAPABILITIES MSR (Intel) */ #define X86_FEATURE_SPEC_CTRL_SSBD (18*32+31)/* "" Speculative Store Bypass Disable */ +/* Linux defined features, word 19 */ +#define X86_FEATURE_MDS_VMENTRY_FLUSH (19*32+0)/* MDS needs extra flush for vmentry */ +/* * BUG word(s) */
@@ -384,5 +387,6 @@#define X86_BUG_SPEC_STORE_BYPASS X86_BUG(17)/* CPU is affected by speculative store bypass attack */ #define X86_BUG_L1TF X86_BUG(18)/* CPU is affected by L1 Terminal Fault */ #define X86_BUG_MDS X86_BUG(19)/* CPU is affected by Microarchitectural data sampling */ +#define X86_BUG_MDS_NO_L1TF X86_BUG(20)/* MDS but no L1TF L1D flush */ #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/kernel/cpu/bugs.c +3 -0
@@ -1087,6 +1087,9 @@ static void mds_select_mitigation(void)if (cmdline_find_option_bool (boot_command_line,"mds=full" ) ||cmdline_find_option_bool (boot_command_line,"mds=auto" ))setup_force_cpu_cap (X86_FEATURE_VERW ); + +if (boot_cpu_has (X86_FEATURE_VERW ) &&boot_cpu_has_bug (X86_BUG_MDS_NO_L1TF )) +setup_force_cpu_cap (X86_FEATURE_MDS_VMENTRY_FLUSH ); }#ifdef CONFIG_SYSFS
arch/x86/kernel/cpu/common.c +13 -1
@@ -1006,6 +1006,15 @@ static const __initconst struct x86_cpu_id cpu_no_mds[] = { {} }; +/* CPUs with MDS, but not L1TF, that don't have L1D flush */ +static const __initconst struct x86_cpu_id cpu_mds_no_l1d[] = { + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_ATOM_AIRMONT }, + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_ATOM_AIRMONT_MID }, + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_ATOM_SILVERMONT }, + {X86_VENDOR_INTEL ,6 ,INTEL_FAM6_ATOM_SILVERMONT_X }, + {} +}; +static void __init cpu_set_bug_bits (struct cpuinfo_x86 *c) {u64 ia32_cap =0 ;
@@ -1029,8 +1038,11 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c)if ((boot_cpu_data.x86_vendor ==X86_VENDOR_INTEL && !x86_match_cpu (cpu_no_mds)) && - !(ia32_cap &ARCH_CAP_MDS_NO )) + !(ia32_cap &ARCH_CAP_MDS_NO )) {setup_force_cpu_bug (X86_BUG_MDS ); +if (x86_match_cpu (cpu_mds_no_l1d)) +setup_force_cpu_bug (X86_BUG_MDS_NO_L1TF ); + }if (x86_match_cpu (cpu_no_meltdown))return ;
arch/x86/kvm/vmx/vmx.c +15 -5
@@ -5866,27 +5866,36 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu)static void vmx_l1d_flush (struct kvm_vcpu *vcpu) {int size =PAGE_SIZE <<L1D_CACHE_ORDER ; +bool flush_l1d = vcpu->arch.l1tf_flush_l1d; + + flush_l1d |=kvm_get_cpu_l1tf_flush_l1d (); + +/* CPUs with MDS_VMENTRY_FLUSH never use the L1D flush below. */ +if (static_cpu_has (X86_FEATURE_MDS_VMENTRY_FLUSH )) { + vcpu->arch.l1tf_flush_l1d = false; +kvm_clear_cpu_l1tf_flush_l1d (); +if (!flush_l1d && !static_key_enabled (&force_cpu_clear)) +return ; +clear_cpu (); +return ; + }/* * This code is only executed when the the flush mode is 'cond' or * 'always' */ if (static_branch_likely (&vmx_l1d_flush_cond)) { -bool flush_l1d; -/* * Clear the per-vcpu flush bit, it gets set again * either from vcpu_run() or from one of the unsafe * VMEXIT handlers. */ - flush_l1d = vcpu->arch.l1tf_flush_l1d; vcpu->arch.l1tf_flush_l1d = false;/* * Clear the per-cpu flush bit, it gets set again from * the interrupt handlers. */ - flush_l1d |=kvm_get_cpu_l1tf_flush_l1d ();kvm_clear_cpu_l1tf_flush_l1d ();if (!flush_l1d)
@@ -6369,7 +6378,8 @@ static void __vmx_vcpu_run(struct kvm_vcpu *vcpu, struct vcpu_vmx *vmx) evmcs_rsp =static_branch_unlikely (&enable_evmcs) ? (unsigned long )¤t_evmcs->host_rsp :0 ; -if (static_branch_unlikely (&vmx_l1d_should_flush)) +if (static_branch_unlikely (&vmx_l1d_should_flush) || +static_cpu_has (X86_FEATURE_MDS_VMENTRY_FLUSH ))vmx_l1d_flush (vcpu); asm(
Signature · 1 line
2.17.2
PATCH v6 20/43 MDSv6
In reply to Andi KleenTimers run asynchronously to user processes.
According to an audit most timer handlers do not touch user data, so don't need to clear. But some do.
Add flags to normal and hrtimers to request clearing.
Future patches will use these flags to mark timers that touch user data.
Note this takes one bit from the timer wheel index field away, but it seems there are less wheels available anyways, so that should be ok.
--- include/linux/hrtimer.h | 4 ++++ include/linux/timer.h | 14 +++++++++++--- kernel/time/hrtimer.c | 5 +++++ kernel/time/timer.c | 8 ++++++++ 4 files changed, 28 insertions(+), 3 deletions(-)
include/linux/hrtimer.h +4 -0
@@ -32,6 +32,7 @@ struct hrtimer_cpu_base;* when starting the timer) * HRTIMER_MODE_SOFT - Timer callback function will be executed in * soft irq context +* HRTIMER_MODE_USER_DATA - Handler does touch user data. */ enum hrtimer_mode {HRTIMER_MODE_ABS =0x00 ,
@@ -48,6 +49,7 @@ enum hrtimer_mode {HRTIMER_MODE_ABS_PINNED_SOFT =HRTIMER_MODE_ABS_PINNED |HRTIMER_MODE_SOFT ,HRTIMER_MODE_REL_PINNED_SOFT =HRTIMER_MODE_REL_PINNED |HRTIMER_MODE_SOFT , + HRTIMER_MODE_USER_DATA = 0x08, };/*
@@ -101,6 +103,7 @@ enum hrtimer_restart {* @state: state information (See bit values above) * @is_rel: Set if the timer was armed relative * @is_soft: Set if hrtimer will be expired in soft interrupt context. +* @user_data: function does touch user data. * * The hrtimer structure must be initialized by hrtimer_init() */
@@ -112,6 +115,7 @@ struct hrtimer {u8 state;u8 is_rel;u8 is_soft; +u8 user_data; };/**
include/linux/timer.h +11 -3
@@ -56,10 +56,13 @@ struct timer_list {#define TIMER_DEFERRABLE 0x00080000#define TIMER_PINNED 0x00100000#define TIMER_IRQSAFE 0x00200000 -#define TIMER_ARRAYSHIFT 22 -#define TIMER_ARRAYMASK 0xFFC00000 +#define TIMER_USER_DATA 0x00400000 +#define TIMER_ARRAYSHIFT 23 +#define TIMER_ARRAYMASK 0xFF800000 -#define TIMER_TRACE_FLAGMASK (TIMER_MIGRATING | TIMER_DEFERRABLE | TIMER_PINNED | TIMER_IRQSAFE) +#define TIMER_TRACE_FLAGMASK \ + (TIMER_MIGRATING | TIMER_DEFERRABLE | TIMER_PINNED | TIMER_IRQSAFE | \ + TIMER_USER_DATA)#define __TIMER_INITIALIZER (_function, _flags) { \ .entry = { .next = TIMER_ENTRY_STATIC }, \
@@ -73,6 +76,11 @@ struct timer_list {struct timer_list _name = \ __TIMER_INITIALIZER(_function, 0) +#define DEFINE_TIMER_USERDATA (_name, _function) \ + struct timer_list _name = \ + __TIMER_INITIALIZER(_function, TIMER_USER_DATA) + +/* * LOCKDEP and DEBUG timer interfaces. */
kernel/time/hrtimer.c +5 -0
@@ -42,6 +42,7 @@#include <linux/timer.h> #include <linux/freezer.h> #include <linux/compat.h> +#include <linux/clearcpu.h> #include <linux/uaccess.h>
@@ -1276,6 +1277,7 @@ static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id, clock_id =CLOCK_MONOTONIC ; base +=hrtimer_clockid_to_base (clock_id); + timer->user_data = !!(mode &HRTIMER_MODE_USER_DATA ); timer->is_soft = softtimer; timer->base = &cpu_base->clock_base[base];timerqueue_init (&timer->node);
@@ -1390,6 +1392,9 @@ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base,trace_hrtimer_expire_exit (timer);raw_spin_lock_irq (&cpu_base->lock); +if (timer->user_data) +lazy_clear_cpu (); +/* * Note: We clear the running state after enqueue_hrtimer and * we do not reprogram the event hardware. Happens either in
kernel/time/timer.c +8 -0
@@ -43,6 +43,7 @@#include <linux/sched/debug.h> #include <linux/slab.h> #include <linux/compat.h> +#include <linux/clearcpu.h> #include <linux/uaccess.h> #include <asm/unistd.h>
@@ -1338,6 +1339,13 @@ static void call_timer_fn(struct timer_list *timer, void (*fn)(struct timer_list*/ preempt_count_set (count); } + +/* +* The timer might have touched user data. Schedule +* a cpu clear on the next kernel exit. +*/ +if (timer->flags &TIMER_USER_DATA ) +lazy_clear_cpu (); }static void expire_timers (struct timer_base *base,struct hlist_head *head)
Signature · 1 line
2.17.2
PATCH v6 31/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: mds sweep: Clear cpu for usbmon intercepts
usbmon touches user data in interrupts that otherwise don't touch user data. Automatically schedule a clear cpu if usbmon is called from an interrupt.
--- include/linux/usb/hcd.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
include/linux/usb/hcd.h +4 -1
@@ -25,6 +25,7 @@#include <linux/rwsem.h> #include <linux/interrupt.h> #include <linux/idr.h> +#include <linux/clearcpu.h> #define MAX_TOPO_LEVEL 6
@@ -688,8 +689,10 @@ static inline void usbmon_urb_submit_error(struct usb_bus *bus, struct urb *urb,static inline void usbmon_urb_complete (struct usb_bus *bus,struct urb *urb,int status) { -if (bus->monitored) +if (bus->monitored) { (*mon_ops->urb_complete)(bus, urb, status); +lazy_clear_cpu_interrupt (); + } }int usb_mon_register (const struct usb_mon_operations *ops);
Signature · 1 line
2.17.2
PATCH v6 21/43 MDSv6
In reply to Andi KleenSchedule a clear cpu on next kernel exit for string PIO or memcpy_from/to_io calls, when they are called in interrupts.
The PIO case is likely already handled by old drivers not opting in their interrupt handlers to not clear, but let's do it just to be sure.
--- arch/x86/include/asm/io.h | 3 +++ include/asm-generic/io.h | 3 +++ 2 files changed, 6 insertions(+)
arch/x86/include/asm/io.h +3 -0
@@ -40,6 +40,7 @@#include <linux/string.h> #include <linux/compiler.h> +#include <linux/clearcpu.h> #include <asm/page.h> #include <asm/early_ioremap.h> #include <asm/pgtable_types.h>
@@ -321,6 +322,7 @@ static inline void outs##bwl(int port, const void *addr, unsigned long count) \ : "+S"(addr), "+c"(count) \ : "d"(port) : "memory"); \ } \ +lazy_clear_cpu_interrupt (); \ } \ \ static inline void ins##bwl(int port, void *addr, unsigned long count) \
@@ -337,6 +339,7 @@ static inline void ins##bwl(int port, void *addr, unsigned long count) \ : "+D"(addr), "+c"(count) \ : "d"(port) : "memory"); \ } \ +lazy_clear_cpu_interrupt (); \ }BUILDIO (b, b, char)
include/asm-generic/io.h +3 -0
@@ -14,6 +14,7 @@#include <asm/page.h> /* I/O is all done through memory accesses */ #include <linux/string.h> /* for memset() and memcpy() */ #include <linux/types.h> +#include <linux/clearcpu.h> #ifdef CONFIG_GENERIC_IOMAP #include <asm-generic/iomap.h>
@@ -1115,6 +1116,7 @@ static inline void memcpy_fromio(void *buffer, size_t size) {memcpy (buffer,__io_virt (addr), size); +lazy_clear_cpu_interrupt (); }#endif
@@ -1132,6 +1134,7 @@ static inline void memcpy_toio(volatile void __iomem *addr, const void *buffer, size_t size) {memcpy (__io_virt (addr), buffer, size); +lazy_clear_cpu_interrupt (); }#endif
Signature · 1 line
2.17.2
PATCH v6 24/43 MDSv6
In reply to Andi KleenSome block drivers do kmap_atomic to access user data in interrupts. Add lazy_clear_cpu_interrupt to kmap_atomic to avoid having to patch these drivers.
--- arch/x86/mm/highmem_32.c | 3 +++ include/linux/highmem.h | 2 ++ 2 files changed, 5 insertions(+)
arch/x86/mm/highmem_32.c +3 -0
@@ -2,6 +2,7 @@#include <linux/export.h> #include <linux/swap.h> /* for totalram_pages */ #include <linux/memblock.h> +#include <linux/clearcpu.h> void *kmap (struct page *page) {
@@ -38,6 +39,8 @@ void *kmap_atomic_prot(struct page *page, pgprot_t prot)preempt_disable ();pagefault_disable (); +lazy_clear_cpu_interrupt (); +if (!PageHighMem (page))return page_address (page);
include/linux/highmem.h +2 -0
@@ -8,6 +8,7 @@#include <linux/mm.h> #include <linux/uaccess.h> #include <linux/hardirq.h> +#include <linux/clearcpu.h> #include <asm/cacheflush.h>
@@ -92,6 +93,7 @@ static inline void *kmap_atomic(struct page *page) {preempt_disable ();pagefault_disable (); +lazy_clear_cpu_interrupt ();return page_address (page); }#define kmap_atomic_prot (page, prot) kmap_atomic(page)
Signature · 1 line
2.17.2
PATCH v6 8/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: x86/cpufeatures: Add word 20 for additional features
We're running out of bits for Linux CPU features, so add a features word 20 for new features. Used in later patches.
--- arch/x86/include/asm/cpufeature.h | 6 ++++-- arch/x86/include/asm/cpufeatures.h | 2 +- arch/x86/include/asm/disabled-features.h | 3 ++- arch/x86/include/asm/required-features.h | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-)
arch/x86/include/asm/cpufeature.h +4 -2
@@ -81,8 +81,9 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; CHECK_BIT_IN_MASK_WORD(REQUIRED_MASK, 16, feature_bit) || \ CHECK_BIT_IN_MASK_WORD(REQUIRED_MASK, 17, feature_bit) || \ CHECK_BIT_IN_MASK_WORD(REQUIRED_MASK, 18, feature_bit) || \ + CHECK_BIT_IN_MASK_WORD(REQUIRED_MASK, 19, feature_bit) || \ REQUIRED_MASK_CHECK || \ - BUILD_BUG_ON_ZERO(NCAPINTS != 19)) + BUILD_BUG_ON_ZERO(NCAPINTS != 20))#define DISABLED_MASK_BIT_SET (feature_bit) \ ( CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 0, feature_bit) || \
@@ -104,8 +105,9 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 16, feature_bit) || \ CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 17, feature_bit) || \ CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 18, feature_bit) || \ + CHECK_BIT_IN_MASK_WORD(DISABLED_MASK, 19, feature_bit) || \ DISABLED_MASK_CHECK || \ - BUILD_BUG_ON_ZERO(NCAPINTS != 19)) + BUILD_BUG_ON_ZERO(NCAPINTS != 20))#define cpu_has (c, bit) \ (__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : \
arch/x86/include/asm/cpufeatures.h +1 -1
@@ -13,7 +13,7 @@/* * Defines x86 CPU feature bits */ -#define NCAPINTS 19/* N 32-bit words worth of info */ +#define NCAPINTS 20/* N 32-bit words worth of info */ #define NBUGINTS 1/* N 32-bit bug flags */ /*
arch/x86/include/asm/disabled-features.h +2 -1
@@ -84,6 +84,7 @@#define DISABLED_MASK16 (DISABLE_PKU|DISABLE_OSPKE|DISABLE_LA57|DISABLE_UMIP)#define DISABLED_MASK17 0#define DISABLED_MASK18 0 -#define DISABLED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 19) +#define DISABLED_MASK19 0 +#define DISABLED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 20)#endif /* _ASM_X86_DISABLED_FEATURES_H */
arch/x86/include/asm/required-features.h +2 -1
@@ -101,6 +101,7 @@#define REQUIRED_MASK16 0#define REQUIRED_MASK17 0#define REQUIRED_MASK18 0 -#define REQUIRED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 19) +#define REQUIRED_MASK19 0 +#define REQUIRED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 20)#endif /* _ASM_X86_REQUIRED_FEATURES_H */
Signature · 1 line
2.17.2
PATCH v6 38/43 MDSv6
In reply to Andi KleenThe comedi drivers have a lot of interrupt handlers, many of them touching user data in some form. But they all use common library functions, so we can schedule a CPU clear in them.
--- drivers/staging/comedi/comedi_buf.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/staging/comedi/comedi_buf.c +5 -0
@@ -9,6 +9,7 @@#include <linux/vmalloc.h> #include <linux/slab.h> +#include <linux/clearcpu.h> #include "comedidev.h" #include "comedi_internal.h"
@@ -597,6 +598,8 @@ unsigned int comedi_buf_write_samples(struct comedi_subdevice *s,comedi_inc_scan_progress (s, nbytes); s->async->events |=COMEDI_CB_BLOCK ; +lazy_clear_cpu_interrupt (); +return nbytes; }EXPORT_SYMBOL_GPL (comedi_buf_write_samples);
@@ -637,6 +640,8 @@ unsigned int comedi_buf_read_samples(struct comedi_subdevice *s,comedi_inc_scan_progress (s, nbytes); s->async->events |=COMEDI_CB_BLOCK ; +lazy_clear_cpu_interrupt (); +return nbytes; }EXPORT_SYMBOL_GPL (comedi_buf_read_samples);
Signature · 1 line
2.17.2
PATCH v6 2/43 MDSv6
In reply to Andi KleenAdd basic code to clear unconditonally on every kernel exit.
The flushing is provided by new microcode as a new side effect of the otherwise unused VERW instruction.
Future patches will provide more sophisticated policies on when to clear.
--- arch/x86/entry/common.c | 3 +++ arch/x86/include/asm/clearcpu.h | 23 +++++++++++++++++++++++ arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/nmi.c | 5 ++++- 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 arch/x86/include/asm/clearcpu.h
arch/x86/entry/common.c +3 -0
@@ -29,6 +29,7 @@#include <asm/desc.h> #include <asm/traps.h> #include <asm/vdso.h> +#include <asm/clearcpu.h> #include <linux/uaccess.h> #include <asm/cpufeature.h>
@@ -211,6 +212,8 @@ __visible inline void prepare_exit_to_usermode(struct pt_regs *regs) ti->status &= ~(TS_COMPAT |TS_I386_REGS_POKED );#endif +clear_cpu (); +user_enter_irqoff (); }
arch/x86/include/asm/clearcpu.h new file +23 -0
@@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_CLEARCPU_H +#define _ASM_CLEARCPU_H 1 + +#include <linux/jump_label.h> +#include <linux/sched/smt.h> +#include <asm/alternative.h> +#include <linux/thread_info.h> + +/* +* Clear CPU buffers to avoid side channels. +* We use microcode as a side effect of the obsolete VERW instruction +*/ + +static inline void clear_cpu (void ) +{ +unsigned kernel_ds = __KERNEL_DS; +/* Has to be memory form, don't modify to use an register */ + alternative_input("", "verw %[kernelds]", X86_BUG_MDS, + [kernelds] "m" (kernel_ds)); +} + +#endif
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -344,6 +344,7 @@/* Intel-defined CPU features, CPUID level 0x00000007:0 (EDX), word 18 */ #define X86_FEATURE_AVX512_4VNNIW (18*32+ 2)/* AVX-512 Neural Network Instructions */ #define X86_FEATURE_AVX512_4FMAPS (18*32+ 3)/* AVX-512 Multiply Accumulation Single precision */ +#define X86_FEATURE_MD_CLEAR (18*32+10)/* Flush state on VERW */ #define X86_FEATURE_PCONFIG (18*32+18)/* Intel PCONFIG */ #define X86_FEATURE_SPEC_CTRL (18*32+26)/* "" Speculation Control (IBRS + IBPB) */ #define X86_FEATURE_INTEL_STIBP (18*32+27)/* "" Single Thread Indirect Branch Predictors */
arch/x86/kernel/nmi.c +4 -1
@@ -494,7 +494,7 @@ do_nmi(struct pt_regs *regs, long error_code) {if (this_cpu_read (nmi_state) !=NMI_NOT_RUNNING ) {this_cpu_write (nmi_state,NMI_LATCHED ); -return ; + goto out; }this_cpu_write (nmi_state,NMI_EXECUTING );this_cpu_write (nmi_cr2,read_cr2 ());
@@ -533,6 +533,9 @@ do_nmi(struct pt_regs *regs, long error_code)write_cr2 (this_cpu_read (nmi_cr2));if (this_cpu_dec_return (nmi_state)) goto nmi_restart; + +out: +clear_cpu (); }NOKPROBE_SYMBOL (do_nmi);
Signature · 1 line
2.17.2
PATCH v6 30/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: mds sweep: Clear cpu for tty input
Schedule a clear cpu when input data is passed to the tty layer in a interrupt. We consider tty data sensitive. This avoids patching lots of serial drivers.
--- drivers/tty/tty_buffer.c | 5 ++++- include/linux/tty_flip.h | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-)
drivers/tty/tty_buffer.c +4 -1
@@ -17,6 +17,7 @@#include <linux/delay.h> #include <linux/module.h> #include <linux/ratelimit.h> +#include <linux/clearcpu.h> #define MIN_TTYB_SIZE 256
@@ -328,6 +329,7 @@ int tty_insert_flip_string_fixed_flag(struct tty_port *port,/* There is a small chance that we need to split the data over several buffers. If this is the case we must loop */ }while (unlikely (size > copied)); +lazy_clear_cpu_interrupt ();return copied; }EXPORT_SYMBOL (tty_insert_flip_string_fixed_flag);
@@ -363,6 +365,7 @@ int tty_insert_flip_string_flags(struct tty_port *port,/* There is a small chance that we need to split the data over several buffers. If this is the case we must loop */ }while (unlikely (size > copied)); +lazy_clear_cpu_interrupt ();return copied; }EXPORT_SYMBOL (tty_insert_flip_string_flags);
@@ -388,7 +391,7 @@ int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag)if (~tb->flags &TTYB_NORMAL ) *flag_buf_ptr (tb, tb->used) = flag; *char_buf_ptr (tb, tb->used++) = ch; - +lazy_clear_cpu_interrupt ();return 1 ; }EXPORT_SYMBOL (__tty_insert_flip_char);
include/linux/tty_flip.h +4 -0
@@ -2,6 +2,8 @@#ifndef _LINUX_TTY_FLIP_H#define _LINUX_TTY_FLIP_H +#include <linux/clearcpu.h> +extern int tty_buffer_set_limit (struct tty_port *port,int limit);extern int tty_buffer_space_avail (struct tty_port *port);extern int tty_buffer_request_room (struct tty_port *port,size_t size);
@@ -21,6 +23,8 @@ static inline int tty_insert_flip_char(struct tty_port *port,struct tty_buffer *tb = port->buf.tail;int change; +lazy_clear_cpu_interrupt (); + change = (tb->flags &TTYB_NORMAL ) && (flag !=TTY_NORMAL );if (!change && tb->used < tb->size) {if (~tb->flags &TTYB_NORMAL )
Signature · 1 line
2.17.2
PATCH v6 12/43 MDSv6
In reply to Andi KleenAdd a static key to guard clear_cpus on kernel exit and vm entry, so that we can implement a mds=full implementation later, once we have a new lazy policy.
Right now the static key is enabled by default, so there is no behavior change.
--- arch/x86/entry/common.c | 3 ++- arch/x86/include/asm/clearcpu.h | 2 ++ arch/x86/kernel/cpu/bugs.c | 10 ++++++++-- arch/x86/kernel/nmi.c | 3 ++- 4 files changed, 14 insertions(+), 4 deletions(-)
arch/x86/entry/common.c +2 -1
@@ -212,7 +212,8 @@ __visible inline void prepare_exit_to_usermode(struct pt_regs *regs) ti->status &= ~(TS_COMPAT |TS_I386_REGS_POKED );#endif -clear_cpu (); +if (static_key_enabled (&force_cpu_clear)) +clear_cpu ();user_enter_irqoff (); }
arch/x86/include/asm/clearcpu.h +2 -0
@@ -46,4 +46,6 @@ static inline void lazy_clear_cpu(void) __this_cpu_write(clear_cpu_flag, true); } +DECLARE_STATIC_KEY_FALSE (force_cpu_clear); +#endif
arch/x86/kernel/cpu/bugs.c +8 -2
@@ -1064,6 +1064,9 @@ early_param("l1tf", l1tf_cmdline);DEFINE_PER_CPU (bool, clear_cpu_flag);EXPORT_PER_CPU_SYMBOL (clear_cpu_flag); +DEFINE_STATIC_KEY_FALSE (force_cpu_clear); +EXPORT_SYMBOL (force_cpu_clear); +static void mds_select_mitigation (void ) {if (!boot_cpu_has (X86_BUG_MDS ))
@@ -1086,9 +1089,12 @@ static void mds_select_mitigation(void)setup_force_cpu_cap (X86_FEATURE_VERW );if (cmdline_find_option_bool (boot_command_line,"mds=off" ))setup_clear_cpu_cap (X86_FEATURE_VERW ); -/* Nop currently because this is default for now. */ +/* Default to old behavior for now */ if (cmdline_find_option_bool (boot_command_line,"mds=full" ) || -cmdline_find_option_bool (boot_command_line,"mds=auto" )) + true) +static_branch_enable (&force_cpu_clear); +/* Nop currently because this is default for now. */ +if (cmdline_find_option_bool (boot_command_line,"mds=auto" ))setup_force_cpu_cap (X86_FEATURE_VERW );if (boot_cpu_has (X86_FEATURE_VERW ) &&boot_cpu_has_bug (X86_BUG_MDS_NO_L1TF ))
arch/x86/kernel/nmi.c +2 -1
@@ -535,7 +535,8 @@ do_nmi(struct pt_regs *regs, long error_code) goto nmi_restart; out: -clear_cpu (); +if (static_key_enabled (&force_cpu_clear)) +clear_cpu (); }NOKPROBE_SYMBOL (do_nmi);
Signature · 1 line
2.17.2
PATCH v6 16/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: mds: Force clear cpu on kernel preemption
When the kernel is preempted we need to force a cpu clear, because the preemption might happen before the code has a chance to set TIF_CPU_CLEAR later.
We cannot rely on kernel code setting the flag before touching sensitive data: the flag setting could be implicit, like in memzero_explicit, which is always called later.
--- kernel/sched/core.c | 9 +++++++++ 1 file changed, 9 insertions(+)
kernel/sched/core.c +9 -0
@@ -11,6 +11,8 @@#include <linux/kcov.h> +#include <linux/clearcpu.h> +#include <asm/switch_to.h> #include <asm/tlb.h>
@@ -3632,6 +3634,13 @@ asmlinkage __visible void __sched notrace preempt_schedule(void)if (likely (!preemptible ()))return ; +/* +* For kernel preemption we need to force a cpu clear +* because it could happen before the code has a chance +* to set TIF_CLEAR_CPU. +*/ +lazy_clear_cpu (); +preempt_schedule_common (); }NOKPROBE_SYMBOL (preempt_schedule);
Signature · 1 line
2.17.2
PATCH v6 28/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: mds sweep: Make MPU401 interrupts clear cpu
A lot of mpu401 based sound cards use PIO or copying. Make the common interrupt handler schedule a CPU clear.
--- sound/drivers/mpu401/mpu401_uart.c | 2 ++ 1 file changed, 2 insertions(+)
sound/drivers/mpu401/mpu401_uart.c +2 -0
@@ -36,6 +36,7 @@#include <linux/module.h> #include <linux/interrupt.h> #include <linux/errno.h> +#include <linux/clearcpu.h> #include <sound/core.h> #include <sound/mpu401.h>
@@ -139,6 +140,7 @@ irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id)if (!mpu)return IRQ_NONE ;_snd_mpu401_uart_interrupt (mpu); +lazy_clear_cpu ();return IRQ_HANDLED ; }
Signature · 1 line
2.17.2
PATCH v6 41/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: mds sweep: Mark interrupts that touch user data
Mark interrupt handlers that touch user data or might touch it with IRQF_USER_DATA to schedule cpu clears.
This has been generated with a tree wide audit and the following coccinelle script. In general it erred on the conservative. Either interrupt handlers directly touched user data (e.g. with PIO), or were too complicated to audit and for slow devices anyways.
A lot of interrupt handlers are also handled by the strategic clear cpus added to functions that touch user data directly. This patch only marks handlers that don't call any such functions.
Some auditing from Mark Gross.
// request_irq(irq, handler, flags, name, arg) ->
// request_irq(irq, handler, flags | IRQF_USER_DATA, name, arg)
@@
expression irq, handler, name, arg;
@@
- request_irq(irq, handler, 0, name, arg)
+ request_irq(irq, handler, IRQF_USER_DATA, name, arg)
@@
expression irq, handler, flags, name, arg;
@@
- request_irq(irq, handler, flags, name, arg)
+ request_irq(irq, handler, flags | IRQF_USER_DATA, name, arg)
// clean up after previous rules combined
// XXX better way to do this?
@@
expression irq, handler, name, arg;
@@
- request_irq(irq, handler, IRQF_USER_DATA | IRQF_CLEAR_CPU, name, arg)
+ request_irq(irq, handler, IRQF_USER_DATA, name, arg)
// devm_request_irq(dev, irq, handler, flags, name, arg) -> // devm_request_irq(dev, irq, handler, flags | IRQF_USER_DATA, name, arg)
@@
expression irq, handler, name, arg, dev;
@@
- devm_request_irq(dev, irq, handler, 0, name, arg)
+ devm_request_irq(dev, irq, handler, IRQF_USER_DATA, name, arg)
@@
expression irq, handler, flags, name, arg, dev;
@@
- devm_request_irq(dev, irq, handler, flags, name, arg)
+ devm_request_irq(dev, irq, handler, flags | IRQF_USER_DATA, name, arg)
// clean up after previous rules combined
// XXX better way to do this?
@@
expression irq, handler, name, arg, dev;
@@
- devm_request_irq(dev, irq, handler, IRQF_USER_DATA | IRQF_CLEAR_CPU, name, arg)
+ devm_request_irq(dev, irq, handler, IRQF_USER_DATA, name, arg)
// request_any_context_irq(irq, handler, flags, name, arg) -> // request_any_context_irq(irq, handler, flags | IRQF_USER_DATA, name, arg)
@@
expression irq, handler, name, arg;
@@
- request_any_context_irq(irq, handler, 0, name, arg)
+ request_any_context_irq(irq, handler, IRQF_USER_DATA, name, arg)
@@
expression irq, handler, flags, name, arg;
@@
- request_any_context_irq(irq, handler, flags, name, arg)
+ request_any_context_irq(irq, handler, flags | IRQF_USER_DATA, name, arg)
// clean up after previous rules combined
// XXX better way to do this?
@@
expression irq, handler, name, arg;
@@
- request_any_context_irq(irq, handler, IRQF_USER_DATA | IRQF_CLEAR_CPU, name, arg)
+ request_any_context_irq(irq, handler, IRQF_USER_DATA, name, arg)
// devm_request_any_context_irq(dev, irq, handler, flags, name, arg) -> // devm_request_any_context_irq(dev, irq, handler, flags | IRQF_USER_DATA, name, arg)
@@
expression irq, handler, name, arg, dev;
@@
- devm_request_any_context_irq(dev, irq, handler, 0, name, arg)
+ devm_request_any_context_irq(dev, irq, handler, IRQF_USER_DATA, name, arg)
@@
expression irq, handler, flags, name, arg, dev;
@@
- devm_request_any_context_irq(dev, irq, handler, flags, name, arg)
+ devm_request_any_context_irq(dev, irq, handler, flags | IRQF_USER_DATA, name, arg)
// clean up after previous rules combined
// XXX better way to do this?
@@
expression irq, handler, name, arg, dev;
@@
- devm_request_any_context_irq(dev, irq, handler, IRQF_USER_DATA | IRQF_CLEAR_CPU, name, arg)
+ devm_request_any_context_irq(dev, irq, handler, IRQF_USER_DATA, name, arg)
--- arch/x86/include/asm/floppy.h | 6 ++-- drivers/atm/lanai.c | 4 +-- drivers/atm/nicstar.c | 4 +-- drivers/char/ipmi/ipmi_si_intf.c | 6 ++-- drivers/char/sonypi.c | 3 +- drivers/firewire/nosy.c | 3 +- drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c | 3 +- .../gpu/drm/nouveau/nvkm/subdev/pci/base.c | 3 +- drivers/i2c/busses/i2c-emev2.c | 5 +-- drivers/i2c/busses/i2c-i801.c | 2 +- drivers/i2c/busses/i2c-pxa.c | 4 +-- drivers/i2c/busses/i2c-rk3x.c | 3 +- drivers/ide/ide-probe.c | 2 +- drivers/infiniband/hw/mthca/mthca_eq.c | 14 ++++---- drivers/input/serio/i8042.c | 13 +++---- drivers/ipack/carriers/tpci200.c | 6 ++-- drivers/isdn/hardware/avm/b1isa.c | 4 ++- drivers/isdn/hardware/avm/b1pci.c | 6 ++-- drivers/isdn/hardware/avm/b1pcmcia.c | 3 +- drivers/isdn/hardware/avm/c4.c | 3 +- drivers/isdn/hardware/avm/t1isa.c | 4 ++- drivers/isdn/hardware/avm/t1pci.c | 3 +- drivers/isdn/hardware/mISDN/avmfritz.c | 4 +-- drivers/isdn/hardware/mISDN/hfcmulti.c | 3 +- drivers/isdn/hardware/mISDN/hfcpci.c | 2 +- drivers/isdn/hardware/mISDN/mISDNinfineon.c | 3 +- drivers/isdn/hardware/mISDN/netjet.c | 2 +- drivers/isdn/hardware/mISDN/speedfax.c | 3 +- drivers/isdn/hardware/mISDN/w6692.c | 2 +- drivers/isdn/hisax/config.c | 2 +- drivers/isdn/hisax/hfc4s8s_l1.c | 3 +- drivers/isdn/hisax/hisax_fcpcipnp.c | 13 ++++--- drivers/media/common/saa7146/saa7146_core.c | 4 +-- drivers/media/pci/b2c2/flexcop-pci.c | 3 +- drivers/media/pci/cobalt/cobalt-driver.c | 3 +- drivers/media/pci/cx18/cx18-driver.c | 3 +- drivers/media/pci/cx25821/cx25821-core.c | 2 +- drivers/media/pci/cx88/cx88-alsa.c | 3 +- drivers/media/pci/cx88/cx88-mpeg.c | 2 +- drivers/media/pci/cx88/cx88-video.c | 2 +- drivers/media/pci/dt3155/dt3155.c | 2 +- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 +- drivers/media/pci/ivtv/ivtv-driver.c | 3 +- drivers/media/pci/meye/meye.c | 3 +- drivers/media/pci/ngene/ngene-core.c | 5 ++- drivers/media/pci/pluto2/pluto2.c | 3 +- drivers/media/pci/saa7134/saa7134-alsa.c | 4 +-- drivers/media/pci/saa7134/saa7134-core.c | 2 +- drivers/media/pci/saa7164/saa7164-core.c | 7 ++-- drivers/media/pci/solo6x10/solo6x10-core.c | 4 +-- drivers/media/pci/sta2x11/sta2x11_vip.c | 5 ++- drivers/media/pci/tw68/tw68-core.c | 2 +- drivers/media/pci/tw686x/tw686x-core.c | 4 +-- drivers/media/platform/aspeed-video.c | 5 +-- .../media/platform/marvell-ccic/cafe-driver.c | 3 +- drivers/media/rc/fintek-cir.c | 3 +- drivers/media/rc/gpio-ir-recv.c | 2 +- drivers/media/rc/ir-hix5hd2.c | 3 +- drivers/media/rc/ite-cir.c | 3 +- drivers/media/rc/nuvoton-cir.c | 3 +- drivers/media/rc/serial_ir.c | 2 +- drivers/media/rc/sir_ir.c | 3 +- drivers/media/rc/winbond-cir.c | 2 +- drivers/memstick/host/jmb38x_ms.c | 3 +- drivers/message/fusion/mptbase.c | 3 +- drivers/mfd/ezx-pcap.c | 4 +-- drivers/misc/ibmasm/module.c | 4 ++- drivers/misc/sgi-gru/grufile.c | 7 ++-- drivers/misc/sgi-xp/xpc_uv.c | 3 +- drivers/mmc/host/mtk-sd.c | 3 +- drivers/net/arcnet/arc-rimi.c | 2 +- drivers/net/arcnet/com20020.c | 3 +- drivers/net/arcnet/com90io.c | 3 +- drivers/net/arcnet/com90xx.c | 2 +- drivers/net/can/cc770/cc770.c | 4 +-- drivers/net/can/peak_canfd/peak_pciefd_main.c | 8 ++--- drivers/net/can/sja1000/ems_pcmcia.c | 4 +-- drivers/net/can/sja1000/peak_pcmcia.c | 3 +- drivers/net/can/sja1000/sja1000.c | 5 +-- drivers/net/ethernet/3com/3c509.c | 3 +- drivers/net/ethernet/3com/3c515.c | 6 ++-- drivers/net/ethernet/8390/axnet_cs.c | 3 +- drivers/net/ethernet/8390/ne.c | 3 +- drivers/net/ethernet/8390/ne2k-pci.c | 3 +- drivers/net/ethernet/8390/pcnet_cs.c | 3 +- drivers/net/ethernet/8390/smc-ultra.c | 3 +- drivers/net/ethernet/8390/wd.c | 3 +- drivers/net/ethernet/agere/et131x.c | 4 +-- drivers/net/ethernet/amd/lance.c | 2 +- drivers/net/ethernet/amd/ni65.c | 5 +-- drivers/net/ethernet/atheros/atlx/atl1.c | 4 +-- drivers/net/ethernet/atheros/atlx/atl2.c | 4 +-- .../net/ethernet/chelsio/cxgb3/cxgb3_main.c | 16 +++------ drivers/net/ethernet/micrel/ks8851_mll.c | 3 +- drivers/net/ethernet/microchip/lan743x_main.c | 7 ++-- drivers/net/ethernet/realtek/atp.c | 3 +- drivers/net/fddi/skfp/skfddi.c | 4 +-- drivers/net/hamradio/baycom_ser_fdx.c | 3 +- drivers/net/hamradio/baycom_ser_hdx.c | 3 +- drivers/net/hamradio/scc.c | 4 +-- drivers/net/hamradio/yam.c | 2 +- drivers/net/ieee802154/at86rf230.c | 3 +- drivers/net/ieee802154/ca8210.c | 10 ++---- drivers/net/ieee802154/mcr20a.c | 3 +- drivers/net/ieee802154/mrf24j40.c | 3 +- drivers/net/wan/cosa.c | 2 +- drivers/net/wan/farsync.c | 2 +- drivers/net/wan/hostess_sv11.c | 3 +- drivers/net/wan/sbni.c | 2 +- drivers/net/wan/sdla.c | 2 +- drivers/net/wan/sealevel.c | 3 +- .../net/wireless/broadcom/b43legacy/main.c | 2 +- .../broadcom/brcm80211/brcmfmac/bcmsdh.c | 7 ++-- .../broadcom/brcm80211/brcmsmac/mac80211_if.c | 3 +- drivers/net/wireless/cisco/airo.c | 4 +-- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 4 +-- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 3 +- .../net/wireless/intel/iwlegacy/3945-mac.c | 3 +- .../net/wireless/intel/iwlegacy/4965-mac.c | 3 +- .../net/wireless/intersil/hostap/hostap_pci.c | 3 +- .../net/wireless/intersil/hostap/hostap_plx.c | 3 +- .../intersil/orinoco/orinoco_nortel.c | 4 +-- .../wireless/intersil/orinoco/orinoco_pci.c | 4 +-- .../wireless/intersil/orinoco/orinoco_plx.c | 4 +-- .../wireless/intersil/orinoco/orinoco_tmd.c | 4 +-- drivers/net/wireless/intersil/p54/p54pci.c | 2 +- drivers/net/wireless/intersil/p54/p54spi.c | 4 +-- .../intersil/prism54/islpci_hotplug.c | 2 +- drivers/net/wireless/marvell/libertas/if_cs.c | 2 +- .../net/wireless/marvell/libertas/if_spi.c | 3 +- drivers/net/wireless/marvell/mwifiex/main.c | 5 +-- drivers/net/wireless/marvell/mwifiex/pcie.c | 8 +++-- drivers/net/wireless/marvell/mwl8k.c | 4 +-- .../net/wireless/mediatek/mt76/mt76x0/pci.c | 3 +- .../net/wireless/mediatek/mt76/mt76x2/pci.c | 3 +- .../quantenna/qtnfmac/pcie/pearl_pcie.c | 3 +- .../quantenna/qtnfmac/pcie/topaz_pcie.c | 3 +- .../net/wireless/ralink/rt2x00/rt2x00mmio.c | 6 ++-- .../wireless/realtek/rtl818x/rtl8180/dev.c | 6 ++-- drivers/net/wireless/realtek/rtlwifi/pci.c | 4 +-- drivers/net/wireless/ti/wl1251/sdio.c | 4 ++- drivers/net/wireless/ti/wl1251/spi.c | 5 +-- drivers/ntb/hw/amd/ntb_hw_amd.c | 12 ++++--- drivers/ntb/hw/intel/ntb_hw_gen1.c | 12 ++++--- drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 8 ++--- drivers/parport/parport_ax88796.c | 3 +- drivers/parport/parport_pc.c | 3 +- drivers/pci/controller/pcie-xilinx.c | 2 +- drivers/pci/controller/vmd.c | 11 +++--- drivers/pci/hotplug/cpci_hotplug_core.c | 6 +--- drivers/pci/hotplug/cpqphp_core.c | 3 +- drivers/pci/hotplug/shpchp_hpc.c | 5 +-- drivers/pci/pcie/pme.c | 3 +- drivers/pci/switch/switchtec.c | 10 +++--- drivers/pcmcia/i82092.c | 2 +- drivers/pcmcia/i82365.c | 9 ++--- drivers/pcmcia/pcmcia_resource.c | 9 ++--- drivers/pcmcia/pd6729.c | 8 +++-- drivers/pcmcia/tcic.c | 7 ++-- drivers/pcmcia/yenta_socket.c | 4 +-- drivers/pinctrl/intel/pinctrl-intel.c | 2 +- drivers/pinctrl/pinctrl-amd.c | 3 +- drivers/pinctrl/pinctrl-single.c | 3 +- drivers/platform/goldfish/goldfish_pipe.c | 6 ++-- drivers/platform/mellanox/mlxreg-hotplug.c | 5 +-- drivers/platform/x86/fujitsu-tablet.c | 3 +- drivers/platform/x86/intel_int0002_vgpio.c | 2 +- drivers/platform/x86/intel_ips.c | 3 +- drivers/platform/x86/intel_pmc_ipc.c | 8 ++--- drivers/platform/x86/intel_punit_ipc.c | 4 +-- drivers/platform/x86/intel_scu_ipc.c | 5 +-- drivers/platform/x86/sony-laptop.c | 3 +- drivers/pnp/resource.c | 3 +- drivers/power/reset/ltc2952-poweroff.c | 6 +--- drivers/power/supply/act8945a_charger.c | 6 ++-- drivers/power/supply/goldfish_battery.c | 5 +-- .../power/supply/max14656_charger_detector.c | 2 +- drivers/power/supply/pda_power.c | 6 ++-- drivers/power/supply/wm97xx_battery.c | 5 +-- drivers/pps/clients/pps-gpio.c | 3 +- drivers/ptp/ptp_pch.c | 3 +- drivers/rapidio/devices/tsi721.c | 25 +++++++------ drivers/rapidio/devices/tsi721_dma.c | 8 +++-- drivers/regulator/qcom_spmi-regulator.c | 5 +-- drivers/rpmsg/qcom_glink_native.c | 5 ++- drivers/rtc/rtc-cmos.c | 5 +-- drivers/rtc/rtc-ds1305.c | 3 +- drivers/rtc/rtc-ds1374.c | 5 +-- drivers/rtc/rtc-ds1511.c | 3 +- drivers/rtc/rtc-ds1553.c | 4 +-- drivers/rtc/rtc-ds1685.c | 3 +- drivers/rtc/rtc-ftrtc010.c | 2 +- drivers/rtc/rtc-m48t59.c | 5 +-- drivers/rtc/rtc-mrst.c | 3 +- drivers/rtc/rtc-pcap.c | 10 +++--- drivers/rtc/rtc-r7301.c | 3 +- drivers/rtc/rtc-snvs.c | 3 +- drivers/rtc/rtc-stk17ta8.c | 5 +-- drivers/rtc/rtc-zynqmp.c | 6 ++-- drivers/scsi/3w-9xxx.c | 6 ++-- drivers/scsi/3w-sas.c | 6 ++-- drivers/scsi/3w-xxxx.c | 3 +- drivers/scsi/BusLogic.c | 3 +- drivers/scsi/a100u2w.c | 4 +-- drivers/scsi/aacraid/commsup.c | 8 ++--- drivers/scsi/aacraid/rx.c | 3 +- drivers/scsi/aacraid/sa.c | 3 +- drivers/scsi/aacraid/src.c | 3 +- drivers/scsi/advansys.c | 4 +-- drivers/scsi/aha152x.c | 4 +-- drivers/scsi/aha1542.c | 2 +- drivers/scsi/aha1740.c | 3 +- drivers/scsi/aic7xxx/aic7770_osm.c | 3 +- drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 2 +- drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 2 +- drivers/scsi/aic94xx/aic94xx_init.c | 5 +-- drivers/scsi/am53c974.c | 4 +-- drivers/scsi/arcmsr/arcmsr_hba.c | 3 +- drivers/scsi/atp870u.c | 3 +- drivers/scsi/be2iscsi/be_main.c | 12 ++++--- drivers/scsi/bfa/bfad.c | 9 +++-- drivers/scsi/csiostor/csio_isr.c | 16 +++++---- drivers/scsi/dpt_i2o.c | 2 +- drivers/scsi/esas2r/esas2r_init.c | 8 +---- drivers/scsi/fnic/fnic_isr.c | 13 ++++--- drivers/scsi/g_NCR5380.c | 7 ++-- drivers/scsi/gdth.c | 8 +++-- drivers/scsi/hpsa.c | 19 +++++----- drivers/scsi/hptiop.c | 3 +- drivers/scsi/initio.c | 3 +- drivers/scsi/ipr.c | 23 ++++++------ drivers/scsi/ips.c | 4 +-- drivers/scsi/isci/init.c | 8 +++-- drivers/scsi/lpfc/lpfc_init.c | 35 ++++++++++++------- drivers/scsi/megaraid.c | 4 +-- drivers/scsi/megaraid/megaraid_mbox.c | 3 +- drivers/scsi/megaraid/megaraid_sas_base.c | 8 ++--- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- drivers/scsi/mvsas/mv_init.c | 4 +-- drivers/scsi/mvumi.c | 8 ++--- drivers/scsi/myrb.c | 2 +- drivers/scsi/myrs.c | 2 +- drivers/scsi/nsp32.c | 3 +- drivers/scsi/pcmcia/qlogic_stub.c | 2 +- drivers/scsi/pcmcia/sym53c500_cs.c | 2 +- drivers/scsi/pm8001/pm8001_init.c | 10 +++--- drivers/scsi/pmcraid.c | 5 +-- drivers/scsi/qedf/qedf_main.c | 4 ++- drivers/scsi/qedi/qedi_main.c | 3 +- drivers/scsi/qla1280.c | 3 +- drivers/scsi/qla2xxx/qla_isr.c | 22 +++++++----- drivers/scsi/qla4xxx/ql4_isr.c | 5 +-- drivers/scsi/qla4xxx/ql4_nx.c | 10 +++--- drivers/scsi/qlogicfas.c | 2 +- drivers/scsi/sim710.c | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 11 +++--- drivers/scsi/snic/snic_isr.c | 5 ++- drivers/scsi/stex.c | 4 +-- drivers/scsi/sym53c8xx_2/sym_glue.c | 3 +- drivers/scsi/ufs/ufshcd.c | 7 ++-- drivers/scsi/vmw_pvscsi.c | 9 +++-- drivers/scsi/wd719x.c | 4 +-- drivers/slimbus/qcom-ctrl.c | 3 +- drivers/spi/spi-altera.c | 3 +- drivers/spi/spi-axi-spi-engine.c | 3 +- drivers/spi/spi-cadence.c | 3 +- drivers/spi/spi-dw.c | 4 +-- drivers/spi/spi-fsl-spi.c | 3 +- drivers/spi/spi-oc-tiny.c | 3 +- drivers/spi/spi-pxa2xx.c | 4 +-- drivers/spi/spi-topcliff-pch.c | 5 +-- drivers/spi/spi-xilinx.c | 5 +-- drivers/spi/spi-zynqmp-gqspi.c | 3 +- drivers/staging/android/vsoc.c | 3 +- drivers/staging/axis-fifo/axis-fifo.c | 3 +- .../staging/comedi/drivers/addi_apci_1032.c | 3 +- .../staging/comedi/drivers/addi_apci_1500.c | 3 +- .../staging/comedi/drivers/addi_apci_1564.c | 3 +- .../staging/comedi/drivers/addi_apci_2032.c | 3 +- .../staging/comedi/drivers/addi_apci_3120.c | 3 +- .../staging/comedi/drivers/addi_apci_3xxx.c | 3 +- drivers/staging/comedi/drivers/adl_pci9111.c | 3 +- drivers/staging/comedi/drivers/adl_pci9118.c | 3 +- drivers/staging/comedi/drivers/adv_pci1710.c | 3 +- drivers/staging/comedi/drivers/aio_iiro_16.c | 3 +- .../comedi/drivers/amplc_dio200_common.c | 3 +- .../comedi/drivers/amplc_pc236_common.c | 3 +- drivers/staging/comedi/drivers/amplc_pci224.c | 3 +- drivers/staging/comedi/drivers/amplc_pci230.c | 3 +- drivers/staging/comedi/drivers/cb_pcidas.c | 4 +-- drivers/staging/comedi/drivers/cb_pcidas64.c | 5 +-- .../staging/comedi/drivers/comedi_parport.c | 3 +- drivers/staging/comedi/drivers/das16m1.c | 3 +- drivers/staging/comedi/drivers/das1800.c | 3 +- drivers/staging/comedi/drivers/das6402.c | 3 +- drivers/staging/comedi/drivers/das800.c | 5 +-- drivers/staging/comedi/drivers/dmm32at.c | 3 +- drivers/staging/comedi/drivers/dt2811.c | 3 +- drivers/staging/comedi/drivers/dt2814.c | 3 +- drivers/staging/comedi/drivers/dt282x.c | 2 +- drivers/staging/comedi/drivers/dt3000.c | 3 +- drivers/staging/comedi/drivers/gsc_hpdi.c | 3 +- drivers/staging/comedi/drivers/me4000.c | 3 +- drivers/staging/comedi/drivers/ni_6527.c | 4 +-- drivers/staging/comedi/drivers/ni_65xx.c | 3 +- drivers/staging/comedi/drivers/ni_660x.c | 4 +-- drivers/staging/comedi/drivers/ni_at_a2150.c | 2 +- drivers/staging/comedi/drivers/ni_atmio.c | 3 +- drivers/staging/comedi/drivers/ni_atmio16d.c | 3 +- .../staging/comedi/drivers/ni_labpc_common.c | 5 +-- drivers/staging/comedi/drivers/ni_pcidio.c | 3 +- drivers/staging/comedi/drivers/ni_pcimio.c | 3 +- drivers/staging/comedi/drivers/pcl711.c | 3 +- drivers/staging/comedi/drivers/pcl726.c | 3 +- drivers/staging/comedi/drivers/pcl812.c | 3 +- drivers/staging/comedi/drivers/pcl816.c | 2 +- drivers/staging/comedi/drivers/pcl818.c | 3 +- drivers/staging/comedi/drivers/pcmmio.c | 3 +- drivers/staging/comedi/drivers/pcmuio.c | 6 ++-- drivers/staging/comedi/drivers/rtd520.c | 3 +- drivers/staging/comedi/drivers/s626.c | 3 +- drivers/staging/gasket/gasket_interrupt.c | 3 +- drivers/staging/goldfish/goldfish_audio.c | 5 +-- drivers/staging/iio/adc/ad7606.c | 3 +- drivers/staging/media/bcm2048/radio-bcm2048.c | 4 +-- drivers/staging/media/zoran/zoran_card.c | 2 +- drivers/staging/most/dim2/dim2.c | 6 ++-- drivers/staging/most/i2c/i2c.c | 3 +- drivers/staging/olpc_dcon/olpc_dcon_xo_1.c | 2 +- drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c | 2 +- drivers/staging/pi433/pi433_if.c | 6 ++-- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +- drivers/staging/rtlwifi/pci.c | 4 +-- drivers/staging/rts5208/rtsx.c | 4 +-- drivers/staging/speakup/serialio.c | 5 +-- drivers/staging/vt6655/device_main.c | 2 +- drivers/thermal/ti-soc-thermal/ti-bandgap.c | 6 ++-- drivers/thunderbolt/nhi.c | 6 ++-- drivers/tty/cyclades.c | 9 ++--- drivers/tty/goldfish.c | 4 +-- drivers/tty/hvc/hvc_irq.c | 4 +-- drivers/tty/isicom.c | 2 +- drivers/tty/mxser.c | 4 +-- drivers/tty/serial/8250/8250_core.c | 3 +- drivers/tty/serial/8250/8250_exar.c | 2 +- drivers/tty/serial/altera_jtaguart.c | 4 +-- drivers/tty/serial/altera_uart.c | 5 +-- drivers/tty/serial/arc_uart.c | 2 +- drivers/tty/serial/digicolor-usart.c | 3 +- drivers/tty/serial/fsl_lpuart.c | 12 ++++--- drivers/tty/serial/ifx6x60.c | 7 ++-- drivers/tty/serial/jsm/jsm_driver.c | 3 +- drivers/tty/serial/max3100.c | 3 +- drivers/tty/serial/men_z135_uart.c | 4 +-- drivers/tty/serial/pch_uart.c | 4 +-- drivers/tty/serial/rp2.c | 2 +- drivers/tty/serial/sc16is7xx.c | 2 +- drivers/tty/serial/timbuart.c | 4 +-- drivers/tty/serial/uartlite.c | 3 +- drivers/tty/serial/xilinx_uartps.c | 4 ++- drivers/tty/synclink.c | 3 +- drivers/tty/synclink_gt.c | 6 +--- drivers/tty/synclinkmp.c | 7 ++-- drivers/uio/uio.c | 3 +- drivers/usb/c67x00/c67x00-drv.c | 3 +- drivers/usb/chipidea/core.c | 5 +-- drivers/usb/core/hcd.c | 5 +-- drivers/usb/dwc2/gadget.c | 3 +- drivers/usb/dwc2/platform.c | 3 +- drivers/usb/gadget/udc/amd5536udc_pci.c | 2 +- drivers/usb/gadget/udc/bdc/bdc_udc.c | 3 +- drivers/usb/gadget/udc/fotg210-udc.c | 4 +-- drivers/usb/gadget/udc/fusb300_udc.c | 6 ++-- drivers/usb/gadget/udc/goku_udc.c | 3 +- drivers/usb/gadget/udc/m66592-udc.c | 4 +-- drivers/usb/gadget/udc/mv_u3d_core.c | 3 +- drivers/usb/gadget/udc/mv_udc_core.c | 3 +- drivers/usb/gadget/udc/net2272.c | 3 +- drivers/usb/gadget/udc/net2280.c | 3 +- drivers/usb/gadget/udc/pch_udc.c | 8 +++-- drivers/usb/gadget/udc/pxa27x_udc.c | 3 +- drivers/usb/gadget/udc/r8a66597-udc.c | 5 +-- drivers/usb/gadget/udc/snps_udc_plat.c | 4 +-- drivers/usb/gadget/udc/udc-xilinx.c | 3 +- drivers/usb/host/max3421-hcd.c | 3 +- drivers/usb/host/xhci.c | 12 ++++--- drivers/usb/isp1760/isp1760-udc.c | 3 +- drivers/usb/musb/musb_core.c | 2 +- drivers/usb/phy/phy-gpio-vbus-usb.c | 4 +-- drivers/uwb/whc-rc.c | 5 +-- drivers/vfio/pci/vfio_pci_intrs.c | 5 +-- drivers/video/fbdev/arcfb.c | 3 +- drivers/video/fbdev/aty/atyfb_base.c | 2 +- drivers/video/fbdev/goldfishfb.c | 4 +-- drivers/video/fbdev/matrox/matroxfb_base.c | 3 +- drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 7 ++-- drivers/video/fbdev/via/via-core.c | 3 +- drivers/virt/vboxguest/vboxguest_linux.c | 5 +-- drivers/virtio/virtio_mmio.c | 4 +-- drivers/virtio/virtio_pci_common.c | 20 ++++++----- drivers/vme/bridges/vme_ca91cx42.c | 5 +-- drivers/vme/bridges/vme_tsi148.c | 7 ++-- drivers/w1/masters/ds1wm.c | 3 +- drivers/xen/events/events_base.c | 12 ++++--- drivers/xen/platform-pci.c | 4 +-- drivers/xen/xen-pciback/pciback_ops.c | 6 ++-- samples/v4l/v4l2-pci-skeleton.c | 5 +-- sound/drivers/mpu401/mpu401_uart.c | 3 +- sound/drivers/mtpav.c | 2 +- sound/drivers/serial-u16550.c | 3 +- sound/isa/ad1816a/ad1816a_lib.c | 2 +- sound/isa/es1688/es1688_lib.c | 4 ++- sound/isa/es18xx.c | 3 +- sound/isa/gus/gus_main.c | 2 +- sound/isa/gus/gusmax.c | 2 +- sound/isa/gus/interwave.c | 3 +- sound/isa/msnd/msnd_pinnacle.c | 3 +- sound/isa/opl3sa2.c | 4 +-- sound/isa/opti9xx/opti92x-ad1848.c | 3 +- sound/isa/sb/sb_common.c | 6 +--- sound/isa/wavefront/wavefront.c | 3 +- sound/isa/wss/wss_lib.c | 3 +- sound/pci/ad1889.c | 3 +- sound/pci/ali5451/ali5451.c | 3 +- sound/pci/als300.c | 3 +- sound/pci/asihpi/hpioctl.c | 3 +- sound/pci/atiixp.c | 3 +- sound/pci/atiixp_modem.c | 3 +- sound/pci/aw2/aw2-alsa.c | 3 +- sound/pci/azt3328.c | 3 +- sound/pci/bt87x.c | 4 +-- sound/pci/ca0106/ca0106_main.c | 3 +- sound/pci/cmipci.c | 3 +- sound/pci/cs4281.c | 3 +- sound/pci/cs46xx/cs46xx_lib.c | 3 +- sound/pci/cs5535audio/cs5535audio.c | 3 +- sound/pci/ctxfi/cthw20k1.c | 3 +- sound/pci/ctxfi/cthw20k2.c | 3 +- sound/pci/emu10k1/emu10k1_main.c | 3 +- sound/pci/emu10k1/emu10k1x.c | 3 +- sound/pci/ens1370.c | 3 +- sound/pci/es1938.c | 6 ++-- sound/pci/es1968.c | 3 +- sound/pci/fm801.c | 3 +- sound/pci/hda/hda_intel.c | 4 +-- sound/pci/ice1712/ice1712.c | 3 +- sound/pci/ice1712/ice1724.c | 3 +- sound/pci/intel8x0.c | 6 ++-- sound/pci/intel8x0m.c | 6 ++-- sound/pci/korg1212/korg1212.c | 4 +-- sound/pci/lola/lola.c | 3 +- sound/pci/maestro3.c | 3 +- sound/pci/nm256/nm256.c | 3 +- sound/pci/oxygen/oxygen_lib.c | 4 +-- sound/pci/riptide/riptide.c | 3 +- sound/pci/rme32.c | 3 +- sound/pci/rme96.c | 3 +- sound/pci/rme9652/hdsp.c | 3 +- sound/pci/rme9652/hdspm.c | 3 +- sound/pci/rme9652/rme9652.c | 3 +- sound/pci/sis7019.c | 7 ++-- sound/pci/sonicvibes.c | 3 +- sound/pci/trident/trident_main.c | 3 +- sound/pci/via82xx.c | 6 +--- sound/pci/via82xx_modem.c | 3 +- sound/pci/ymfpci/ymfpci_main.c | 3 +- sound/soc/amd/acp-pcm-dma.c | 3 +- sound/soc/amd/raven/acp3x-pcm-dma.c | 3 +- sound/soc/codecs/rt5640.c | 4 +-- sound/soc/codecs/rt5651.c | 4 +-- sound/soc/codecs/rt5663.c | 4 +-- sound/soc/dwc/dwc-i2s.c | 5 +-- sound/soc/fsl/fsl_asrc.c | 3 +- sound/soc/fsl/fsl_esai.c | 3 +- sound/soc/fsl/fsl_sai.c | 3 +- sound/soc/fsl/fsl_spdif.c | 3 +- sound/soc/fsl/fsl_ssi.c | 3 +- sound/x86/intel_hdmi_audio.c | 5 +-- 478 files changed, 1084 insertions(+), 966 deletions(-)
arch/x86/include/asm/floppy.h +4 -2
@@ -145,10 +145,12 @@ static int fd_request_irq(void) {if (can_use_virtual_dma)return request_irq (FLOPPY_IRQ , floppy_hardint, -0 ,"floppy" ,NULL ); +IRQF_USER_DATA ,"floppy" , +NULL );else return request_irq (FLOPPY_IRQ , floppy_interrupt, -0 ,"floppy" ,NULL ); +IRQF_USER_DATA ,"floppy" , +NULL ); }static unsigned long dma_mem_alloc (unsigned long size)
drivers/atm/lanai.c +2 -2
@@ -2198,8 +2198,8 @@ static int lanai_dev_open(struct atm_dev *atmdev)conf2_write (lanai);reg_write (lanai,TX_FIFO_DEPTH , TxDepth_Reg);reg_write (lanai,0 , CBR_ICG_Reg);/* CBR defaults to no limit */ -if ((result =request_irq (lanai->pci->irq, lanai_int,IRQF_SHARED , -DEV_LABEL , lanai)) !=0 ) { +if ((result =request_irq (lanai->pci->irq, lanai_int, +IRQF_SHARED |IRQF_USER_DATA ,DEV_LABEL , lanai)) !=0 ) { printk(KERN_ERR DEV_LABEL ": can't allocate interrupt\n"); goto error_vcctable; }
drivers/atm/nicstar.c +2 -2
@@ -751,8 +751,8 @@ static int ns_init_card(int i, struct pci_dev *pcidev) card->efbie =1 ; card->intcnt =0 ; -if (request_irq - (pcidev->irq, &ns_irq_handler,IRQF_SHARED ,"nicstar" , card) !=0 ) { +if (request_irq (pcidev->irq, &ns_irq_handler, +IRQF_SHARED |IRQF_USER_DATA ,"nicstar" , card) !=0 ) {printk ("nicstar%d: can't allocate IRQ %d.\n" , i, pcidev->irq); error =9 ;ns_init_card_error (card, error);
drivers/char/ipmi/ipmi_si_intf.c +2 -4
@@ -1266,10 +1266,8 @@ int ipmi_std_irq_setup(struct si_sm_io *io)if (!io->irq)return 0 ; - rv =request_irq (io->irq, - ipmi_si_irq_handler, -IRQF_SHARED , -DEVICE_NAME , + rv =request_irq (io->irq, ipmi_si_irq_handler, +IRQF_SHARED |IRQF_USER_DATA ,DEVICE_NAME , io->irq_handler_data);if (rv) { dev_warn(io->dev, "%s unable to claim interrupt %d,"
drivers/char/sonypi.c +1 -2
@@ -1265,8 +1265,7 @@ static int sonypi_setup_irq(struct sonypi_device *dev, {while (irq_list->irq) { -if (!request_irq (irq_list->irq, sonypi_irq, -IRQF_SHARED ,"sonypi" , sonypi_irq)) { +if (!request_irq (irq_list->irq, sonypi_irq,IRQF_SHARED |IRQF_USER_DATA ,"sonypi" , sonypi_irq)) { dev->irq = irq_list->irq; dev->bits = irq_list->bits;return 0 ;
drivers/firewire/nosy.c +1 -2
@@ -641,8 +641,7 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused)run_pcl (lynx, lynx->rcv_start_pcl_bus,0 ); -if (request_irq (dev->irq, irq_handler,IRQF_SHARED , - driver_name, lynx)) { +if (request_irq (dev->irq, irq_handler,IRQF_SHARED |IRQF_USER_DATA , driver_name, lynx)) {dev_err (&dev->dev,"Failed to allocate shared interrupt %d\n" , dev->irq); ret = -EIO ;
drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c +2 -1
@@ -296,7 +296,8 @@ int oaktrail_hdmi_i2c_init(struct pci_dev *dev)oaktrail_hdmi_i2c_gpio_fix ();/* request irq */ - ret =request_irq (dev->irq, oaktrail_hdmi_i2c_handler,IRQF_SHARED , + ret =request_irq (dev->irq, oaktrail_hdmi_i2c_handler, +IRQF_SHARED |IRQF_USER_DATA , oaktrail_hdmi_i2c_adapter.name, hdmi_dev);if (ret) {DRM_ERROR ("Failed to request IRQ for I2C controller\n" );
drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c +2 -1
@@ -116,7 +116,8 @@ nvkm_pci_oneinit(struct nvkm_subdev *subdev)return ret; } - ret =request_irq (pdev->irq, nvkm_pci_intr,IRQF_SHARED ,"nvkm" , pci); + ret =request_irq (pdev->irq, nvkm_pci_intr, +IRQF_SHARED |IRQF_USER_DATA ,"nvkm" , pci);if (ret)return ret;
drivers/i2c/busses/i2c-emev2.c +3 -2
@@ -391,8 +391,9 @@ static int em_i2c_probe(struct platform_device *pdev)em_i2c_reset (&priv->adap); irq =platform_get_irq (pdev,0 ); - ret =devm_request_irq (&pdev->dev, irq, em_i2c_irq_handler,0 , -"em_i2c" , priv); + ret =devm_request_irq (&pdev->dev, irq, em_i2c_irq_handler, +IRQF_USER_DATA ,"em_i2c" , + priv);if (ret) goto err_clk;
drivers/i2c/busses/i2c-i801.c +1 -1
@@ -1659,7 +1659,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)init_waitqueue_head (&priv->waitq); err =devm_request_irq (&dev->dev, dev->irq, i801_isr, -IRQF_SHARED , +IRQF_SHARED |IRQF_USER_DATA ,dev_driver_string (&dev->dev), priv);if (err) { dev_err(&dev->dev, "Failed to allocate irq %d: %d\n",
drivers/i2c/busses/i2c-pxa.c +2 -2
@@ -1297,8 +1297,8 @@ static int i2c_pxa_probe(struct platform_device *dev) }else { i2c->adap.algo = &i2c_pxa_algorithm; ret =devm_request_irq (&dev->dev, irq, i2c_pxa_handler, -IRQF_SHARED |IRQF_NO_SUSPEND , -dev_name (&dev->dev), i2c); +IRQF_SHARED |IRQF_NO_SUSPEND |IRQF_USER_DATA , +dev_name (&dev->dev), i2c);if (ret) {dev_err (&dev->dev,"failed to request irq: %d\n" , ret); goto ereqirq;
drivers/i2c/busses/i2c-rk3x.c +2 -1
@@ -1271,7 +1271,8 @@ static int rk3x_i2c_probe(struct platform_device *pdev) } ret =devm_request_irq (&pdev->dev, irq, rk3x_i2c_irq, -0 ,dev_name (&pdev->dev), i2c); +IRQF_USER_DATA , +dev_name (&pdev->dev), i2c);if (ret <0 ) {dev_err (&pdev->dev,"cannot request IRQ\n" );return ret;
drivers/ide/ide-probe.c +1 -1
@@ -882,7 +882,7 @@ static int init_irq (ide_hwif_t *hwif)if (!host->get_lock)if (request_irq (hwif->irq, irq_handler, sa |IRQF_USER_DATA , - hwif->name, hwif)) + hwif->name, hwif)) goto out_up;#if !defined(__mc68000__)
drivers/infiniband/hw/mthca/mthca_eq.c +6 -8
@@ -825,10 +825,9 @@ int mthca_init_eq_table(struct mthca_dev *dev)"%s@pci:%s" , eq_name[i], pci_name(dev->pdev)); err =request_irq (dev->eq_table.eq[i].msi_x_vector, -mthca_is_memfree (dev) ? - mthca_arbel_msi_x_interrupt : - mthca_tavor_msi_x_interrupt, -0 , dev->eq_table.eq[i].irq_name, +mthca_is_memfree (dev) ? mthca_arbel_msi_x_interrupt : mthca_tavor_msi_x_interrupt, +IRQF_USER_DATA , + dev->eq_table.eq[i].irq_name, dev->eq_table.eq + i);if (err) goto err_out_cmd;
@@ -838,10 +837,9 @@ int mthca_init_eq_table(struct mthca_dev *dev)snprintf (dev->eq_table.eq[0 ].irq_name,IB_DEVICE_NAME_MAX ,DRV_NAME "@pci:%s" ,pci_name (dev->pdev)); err =request_irq (dev->pdev->irq, -mthca_is_memfree (dev) ? - mthca_arbel_interrupt : - mthca_tavor_interrupt, -IRQF_SHARED , dev->eq_table.eq[0 ].irq_name, dev); +mthca_is_memfree (dev) ? mthca_arbel_interrupt : mthca_tavor_interrupt, +IRQF_SHARED |IRQF_USER_DATA , + dev->eq_table.eq[0 ].irq_name, dev);if (err) goto err_out_cmd; dev->eq_table.have_irq =1 ;
drivers/input/serio/i8042.c +7 -6
@@ -865,8 +865,7 @@ static int __init i8042_check_aux(void) goto out; } -if (request_irq (I8042_AUX_IRQ , i8042_aux_test_irq,IRQF_SHARED , -"i8042" , i8042_platform_device)) +if (request_irq (I8042_AUX_IRQ , i8042_aux_test_irq,IRQF_SHARED |IRQF_USER_DATA ,"i8042" , i8042_platform_device)) goto out; irq_registered = true;
@@ -1463,8 +1462,9 @@ static int __init i8042_setup_aux(void) aux_enable = i8042_enable_mux_ports; } - error =request_irq (I8042_AUX_IRQ , i8042_interrupt,IRQF_SHARED , -"i8042" , i8042_platform_device); + error =request_irq (I8042_AUX_IRQ , i8042_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,"i8042" , + i8042_platform_device);if (error) goto err_free_ports;
@@ -1489,8 +1489,9 @@ static int __init i8042_setup_kbd(void)if (error)return error; - error =request_irq (I8042_KBD_IRQ , i8042_interrupt,IRQF_SHARED , -"i8042" , i8042_platform_device); + error =request_irq (I8042_KBD_IRQ , i8042_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,"i8042" , + i8042_platform_device);if (error) goto err_free_port;
drivers/ipack/carriers/tpci200.c +3 -3
@@ -340,9 +340,9 @@ static int tpci200_register(struct tpci200_board *tpci200)for (i =0 ; i <TPCI200_NB_SLOT ; i++)writew (slot_ctrl, &tpci200->info->interface_regs->control[i]); - res =request_irq (tpci200->info->pdev->irq, - tpci200_interrupt,IRQF_SHARED , -KBUILD_MODNAME , (void *) tpci200); + res =request_irq (tpci200->info->pdev->irq, tpci200_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,KBUILD_MODNAME , + (void *)tpci200);if (res) { dev_err(&tpci200->info->pdev->dev, "(bn 0x%X, sn 0x%X) unable to register IRQ !",
drivers/isdn/hardware/avm/b1isa.c +3 -1
@@ -97,7 +97,9 @@ static int b1isa_probe(struct pci_dev *pdev) retval = -EBUSY ; goto err_free; } - retval =request_irq (card->irq, b1_interrupt,0 , card->name, card); + retval =request_irq (card->irq, b1_interrupt, +IRQF_USER_DATA , card->name, + card);if (retval) {printk (KERN_ERR "b1isa: unable to get IRQ %d.\n" , card->irq); goto err_release_region;
drivers/isdn/hardware/avm/b1pci.c +4 -2
@@ -97,7 +97,8 @@ static int b1pci_probe(struct capicardparams *p, struct pci_dev *pdev)b1_reset (card->port);b1_getrevision (card); - retval =request_irq (card->irq, b1_interrupt,IRQF_SHARED , card->name, card); + retval =request_irq (card->irq, b1_interrupt, +IRQF_SHARED |IRQF_USER_DATA , card->name, card);if (retval) {printk (KERN_ERR "b1pci: unable to get IRQ %d.\n" , card->irq); retval = -EBUSY ;
@@ -234,7 +235,8 @@ static int b1pciv4_probe(struct capicardparams *p, struct pci_dev *pdev)b1dma_reset (card);b1_getrevision (card); - retval =request_irq (card->irq, b1dma_interrupt,IRQF_SHARED , card->name, card); + retval =request_irq (card->irq, b1dma_interrupt, +IRQF_SHARED |IRQF_USER_DATA , card->name, card);if (retval) {printk (KERN_ERR "b1pci: unable to get IRQ %d.\n" , card->irq);
drivers/isdn/hardware/avm/b1pcmcia.c +2 -1
@@ -82,7 +82,8 @@ static int b1pcmcia_add_card(unsigned int port, unsigned irq, card->irq = irq; card->cardtype = cardtype; - retval =request_irq (card->irq, b1_interrupt,IRQF_SHARED , card->name, card); + retval =request_irq (card->irq, b1_interrupt, +IRQF_SHARED |IRQF_USER_DATA , card->name, card);if (retval) {printk (KERN_ERR "b1pcmcia: unable to get IRQ %d.\n" , card->irq);
drivers/isdn/hardware/avm/c4.c +2 -1
@@ -1180,7 +1180,8 @@ static int c4_add_card(struct capicardparams *p, struct pci_dev *dev, }c4_reset (card); - retval =request_irq (card->irq, c4_interrupt,IRQF_SHARED , card->name, card); + retval =request_irq (card->irq, c4_interrupt, +IRQF_SHARED |IRQF_USER_DATA , card->name, card);if (retval) {printk (KERN_ERR "c4: unable to get IRQ %d.\n" , card->irq); retval = -EBUSY ;
drivers/isdn/hardware/avm/t1isa.c +3 -1
@@ -405,7 +405,9 @@ static int t1isa_probe(struct pci_dev *pdev, int cardnr) retval = -EBUSY ; goto err_free; } - retval =request_irq (card->irq, t1isa_interrupt,0 , card->name, card); + retval =request_irq (card->irq, t1isa_interrupt, +IRQF_USER_DATA , card->name, + card);if (retval) {printk (KERN_INFO "t1isa: unable to get IRQ %d.\n" , card->irq); retval = -EBUSY ;
drivers/isdn/hardware/avm/t1pci.c +2 -1
@@ -103,7 +103,8 @@ static int t1pci_add_card(struct capicardparams *p, struct pci_dev *pdev) }b1dma_reset (card); - retval =request_irq (card->irq, b1dma_interrupt,IRQF_SHARED , card->name, card); + retval =request_irq (card->irq, b1dma_interrupt, +IRQF_SHARED |IRQF_USER_DATA , card->name, card);if (retval) {printk (KERN_ERR "t1pci: unable to get IRQ %d.\n" , card->irq); retval = -EBUSY ;
drivers/isdn/hardware/mISDN/avmfritz.c +2 -2
@@ -794,10 +794,10 @@ init_card(struct fritzcard *fc)reset_avm (fc);/* disable IRQ */ if (fc->type ==AVM_FRITZ_PCIV2 ) ret =request_irq (fc->irq, avm_fritzv2_interrupt, -IRQF_SHARED , fc->name, fc); +IRQF_SHARED |IRQF_USER_DATA , fc->name, fc);else ret =request_irq (fc->irq, avm_fritz_interrupt, -IRQF_SHARED , fc->name, fc); +IRQF_SHARED |IRQF_USER_DATA , fc->name, fc);if (ret) {pr_info ("%s: couldn't get interrupt %d\n" , fc->name, fc->irq);
drivers/isdn/hardware/mISDN/hfcmulti.c +1 -2
@@ -4271,8 +4271,7 @@ init_card(struct hfc_multi *hc)disable_hwirq (hc);spin_unlock_irqrestore (&hc->lock, flags); -if (request_irq (hc->irq, hfcmulti_interrupt,IRQF_SHARED , -"HFC-multi" , hc)) { +if (request_irq (hc->irq, hfcmulti_interrupt,IRQF_SHARED |IRQF_USER_DATA ,"HFC-multi" , hc)) {printk (KERN_WARNING "mISDN: Could not get interrupt %d.\n" , hc->irq); hc->irq =0 ;
drivers/isdn/hardware/mISDN/hfcpci.c +1 -1
@@ -1738,7 +1738,7 @@ init_card(struct hfc_pci *hc)spin_lock_irqsave (&hc->lock, flags);disable_hwirq (hc);spin_unlock_irqrestore (&hc->lock, flags); -if (request_irq (hc->irq, hfcpci_int,IRQF_SHARED ,"HFC PCI" , hc)) { +if (request_irq (hc->irq, hfcpci_int,IRQF_SHARED |IRQF_USER_DATA ,"HFC PCI" , hc)) {printk (KERN_WARNING "mISDN: couldn't get interrupt %d\n" , hc->irq);return -EIO ;
drivers/isdn/hardware/mISDN/mISDNinfineon.c +2 -1
@@ -611,7 +611,8 @@ init_irq(struct inf_hw *hw)if (!hw->ci->irqfunc)return -EINVAL ; - ret =request_irq (hw->irq, hw->ci->irqfunc,IRQF_SHARED , hw->name, hw); + ret =request_irq (hw->irq, hw->ci->irqfunc, +IRQF_SHARED |IRQF_USER_DATA , hw->name, hw);if (ret) {pr_info ("%s: couldn't get interrupt %d\n" , hw->name, hw->irq);return ret;
drivers/isdn/hardware/mISDN/netjet.c +1 -1
@@ -929,7 +929,7 @@ nj_init_card(struct tiger_hw *card)spin_unlock_irqrestore (&card->lock, flags); card->irq = card->pdev->irq; -if (request_irq (card->irq, nj_irq,IRQF_SHARED , card->name, card)) { +if (request_irq (card->irq, nj_irq,IRQF_SHARED |IRQF_USER_DATA , card->name, card)) {pr_info ("%s: couldn't get interrupt %d\n" , card->name, card->irq); card->irq =-1 ;
drivers/isdn/hardware/mISDN/speedfax.c +2 -1
@@ -288,7 +288,8 @@ init_card(struct sfax_hw *sf)int ret, cnt =3 ;u_long flags; - ret =request_irq (sf->irq, speedfax_irq,IRQF_SHARED , sf->name, sf); + ret =request_irq (sf->irq, speedfax_irq,IRQF_SHARED |IRQF_USER_DATA , + sf->name, sf);if (ret) {pr_info ("%s: couldn't get interrupt %d\n" , sf->name, sf->irq);return ret;
drivers/isdn/hardware/mISDN/w6692.c +1 -1
@@ -917,7 +917,7 @@ init_card(struct w6692_hw *card)spin_lock_irqsave (&card->lock, flags);disable_hwirq (card);spin_unlock_irqrestore (&card->lock, flags); -if (request_irq (card->irq, w6692_irq,IRQF_SHARED , card->name, card)) { +if (request_irq (card->irq, w6692_irq,IRQF_SHARED |IRQF_USER_DATA , card->name, card)) {pr_info ("%s: couldn't get interrupt %d\n" , card->name, card->irq);return -EIO ;
drivers/isdn/hisax/config.c +1 -1
@@ -822,7 +822,7 @@ static int init_card(struct IsdnCardState *cs) irq_cnt = cs->irq_cnt =0 ;printk (KERN_INFO "%s: IRQ %d count %d\n" , CardType[cs->typ], cs->irq, irq_cnt); -if (request_irq (cs->irq, card_irq, cs->irq_flags,"HiSax" , cs)) { +if (request_irq (cs->irq, card_irq, cs->irq_flags |IRQF_USER_DATA ,"HiSax" , cs)) {printk (KERN_WARNING "HiSax: couldn't get interrupt %d\n" , cs->irq);return 1 ;
drivers/isdn/hisax/hfc4s8s_l1.c +1 -2
@@ -1440,8 +1440,7 @@ setup_instance(hfc4s8s_hw *hw)INIT_WORK (&hw->tqueue, hfc4s8s_bh); -if (request_irq - (hw->irq, hfc4s8s_interrupt,IRQF_SHARED , hw->card_name, hw)) { +if (request_irq (hw->irq, hfc4s8s_interrupt,IRQF_SHARED |IRQF_USER_DATA , hw->card_name, hw)) {printk (KERN_INFO "HFC-4S/8S: unable to alloc irq %d, card ignored\n" , hw->irq);
drivers/isdn/hisax/hisax_fcpcipnp.c +8 -5
@@ -780,15 +780,18 @@ static int fcpcipnp_setup(struct fritz_adapter *adapter)switch (adapter->type) {case AVM_FRITZ_PCIV2 : - retval =request_irq (adapter->irq, fcpci2_irq,IRQF_SHARED , -"fcpcipnp" , adapter); + retval =request_irq (adapter->irq, fcpci2_irq, +IRQF_SHARED |IRQF_USER_DATA ,"fcpcipnp" , + adapter);break ;case AVM_FRITZ_PCI : - retval =request_irq (adapter->irq, fcpci_irq,IRQF_SHARED , -"fcpcipnp" , adapter); + retval =request_irq (adapter->irq, fcpci_irq, +IRQF_SHARED |IRQF_USER_DATA ,"fcpcipnp" , + adapter);break ;case AVM_FRITZ_PNP : - retval =request_irq (adapter->irq, fcpci_irq,0 , + retval =request_irq (adapter->irq, fcpci_irq, +IRQF_USER_DATA ,"fcpcipnp" , adapter);break ; }
drivers/media/common/saa7146/saa7146_core.c +2 -2
@@ -414,8 +414,8 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *entsaa7146_write (dev,MC2 ,0xf8000000 );/* request an interrupt for the saa7146 */ - err =request_irq (pci->irq, interrupt_hw,IRQF_SHARED , - dev->name, dev); + err =request_irq (pci->irq, interrupt_hw, +IRQF_SHARED |IRQF_USER_DATA , dev->name, dev);if (err <0 ) {ERR ("request_irq() failed\n" ); goto err_unmap;
drivers/media/pci/b2c2/flexcop-pci.c +1 -2
@@ -309,8 +309,7 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci)pci_set_drvdata (fc_pci->pdev, fc_pci);spin_lock_init (&fc_pci->irq_lock); -if ((ret =request_irq (fc_pci->pdev->irq, flexcop_pci_isr, -IRQF_SHARED ,DRIVER_NAME , fc_pci)) !=0 ) +if ((ret =request_irq (fc_pci->pdev->irq, flexcop_pci_isr,IRQF_SHARED |IRQF_USER_DATA ,DRIVER_NAME , fc_pci)) !=0 ) goto err_pci_iounmap; fc_pci->init_state |=FC_PCI_INIT ;
drivers/media/pci/cobalt/cobalt-driver.c +1 -2
@@ -383,8 +383,7 @@ static int cobalt_setup_pci(struct cobalt *cobalt, struct pci_dev *pci_dev,msi_config_show (cobalt, pci_dev);/* Register IRQ */ -if (request_irq (pci_dev->irq, cobalt_irq_handler,IRQF_SHARED , - cobalt->v4l2_dev.name, (void *)cobalt)) { +if (request_irq (pci_dev->irq, cobalt_irq_handler,IRQF_SHARED |IRQF_USER_DATA , cobalt->v4l2_dev.name, (void *)cobalt)) {cobalt_err ("Failed to register irq %d\n" , pci_dev->irq); ret = -EIO ; goto err_msi;
drivers/media/pci/cx18/cx18-driver.c +2 -1
@@ -1026,7 +1026,8 @@ static int cx18_probe(struct pci_dev *pci_dev,/* Register IRQ */ retval =request_irq (cx->pci_dev->irq, cx18_irq_handler, -IRQF_SHARED , cx->v4l2_dev.name, (void *)cx); +IRQF_SHARED |IRQF_USER_DATA , cx->v4l2_dev.name, + (void *)cx);if (retval) {CX18_ERR ("Failed to register irq %d\n" , retval); goto free_i2c;
drivers/media/pci/cx25821/cx25821-core.c +1 -1
@@ -1319,7 +1319,7 @@ static int cx25821_initdev(struct pci_dev *pci_dev, } err =request_irq (pci_dev->irq, cx25821_irq, -IRQF_SHARED , dev->name, dev); +IRQF_SHARED |IRQF_USER_DATA , dev->name, dev);if (err <0 ) {pr_err ("%s: can't get IRQ %d\n" , dev->name, pci_dev->irq);
drivers/media/pci/cx88/cx88-alsa.c +2 -1
@@ -895,7 +895,8 @@ static int snd_cx88_create(struct snd_card *card, struct pci_dev *pci,/* get irq */ err =request_irq (chip->pci->irq, cx8801_irq, -IRQF_SHARED , chip->core->name, chip); +IRQF_SHARED |IRQF_USER_DATA , chip->core->name, + chip);if (err <0 ) {dprintk (0 ,"%s: can't get IRQ %d\n" , chip->core->name, chip->pci->irq);
drivers/media/pci/cx88/cx88-mpeg.c +1 -1
@@ -416,7 +416,7 @@ static int cx8802_init_common(struct cx8802_dev *dev)/* get irq */ err =request_irq (dev->pci->irq, cx8802_irq, -IRQF_SHARED , dev->core->name, dev); +IRQF_SHARED |IRQF_USER_DATA , dev->core->name, dev);if (err <0 ) {pr_err ("can't get IRQ %d\n" , dev->pci->irq);return err;
drivers/media/pci/cx88/cx88-video.c +1 -1
@@ -1342,7 +1342,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev,/* get irq */ err =request_irq (pci_dev->irq, cx8800_irq, -IRQF_SHARED , core->name, dev); +IRQF_SHARED |IRQF_USER_DATA , core->name, dev);if (err <0 ) {pr_err ("can't get IRQ %d\n" , pci_dev->irq); goto fail_core;
drivers/media/pci/dt3155/dt3155.c +1 -1
@@ -565,7 +565,7 @@ static int dt3155_probe(struct pci_dev *pdev, const struct pci_device_id *id)if (err) goto err_iounmap; err =request_irq (pd->pdev->irq, dt3155_irq_handler_even, -IRQF_SHARED ,DT3155_NAME , pd); +IRQF_SHARED |IRQF_USER_DATA ,DT3155_NAME , pd);if (err) goto err_iounmap; err =video_register_device (&pd->vdev,VFL_TYPE_GRABBER ,-1 );
drivers/media/pci/intel/ipu3/ipu3-cio2.c +1 -1
@@ -1814,7 +1814,7 @@ static int cio2_pci_probe(struct pci_dev *pci_dev, goto fail_cio2_queue_exit; r =devm_request_irq (&pci_dev->dev, pci_dev->irq, cio2_irq, -IRQF_SHARED ,CIO2_NAME , cio2); +IRQF_SHARED |IRQF_USER_DATA ,CIO2_NAME , cio2);if (r) {dev_err (&pci_dev->dev,"failed to request IRQ (%d)\n" , r); goto fail;
drivers/media/pci/ivtv/ivtv-driver.c +2 -1
@@ -1249,7 +1249,8 @@ static int ivtv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)/* Register IRQ */ retval =request_irq (itv->pdev->irq, ivtv_irq_handler, -IRQF_SHARED , itv->v4l2_dev.name, (void *)itv); +IRQF_SHARED |IRQF_USER_DATA , itv->v4l2_dev.name, + (void *)itv);if (retval) {IVTV_ERR ("Failed to register irq %d\n" , retval); goto free_i2c;
drivers/media/pci/meye/meye.c +1 -2
@@ -1674,8 +1674,7 @@ static int meye_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) } meye.mchip_irq = pcidev->irq; -if (request_irq (meye.mchip_irq, meye_irq, -IRQF_SHARED ,"meye" , meye_irq)) { +if (request_irq (meye.mchip_irq, meye_irq,IRQF_SHARED |IRQF_USER_DATA ,"meye" , meye_irq)) {v4l2_err (v4l2_dev,"request_irq failed\n" ); goto outreqirq; }
drivers/media/pci/ngene/ngene-core.c +2 -3
@@ -1332,8 +1332,7 @@ static int ngene_start(struct ngene *dev)ngene_init (dev); stat =request_irq (dev->pci_dev->irq, irq_handler, -IRQF_SHARED ,"nGene" , - (void *)dev); +IRQF_SHARED |IRQF_USER_DATA ,"nGene" , (void *)dev);if (stat <0 )return stat;
@@ -1372,7 +1371,7 @@ static int ngene_start(struct ngene *dev) dev->msi_enabled = true; } stat =request_irq (dev->pci_dev->irq, irq_handler, - flags,"nGene" , dev); + flags |IRQF_USER_DATA ,"nGene" , dev);if (stat <0 ) goto fail2;ngwritel (1 ,NGENE_INT_ENABLE );
drivers/media/pci/pluto2/pluto2.c +2 -1
@@ -623,7 +623,8 @@ static int pluto2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)pci_set_drvdata (pdev, pluto); - ret =request_irq (pdev->irq, pluto_irq,IRQF_SHARED ,DRIVER_NAME , pluto); + ret =request_irq (pdev->irq, pluto_irq,IRQF_SHARED |IRQF_USER_DATA , +DRIVER_NAME , pluto);if (ret <0 ) goto err_pci_iounmap;
drivers/media/pci/saa7134/saa7134-alsa.c +2 -2
@@ -1157,8 +1157,8 @@ static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum) err =request_irq (dev->pci->irq, saa7134_alsa_irq, -IRQF_SHARED , dev->name, - (void *) &dev->dmasound); +IRQF_SHARED |IRQF_USER_DATA , dev->name, + (void *)&dev->dmasound);if (err <0 ) { pr_err("%s: can't get IRQ %d for ALSA\n",
drivers/media/pci/saa7134/saa7134-core.c +1 -1
@@ -1158,7 +1158,7 @@ static int saa7134_initdev(struct pci_dev *pci_dev,/* get irq */ err =request_irq (pci_dev->irq, saa7134_irq, -IRQF_SHARED , dev->name, dev); +IRQF_SHARED |IRQF_USER_DATA , dev->name, dev);if (err <0 ) {pr_err ("%s: can't get IRQ %d\n" , dev->name,pci_dev->irq);
drivers/media/pci/saa7164/saa7164-core.c +4 -3
@@ -1188,8 +1188,8 @@ static bool saa7164_enable_msi(struct pci_dev *pci_dev, struct saa7164_dev *dev) }/* no error - so request an msi interrupt */ - err =request_irq (pci_dev->irq, saa7164_irq,0 , - dev->name, dev); + err =request_irq (pci_dev->irq, saa7164_irq, +IRQF_USER_DATA , dev->name, dev);if (err) {/* fall back to legacy interrupt */
@@ -1256,7 +1256,8 @@ static int saa7164_initdev(struct pci_dev *pci_dev,or msi is not enabled - fallback to shared interrupt */ err =request_irq (pci_dev->irq, saa7164_irq, -IRQF_SHARED , dev->name, dev); +IRQF_SHARED |IRQF_USER_DATA , dev->name, + dev);if (err <0 ) { printk(KERN_ERR "%s: can't get IRQ %d\n", dev->name,
drivers/media/pci/solo6x10/solo6x10-core.c +2 -2
@@ -559,8 +559,8 @@ static int solo_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)/* PLL locking time of 1ms */ mdelay (1 ); - ret =request_irq (pdev->irq, solo_isr,IRQF_SHARED ,SOLO6X10_NAME , - solo_dev); + ret =request_irq (pdev->irq, solo_isr,IRQF_SHARED |IRQF_USER_DATA , +SOLO6X10_NAME , solo_dev);if (ret) goto fail_probe;
drivers/media/pci/sta2x11/sta2x11_vip.c +2 -3
@@ -1073,9 +1073,8 @@ static int sta2x11_vip_init_one(struct pci_dev *pdev,spin_lock_init (&vip->slock); - ret =request_irq (pdev->irq, - (irq_handler_t ) vip_irq, -IRQF_SHARED ,KBUILD_MODNAME , vip); + ret =request_irq (pdev->irq, (irq_handler_t )vip_irq, +IRQF_SHARED |IRQF_USER_DATA ,KBUILD_MODNAME , vip);if (ret) {dev_err (&pdev->dev,"request_irq failed\n" ); ret = -ENODEV ;
drivers/media/pci/tw68/tw68-core.c +1 -1
@@ -307,7 +307,7 @@ static int tw68_initdev(struct pci_dev *pci_dev,/* get irq */ err =devm_request_irq (&pci_dev->dev, pci_dev->irq, tw68_irq, -IRQF_SHARED , dev->name, dev); +IRQF_SHARED |IRQF_USER_DATA , dev->name, dev);if (err <0 ) {pr_err ("%s: can't get IRQ %d\n" , dev->name, pci_dev->irq);
drivers/media/pci/tw686x/tw686x-core.c +2 -2
@@ -318,8 +318,8 @@ static int tw686x_probe(struct pci_dev *pci_dev,spin_lock_init (&dev->lock); - err =request_irq (pci_dev->irq, tw686x_irq,IRQF_SHARED , - dev->name, dev); + err =request_irq (pci_dev->irq, tw686x_irq, +IRQF_SHARED |IRQF_USER_DATA , dev->name, dev);if (err <0 ) {dev_err (&pci_dev->dev,"unable to request interrupt\n" ); goto iounmap;
drivers/media/platform/aspeed-video.c +3 -2
@@ -1600,8 +1600,9 @@ static int aspeed_video_init(struct aspeed_video *video)return -ENODEV ; } - rc =devm_request_irq (dev, irq, aspeed_video_irq,IRQF_SHARED , -DEVICE_NAME , video); + rc =devm_request_irq (dev, irq, aspeed_video_irq, +IRQF_SHARED |IRQF_USER_DATA ,DEVICE_NAME , + video);if (rc <0 ) {dev_err (dev,"Unable to request IRQ %d\n" , irq);return rc;
drivers/media/platform/marvell-ccic/cafe-driver.c +2 -1
@@ -508,7 +508,8 @@ static int cafe_pci_probe(struct pci_dev *pdev, goto out_disable; } mcam->regs_size =pci_resource_len (pdev,0 ); - ret =request_irq (pdev->irq, cafe_irq,IRQF_SHARED ,"cafe-ccic" , cam); + ret =request_irq (pdev->irq, cafe_irq,IRQF_SHARED |IRQF_USER_DATA , +"cafe-ccic" , cam);if (ret) goto out_iounmap;
drivers/media/rc/fintek-cir.c +1 -2
@@ -552,8 +552,7 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id fintek->cir_port_len, FINTEK_DRIVER_NAME)) goto exit_free_dev_rdev; -if (request_irq (fintek->cir_irq, fintek_cir_isr,IRQF_SHARED , -FINTEK_DRIVER_NAME , (void *)fintek)) +if (request_irq (fintek->cir_irq, fintek_cir_isr,IRQF_SHARED |IRQF_USER_DATA ,FINTEK_DRIVER_NAME , (void *)fintek)) goto exit_free_cir_addr; ret =rc_register_device (rdev);
drivers/media/rc/gpio-ir-recv.c +1 -1
@@ -101,7 +101,7 @@ static int gpio_ir_recv_probe(struct platform_device *pdev)platform_set_drvdata (pdev, gpio_dev);return devm_request_irq (dev, gpio_dev->irq, gpio_ir_recv_irq, -IRQF_TRIGGER_FALLING |IRQF_TRIGGER_RISING , +IRQF_TRIGGER_FALLING |IRQF_TRIGGER_RISING |IRQF_USER_DATA ,"gpio-ir-recv-irq" , gpio_dev); }
drivers/media/rc/ir-hix5hd2.c +1 -2
@@ -275,8 +275,7 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)if (ret <0 ) goto clkerr; -if (devm_request_irq (dev, priv->irq, hix5hd2_ir_rx_interrupt, -0 , pdev->name, priv) <0 ) { +if (devm_request_irq (dev, priv->irq, hix5hd2_ir_rx_interrupt,IRQF_USER_DATA , pdev->name, priv) <0 ) {dev_err (dev,"IRQ %d register failed\n" , priv->irq); ret = -EINVAL ; goto regerr;
drivers/media/rc/ite-cir.c +1 -2
@@ -1593,8 +1593,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id dev_desc->io_region_size, ITE_DRIVER_NAME)) goto exit_unregister_device; -if (request_irq (itdev->cir_irq, ite_cir_isr,IRQF_SHARED , -ITE_DRIVER_NAME , (void *)itdev)) +if (request_irq (itdev->cir_irq, ite_cir_isr,IRQF_SHARED |IRQF_USER_DATA ,ITE_DRIVER_NAME , (void *)itdev)) goto exit_release_cir_addr;ite_pr (KERN_NOTICE ,"driver has been successfully loaded\n" );
drivers/media/rc/nuvoton-cir.c +2 -1
@@ -1049,7 +1049,8 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id)return -EBUSY ; ret =devm_request_irq (&pdev->dev, nvt->cir_irq, nvt_cir_isr, -IRQF_SHARED ,NVT_DRIVER_NAME , nvt); +IRQF_SHARED |IRQF_USER_DATA ,NVT_DRIVER_NAME , + nvt);if (ret)return ret;
drivers/media/rc/serial_ir.c +1 -1
@@ -543,7 +543,7 @@ static int serial_ir_probe(struct platform_device *dev)timer_setup (&serial_ir.timeout_timer, serial_ir_timeout,0 ); result =devm_request_irq (&dev->dev, irq, serial_ir_irq_handler, - share_irq ?IRQF_SHARED :0 , + (share_irq ?IRQF_SHARED :0 ) |IRQF_USER_DATA ,KBUILD_MODNAME , &hardware);if (result <0 ) {if (result == -EBUSY )
drivers/media/rc/sir_ir.c +2 -1
@@ -355,7 +355,8 @@ static int sir_ir_probe(struct platform_device *dev)pr_err ("i/o port 0x%.4x already in use.\n" , io);return -EBUSY ; } - retval =devm_request_irq (&sir_ir_dev->dev, irq, sir_interrupt,0 , + retval =devm_request_irq (&sir_ir_dev->dev, irq, sir_interrupt, +IRQF_USER_DATA ,KBUILD_MODNAME ,NULL );if (retval <0 ) {pr_err ("IRQ %d already in use.\n" , irq);
drivers/media/rc/winbond-cir.c +1 -1
@@ -1123,7 +1123,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) } err =request_irq (data->irq, wbcir_irq_handler, -0 ,DRVNAME , device); +IRQF_USER_DATA ,DRVNAME , device);if (err) {dev_err (dev,"Failed to claim IRQ %u\n" , data->irq); err = -EBUSY ;
drivers/memstick/host/jmb38x_ms.c +1 -2
@@ -901,8 +901,7 @@ static struct memstick_host *jmb38x_ms_alloc_host(struct jmb38x_ms *jm, int cnt)timer_setup (&host->timer, jmb38x_ms_abort,0 ); -if (!request_irq (host->irq, jmb38x_ms_isr,IRQF_SHARED , host->host_id, - msh)) +if (!request_irq (host->irq, jmb38x_ms_isr,IRQF_SHARED |IRQF_USER_DATA , host->host_id, msh))return msh;iounmap (host->addr);
drivers/message/fusion/mptbase.c +2 -1
@@ -2425,7 +2425,8 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)else ioc->msi_enable =0 ; rc =request_irq (ioc->pcidev->irq, mpt_interrupt, -IRQF_SHARED , ioc->name, ioc); +IRQF_SHARED |IRQF_USER_DATA , + ioc->name, ioc);if (rc <0 ) { printk(MYIOC_s_ERR_FMT "Unable to allocate " "interrupt %d!\n",
drivers/mfd/ezx-pcap.c +2 -2
@@ -479,8 +479,8 @@ static int ezx_pcap_probe(struct spi_device *spi) adc_irq =pcap_to_irq (pcap, (pdata->config &PCAP_SECOND_PORT ) ?PCAP_IRQ_ADCDONE2 :PCAP_IRQ_ADCDONE ); - ret =devm_request_irq (&spi->dev, adc_irq, pcap_adc_irq,0 ,"ADC" , - pcap); + ret =devm_request_irq (&spi->dev, adc_irq, pcap_adc_irq, +IRQF_USER_DATA ,"ADC" , pcap);if (ret) goto free_irqchip;
drivers/misc/ibmasm/module.c +3 -1
@@ -114,7 +114,9 @@ static int ibmasm_init_one(struct pci_dev *pdev, const struct pci_device_id *id) goto error_ioremap; } - result =request_irq (sp->irq, ibmasm_interrupt_handler,IRQF_SHARED , sp->devname, (void *)sp); + result =request_irq (sp->irq, ibmasm_interrupt_handler, +IRQF_SHARED |IRQF_USER_DATA , sp->devname, + (void *)sp);if (result) {dev_err (sp->dev,"Failed to register interrupt handler\n" ); goto error_request_irq;
drivers/misc/sgi-gru/grufile.c +5 -2
@@ -385,7 +385,9 @@ static int gru_chiplet_setup_tlb_irq(int chiplet, char *irq_name,return ret; } - ret =request_irq (irq, irq_handler,0 , irq_name,NULL ); + ret =request_irq (irq, irq_handler, +IRQF_USER_DATA , irq_name, +NULL );if (ret) {printk (KERN_ERR "%s: request_irq failed, errno=%d\n" ,GRU_DRIVER_ID_STR , -ret);
@@ -433,7 +435,8 @@ static int gru_chiplet_setup_tlb_irq(int chiplet, char *irq_name,return irq; } - ret =request_irq (irq, irq_handler,0 , irq_name,NULL ); + ret =request_irq (irq, irq_handler,IRQF_USER_DATA , + irq_name,NULL );if (ret) {uv_teardown_irq (irq); printk(KERN_ERR "%s: request_irq failed, errno=%d\n",
drivers/misc/sgi-xp/xpc_uv.c +2 -1
@@ -259,7 +259,8 @@ xpc_create_gru_mq_uv(unsigned int mq_size, int cpu, char *irq_name,if (ret !=0 ) goto out_4; - ret =request_irq (mq->irq, irq_handler,0 , irq_name,NULL ); + ret =request_irq (mq->irq, irq_handler, +IRQF_USER_DATA , irq_name,NULL );if (ret !=0 ) {dev_err (xpc_part,"request_irq(irq=%d) returned error=%d\n" , mq->irq, -ret);
drivers/mmc/host/mtk-sd.c +2 -1
@@ -2227,7 +2227,8 @@ static int msdc_drv_probe(struct platform_device *pdev)msdc_init_hw (host); ret =devm_request_irq (&pdev->dev, host->irq, msdc_irq, -IRQF_TRIGGER_LOW |IRQF_ONESHOT , pdev->name, host); +IRQF_TRIGGER_LOW |IRQF_ONESHOT |IRQF_USER_DATA , + pdev->name, host);if (ret) goto release;
drivers/net/arcnet/arc-rimi.c +1 -1
@@ -136,7 +136,7 @@ static int __init arcrimi_found(struct net_device *dev) }/* reserve the irq */ -if (request_irq (dev->irq, arcnet_interrupt,0 ,"arcnet (RIM I)" , dev)) { +if (request_irq (dev->irq, arcnet_interrupt,IRQF_USER_DATA ,"arcnet (RIM I)" , dev)) {iounmap (p);release_mem_region (dev->mem_start,MIRROR_SIZE );arc_printk (D_NORMAL , dev,"Can't get IRQ %d!\n" , dev->irq);
drivers/net/arcnet/com20020.c +1 -2
@@ -240,8 +240,7 @@ int com20020_found(struct net_device *dev, int shared)arcnet_outb (dev->dev_addr[0 ], ioaddr,COM20020_REG_W_XREG );/* reserve the irq */ -if (request_irq (dev->irq, arcnet_interrupt, shared, -"arcnet (COM20020)" , dev)) { +if (request_irq (dev->irq, arcnet_interrupt, shared |IRQF_USER_DATA ,"arcnet (COM20020)" , dev)) {arc_printk (D_NORMAL , dev,"Can't get IRQ %d!\n" , dev->irq);return -ENODEV ; }
drivers/net/arcnet/com90io.c +1 -2
@@ -225,8 +225,7 @@ static int __init com90io_found(struct net_device *dev)int err;/* Reserve the irq */ -if (request_irq (dev->irq, arcnet_interrupt,0 , -"arcnet (COM90xx-IO)" , dev)) { +if (request_irq (dev->irq, arcnet_interrupt,IRQF_USER_DATA ,"arcnet (COM90xx-IO)" , dev)) {arc_printk (D_NORMAL , dev,"Can't get IRQ %d!\n" , dev->irq);return -ENODEV ; }
drivers/net/arcnet/com90xx.c +1 -1
@@ -508,7 +508,7 @@ static int __init com90xx_found(int ioaddr, int airq, u_long shmem, goto err_free_dev;/* reserve the irq */ -if (request_irq (airq, arcnet_interrupt,0 ,"arcnet (90xx)" , dev)) { +if (request_irq (airq, arcnet_interrupt,IRQF_USER_DATA ,"arcnet (90xx)" , dev)) {arc_printk (D_NORMAL , dev,"Can't get IRQ %d!\n" , airq); goto err_release_mem; }
drivers/net/can/cc770/cc770.c +2 -2
@@ -782,8 +782,8 @@ static int cc770_open(struct net_device *dev)if (err)return err; - err =request_irq (dev->irq, &cc770_interrupt, priv->irq_flags, - dev->name, dev); + err =request_irq (dev->irq, &cc770_interrupt, + priv->irq_flags |IRQF_USER_DATA , dev->name, dev);if (err) {close_candev (dev);return -EAGAIN ;
drivers/net/can/peak_canfd/peak_pciefd_main.c +3 -5
@@ -415,11 +415,9 @@ static int pciefd_pre_cmd(struct peak_canfd_priv *ucan)break ;/* going into operational mode: setup IRQ handler */ - err =request_irq (priv->ucan.ndev->irq, - pciefd_irq_handler, -IRQF_SHARED , -PCIEFD_DRV_NAME , - priv); + err =request_irq (priv->ucan.ndev->irq, pciefd_irq_handler, +IRQF_SHARED |IRQF_USER_DATA , +PCIEFD_DRV_NAME , priv);if (err)return err;
drivers/net/can/sja1000/ems_pcmcia.c +2 -2
@@ -243,8 +243,8 @@ static int ems_pcmcia_add_card(struct pcmcia_device *pdev, unsigned long base)free_sja1000dev (dev); } - err =request_irq (dev->irq, &ems_pcmcia_interrupt,IRQF_SHARED , -DRV_NAME , card); + err =request_irq (dev->irq, &ems_pcmcia_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,DRV_NAME , card);if (!err)return 0 ;
drivers/net/can/sja1000/peak_pcmcia.c +2 -1
@@ -695,7 +695,8 @@ static int pcan_probe(struct pcmcia_device *pdev)timer_setup (&card->led_timer, pcan_led_timer,0 );/* request the given irq */ - err =request_irq (pdev->irq, &pcan_isr,IRQF_SHARED ,PCC_NAME , card); + err =request_irq (pdev->irq, &pcan_isr,IRQF_SHARED |IRQF_USER_DATA , +PCC_NAME , card);if (err) {dev_err (&pdev->dev,"couldn't request irq%d\n" , pdev->irq); goto probe_err_5;
drivers/net/can/sja1000/sja1000.c +3 -2
@@ -581,8 +581,9 @@ static int sja1000_open(struct net_device *dev)/* register interrupt handler, if not done by the device driver */ if (!(priv->flags &SJA1000_CUSTOM_IRQ_HANDLER )) { - err =request_irq (dev->irq, sja1000_interrupt, priv->irq_flags, - dev->name, (void *)dev); + err =request_irq (dev->irq, sja1000_interrupt, + priv->irq_flags |IRQF_USER_DATA , dev->name, + (void *)dev);if (err) {close_candev (dev);return -EAGAIN ;
drivers/net/ethernet/3com/3c509.c +2 -1
@@ -670,7 +670,8 @@ el3_open(struct net_device *dev)outw (RxReset, ioaddr +EL3_CMD );outw (SetStatusEnb |0x00 , ioaddr +EL3_CMD ); - i =request_irq (dev->irq, el3_interrupt,0 , dev->name, dev); + i =request_irq (dev->irq, el3_interrupt, +IRQF_USER_DATA , dev->name, dev);if (i)return i;
drivers/net/ethernet/3com/3c515.c +2 -4
@@ -764,13 +764,11 @@ static int corkscrew_open(struct net_device *dev)/* Corkscrew: Cannot share ISA resources. */ if (dev->irq ==0 || dev->dma ==0 || -request_irq (dev->irq, corkscrew_interrupt,0 , - vp->product_name, dev)) +request_irq (dev->irq, corkscrew_interrupt,IRQF_USER_DATA , vp->product_name, dev))return -EAGAIN ;enable_dma (dev->dma);set_dma_mode (dev->dma,DMA_MODE_CASCADE ); - }else if (request_irq (dev->irq, corkscrew_interrupt,IRQF_SHARED , - vp->product_name, dev)) { + }else if (request_irq (dev->irq, corkscrew_interrupt,IRQF_SHARED |IRQF_USER_DATA , vp->product_name, dev)) {return -EAGAIN ; }
drivers/net/ethernet/8390/axnet_cs.c +2 -1
@@ -474,7 +474,8 @@ static int axnet_open(struct net_device *dev)return -ENODEV ;outb_p (0xFF , nic_base +EN0_ISR );/* Clear bogus intr. */ - ret =request_irq (dev->irq, ei_irq_wrapper,IRQF_SHARED ,"axnet_cs" , dev); + ret =request_irq (dev->irq, ei_irq_wrapper,IRQF_SHARED |IRQF_USER_DATA , +"axnet_cs" , dev);if (ret)return ret;
drivers/net/ethernet/8390/ne.c +2 -1
@@ -492,7 +492,8 @@ static int __init ne_probe1(struct net_device *dev, unsigned long ioaddr)/* Snarf the interrupt now. There's no point in waiting since we cannot share and the board will usually be enabled. */ - ret =request_irq (dev->irq, eip_interrupt,0 , name, dev); + ret =request_irq (dev->irq, eip_interrupt, +IRQF_USER_DATA , name, dev);if (ret) {pr_cont (" unable to get IRQ %d (errno=%d).\n" , dev->irq, ret); goto err_out;
drivers/net/ethernet/8390/ne2k-pci.c +2 -1
@@ -431,7 +431,8 @@ static int ne2k_pci_set_fdx(struct net_device *dev)static int ne2k_pci_open (struct net_device *dev) { -int ret =request_irq (dev->irq, ei_interrupt,IRQF_SHARED , dev->name, dev); +int ret =request_irq (dev->irq, ei_interrupt, +IRQF_SHARED |IRQF_USER_DATA , dev->name, dev);if (ret)return ret;
drivers/net/ethernet/8390/pcnet_cs.c +2 -1
@@ -905,7 +905,8 @@ static int pcnet_open(struct net_device *dev)set_misc_reg (dev);outb_p (0xFF , nic_base +EN0_ISR );/* Clear bogus intr. */ - ret =request_irq (dev->irq, ei_irq_wrapper,IRQF_SHARED , dev->name, dev); + ret =request_irq (dev->irq, ei_irq_wrapper,IRQF_SHARED |IRQF_USER_DATA , + dev->name, dev);if (ret)return ret;
drivers/net/ethernet/8390/smc-ultra.c +2 -1
@@ -390,7 +390,8 @@ ultra_open(struct net_device *dev)unsigned char irq2reg[] = {0 ,0 ,0x04 ,0x08 ,0 ,0x0C ,0 ,0x40 ,0 ,0x04 ,0x44 ,0x48 ,0 ,0 ,0 ,0x4C , }; - retval =request_irq (dev->irq, ei_interrupt,0 , dev->name, dev); + retval =request_irq (dev->irq, ei_interrupt, +IRQF_USER_DATA , dev->name, dev);if (retval)return retval;
drivers/net/ethernet/8390/wd.c +2 -1
@@ -310,7 +310,8 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)/* Snarf the interrupt now. There's no point in waiting since we cannot share and the board will usually be enabled. */ - i =request_irq (dev->irq, ei_interrupt,0 ,DRV_NAME , dev); + i =request_irq (dev->irq, ei_interrupt, +IRQF_USER_DATA ,DRV_NAME , dev);if (i) {pr_cont (" unable to get IRQ %d.\n" , dev->irq);return i;
drivers/net/ethernet/agere/et131x.c +2 -2
@@ -3621,8 +3621,8 @@ static int et131x_open(struct net_device *netdev)msecs_to_jiffies (TX_ERROR_PERIOD );add_timer (&adapter->error_timer); - result =request_irq (irq, et131x_isr, -IRQF_SHARED , netdev->name, netdev); + result =request_irq (irq, et131x_isr,IRQF_SHARED |IRQF_USER_DATA , + netdev->name, netdev);if (result) {dev_err (&pdev->dev,"could not register IRQ %d\n" , irq);return result;
drivers/net/ethernet/amd/lance.c +1 -1
@@ -753,7 +753,7 @@ lance_open(struct net_device *dev)int i;if (dev->irq ==0 || -request_irq (dev->irq, lance_interrupt,0 , dev->name, dev)) { +request_irq (dev->irq, lance_interrupt,IRQF_USER_DATA , dev->name, dev)) {return -EAGAIN ; }
drivers/net/ethernet/amd/ni65.c +3 -2
@@ -294,8 +294,9 @@ static void ni65_set_performance(struct priv *p)static int ni65_open (struct net_device *dev) {struct priv *p = dev->ml_priv; -int irqval =request_irq (dev->irq, ni65_interrupt,0 , - cards[p->cardno].cardname,dev); +int irqval =request_irq (dev->irq, ni65_interrupt, +IRQF_USER_DATA , + cards[p->cardno].cardname, dev);if (irqval) {printk (KERN_ERR "%s: unable to get IRQ %d (irqval=%d).\n" , dev->name,dev->irq, irqval);
drivers/net/ethernet/atheros/atlx/atl1.c +2 -2
@@ -2637,8 +2637,8 @@ static s32 atl1_up(struct atl1_adapter *adapter) irq_flags |=IRQF_SHARED ; } - err =request_irq (adapter->pdev->irq, atl1_intr, irq_flags, - netdev->name, netdev); + err =request_irq (adapter->pdev->irq, atl1_intr, + irq_flags |IRQF_USER_DATA , netdev->name, netdev);if (unlikely (err)) goto err_up;
drivers/net/ethernet/atheros/atlx/atl2.c +2 -2
@@ -670,8 +670,8 @@ static int atl2_request_irq(struct atl2_adapter *adapter)if (adapter->have_msi) flags &= ~IRQF_SHARED ; -return request_irq (adapter->pdev->irq, atl2_intr, flags, netdev->name, - netdev); +return request_irq (adapter->pdev->irq, atl2_intr, + flags |IRQF_USER_DATA , netdev->name, netdev); }/**
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +5 -11
@@ -407,9 +407,8 @@ static int request_msix_data_irqs(struct adapter *adap)for (j =0 ; j < nqsets; ++j) { err =request_irq (adap->msix_info[qidx +1 ].vec, -t3_intr_handler (adap, - adap->sge.qs[qidx]. - rspq.polling),0 , +t3_intr_handler (adap, adap->sge.qs[qidx].rspq.polling), +IRQF_USER_DATA , adap->msix_info[qidx +1 ].desc, &adap->sge.qs[qidx]);if (err) {
@@ -1264,7 +1263,8 @@ static int cxgb_up(struct adapter *adap)if (adap->flags &USING_MSIX ) {name_msix_vecs (adap); err =request_irq (adap->msix_info[0 ].vec, - t3_async_intr_handler,0 , + t3_async_intr_handler, +IRQF_USER_DATA , adap->msix_info[0 ].desc, adap);if (err) goto irq_err;
@@ -1274,13 +1274,7 @@ static int cxgb_up(struct adapter *adap)free_irq (adap->msix_info[0 ].vec, adap); goto irq_err; } - }else if ((err =request_irq (adap->pdev->irq, -t3_intr_handler (adap, - adap->sge.qs[0 ].rspq. - polling), - (adap->flags &USING_MSI ) ? -0 :IRQF_SHARED , - adap->name, adap))) + }else if ((err =request_irq (adap->pdev->irq,t3_intr_handler (adap, adap->sge.qs[0 ].rspq.polling), ((adap->flags &USING_MSI ) ?0 :IRQF_SHARED ) |IRQF_USER_DATA , adap->name, adap))) goto irq_err;enable_all_napi (adap);
drivers/net/ethernet/micrel/ks8851_mll.c +2 -1
@@ -924,7 +924,8 @@ static int ks_net_open(struct net_device *netdev)netif_dbg (ks, ifup, ks->netdev,"%s - entry\n" , __func__);/* reset the HW */ - err =request_irq (netdev->irq, ks_irq,KS_INT_FLAGS ,DRV_NAME , netdev); + err =request_irq (netdev->irq, ks_irq,KS_INT_FLAGS |IRQF_USER_DATA , +DRV_NAME , netdev);if (err) {pr_err ("Failed to request IRQ: %d: %d\n" , netdev->irq, err);
drivers/net/ethernet/microchip/lan743x_main.c +3 -4
@@ -385,10 +385,9 @@ static int lan743x_intr_register_isr(struct lan743x_adapter *adapter, vector->handler = handler; vector->context = context; - ret =request_irq (vector->irq, - lan743x_intr_entry_isr, - (flags &LAN743X_VECTOR_FLAG_IRQ_SHARED ) ? -IRQF_SHARED :0 ,DRIVER_NAME , vector); + ret =request_irq (vector->irq, lan743x_intr_entry_isr, + ((flags &LAN743X_VECTOR_FLAG_IRQ_SHARED ) ?IRQF_SHARED :0 ) |IRQF_USER_DATA , +DRIVER_NAME , vector);if (ret) { vector->handler =NULL ; vector->context =NULL ;
drivers/net/ethernet/realtek/atp.c +2 -1
@@ -433,7 +433,8 @@ static int net_open(struct net_device *dev)/* The interrupt line is turned off (tri-stated) when the device isn't in use. That's especially important for "attached" interfaces where the port or interrupt may be shared. */ - ret =request_irq (dev->irq, atp_interrupt,0 , dev->name, dev); + ret =request_irq (dev->irq, atp_interrupt, +IRQF_USER_DATA , dev->name, dev);if (ret)return ret;
drivers/net/fddi/skfp/skfddi.c +2 -2
@@ -486,8 +486,8 @@ static int skfp_open(struct net_device *dev)pr_debug ("entering skfp_open\n" );/* Register IRQ - support shared interrupts by passing device ptr */ - err =request_irq (dev->irq, skfp_interrupt,IRQF_SHARED , - dev->name, dev); + err =request_irq (dev->irq, skfp_interrupt, +IRQF_SHARED |IRQF_USER_DATA , dev->name, dev);if (err)return err;
drivers/net/hamradio/baycom_ser_fdx.c +1 -2
@@ -447,8 +447,7 @@ static int ser12_open(struct net_device *dev)outb (0 ,FCR (dev->base_addr));/* disable FIFOs */ outb (0x0d ,MCR (dev->base_addr));outb (0 ,IER (dev->base_addr)); -if (request_irq (dev->irq, ser12_interrupt,IRQF_SHARED , -"baycom_ser_fdx" , dev)) { +if (request_irq (dev->irq, ser12_interrupt,IRQF_SHARED |IRQF_USER_DATA ,"baycom_ser_fdx" , dev)) {release_region (dev->base_addr,SER12_EXTENT );return -EBUSY ; }
drivers/net/hamradio/baycom_ser_hdx.c +1 -2
@@ -490,8 +490,7 @@ static int ser12_open(struct net_device *dev)outb (0 ,FCR (dev->base_addr));/* disable FIFOs */ outb (0x0d ,MCR (dev->base_addr));outb (0 ,IER (dev->base_addr)); -if (request_irq (dev->irq, ser12_interrupt,IRQF_SHARED , -"baycom_ser12" , dev)) { +if (request_irq (dev->irq, ser12_interrupt,IRQF_SHARED |IRQF_USER_DATA ,"baycom_ser12" , dev)) {release_region (dev->base_addr,SER12_EXTENT );return -EBUSY ; }
drivers/net/hamradio/scc.c +1 -3
@@ -1737,9 +1737,7 @@ static int scc_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)if (!Ivec[hwcfg.irq].used && hwcfg.irq) { -if (request_irq (hwcfg.irq, scc_isr, -0 ,"AX.25 SCC" , - (void *)(long ) hwcfg.irq)) +if (request_irq (hwcfg.irq, scc_isr,IRQF_USER_DATA ,"AX.25 SCC" , (void *)(long )hwcfg.irq))printk (KERN_WARNING "z8530drv: warning, cannot get IRQ %d\n" , hwcfg.irq);else Ivec[hwcfg.irq].used =1 ;
drivers/net/hamradio/yam.c +1 -1
@@ -877,7 +877,7 @@ static int yam_open(struct net_device *dev) goto out_release_base; }outb (0 ,IER (dev->base_addr)); -if (request_irq (dev->irq, yam_interrupt,IRQF_SHARED , dev->name, dev)) { +if (request_irq (dev->irq, yam_interrupt,IRQF_SHARED |IRQF_USER_DATA , dev->name, dev)) {printk (KERN_ERR "%s: irq %d busy\n" , dev->name, dev->irq); ret = -EBUSY ; goto out_release_base;
drivers/net/ieee802154/at86rf230.c +2 -1
@@ -1749,7 +1749,8 @@ static int at86rf230_probe(struct spi_device *spi) irq_type =IRQF_TRIGGER_HIGH ; rc =devm_request_irq (&spi->dev, spi->irq, at86rf230_isr, -IRQF_SHARED | irq_type,dev_name (&spi->dev), lp); +IRQF_SHARED | irq_type |IRQF_USER_DATA , +dev_name (&spi->dev), lp);if (rc) goto free_dev;
drivers/net/ieee802154/ca8210.c +3 -7
@@ -2884,13 +2884,9 @@ static int ca8210_interrupt_init(struct spi_device *spi)return pdata->irq_id; } - ret =request_irq ( - pdata->irq_id, - ca8210_interrupt_handler, -IRQF_TRIGGER_FALLING , -"ca8210-irq" , -spi_get_drvdata (spi) - ); + ret =request_irq (pdata->irq_id, ca8210_interrupt_handler, +IRQF_TRIGGER_FALLING |IRQF_USER_DATA ,"ca8210-irq" , +spi_get_drvdata (spi));if (ret) {dev_crit (&spi->dev,"request_irq %d failed\n" , pdata->irq_id);gpio_unexport (pdata->gpio_irq);
drivers/net/ieee802154/mcr20a.c +2 -1
@@ -1314,7 +1314,8 @@ mcr20a_probe(struct spi_device *spi) irq_type =IRQF_TRIGGER_FALLING ; ret =devm_request_irq (&spi->dev, spi->irq, mcr20a_irq_isr, - irq_type,dev_name (&spi->dev), lp); + irq_type |IRQF_USER_DATA ,dev_name (&spi->dev), + lp);if (ret) {dev_err (&spi->dev,"could not request_irq for mcr20a\n" ); ret = -ENODEV ;
drivers/net/ieee802154/mrf24j40.c +2 -1
@@ -1346,7 +1346,8 @@ static int mrf24j40_probe(struct spi_device *spi) irq_type =IRQF_TRIGGER_LOW ; ret =devm_request_irq (&spi->dev, spi->irq, mrf24j40_isr, - irq_type,dev_name (&spi->dev), devrec); + irq_type |IRQF_USER_DATA ,dev_name (&spi->dev), + devrec);if (ret) {dev_err (printdev (devrec),"Unable to get IRQ" ); goto err_register_device;
drivers/net/wan/cosa.c +1 -1
@@ -541,7 +541,7 @@ static int cosa_probe(int base, int irq, int dma) cosa->usage =0 ; cosa->nchannels =2 ;/* FIXME: how to determine this? */ -if (request_irq (cosa->irq, cosa_interrupt,0 , cosa->type, cosa)) { +if (request_irq (cosa->irq, cosa_interrupt,IRQF_USER_DATA , cosa->type, cosa)) { err =-1 ; goto err_out; }
drivers/net/wan/farsync.c +1 -1
@@ -2466,7 +2466,7 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent)dbg (DBG_PCI ,"kernel mem %p, ctlmem %p\n" , card->mem, card->ctlmem);/* Register the interrupt handler */ -if (request_irq (pdev->irq, fst_intr,IRQF_SHARED ,FST_DEV_NAME , card)) { +if (request_irq (pdev->irq, fst_intr,IRQF_SHARED |IRQF_USER_DATA ,FST_DEV_NAME , card)) {pr_err ("Unable to register interrupt %d\n" , card->irq); err = -ENODEV ; goto irq_fail;
drivers/net/wan/hostess_sv11.c +1 -2
@@ -219,8 +219,7 @@ static struct z8530_dev *sv11_init(int iobase, int irq)/* We want a fast IRQ for this device. Actually we'd like an even faster IRQ ;) - This is one driver RtLinux is made for */ -if (request_irq (irq, z8530_interrupt,0 , -"Hostess SV11" , sv) <0 ) { +if (request_irq (irq, z8530_interrupt,IRQF_USER_DATA ,"Hostess SV11" , sv) <0 ) {pr_warn ("IRQ %d already in use\n" , irq); goto err_irq; }
drivers/net/wan/sbni.c +1 -1
@@ -1175,7 +1175,7 @@ sbni_open( struct net_device *dev ) } } -if (request_irq (dev->irq, sbni_interrupt,IRQF_SHARED , dev->name, dev) ) { +if (request_irq (dev->irq, sbni_interrupt,IRQF_SHARED |IRQF_USER_DATA , dev->name, dev)) {netdev_err (dev,"unable to get IRQ %d\n" , dev->irq);return -EAGAIN ; }
drivers/net/wan/sdla.c +1 -1
@@ -1452,7 +1452,7 @@ static int sdla_set_config(struct net_device *dev, struct ifmap *map) } err = -EAGAIN ; -if (request_irq (dev->irq, sdla_isr,0 , dev->name, dev)) +if (request_irq (dev->irq, sdla_isr,IRQF_USER_DATA , dev->name, dev)) goto fail;if (flp->type ==SDLA_S507 ) {
drivers/net/wan/sealevel.c +1 -2
@@ -265,8 +265,7 @@ static __init struct slvl_board *slvl_init(int iobase, int irq,/* We want a fast IRQ for this device. Actually we'd like an even faster IRQ ;) - This is one driver RtLinux is made for */ -if (request_irq (irq, z8530_interrupt,0 , -"SeaLevel" , dev) <0 ) { +if (request_irq (irq, z8530_interrupt,IRQF_USER_DATA ,"SeaLevel" , dev) <0 ) {pr_warn ("IRQ %d already in use\n" , irq); goto err_request_irq; }
drivers/net/wireless/broadcom/b43legacy/main.c +1 -1
@@ -2989,7 +2989,7 @@ static int b43legacy_wireless_core_start(struct b43legacy_wldev *dev)drain_txstatus_queue (dev); err =request_irq (dev->dev->irq, b43legacy_interrupt_handler, -IRQF_SHARED ,KBUILD_MODNAME , dev); +IRQF_SHARED |IRQF_USER_DATA ,KBUILD_MODNAME , dev);if (err) {b43legacyerr (dev->wl,"Cannot request IRQ-%d\n" , dev->dev->irq);
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +4 -3
@@ -116,9 +116,10 @@ int brcmf_sdiod_intr_register(struct brcmf_sdio_dev *sdiodev)spin_lock_init (&sdiodev->irq_en_lock); sdiodev->irq_en = true; - ret =request_irq (pdata->oob_irq_nr, brcmf_sdiod_oob_irqhandler, - pdata->oob_irq_flags,"brcmf_oob_intr" , - &sdiodev->func1->dev); + ret =request_irq (pdata->oob_irq_nr, + brcmf_sdiod_oob_irqhandler, + pdata->oob_irq_flags |IRQF_USER_DATA , +"brcmf_oob_intr" , &sdiodev->func1->dev);if (ret !=0 ) {brcmf_err ("request_irq failed %d\n" , ret);return ret;
drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c +1 -2
@@ -1167,8 +1167,7 @@ static struct brcms_info *brcms_attach(struct bcma_device *pdev) wl->pub->ieee_hw = hw;/* register our interrupt handler */ -if (request_irq (pdev->irq, brcms_isr, -IRQF_SHARED ,KBUILD_MODNAME , wl)) { +if (request_irq (pdev->irq, brcms_isr,IRQF_SHARED |IRQF_USER_DATA ,KBUILD_MODNAME , wl)) {wiphy_err (wl->wiphy,"wl%d: request_irq() failed\n" , unit); goto fail; }
drivers/net/wireless/cisco/airo.c +2 -2
@@ -1894,8 +1894,8 @@ static int airo_open(struct net_device *dev) {if (IS_ERR (ai->airo_thread_task))return (int )PTR_ERR (ai->airo_thread_task); - rc =request_irq (dev->irq, airo_interrupt,IRQF_SHARED , - dev->name, dev); + rc =request_irq (dev->irq, airo_interrupt, +IRQF_SHARED |IRQF_USER_DATA , dev->name, dev);if (rc) { airo_print_err(dev->name, "register interrupt %d failed, rc %d",
drivers/net/wireless/intel/ipw2x00/ipw2100.c +2 -2
@@ -6253,8 +6253,8 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev, }ipw2100_queues_initialize (priv); - err =request_irq (pci_dev->irq, - ipw2100_interrupt,IRQF_SHARED , dev->name, priv); + err =request_irq (pci_dev->irq, ipw2100_interrupt, +IRQF_SHARED |IRQF_USER_DATA , dev->name, priv);if (err) { printk(KERN_WARNING DRV_NAME "Error calling request_irq: %d.\n", pci_dev->irq);
drivers/net/wireless/intel/ipw2x00/ipw2200.c +2 -1
@@ -11686,7 +11686,8 @@ static int ipw_pci_probe(struct pci_dev *pdev,ipw_sw_reset (priv,1 ); - err =request_irq (pdev->irq, ipw_isr,IRQF_SHARED ,DRV_NAME , priv); + err =request_irq (pdev->irq, ipw_isr,IRQF_SHARED |IRQF_USER_DATA , +DRV_NAME , priv);if (err) {IPW_ERROR ("Error allocating IRQ %d\n" , pdev->irq); goto out_iounmap;
drivers/net/wireless/intel/iwlegacy/3945-mac.c +2 -1
@@ -3729,7 +3729,8 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)pci_enable_msi (il->pci_dev); - err =request_irq (il->pci_dev->irq, il_isr,IRQF_SHARED ,DRV_NAME , il); + err =request_irq (il->pci_dev->irq, il_isr, +IRQF_SHARED |IRQF_USER_DATA ,DRV_NAME , il);if (err) {IL_ERR ("Error allocating IRQ %d\n" , il->pci_dev->irq); goto out_disable_msi;
drivers/net/wireless/intel/iwlegacy/4965-mac.c +2 -1
@@ -6642,7 +6642,8 @@ il4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)pci_enable_msi (il->pci_dev); - err =request_irq (il->pci_dev->irq, il_isr,IRQF_SHARED ,DRV_NAME , il); + err =request_irq (il->pci_dev->irq, il_isr, +IRQF_SHARED |IRQF_USER_DATA ,DRV_NAME , il);if (err) {IL_ERR ("Error allocating IRQ %d\n" , il->pci_dev->irq); goto out_disable_msi;
drivers/net/wireless/intersil/hostap/hostap_pci.c +1 -2
@@ -335,8 +335,7 @@ static int prism2_pci_probe(struct pci_dev *pdev,pci_set_drvdata (pdev, dev); -if (request_irq (dev->irq, prism2_interrupt,IRQF_SHARED , dev->name, - dev)) { +if (request_irq (dev->irq, prism2_interrupt,IRQF_SHARED |IRQF_USER_DATA , dev->name, dev)) {printk (KERN_WARNING "%s: request_irq failed\n" , dev->name); goto fail; }else
drivers/net/wireless/intersil/hostap/hostap_plx.c +1 -2
@@ -549,8 +549,7 @@ static int prism2_plx_probe(struct pci_dev *pdev,pci_set_drvdata (pdev, dev); -if (request_irq (dev->irq, prism2_interrupt,IRQF_SHARED , dev->name, - dev)) { +if (request_irq (dev->irq, prism2_interrupt,IRQF_SHARED |IRQF_USER_DATA , dev->name, dev)) {printk (KERN_WARNING "%s: request_irq failed\n" , dev->name); goto fail; }else
drivers/net/wireless/intersil/orinoco/orinoco_nortel.c +2 -2
@@ -194,8 +194,8 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev,hermes_struct_init (&priv->hw, hermes_io,HERMES_16BIT_REGSPACING ); - err =request_irq (pdev->irq, orinoco_interrupt,IRQF_SHARED , -DRIVER_NAME , priv); + err =request_irq (pdev->irq, orinoco_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,DRIVER_NAME , priv);if (err) { printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); err = -EBUSY ;
drivers/net/wireless/intersil/orinoco/orinoco_pci.c +2 -2
@@ -150,8 +150,8 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,hermes_struct_init (&priv->hw, hermes_io,HERMES_32BIT_REGSPACING ); - err =request_irq (pdev->irq, orinoco_interrupt,IRQF_SHARED , -DRIVER_NAME , priv); + err =request_irq (pdev->irq, orinoco_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,DRIVER_NAME , priv);if (err) { printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); err = -EBUSY ;
drivers/net/wireless/intersil/orinoco/orinoco_plx.c +2 -2
@@ -233,8 +233,8 @@ static int orinoco_plx_init_one(struct pci_dev *pdev,hermes_struct_init (&priv->hw, hermes_io,HERMES_16BIT_REGSPACING ); - err =request_irq (pdev->irq, orinoco_interrupt,IRQF_SHARED , -DRIVER_NAME , priv); + err =request_irq (pdev->irq, orinoco_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,DRIVER_NAME , priv);if (err) { printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); err = -EBUSY ;
drivers/net/wireless/intersil/orinoco/orinoco_tmd.c +2 -2
@@ -136,8 +136,8 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev,hermes_struct_init (&priv->hw, hermes_io,HERMES_16BIT_REGSPACING ); - err =request_irq (pdev->irq, orinoco_interrupt,IRQF_SHARED , -DRIVER_NAME , priv); + err =request_irq (pdev->irq, orinoco_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,DRIVER_NAME , priv);if (err) { printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); err = -EBUSY ;
drivers/net/wireless/intersil/p54/p54pci.c +1 -1
@@ -435,7 +435,7 @@ static int p54p_open(struct ieee80211_hw *dev)init_completion (&priv->boot_comp); err =request_irq (priv->pdev->irq, p54p_interrupt, -IRQF_SHARED ,"p54pci" , dev); +IRQF_SHARED |IRQF_USER_DATA ,"p54pci" , dev);if (err) {dev_err (&priv->pdev->dev,"failed to register IRQ handler\n" );return err;
drivers/net/wireless/intersil/p54/p54spi.c +2 -2
@@ -635,8 +635,8 @@ static int p54spi_probe(struct spi_device *spi)gpio_direction_output (p54spi_gpio_power,0 );gpio_direction_input (p54spi_gpio_irq); - ret =request_irq (gpio_to_irq (p54spi_gpio_irq), - p54spi_interrupt,0 ,"p54spi" , + ret =request_irq (gpio_to_irq (p54spi_gpio_irq), p54spi_interrupt, +IRQF_USER_DATA ,"p54spi" , priv->spi);if (ret <0 ) {dev_err (&priv->spi->dev,"request_irq() failed" );
drivers/net/wireless/intersil/prism54/islpci_hotplug.c +1 -1
@@ -182,7 +182,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)/* request for the interrupt before uploading the firmware */ rvalue =request_irq (pdev->irq, islpci_interrupt, -IRQF_SHARED , ndev->name, priv); +IRQF_SHARED |IRQF_USER_DATA , ndev->name, priv);if (rvalue) {/* error, could not hook the handler to the irq */
drivers/net/wireless/marvell/libertas/if_cs.c +1 -1
@@ -736,7 +736,7 @@ static void if_cs_prog_firmware(struct lbs_private *priv, int ret,/* Now actually get the IRQ */ ret =request_irq (card->p_dev->irq, if_cs_interrupt, -IRQF_SHARED ,DRV_NAME , card); +IRQF_SHARED |IRQF_USER_DATA ,DRV_NAME , card);if (ret) {pr_err ("error in request_irq\n" );return ;
drivers/net/wireless/marvell/libertas/if_spi.c +2 -1
@@ -1167,7 +1167,8 @@ static int if_spi_probe(struct spi_device *spi)INIT_WORK (&card->resume_work, if_spi_resume_worker); err =request_irq (spi->irq, if_spi_host_interrupt, -IRQF_TRIGGER_FALLING ,"libertas_spi" , card); +IRQF_TRIGGER_FALLING |IRQF_USER_DATA , +"libertas_spi" , card);if (err) {pr_err ("can't get host irq line-- request_irq failed\n" ); goto terminate_workqueue;
drivers/net/wireless/marvell/mwifiex/main.c +3 -2
@@ -1602,8 +1602,9 @@ static void mwifiex_probe_of(struct mwifiex_adapter *adapter) } ret =devm_request_irq (dev, adapter->irq_wakeup, - mwifiex_irq_wakeup_handler,IRQF_TRIGGER_LOW , -"wifi_wake" , adapter); + mwifiex_irq_wakeup_handler, +IRQF_TRIGGER_LOW |IRQF_USER_DATA ,"wifi_wake" , + adapter);if (ret) {dev_err (dev,"Failed to request irq_wakeup %d (%d)\n" , adapter->irq_wakeup, ret);
drivers/net/wireless/marvell/mwifiex/pcie.c +5 -3
@@ -3033,7 +3033,8 @@ static int mwifiex_pcie_request_irq(struct mwifiex_adapter *adapter) card->msix_ctx[i].msg_id = i; ret =request_irq (card->msix_entries[i].vector, - mwifiex_pcie_interrupt,0 , + mwifiex_pcie_interrupt, +IRQF_USER_DATA ,"MWIFIEX_PCIE_MSIX" , &card->msix_ctx[i]);if (ret)
@@ -3064,8 +3065,9 @@ static int mwifiex_pcie_request_irq(struct mwifiex_adapter *adapter) card->share_irq_ctx.dev = pdev; card->share_irq_ctx.msg_id =-1 ; - ret =request_irq (pdev->irq, mwifiex_pcie_interrupt,IRQF_SHARED , -"MRVL_PCIE" , &card->share_irq_ctx); + ret =request_irq (pdev->irq, mwifiex_pcie_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,"MRVL_PCIE" , + &card->share_irq_ctx);if (ret) {pr_err ("request_irq failed: ret=%d\n" , ret);return -1 ;
drivers/net/wireless/marvell/mwl8k.c +2 -2
@@ -4696,7 +4696,7 @@ static int mwl8k_start(struct ieee80211_hw *hw)int rc; rc =request_irq (priv->pdev->irq, mwl8k_interrupt, -IRQF_SHARED ,MWL8K_NAME , hw); +IRQF_SHARED |IRQF_USER_DATA ,MWL8K_NAME , hw);if (rc) { priv->irq =-1 ;wiphy_err (hw->wiphy,"failed to register IRQ handler\n" );
@@ -5902,7 +5902,7 @@ static int mwl8k_probe_hw(struct ieee80211_hw *hw) priv->regs + MWL8K_HIU_A2H_INTERRUPT_STATUS_MASK); rc =request_irq (priv->pdev->irq, mwl8k_interrupt, -IRQF_SHARED ,MWL8K_NAME , hw); +IRQF_SHARED |IRQF_USER_DATA ,MWL8K_NAME , hw);if (rc) {wiphy_err (hw->wiphy,"failed to register IRQ handler\n" ); goto err_free_queues;
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c +2 -1
@@ -191,7 +191,8 @@ mt76x0e_probe(struct pci_dev *pdev, const struct pci_device_id *id)dev_info (dev->mt76.dev,"ASIC revision: %08x\n" , dev->mt76.rev); ret =devm_request_irq (dev->mt76.dev, pdev->irq, mt76x02_irq_handler, -IRQF_SHARED ,KBUILD_MODNAME , dev); +IRQF_SHARED |IRQF_USER_DATA ,KBUILD_MODNAME , + dev);if (ret) goto error;
drivers/net/wireless/mediatek/mt76/mt76x2/pci.c +2 -1
@@ -58,7 +58,8 @@ mt76pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)dev_info (dev->mt76.dev,"ASIC revision: %08x\n" , dev->mt76.rev); ret =devm_request_irq (dev->mt76.dev, pdev->irq, mt76x02_irq_handler, -IRQF_SHARED ,KBUILD_MODNAME , dev); +IRQF_SHARED |IRQF_USER_DATA ,KBUILD_MODNAME , + dev);if (ret) goto error;
drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c +2 -1
@@ -1095,7 +1095,8 @@ static int qtnf_pcie_pearl_probe(struct qtnf_bus *bus, unsigned int tx_bd_size)qtnf_disable_hdp_irqs (ps); ret =devm_request_irq (&pdev->dev, pdev->irq, - &qtnf_pcie_pearl_interrupt,0 , + &qtnf_pcie_pearl_interrupt, +IRQF_USER_DATA ,"qtnf_pearl_irq" , (void *)bus);if (ret) {pr_err ("failed to request pcie irq %d\n" , pdev->irq);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c +2 -1
@@ -1120,7 +1120,8 @@ static int qtnf_pcie_topaz_probe(struct qtnf_bus *bus, unsigned int tx_bd_num) ret =devm_request_irq (&pdev->dev, pdev->irq, &qtnf_pcie_topaz_interrupt, - irqflags,"qtnf_topaz_irq" , (void *)bus); + irqflags |IRQF_USER_DATA ,"qtnf_topaz_irq" , + (void *)bus);if (ret) {pr_err ("failed to request pcie irq %d\n" , pdev->irq);return ret;
drivers/net/wireless/ralink/rt2x00/rt2x00mmio.c +3 -3
@@ -167,9 +167,9 @@ int rt2x00mmio_initialize(struct rt2x00_dev *rt2x00dev)/* * Register interrupt handler. */ - status =request_irq (rt2x00dev->irq, - rt2x00dev->ops->lib->irq_handler, -IRQF_SHARED , rt2x00dev->name, rt2x00dev); + status =request_irq (rt2x00dev->irq, rt2x00dev->ops->lib->irq_handler, +IRQF_SHARED |IRQF_USER_DATA , rt2x00dev->name, + rt2x00dev);if (status) {rt2x00_err (rt2x00dev,"IRQ %d allocation failed (error %d)\n" , rt2x00dev->irq, status);
drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c +4 -2
@@ -1134,10 +1134,12 @@ static int rtl8180_start(struct ieee80211_hw *dev)if (priv->chip_family ==RTL818X_CHIP_FAMILY_RTL8187SE ) { ret =request_irq (priv->pdev->irq, rtl8187se_interrupt, -IRQF_SHARED ,KBUILD_MODNAME , dev); +IRQF_SHARED |IRQF_USER_DATA , +KBUILD_MODNAME , dev); }else { ret =request_irq (priv->pdev->irq, rtl8180_interrupt, -IRQF_SHARED ,KBUILD_MODNAME , dev); +IRQF_SHARED |IRQF_USER_DATA , +KBUILD_MODNAME , dev); }if (ret) {
drivers/net/wireless/realtek/rtlwifi/pci.c +2 -2
@@ -2108,7 +2108,7 @@ static int rtl_pci_intr_mode_msi(struct ieee80211_hw *hw)return ret; ret =request_irq (rtlpci->pdev->irq, &_rtl_pci_interrupt, -IRQF_SHARED ,KBUILD_MODNAME , hw); +IRQF_SHARED |IRQF_USER_DATA ,KBUILD_MODNAME , hw);if (ret <0 ) {pci_disable_msi (rtlpci->pdev);return ret;
@@ -2129,7 +2129,7 @@ static int rtl_pci_intr_mode_legacy(struct ieee80211_hw *hw)int ret; ret =request_irq (rtlpci->pdev->irq, &_rtl_pci_interrupt, -IRQF_SHARED ,KBUILD_MODNAME , hw); +IRQF_SHARED |IRQF_USER_DATA ,KBUILD_MODNAME , hw);if (ret <0 )return ret;
drivers/net/wireless/ti/wl1251/sdio.c +3 -1
@@ -274,7 +274,9 @@ static int wl1251_sdio_probe(struct sdio_func *func,if (wl->irq) {irq_set_status_flags (wl->irq,IRQ_NOAUTOEN ); - ret =request_irq (wl->irq, wl1251_line_irq,0 ,"wl1251" , wl); + ret =request_irq (wl->irq, wl1251_line_irq, +IRQF_USER_DATA ,"wl1251" , + wl);if (ret <0 ) {wl1251_error ("request_irq() failed: %d" , ret); goto disable;
drivers/net/wireless/ti/wl1251/spi.c +3 -2
@@ -307,8 +307,9 @@ static int wl1251_spi_probe(struct spi_device *spi) }irq_set_status_flags (wl->irq,IRQ_NOAUTOEN ); - ret =devm_request_irq (&spi->dev, wl->irq, wl1251_irq,0 , -DRIVER_NAME , wl); + ret =devm_request_irq (&spi->dev, wl->irq, wl1251_irq, +IRQF_USER_DATA ,DRIVER_NAME , + wl);if (ret <0 ) {wl1251_error ("request_irq() failed: %d" , ret); goto out_free;
drivers/ntb/hw/amd/ntb_hw_amd.c +7 -5
@@ -621,7 +621,8 @@ static int ndev_init_isr(struct amd_ntb_dev *ndev,for (i =0 ; i < msix_count; ++i) { ndev->vec[i].ndev = ndev; ndev->vec[i].num = i; - rc =request_irq (ndev->msix[i].vector, ndev_vec_isr,0 , + rc =request_irq (ndev->msix[i].vector, ndev_vec_isr, +IRQF_USER_DATA ,"ndev_vec_isr" , &ndev->vec[i]);if (rc) goto err_msix_request;
@@ -649,8 +650,9 @@ static int ndev_init_isr(struct amd_ntb_dev *ndev,if (rc) goto err_msi_enable; - rc =request_irq (pdev->irq, ndev_irq_isr,0 , -"ndev_irq_isr" , ndev); + rc =request_irq (pdev->irq, ndev_irq_isr, +IRQF_USER_DATA ,"ndev_irq_isr" , + ndev);if (rc) goto err_msi_request;
@@ -666,8 +668,8 @@ static int ndev_init_isr(struct amd_ntb_dev *ndev,/* Try to set up intx irq */ pci_intx (pdev,1 ); - rc =request_irq (pdev->irq, ndev_irq_isr,IRQF_SHARED , -"ndev_irq_isr" , ndev); + rc =request_irq (pdev->irq, ndev_irq_isr, +IRQF_SHARED |IRQF_USER_DATA ,"ndev_irq_isr" , ndev);if (rc) goto err_intx_request;
drivers/ntb/hw/intel/ntb_hw_gen1.c +7 -5
@@ -401,7 +401,8 @@ int ndev_init_isr(struct intel_ntb_dev *ndev,for (i =0 ; i < msix_count; ++i) { ndev->vec[i].ndev = ndev; ndev->vec[i].num = i; - rc =request_irq (ndev->msix[i].vector, ndev_vec_isr,0 , + rc =request_irq (ndev->msix[i].vector, ndev_vec_isr, +IRQF_USER_DATA ,"ndev_vec_isr" , &ndev->vec[i]);if (rc) goto err_msix_request;
@@ -430,8 +431,9 @@ int ndev_init_isr(struct intel_ntb_dev *ndev,if (rc) goto err_msi_enable; - rc =request_irq (pdev->irq, ndev_irq_isr,0 , -"ndev_irq_isr" , ndev); + rc =request_irq (pdev->irq, ndev_irq_isr, +IRQF_USER_DATA ,"ndev_irq_isr" , + ndev);if (rc) goto err_msi_request;
@@ -448,8 +450,8 @@ int ndev_init_isr(struct intel_ntb_dev *ndev,pci_intx (pdev,1 ); - rc =request_irq (pdev->irq, ndev_irq_isr,IRQF_SHARED , -"ndev_irq_isr" , ndev); + rc =request_irq (pdev->irq, ndev_irq_isr, +IRQF_SHARED |IRQF_USER_DATA ,"ndev_irq_isr" , ndev);if (rc) goto err_intx_request;
drivers/ntb/hw/mscc/ntb_hw_switchtec.c +4 -4
@@ -1448,14 +1448,14 @@ static int switchtec_ntb_init_db_msg_irq(struct switchtec_ntb *sndev) sndev->doorbell_irq =pci_irq_vector (sndev->stdev->pdev, doorbell_irq); sndev->message_irq =pci_irq_vector (sndev->stdev->pdev, message_irq); - rc =request_irq (sndev->doorbell_irq, - switchtec_ntb_doorbell_isr,0 , + rc =request_irq (sndev->doorbell_irq, switchtec_ntb_doorbell_isr, +IRQF_USER_DATA ,"switchtec_ntb_doorbell" , sndev);if (rc)return rc; - rc =request_irq (sndev->message_irq, - switchtec_ntb_message_isr,0 , + rc =request_irq (sndev->message_irq, switchtec_ntb_message_isr, +IRQF_USER_DATA ,"switchtec_ntb_message" , sndev);if (rc) {free_irq (sndev->doorbell_irq, sndev);
drivers/parport/parport_ax88796.c +2 -1
@@ -336,7 +336,8 @@ static int parport_ax88796_probe(struct platform_device *pdev)if (irq >=0 ) {/* request irq */ ret =request_irq (irq, parport_irq_handler, -IRQF_TRIGGER_FALLING , pdev->name, pp); +IRQF_TRIGGER_FALLING |IRQF_USER_DATA , + pdev->name, pp);if (ret <0 ) goto exit_port;
drivers/parport/parport_pc.c +1 -2
@@ -2190,8 +2190,7 @@ struct parport *parport_pc_probe_port(unsigned long int base, EPP_res =NULL ; }if (p->irq !=PARPORT_IRQ_NONE ) { -if (request_irq (p->irq, parport_irq_handler, - irqflags, p->name, p)) { +if (request_irq (p->irq, parport_irq_handler, irqflags |IRQF_USER_DATA , p->name, p)) {printk (KERN_WARNING "%s: irq %d in use, " "resorting to polled operation\n" , p->name, p->irq);
drivers/pci/controller/pcie-xilinx.c +1 -1
@@ -588,7 +588,7 @@ static int xilinx_pcie_parse_dt(struct xilinx_pcie_port *port) port->irq =irq_of_parse_and_map (node,0 ); err =devm_request_irq (dev, port->irq, xilinx_pcie_intr_handler, -IRQF_SHARED |IRQF_NO_THREAD , +IRQF_SHARED |IRQF_NO_THREAD |IRQF_USER_DATA ,"xilinx-pcie" , port);if (err) {dev_err (dev,"unable to request irq %d\n" , port->irq);
drivers/pci/controller/vmd.c +6 -5
@@ -766,8 +766,9 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)INIT_LIST_HEAD (&vmd->irqs[i].irq_list); err =devm_request_irq (&dev->dev,pci_irq_vector (dev, i), - vmd_irq,IRQF_NO_THREAD , -"vmd" , &vmd->irqs[i]); + vmd_irq, +IRQF_NO_THREAD |IRQF_USER_DATA ,"vmd" , + &vmd->irqs[i]);if (err)return err; }
@@ -825,9 +826,9 @@ static int vmd_resume(struct device *dev)int err, i;for (i =0 ; i < vmd->msix_count; i++) { - err =devm_request_irq (dev,pci_irq_vector (pdev, i), - vmd_irq,IRQF_NO_THREAD , -"vmd" , &vmd->irqs[i]); + err =devm_request_irq (dev,pci_irq_vector (pdev, i), vmd_irq, +IRQF_NO_THREAD |IRQF_USER_DATA ,"vmd" , + &vmd->irqs[i]);if (err)return err; }
drivers/pci/hotplug/cpci_hotplug_core.c +1 -5
@@ -525,11 +525,7 @@ cpci_hp_register_controller(struct cpci_hp_controller *new_controller)if (!(new_controller->ops->enable_irq && new_controller->ops->disable_irq)) status = -EINVAL ; -if (request_irq (new_controller->irq, - cpci_hp_intr, - new_controller->irq_flags, -MY_NAME , - new_controller->dev_id)) { +if (request_irq (new_controller->irq, cpci_hp_intr, new_controller->irq_flags |IRQF_USER_DATA ,MY_NAME , new_controller->dev_id)) {err ("Can't get irq %d for the hotplug cPCI controller" , new_controller->irq); status = -ENODEV ;
drivers/pci/hotplug/cpqphp_core.c +1 -2
@@ -1139,8 +1139,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)/* set up the interrupt */ dbg ("HPC interrupt = %d\n" , ctrl->interrupt); -if (request_irq (ctrl->interrupt, cpqhp_ctrl_intr, -IRQF_SHARED ,MY_NAME , ctrl)) { +if (request_irq (ctrl->interrupt, cpqhp_ctrl_intr,IRQF_SHARED |IRQF_USER_DATA ,MY_NAME , ctrl)) {err ("Can't get irq %d for the hotplug pci controller\n" , ctrl->interrupt); rc = -ENODEV ;
drivers/pci/hotplug/shpchp_hpc.c +3 -2
@@ -1049,8 +1049,9 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev)pci_set_master (pdev); } - rc =request_irq (ctrl->pci_dev->irq, shpc_isr,IRQF_SHARED , -MY_NAME , (void *)ctrl); + rc =request_irq (ctrl->pci_dev->irq, shpc_isr, +IRQF_SHARED |IRQF_USER_DATA ,MY_NAME , + (void *)ctrl);ctrl_dbg (ctrl,"request_irq %d (returns %d)\n" , ctrl->pci_dev->irq, rc);if (rc) {
drivers/pci/pcie/pme.c +2 -1
@@ -335,7 +335,8 @@ static int pcie_pme_probe(struct pcie_device *srv)pcie_pme_interrupt_enable (port, false);pcie_clear_root_pme_status (port); - ret =request_irq (srv->irq, pcie_pme_irq,IRQF_SHARED ,"PCIe PME" , srv); + ret =request_irq (srv->irq, pcie_pme_irq, +IRQF_SHARED |IRQF_USER_DATA ,"PCIe PME" , srv);if (ret) {kfree (data);return ret;
drivers/pci/switch/switchtec.c +6 -4
@@ -1261,8 +1261,9 @@ static int switchtec_init_isr(struct switchtec_dev *stdev)return event_irq; rc =devm_request_irq (&stdev->pdev->dev, event_irq, - switchtec_event_isr,0 , -KBUILD_MODNAME , stdev); + switchtec_event_isr, +IRQF_USER_DATA ,KBUILD_MODNAME , + stdev);if (rc)return rc;
@@ -1279,8 +1280,9 @@ static int switchtec_init_isr(struct switchtec_dev *stdev)return dma_mrpc_irq; rc =devm_request_irq (&stdev->pdev->dev, dma_mrpc_irq, - switchtec_dma_mrpc_isr,0 , -KBUILD_MODNAME , stdev); + switchtec_dma_mrpc_isr, +IRQF_USER_DATA ,KBUILD_MODNAME , + stdev);return rc; }
drivers/pcmcia/i82092.c +1 -1
@@ -128,7 +128,7 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *i/* Register the interrupt handler */ dprintk (KERN_DEBUG "Requesting interrupt %i \n" ,dev->irq); -if ((ret =request_irq (dev->irq, i82092aa_interrupt,IRQF_SHARED ,"i82092aa" , i82092aa_interrupt))) { +if ((ret =request_irq (dev->irq, i82092aa_interrupt,IRQF_SHARED |IRQF_USER_DATA ,"i82092aa" , i82092aa_interrupt))) {printk (KERN_ERR "i82092aa: Failed to register IRQ %d, aborting\n" , dev->irq); goto err_out_free_res; }
drivers/pcmcia/i82365.c +5 -4
@@ -63,7 +63,7 @@static irqreturn_t i365_count_irq (int ,void *);static inline int _check_irq (int irq,int flags) { -if (request_irq (irq, i365_count_irq, flags,"x" , i365_count_irq) !=0 ) +if (request_irq (irq, i365_count_irq, flags |IRQF_USER_DATA ,"x" , i365_count_irq) !=0 )return -1 ;free_irq (irq, i365_count_irq);return 0 ;
@@ -489,8 +489,7 @@ static irqreturn_t i365_count_irq(int irq, void *dev)static u_int __init test_irq (u_short sock,int irq) {pr_debug ("i82365: testing ISA irq %d\n" , irq); -if (request_irq (irq, i365_count_irq,IRQF_PROBE_SHARED ,"scan" , - i365_count_irq) !=0 ) +if (request_irq (irq, i365_count_irq,IRQF_PROBE_SHARED |IRQF_USER_DATA ,"scan" , i365_count_irq) !=0 )return 1 ; irq_hits =0 ; irq_sock = sock;msleep (10 );
@@ -1270,7 +1269,9 @@ static int __init init_i82365(void)/* Set up interrupt handler(s) */ if (grab_irq !=0 ) - ret =request_irq (cs_irq, pcic_interrupt,0 ,"i82365" , pcic_interrupt); + ret =request_irq (cs_irq, pcic_interrupt, +IRQF_USER_DATA ,"i82365" , + pcic_interrupt);if (ret) goto err_socket_release;
drivers/pcmcia/pcmcia_resource.c +5 -4
@@ -702,8 +702,9 @@ int __must_check pcmcia_request_irq(struct pcmcia_device *p_dev,if (!p_dev->irq)return -EINVAL ; - ret =request_irq (p_dev->irq, handler,IRQF_SHARED |IRQF_USER_DATA , - p_dev->devname, p_dev->priv); + ret =request_irq (p_dev->irq, handler, +IRQF_SHARED |IRQF_USER_DATA , + p_dev->devname, p_dev->priv);if (!ret) p_dev->_irq =1 ;
@@ -752,8 +753,8 @@ static int pcmcia_setup_isa_irq(struct pcmcia_device *p_dev, int type)/* register the correct driver, if possible, to check whether * registering a dummy handle works, i.e. if the IRQ isn't * marked as used by the kernel resource management core */ - ret =request_irq (irq, test_action, type, p_dev->devname, - p_dev); + ret =request_irq (irq, test_action, type |IRQF_USER_DATA , + p_dev->devname, p_dev);if (!ret) {free_irq (irq, p_dev); p_dev->irq = s->pcmcia_irq = irq;
drivers/pcmcia/pd6729.c +5 -3
@@ -580,7 +580,8 @@ static int pd6729_check_irq(int irq) {int ret; - ret =request_irq (irq, pd6729_test,IRQF_PROBE_SHARED ,"x" , + ret =request_irq (irq, pd6729_test, +IRQF_PROBE_SHARED |IRQF_USER_DATA ,"x" , pd6729_test);if (ret)return -1 ;
@@ -698,8 +699,9 @@ static int pd6729_pci_probe(struct pci_dev *dev,pci_set_drvdata (dev, socket);if (irq_mode ==1 ) {/* Register the interrupt handler */ - ret =request_irq (dev->irq, pd6729_interrupt,IRQF_SHARED , -"pd6729" , socket); + ret =request_irq (dev->irq, pd6729_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,"pd6729" , + socket);if (ret) {dev_err (&dev->dev,"Failed to register irq %d\n" , dev->irq);
drivers/pcmcia/tcic.c +3 -4
@@ -210,7 +210,7 @@ static u_int __init try_irq(int irq)u_short cfg; irq_hits =0 ; -if (request_irq (irq, tcic_irq_count,0 ,"irq scan" , tcic_irq_count) !=0 ) +if (request_irq (irq, tcic_irq_count,IRQF_USER_DATA ,"irq scan" , tcic_irq_count) !=0 )return -1 ;mdelay (10 );if (irq_hits) {
@@ -266,7 +266,7 @@ static u_int __init irq_scan(u_int mask0)/* Fallback: just find interrupts that aren't in use */ for (i =0 ; i <16 ; i++)if ((mask0 & (1 << i)) && - (request_irq (i, tcic_irq_count,0 ,"x" , tcic_irq_count) ==0 )) { + (request_irq (i, tcic_irq_count,IRQF_USER_DATA ,"x" , tcic_irq_count) ==0 )) { mask1 |= (1 << i);free_irq (i, tcic_irq_count); }
@@ -463,8 +463,7 @@ static int __init init_tcic(void)u_int cs_mask = mask & ((cs_irq) ? (1 <<cs_irq) : ~(1 <<12 ));for (i =15 ; i >0 ; i--)if ((cs_mask & (1 << i)) && - (request_irq (i, tcic_interrupt,0 ,"tcic" , - tcic_interrupt) ==0 )) + (request_irq (i, tcic_interrupt,IRQF_USER_DATA ,"tcic" , tcic_interrupt) ==0 ))break ; cs_irq = i;if (cs_irq ==0 ) poll_interval =HZ ;
drivers/pcmcia/yenta_socket.c +2 -2
@@ -978,7 +978,7 @@ static int yenta_probe_cb_irq(struct yenta_socket *socket) socket->probe_status =0 ; -if (request_irq (socket->cb_irq, yenta_probe_handler,IRQF_SHARED ,"yenta" , socket)) { +if (request_irq (socket->cb_irq, yenta_probe_handler,IRQF_SHARED |IRQF_USER_DATA ,"yenta" , socket)) {dev_warn (&socket->dev->dev,"request_irq() in yenta_probe_cb_irq() failed!\n" );return -1 ;
@@ -1231,7 +1231,7 @@ static int yenta_probe(struct pci_dev *dev, const struct pci_device_id *id)/* We must finish initialization here */ -if (!socket->cb_irq ||request_irq (socket->cb_irq, yenta_interrupt,IRQF_SHARED ,"yenta" , socket)) { +if (!socket->cb_irq ||request_irq (socket->cb_irq, yenta_interrupt,IRQF_SHARED |IRQF_USER_DATA ,"yenta" , socket)) {/* No IRQ or request_irq failed. Poll */ socket->cb_irq =0 ;/* But zero is a valid IRQ number. */ timer_setup (&socket->poll_timer, yenta_interrupt_wrapper,0 );
drivers/pinctrl/intel/pinctrl-intel.c +1 -1
@@ -1192,7 +1192,7 @@ static int intel_gpio_probe(struct intel_pinctrl *pctrl, int irq)* controllers share the same interrupt line. */ ret =devm_request_irq (pctrl->dev, irq, intel_gpio_irq, -IRQF_SHARED |IRQF_NO_THREAD , +IRQF_SHARED |IRQF_NO_THREAD |IRQF_USER_DATA ,dev_name (pctrl->dev), pctrl);if (ret) {dev_err (pctrl->dev,"failed to request interrupt\n" );
drivers/pinctrl/pinctrl-amd.c +2 -1
@@ -930,7 +930,8 @@ static int amd_gpio_probe(struct platform_device *pdev) goto out2; } - ret =devm_request_irq (&pdev->dev, irq_base, amd_gpio_irq_handler,0 , + ret =devm_request_irq (&pdev->dev, irq_base, amd_gpio_irq_handler, +IRQF_USER_DATA ,KBUILD_MODNAME , gpio_dev);if (ret) goto out2;
drivers/pinctrl/pinctrl-single.c +1 -2
@@ -1567,8 +1567,7 @@ static int pcs_irq_init_chained_handler(struct pcs_device *pcs,int res; res =request_irq (pcs_soc->irq, pcs_irq_handler, -IRQF_SHARED |IRQF_NO_SUSPEND | -IRQF_NO_THREAD , +IRQF_SHARED |IRQF_NO_SUSPEND |IRQF_NO_THREAD |IRQF_USER_DATA , name, pcs_soc);if (res) { pcs_soc->irq =-1 ;
drivers/platform/goldfish/goldfish_pipe.c +3 -3
@@ -824,9 +824,9 @@ static int goldfish_pipe_device_init(struct platform_device *pdev,tasklet_init (&dev->irq_tasklet, &goldfish_interrupt_task, (unsigned long )dev); - err =devm_request_irq (&pdev->dev, dev->irq, - goldfish_pipe_interrupt, -IRQF_SHARED ,"goldfish_pipe" , dev); + err =devm_request_irq (&pdev->dev, dev->irq, goldfish_pipe_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,"goldfish_pipe" , + dev);if (err) {dev_err (&pdev->dev,"unable to allocate IRQ for v2\n" );return err;
drivers/platform/mellanox/mlxreg-hotplug.c +3 -2
@@ -632,8 +632,9 @@ static int mlxreg_hotplug_probe(struct platform_device *pdev) priv->pdev = pdev; err =devm_request_irq (&pdev->dev, priv->irq, - mlxreg_hotplug_irq_handler,IRQF_TRIGGER_FALLING - |IRQF_SHARED ,"mlxreg-hotplug" , priv); + mlxreg_hotplug_irq_handler, +IRQF_TRIGGER_FALLING |IRQF_SHARED |IRQF_USER_DATA , +"mlxreg-hotplug" , priv);if (err) {dev_err (&pdev->dev,"Failed to request irq: %d\n" , err);return err;
drivers/platform/x86/fujitsu-tablet.c +2 -1
@@ -486,7 +486,8 @@ static int acpi_fujitsu_add(struct acpi_device *adev)fujitsu_reset (); error =request_irq (fujitsu.irq, fujitsu_interrupt, -IRQF_SHARED ,MODULENAME , fujitsu_interrupt); +IRQF_SHARED |IRQF_USER_DATA ,MODULENAME , + fujitsu_interrupt);if (error) {release_region (fujitsu.io_base, fujitsu.io_length);input_fujitsu_remove ();
drivers/platform/x86/intel_int0002_vgpio.c +1 -1
@@ -189,7 +189,7 @@ static int int0002_probe(struct platform_device *pdev)* to gpiochip_set_chained_irqchip, because the irq is shared. */ ret =devm_request_irq (dev, irq, int0002_irq, -IRQF_SHARED ,"INT0002" , chip); +IRQF_SHARED |IRQF_USER_DATA ,"INT0002" , chip);if (ret) {dev_err (dev,"Error requesting IRQ %d: %d\n" , irq, ret);return ret;
drivers/platform/x86/intel_ips.c +2 -1
@@ -1528,7 +1528,8 @@ static int ips_probe(struct pci_dev *dev, const struct pci_device_id *id) ips->irq =pci_irq_vector (dev,0 ); - ret =request_irq (ips->irq, ips_irq_handler,IRQF_SHARED ,"ips" , ips); + ret =request_irq (ips->irq, ips_irq_handler, +IRQF_SHARED |IRQF_USER_DATA ,"ips" , ips);if (ret) {dev_err (&dev->dev,"request irq failed, aborting\n" );return ret;
drivers/platform/x86/intel_pmc_ipc.c +4 -4
@@ -529,8 +529,9 @@ static int ipc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) pmc->ipc_base =pcim_iomap_table (pdev)[0 ]; - ret =devm_request_irq (&pdev->dev, pdev->irq, ioc,0 ,"intel_pmc_ipc" , - pmc); + ret =devm_request_irq (&pdev->dev, pdev->irq, ioc, +IRQF_USER_DATA , +"intel_pmc_ipc" , pmc);if (ret) {dev_err (&pdev->dev,"Failed to request irq\n" );return ret;
@@ -951,8 +952,7 @@ static int ipc_plat_probe(struct platform_device *pdev)return ret; } -if (devm_request_irq (&pdev->dev, ipcdev.irq, ioc,IRQF_NO_SUSPEND , -"intel_pmc_ipc" , &ipcdev)) { +if (devm_request_irq (&pdev->dev, ipcdev.irq, ioc,IRQF_NO_SUSPEND |IRQF_USER_DATA ,"intel_pmc_ipc" , &ipcdev)) {dev_err (&pdev->dev,"Failed to request irq\n" ); ret = -EBUSY ; goto err_irq;
drivers/platform/x86/intel_punit_ipc.c +2 -2
@@ -299,8 +299,8 @@ static int intel_punit_ipc_probe(struct platform_device *pdev)dev_warn (&pdev->dev,"Invalid IRQ, using polling mode\n" ); }else { ret =devm_request_irq (&pdev->dev, irq, intel_punit_ioc, -IRQF_NO_SUSPEND ,"intel_punit_ipc" , - &punit_ipcdev); +IRQF_NO_SUSPEND |IRQF_USER_DATA , +"intel_punit_ipc" , &punit_ipcdev);if (ret) {dev_err (&pdev->dev,"Failed to request irq: %d\n" , irq);return ret;
drivers/platform/x86/intel_scu_ipc.c +3 -2
@@ -656,8 +656,9 @@ static int ipc_probe(struct pci_dev *pdev, const struct pci_device_id *id)if (!scu->i2c_base)return -ENOMEM ; - err =devm_request_irq (&pdev->dev, pdev->irq, ioc,0 ,"intel_scu_ipc" , - scu); + err =devm_request_irq (&pdev->dev, pdev->irq, ioc, +IRQF_USER_DATA , +"intel_scu_ipc" , scu);if (err)return err;
drivers/platform/x86/sony-laptop.c +1 -2
@@ -4772,8 +4772,7 @@ static int sony_pic_add(struct acpi_device *device)/* request IRQ */ list_for_each_entry_reverse (irq, &spic_dev.interrupts, list) { -if (!request_irq (irq->irq.interrupts[0 ], sony_pic_irq, -0 ,"sony-laptop" , &spic_dev)) { +if (!request_irq (irq->irq.interrupts[0 ], sony_pic_irq,IRQF_USER_DATA ,"sony-laptop" , &spic_dev)) { dprintk("IRQ: %d - triggering: %d - " "polarity: %d - shr: %d\n", irq->irq.interrupts[0],
drivers/pnp/resource.c +1 -2
@@ -387,8 +387,7 @@ int pnp_check_irq(struct pnp_dev *dev, struct resource *res)/* check if the resource is already in use, skip if the * device is active because it itself may be in use */ if (!dev->active) { -if (request_irq (*irq, pnp_test_handler, -IRQF_PROBE_SHARED ,"pnp" ,NULL )) +if (request_irq (*irq, pnp_test_handler,IRQF_PROBE_SHARED |IRQF_USER_DATA ,"pnp" ,NULL ))return 0 ;free_irq (*irq,NULL ); }
drivers/power/reset/ltc2952-poweroff.c +1 -5
@@ -214,11 +214,7 @@ static int ltc2952_poweroff_init(struct platform_device *pdev) data->gpio_trigger =NULL ; } -if (devm_request_irq (&pdev->dev,gpiod_to_irq (data->gpio_trigger), - ltc2952_poweroff_handler, - (IRQF_TRIGGER_FALLING |IRQF_TRIGGER_RISING ), -"ltc2952-poweroff" , - data)) { +if (devm_request_irq (&pdev->dev,gpiod_to_irq (data->gpio_trigger), ltc2952_poweroff_handler, (IRQF_TRIGGER_FALLING |IRQF_TRIGGER_RISING ) |IRQF_USER_DATA ,"ltc2952-poweroff" , data)) {/* * Some things may have happened: * - No trigger input was defined
drivers/power/supply/act8945a_charger.c +3 -3
@@ -496,7 +496,7 @@ static int act8945a_charger_config(struct device *dev, ret =devm_request_irq (dev,gpiod_to_irq (charger->lbo_gpio), act8945a_status_changed, - (IRQF_TRIGGER_FALLING |IRQF_TRIGGER_RISING ), + (IRQF_TRIGGER_FALLING |IRQF_TRIGGER_RISING ) |IRQF_USER_DATA ,"act8945a_lbo_detect" , charger);if (ret)dev_info (dev,"failed to request gpio \"lbo\" IRQ\n" );
@@ -602,8 +602,8 @@ static int act8945a_charger_probe(struct platform_device *pdev) } ret =devm_request_irq (&pdev->dev, irq, act8945a_status_changed, -IRQF_TRIGGER_FALLING ,"act8945a_interrupt" , - charger); +IRQF_TRIGGER_FALLING |IRQF_USER_DATA , +"act8945a_interrupt" , charger);if (ret) {dev_err (&pdev->dev,"failed to request nIRQ pin IRQ\n" );return ret;
drivers/power/supply/goldfish_battery.c +3 -2
@@ -193,8 +193,9 @@ static int goldfish_battery_probe(struct platform_device *pdev)return -ENODEV ; } - ret =devm_request_irq (&pdev->dev, data->irq, goldfish_battery_interrupt, -IRQF_SHARED , pdev->name, data); + ret =devm_request_irq (&pdev->dev, data->irq, + goldfish_battery_interrupt, +IRQF_SHARED |IRQF_USER_DATA , pdev->name, data);if (ret)return ret;
drivers/power/supply/max14656_charger_detector.c +1 -1
@@ -281,7 +281,7 @@ static int max14656_probe(struct i2c_client *client,INIT_DELAYED_WORK (&chip->irq_work, max14656_irq_worker); ret =devm_request_irq (dev, chip->irq, max14656_irq, -IRQF_TRIGGER_FALLING , +IRQF_TRIGGER_FALLING |IRQF_USER_DATA ,MAX14656_NAME , chip);if (ret) {dev_err (dev,"request_irq %d failed\n" , chip->irq);
drivers/power/supply/pda_power.c +3 -3
@@ -340,8 +340,8 @@ static int pda_power_probe(struct platform_device *pdev)if (ac_irq) { ret =request_irq (ac_irq->start, power_changed_isr, -get_irq_flags (ac_irq), ac_irq->name, - pda_psy_ac); +get_irq_flags (ac_irq) |IRQF_USER_DATA , + ac_irq->name, pda_psy_ac);if (ret) {dev_err (dev,"request ac irq failed\n" ); goto ac_irq_failed;
@@ -364,7 +364,7 @@ static int pda_power_probe(struct platform_device *pdev)if (usb_irq) { ret =request_irq (usb_irq->start, power_changed_isr, -get_irq_flags (usb_irq), +get_irq_flags (usb_irq) |IRQF_USER_DATA , usb_irq->name, pda_psy_usb);if (ret) {dev_err (dev,"request usb irq failed\n" );
drivers/power/supply/wm97xx_battery.c +3 -2
@@ -183,8 +183,9 @@ static int wm97xx_bat_probe(struct platform_device *dev)if (ret) goto err2; ret =request_irq (gpio_to_irq (pdata->charge_gpio), - wm97xx_chrg_irq,0 , -"AC Detect" , dev); + wm97xx_chrg_irq, +IRQF_USER_DATA , +"AC Detect" , dev);if (ret) goto err2; props++;/* POWER_SUPPLY_PROP_STATUS */
drivers/pps/clients/pps-gpio.c +2 -1
@@ -166,7 +166,8 @@ static int pps_gpio_probe(struct platform_device *pdev)/* register IRQ interrupt handler */ ret =devm_request_irq (&pdev->dev, data->irq, pps_gpio_irq_handler, -get_irqf_trigger_flags (data), data->info.name, data); +get_irqf_trigger_flags (data) |IRQF_USER_DATA , + data->info.name, data);if (ret) {pps_unregister_source (data->pps);dev_err (&pdev->dev,"failed to acquire IRQ %d\n" , data->irq);
drivers/ptp/ptp_pch.c +2 -1
@@ -633,7 +633,8 @@ pch_probe(struct pci_dev *pdev, const struct pci_device_id *id)spin_lock_init (&chip->register_lock); - ret =request_irq (pdev->irq, &isr,IRQF_SHARED ,KBUILD_MODNAME , chip); + ret =request_irq (pdev->irq, &isr,IRQF_SHARED |IRQF_USER_DATA , +KBUILD_MODNAME , chip);if (ret !=0 ) {dev_err (&pdev->dev,"failed to get irq %d\n" , pdev->irq); goto err_req_irq;
drivers/rapidio/devices/tsi721.c +15 -10
@@ -708,14 +708,15 @@ static int tsi721_request_msix(struct tsi721_device *priv)int err =0 ; err =request_irq (priv->msix[TSI721_VECT_IDB ].vector, - tsi721_sr2pc_ch_msix,0 , - priv->msix[TSI721_VECT_IDB ].irq_name, (void *)priv); + tsi721_sr2pc_ch_msix, +IRQF_USER_DATA , + priv->msix[TSI721_VECT_IDB ].irq_name, (void *)priv);if (err)return err; err =request_irq (priv->msix[TSI721_VECT_PWRX ].vector, - tsi721_srio_msix,0 , - priv->msix[TSI721_VECT_PWRX ].irq_name, (void *)priv); + tsi721_srio_msix,IRQF_USER_DATA , + priv->msix[TSI721_VECT_PWRX ].irq_name, (void *)priv);if (err) {free_irq (priv->msix[TSI721_VECT_IDB ].vector, (void *)priv);return err;
@@ -844,8 +845,8 @@ static int tsi721_request_irq(struct tsi721_device *priv) else#endif err =request_irq (priv->pdev->irq, tsi721_irqhandler, - (priv->flags &TSI721_USING_MSI ) ?0 :IRQF_SHARED , -DRV_NAME , (void *)priv); + ((priv->flags &TSI721_USING_MSI ) ?0 :IRQF_SHARED ) |IRQF_USER_DATA , +DRV_NAME , (void *)priv);if (err) tsi_err(&priv->pdev->dev,
@@ -1977,7 +1978,8 @@ static int tsi721_open_outb_mbox(struct rio_mport *mport, void *dev_id,int idx =TSI721_VECT_OMB0_DONE + mbox;/* Request interrupt service if we are in MSI-X mode */ - rc =request_irq (priv->msix[idx].vector, tsi721_omsg_msix,0 , + rc =request_irq (priv->msix[idx].vector, tsi721_omsg_msix, +IRQF_USER_DATA , priv->msix[idx].irq_name, (void *)priv);if (rc) {
@@ -1988,7 +1990,8 @@ static int tsi721_open_outb_mbox(struct rio_mport *mport, void *dev_id, } idx =TSI721_VECT_OMB0_INT + mbox; - rc =request_irq (priv->msix[idx].vector, tsi721_omsg_msix,0 , + rc =request_irq (priv->msix[idx].vector, tsi721_omsg_msix, +IRQF_USER_DATA , priv->msix[idx].irq_name, (void *)priv);if (rc) {
@@ -2292,7 +2295,8 @@ static int tsi721_open_inb_mbox(struct rio_mport *mport, void *dev_id,int idx =TSI721_VECT_IMB0_RCV + mbox;/* Request interrupt service if we are in MSI-X mode */ - rc =request_irq (priv->msix[idx].vector, tsi721_imsg_msix,0 , + rc =request_irq (priv->msix[idx].vector, tsi721_imsg_msix, +IRQF_USER_DATA , priv->msix[idx].irq_name, (void *)priv);if (rc) {
@@ -2303,7 +2307,8 @@ static int tsi721_open_inb_mbox(struct rio_mport *mport, void *dev_id, } idx =TSI721_VECT_IMB0_INT + mbox; - rc =request_irq (priv->msix[idx].vector, tsi721_imsg_msix,0 , + rc =request_irq (priv->msix[idx].vector, tsi721_imsg_msix, +IRQF_USER_DATA , priv->msix[idx].irq_name, (void *)priv);if (rc) {
drivers/rapidio/devices/tsi721_dma.c +5 -3
@@ -161,7 +161,8 @@ static int tsi721_bdma_ch_init(struct tsi721_bdma_chan *bdma_chan, int bd_num) idx =TSI721_VECT_DMA0_DONE + bdma_chan->id; - rc =request_irq (priv->msix[idx].vector, tsi721_bdma_msix,0 , + rc =request_irq (priv->msix[idx].vector, tsi721_bdma_msix, +IRQF_USER_DATA , priv->msix[idx].irq_name, (void *)bdma_chan);if (rc) {
@@ -173,8 +174,9 @@ static int tsi721_bdma_ch_init(struct tsi721_bdma_chan *bdma_chan, int bd_num) idx =TSI721_VECT_DMA0_INT + bdma_chan->id; - rc =request_irq (priv->msix[idx].vector, tsi721_bdma_msix,0 , - priv->msix[idx].irq_name, (void *)bdma_chan); + rc =request_irq (priv->msix[idx].vector, tsi721_bdma_msix, +IRQF_USER_DATA , + priv->msix[idx].irq_name, (void *)bdma_chan);if (rc) { tsi_debug(DMA, &bdma_chan->dchan.dev->device,
drivers/regulator/qcom_spmi-regulator.c +3 -2
@@ -1584,8 +1584,9 @@ static int spmi_regulator_of_parse(struct device_node *node,if (vreg->ocp_irq) { ret =devm_request_irq (dev, vreg->ocp_irq, - spmi_regulator_vs_ocp_isr,IRQF_TRIGGER_RISING ,"ocp" , - vreg); + spmi_regulator_vs_ocp_isr, +IRQF_TRIGGER_RISING |IRQF_USER_DATA , +"ocp" , vreg);if (ret <0 ) {dev_err (dev,"failed to request irq %d, ret=%d\n" , vreg->ocp_irq, ret);
drivers/rpmsg/qcom_glink_native.c +2 -3
@@ -1588,9 +1588,8 @@ struct qcom_glink *qcom_glink_native_probe(struct device *dev, } irq =of_irq_get (dev->of_node,0 ); - ret =devm_request_irq (dev, irq, - qcom_glink_native_intr, -IRQF_NO_SUSPEND |IRQF_SHARED , + ret =devm_request_irq (dev, irq, qcom_glink_native_intr, +IRQF_NO_SUSPEND |IRQF_SHARED |IRQF_USER_DATA ,"glink-native" , glink);if (ret) {dev_err (dev,"failed to request IRQ\n" );
drivers/rtc/rtc-cmos.c +3 -2
@@ -854,8 +854,9 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) rtc_cmos_int_handler = cmos_interrupt; retval =request_irq (rtc_irq, rtc_cmos_int_handler, -IRQF_SHARED ,dev_name (&cmos_rtc.rtc->dev), - cmos_rtc.rtc); +IRQF_SHARED |IRQF_USER_DATA , +dev_name (&cmos_rtc.rtc->dev), + cmos_rtc.rtc);if (retval <0 ) {dev_dbg (dev,"IRQ %d is already in use\n" , rtc_irq); goto cleanup1;
drivers/rtc/rtc-ds1305.c +2 -1
@@ -719,7 +719,8 @@ static int ds1305_probe(struct spi_device *spi)if (spi->irq) {INIT_WORK (&ds1305->work, ds1305_work); status =devm_request_irq (&spi->dev, spi->irq, ds1305_irq, -0 ,dev_name (&ds1305->rtc->dev), ds1305); +IRQF_USER_DATA , +dev_name (&ds1305->rtc->dev), ds1305);if (status <0 ) {dev_err (&spi->dev,"request_irq %d --> %d\n" , spi->irq, status);
drivers/rtc/rtc-ds1374.c +3 -2
@@ -631,8 +631,9 @@ static int ds1374_probe(struct i2c_client *client,return ret;if (client->irq >0 ) { - ret =devm_request_irq (&client->dev, client->irq, ds1374_irq,0 , -"ds1374" , client); + ret =devm_request_irq (&client->dev, client->irq, ds1374_irq, +IRQF_USER_DATA , +"ds1374" , client);if (ret) {dev_err (&client->dev,"unable to request IRQ\n" );return ret;
drivers/rtc/rtc-ds1511.c +1 -2
@@ -485,8 +485,7 @@ static int ds1511_rtc_probe(struct platform_device *pdev)*/ if (pdata->irq >0 ) {rtc_read (RTC_CMD1 ); -if (devm_request_irq (&pdev->dev, pdata->irq, ds1511_interrupt, -IRQF_SHARED , pdev->name, pdev) <0 ) { +if (devm_request_irq (&pdev->dev, pdata->irq, ds1511_interrupt,IRQF_SHARED |IRQF_USER_DATA , pdev->name, pdev) <0 ) {dev_warn (&pdev->dev,"interrupt not available.\n" ); pdata->irq =0 ;
drivers/rtc/rtc-ds1553.c +1 -3
@@ -307,9 +307,7 @@ static int ds1553_rtc_probe(struct platform_device *pdev)if (pdata->irq >0 ) {writeb (0 , ioaddr +RTC_INTERRUPTS ); -if (devm_request_irq (&pdev->dev, pdata->irq, - ds1553_rtc_interrupt, -0 , pdev->name, pdev) <0 ) { +if (devm_request_irq (&pdev->dev, pdata->irq, ds1553_rtc_interrupt,IRQF_USER_DATA , pdev->name, pdev) <0 ) {dev_warn (&pdev->dev,"interrupt not available.\n" ); pdata->irq =0 ; }
drivers/rtc/rtc-ds1685.c +2 -1
@@ -1341,7 +1341,8 @@ ds1685_rtc_probe(struct platform_device *pdev)/* Request an IRQ. */ ret =devm_request_irq (&pdev->dev, rtc->irq_num, ds1685_rtc_irq_handler, -IRQF_SHARED , pdev->name, pdev); +IRQF_SHARED |IRQF_USER_DATA , + pdev->name, pdev);/* Check to see if something came back. */ if (unlikely (ret)) {
drivers/rtc/rtc-ftrtc010.c +1 -1
@@ -181,7 +181,7 @@ static int ftrtc010_rtc_probe(struct platform_device *pdev) rtc->rtc_dev->range_max =U32_MAX + rtc->rtc_dev->range_min; ret =devm_request_irq (dev, rtc->rtc_irq, ftrtc010_rtc_interrupt, -IRQF_SHARED , pdev->name, dev); +IRQF_SHARED |IRQF_USER_DATA , pdev->name, dev);if (unlikely (ret))return ret;
drivers/rtc/rtc-m48t59.c +3 -2
@@ -436,8 +436,9 @@ static int m48t59_rtc_probe(struct platform_device *pdev)if (m48t59->irq !=NO_IRQ ) { ret =devm_request_irq (&pdev->dev, m48t59->irq, - m48t59_rtc_interrupt,IRQF_SHARED , -"rtc-m48t59" , &pdev->dev); + m48t59_rtc_interrupt, +IRQF_SHARED |IRQF_USER_DATA , +"rtc-m48t59" , &pdev->dev);if (ret)return ret; }
drivers/rtc/rtc-mrst.c +2 -1
@@ -356,7 +356,8 @@ static int vrtc_mrst_do_probe(struct device *dev, struct resource *iomem,if (rtc_irq) { retval =devm_request_irq (dev, rtc_irq, mrst_rtc_irq, -0 ,dev_name (&mrst_rtc.rtc->dev), +IRQF_USER_DATA , +dev_name (&mrst_rtc.rtc->dev), mrst_rtc.rtc);if (retval <0 ) { dev_dbg(dev, "IRQ %d is already in use, err %d\n",
drivers/rtc/rtc-pcap.c +6 -4
@@ -157,13 +157,15 @@ static int __init pcap_rtc_probe(struct platform_device *pdev) timer_irq =pcap_to_irq (pcap_rtc->pcap,PCAP_IRQ_1HZ ); alarm_irq =pcap_to_irq (pcap_rtc->pcap,PCAP_IRQ_TODA ); - err =devm_request_irq (&pdev->dev, timer_irq, pcap_rtc_irq,0 , -"RTC Timer" , pcap_rtc); + err =devm_request_irq (&pdev->dev, timer_irq, pcap_rtc_irq, +IRQF_USER_DATA ,"RTC Timer" , + pcap_rtc);if (err)return err; - err =devm_request_irq (&pdev->dev, alarm_irq, pcap_rtc_irq,0 , -"RTC Alarm" , pcap_rtc); + err =devm_request_irq (&pdev->dev, alarm_irq, pcap_rtc_irq, +IRQF_USER_DATA ,"RTC Alarm" , + pcap_rtc);if (err)return err;
drivers/rtc/rtc-r7301.c +2 -1
@@ -392,7 +392,8 @@ static int __init rtc7301_rtc_probe(struct platform_device *dev)if (priv->irq >0 ) { ret =devm_request_irq (&dev->dev, priv->irq, - rtc7301_irq_handler,IRQF_SHARED , + rtc7301_irq_handler, +IRQF_SHARED |IRQF_USER_DATA ,dev_name (&dev->dev), rtc);if (ret) { priv->irq =0 ;
drivers/rtc/rtc-snvs.c +2 -1
@@ -328,7 +328,8 @@ static int snvs_rtc_probe(struct platform_device *pdev)device_init_wakeup (&pdev->dev, true); ret =devm_request_irq (&pdev->dev, data->irq, snvs_rtc_irq_handler, -IRQF_SHARED ,"rtc alarm" , &pdev->dev); +IRQF_SHARED |IRQF_USER_DATA ,"rtc alarm" , + &pdev->dev);if (ret) {dev_err (&pdev->dev,"failed to request irq %d: %d\n" , data->irq, ret);
drivers/rtc/rtc-stk17ta8.c +1 -4
@@ -302,10 +302,7 @@ static int stk17ta8_rtc_probe(struct platform_device *pdev)platform_set_drvdata (pdev, pdata);if (pdata->irq >0 ) {writeb (0 , ioaddr +RTC_INTERRUPTS ); -if (devm_request_irq (&pdev->dev, pdata->irq, - stk17ta8_rtc_interrupt, -IRQF_SHARED , - pdev->name, pdev) <0 ) { +if (devm_request_irq (&pdev->dev, pdata->irq, stk17ta8_rtc_interrupt,IRQF_SHARED |IRQF_USER_DATA , pdev->name, pdev) <0 ) {dev_warn (&pdev->dev,"interrupt not available.\n" ); pdata->irq =0 ; }
drivers/rtc/rtc-zynqmp.c +4 -2
@@ -234,7 +234,8 @@ static int xlnx_rtc_probe(struct platform_device *pdev)return xrtcdev->alarm_irq; } ret =devm_request_irq (&pdev->dev, xrtcdev->alarm_irq, - xlnx_rtc_interrupt,0 , + xlnx_rtc_interrupt, +IRQF_USER_DATA ,dev_name (&pdev->dev), xrtcdev);if (ret) {dev_err (&pdev->dev,"request irq failed\n" );
@@ -247,7 +248,8 @@ static int xlnx_rtc_probe(struct platform_device *pdev)return xrtcdev->sec_irq; } ret =devm_request_irq (&pdev->dev, xrtcdev->sec_irq, - xlnx_rtc_interrupt,0 , + xlnx_rtc_interrupt, +IRQF_USER_DATA ,dev_name (&pdev->dev), xrtcdev);if (ret) {dev_err (&pdev->dev,"request irq failed\n" );
drivers/scsi/3w-9xxx.c +4 -2
@@ -2116,7 +2116,8 @@ static int twa_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)set_bit (TW_USING_MSI , &tw_dev->flags);/* Now setup the interrupt handler */ - retval =request_irq (pdev->irq, twa_interrupt,IRQF_SHARED ,"3w-9xxx" , tw_dev); + retval =request_irq (pdev->irq, twa_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,"3w-9xxx" , tw_dev);if (retval) {TW_PRINTK (tw_dev->host,TW_DRIVER ,0x30 ,"Error requesting IRQ" ); goto out_remove_host;
@@ -2254,7 +2255,8 @@ static int twa_resume(struct pci_dev *pdev) }/* Now setup the interrupt handler */ - retval =request_irq (pdev->irq, twa_interrupt,IRQF_SHARED ,"3w-9xxx" , tw_dev); + retval =request_irq (pdev->irq, twa_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,"3w-9xxx" , tw_dev);if (retval) {TW_PRINTK (tw_dev->host,TW_DRIVER ,0x42 ,"Error requesting IRQ during resume" ); retval = -ENODEV ;
drivers/scsi/3w-sas.c +4 -2
@@ -1662,7 +1662,8 @@ static int twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)set_bit (TW_USING_MSI , &tw_dev->flags);/* Now setup the interrupt handler */ - retval =request_irq (pdev->irq, twl_interrupt,IRQF_SHARED ,"3w-sas" , tw_dev); + retval =request_irq (pdev->irq, twl_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,"3w-sas" , tw_dev);if (retval) {TW_PRINTK (tw_dev->host,TW_DRIVER ,0x1f ,"Error requesting IRQ" ); goto out_remove_host;
@@ -1819,7 +1820,8 @@ static int twl_resume(struct pci_dev *pdev) }/* Now setup the interrupt handler */ - retval =request_irq (pdev->irq, twl_interrupt,IRQF_SHARED ,"3w-sas" , tw_dev); + retval =request_irq (pdev->irq, twl_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,"3w-sas" , tw_dev);if (retval) {TW_PRINTK (tw_dev->host,TW_DRIVER ,0x26 ,"Error requesting IRQ during resume" ); retval = -ENODEV ;
drivers/scsi/3w-xxxx.c +2 -1
@@ -2333,7 +2333,8 @@ static int tw_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)printk (KERN_WARNING "3w-xxxx: scsi%d: Found a 3ware Storage Controller at 0x%x, IRQ: %d.\n" , host->host_no, tw_dev->base_addr, pdev->irq);/* Now setup the interrupt handler */ - retval =request_irq (pdev->irq, tw_interrupt,IRQF_SHARED ,"3w-xxxx" , tw_dev); + retval =request_irq (pdev->irq, tw_interrupt, +IRQF_SHARED |IRQF_USER_DATA ,"3w-xxxx" , tw_dev);if (retval) {printk (KERN_WARNING "3w-xxxx: Error requesting IRQ." ); goto out_remove_host;
drivers/scsi/BusLogic.c +1 -2
@@ -1994,8 +1994,7 @@ static bool __init blogic_getres(struct blogic_adapter *adapter)/* Acquire shared access to the IRQ Channel. */ -if (request_irq (adapter->irq_ch, blogic_inthandler,IRQF_SHARED , - adapter->full_model, adapter) <0 ) { +if (request_irq (adapter->irq_ch, blogic_inthandler,IRQF_SHARED |IRQF_USER_DATA , adapter->full_model, adapter) <0 ) {blogic_err ("UNABLE TO ACQUIRE IRQ CHANNEL %d - DETACHING\n" , adapter, adapter->irq_ch);return false;
drivers/scsi/a100u2w.c +2 -2
@@ -1158,8 +1158,8 @@ static int inia100_probe_one(struct pci_dev *pdev, shost->sg_tablesize =TOTAL_SG_ENTRY ;/* Initial orc chip */ - error =request_irq (pdev->irq, inia100_intr,IRQF_SHARED , -"inia100" , shost); + error =request_irq (pdev->irq, inia100_intr, +IRQF_SHARED |IRQF_USER_DATA ,"inia100" , shost);if (error <0 ) {printk (KERN_WARNING "inia100: unable to get irq %d\n" , pdev->irq);
drivers/scsi/aacraid/commsup.c +2 -6
@@ -2553,9 +2553,7 @@ int aac_acquire_irq(struct aac_dev *dev)for (i =0 ; i < dev->max_msix; i++) { dev->aac_msix[i].vector_no = i; dev->aac_msix[i].dev = dev; -if (request_irq (pci_irq_vector (dev->pdev, i), - dev->a_ops.adapter_intr, -0 ,"aacraid" , &(dev->aac_msix[i]))) { +if (request_irq (pci_irq_vector (dev->pdev, i), dev->a_ops.adapter_intr,IRQF_USER_DATA ,"aacraid" , &(dev->aac_msix[i]))) {printk (KERN_ERR "%s%d: Failed to register IRQ for vector %d.\n" , dev->name, dev->id, i);for (j =0 ; j < i ; j++)
@@ -2569,9 +2567,7 @@ int aac_acquire_irq(struct aac_dev *dev) dev->aac_msix[0 ].vector_no =0 ; dev->aac_msix[0 ].dev = dev; -if (request_irq (dev->pdev->irq, dev->a_ops.adapter_intr, -IRQF_SHARED ,"aacraid" , - &(dev->aac_msix[0 ])) <0 ) { +if (request_irq (dev->pdev->irq, dev->a_ops.adapter_intr,IRQF_SHARED |IRQF_USER_DATA ,"aacraid" , &(dev->aac_msix[0 ])) <0 ) {if (dev->msi)pci_disable_msi (dev->pdev); printk(KERN_ERR "%s%d: Interrupt unavailable.\n",
drivers/scsi/aacraid/rx.c +1 -2
@@ -649,8 +649,7 @@ int _aac_rx_init(struct aac_dev *dev)aac_adapter_comm (dev, dev->comm_interface); dev->sync_mode =0 ;/* sync. mode not supported */ dev->msi = aac_msi && !pci_enable_msi (dev->pdev); -if (request_irq (dev->pdev->irq, dev->a_ops.adapter_intr, -IRQF_SHARED ,"aacraid" , dev) <0 ) { +if (request_irq (dev->pdev->irq, dev->a_ops.adapter_intr,IRQF_SHARED |IRQF_USER_DATA ,"aacraid" , dev) <0 ) {if (dev->msi)pci_disable_msi (dev->pdev); printk(KERN_ERR "%s%d: Interrupt unavailable.\n",
drivers/scsi/aacraid/sa.c +1 -2
@@ -388,8 +388,7 @@ int aac_sa_init(struct aac_dev *dev)if (aac_init_adapter (dev) ==NULL ) goto error_irq; dev->sync_mode =0 ;/* sync. mode not supported */ -if (request_irq (dev->pdev->irq, dev->a_ops.adapter_intr, -IRQF_SHARED ,"aacraid" , (void *)dev) <0 ) { +if (request_irq (dev->pdev->irq, dev->a_ops.adapter_intr,IRQF_SHARED |IRQF_USER_DATA ,"aacraid" , (void *)dev) <0 ) {printk (KERN_WARNING "%s%d: Interrupt unavailable.\n" , name, instance); goto error_iounmap;
drivers/scsi/aacraid/src.c +1 -2
@@ -986,8 +986,7 @@ int aac_src_init(struct aac_dev *dev) dev->aac_msix[0 ].vector_no =0 ; dev->aac_msix[0 ].dev = dev; -if (request_irq (dev->pdev->irq, dev->a_ops.adapter_intr, -IRQF_SHARED ,"aacraid" , &(dev->aac_msix[0 ])) <0 ) { +if (request_irq (dev->pdev->irq, dev->a_ops.adapter_intr,IRQF_SHARED |IRQF_USER_DATA ,"aacraid" , &(dev->aac_msix[0 ])) <0 ) {if (dev->msi)pci_disable_msi (dev->pdev);
drivers/scsi/advansys.c +2 -2
@@ -11298,8 +11298,8 @@ static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop,/* Register IRQ Number. */ ASC_DBG (2 ,"request_irq(%d, %p)\n" , boardp->irq, shost); - ret =request_irq (boardp->irq, advansys_interrupt, share_irq, -DRV_NAME , shost); + ret =request_irq (boardp->irq, advansys_interrupt, + share_irq |IRQF_USER_DATA ,DRV_NAME , shost);if (ret) {if (ret == -EBUSY ) {
drivers/scsi/aha152x.c +2 -2
@@ -798,7 +798,7 @@ struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup)SETPORT (SIMODE0 ,0 );SETPORT (SIMODE1 ,0 ); -if (request_irq (shpnt->irq, swintr,IRQF_SHARED ,"aha152x" , shpnt)) { +if (request_irq (shpnt->irq, swintr,IRQF_SHARED |IRQF_USER_DATA ,"aha152x" , shpnt)) {printk (KERN_ERR "aha152x%d: irq %d busy.\n" , shpnt->host_no, shpnt->irq); goto out_host_put; }
@@ -832,7 +832,7 @@ struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup)SETPORT (SSTAT0 ,0x7f );SETPORT (SSTAT1 ,0xef ); -if (request_irq (shpnt->irq, intr,IRQF_SHARED ,"aha152x" , shpnt)) { +if (request_irq (shpnt->irq, intr,IRQF_SHARED |IRQF_USER_DATA ,"aha152x" , shpnt)) {printk (KERN_ERR "aha152x%d: failed to reassign irq %d.\n" , shpnt->host_no, shpnt->irq); goto out_host_put; }
drivers/scsi/aha1542.c +1 -1
@@ -782,7 +782,7 @@ static struct Scsi_Host *aha1542_hw_init(struct scsi_host_template *tpnt, structsetup_mailboxes (sh); -if (request_irq (sh->irq, aha1542_interrupt,0 ,"aha1542" , sh)) { +if (request_irq (sh->irq, aha1542_interrupt,IRQF_USER_DATA ,"aha1542" , sh)) {shost_printk (KERN_ERR , sh,"Unable to allocate IRQ.\n" ); goto free_ccb; }
drivers/scsi/aha1740.c +1 -2
@@ -597,8 +597,7 @@ static int aha1740_probe (struct device *dev) }DEB (printk ("aha1740_probe: enable interrupt channel %d\n" ,irq_level)); -if (request_irq (irq_level,aha1740_intr_handle,irq_type ?0 :IRQF_SHARED , -"aha1740" ,shpnt)) { +if (request_irq (irq_level, aha1740_intr_handle, (irq_type ?0 :IRQF_SHARED ) |IRQF_USER_DATA ,"aha1740" , shpnt)) {printk (KERN_ERR "aha1740_probe: Unable to allocate IRQ %d.\n" , irq_level); goto err_unmap;
drivers/scsi/aic7xxx/aic7770_osm.c +2 -1
@@ -67,7 +67,8 @@ aic7770_map_int(struct ahc_softc *ahc, u_int irq)if ((ahc->flags &AHC_EDGE_INTERRUPT ) ==0 ) shared =IRQF_SHARED ; - error =request_irq (irq, ahc_linux_isr, shared,"aic7xxx" , ahc); + error =request_irq (irq, ahc_linux_isr, shared |IRQF_USER_DATA , +"aic7xxx" , ahc);if (error ==0 ) ahc->platform_data->irq = irq;
drivers/scsi/aic7xxx/aic79xx_osm_pci.c +1 -1
@@ -383,7 +383,7 @@ ahd_pci_map_int(struct ahd_softc *ahd)int error; error =request_irq (ahd->dev_softc->irq, ahd_linux_isr, -IRQF_SHARED ,"aic79xx" , ahd); +IRQF_SHARED |IRQF_USER_DATA ,"aic79xx" , ahd);if (!error) ahd->platform_data->irq = ahd->dev_softc->irq;
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +1 -1
@@ -461,7 +461,7 @@ ahc_pci_map_int(struct ahc_softc *ahc)int error; error =request_irq (ahc->dev_softc->irq, ahc_linux_isr, -IRQF_SHARED ,"aic7xxx" , ahc); +IRQF_SHARED |IRQF_USER_DATA ,"aic7xxx" , ahc);if (error ==0 ) ahc->platform_data->irq = ahc->dev_softc->irq;
drivers/scsi/aic94xx/aic94xx_init.c +3 -2
@@ -804,8 +804,9 @@ static int asd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)if (use_msi)pci_enable_msi (asd_ha->pcidev); - err =request_irq (asd_ha->pcidev->irq, asd_hw_isr,IRQF_SHARED , -ASD_DRIVER_NAME , asd_ha); + err =request_irq (asd_ha->pcidev->irq, asd_hw_isr, +IRQF_SHARED |IRQF_USER_DATA ,ASD_DRIVER_NAME , + asd_ha);if (err) {asd_printk ("couldn't get irq %d for %s\n" , asd_ha->pcidev->irq,pci_name (asd_ha->pcidev));
drivers/scsi/am53c974.c +2 -2
@@ -448,8 +448,8 @@ static int pci_esp_probe_one(struct pci_dev *pdev,pci_set_drvdata (pdev, pep); - err =request_irq (pdev->irq, scsi_esp_intr,IRQF_SHARED , -DRV_MODULE_NAME , esp); + err =request_irq (pdev->irq, scsi_esp_intr, +IRQF_SHARED |IRQF_USER_DATA ,DRV_MODULE_NAME , esp);if (err <0 ) {dev_printk (KERN_ERR , &pdev->dev,"failed to register IRQ\n" ); goto fail_unmap_command_block;
drivers/scsi/arcmsr/arcmsr_hba.c +1 -2
@@ -860,8 +860,7 @@ arcmsr_request_irq(struct pci_dev *pdev, struct AdapterControlBlock *acb) acb->vector_count = nvec;for (i =0 ; i < nvec; i++) { -if (request_irq (pci_irq_vector (pdev, i), arcmsr_do_interrupt, - flags,"arcmsr" , acb)) { +if (request_irq (pci_irq_vector (pdev, i), arcmsr_do_interrupt, flags |IRQF_USER_DATA ,"arcmsr" , acb)) {pr_warn ("arcmsr%d: request_irq =%d failed!\n" , acb->host->host_no,pci_irq_vector (pdev, i)); goto out_free_irq;
drivers/scsi/atp870u.c +2 -1
@@ -1551,7 +1551,8 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent)else atp870_init (shpnt); - err =request_irq (shpnt->irq, atp870u_intr_handle,IRQF_SHARED ,"atp870u" , shpnt); + err =request_irq (shpnt->irq, atp870u_intr_handle, +IRQF_SHARED |IRQF_USER_DATA ,"atp870u" , shpnt);if (err) {dev_err (&pdev->dev,"Unable to allocate IRQ %d.\n" , shpnt->irq); goto free_tables;
drivers/scsi/be2iscsi/be_main.c +8 -4
@@ -821,7 +821,9 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba) } ret =request_irq (pci_irq_vector (pcidev, i), - be_isr_msix,0 , phba->msi_name[i], + be_isr_msix, +IRQF_USER_DATA , + phba->msi_name[i], &phwi_context->be_eq[i]);if (ret) { beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
@@ -838,7 +840,8 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba) ret = -ENOMEM ; goto free_msix_irqs; } - ret =request_irq (pci_irq_vector (pcidev, i), be_isr_mcc,0 , + ret =request_irq (pci_irq_vector (pcidev, i), be_isr_mcc, +IRQF_USER_DATA , phba->msi_name[i], &phwi_context->be_eq[i]);if (ret) { beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT ,
@@ -849,8 +852,9 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba) } }else { - ret =request_irq (pcidev->irq, be_isr,IRQF_SHARED , -"beiscsi" , phba); + ret =request_irq (pcidev->irq, be_isr, +IRQF_SHARED |IRQF_USER_DATA ,"beiscsi" , + phba);if (ret) {beiscsi_log (phba,KERN_ERR ,BEISCSI_LOG_INIT , "BM_%d : beiscsi_init_irqs-"
drivers/scsi/bfa/bfad.c +6 -3
@@ -1177,8 +1177,10 @@ bfad_install_msix_handler(struct bfad_s *bfad) msix_name_cb[i] : msix_name_ct[i])); error =request_irq (bfad->msix_tab[i].msix.vector, - (irq_handler_t ) bfad_msix,0 , - bfad->msix_tab[i].name, &bfad->msix_tab[i]); + (irq_handler_t )bfad_msix, +IRQF_USER_DATA , + bfad->msix_tab[i].name, + &bfad->msix_tab[i]);bfa_trc (bfad, i);bfa_trc (bfad, bfad->msix_tab[i].msix.vector);if (error) {
@@ -1261,7 +1263,8 @@ bfad_setup_intr(struct bfad_s *bfad) line_based: error =request_irq (bfad->pcidev->irq, (irq_handler_t )bfad_intx, -BFAD_IRQ_FLAGS ,BFAD_DRIVER_NAME , bfad); +BFAD_IRQ_FLAGS |IRQF_USER_DATA ,BFAD_DRIVER_NAME , + bfad);if (error)return error;
drivers/scsi/csiostor/csio_isr.c +9 -7
@@ -387,8 +387,8 @@ csio_request_irqs(struct csio_hw *hw)if (hw->intr_mode !=CSIO_IM_MSIX ) { rv =request_irq (pci_irq_vector (pdev,0 ), csio_fcoe_isr, - hw->intr_mode ==CSIO_IM_MSI ?0 :IRQF_SHARED , -KBUILD_MODNAME , hw); + (hw->intr_mode ==CSIO_IM_MSI ?0 :IRQF_SHARED ) |IRQF_USER_DATA , +KBUILD_MODNAME , hw);if (rv) {csio_err (hw,"Failed to allocate interrupt line.\n" ); goto out_free_irqs;
@@ -400,8 +400,8 @@ csio_request_irqs(struct csio_hw *hw)/* Add the MSIX vector descriptions */ csio_add_msix_desc (hw); - rv =request_irq (pci_irq_vector (pdev, k), csio_nondata_isr,0 , - entryp[k].desc, hw); + rv =request_irq (pci_irq_vector (pdev, k), csio_nondata_isr, +IRQF_USER_DATA , entryp[k].desc, hw);if (rv) {csio_err (hw,"IRQ request failed for vec %d err:%d\n" ,pci_irq_vector (pdev, k), rv);
@@ -410,8 +410,8 @@ csio_request_irqs(struct csio_hw *hw) entryp[k++].dev_id = hw; - rv =request_irq (pci_irq_vector (pdev, k), csio_fwevt_isr,0 , - entryp[k].desc, hw); + rv =request_irq (pci_irq_vector (pdev, k), csio_fwevt_isr, +IRQF_USER_DATA , entryp[k].desc, hw);if (rv) {csio_err (hw,"IRQ request failed for vec %d err:%d\n" ,pci_irq_vector (pdev, k), rv);
@@ -427,7 +427,9 @@ csio_request_irqs(struct csio_hw *hw)struct csio_scsi_qset *sqset = &hw->sqset[i][j];struct csio_q *q = hw->wrm.q_arr[sqset->iq_idx]; - rv =request_irq (pci_irq_vector (pdev, k), csio_scsi_isr,0 , + rv =request_irq (pci_irq_vector (pdev, k), + csio_scsi_isr, +IRQF_USER_DATA , entryp[k].desc, q);if (rv) { csio_err(hw,
drivers/scsi/dpt_i2o.c +1 -1
@@ -1065,7 +1065,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDevprintk (KERN_INFO " BAR1 %p - size= %x\n" ,msg_addr_virt,hba_map1_area_size); } -if (request_irq (pDev->irq, adpt_isr,IRQF_SHARED , pHba->name, pHba)) { +if (request_irq (pDev->irq, adpt_isr,IRQF_SHARED |IRQF_USER_DATA , pHba->name, pHba)) {printk (KERN_ERR "%s: Couldn't register IRQ %d\n" , pHba->name, pDev->irq);adpt_i2o_delete_hba (pHba);return -EINVAL ;
drivers/scsi/esas2r/esas2r_init.c +1 -7
@@ -240,13 +240,7 @@ static void esas2r_claim_interrupts(struct esas2r_adapter *a)"esas2r_claim_interrupts irq=%d (%p, %s, %lx)" , a->pcid->irq, a, a->name, flags); -if (request_irq (a->pcid->irq, - (a->intr_mode == -INTR_MODE_LEGACY ) ? esas2r_interrupt : - esas2r_msi_interrupt, - flags, - a->name, - a)) { +if (request_irq (a->pcid->irq, (a->intr_mode ==INTR_MODE_LEGACY ) ? esas2r_interrupt : esas2r_msi_interrupt, flags |IRQF_USER_DATA , a->name, a)) {esas2r_log (ESAS2R_LOG_CRIT ,"unable to request IRQ %02X" , a->pcid->irq);return ;
drivers/scsi/fnic/fnic_isr.c +9 -4
@@ -178,12 +178,16 @@ int fnic_request_intr(struct fnic *fnic)case VNIC_DEV_INTR_MODE_INTX : err =request_irq (pci_irq_vector (fnic->pdev,0 ), - &fnic_isr_legacy,IRQF_SHARED ,DRV_NAME , fnic); + &fnic_isr_legacy, +IRQF_SHARED |IRQF_USER_DATA ,DRV_NAME , + fnic);break ;case VNIC_DEV_INTR_MODE_MSI : - err =request_irq (pci_irq_vector (fnic->pdev,0 ), &fnic_isr_msi, -0 , fnic->name, fnic); + err =request_irq (pci_irq_vector (fnic->pdev,0 ), + &fnic_isr_msi, +IRQF_USER_DATA , fnic->name, + fnic);break ;case VNIC_DEV_INTR_MODE_MSIX :
@@ -211,7 +215,8 @@ int fnic_request_intr(struct fnic *fnic)for (i =0 ; i <ARRAY_SIZE (fnic->msix); i++) { err =request_irq (pci_irq_vector (fnic->pdev, i), - fnic->msix[i].isr,0 , + fnic->msix[i].isr, +IRQF_USER_DATA , fnic->msix[i].devname, fnic->msix[i].devid);if (err) {
drivers/scsi/g_NCR5380.c +2 -5
@@ -191,9 +191,7 @@ static irqreturn_t legacy_empty_irq_handler(int irq, void *dev_id)static int legacy_find_free_irq (int *irq_table) {while (*irq_table !=-1 ) { -if (!request_irq (*irq_table, legacy_empty_irq_handler, -IRQF_PROBE_SHARED ,"Test IRQ" , - (void *)irq_table)) { +if (!request_irq (*irq_table, legacy_empty_irq_handler,IRQF_PROBE_SHARED |IRQF_USER_DATA ,"Test IRQ" , (void *)irq_table)) {free_irq (*irq_table, (void *) irq_table);return *irq_table; }
@@ -428,8 +426,7 @@ static int generic_NCR5380_init_one(struct scsi_host_template *tpnt, }if (instance->irq !=NO_IRQ ) { -if (request_irq (instance->irq, generic_NCR5380_intr, -0 ,"NCR5380" , instance)) { +if (request_irq (instance->irq, generic_NCR5380_intr,IRQF_USER_DATA ,"NCR5380" , instance)) { instance->irq =NO_IRQ ;shost_printk (KERN_INFO , instance,"irq %d denied\n" , instance->irq);
drivers/scsi/gdth.c +5 -3
@@ -4707,7 +4707,8 @@ static int __init gdth_isa_probe_one(u32 isa_bios)printk ("Configuring GDT-ISA HA at BIOS 0x%05X IRQ %u DRQ %u\n" , isa_bios, ha->irq, ha->drq); - error =request_irq (ha->irq, gdth_interrupt,0 ,"gdth" , ha); + error =request_irq (ha->irq, gdth_interrupt, +IRQF_USER_DATA ,"gdth" , ha);if (error) {printk ("GDT-ISA: Unable to allocate IRQ\n" ); goto out_host_put;
@@ -4839,7 +4840,8 @@ static int __init gdth_eisa_probe_one(u16 eisa_slot)printk ("Configuring GDT-EISA HA at Slot %d IRQ %u\n" , eisa_slot >>12 , ha->irq); - error =request_irq (ha->irq, gdth_interrupt,0 ,"gdth" , ha); + error =request_irq (ha->irq, gdth_interrupt, +IRQF_USER_DATA ,"gdth" , ha);if (error) {printk ("GDT-EISA: Unable to allocate IRQ\n" ); goto out_host_put;
@@ -4975,7 +4977,7 @@ static int gdth_pci_probe_one(gdth_pci_str *pcistr, gdth_ha_str **ha_out) ha->irq); error =request_irq (ha->irq, gdth_interrupt, -IRQF_SHARED ,"gdth" , ha); +IRQF_SHARED |IRQF_USER_DATA ,"gdth" , ha);if (error) {printk ("GDT-PCI: Unable to allocate IRQ\n" ); goto out_host_put;
drivers/scsi/hpsa.c +10 -9
@@ -7994,9 +7994,10 @@ static int hpsa_request_irqs(struct ctlr_info *h,/* If performant mode and MSI-X, use multiple reply queues */ for (i =0 ; i < h->msix_vectors; i++) {sprintf (h->intrname[i],"%s-msix%d" , h->devname, i); - rc =request_irq (pci_irq_vector (h->pdev, i), msixhandler, -0 , h->intrname[i], - &h->q[i]); + rc =request_irq (pci_irq_vector (h->pdev, i), + msixhandler, +IRQF_USER_DATA , + h->intrname[i], &h->q[i]);if (rc) {int j;
@@ -8018,16 +8019,16 @@ static int hpsa_request_irqs(struct ctlr_info *h,sprintf (h->intrname[0 ],"%s-msi%s" , h->devname, h->msix_vectors ?"x" :"" ); rc =request_irq (pci_irq_vector (h->pdev,0 ), - msixhandler,0 , - h->intrname[0 ], - &h->q[h->intr_mode]); + msixhandler, +IRQF_USER_DATA , + h->intrname[0 ], &h->q[h->intr_mode]); }else {sprintf (h->intrname[h->intr_mode],"%s-intx" , h->devname); rc =request_irq (pci_irq_vector (h->pdev,0 ), - intxhandler,IRQF_SHARED , - h->intrname[0 ], - &h->q[h->intr_mode]); + intxhandler, +IRQF_SHARED |IRQF_USER_DATA , + h->intrname[0 ], &h->q[h->intr_mode]); } }if (rc) {
drivers/scsi/hptiop.c +1 -2
@@ -1421,8 +1421,7 @@ static int hptiop_probe(struct pci_dev *pcidev, const struct pci_device_id *id)pci_set_drvdata (pcidev, host); -if (request_irq (pcidev->irq, hptiop_intr,IRQF_SHARED , - driver_name, hba)) { +if (request_irq (pcidev->irq, hptiop_intr,IRQF_SHARED |IRQF_USER_DATA , driver_name, hba)) {printk (KERN_ERR "scsi%d: request irq %d failed\n" , hba->host->host_no, pcidev->irq); goto unmap_pci_bar;
drivers/scsi/initio.c +2 -1
@@ -2913,7 +2913,8 @@ static int initio_probe_one(struct pci_dev *pdev, shost->base = host->addr; shost->sg_tablesize =TOTAL_SG_ENTRY ; - error =request_irq (pdev->irq, i91u_intr,IRQF_SHARED ,"i91u" , shost); + error =request_irq (pdev->irq, i91u_intr, +IRQF_SHARED |IRQF_USER_DATA ,"i91u" , shost);if (error <0 ) {printk (KERN_WARNING "initio: Unable to request IRQ %d\n" , pdev->irq); goto out_free_scbs;
drivers/scsi/ipr.c +12 -11
@@ -10048,11 +10048,10 @@ static int ipr_request_other_msi_irqs(struct ipr_ioa_cfg *ioa_cfg,int i, rc;for (i =1 ; i < ioa_cfg->nvectors; i++) { - rc =request_irq (pci_irq_vector (pdev, i), - ipr_isr_mhrrq, -0 , - ioa_cfg->vectors_info[i].desc, - &ioa_cfg->hrrq[i]); + rc =request_irq (pci_irq_vector (pdev, i), ipr_isr_mhrrq, +IRQF_USER_DATA , + ioa_cfg->vectors_info[i].desc, + &ioa_cfg->hrrq[i]);if (rc) {while (--i >=0 ) free_irq(pci_irq_vector(pdev, i),
@@ -10117,7 +10116,8 @@ static int ipr_test_msi(struct ipr_ioa_cfg *ioa_cfg, struct pci_dev *pdev) int_reg =readl (ioa_cfg->regs.sense_interrupt_mask_reg);spin_unlock_irqrestore (ioa_cfg->host->host_lock, lock_flags); - rc =request_irq (irq, ipr_test_intr,0 ,IPR_NAME , ioa_cfg); + rc =request_irq (irq, ipr_test_intr,IRQF_USER_DATA , +IPR_NAME , ioa_cfg);if (rc) {dev_err (&pdev->dev,"Can not assign irq %d\n" , irq);return rc;
@@ -10369,15 +10369,16 @@ static int ipr_probe_ioa(struct pci_dev *pdev,if (pdev->msi_enabled || pdev->msix_enabled) {name_msi_vectors (ioa_cfg); - rc =request_irq (pci_irq_vector (pdev,0 ), ipr_isr,0 , - ioa_cfg->vectors_info[0 ].desc, - &ioa_cfg->hrrq[0 ]); + rc =request_irq (pci_irq_vector (pdev,0 ), ipr_isr, +IRQF_USER_DATA , + ioa_cfg->vectors_info[0 ].desc, + &ioa_cfg->hrrq[0 ]);if (!rc) rc =ipr_request_other_msi_irqs (ioa_cfg, pdev); }else { rc =request_irq (pdev->irq, ipr_isr, -IRQF_SHARED , -IPR_NAME , &ioa_cfg->hrrq[0 ]); +IRQF_SHARED |IRQF_USER_DATA ,IPR_NAME , + &ioa_cfg->hrrq[0 ]); }if (rc) { dev_err(&pdev->dev, "Couldn't register IRQ %d! rc=%d\n",
drivers/scsi/ips.c +2 -2
@@ -6664,7 +6664,7 @@ ips_register_scsi(int index)memcpy (ha, oldha,sizeof (ips_ha_t));free_irq (oldha->pcidev->irq, oldha);/* Install the interrupt handler with the new ha */ -if (request_irq (ha->pcidev->irq, do_ipsintr,IRQF_SHARED , ips_name, ha)) { +if (request_irq (ha->pcidev->irq, do_ipsintr,IRQF_SHARED |IRQF_USER_DATA , ips_name, ha)) {IPS_PRINTK (KERN_WARNING , ha->pcidev,"Unable to install interrupt handler\n" ); goto err_out_sh;
@@ -7062,7 +7062,7 @@ ips_init_phase2(int index) }/* Install the interrupt handler */ -if (request_irq (ha->pcidev->irq, do_ipsintr,IRQF_SHARED , ips_name, ha)) { +if (request_irq (ha->pcidev->irq, do_ipsintr,IRQF_SHARED |IRQF_USER_DATA , ips_name, ha)) {IPS_PRINTK (KERN_WARNING , ha->pcidev,"Unable to install interrupt handler\n" );return ips_abort_init (ha, index);
drivers/scsi/isci/init.c +5 -3
@@ -353,7 +353,8 @@ static int isci_setup_interrupts(struct pci_dev *pdev) isr = isci_msix_isr; err =devm_request_irq (&pdev->dev,pci_irq_vector (pdev, i), - isr,0 ,DRV_NAME "-msix" , ihost); + isr,IRQF_USER_DATA , +DRV_NAME "-msix" , ihost);if (!err)continue ;
@@ -372,8 +373,9 @@ static int isci_setup_interrupts(struct pci_dev *pdev) intx:for_each_isci_host (i, ihost, pdev) { err =devm_request_irq (&pdev->dev,pci_irq_vector (pdev,0 ), - isci_intx_isr,IRQF_SHARED ,DRV_NAME "-intx" , - ihost); + isci_intx_isr, +IRQF_SHARED |IRQF_USER_DATA , +DRV_NAME "-intx" , ihost);if (err)break ; }
drivers/scsi/lpfc/lpfc_init.c +22 -13
@@ -10004,7 +10004,8 @@ lpfc_sli_enable_msix(struct lpfc_hba *phba)/* vector-0 is associated to slow-path handler */ rc =request_irq (pci_irq_vector (phba->pcidev,0 ), - &lpfc_sli_sp_intr_handler,0 , + &lpfc_sli_sp_intr_handler, +IRQF_USER_DATA ,LPFC_SP_DRIVER_HANDLER_NAME , phba);if (rc) { lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
@@ -10015,7 +10016,8 @@ lpfc_sli_enable_msix(struct lpfc_hba *phba)/* vector-1 is associated to fast-path handler */ rc =request_irq (pci_irq_vector (phba->pcidev,1 ), - &lpfc_sli_fp_intr_handler,0 , + &lpfc_sli_fp_intr_handler, +IRQF_USER_DATA ,LPFC_FP_DRIVER_HANDLER_NAME , phba);if (rc) {
@@ -10103,7 +10105,8 @@ lpfc_sli_enable_msi(struct lpfc_hba *phba) } rc =request_irq (phba->pcidev->irq, lpfc_sli_intr_handler, -0 ,LPFC_DRIVER_NAME , phba); +IRQF_USER_DATA ,LPFC_DRIVER_NAME , + phba);if (rc) {pci_disable_msi (phba->pcidev); lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
@@ -10161,7 +10164,8 @@ lpfc_sli_enable_intr(struct lpfc_hba *phba, uint32_t cfg_mode)/* Fallback to INTx if both MSI-X/MSI initalization failed */ if (phba->intr_type ==NONE ) { retval =request_irq (phba->pcidev->irq, lpfc_sli_intr_handler, -IRQF_SHARED ,LPFC_DRIVER_NAME , phba); +IRQF_SHARED |IRQF_USER_DATA , +LPFC_DRIVER_NAME , phba);if (!retval) {/* Indicate initialization to INTx mode */ phba->intr_type = INTx;
@@ -10297,14 +10301,16 @@ lpfc_sli4_enable_msix(struct lpfc_hba *phba)atomic_set (&phba->sli4_hba.hba_eq_hdl[index].hba_eq_in_use,1 );if (phba->cfg_fof && (index == (vectors -1 ))) rc =request_irq (pci_irq_vector (phba->pcidev, index), - &lpfc_sli4_fof_intr_handler,0 , - name, - &phba->sli4_hba.hba_eq_hdl[index]); + &lpfc_sli4_fof_intr_handler, +IRQF_USER_DATA , + name, + &phba->sli4_hba.hba_eq_hdl[index]);else rc =request_irq (pci_irq_vector (phba->pcidev, index), - &lpfc_sli4_hba_intr_handler,0 , - name, - &phba->sli4_hba.hba_eq_hdl[index]); + &lpfc_sli4_hba_intr_handler, +IRQF_USER_DATA , + name, + &phba->sli4_hba.hba_eq_hdl[index]);if (rc) {lpfc_printf_log (phba,KERN_WARNING ,LOG_INIT , "0486 MSI-X fast-path (%d) "
@@ -10377,7 +10383,8 @@ lpfc_sli4_enable_msi(struct lpfc_hba *phba) } rc =request_irq (phba->pcidev->irq, lpfc_sli4_intr_handler, -0 ,LPFC_DRIVER_NAME , phba); +IRQF_USER_DATA ,LPFC_DRIVER_NAME , + phba);if (rc) {pci_disable_msi (phba->pcidev); lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
@@ -10445,8 +10452,10 @@ lpfc_sli4_enable_intr(struct lpfc_hba *phba, uint32_t cfg_mode)/* Fallback to INTx if both MSI-X/MSI initalization failed */ if (phba->intr_type ==NONE ) { - retval =request_irq (phba->pcidev->irq, lpfc_sli4_intr_handler, -IRQF_SHARED ,LPFC_DRIVER_NAME , phba); + retval =request_irq (phba->pcidev->irq, + lpfc_sli4_intr_handler, +IRQF_SHARED |IRQF_USER_DATA , +LPFC_DRIVER_NAME , phba);if (!retval) {struct lpfc_hba_eq_hdl *eqhdl;
drivers/scsi/megaraid.c +1 -3
@@ -4299,9 +4299,7 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) goto out_free_cmd_buffer; } -if (request_irq (irq, (adapter->flag &BOARD_MEMMAP ) ? - megaraid_isr_memmapped : megaraid_isr_iomapped, -IRQF_SHARED ,"megaraid" , adapter)) { +if (request_irq (irq, (adapter->flag &BOARD_MEMMAP ) ? megaraid_isr_memmapped : megaraid_isr_iomapped,IRQF_SHARED |IRQF_USER_DATA ,"megaraid" , adapter)) {dev_warn (&pdev->dev,"Couldn't register IRQ %d!\n" , irq); goto out_free_scb_list; }
drivers/scsi/megaraid/megaraid_mbox.c +1 -2
@@ -767,8 +767,7 @@ megaraid_init_mbox(adapter_t *adapter)*/ /* request IRQ and register the interrupt service routine */ -if (request_irq (adapter->irq, megaraid_isr,IRQF_SHARED ,"megaraid" , - adapter)) { +if (request_irq (adapter->irq, megaraid_isr,IRQF_SHARED |IRQF_USER_DATA ,"megaraid" , adapter)) {con_log (CL_ANN , (KERN_WARNING "megaraid: Couldn't register IRQ %d!\n" , adapter->irq));
drivers/scsi/megaraid/megaraid_sas_base.c +2 -6
@@ -5170,9 +5170,7 @@ megasas_setup_irqs_ioapic(struct megasas_instance *instance) pdev = instance->pdev; instance->irq_context[0 ].instance = instance; instance->irq_context[0 ].MSIxIndex =0 ; -if (request_irq (pci_irq_vector (pdev,0 ), - instance->instancet->service_isr,IRQF_SHARED , -"megasas" , &instance->irq_context[0 ])) { +if (request_irq (pci_irq_vector (pdev,0 ), instance->instancet->service_isr,IRQF_SHARED |IRQF_USER_DATA ,"megasas" , &instance->irq_context[0 ])) {dev_err (&instance->pdev->dev,"Failed to register IRQ from %s %d\n" , __func__, __LINE__);
@@ -5202,9 +5200,7 @@ megasas_setup_irqs_msix(struct megasas_instance *instance, u8 is_probe)for (i =0 ; i < instance->msix_vectors; i++) { instance->irq_context[i].instance = instance; instance->irq_context[i].MSIxIndex = i; -if (request_irq (pci_irq_vector (pdev, i), - instance->instancet->service_isr,0 ,"megasas" , - &instance->irq_context[i])) { +if (request_irq (pci_irq_vector (pdev, i), instance->instancet->service_isr,IRQF_USER_DATA ,"megasas" , &instance->irq_context[i])) {dev_err (&instance->pdev->dev,"Failed to register IRQ for vector %d.\n" , i);for (j =0 ; j < i; j++)
drivers/scsi/mpt3sas/mpt3sas_base.c +1 -1
@@ -2727,7 +2727,7 @@ _base_request_irq(struct MPT3SAS_ADAPTER *ioc, u8 index)snprintf (reply_q->name,MPT_NAME_LENGTH ,"%s%d" , ioc->driver_name, ioc->id); r =request_irq (pci_irq_vector (pdev, index), _base_interrupt, -IRQF_SHARED , reply_q->name, reply_q); +IRQF_SHARED |IRQF_USER_DATA , reply_q->name, reply_q);if (r) {pr_err ("%s: unable to allocate interrupt %d!\n" , reply_q->name,pci_irq_vector (pdev, index));
drivers/scsi/mvsas/mv_init.c +2 -2
@@ -589,8 +589,8 @@ static int mvs_pci_init(struct pci_dev *pdev, const struct pci_device_id *ent) rc =sas_register_ha (SHOST_TO_SAS_HA (shost));if (rc) goto err_out_shost; - rc =request_irq (pdev->irq, irq_handler,IRQF_SHARED , -DRV_NAME ,SHOST_TO_SAS_HA (shost)); + rc =request_irq (pdev->irq, irq_handler,IRQF_SHARED |IRQF_USER_DATA , +DRV_NAME ,SHOST_TO_SAS_HA (shost));if (rc) goto err_not_sas;
drivers/scsi/mvumi.c +4 -4
@@ -2516,8 +2516,8 @@ static int mvumi_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)if (ret) goto fail_init_fw; - ret =request_irq (mhba->pdev->irq, mvumi_isr_handler,IRQF_SHARED , -"mvumi" , mhba); + ret =request_irq (mhba->pdev->irq, mvumi_isr_handler, +IRQF_SHARED |IRQF_USER_DATA ,"mvumi" , mhba);if (ret) {dev_err (&pdev->dev,"failed to register IRQ\n" ); goto fail_init_irq;
@@ -2645,8 +2645,8 @@ static int __maybe_unused mvumi_resume(struct pci_dev *pdev) goto unmap_pci_addr; } - ret =request_irq (mhba->pdev->irq, mvumi_isr_handler,IRQF_SHARED , -"mvumi" , mhba); + ret =request_irq (mhba->pdev->irq, mvumi_isr_handler, +IRQF_SHARED |IRQF_USER_DATA ,"mvumi" , mhba);if (ret) {dev_err (&pdev->dev,"failed to register IRQ\n" ); goto unmap_pci_addr;
drivers/scsi/myrb.c +1 -1
@@ -3542,7 +3542,7 @@ static struct myrb_hba *myrb_detect(struct pci_dev *pdev,if (privdata->hw_init (pdev, cb, cb->io_base)) goto failure; -if (request_irq (pdev->irq, irq_handler,IRQF_SHARED ,"myrb" , cb) <0 ) { +if (request_irq (pdev->irq, irq_handler,IRQF_SHARED |IRQF_USER_DATA ,"myrb" , cb) <0 ) {dev_err (&pdev->dev,"Unable to acquire IRQ Channel %d\n" , pdev->irq); goto failure;
drivers/scsi/myrs.c +1 -1
@@ -2323,7 +2323,7 @@ static struct myrs_hba *myrs_detect(struct pci_dev *pdev, goto Failure;/* Acquire shared access to the IRQ Channel. */ -if (request_irq (pdev->irq, irq_handler,IRQF_SHARED ,"myrs" , cs) <0 ) { +if (request_irq (pdev->irq, irq_handler,IRQF_SHARED |IRQF_USER_DATA ,"myrs" , cs) <0 ) {dev_err (&pdev->dev,"Unable to acquire IRQ Channel %d\n" , pdev->irq); goto Failure;
drivers/scsi/nsp32.c +2 -1
@@ -2729,7 +2729,8 @@ static int nsp32_detect(struct pci_dev *pdev)*/ nsp32_do_bus_reset (data); - ret =request_irq (host->irq, do_nsp32_isr,IRQF_SHARED ,"nsp32" , data); + ret =request_irq (host->irq, do_nsp32_isr, +IRQF_SHARED |IRQF_USER_DATA ,"nsp32" , data);if (ret <0 ) {nsp32_msg (KERN_ERR ,"Unable to allocate IRQ for NinjaSCSI32 " "SCSI PCI controller. Interrupt: %d" , host->irq);
drivers/scsi/pcmcia/qlogic_stub.c +1 -1
@@ -119,7 +119,7 @@ static struct Scsi_Host *qlogic_detect(struct scsi_host_template *host, priv->shost = shost; priv->int_type =INT_TYPE ; -if (request_irq (qlirq, qlogicfas408_ihandl,0 , qlogic_name, shost)) +if (request_irq (qlirq, qlogicfas408_ihandl,IRQF_USER_DATA , qlogic_name, shost)) goto free_scsi_host;
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/addi_apci_1032.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/addi_apci_1500.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/addi_apci_1564.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/addi_apci_2032.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/addi_apci_3120.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/addi_apci_3xxx.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/adl_pci9111.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/adl_pci9118.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/adv_pci1710.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/aio_iiro_16.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/amplc_dio200_common.c +1 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/amplc_pc236_common.c +1 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/amplc_pci224.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/amplc_pci230.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/cb_pcidas.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/cb_pcidas64.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/comedi_parport.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/das16m1.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/das1800.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/das6402.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/das800.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/dmm32at.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/dt2811.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/dt2814.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/dt282x.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/dt3000.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/gsc_hpdi.c +1 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/me4000.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_6527.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_65xx.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_660x.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_at_a2150.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_atmio.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_atmio16d.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_labpc_common.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_pcidio.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/ni_pcimio.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/pcl711.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/pcl726.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/pcl812.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/pcl816.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/pcl818.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/pcmmio.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/pcmuio.c +4 -2
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/rtd520.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/gasket/gasket_interrupt.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/staging/goldfish/goldfish_audio.c +3 -2
Lines of this file are not shown. View the raw message.
drivers/staging/media/bcm2048/radio-bcm2048.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/media/zoran/zoran_card.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/olpc_dcon/olpc_dcon_xo_1.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/thermal/ti-soc-thermal/ti-bandgap.c +4 -2
Lines of this file are not shown. View the raw message.
drivers/usb/gadget/udc/amd5536udc_pci.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/video/fbdev/matrox/matroxfb_base.c +1 -2
Lines of this file are not shown. View the raw message.
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c +3 -4
Lines of this file are not shown. View the raw message.
drivers/virt/vboxguest/vboxguest_linux.c +3 -2
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.2
Part of the diff is not shown here. View the raw message.
PATCH v6 40/43 MDSv6
In reply to Andi KleenTurn on lazy mode as default, make mds=full active as an option.
--- arch/x86/kernel/cpu/bugs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/x86/kernel/cpu/bugs.c +1 -3
@@ -1106,9 +1106,7 @@ static void mds_select_mitigation(void)setup_force_cpu_cap (X86_FEATURE_VERW );if (cmdline_find_option_bool (boot_command_line,"mds=off" ))setup_clear_cpu_cap (X86_FEATURE_VERW ); -/* Default to old behavior for now */ -if (cmdline_find_option_bool (boot_command_line,"mds=full" ) || - true) +if (cmdline_find_option_bool (boot_command_line,"mds=full" ))static_branch_enable (&force_cpu_clear);/* Nop currently because this is default for now. */ if (cmdline_find_option_bool (boot_command_line,"mds=auto" ))
Signature · 1 line
2.17.2
PATCH v6 4/43 MDSv6
In reply to Andi KleenParse mds=off / mds=auto / mds=full on the kernel command line.
Only mds=off has an effect, mds=auto is equal to mds=full and is default currently.
--- .../admin-guide/kernel-parameters.txt | 11 +++++++ arch/x86/include/asm/clearcpu.h | 2 +- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/bugs.c | 31 +++++++++++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-)
Documentation/admin-guide/kernel-parameters.txt +11 -0
@@ -2356,6 +2356,17 @@ Format: <first>,<last> Specifies range of consoles to be captured by the MDA. + mds=off [X86, Intel] + Disable workarounds for Micro-architectural Data Sampling. + + mds=auto [X86, Intel] + Automatically select default for MDS mitigation. + Currently this always flushes on kernel exit. + + mds=full [X86, Intel] + Always flush cpu buffers when exiting kernel for MDS + without any heuristics. + mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory Amount of memory to be used when the kernel is not able to see the whole system memory or for test.
arch/x86/include/asm/clearcpu.h +1 -1
@@ -16,7 +16,7 @@ static inline void clear_cpu(void) {unsigned kernel_ds = __KERNEL_DS;/* Has to be memory form, don't modify to use an register */ - alternative_input("", "verw %[kernelds]", X86_BUG_MDS, + alternative_input("", "verw %[kernelds]", X86_FEATURE_VERW, [kernelds] "m" (kernel_ds)); }
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -221,6 +221,7 @@#define X86_FEATURE_ZEN ( 7*32+28)/* "" CPU is AMD family 0x17 (Zen) */ #define X86_FEATURE_L1TF_PTEINV ( 7*32+29)/* "" L1TF workaround PTE inversion */ #define X86_FEATURE_IBRS_ENHANCED ( 7*32+30)/* Enhanced IBRS */ +#define X86_FEATURE_VERW ( 7*32+31)/* "" VERW for MDS on kernel exit */ /* Virtualization flags: Linux defined, word 8 */ #define X86_FEATURE_TPR_SHADOW ( 8*32+ 0)/* Intel TPR Shadow */
arch/x86/kernel/cpu/bugs.c +31 -0
@@ -37,6 +37,7 @@static void __init spectre_v2_select_mitigation (void );static void __init ssb_select_mitigation (void );static void __init l1tf_select_mitigation (void ); +static void __init mds_select_mitigation (void );/* The base value of the SPEC_CTRL MSR that always has to be preserved. */ u64 x86_spec_ctrl_base;
@@ -101,6 +102,8 @@ void __init check_bugs(void)l1tf_select_mitigation (); +mds_select_mitigation (); +#ifdef CONFIG_X86_32 /* * Check whether we are able to run this kernel safely on SMP.
@@ -1058,6 +1061,34 @@ early_param("l1tf", l1tf_cmdline);#undef pr_fmt +static void mds_select_mitigation (void ) +{ +if (!boot_cpu_has (X86_BUG_MDS )) +return ; + +/* +* Use VERW even if the CPUID does not report MD_CLEAR, +* in case we're running in a legacy hypervisor that +* doesn't pass through CPUID properly. +* +* This causes some extra overhead on CPUs that don't need +* VERW. +* +* This is supposed to handle the slow release cycle +* of VMware who doesn't update CPUIDs timely in 2019. +* If the year is 2020 and you still see this please +* guard this with +* if (boot_cpu_has(X86_FEATURE_MD_CLEAR)) setup_force ... VERW +*/ +setup_force_cpu_cap (X86_FEATURE_VERW ); +if (cmdline_find_option_bool (boot_command_line,"mds=off" )) +setup_clear_cpu_cap (X86_FEATURE_VERW ); +/* Nop currently because this is default for now. */ +if (cmdline_find_option_bool (boot_command_line,"mds=full" ) || +cmdline_find_option_bool (boot_command_line,"mds=auto" )) +setup_force_cpu_cap (X86_FEATURE_VERW ); +} +#ifdef CONFIG_SYSFS #define L1TF_DEFAULT_MSG "Mitigation: PTE Inversion"
Signature · 1 line
2.17.2
PATCH v6 42/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: mds sweep: Mark timer handlers that touch user data
This is the result of a large scale tree audit, looking for timer handlers that may touch user data. The audit was on the conservative side, it was either handlers that clearly user data, or were too complicated to audit and not performance critical.
There are more timer handlers that touch user data, but these are covered by centralized hooks.
The change was done with the following cocci script, except for DEFINE_TIMER, which was done by sed.
// SPDX-License-Identifier: GPL-2.0
@@
expression timer, func, flags;
@@
- timer_setup(timer, func, flags)
+ timer_setup(timer, func, flags | TIMER_USER_DATA)
@@
expression timer, func, flags;
@@
- timer_setup_on_stack(timer, func, flags)
+ timer_setup_on_stack(timer, func, flags | TIMER_USER_DATA)
@@
expression timer, flags1, flags2;
@@
- hrtimer_init(timer, flags1, flags2)
+ hrtimer_init(timer, flags1, flags2 | HRTIMER_MODE_USER_DATA)
--- arch/x86/events/intel/uncore.c | 3 ++- drivers/auxdisplay/img-ascii-lcd.c | 2 +- drivers/block/xsysace.c | 2 +- drivers/firewire/core-transaction.c | 5 +++-- drivers/gpu/drm/i915/i915_pmu.c | 3 ++- drivers/ide/ide-probe.c | 2 +- drivers/iio/trigger/iio-trig-hrtimer.c | 3 ++- drivers/input/ff-memless.c | 2 +- drivers/input/input.c | 2 +- drivers/isdn/capi/capidrv.c | 2 +- drivers/isdn/i4l/isdn_common.c | 2 +- drivers/media/cec/cec-pin.c | 3 ++- drivers/media/pci/bt8xx/bttv-driver.c | 2 +- drivers/media/pci/bt8xx/bttv-input.c | 5 +++-- .../pci/netup_unidvb/netup_unidvb_core.c | 3 ++- drivers/media/pci/saa7134/saa7134-input.c | 3 ++- drivers/media/pci/saa7134/saa7134-ts.c | 3 ++- drivers/media/pci/saa7134/saa7134-vbi.c | 3 ++- drivers/media/pci/saa7134/saa7134-video.c | 3 ++- drivers/media/pci/ttpci/av7110_ir.c | 3 ++- drivers/media/radio/radio-cadet.c | 2 +- drivers/media/radio/wl128x/fmdrv_common.c | 3 ++- drivers/media/rc/img-ir/img-ir-raw.c | 2 +- drivers/media/rc/ir-rx51.c | 3 ++- drivers/media/usb/au0828/au0828-video.c | 6 +++-- drivers/net/appletalk/cops.c | 2 +- drivers/net/caif/caif_hsi.c | 9 +++++--- drivers/net/hamradio/6pack.c | 4 ++-- drivers/net/hamradio/scc.c | 4 ++-- drivers/net/hamradio/yam.c | 4 ++-- drivers/net/hippi/rrunner.c | 2 +- drivers/net/ieee802154/at86rf230.c | 3 ++- drivers/net/slip/slip.c | 4 ++-- drivers/net/wan/sdla.c | 2 +- drivers/net/wireless/ath/ath9k/init.c | 5 +++-- .../net/wireless/intersil/hostap/hostap_ap.c | 2 +- .../wireless/marvell/mwifiex/11n_rxreorder.c | 3 ++- drivers/net/wireless/marvell/mwifiex/usb.c | 2 +- drivers/pcmcia/yenta_socket.c | 3 ++- drivers/platform/x86/sony-laptop.c | 2 +- drivers/staging/comedi/drivers/comedi_test.c | 6 +++-- drivers/staging/comedi/drivers/jr3_pci.c | 2 +- drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- drivers/staging/rtl8188eu/os_dep/mlme_linux.c | 17 +++++++++----- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 2 +- .../rtl8192u/ieee80211/ieee80211_module.c | 2 +- .../rtl8192u/ieee80211/ieee80211_softmac.c | 6 +++-- drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 22 ++++++++++++------- drivers/staging/rtl8723bs/os_dep/recv_linux.c | 2 +- drivers/staging/speakup/main.c | 2 +- drivers/tty/isicom.c | 2 +- drivers/tty/moxa.c | 2 +- drivers/tty/n_gsm.c | 5 +++-- drivers/tty/n_r3964.c | 2 +- drivers/tty/rocket.c | 2 +- drivers/tty/serial/8250/8250_core.c | 3 ++- drivers/tty/serial/8250/8250_port.c | 4 ++-- drivers/tty/serial/max3100.c | 2 +- drivers/tty/serial/mux.c | 2 +- drivers/tty/serial/pnx8xxx_uart.c | 3 ++- drivers/tty/serial/sccnxp.c | 2 +- drivers/tty/serial/sh-sci.c | 9 +++++--- drivers/tty/vcc.c | 4 ++-- drivers/tty/vt/keyboard.c | 2 +- drivers/usb/chipidea/otg_fsm.c | 3 ++- drivers/usb/dwc2/hcd_queue.c | 6 +++-- drivers/usb/gadget/function/f_ncm.c | 3 ++- drivers/usb/gadget/udc/dummy_hcd.c | 4 ++-- drivers/usb/gadget/udc/m66592-udc.c | 2 +- drivers/usb/gadget/udc/r8a66597-udc.c | 2 +- drivers/usb/usbip/vudc_transfer.c | 2 +- drivers/uwb/neh.c | 2 +- drivers/uwb/rsv.c | 5 +++-- drivers/visorbus/visorbus_main.c | 2 +- kernel/time/alarmtimer.c | 2 +- lib/random32.c | 2 +- net/wireless/lib80211.c | 2 +- security/keys/gc.c | 2 +- sound/core/hrtimer.c | 3 ++- sound/drivers/mpu401/mpu401_uart.c | 3 ++- sound/drivers/mtpav.c | 3 ++- sound/drivers/pcsp/pcsp.c | 3 ++- sound/drivers/serial-u16550.c | 3 ++- sound/isa/sb/emu8000_pcm.c | 2 +- sound/isa/sb/sb8_midi.c | 3 ++- sound/isa/wavefront/wavefront_midi.c | 4 ++-- sound/pci/echoaudio/midi.c | 2 +- sound/pci/rme9652/hdsp.c | 2 +- sound/pci/rme9652/hdspm.c | 3 ++- sound/usb/midi.c | 3 ++- 90 files changed, 180 insertions(+), 123 deletions(-)
arch/x86/events/intel/uncore.c +2 -1
@@ -289,7 +289,8 @@ void uncore_pmu_cancel_hrtimer(struct intel_uncore_box *box)static void uncore_pmu_init_hrtimer (struct intel_uncore_box *box) { -hrtimer_init (&box->hrtimer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (&box->hrtimer,CLOCK_MONOTONIC , +HRTIMER_MODE_REL |HRTIMER_MODE_USER_DATA |HRTIMER_MODE_USER_DATA ); box->hrtimer.function = uncore_pmu_hrtimer; }
drivers/auxdisplay/img-ascii-lcd.c +1 -1
@@ -395,7 +395,7 @@ static int img_ascii_lcd_probe(struct platform_device *pdev) ctx->scroll_rate =HZ /2 ;/* initialise a timer for scrolling the message */ -timer_setup (&ctx->timer, img_ascii_lcd_scroll,0 ); +timer_setup (&ctx->timer, img_ascii_lcd_scroll,TIMER_USER_DATA );platform_set_drvdata (pdev, ctx);
drivers/block/xsysace.c +1 -1
@@ -1005,7 +1005,7 @@ static int ace_setup(struct ace_device *ace)* Initialize the state machine tasklet and stall timer */ tasklet_init (&ace->fsm_tasklet, ace_fsm_tasklet, (unsigned long )ace); -timer_setup (&ace->stall_timer, ace_stall_timer,0 ); +timer_setup (&ace->stall_timer, ace_stall_timer,TIMER_USER_DATA );/* * Initialize the request queue
drivers/firewire/core-transaction.c +3 -2
@@ -374,7 +374,7 @@ void fw_send_request(struct fw_card *card, struct fw_transaction *t, int tcode, t->card = card; t->is_split_transaction = false;timer_setup (&t->split_timeout_timer, - split_transaction_timeout_callback,0 ); + split_transaction_timeout_callback,TIMER_USER_DATA ); t->callback = callback; t->callback_data = callback_data;
@@ -431,7 +431,8 @@ int fw_run_transaction(struct fw_card *card, int tcode, int destination_id,struct transaction_callback_data d;struct fw_transaction t; -timer_setup_on_stack (&t.split_timeout_timer,NULL ,0 ); +timer_setup_on_stack (&t.split_timeout_timer,NULL , +TIMER_USER_DATA );init_completion (&d.done); d.payload = payload; fw_send_request(card, &t, tcode, destination_id, generation, speed,
drivers/gpu/drm/i915/i915_pmu.c +2 -1
@@ -1066,7 +1066,8 @@ void i915_pmu_register(struct drm_i915_private *i915) i915->pmu.base.event_idx = i915_pmu_event_event_idx;spin_lock_init (&i915->pmu.lock); -hrtimer_init (&i915->pmu.timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (&i915->pmu.timer,CLOCK_MONOTONIC , +HRTIMER_MODE_REL |HRTIMER_MODE_USER_DATA |HRTIMER_MODE_USER_DATA ); i915->pmu.timer.function = i915_sample; ret =perf_pmu_register (&i915->pmu.base,"i915" ,-1 );
drivers/ide/ide-probe.c +1 -1
@@ -1233,7 +1233,7 @@ static void ide_init_port_data(ide_hwif_t *hwif, unsigned int index)spin_lock_init (&hwif->lock); -timer_setup (&hwif->timer, ide_timer_expiry,0 ); +timer_setup (&hwif->timer, ide_timer_expiry,TIMER_USER_DATA );init_completion (&hwif->gendev_rel_comp);
drivers/iio/trigger/iio-trig-hrtimer.c +2 -1
@@ -136,7 +136,8 @@ static struct iio_sw_trigger *iio_trig_hrtimer_probe(const char *name) trig_info->swt.trigger->ops = &iio_hrtimer_trigger_ops; trig_info->swt.trigger->dev.groups = iio_hrtimer_attr_groups; -hrtimer_init (&trig_info->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (&trig_info->timer,CLOCK_MONOTONIC , +HRTIMER_MODE_REL |HRTIMER_MODE_USER_DATA |HRTIMER_MODE_USER_DATA ); trig_info->timer.function = iio_hrtimer_trig_handler; trig_info->sampling_frequency =HRTIMER_DEFAULT_SAMPLING_FREQUENCY ;
drivers/input/ff-memless.c +1 -1
@@ -526,7 +526,7 @@ int input_ff_create_memless(struct input_dev *dev, void *data, ml->private = data; ml->play_effect = play_effect; ml->gain =0xffff ; -timer_setup (&ml->timer, ml_effect_timer,0 ); +timer_setup (&ml->timer, ml_effect_timer,TIMER_USER_DATA );set_bit (FF_GAIN , dev->ffbit);
drivers/input/input.c +1 -1
@@ -1795,7 +1795,7 @@ struct input_dev *input_allocate_device(void)device_initialize (&dev->dev);mutex_init (&dev->mutex);spin_lock_init (&dev->event_lock); -timer_setup (&dev->timer,NULL ,0 ); +timer_setup (&dev->timer,NULL ,TIMER_USER_DATA );INIT_LIST_HEAD (&dev->h_list);INIT_LIST_HEAD (&dev->node);
drivers/isdn/capi/capidrv.c +1 -1
@@ -2265,7 +2265,7 @@ static int capidrv_addcontr(u16 contr, struct capi_profile *profp)return -1 ; } card->owner =THIS_MODULE ; -timer_setup (&card->listentimer, listentimerfunc,0 ); +timer_setup (&card->listentimer, listentimerfunc,TIMER_USER_DATA );strcpy (card->name, id); card->contrnr = contr; card->nbchan = profp->nbchannel;
drivers/isdn/i4l/isdn_common.c +1 -1
@@ -2290,7 +2290,7 @@ static int __init isdn_init(void)printk (KERN_WARNING "isdn: Could not allocate device-struct.\n" );return -EIO ; } -timer_setup (&dev->timer, isdn_timer_funct,0 ); +timer_setup (&dev->timer, isdn_timer_funct,TIMER_USER_DATA );spin_lock_init (&dev->lock);spin_lock_init (&dev->timerlock);#ifdef MODULE
drivers/media/cec/cec-pin.c +2 -1
@@ -1312,7 +1312,8 @@ struct cec_adapter *cec_pin_allocate_adapter(const struct cec_pin_ops *pin_ops,if (pin ==NULL )return ERR_PTR (-ENOMEM ); pin->ops = pin_ops; -hrtimer_init (&pin->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (&pin->timer,CLOCK_MONOTONIC , +HRTIMER_MODE_REL |HRTIMER_MODE_USER_DATA |HRTIMER_MODE_USER_DATA ); pin->timer.function = cec_pin_timer;init_waitqueue_head (&pin->kthread_waitq); pin->tx_custom_low_usecs =CEC_TIM_CUSTOM_DEFAULT ;
drivers/media/pci/bt8xx/bttv-driver.c +1 -1
@@ -4040,7 +4040,7 @@ static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)INIT_LIST_HEAD (&btv->capture);INIT_LIST_HEAD (&btv->vcapture); -timer_setup (&btv->timeout, bttv_irq_timeout,0 ); +timer_setup (&btv->timeout, bttv_irq_timeout,TIMER_USER_DATA ); btv->i2c_rc =-1 ; btv->tuner_type =UNSET ;
drivers/media/pci/bt8xx/bttv-input.c +3 -2
@@ -299,12 +299,13 @@ static int bttv_rc5_irq(struct bttv *btv)static void bttv_ir_start (struct bttv_ir *ir) {if (ir->polling) { -timer_setup (&ir->timer, bttv_input_timer,0 ); +timer_setup (&ir->timer, bttv_input_timer,TIMER_USER_DATA ); ir->timer.expires = jiffies +msecs_to_jiffies (1000 );add_timer (&ir->timer); }else if (ir->rc5_gpio) {/* set timer_end for code completion */ -timer_setup (&ir->timer, bttv_rc5_timer_end,0 ); +timer_setup (&ir->timer, bttv_rc5_timer_end, +TIMER_USER_DATA ); ir->shift_by =1 ; ir->rc5_remote_gap = ir_rc5_remote_gap; }
drivers/media/pci/netup_unidvb/netup_unidvb_core.c +2 -1
@@ -664,7 +664,8 @@ static int netup_unidvb_dma_init(struct netup_unidvb_dev *ndev, int num)spin_lock_init (&dma->lock);INIT_WORK (&dma->work, netup_unidvb_dma_worker);INIT_LIST_HEAD (&dma->free_buffers); -timer_setup (&dma->timeout, netup_unidvb_dma_timeout,0 ); +timer_setup (&dma->timeout, netup_unidvb_dma_timeout, +TIMER_USER_DATA ); dma->ring_buffer_size = ndev->dma_size /2 ; dma->addr_virt = ndev->dma_virt + dma->ring_buffer_size * num; dma->addr_phys = (dma_addr_t)((u64)ndev->dma_phys +
drivers/media/pci/saa7134/saa7134-input.c +2 -1
@@ -492,7 +492,8 @@ int saa7134_ir_open(struct rc_dev *rc) ir->running = true;if (ir->polling) { -timer_setup (&ir->timer, saa7134_input_timer,0 ); +timer_setup (&ir->timer, saa7134_input_timer, +TIMER_USER_DATA ); ir->timer.expires = jiffies +HZ ;add_timer (&ir->timer); }
drivers/media/pci/saa7134/saa7134-ts.c +2 -1
@@ -223,7 +223,8 @@ int saa7134_ts_init1(struct saa7134_dev *dev) dev->ts.nr_packets = ts_nr_packets;INIT_LIST_HEAD (&dev->ts_q.queue); -timer_setup (&dev->ts_q.timeout, saa7134_buffer_timeout,0 ); +timer_setup (&dev->ts_q.timeout, saa7134_buffer_timeout, +TIMER_USER_DATA ); dev->ts_q.dev = dev; dev->ts_q.need_two =1 ; dev->ts_started =0 ;
drivers/media/pci/saa7134/saa7134-vbi.c +2 -1
@@ -181,7 +181,8 @@ const struct vb2_ops saa7134_vbi_qops = {int saa7134_vbi_init1 (struct saa7134_dev *dev) {INIT_LIST_HEAD (&dev->vbi_q.queue); -timer_setup (&dev->vbi_q.timeout, saa7134_buffer_timeout,0 ); +timer_setup (&dev->vbi_q.timeout, saa7134_buffer_timeout, +TIMER_USER_DATA ); dev->vbi_q.dev = dev;if (vbibufs <2 )
drivers/media/pci/saa7134/saa7134-video.c +2 -1
@@ -2147,7 +2147,8 @@ int saa7134_video_init1(struct saa7134_dev *dev) dev->automute =0 ;INIT_LIST_HEAD (&dev->video_q.queue); -timer_setup (&dev->video_q.timeout, saa7134_buffer_timeout,0 ); +timer_setup (&dev->video_q.timeout, saa7134_buffer_timeout, +TIMER_USER_DATA ); dev->video_q.dev = dev; dev->fmt =format_by_fourcc (V4L2_PIX_FMT_BGR24 ); dev->width =720 ;
drivers/media/pci/ttpci/av7110_ir.c +2 -1
@@ -313,7 +313,8 @@ int av7110_ir_init(struct av7110 *av7110) av_list[av_cnt++] = av7110;av7110_check_ir_config (av7110, true); -timer_setup (&av7110->ir.keyup_timer, av7110_emit_keyup,0 ); +timer_setup (&av7110->ir.keyup_timer, av7110_emit_keyup, +TIMER_USER_DATA ); input_dev =input_allocate_device ();if (!input_dev)
drivers/media/radio/radio-cadet.c +1 -1
@@ -317,7 +317,7 @@ static void cadet_start_rds(struct cadet *dev) { dev->rdsstat =1 ;outb (0x80 , dev->io);/* Select RDS fifo */ -timer_setup (&dev->readtimer, cadet_handler,0 ); +timer_setup (&dev->readtimer, cadet_handler,TIMER_USER_DATA ); dev->readtimer.expires = jiffies +msecs_to_jiffies (50 );add_timer (&dev->readtimer); }
drivers/media/radio/wl128x/fmdrv_common.c +2 -1
@@ -1550,7 +1550,8 @@ int fmc_prepare(struct fmdev *fmdev)atomic_set (&fmdev->tx_cnt,1 ); fmdev->resp_comp =NULL ; -timer_setup (&fmdev->irq_info.timer, int_timeout_handler,0 ); +timer_setup (&fmdev->irq_info.timer, int_timeout_handler, +TIMER_USER_DATA );/*TODO: add FM_STIC_EVENT later */ fmdev->irq_info.mask =FM_MAL_EVENT ;
drivers/media/rc/img-ir/img-ir-raw.c +1 -1
@@ -107,7 +107,7 @@ int img_ir_probe_raw(struct img_ir_priv *priv)int error;/* Set up the echo timer */ -timer_setup (&raw->timer, img_ir_echo_timer,0 ); +timer_setup (&raw->timer, img_ir_echo_timer,TIMER_USER_DATA );/* Allocate raw decoder */ raw->rdev = rdev =rc_allocate_device (RC_DRIVER_IR_RAW );
drivers/media/rc/ir-rx51.c +2 -1
@@ -253,7 +253,8 @@ static int ir_rx51_probe(struct platform_device *dev) ir_rx51.freq =DIV_ROUND_CLOSEST (pwm_get_period (pwm),NSEC_PER_SEC );pwm_put (pwm); -hrtimer_init (&ir_rx51.timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (&ir_rx51.timer,CLOCK_MONOTONIC , +HRTIMER_MODE_REL |HRTIMER_MODE_USER_DATA |HRTIMER_MODE_USER_DATA ); ir_rx51.timer.function = ir_rx51_timer_cb; ir_rx51.dev = &dev->dev;
drivers/media/usb/au0828/au0828-video.c +4 -2
@@ -1969,8 +1969,10 @@ int au0828_analog_register(struct au0828_dev *dev,INIT_LIST_HEAD (&dev->vidq.active);INIT_LIST_HEAD (&dev->vbiq.active); -timer_setup (&dev->vid_timeout, au0828_vid_buffer_timeout,0 ); -timer_setup (&dev->vbi_timeout, au0828_vbi_buffer_timeout,0 ); +timer_setup (&dev->vid_timeout, au0828_vid_buffer_timeout, +TIMER_USER_DATA ); +timer_setup (&dev->vbi_timeout, au0828_vbi_buffer_timeout, +TIMER_USER_DATA ); dev->width =NTSC_STD_W ; dev->height =NTSC_STD_H ;
drivers/net/appletalk/cops.c +1 -1
@@ -426,7 +426,7 @@ static int cops_open(struct net_device *dev)if (lp->board==TANGENT )/* Poll 20 times per second */ { cops_timer_dev = dev; -timer_setup (&cops_timer, cops_poll,0 ); +timer_setup (&cops_timer, cops_poll,TIMER_USER_DATA ); cops_timer.expires = jiffies +HZ /20 ;add_timer (&cops_timer); }
drivers/net/caif/caif_hsi.c +6 -3
@@ -1210,11 +1210,14 @@ static int cfhsi_open(struct net_device *ndev)init_waitqueue_head (&cfhsi->flush_fifo_wait);/* Setup the inactivity timer. */ -timer_setup (&cfhsi->inactivity_timer, cfhsi_inactivity_tout,0 ); +timer_setup (&cfhsi->inactivity_timer, cfhsi_inactivity_tout, +TIMER_USER_DATA );/* Setup the slowpath RX timer. */ -timer_setup (&cfhsi->rx_slowpath_timer, cfhsi_rx_slowpath,0 ); +timer_setup (&cfhsi->rx_slowpath_timer, cfhsi_rx_slowpath, +TIMER_USER_DATA );/* Setup the aggregation timer. */ -timer_setup (&cfhsi->aggregation_timer, cfhsi_aggregation_tout,0 ); +timer_setup (&cfhsi->aggregation_timer, cfhsi_aggregation_tout, +TIMER_USER_DATA );/* Activate HSI interface. */ res = cfhsi->ops->cfhsi_up (cfhsi->ops);
drivers/net/hamradio/6pack.c +2 -2
@@ -613,9 +613,9 @@ static int sixpack_open(struct tty_struct *tty)netif_start_queue (dev); -timer_setup (&sp->tx_t, sp_xmit_on_air,0 ); +timer_setup (&sp->tx_t, sp_xmit_on_air,TIMER_USER_DATA ); -timer_setup (&sp->resync_t, resync_tnc,0 ); +timer_setup (&sp->resync_t, resync_tnc,TIMER_USER_DATA );spin_unlock_bh (&sp->lock);
drivers/net/hamradio/scc.c +2 -2
@@ -1523,8 +1523,8 @@ static int scc_net_alloc(const char *name, struct scc_channel *scc) dev->ml_priv = scc; scc->dev = dev;spin_lock_init (&scc->lock); -timer_setup (&scc->tx_t,NULL ,0 ); -timer_setup (&scc->tx_wdog,NULL ,0 ); +timer_setup (&scc->tx_t,NULL ,TIMER_USER_DATA ); +timer_setup (&scc->tx_wdog,NULL ,TIMER_USER_DATA ); err =register_netdevice (dev);if (err) {
drivers/net/hamradio/yam.c +2 -2
@@ -157,7 +157,7 @@ static struct net_device *yam_devs[NR_PORTS];static struct yam_mcs *yam_data; -static DEFINE_TIMER(yam_timer, NULL); +static DEFINE_TIMER_USERDATA(yam_timer, NULL);/* --------------------------------------------------------------------- */
@@ -1154,7 +1154,7 @@ static int __init yam_init_driver(void) } -timer_setup (&yam_timer, yam_dotimer,0 ); +timer_setup (&yam_timer, yam_dotimer,TIMER_USER_DATA ); yam_timer.expires = jiffies +HZ /100 ;add_timer (&yam_timer);
drivers/net/hippi/rrunner.c +1 -1
@@ -1229,7 +1229,7 @@ static int rr_open(struct net_device *dev)/* Set the timer to switch to check for link beat and perhaps switch to an alternate media type. */ -timer_setup (&rrpriv->timer, rr_timer,0 ); +timer_setup (&rrpriv->timer, rr_timer,TIMER_USER_DATA ); rrpriv->timer.expires =RUN_AT (5 *HZ );/* 5 sec. watchdog */ add_timer (&rrpriv->timer);
drivers/net/ieee802154/at86rf230.c +2 -1
@@ -812,7 +812,8 @@ at86rf230_setup_spi_messages(struct at86rf230_local *lp, state->trx.tx_buf = state->buf; state->trx.rx_buf = state->buf;spi_message_add_tail (&state->trx, &state->msg); -hrtimer_init (&state->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (&state->timer,CLOCK_MONOTONIC , +HRTIMER_MODE_REL |HRTIMER_MODE_USER_DATA |HRTIMER_MODE_USER_DATA ); state->timer.function = at86rf230_async_state_timer; }
drivers/net/slip/slip.c +2 -2
@@ -762,8 +762,8 @@ static struct slip *sl_alloc(void) sl->mode =SL_MODE_DEFAULT ;#ifdef CONFIG_SLIP_SMART /* initialize timer_list struct */ -timer_setup (&sl->keepalive_timer, sl_keepalive,0 ); -timer_setup (&sl->outfill_timer, sl_outfill,0 ); +timer_setup (&sl->keepalive_timer, sl_keepalive,TIMER_USER_DATA ); +timer_setup (&sl->outfill_timer, sl_outfill,TIMER_USER_DATA );#endif slip_devs[i] = dev;return sl;
drivers/net/wan/sdla.c +1 -1
@@ -1615,7 +1615,7 @@ static void setup_sdla(struct net_device *dev) flp->dlci_conf = sdla_dlci_conf; flp->dev = dev; -timer_setup (&flp->timer, sdla_poll,0 ); +timer_setup (&flp->timer, sdla_poll,TIMER_USER_DATA ); flp->timer.expires =1 ; }
drivers/net/wireless/ath/ath9k/init.c +3 -2
@@ -425,7 +425,8 @@ static void ath9k_init_misc(struct ath_softc *sc)struct ath_common *common =ath9k_hw_common (sc->sc_ah);int i =0 ; -timer_setup (&common->ani.timer, ath_ani_calibrate,0 ); +timer_setup (&common->ani.timer, ath_ani_calibrate, +TIMER_USER_DATA ); common->last_rssi =ATH_RSSI_DUMMY_MARKER ;eth_broadcast_addr (common->bssidmask);
@@ -734,7 +735,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,tasklet_init (&sc->bcon_tasklet, ath9k_beacon_tasklet, (unsigned long )sc); -timer_setup (&sc->sleep_timer, ath_ps_full_sleep,0 ); +timer_setup (&sc->sleep_timer, ath_ps_full_sleep,TIMER_USER_DATA );INIT_WORK (&sc->hw_reset_work, ath_reset_work);INIT_WORK (&sc->paprd_work, ath_paprd_calibrate);INIT_DELAYED_WORK (&sc->hw_pll_work, ath_hw_pll_work);
drivers/net/wireless/intersil/hostap/hostap_ap.c +1 -1
@@ -1131,7 +1131,7 @@ static struct sta_info * ap_add_sta(struct ap_data *ap, u8 *addr) }#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT -timer_setup (&sta->timer, ap_handle_timer,0 ); +timer_setup (&sta->timer, ap_handle_timer,TIMER_USER_DATA ); sta->timer.expires = jiffies + ap->max_inactivity;if (!ap->local->hostapd)add_timer (&sta->timer);
drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c +2 -1
@@ -413,7 +413,8 @@ mwifiex_11n_create_rx_reorder_tbl(struct mwifiex_private *priv, u8 *ta, new_node->timer_context.priv = priv; new_node->timer_context.timer_is_set = false; -timer_setup (&new_node->timer_context.timer, mwifiex_flush_data,0 ); +timer_setup (&new_node->timer_context.timer, mwifiex_flush_data, +TIMER_USER_DATA );for (i =0 ; i < win_size; ++i) new_node->rx_reorder_ptr[i] =NULL ;
drivers/net/wireless/marvell/mwifiex/usb.c +1 -1
@@ -1261,7 +1261,7 @@ static int mwifiex_usb_tx_init(struct mwifiex_adapter *adapter) port->tx_aggr.timer_cnxt.is_hold_timer_set = false; port->tx_aggr.timer_cnxt.hold_tmo_msecs =0 ;timer_setup (&port->tx_aggr.timer_cnxt.hold_timer, - mwifiex_usb_tx_aggr_tmo,0 ); + mwifiex_usb_tx_aggr_tmo,TIMER_USER_DATA ); }return 0 ;
drivers/pcmcia/yenta_socket.c +2 -1
@@ -1234,7 +1234,8 @@ static int yenta_probe(struct pci_dev *dev, const struct pci_device_id *id)if (!socket->cb_irq ||request_irq (socket->cb_irq, yenta_interrupt,IRQF_SHARED |IRQF_USER_DATA ,"yenta" , socket)) {/* No IRQ or request_irq failed. Poll */ socket->cb_irq =0 ;/* But zero is a valid IRQ number. */ -timer_setup (&socket->poll_timer, yenta_interrupt_wrapper,0 ); +timer_setup (&socket->poll_timer, yenta_interrupt_wrapper, +TIMER_USER_DATA );mod_timer (&socket->poll_timer, jiffies +HZ );dev_info (&dev->dev,"no PCI IRQ, CardBus support disabled for this socket.\n" );
drivers/platform/x86/sony-laptop.c +1 -1
@@ -471,7 +471,7 @@ static int sony_laptop_setup_input(struct acpi_device *acpi_device) }timer_setup (&sony_laptop_input.release_key_timer, - do_sony_laptop_release_key,0 ); + do_sony_laptop_release_key,TIMER_USER_DATA );/* input keys */ key_dev =input_allocate_device ();
drivers/staging/comedi/drivers/comedi_test.c +4 -2
@@ -723,8 +723,10 @@ static int waveform_common_attach(struct comedi_device *dev, devpriv->ao_loopbacks[i] = s->maxdata /2 ; devpriv->dev = dev; -timer_setup (&devpriv->ai_timer, waveform_ai_timer,0 ); -timer_setup (&devpriv->ao_timer, waveform_ao_timer,0 ); +timer_setup (&devpriv->ai_timer, waveform_ai_timer, +TIMER_USER_DATA ); +timer_setup (&devpriv->ao_timer, waveform_ao_timer, +TIMER_USER_DATA ); dev_info(dev->class_dev, "%s: %u microvolt, %u microsecond waveform attached\n",
drivers/staging/comedi/drivers/jr3_pci.c +1 -1
@@ -762,7 +762,7 @@ static int jr3_pci_auto_attach(struct comedi_device *dev, } devpriv->dev = dev; -timer_setup (&devpriv->timer, jr3_pci_poll_dev,0 ); +timer_setup (&devpriv->timer, jr3_pci_poll_dev,TIMER_USER_DATA ); devpriv->timer.expires = jiffies +msecs_to_jiffies (1000 );add_timer (&devpriv->timer);
drivers/staging/rtl8188eu/core/rtw_recv.c +1 -1
@@ -77,7 +77,7 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) res =rtw_hal_init_recv_priv (padapter);timer_setup (&precvpriv->signal_stat_timer, rtw_signal_stat_timer_hdl, -0 ); +TIMER_USER_DATA ); precvpriv->signal_stat_sampling_interval =1000 ;/* ms */
drivers/staging/rtl8188eu/os_dep/mlme_linux.c +11 -6
@@ -15,10 +15,12 @@ void rtw_init_mlme_timer(struct adapter *padapter) {struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -timer_setup (&pmlmepriv->assoc_timer, _rtw_join_timeout_handler,0 ); -timer_setup (&pmlmepriv->scan_to_timer, rtw_scan_timeout_handler,0 ); +timer_setup (&pmlmepriv->assoc_timer, _rtw_join_timeout_handler, +TIMER_USER_DATA ); +timer_setup (&pmlmepriv->scan_to_timer, rtw_scan_timeout_handler, +TIMER_USER_DATA );timer_setup (&pmlmepriv->dynamic_chk_timer, - rtw_dynamic_check_timer_handlder,0 ); + rtw_dynamic_check_timer_handlder,TIMER_USER_DATA ); }void rtw_os_indicate_connect (struct adapter *adapter)
@@ -114,15 +116,18 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)void init_addba_retry_timer (struct adapter *padapter,struct sta_info *psta) { -timer_setup (&psta->addba_retry_timer, addba_timer_hdl,0 ); +timer_setup (&psta->addba_retry_timer, addba_timer_hdl, +TIMER_USER_DATA ); }void init_mlme_ext_timer (struct adapter *padapter) {struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -timer_setup (&pmlmeext->survey_timer, survey_timer_hdl,0 ); -timer_setup (&pmlmeext->link_timer, link_timer_hdl,0 ); +timer_setup (&pmlmeext->survey_timer, survey_timer_hdl, +TIMER_USER_DATA ); +timer_setup (&pmlmeext->link_timer, link_timer_hdl, +TIMER_USER_DATA ); }#ifdef CONFIG_88EU_AP_MODE
drivers/staging/rtl8188eu/os_dep/recv_linux.c +1 -1
@@ -141,5 +141,5 @@ int rtw_recv_indicatepkt(struct adapter *padapter,void rtw_init_recv_timer (struct recv_reorder_ctrl *preorder_ctrl) {timer_setup (&preorder_ctrl->reordering_ctrl_timer, - rtw_reordering_ctrl_timeout_handler,0 ); + rtw_reordering_ctrl_timeout_handler,TIMER_USER_DATA ); }
drivers/staging/rtl8192u/ieee80211/ieee80211_module.c +1 -1
@@ -132,7 +132,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)INIT_LIST_HEAD (&ieee->crypt_deinit_list);timer_setup (&ieee->crypt_deinit_timer, ieee80211_crypt_deinit_handler, -0 ); +TIMER_USER_DATA );spin_lock_init (&ieee->lock);spin_lock_init (&ieee->wpax_suitlist_lock);
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +4 -2
@@ -2578,9 +2578,11 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee) ieee->enable_rx_imm_BA = true; ieee->tx_pending.txb =NULL ; -timer_setup (&ieee->associate_timer, ieee80211_associate_abort_cb,0 ); +timer_setup (&ieee->associate_timer, ieee80211_associate_abort_cb, +TIMER_USER_DATA ); -timer_setup (&ieee->beacon_timer, ieee80211_send_beacon_cb,0 ); +timer_setup (&ieee->beacon_timer, ieee80211_send_beacon_cb, +TIMER_USER_DATA );INIT_DELAYED_WORK (&ieee->start_ibss_wq, ieee80211_start_ibss_wq);INIT_WORK (&ieee->associate_complete_wq, ieee80211_associate_complete_wq);
drivers/staging/rtl8723bs/os_dep/mlme_linux.c +14 -8
@@ -33,12 +33,14 @@ void rtw_init_mlme_timer(struct adapter *padapter) {struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -timer_setup (&pmlmepriv->assoc_timer, _rtw_join_timeout_handler,0 ); -timer_setup (&pmlmepriv->scan_to_timer, rtw_scan_timeout_handler,0 ); +timer_setup (&pmlmepriv->assoc_timer, _rtw_join_timeout_handler, +TIMER_USER_DATA ); +timer_setup (&pmlmepriv->scan_to_timer, rtw_scan_timeout_handler, +TIMER_USER_DATA );timer_setup (&pmlmepriv->dynamic_chk_timer, - _dynamic_check_timer_handler,0 ); + _dynamic_check_timer_handler,TIMER_USER_DATA );timer_setup (&pmlmepriv->set_scan_deny_timer, - _rtw_set_scan_deny_timer_hdl,0 ); + _rtw_set_scan_deny_timer_hdl,TIMER_USER_DATA ); }void rtw_os_indicate_connect (struct adapter *adapter)
@@ -185,14 +187,18 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)void init_addba_retry_timer (struct adapter *padapter,struct sta_info *psta) { -timer_setup (&psta->addba_retry_timer, addba_timer_hdl,0 ); +timer_setup (&psta->addba_retry_timer, addba_timer_hdl, +TIMER_USER_DATA ); }void init_mlme_ext_timer (struct adapter *padapter) {struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -timer_setup (&pmlmeext->survey_timer, survey_timer_hdl,0 ); -timer_setup (&pmlmeext->link_timer, link_timer_hdl,0 ); -timer_setup (&pmlmeext->sa_query_timer, sa_query_timer_hdl,0 ); +timer_setup (&pmlmeext->survey_timer, survey_timer_hdl, +TIMER_USER_DATA ); +timer_setup (&pmlmeext->link_timer, link_timer_hdl, +TIMER_USER_DATA ); +timer_setup (&pmlmeext->sa_query_timer, sa_query_timer_hdl, +TIMER_USER_DATA ); }
drivers/staging/rtl8723bs/os_dep/recv_linux.c +1 -1
@@ -350,6 +350,6 @@ int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_framevoid rtw_init_recv_timer (struct recv_reorder_ctrl *preorder_ctrl) {timer_setup (&preorder_ctrl->reordering_ctrl_timer, - rtw_reordering_ctrl_timeout_handler,0 ); + rtw_reordering_ctrl_timeout_handler,TIMER_USER_DATA ); }
drivers/staging/speakup/main.c +1 -1
@@ -1160,7 +1160,7 @@ static const int NUM_CTL_LABELS = (MSG_CTL_END - MSG_CTL_START + 1);static void read_all_doc (struct vc_data *vc);static void cursor_done (struct timer_list *unused); -static DEFINE_TIMER(cursor_timer, cursor_done); +static DEFINE_TIMER_USERDATA(cursor_timer, cursor_done);static void do_handle_shift (struct vc_data *vc,u_char value,char up_flag) {
drivers/tty/isicom.c +1 -1
@@ -173,7 +173,7 @@ static struct tty_driver *isicom_normal;static void isicom_tx (struct timer_list *unused);static void isicom_start (struct tty_struct *tty); -static DEFINE_TIMER(tx, isicom_tx); +static DEFINE_TIMER_USERDATA(tx, isicom_tx);/* baud index mappings from linux defns to isi */
drivers/tty/moxa.c +1 -1
@@ -416,7 +416,7 @@ static const struct tty_port_operations moxa_port_ops = { };static struct tty_driver *moxaDriver; -static DEFINE_TIMER(moxaTimer, moxa_poll); +static DEFINE_TIMER_USERDATA(moxaTimer, moxa_poll);/* * HW init
drivers/tty/n_gsm.c +3 -2
@@ -1655,7 +1655,7 @@ static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr) }skb_queue_head_init (&dlci->skb_list); -timer_setup (&dlci->t1, gsm_dlci_t1,0 ); +timer_setup (&dlci->t1, gsm_dlci_t1,TIMER_USER_DATA );tty_port_init (&dlci->port); dlci->port.ops = &gsm_port_ops; dlci->gsm = gsm;
@@ -2109,7 +2109,8 @@ static int gsm_activate_mux(struct gsm_mux *gsm)struct gsm_dlci *dlci;int i =0 ; -timer_setup (&gsm->t2_timer, gsm_control_retransmit,0 ); +timer_setup (&gsm->t2_timer, gsm_control_retransmit, +TIMER_USER_DATA );init_waitqueue_head (&gsm->event);spin_lock_init (&gsm->control_lock);spin_lock_init (&gsm->tx_lock);
drivers/tty/n_r3964.c +1 -1
@@ -1000,7 +1000,7 @@ static int r3964_open(struct tty_struct *tty) tty->disc_data = pInfo; tty->receive_room =65536 ; -timer_setup (&pInfo->tmr, on_timeout,0 ); +timer_setup (&pInfo->tmr, on_timeout,TIMER_USER_DATA );return 0 ; }
drivers/tty/rocket.c +1 -1
@@ -98,7 +98,7 @@ static struct r_port *rp_table[MAX_RP_PORTS]; /* The main repository ofstatic unsigned int xmit_flags[NUM_BOARDS ];/* Bit significant, indicates port had data to transmit. */ /* eg. Bit 0 indicates port 0 has xmit data, ... */ static atomic_t rp_num_ports_open;/* Number of serial ports open */ -static DEFINE_TIMER(rocket_timer, rp_do_poll); +static DEFINE_TIMER_USERDATA(rocket_timer, rp_do_poll);static unsigned long board1;/* ISA addresses, retrieved from rocketport.conf */ static unsigned long board2;
drivers/tty/serial/8250/8250_core.c +2 -1
@@ -516,7 +516,8 @@ static void __init serial8250_isa_init_ports(void) base_ops = port->ops; port->ops = &univ8250_port_ops; -timer_setup (&up->timer, serial8250_timeout,0 ); +timer_setup (&up->timer, serial8250_timeout, +TIMER_USER_DATA ); up->ops = &univ8250_driver_ops;
drivers/tty/serial/8250/8250_port.c +2 -2
@@ -628,9 +628,9 @@ int serial8250_em485_init(struct uart_8250_port *p)return -ENOMEM ;hrtimer_init (&p->em485->stop_tx_timer,CLOCK_MONOTONIC , -HRTIMER_MODE_REL ); +HRTIMER_MODE_REL |HRTIMER_MODE_USER_DATA |HRTIMER_MODE_USER_DATA );hrtimer_init (&p->em485->start_tx_timer,CLOCK_MONOTONIC , -HRTIMER_MODE_REL ); +HRTIMER_MODE_REL |HRTIMER_MODE_USER_DATA |HRTIMER_MODE_USER_DATA ); p->em485->stop_tx_timer.function = &serial8250_em485_handle_stop_tx; p->em485->start_tx_timer.function = &serial8250_em485_handle_start_tx; p->em485->port = p;
drivers/tty/serial/max3100.c +1 -1
@@ -779,7 +779,7 @@ static int max3100_probe(struct spi_device *spi) max3100s[i]->poll_time =1 ; max3100s[i]->max3100_hw_suspend = pdata->max3100_hw_suspend; max3100s[i]->minor = i; -timer_setup (&max3100s[i]->timer, max3100_timeout,0 ); +timer_setup (&max3100s[i]->timer, max3100_timeout,TIMER_USER_DATA );dev_dbg (&spi->dev,"%s: adding port %d\n" , __func__, i); max3100s[i]->port.irq = max3100s[i]->irq;
drivers/tty/serial/mux.c +1 -1
@@ -572,7 +572,7 @@ static int __init mux_init(void)if (port_cnt >0 ) {/* Start the Mux timer */ -timer_setup (&mux_timer, mux_poll,0 ); +timer_setup (&mux_timer, mux_poll,TIMER_USER_DATA );mod_timer (&mux_timer, jiffies +MUX_POLL_DELAY );#ifdef CONFIG_SERIAL_MUX_CONSOLE
drivers/tty/serial/pnx8xxx_uart.c +2 -1
@@ -662,7 +662,8 @@ static void __init pnx8xxx_init_ports(void) first =0 ;for (i =0 ; i <NR_PORTS ; i++) { -timer_setup (&pnx8xxx_ports[i].timer, pnx8xxx_timeout,0 ); +timer_setup (&pnx8xxx_ports[i].timer, pnx8xxx_timeout, +TIMER_USER_DATA ); pnx8xxx_ports[i].port.ops = &pnx8xxx_pops; } }
drivers/tty/serial/sccnxp.c +1 -1
@@ -1022,7 +1022,7 @@ static int sccnxp_probe(struct platform_device *pdev)dev_err (&pdev->dev,"Unable to reguest IRQ %i\n" , s->irq); }else { -timer_setup (&s->timer, sccnxp_timer,0 ); +timer_setup (&s->timer, sccnxp_timer,TIMER_USER_DATA );mod_timer (&s->timer, jiffies +usecs_to_jiffies (s->pdata.poll_time_us));return 0 ;
drivers/tty/serial/sh-sci.c +6 -3
@@ -1173,7 +1173,8 @@ static ssize_t rx_fifo_timeout_store(struct device *dev, sci->rx_fifo_timeout = r;scif_set_rtrg (port,1 );if (r >0 ) -timer_setup (&sci->rx_fifo_timer, rx_fifo_timer_fn,0 ); +timer_setup (&sci->rx_fifo_timer, rx_fifo_timer_fn, +TIMER_USER_DATA ); }return count;
@@ -1614,7 +1615,8 @@ static void sci_request_dma(struct uart_port *port) dma += s->buf_len_rx; } -hrtimer_init (&s->rx_timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (&s->rx_timer,CLOCK_MONOTONIC , +HRTIMER_MODE_REL |HRTIMER_MODE_USER_DATA ); s->rx_timer.function = rx_timer_fn; s->chan_rx_saved = s->chan_rx = chan;
@@ -2326,7 +2328,8 @@ static void sci_reset(struct uart_port *port)if (s->rx_trigger >1 ) {if (s->rx_fifo_timeout) {scif_set_rtrg (port,1 ); -timer_setup (&s->rx_fifo_timer, rx_fifo_timer_fn,0 ); +timer_setup (&s->rx_fifo_timer, rx_fifo_timer_fn, +TIMER_USER_DATA ); }else {if (port->type ==PORT_SCIFA || port->type ==PORT_SCIFB )
drivers/tty/vcc.c +2 -2
@@ -637,8 +637,8 @@ static int vcc_probe(struct vio_dev *vdev, const struct vio_device_id *id)if (rv) goto free_domain; -timer_setup (&port->rx_timer, vcc_rx_timer,0 ); -timer_setup (&port->tx_timer, vcc_tx_timer,0 ); +timer_setup (&port->rx_timer, vcc_rx_timer,TIMER_USER_DATA ); +timer_setup (&port->tx_timer, vcc_tx_timer,TIMER_USER_DATA );dev_set_drvdata (&vdev->dev, port);
drivers/tty/vt/keyboard.c +1 -1
@@ -251,7 +251,7 @@ static void kd_nosound(struct timer_list *unused)input_handler_for_each_handle (&kbd_handler, &zero, kd_sound_helper); } -static DEFINE_TIMER(kd_mksound_timer, kd_nosound); +static DEFINE_TIMER_USERDATA(kd_mksound_timer, kd_nosound);void kd_mksound (unsigned int hz,unsigned int ticks) {
drivers/usb/chipidea/otg_fsm.c +2 -1
@@ -422,7 +422,8 @@ static enum hrtimer_restart ci_otg_hrtimer_func(struct hrtimer *t)/* Initialize timers */ static int ci_otg_init_timers (struct ci_hdrc *ci) { -hrtimer_init (&ci->otg_fsm_hrtimer,CLOCK_MONOTONIC ,HRTIMER_MODE_ABS ); +hrtimer_init (&ci->otg_fsm_hrtimer,CLOCK_MONOTONIC , +HRTIMER_MODE_ABS |HRTIMER_MODE_USER_DATA |HRTIMER_MODE_USER_DATA ); ci->otg_fsm_hrtimer.function = ci_otg_hrtimer_func;return 0 ;
drivers/usb/dwc2/hcd_queue.c +4 -2
@@ -1523,8 +1523,10 @@ static void dwc2_qh_init(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh,/* Initialize QH */ qh->hsotg = hsotg; -timer_setup (&qh->unreserve_timer, dwc2_unreserve_timer_fn,0 ); -hrtimer_init (&qh->wait_timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +timer_setup (&qh->unreserve_timer, dwc2_unreserve_timer_fn, +TIMER_USER_DATA |TIMER_USER_DATA ); +hrtimer_init (&qh->wait_timer,CLOCK_MONOTONIC , +HRTIMER_MODE_REL |HRTIMER_MODE_USER_DATA |HRTIMER_MODE_USER_DATA ); qh->wait_timer.function = &dwc2_wait_timer_fn; qh->ep_type = ep_type; qh->ep_is_in = ep_is_in;
drivers/usb/gadget/function/f_ncm.c +2 -1
@@ -1499,7 +1499,8 @@ static int ncm_bind(struct usb_configuration *c, struct usb_function *f) ncm->port.open = ncm_open; ncm->port.close = ncm_close; -hrtimer_init (&ncm->task_timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL_SOFT ); +hrtimer_init (&ncm->task_timer,CLOCK_MONOTONIC , +HRTIMER_MODE_REL_SOFT |HRTIMER_MODE_USER_DATA |HRTIMER_MODE_USER_DATA ); ncm->task_timer.function = ncm_tx_timeout; DBG(cdev, "CDC Network: %s speed IN/%s OUT/%s NOTIFY/%s\n",
drivers/usb/gadget/udc/dummy_hcd.c +2 -2
@@ -2431,7 +2431,7 @@ static DEVICE_ATTR_RO(urbs);static int dummy_start_ss (struct dummy_hcd *dum_hcd) { -timer_setup (&dum_hcd->timer, dummy_timer,0 ); +timer_setup (&dum_hcd->timer, dummy_timer,TIMER_USER_DATA ); dum_hcd->rh_state =DUMMY_RH_RUNNING ; dum_hcd->stream_en_ep =0 ;INIT_LIST_HEAD (&dum_hcd->urbp_list);
@@ -2460,7 +2460,7 @@ static int dummy_start(struct usb_hcd *hcd)return dummy_start_ss (dum_hcd);spin_lock_init (&dum_hcd->dum->lock); -timer_setup (&dum_hcd->timer, dummy_timer,0 ); +timer_setup (&dum_hcd->timer, dummy_timer,TIMER_USER_DATA ); dum_hcd->rh_state =DUMMY_RH_RUNNING ;INIT_LIST_HEAD (&dum_hcd->urbp_list);
drivers/usb/gadget/udc/m66592-udc.c +1 -1
@@ -1589,7 +1589,7 @@ static int m66592_probe(struct platform_device *pdev) m66592->gadget.max_speed =USB_SPEED_HIGH ; m66592->gadget.name = udc_name; -timer_setup (&m66592->timer, m66592_timer,0 ); +timer_setup (&m66592->timer, m66592_timer,TIMER_USER_DATA ); m66592->reg = reg; ret = request_irq(ires->start, m66592_irq,
drivers/usb/gadget/udc/r8a66597-udc.c +1 -1
@@ -1874,7 +1874,7 @@ static int r8a66597_probe(struct platform_device *pdev) r8a66597->gadget.max_speed =USB_SPEED_HIGH ; r8a66597->gadget.name = udc_name; -timer_setup (&r8a66597->timer, r8a66597_timer,0 ); +timer_setup (&r8a66597->timer, r8a66597_timer,TIMER_USER_DATA ); r8a66597->reg = reg;if (r8a66597->pdata->on_chip) {
drivers/usb/usbip/vudc_transfer.c +1 -1
@@ -447,7 +447,7 @@ void v_init_timer(struct vudc *udc) {struct transfer_timer *t = &udc->tr_timer; -timer_setup (&t->timer, v_timer,0 ); +timer_setup (&t->timer, v_timer,TIMER_USER_DATA ); t->state =VUDC_TR_STOPPED ; }
drivers/uwb/neh.c +1 -1
@@ -223,7 +223,7 @@ struct uwb_rc_neh *uwb_rc_neh_add(struct uwb_rc *rc, struct uwb_rccb *cmd,kref_init (&neh->kref);INIT_LIST_HEAD (&neh->list_node); -timer_setup (&neh->timer, uwb_rc_neh_timer,0 ); +timer_setup (&neh->timer, uwb_rc_neh_timer,TIMER_USER_DATA ); neh->rc = rc; neh->evt_type = expected_type;
drivers/uwb/rsv.c +3 -2
@@ -470,7 +470,7 @@ static struct uwb_rsv *uwb_rsv_alloc(struct uwb_rc *rc)INIT_LIST_HEAD (&rsv->rc_node);INIT_LIST_HEAD (&rsv->pal_node);kref_init (&rsv->kref); -timer_setup (&rsv->timer, uwb_rsv_timer,0 ); +timer_setup (&rsv->timer, uwb_rsv_timer,TIMER_USER_DATA ); rsv->rc = rc;INIT_WORK (&rsv->handle_timeout_work, uwb_rsv_handle_timeout_work);
@@ -987,7 +987,8 @@ void uwb_rsv_init(struct uwb_rc *rc) rc->bow.can_reserve_extra_mases = true; rc->bow.total_expired =0 ; rc->bow.window =UWB_DRP_BACKOFF_WIN_MIN >>1 ; -timer_setup (&rc->bow.timer, uwb_rsv_backoff_win_timer,0 ); +timer_setup (&rc->bow.timer, uwb_rsv_backoff_win_timer, +TIMER_USER_DATA );bitmap_complement (rc->uwb_dev.streams, rc->uwb_dev.streams,UWB_NUM_STREAMS ); }
drivers/visorbus/visorbus_main.c +1 -1
@@ -658,7 +658,7 @@ int create_visor_device(struct visor_device *dev) dev->device.release = visorbus_release_device;/* keep a reference just for us (now 2) */ get_device (&dev->device); -timer_setup (&dev->timer, dev_periodic_work,0 ); +timer_setup (&dev->timer, dev_periodic_work,TIMER_USER_DATA );/* * bus_id must be a unique name with respect to this bus TYPE (NOT bus * instance). That's why we need to include the bus number within the
kernel/time/alarmtimer.c +1 -1
@@ -344,7 +344,7 @@ void alarm_init(struct alarm *alarm, enum alarmtimer_type type, enum alarmtimer_restart (*function)(struct alarm *, ktime_t)) {hrtimer_init (&alarm->timer, alarm_bases[type].base_clockid, -HRTIMER_MODE_ABS ); +HRTIMER_MODE_ABS |HRTIMER_MODE_USER_DATA |HRTIMER_MODE_USER_DATA );__alarm_init (alarm, type, function); }EXPORT_SYMBOL_GPL (alarm_init);
lib/random32.c +1 -1
@@ -215,7 +215,7 @@ core_initcall(prandom_init);static void __prandom_timer (struct timer_list *unused); -static DEFINE_TIMER(seed_timer, __prandom_timer); +static DEFINE_TIMER_USERDATA(seed_timer, __prandom_timer);static void __prandom_timer (struct timer_list *unused) {
net/wireless/lib80211.c +1 -1
@@ -56,7 +56,7 @@ int lib80211_crypt_info_init(struct lib80211_crypt_info *info, char *name,INIT_LIST_HEAD (&info->crypt_deinit_list);timer_setup (&info->crypt_deinit_timer, lib80211_crypt_deinit_handler, -0 ); +TIMER_USER_DATA );return 0 ; }
security/keys/gc.c +1 -1
@@ -29,7 +29,7 @@ DECLARE_WORK(key_gc_work, key_garbage_collector);* Reaper for links from keyrings to dead keys. */ static void key_gc_timer_func (struct timer_list *); -static DEFINE_TIMER(key_gc_timer, key_gc_timer_func); +static DEFINE_TIMER_USERDATA(key_gc_timer, key_gc_timer_func);static time64_t key_gc_next_run =TIME64_MAX ;static struct key_type *key_gc_dead_keytype;
sound/core/hrtimer.c +2 -1
@@ -82,7 +82,8 @@ static int snd_hrtimer_open(struct snd_timer *t) stime =kzalloc (sizeof (*stime),GFP_KERNEL );if (!stime)return -ENOMEM ; -hrtimer_init (&stime->hrt,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (&stime->hrt,CLOCK_MONOTONIC , +HRTIMER_MODE_REL |HRTIMER_MODE_USER_DATA |HRTIMER_MODE_USER_DATA ); stime->timer = t; stime->hrt.function = snd_hrtimer_callback; t->private_data = stime;
sound/drivers/mpu401/mpu401_uart.c +2 -1
@@ -193,7 +193,8 @@ static void snd_mpu401_uart_add_timer (struct snd_mpu401 *mpu, int input)spin_lock_irqsave (&mpu->timer_lock, flags);if (mpu->timer_invoked ==0 ) { -timer_setup (&mpu->timer, snd_mpu401_uart_timer,0 ); +timer_setup (&mpu->timer, snd_mpu401_uart_timer, +TIMER_USER_DATA );mod_timer (&mpu->timer,1 + jiffies); } mpu->timer_invoked |= input ? MPU401_MODE_INPUT_TIMER :
sound/drivers/mtpav.c +2 -1
@@ -707,7 +707,8 @@ static int snd_mtpav_probe(struct platform_device *dev) mtp_card->share_irq =0 ; mtp_card->inmidistate =0 ; mtp_card->outmidihwport =0xffffffff ; -timer_setup (&mtp_card->timer, snd_mtpav_output_timer,0 ); +timer_setup (&mtp_card->timer, snd_mtpav_output_timer, +TIMER_USER_DATA ); card->private_free = snd_mtpav_free;
sound/drivers/pcsp/pcsp.c +2 -1
@@ -100,7 +100,8 @@ static int snd_card_pcsp_probe(int devnum, struct device *dev)if (devnum !=0 )return -EINVAL ; -hrtimer_init (&pcsp_chip.timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (&pcsp_chip.timer,CLOCK_MONOTONIC , +HRTIMER_MODE_REL |HRTIMER_MODE_USER_DATA |HRTIMER_MODE_USER_DATA ); pcsp_chip.timer.function = pcsp_do_timer; err =snd_card_new (dev, index, id,THIS_MODULE ,0 , &card);
sound/drivers/serial-u16550.c +2 -1
@@ -827,7 +827,8 @@ static int snd_uart16550_create(struct snd_card *card, uart->prev_in =0 ; uart->rstatus =0 ;memset (uart->prev_status,0x80 ,sizeof (unsigned char ) *SNDRV_SERIAL_MAX_OUTS ); -timer_setup (&uart->buffer_timer, snd_uart16550_buffer_timer,0 ); +timer_setup (&uart->buffer_timer, snd_uart16550_buffer_timer, +TIMER_USER_DATA ); uart->timer_running =0 ;/* Register device */
sound/isa/sb/emu8000_pcm.c +1 -1
@@ -241,7 +241,7 @@ static int emu8k_pcm_open(struct snd_pcm_substream *subs) runtime->private_data = rec;spin_lock_init (&rec->timer_lock); -timer_setup (&rec->timer, emu8k_pcm_timer_func,0 ); +timer_setup (&rec->timer, emu8k_pcm_timer_func,TIMER_USER_DATA ); runtime->hw = emu8k_pcm_hw; runtime->hw.buffer_bytes_max = emu->mem_size -LOOP_BLANK_SIZE *3 ;
sound/isa/sb/sb8_midi.c +2 -1
@@ -273,7 +273,8 @@ int snd_sb8dsp_midi(struct snd_sb *chip, int device)if (chip->hardware >=SB_HW_20 ) rmidi->info_flags |=SNDRV_RAWMIDI_INFO_DUPLEX ; rmidi->private_data = chip; -timer_setup (&chip->midi_timer, snd_sb8dsp_midi_output_timer,0 ); +timer_setup (&chip->midi_timer, snd_sb8dsp_midi_output_timer, +TIMER_USER_DATA ); chip->rmidi = rmidi;return 0 ; }
sound/isa/wavefront/wavefront_midi.c +2 -2
@@ -384,8 +384,8 @@ static void snd_wavefront_midi_output_trigger(struct snd_rawmidi_substream *subsif ((midi->mode[mpu] &MPU401_MODE_OUTPUT_TRIGGER ) ==0 ) {if (!midi->istimer) {timer_setup (&midi->timer, - snd_wavefront_midi_output_timer, -0 ); + snd_wavefront_midi_output_timer, +TIMER_USER_DATA );mod_timer (&midi->timer,1 + jiffies); } midi->istimer++;
sound/pci/echoaudio/midi.c +1 -1
@@ -258,7 +258,7 @@ static void snd_echo_midi_output_trigger(struct snd_rawmidi_substream *substreamif (up) {if (!chip->tinuse) {timer_setup (&chip->timer, snd_echo_midi_output_write, -0 ); +TIMER_USER_DATA ); chip->tinuse =1 ; } }else {
sound/pci/rme9652/hdsp.c +1 -1
@@ -1441,7 +1441,7 @@ static void snd_hdsp_midi_output_trigger(struct snd_rawmidi_substream *substreamif (up) {if (!hmidi->istimer) {timer_setup (&hmidi->timer, snd_hdsp_midi_output_timer, -0 ); +TIMER_USER_DATA );mod_timer (&hmidi->timer,1 + jiffies); hmidi->istimer++; }
sound/pci/rme9652/hdspm.c +2 -1
@@ -1978,7 +1978,8 @@ snd_hdspm_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)if (up) {if (!hmidi->istimer) {timer_setup (&hmidi->timer, - snd_hdspm_midi_output_timer,0 ); + snd_hdspm_midi_output_timer, +TIMER_USER_DATA );mod_timer (&hmidi->timer,1 + jiffies); hmidi->istimer++; }
sound/usb/midi.c +2 -1
@@ -2369,7 +2369,8 @@ int __snd_usbmidi_create(struct snd_card *card, usb_id =USB_ID (le16_to_cpu (umidi->dev->descriptor.idVendor),le16_to_cpu (umidi->dev->descriptor.idProduct)); umidi->usb_id = usb_id; -timer_setup (&umidi->error_timer, snd_usbmidi_error_timer,0 ); +timer_setup (&umidi->error_timer, snd_usbmidi_error_timer, +TIMER_USER_DATA );/* detect the endpoint(s) to use */ memset (endpoints,0 ,sizeof (endpoints));
Signature · 1 line
2.17.2
v6 cover MDSv6
Here's a new version of flushing CPU buffers for group 4 for single thread.
I would be mainly interested in feedback on the lazy approach, so please focus on the later patches.
There didn't seem to be much interest in it, so I wonder if it still makes sense to continue with it? Or could we just stay with the full approach?
The lazy approach is faster, but not by that much and may not be worth the short and long term impact all over the tree.
This version is based on my earlier base patches, with the mds=full implementation being at the beginning, and a lazy implementation building on top of it. The patch can be rebased on the rewrite once it matures.
Even the base has some features not in Thomas' version which would need to be ported (e.g. more complete virtualization support and EBPF mitigation)
This patch implements the "full tree audit" approach that was suggested by several reviewers. We (me and Mark Gross) went through most asynchronous code in the kernel and marked the functions that touch user or IO data. This leaves most asynchronous interrupts etc. to not schedule a clear. However this would need to be continuously enforced for new code too.
It also implements various other review suggestions and improvements. clearcpu.txt is now clarified in many ways.
Before reviewing please read Documentation/clearcpu.txt
Some performance data for lazy:
Kernel build: ~+1% (slightly faster, but that's within noise)
loopback apache -1% (within noise)
ebizzy -0.3% (within noise)
aim7 -5.0%
netperf rr -0.7%
netperf stream 0.0%
In comparison an older version of mds=full showed:
kernel build -2.4%
ebizzy -3.3%
apache loopback -10.0%
For networking workloads there is practically no regression now. AIM7 is showing some regression. I assume this is due to the context switch overhead.
mds=full is a bit slower, but not that much. The only real outlier is apache loopback, which is probably not too realistic a workload because it mainly does tight loops over some syscalls.
No changelog against previous versions, too many changes.
Andi Kleen (42):
x86/speculation/mds: Add basic bug infrastructure for MDS x86/speculation/mds: Clear CPU on every kernel exit x86/speculation/mds: Clear CPU buffers on entering idle x86/speculation/mds: Add command line options to control mds x86/speculation/mds: Add sysfs reporting
mds: Add some administrator documentation x86/speculation/mds: Export MD_CLEAR CPUID to KVM guests. x86/cpufeatures: Add word 20 for additional features x86/speculation/mds: Handle VMENTRY clear for CPUs without l1tf
mds: Add documentation for clear cpu usage x86/speculation/mds: Introduce lazy_clear_cpu x86/speculation/mds: Add basic implementation of mds=full x86/speculation/mds: Check lazy clear in kernel exit x86/speculation/mds: Add tracing for clear_cpu x86/speculation/mds: Schedule cpu clear on context switch
mds: Force clear cpu on kernel preemption
mds: Clear cpu in memzero_explicit and kzfree
mds: Support cpu clear in interrupts
mds: Support cpu clear after tasklets
mds: Support cpu clearing in timers
mds: Clear cpu for string io/memcpy_*io in interrupts
mds: Schedule clear cpu in swiotlb
mds: Instrument skb functions to clear cpu automatically
mds: Clear cpu for kmap_atomic in interrupts
mds: Support cpu clearing for BPF
mds sweep: Schedule clear cpus in sound core
mds sweep: Make MPU401 interrupts clear cpu
mds sweep: Clear cpu on processing input layer data mds sweep: Clear cpu for tty input
mds sweep: Clear cpu for usbmon intercepts
mds sweep: Clear cpu in some Xen drivers
mds sweep: Clear cpu in DVB software filters
mds sweep: Mark all DRM interrupts to clear cpu
mds sweep: Make all old style IDE driver interrupts clear cpu mds sweep: Make Amazon ena driver management interrupt clear cpu mds sweep: Make all PCMCIA interrupts clear cpu
mds sweep: Mark common functions in comedi as clear cpu mds sweep: Make usb hcd poll clear cpu x86/speculation/mds: Switch mds=auto to lazy
mds sweep: Mark interrupts that touch user data
mds sweep: Mark timer handlers that touch user data mds sweep: Mark tasklets that touch user data
Mark Gross (1):
mds sweep: Clear cpu in sg_copy_from_buffer for SCSI
.../ABI/testing/sysfs-devices-system-cpu | 1 + .../admin-guide/kernel-parameters.txt | 11 + Documentation/admin-guide/mds.rst | 95 +++++++ Documentation/clearcpu.txt | 261 ++++++++++++++++++ arch/Kconfig | 3 + arch/x86/Kconfig | 1 + arch/x86/entry/common.c | 8 + arch/x86/events/intel/uncore.c | 3 +- arch/x86/include/asm/clearbpf.h | 29 ++ arch/x86/include/asm/clearcpu.h | 83 ++++++ arch/x86/include/asm/cpufeature.h | 6 +- arch/x86/include/asm/cpufeatures.h | 9 +- arch/x86/include/asm/disabled-features.h | 3 +- arch/x86/include/asm/floppy.h | 6 +- arch/x86/include/asm/io.h | 3 + arch/x86/include/asm/msr-index.h | 1 + arch/x86/include/asm/required-features.h | 3 +- arch/x86/include/asm/trace/clearcpu.h | 27 ++ arch/x86/kernel/acpi/cstate.c | 2 + arch/x86/kernel/cpu/bugs.c | 82 ++++++ arch/x86/kernel/cpu/common.c | 25 ++ arch/x86/kernel/kvm.c | 3 + arch/x86/kernel/nmi.c | 6 +- arch/x86/kernel/process.c | 5 + arch/x86/kernel/process.h | 1 + arch/x86/kernel/smpboot.c | 3 + arch/x86/kvm/cpuid.c | 3 +- arch/x86/kvm/vmx/vmx.c | 20 +- arch/x86/mm/highmem_32.c | 3 + arch/x86/mm/tlb.c | 14 + drivers/acpi/acpi_pad.c | 2 + drivers/acpi/processor_idle.c | 3 + drivers/atm/eni.c | 3 +- drivers/atm/he.c | 3 +- drivers/atm/lanai.c | 4 +- drivers/atm/nicstar.c | 4 +- drivers/auxdisplay/img-ascii-lcd.c | 2 +- drivers/base/cpu.c | 8 + drivers/block/xsysace.c | 5 +- drivers/char/ipmi/ipmi_si_intf.c | 6 +- drivers/char/sonypi.c | 3 +- drivers/crypto/ixp4xx_crypto.c | 3 +- drivers/crypto/qat/qat_common/adf_isr.c | 7 +- drivers/crypto/qat/qat_common/adf_sriov.c | 6 +- drivers/crypto/qat/qat_common/adf_vf_isr.c | 10 +- drivers/dma/dw/core.c | 3 +- drivers/dma/ioat/init.c | 3 +- drivers/dma/virt-dma.c | 3 +- drivers/firewire/core-transaction.c | 5 +- drivers/firewire/nosy.c | 3 +- drivers/gpu/drm/drm_irq.c | 3 +- drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c | 3 +- drivers/gpu/drm/i915/i915_pmu.c | 3 +- drivers/gpu/drm/i915/intel_lrc.c | 5 +- .../gpu/drm/nouveau/nvkm/subdev/pci/base.c | 3 +- drivers/hv/channel_mgmt.c | 4 +- drivers/hv/hv.c | 4 +- drivers/i2c/busses/i2c-emev2.c | 5 +- drivers/i2c/busses/i2c-i801.c | 2 +- drivers/i2c/busses/i2c-pxa.c | 4 +- drivers/i2c/busses/i2c-rk3x.c | 3 +- drivers/ide/ide-probe.c | 5 +- drivers/idle/intel_idle.c | 5 + drivers/iio/trigger/iio-trig-hrtimer.c | 3 +- drivers/infiniband/hw/bnxt_re/qplib_fp.c | 4 +- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 4 +- drivers/infiniband/hw/i40iw/i40iw_main.c | 9 +- drivers/infiniband/hw/mthca/mthca_eq.c | 14 +- drivers/infiniband/hw/qib/qib_sdma.c | 4 +- drivers/infiniband/sw/rxe/rxe_cq.c | 3 +- drivers/input/ff-memless.c | 2 +- drivers/input/input.c | 5 +- drivers/input/misc/xen-kbdfront.c | 3 +- drivers/input/serio/hil_mlc.c | 2 +- drivers/input/serio/i8042.c | 13 +- drivers/input/serio/serio.c | 3 + drivers/ipack/carriers/tpci200.c | 6 +- drivers/isdn/capi/capidrv.c | 2 +- drivers/isdn/gigaset/bas-gigaset.c | 8 +- drivers/isdn/gigaset/common.c | 4 +- drivers/isdn/gigaset/ser-gigaset.c | 4 +- drivers/isdn/gigaset/usb-gigaset.c | 4 +- drivers/isdn/hardware/avm/b1isa.c | 4 +- drivers/isdn/hardware/avm/b1pci.c | 6 +- drivers/isdn/hardware/avm/b1pcmcia.c | 3 +- drivers/isdn/hardware/avm/c4.c | 3 +- drivers/isdn/hardware/avm/t1isa.c | 4 +- drivers/isdn/hardware/avm/t1pci.c | 3 +- drivers/isdn/hardware/mISDN/avmfritz.c | 4 +- drivers/isdn/hardware/mISDN/hfcmulti.c | 3 +- drivers/isdn/hardware/mISDN/hfcpci.c | 2 +- drivers/isdn/hardware/mISDN/mISDNinfineon.c | 3 +- drivers/isdn/hardware/mISDN/netjet.c | 2 +- drivers/isdn/hardware/mISDN/speedfax.c | 3 +- drivers/isdn/hardware/mISDN/w6692.c | 2 +- drivers/isdn/hisax/config.c | 2 +- drivers/isdn/hisax/hfc4s8s_l1.c | 3 +- drivers/isdn/hisax/hisax_fcpcipnp.c | 13 +- drivers/isdn/i4l/isdn_common.c | 2 +- drivers/media/cec/cec-pin.c | 3 +- drivers/media/common/saa7146/saa7146_core.c | 4 +- drivers/media/dvb-core/dvb_demux.c | 3 + drivers/media/pci/b2c2/flexcop-pci.c | 3 +- drivers/media/pci/bt8xx/bttv-driver.c | 2 +- drivers/media/pci/bt8xx/bttv-input.c | 5 +- drivers/media/pci/bt8xx/dvb-bt8xx.c | 3 +- drivers/media/pci/cobalt/cobalt-driver.c | 3 +- drivers/media/pci/cx18/cx18-driver.c | 3 +- drivers/media/pci/cx25821/cx25821-core.c | 2 +- drivers/media/pci/cx88/cx88-alsa.c | 3 +- drivers/media/pci/cx88/cx88-mpeg.c | 2 +- drivers/media/pci/cx88/cx88-video.c | 2 +- drivers/media/pci/dt3155/dt3155.c | 2 +- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 +- drivers/media/pci/ivtv/ivtv-driver.c | 3 +- drivers/media/pci/mantis/mantis_dvb.c | 3 +- drivers/media/pci/meye/meye.c | 3 +- .../pci/netup_unidvb/netup_unidvb_core.c | 3 +- drivers/media/pci/ngene/ngene-core.c | 5 +- drivers/media/pci/pluto2/pluto2.c | 3 +- drivers/media/pci/saa7134/saa7134-alsa.c | 4 +- drivers/media/pci/saa7134/saa7134-core.c | 2 +- drivers/media/pci/saa7134/saa7134-input.c | 3 +- drivers/media/pci/saa7134/saa7134-ts.c | 3 +- drivers/media/pci/saa7134/saa7134-vbi.c | 3 +- drivers/media/pci/saa7134/saa7134-video.c | 3 +- drivers/media/pci/saa7164/saa7164-core.c | 7 +- drivers/media/pci/smipcie/smipcie-main.c | 3 +- drivers/media/pci/solo6x10/solo6x10-core.c | 4 +- drivers/media/pci/sta2x11/sta2x11_vip.c | 5 +- drivers/media/pci/ttpci/av7110.c | 12 +- drivers/media/pci/ttpci/av7110_ir.c | 3 +- drivers/media/pci/ttpci/budget-ci.c | 9 +- drivers/media/pci/ttpci/budget-core.c | 3 +- drivers/media/pci/tw5864/tw5864-video.c | 4 +- drivers/media/pci/tw68/tw68-core.c | 2 +- drivers/media/pci/tw686x/tw686x-core.c | 4 +- drivers/media/platform/aspeed-video.c | 5 +- .../media/platform/marvell-ccic/cafe-driver.c | 3 +- .../media/platform/marvell-ccic/mcam-core.c | 4 +- drivers/media/radio/radio-cadet.c | 2 +- drivers/media/radio/wl128x/fmdrv_common.c | 9 +- drivers/media/rc/fintek-cir.c | 3 +- drivers/media/rc/gpio-ir-recv.c | 2 +- drivers/media/rc/img-ir/img-ir-raw.c | 2 +- drivers/media/rc/ir-hix5hd2.c | 3 +- drivers/media/rc/ir-rx51.c | 3 +- drivers/media/rc/ite-cir.c | 3 +- drivers/media/rc/nuvoton-cir.c | 3 +- drivers/media/rc/serial_ir.c | 2 +- drivers/media/rc/sir_ir.c | 3 +- drivers/media/rc/winbond-cir.c | 2 +- drivers/media/usb/au0828/au0828-video.c | 6 +- drivers/media/usb/ttusb-dec/ttusb_dec.c | 5 +- drivers/memstick/host/jmb38x_ms.c | 6 +- drivers/message/fusion/mptbase.c | 3 +- drivers/mfd/ezx-pcap.c | 4 +- drivers/misc/ibmasm/module.c | 4 +- drivers/misc/sgi-gru/grufile.c | 7 +- drivers/misc/sgi-xp/xpc_uv.c | 3 +- drivers/misc/vmw_vmci/vmci_guest.c | 8 +- drivers/mmc/host/mtk-sd.c | 3 +- drivers/mmc/host/wbsd.c | 20 +- drivers/net/appletalk/cops.c | 2 +- drivers/net/arcnet/arc-rimi.c | 2 +- drivers/net/arcnet/com20020.c | 3 +- drivers/net/arcnet/com90io.c | 3 +- drivers/net/arcnet/com90xx.c | 2 +- drivers/net/caif/caif_hsi.c | 9 +- drivers/net/can/cc770/cc770.c | 4 +- drivers/net/can/peak_canfd/peak_pciefd_main.c | 8 +- drivers/net/can/sja1000/ems_pcmcia.c | 4 +- drivers/net/can/sja1000/peak_pcmcia.c | 3 +- drivers/net/can/sja1000/sja1000.c | 5 +- drivers/net/ethernet/3com/3c509.c | 3 +- drivers/net/ethernet/3com/3c515.c | 6 +- drivers/net/ethernet/8390/axnet_cs.c | 3 +- drivers/net/ethernet/8390/ne.c | 3 +- drivers/net/ethernet/8390/ne2k-pci.c | 3 +- drivers/net/ethernet/8390/pcnet_cs.c | 3 +- drivers/net/ethernet/8390/smc-ultra.c | 3 +- drivers/net/ethernet/8390/wd.c | 3 +- drivers/net/ethernet/agere/et131x.c | 4 +- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 +- drivers/net/ethernet/amazon/ena/ena_netdev.h | 1 + drivers/net/ethernet/amd/lance.c | 2 +- drivers/net/ethernet/amd/ni65.c | 5 +- drivers/net/ethernet/atheros/atlx/atl1.c | 4 +- drivers/net/ethernet/atheros/atlx/atl2.c | 4 +- drivers/net/ethernet/broadcom/cnic.c | 8 +- drivers/net/ethernet/cadence/macb_main.c | 4 +- .../net/ethernet/chelsio/cxgb3/cxgb3_main.c | 16 +- drivers/net/ethernet/micrel/ks8842.c | 7 +- drivers/net/ethernet/micrel/ks8851_mll.c | 3 +- drivers/net/ethernet/microchip/lan743x_main.c | 7 +- drivers/net/ethernet/realtek/atp.c | 3 +- drivers/net/fddi/skfp/skfddi.c | 4 +- drivers/net/hamradio/6pack.c | 4 +- drivers/net/hamradio/baycom_ser_fdx.c | 3 +- drivers/net/hamradio/baycom_ser_hdx.c | 3 +- drivers/net/hamradio/scc.c | 8 +- drivers/net/hamradio/yam.c | 6 +- drivers/net/hippi/rrunner.c | 2 +- drivers/net/ieee802154/at86rf230.c | 6 +- drivers/net/ieee802154/ca8210.c | 10 +- drivers/net/ieee802154/mcr20a.c | 3 +- drivers/net/ieee802154/mrf24j40.c | 3 +- drivers/net/ppp/ppp_async.c | 3 +- drivers/net/ppp/ppp_synctty.c | 3 +- drivers/net/slip/slip.c | 4 +- drivers/net/usb/cdc_ncm.c | 3 +- drivers/net/usb/hso.c | 6 +- drivers/net/wan/cosa.c | 2 +- drivers/net/wan/farsync.c | 6 +- drivers/net/wan/hostess_sv11.c | 3 +- drivers/net/wan/sbni.c | 2 +- drivers/net/wan/sdla.c | 4 +- drivers/net/wan/sealevel.c | 3 +- drivers/net/wireless/ath/ath9k/init.c | 5 +- drivers/net/wireless/ath/carl9170/usb.c | 4 +- .../net/wireless/broadcom/b43legacy/main.c | 8 +- drivers/net/wireless/broadcom/b43legacy/pio.c | 4 +- .../broadcom/brcm80211/brcmfmac/bcmsdh.c | 7 +- .../broadcom/brcm80211/brcmsmac/mac80211_if.c | 3 +- drivers/net/wireless/cisco/airo.c | 4 +- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 9 +- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 8 +- .../net/wireless/intel/iwlegacy/3945-mac.c | 9 +- .../net/wireless/intel/iwlegacy/4965-mac.c | 9 +- .../net/wireless/intersil/hostap/hostap_ap.c | 2 +- .../net/wireless/intersil/hostap/hostap_pci.c | 3 +- .../net/wireless/intersil/hostap/hostap_plx.c | 3 +- drivers/net/wireless/intersil/orinoco/main.c | 4 +- .../intersil/orinoco/orinoco_nortel.c | 4 +- .../wireless/intersil/orinoco/orinoco_pci.c | 4 +- .../wireless/intersil/orinoco/orinoco_plx.c | 4 +- .../wireless/intersil/orinoco/orinoco_tmd.c | 4 +- drivers/net/wireless/intersil/p54/p54pci.c | 2 +- drivers/net/wireless/intersil/p54/p54spi.c | 4 +- .../intersil/prism54/islpci_hotplug.c | 2 +- drivers/net/wireless/mac80211_hwsim.c | 6 +- drivers/net/wireless/marvell/libertas/if_cs.c | 2 +- .../net/wireless/marvell/libertas/if_spi.c | 3 +- .../wireless/marvell/mwifiex/11n_rxreorder.c | 3 +- drivers/net/wireless/marvell/mwifiex/main.c | 5 +- drivers/net/wireless/marvell/mwifiex/pcie.c | 8 +- drivers/net/wireless/marvell/mwifiex/usb.c | 2 +- drivers/net/wireless/marvell/mwl8k.c | 10 +- .../net/wireless/mediatek/mt76/mt76x0/pci.c | 3 +- .../net/wireless/mediatek/mt76/mt76x2/pci.c | 3 +- .../quantenna/qtnfmac/pcie/pearl_pcie.c | 3 +- .../quantenna/qtnfmac/pcie/topaz_pcie.c | 3 +- .../net/wireless/ralink/rt2x00/rt2x00mmio.c | 6 +- .../wireless/realtek/rtl818x/rtl8180/dev.c | 6 +- drivers/net/wireless/realtek/rtlwifi/pci.c | 16 +- drivers/net/wireless/ti/wl1251/sdio.c | 4 +- drivers/net/wireless/ti/wl1251/spi.c | 5 +- drivers/ntb/hw/amd/ntb_hw_amd.c | 12 +- drivers/ntb/hw/intel/ntb_hw_gen1.c | 12 +- drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 8 +- drivers/parport/parport_ax88796.c | 3 +- drivers/parport/parport_pc.c | 3 +- drivers/pci/controller/pcie-xilinx.c | 2 +- drivers/pci/controller/vmd.c | 11 +- drivers/pci/hotplug/cpci_hotplug_core.c | 6 +- drivers/pci/hotplug/cpqphp_core.c | 3 +- drivers/pci/hotplug/shpchp_hpc.c | 5 +- drivers/pci/pcie/pme.c | 3 +- drivers/pci/switch/switchtec.c | 10 +- drivers/pcmcia/i82092.c | 2 +- drivers/pcmcia/i82365.c | 9 +- drivers/pcmcia/pcmcia_resource.c | 9 +- drivers/pcmcia/pd6729.c | 8 +- drivers/pcmcia/tcic.c | 7 +- drivers/pcmcia/yenta_socket.c | 7 +- drivers/pinctrl/intel/pinctrl-intel.c | 2 +- drivers/pinctrl/pinctrl-amd.c | 3 +- drivers/pinctrl/pinctrl-single.c | 3 +- drivers/platform/goldfish/goldfish_pipe.c | 6 +- drivers/platform/mellanox/mlxreg-hotplug.c | 5 +- drivers/platform/x86/fujitsu-tablet.c | 3 +- drivers/platform/x86/intel_int0002_vgpio.c | 2 +- drivers/platform/x86/intel_ips.c | 3 +- drivers/platform/x86/intel_pmc_ipc.c | 8 +- drivers/platform/x86/intel_punit_ipc.c | 4 +- drivers/platform/x86/intel_scu_ipc.c | 5 +- drivers/platform/x86/sony-laptop.c | 5 +- drivers/pnp/resource.c | 3 +- drivers/power/reset/ltc2952-poweroff.c | 6 +- drivers/power/supply/act8945a_charger.c | 6 +- drivers/power/supply/goldfish_battery.c | 5 +- .../power/supply/max14656_charger_detector.c | 2 +- drivers/power/supply/pda_power.c | 6 +- drivers/power/supply/wm97xx_battery.c | 5 +- drivers/pps/clients/pps-gpio.c | 3 +- drivers/ptp/ptp_pch.c | 3 +- drivers/rapidio/devices/tsi721.c | 25 +- drivers/rapidio/devices/tsi721_dma.c | 8 +- drivers/regulator/qcom_spmi-regulator.c | 5 +- drivers/rpmsg/qcom_glink_native.c | 5 +- drivers/rtc/rtc-cmos.c | 5 +- drivers/rtc/rtc-ds1305.c | 3 +- drivers/rtc/rtc-ds1374.c | 5 +- drivers/rtc/rtc-ds1511.c | 3 +- drivers/rtc/rtc-ds1553.c | 4 +- drivers/rtc/rtc-ds1685.c | 3 +- drivers/rtc/rtc-ftrtc010.c | 2 +- drivers/rtc/rtc-m48t59.c | 5 +- drivers/rtc/rtc-mrst.c | 3 +- drivers/rtc/rtc-pcap.c | 10 +- drivers/rtc/rtc-r7301.c | 3 +- drivers/rtc/rtc-snvs.c | 3 +- drivers/rtc/rtc-stk17ta8.c | 5 +- drivers/rtc/rtc-zynqmp.c | 6 +- drivers/scsi/3w-9xxx.c | 6 +- drivers/scsi/3w-sas.c | 6 +- drivers/scsi/3w-xxxx.c | 3 +- drivers/scsi/BusLogic.c | 3 +- drivers/scsi/a100u2w.c | 4 +- drivers/scsi/aacraid/commsup.c | 8 +- drivers/scsi/aacraid/rx.c | 3 +- drivers/scsi/aacraid/sa.c | 3 +- drivers/scsi/aacraid/src.c | 3 +- drivers/scsi/advansys.c | 4 +- drivers/scsi/aha152x.c | 4 +- drivers/scsi/aha1542.c | 2 +- drivers/scsi/aha1740.c | 3 +- drivers/scsi/aic7xxx/aic7770_osm.c | 3 +- drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 2 +- drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 2 +- drivers/scsi/aic94xx/aic94xx_hwi.c | 4 +- drivers/scsi/aic94xx/aic94xx_init.c | 5 +- drivers/scsi/am53c974.c | 4 +- drivers/scsi/arcmsr/arcmsr_hba.c | 3 +- drivers/scsi/atp870u.c | 3 +- drivers/scsi/be2iscsi/be_main.c | 12 +- drivers/scsi/bfa/bfad.c | 9 +- drivers/scsi/csiostor/csio_isr.c | 16 +- drivers/scsi/dpt_i2o.c | 2 +- drivers/scsi/esas2r/esas2r_init.c | 8 +- drivers/scsi/fnic/fnic_isr.c | 13 +- drivers/scsi/g_NCR5380.c | 7 +- drivers/scsi/gdth.c | 8 +- drivers/scsi/hpsa.c | 19 +- drivers/scsi/hptiop.c | 3 +- drivers/scsi/initio.c | 3 +- drivers/scsi/ipr.c | 23 +- drivers/scsi/ips.c | 4 +- drivers/scsi/isci/init.c | 8 +- drivers/scsi/lpfc/lpfc_init.c | 35 ++- drivers/scsi/megaraid.c | 4 +- drivers/scsi/megaraid/megaraid_mbox.c | 3 +- drivers/scsi/megaraid/megaraid_sas_base.c | 8 +- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- drivers/scsi/mvsas/mv_init.c | 4 +- drivers/scsi/mvumi.c | 8 +- drivers/scsi/myrb.c | 2 +- drivers/scsi/myrs.c | 2 +- drivers/scsi/nsp32.c | 3 +- drivers/scsi/pcmcia/qlogic_stub.c | 2 +- drivers/scsi/pcmcia/sym53c500_cs.c | 2 +- drivers/scsi/pm8001/pm8001_init.c | 10 +- drivers/scsi/pmcraid.c | 5 +- drivers/scsi/qedf/qedf_main.c | 4 +- drivers/scsi/qedi/qedi_main.c | 3 +- drivers/scsi/qla1280.c | 3 +- drivers/scsi/qla2xxx/qla_isr.c | 22 +- drivers/scsi/qla4xxx/ql4_isr.c | 5 +- drivers/scsi/qla4xxx/ql4_nx.c | 10 +- drivers/scsi/qlogicfas.c | 2 +- drivers/scsi/sim710.c | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 11 +- drivers/scsi/snic/snic_isr.c | 5 +- drivers/scsi/stex.c | 4 +- drivers/scsi/sym53c8xx_2/sym_glue.c | 3 +- drivers/scsi/ufs/ufshcd.c | 7 +- drivers/scsi/vmw_pvscsi.c | 9 +- drivers/scsi/wd719x.c | 4 +- drivers/slimbus/qcom-ctrl.c | 3 +- drivers/spi/spi-altera.c | 3 +- drivers/spi/spi-axi-spi-engine.c | 3 +- drivers/spi/spi-cadence.c | 3 +- drivers/spi/spi-dw.c | 4 +- drivers/spi/spi-fsl-spi.c | 3 +- drivers/spi/spi-oc-tiny.c | 3 +- drivers/spi/spi-pxa2xx.c | 4 +- drivers/spi/spi-topcliff-pch.c | 5 +- drivers/spi/spi-xilinx.c | 5 +- drivers/spi/spi-zynqmp-gqspi.c | 3 +- drivers/staging/android/vsoc.c | 3 +- drivers/staging/axis-fifo/axis-fifo.c | 3 +- drivers/staging/comedi/comedi_buf.c | 5 + .../staging/comedi/drivers/addi_apci_1032.c | 3 +- .../staging/comedi/drivers/addi_apci_1500.c | 3 +- .../staging/comedi/drivers/addi_apci_1564.c | 3 +- .../staging/comedi/drivers/addi_apci_2032.c | 3 +- .../staging/comedi/drivers/addi_apci_3120.c | 3 +- .../staging/comedi/drivers/addi_apci_3xxx.c | 3 +- drivers/staging/comedi/drivers/adl_pci9111.c | 3 +- drivers/staging/comedi/drivers/adl_pci9118.c | 3 +- drivers/staging/comedi/drivers/adv_pci1710.c | 3 +- drivers/staging/comedi/drivers/aio_iiro_16.c | 3 +- .../comedi/drivers/amplc_dio200_common.c | 3 +- .../comedi/drivers/amplc_pc236_common.c | 3 +- drivers/staging/comedi/drivers/amplc_pci224.c | 3 +- drivers/staging/comedi/drivers/amplc_pci230.c | 3 +- drivers/staging/comedi/drivers/cb_pcidas.c | 4 +- drivers/staging/comedi/drivers/cb_pcidas64.c | 5 +- .../staging/comedi/drivers/comedi_parport.c | 3 +- drivers/staging/comedi/drivers/comedi_test.c | 6 +- drivers/staging/comedi/drivers/das16m1.c | 3 +- drivers/staging/comedi/drivers/das1800.c | 3 +- drivers/staging/comedi/drivers/das6402.c | 3 +- drivers/staging/comedi/drivers/das800.c | 5 +- drivers/staging/comedi/drivers/dmm32at.c | 3 +- drivers/staging/comedi/drivers/dt2811.c | 3 +- drivers/staging/comedi/drivers/dt2814.c | 3 +- drivers/staging/comedi/drivers/dt282x.c | 2 +- drivers/staging/comedi/drivers/dt3000.c | 3 +- drivers/staging/comedi/drivers/gsc_hpdi.c | 3 +- drivers/staging/comedi/drivers/jr3_pci.c | 2 +- drivers/staging/comedi/drivers/me4000.c | 3 +- drivers/staging/comedi/drivers/ni_6527.c | 4 +- drivers/staging/comedi/drivers/ni_65xx.c | 3 +- drivers/staging/comedi/drivers/ni_660x.c | 4 +- drivers/staging/comedi/drivers/ni_at_a2150.c | 2 +- drivers/staging/comedi/drivers/ni_atmio.c | 3 +- drivers/staging/comedi/drivers/ni_atmio16d.c | 3 +- .../staging/comedi/drivers/ni_labpc_common.c | 5 +- drivers/staging/comedi/drivers/ni_pcidio.c | 3 +- drivers/staging/comedi/drivers/ni_pcimio.c | 3 +- drivers/staging/comedi/drivers/pcl711.c | 3 +- drivers/staging/comedi/drivers/pcl726.c | 3 +- drivers/staging/comedi/drivers/pcl812.c | 3 +- drivers/staging/comedi/drivers/pcl816.c | 2 +- drivers/staging/comedi/drivers/pcl818.c | 3 +- drivers/staging/comedi/drivers/pcmmio.c | 3 +- drivers/staging/comedi/drivers/pcmuio.c | 6 +- drivers/staging/comedi/drivers/rtd520.c | 3 +- drivers/staging/comedi/drivers/s626.c | 3 +- drivers/staging/gasket/gasket_interrupt.c | 3 +- drivers/staging/goldfish/goldfish_audio.c | 5 +- drivers/staging/iio/adc/ad7606.c | 3 +- drivers/staging/ks7010/ks_hostif.c | 3 +- drivers/staging/media/bcm2048/radio-bcm2048.c | 4 +- drivers/staging/media/zoran/zoran_card.c | 2 +- drivers/staging/most/dim2/dim2.c | 6 +- drivers/staging/most/i2c/i2c.c | 3 +- drivers/staging/olpc_dcon/olpc_dcon_xo_1.c | 2 +- drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c | 2 +- drivers/staging/pi433/pi433_if.c | 6 +- drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- .../staging/rtl8188eu/hal/rtl8188eu_recv.c | 6 +- .../staging/rtl8188eu/hal/rtl8188eu_xmit.c | 6 +- drivers/staging/rtl8188eu/os_dep/mlme_linux.c | 17 +- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 20 +- drivers/staging/rtl8192e/rtllib_softmac.c | 6 +- .../rtl8192u/ieee80211/ieee80211_module.c | 2 +- .../rtl8192u/ieee80211/ieee80211_softmac.c | 6 +- drivers/staging/rtl8712/rtl8712_recv.c | 6 +- drivers/staging/rtl8712/rtl871x_xmit.c | 6 +- .../staging/rtl8723bs/hal/rtl8723bs_recv.c | 8 +- drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 22 +- drivers/staging/rtl8723bs/os_dep/recv_linux.c | 2 +- drivers/staging/rtlwifi/pci.c | 4 +- drivers/staging/rts5208/rtsx.c | 4 +- drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/serialio.c | 5 +- drivers/staging/vt6655/device_main.c | 2 +- drivers/thermal/ti-soc-thermal/ti-bandgap.c | 6 +- drivers/thunderbolt/nhi.c | 6 +- drivers/tty/cyclades.c | 9 +- drivers/tty/goldfish.c | 4 +- drivers/tty/hvc/hvc_irq.c | 4 +- drivers/tty/ipwireless/hardware.c | 3 +- drivers/tty/isicom.c | 4 +- drivers/tty/moxa.c | 2 +- drivers/tty/mxser.c | 4 +- drivers/tty/n_gsm.c | 5 +- drivers/tty/n_r3964.c | 2 +- drivers/tty/rocket.c | 2 +- drivers/tty/serial/8250/8250_core.c | 6 +- drivers/tty/serial/8250/8250_exar.c | 2 +- drivers/tty/serial/8250/8250_port.c | 4 +- drivers/tty/serial/altera_jtaguart.c | 4 +- drivers/tty/serial/altera_uart.c | 5 +- drivers/tty/serial/arc_uart.c | 2 +- drivers/tty/serial/digicolor-usart.c | 3 +- drivers/tty/serial/fsl_lpuart.c | 12 +- drivers/tty/serial/ifx6x60.c | 11 +- drivers/tty/serial/jsm/jsm_driver.c | 3 +- drivers/tty/serial/max3100.c | 5 +- drivers/tty/serial/men_z135_uart.c | 4 +- drivers/tty/serial/mux.c | 2 +- drivers/tty/serial/pch_uart.c | 4 +- drivers/tty/serial/pnx8xxx_uart.c | 3 +- drivers/tty/serial/rp2.c | 2 +- drivers/tty/serial/sc16is7xx.c | 2 +- drivers/tty/serial/sccnxp.c | 2 +- drivers/tty/serial/sh-sci.c | 9 +- drivers/tty/serial/timbuart.c | 4 +- drivers/tty/serial/uartlite.c | 3 +- drivers/tty/serial/xilinx_uartps.c | 4 +- drivers/tty/synclink.c | 3 +- drivers/tty/synclink_gt.c | 6 +- drivers/tty/synclinkmp.c | 7 +- drivers/tty/tty_buffer.c | 5 +- drivers/tty/vcc.c | 4 +- drivers/tty/vt/keyboard.c | 2 +- drivers/uio/uio.c | 3 +- drivers/usb/atm/usbatm.c | 6 +- drivers/usb/c67x00/c67x00-drv.c | 3 +- drivers/usb/chipidea/core.c | 5 +- drivers/usb/chipidea/otg_fsm.c | 3 +- drivers/usb/core/hcd.c | 8 +- drivers/usb/dwc2/gadget.c | 3 +- drivers/usb/dwc2/hcd_queue.c | 6 +- drivers/usb/dwc2/platform.c | 3 +- drivers/usb/gadget/function/f_midi.c | 3 +- drivers/usb/gadget/function/f_ncm.c | 3 +- drivers/usb/gadget/udc/amd5536udc_pci.c | 2 +- drivers/usb/gadget/udc/bdc/bdc_udc.c | 3 +- drivers/usb/gadget/udc/dummy_hcd.c | 4 +- drivers/usb/gadget/udc/fotg210-udc.c | 4 +- drivers/usb/gadget/udc/fusb300_udc.c | 6 +- drivers/usb/gadget/udc/goku_udc.c | 3 +- drivers/usb/gadget/udc/m66592-udc.c | 6 +- drivers/usb/gadget/udc/mv_u3d_core.c | 3 +- drivers/usb/gadget/udc/mv_udc_core.c | 3 +- drivers/usb/gadget/udc/net2272.c | 3 +- drivers/usb/gadget/udc/net2280.c | 3 +- drivers/usb/gadget/udc/pch_udc.c | 8 +- drivers/usb/gadget/udc/pxa27x_udc.c | 3 +- drivers/usb/gadget/udc/r8a66597-udc.c | 7 +- drivers/usb/gadget/udc/snps_udc_plat.c | 4 +- drivers/usb/gadget/udc/udc-xilinx.c | 3 +- drivers/usb/host/max3421-hcd.c | 3 +- drivers/usb/host/xhci.c | 12 +- drivers/usb/isp1760/isp1760-udc.c | 3 +- drivers/usb/musb/musb_core.c | 2 +- drivers/usb/phy/phy-gpio-vbus-usb.c | 4 +- drivers/usb/serial/mos7720.c | 4 +- drivers/usb/usbip/vudc_transfer.c | 2 +- drivers/uwb/neh.c | 2 +- drivers/uwb/rsv.c | 5 +- drivers/uwb/whc-rc.c | 5 +- drivers/vfio/pci/vfio_pci_intrs.c | 5 +- drivers/video/fbdev/arcfb.c | 3 +- drivers/video/fbdev/aty/atyfb_base.c | 2 +- drivers/video/fbdev/goldfishfb.c | 4 +- drivers/video/fbdev/matrox/matroxfb_base.c | 3 +- drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 7 +- drivers/video/fbdev/via/via-core.c | 3 +- drivers/video/fbdev/xen-fbfront.c | 2 + drivers/virt/vboxguest/vboxguest_linux.c | 5 +- drivers/virtio/virtio_mmio.c | 4 +- drivers/virtio/virtio_pci_common.c | 20 +- drivers/visorbus/visorbus_main.c | 2 +- drivers/vme/bridges/vme_ca91cx42.c | 5 +- drivers/vme/bridges/vme_tsi148.c | 7 +- drivers/w1/masters/ds1wm.c | 3 +- drivers/xen/events/events_base.c | 12 +- drivers/xen/platform-pci.c | 4 +- drivers/xen/pvcalls-front.c | 2 + drivers/xen/xen-pciback/pciback_ops.c | 6 +- include/asm-generic/io.h | 3 + include/linux/clearcpu.h | 36 +++ include/linux/filter.h | 21 +- include/linux/highmem.h | 2 + include/linux/hrtimer.h | 4 + include/linux/interrupt.h | 18 +- include/linux/skbuff.h | 2 + include/linux/timer.h | 14 +- include/linux/tty_flip.h | 4 + include/linux/usb/hcd.h | 5 +- kernel/bpf/core.c | 2 + kernel/bpf/cpumap.c | 3 + kernel/dma/swiotlb.c | 2 + kernel/irq/handle.c | 4 + kernel/irq/manage.c | 1 + kernel/sched/core.c | 9 + kernel/softirq.c | 25 +- kernel/time/alarmtimer.c | 2 +- kernel/time/hrtimer.c | 5 + kernel/time/timer.c | 8 + lib/random32.c | 2 +- lib/scatterlist.c | 2 + lib/string.c | 6 + mm/slab_common.c | 5 +- net/atm/pppoatm.c | 2 +- net/core/skbuff.c | 32 +++ net/mac80211/main.c | 14 +- net/rds/ib_cm.c | 8 +- net/wireless/lib80211.c | 2 +- net/xfrm/xfrm_state.c | 3 +- samples/v4l/v4l2-pci-skeleton.c | 5 +- security/keys/gc.c | 2 +- sound/core/hrtimer.c | 3 +- sound/core/pcm_lib.c | 3 + sound/core/rawmidi.c | 3 + sound/core/timer.c | 7 +- sound/drivers/mpu401/mpu401_uart.c | 8 +- sound/drivers/mtpav.c | 5 +- sound/drivers/pcsp/pcsp.c | 3 +- sound/drivers/serial-u16550.c | 6 +- sound/isa/ad1816a/ad1816a_lib.c | 2 +- sound/isa/es1688/es1688_lib.c | 4 +- sound/isa/es18xx.c | 3 +- sound/isa/gus/gus_main.c | 2 +- sound/isa/gus/gusmax.c | 2 +- sound/isa/gus/interwave.c | 3 +- sound/isa/msnd/msnd_pinnacle.c | 3 +- sound/isa/opl3sa2.c | 4 +- sound/isa/opti9xx/opti92x-ad1848.c | 3 +- sound/isa/sb/emu8000_pcm.c | 2 +- sound/isa/sb/sb8_midi.c | 3 +- sound/isa/sb/sb_common.c | 6 +- sound/isa/wavefront/wavefront.c | 3 +- sound/isa/wavefront/wavefront_midi.c | 4 +- sound/isa/wss/wss_lib.c | 3 +- sound/pci/ad1889.c | 3 +- sound/pci/ali5451/ali5451.c | 3 +- sound/pci/als300.c | 3 +- sound/pci/asihpi/asihpi.c | 4 +- sound/pci/asihpi/hpioctl.c | 3 +- sound/pci/atiixp.c | 3 +- sound/pci/atiixp_modem.c | 3 +- sound/pci/aw2/aw2-alsa.c | 3 +- sound/pci/azt3328.c | 3 +- sound/pci/bt87x.c | 4 +- sound/pci/ca0106/ca0106_main.c | 3 +- sound/pci/cmipci.c | 3 +- sound/pci/cs4281.c | 3 +- sound/pci/cs46xx/cs46xx_lib.c | 3 +- sound/pci/cs5535audio/cs5535audio.c | 3 +- sound/pci/ctxfi/cthw20k1.c | 3 +- sound/pci/ctxfi/cthw20k2.c | 3 +- sound/pci/echoaudio/midi.c | 2 +- sound/pci/emu10k1/emu10k1_main.c | 3 +- sound/pci/emu10k1/emu10k1x.c | 3 +- sound/pci/ens1370.c | 3 +- sound/pci/es1938.c | 6 +- sound/pci/es1968.c | 3 +- sound/pci/fm801.c | 3 +- sound/pci/hda/hda_intel.c | 4 +- sound/pci/ice1712/ice1712.c | 3 +- sound/pci/ice1712/ice1724.c | 3 +- sound/pci/intel8x0.c | 6 +- sound/pci/intel8x0m.c | 6 +- sound/pci/korg1212/korg1212.c | 4 +- sound/pci/lola/lola.c | 3 +- sound/pci/maestro3.c | 3 +- sound/pci/nm256/nm256.c | 3 +- sound/pci/oxygen/oxygen_lib.c | 4 +- sound/pci/riptide/riptide.c | 3 +- sound/pci/rme32.c | 3 +- sound/pci/rme96.c | 3 +- sound/pci/rme9652/hdsp.c | 8 +- sound/pci/rme9652/hdspm.c | 10 +- sound/pci/rme9652/rme9652.c | 3 +- sound/pci/sis7019.c | 7 +- sound/pci/sonicvibes.c | 3 +- sound/pci/trident/trident_main.c | 3 +- sound/pci/via82xx.c | 6 +- sound/pci/via82xx_modem.c | 3 +- sound/pci/ymfpci/ymfpci_main.c | 3 +- sound/soc/amd/acp-pcm-dma.c | 3 +- sound/soc/amd/raven/acp3x-pcm-dma.c | 3 +- sound/soc/codecs/rt5640.c | 4 +- sound/soc/codecs/rt5651.c | 4 +- sound/soc/codecs/rt5663.c | 4 +- sound/soc/dwc/dwc-i2s.c | 5 +- sound/soc/fsl/fsl_asrc.c | 3 +- sound/soc/fsl/fsl_esai.c | 3 +- sound/soc/fsl/fsl_sai.c | 3 +- sound/soc/fsl/fsl_spdif.c | 3 +- sound/soc/fsl/fsl_ssi.c | 3 +- sound/usb/midi.c | 6 +- sound/usb/misc/ua101.c | 4 +- sound/x86/intel_hdmi_audio.c | 5 +- 681 files changed, 2457 insertions(+), 1308 deletions(-) create mode 100644 Documentation/admin-guide/mds.rst create mode 100644 Documentation/clearcpu.txt create mode 100644 arch/x86/include/asm/clearbpf.h create mode 100644 arch/x86/include/asm/clearcpu.h create mode 100644 arch/x86/include/asm/trace/clearcpu.h create mode 100644 include/linux/clearcpu.h
Signature · 1 line
2.17.2
PATCH v6 37/43 MDSv6
PCMCIA devices are usually slow, and sometimes do PIO, so mark them all as clearing the cpu.
--- drivers/pcmcia/pcmcia_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pcmcia/pcmcia_resource.c +1 -1
@@ -702,7 +702,7 @@ int __must_check pcmcia_request_irq(struct pcmcia_device *p_dev,if (!p_dev->irq)return -EINVAL ; - ret =request_irq (p_dev->irq, handler,IRQF_SHARED , + ret =request_irq (p_dev->irq, handler,IRQF_SHARED |IRQF_USER_DATA , p_dev->devname, p_dev->priv);if (!ret) p_dev->_irq =1 ;
Signature · 1 line
2.17.2
PATCH v6 17/43 MDSv6
In reply to Andi KleenAssume that any code using these functions is sensitive and shouldn't leak any data.
This handles clearing for key and cryptographic data used in the kernel.
It also schedules a clear after each get_random_bytes, which while being slightly overkill, may protect some hash table key secrets.
--- lib/string.c | 6 ++++++ mm/slab_common.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-)
lib/string.c +6 -0
@@ -28,6 +28,7 @@#include <linux/bug.h> #include <linux/errno.h> #include <linux/slab.h> +#include <linux/clearcpu.h> #include <asm/byteorder.h> #include <asm/word-at-a-time.h>
@@ -715,12 +716,17 @@ EXPORT_SYMBOL(memset);* necessary, memzero_explicit() should be used instead in * order to prevent the compiler from optimising away zeroing. * +* As a side effect this may also trigger extra cleaning +* of CPU state before the next kernel exit to avoid +* side channels. +* * memzero_explicit() doesn't need an arch-specific version as * it just invokes the one of memset() implicitly. */ void memzero_explicit (void *s,size_t count) {memset (s,0 , count); +lazy_clear_cpu ();barrier_data (s); }EXPORT_SYMBOL (memzero_explicit);
mm/slab_common.c +4 -1
@@ -1576,6 +1576,9 @@ EXPORT_SYMBOL(krealloc);* Note: this function zeroes the whole allocated buffer which can be a good * deal bigger than the requested buffer size passed to kmalloc(). So be * careful when using this function in performance sensitive code. +* +* As a side effect this may also clear CPU state later before the +* next kernel exit to avoid side channels. */ void kzfree (const void *p) {
@@ -1585,7 +1588,7 @@ void kzfree(const void *p)if (unlikely (ZERO_OR_NULL_PTR (mem)))return ; ks =ksize (mem); -memset (mem,0 , ks); +memzero_explicit (mem, ks);kfree (mem); }EXPORT_SYMBOL (kzfree);
Signature · 1 line
2.17.2
PATCH v6 39/43 MDSv6
In reply to Andi KleenMost USB interrupt handlers do not touch user data, except in some cases hcd poll is called which can copy a user buffer. Instead of marking all the USB interrupts and timers as clear cpu only clear it when the user data touching actually happens.
--- drivers/usb/core/hcd.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/core/hcd.c +3 -0
@@ -29,6 +29,7 @@#include <linux/workqueue.h> #include <linux/pm_runtime.h> #include <linux/types.h> +#include <linux/clearcpu.h> #include <linux/phy/phy.h> #include <linux/usb.h>
@@ -770,6 +771,8 @@ void usb_hcd_poll_rh_status(struct usb_hcd *hcd) urb->actual_length = length;memcpy (urb->transfer_buffer, buffer, length); +lazy_clear_cpu_interrupt (); +usb_hcd_unlink_urb_from_ep (hcd, urb);usb_hcd_giveback_urb (hcd, urb,0 ); }else {
Signature · 1 line
2.17.2
PATCH v6 18/43 MDSv6
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Subject: mds: Support cpu clear in interrupts
According to an audit the majority of interrupt handlers do not touch user data.
But some do. Add a IRQ_F_USER_DATA flag to enable clearing after an interrupt.
Future patches will add this flag to interrupts that need it.
--- include/linux/interrupt.h | 2 ++ kernel/irq/handle.c | 4 ++++ kernel/irq/manage.c | 1 + 3 files changed, 7 insertions(+)
include/linux/interrupt.h +2 -0
@@ -61,6 +61,7 @@* interrupt handler after suspending interrupts. For system * wakeup devices users need to implement wakeup detection in * their interrupt handlers. +* IRQF_USER_DATA - Interrupt does touch user data */ #define IRQF_SHARED 0x00000080#define IRQF_PROBE_SHARED 0x00000100
@@ -74,6 +75,7 @@#define IRQF_NO_THREAD 0x00010000#define IRQF_EARLY_RESUME 0x00020000#define IRQF_COND_SUSPEND 0x00040000 +#define IRQF_USER_DATA 0x00080000#define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD)
kernel/irq/handle.c +4 -0
@@ -13,6 +13,7 @@#include <linux/sched.h> #include <linux/interrupt.h> #include <linux/kernel_stat.h> +#include <linux/clearcpu.h> #include <trace/events/irq.h>
@@ -149,6 +150,9 @@ irqreturn_t __handle_irq_event_percpu(struct irq_desc *desc, unsigned int *flags res = action->handler (irq, action->dev_id);trace_irq_handler_exit (irq, action, res); +if (action->flags &IRQF_USER_DATA ) +lazy_clear_cpu (); +if (WARN_ONCE (!irqs_disabled (),"irq %u handler %pF enabled interrupts\n" , irq, action->handler))local_irq_disable ();
kernel/irq/manage.c +1 -0
@@ -1796,6 +1796,7 @@ EXPORT_SYMBOL(free_irq);* * IRQF_SHARED Interrupt is shared * IRQF_TRIGGER_* Specify active edge(s) or level +* IRQF_USER_DATA Handler touches user data with CPU. * */ int request_threaded_irq(unsigned int irq, irq_handler_t handler,
Signature · 1 line
2.17.2
PATCH v6 34/43 MDSv6
In reply to Andi KleenThese interrupts are all complicated, and should be not performance critical, so mark them to clear the CPU.
--- drivers/gpu/drm/drm_irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_irq.c +2 -1
@@ -128,7 +128,8 @@ int drm_irq_install(struct drm_device *dev, int irq) sh_flags =IRQF_SHARED ; ret =request_irq (irq, dev->driver->irq_handler, - sh_flags, dev->driver->name, dev); + sh_flags |IRQF_USER_DATA , + dev->driver->name, dev);if (ret <0 ) { dev->irq_enabled = false;
Signature · 1 line
2.17.2
PATCH v6 26/43 MDSv6
In reply to Andi KleenWhenever a driver isr touches memory that is likely to go to some user mode process, there is a slight risk of a speculative exploit leaking the last read or write to an attacker. This patch adds a call to set the flag to clear the exploitable buffer upon return to user mode to handle drivers using scatter gather DMA processing from their ISR.
--- lib/scatterlist.c | 2 ++ 1 file changed, 2 insertions(+)
lib/scatterlist.c +2 -0
@@ -11,6 +11,7 @@#include <linux/scatterlist.h> #include <linux/highmem.h> #include <linux/kmemleak.h> +#include <linux/clearcpu.h> /** * sg_next - return the next scatterlist entry in a list
@@ -831,6 +832,7 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, offset += len; } +lazy_clear_cpu_interrupt ();sg_miter_stop (&miter);
Signature · 1 line
2.17.2
PATCH v6 32/43 MDSv6
In reply to Andi KleenXen has its own call back system that multiplexes a single interrupt.
Most Xen handlers do not touch user data, but a few non performance critical ones do. Add explicit clearing to those. The fast paths for block and network IO are not impacted.
--- drivers/input/misc/xen-kbdfront.c | 3 ++- drivers/video/fbdev/xen-fbfront.c | 2 ++ drivers/xen/pvcalls-front.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-)
drivers/input/misc/xen-kbdfront.c +2 -1
@@ -19,6 +19,7 @@#include <linux/input.h> #include <linux/input/mt.h> #include <linux/slab.h> +#include <linux/clearcpu.h> #include <asm/xen/hypervisor.h>
@@ -193,7 +194,7 @@ static irqreturn_t input_handler(int rq, void *dev_id)mb ();/* ensure we got ring contents */ page->in_cons = cons;notify_remote_via_irq (info->irq); - +lazy_clear_cpu ();return IRQ_HANDLED ; }
drivers/video/fbdev/xen-fbfront.c +2 -0
@@ -28,6 +28,7 @@#include <linux/slab.h> #include <linux/vmalloc.h> #include <linux/mm.h> +#include <linux/clearcpu.h> #include <asm/xen/hypervisor.h>
@@ -358,6 +359,7 @@ static irqreturn_t xenfb_event_handler(int rq, void *dev_id)/* Flush dirty rectangle: */ xenfb_refresh (info,INT_MAX ,INT_MAX , -INT_MAX , -INT_MAX ); +lazy_clear_cpu ();return IRQ_HANDLED ; }
drivers/xen/pvcalls-front.c +2 -0
@@ -15,6 +15,7 @@#include <linux/module.h> #include <linux/net.h> #include <linux/socket.h> +#include <linux/clearcpu.h> #include <net/sock.h>
@@ -219,6 +220,7 @@ static irqreturn_t pvcalls_front_event_handler(int irq, void *dev_id)*/ smp_wmb (); bedata->rsp[req_id].req_id = req_id; +lazy_clear_cpu (); } done =1 ;
Signature · 1 line
2.17.2
Greg KH
maintainerQuoted 6 lines · speck for Andi Kleen
From: Andi Kleen <[email protected]>
Subject: mds sweep: Clear cpu for usbmon interceptsusbmon touches user data in interrupts that otherwise don't touch user data. Automatically schedule a clear cpu if usbmon is called from an interrupt.
I have written a long and very satisfying rant about this patch, that I than deleted, as it made me feel very better, but probably would not have helped anyone else out.
In turn, I need you to properly justify this patch as these two tiny sentences, and this small patch make no sense to me at all. Please explain _WHY_ this is needed in this specific location. Before responding, I would strongly recommend reading up on exactly what usbmon is and who is allowed to use it. If after doing that, you still feel this patch is needed (and it might be, I still can not tell for sure), please reply with enough detail that anyone who does not know what usbmon is, or what mds really is, can understand why this patch is needed.
thanks,
greg k-h
Greg KH
maintainerQuoted 5 lines · speck for Andi Kleen
From: Andi Kleen <[email protected]>
Subject: mds sweep: Make usb hcd poll clear cpuMost USB interrupt handlers do not touch user data, except in some cases hcd poll is called which can copy a user buffer.
This does not make sense to me. From a USB driver point of view, there are very _few_ irqs that do _not_ contain "user data".
Quoted 2 lines
Instead of marking all the USB interrupts and timers as clear cpu only clear it when the user data touching actually happens.
Um, almost all irqs here _do_ receive data across the wire, and your patch shows this happening. The text here is all wrong.
Also, why are you classifying USB data as "user data"? It's coming from some random piece of hardware. I don't see a definition of what you are calling "user data" anywhere in this patchset, did I miss that somewhere?
I know I asked previously for this, without that defintion, this huge patchset is pretty much impossible to review.
greg k-h
Quoted 12 lines · speck for Greg KH
Quoted 6 lines · speck for Andi Kleen
From: Andi Kleen <[email protected]>
Subject: mds sweep: Clear cpu for usbmon interceptsusbmon touches user data in interrupts that otherwise don't touch user data. Automatically schedule a clear cpu if usbmon is called from an interrupt.
I have written a long and very satisfying rant about this patch, that I than deleted, as it made me feel very better, but probably would not have helped anyone else out.
Quoted 5 lines
In turn, I need you to properly justify this patch as these two tiny sentences, and this small patch make no sense to me at all. Please explain _WHY_ this is needed in this specific location. Before responding, I would strongly recommend reading up on exactly what usbmon is and who is allowed to use it. If after doing that, you still feel
Right it's root only.
But this is not about leaking data to the root monitoring user (who can see the data anyways), but to unrelated processes which are not root, but happen to be interrupted by the USB interrupt.
Quoted 1 line
this patch is needed (and it might be, I still can not tell for sure),
Anything that touches user data in an interrupt needs to be marked with the lazy approach.
I can write more on this instance.
However I will probably not be able to write a detailed description for each of the interrupt handlers changed because there are just too many.
-Andi
Greg KH
maintainerQuoted 19 lines · speck for Andi Kleen
Quoted 12 lines · speck for Greg KH
Quoted 6 lines · speck for Andi Kleen
From: Andi Kleen <[email protected]>
Subject: mds sweep: Clear cpu for usbmon interceptsusbmon touches user data in interrupts that otherwise don't touch user data. Automatically schedule a clear cpu if usbmon is called from an interrupt.
I have written a long and very satisfying rant about this patch, that I than deleted, as it made me feel very better, but probably would not have helped anyone else out.
Quoted 5 lines
In turn, I need you to properly justify this patch as these two tiny sentences, and this small patch make no sense to me at all. Please explain _WHY_ this is needed in this specific location. Before responding, I would strongly recommend reading up on exactly what usbmon is and who is allowed to use it. If after doing that, you still feel
Quoted 6 lines
Right it's root only.
But this is not about leaking data to the root monitoring user (who can see the data anyways), but to unrelated processes which are not root, but happen to be interrupted by the USB interrupt.
Then why are you messing around with the usbmon callback? It has nothing to do with anything here. By hooking it here, you now have 2 calls to this function on the USB urb callback path.
The fact that a root process happens to be watching the USB data flowing through the system, or not, should have no affect on anything here, as the data flow is still the same (with the exception an extra copy in the irq could happen). Does multiple copys matter or not? I can't find anything in the documentation we have about this, am I missing it?
Quoted 4 lines
Quoted 1 line
this patch is needed (and it might be, I still can not tell for sure),
Anything that touches user data in an interrupt needs to be marked with the lazy approach.
As I asked with the hcd change, what is "user data"?
Quoted 1 line
I can write more on this instance.
I nicely asked for that in the past but was ignored twice. Do I need to ask for it again in a non-nice manner?
Without that information, this patchset is pretty impossible to review.
Quoted 3 lines
However I will probably not be able to write a detailed description for each of the interrupt handlers changed because there are just too many.
Then how do you expect each subsystem / driver author to know if this is an acceptable change or not? How do you expect to educate driver authors to have them determine if they need to do this on their new drivers or not? Are you going to hand-audit each new driver that gets added to the kernel for forever?
Without this type of information, this seems like a futile exercise.
greg k-h
[MODERATED] Encrypted Message
From: Jon Masters <[email protected]>
To: speck for Greg KH <[email protected]>
Subject: Re: [PATCH v6 31/43] MDSv6
Quoted 7 lines · speck for Greg KH
Quoted 3 lines · speck for Andi Kleen
However I will probably not be able to write a detailed description for each of the interrupt handlers changed because there are just too many.
Quoted 7 lines
Then how do you expect each subsystem / driver author to know if this is an acceptable change or not? How do you expect to educate driver authors to have them determine if they need to do this on their new drivers or not? Are you going to hand-audit each new driver that gets added to the kernel for forever?
Without this type of information, this seems like a futile exercise.
Forgive me if I'm being too cautious here, but it seems to make most sense to have the basic MDS infrastructure in place at unembargo. Unless it's very clear how the auto stuff can be safe, and the audit comprehensive, I wonder if that shouldn't just be done after.
Jon.
Signature · 1 line
Computer Architect | Sent with my Fedora powered laptop
Greg KH
maintainer[MODERATED] Re: Encrypted Message
Quoted 18 lines · speck for Jon Masters
From: Jon Masters <[email protected]>
To: speck for Greg KH <[email protected]>
Subject: Re: [PATCH v6 31/43] MDSv6Quoted 13 lines · speck for Greg KH
Quoted 3 lines · speck for Andi Kleen
However I will probably not be able to write a detailed description for each of the interrupt handlers changed because there are just too many.
Then how do you expect each subsystem / driver author to know if this is an acceptable change or not? How do you expect to educate driver authors to have them determine if they need to do this on their new drivers or not? Are you going to hand-audit each new driver that gets added to the kernel for forever?
Quoted 6 lines
Quoted 1 line
Without this type of information, this seems like a futile exercise.
Forgive me if I'm being too cautious here, but it seems to make most sense to have the basic MDS infrastructure in place at unembargo. Unless it's very clear how the auto stuff can be safe, and the audit comprehensive, I wonder if that shouldn't just be done after.
I thought that was what Thomas's patchset provided and is what was alluded to in patch 00/43 of this series.
greg k-h
Greg KH
maintainerQuoted 5 lines · speck for Andi Kleen
From: Andi Kleen <[email protected]>
Subject: mds: Add documentation for clear cpu usageIncluding the theory, and some guide lines for subsystem/driver maintainers.
Ah, I finally found this patch in the pile...
Quoted 48 lines
Signed-off-by Andi Kleen <[email protected]>--- Documentation/clearcpu.txt | 261 +++++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 Documentation/clearcpu.txtDocumentation/clearcpu.txt new file +36
-0@@ -0,0 +1,261 @@ + +Security model for Microarchitectural Data Sampling +=================================================== + +Some CPUs can leave read or written data in internal buffers, +which then later might be sampled through side effects. +For more details see CVE-2018-12126 CVE-2018-12130 CVE-2018-12127 + +This can be avoided by explicitly clearing the CPU state. + +We attempt to avoid leaking data between different processes, +and also some sensitive data, like cryptographic data, to +user space. + +We support three modes: + +(1) mitigation off (mds=off) +(2) clear only when needed (default) +(3) clear on every kernel exit, or guest entry (mds=full) + +(1) and (3) are trivial, the rest of the document discusses (2) + +In general option (3) is the most conservative choice. It does +not make ST assumptions about leaking data. + +Basic requirements and assumptions +---------------------------------- + +Kernel addresses and kernel temporary data are not sensitive. + +User data is sensitive, but only for other processes. + +User data is anything in the user address space, or data buffers +directly copied from/to the user (e.g. read/write). It does not +include metadata, or flag settings. For example packet headers +or file names are not sensitive in this model.
Documentation/clearcpu.txt line 46
Quoted 10 lines
Documentation/clearcpu.txt new file +10
-0+ +Block IO data (but not meta data) is sensitive. + +Most data structures in the kernel are not sensitive. + +Kernel data is sensitive when it involves cryptographic keys. + +We consider data from input devices (such as key presses) +sensitive. We also consider sound data or terminal +data sensitive.
What do you mean by "terminal data"?
And by including stuff like "input devices", I think you need a much better definition of what you are now calling "user data".
You have two types of data now, "sensitive" and "not sensitive". Don't confuse things by trying to say "user", as the data coming from "outside" of the system (i.e. random events) might somehow be classified as "sensitive" in your world view here (i.e. usb random number generators).
Documentation/clearcpu.txt line 48
Quoted 2 lines
Documentation/clearcpu.txt new file +2
-0+We assume that only data actually accessed by the kernel by explicit +instructions can be leaked.
What do you mean by "explicit"? A memcpy? Setting up a DMA channel and processing the data afterward in userspace? Gazing wistfully as it flows through the unipro fabric to and from a camera?
Documentation/clearcpu.txt line 54
Quoted 6 lines
Note that this may not be always
Documentation/clearcpu.txt new file +5
-0+true, in theory prefetching or speculation may touch more. The assumption +is that if any such happens it will be very low bandwidth and hard +to control due to the existing Spectre and other mitigations, +such as memory randomization. If a user is concerned about this they +need to use mds=full.
Let me shorten this paragraph for you:
We really have no idea what data might be touched by the processor or read by anyone else. If you happen to care if some other process on the physical system can read your data, use mds=full.
Is that a better summary?
thanks,
greg k-h
Quoted 3 lines
Then why are you messing around with the usbmon callback? It has nothing to do with anything here. By hooking it here, you now have 2 calls to this function on the USB urb callback path.
Ok so where should it be hooked instead?
Quoted 4 lines
The fact that a root process happens to be watching the USB data flowing through the system, or not, should have no affect on anything here, as the data flow is still the same (with the exception an extra copy in the irq could happen).
My impression was that the usbmon copy is the only copy in interrupt context? Was that wrong? If there's another copy in interrupt context yes it would need to be instrumented too.
Quoted 1 line
As I asked with the hcd change, what is "user data"?
Here's the latest definition from clearcpu.txt
In this case I assume it includes non header data, so would need to be protected.
User data is sensitive, but only for other processes.
User data is anything in the user address space, or data buffers directly copied from/to the user (e.g. read/write). It does not include metadata, or flag settings. For example packet headers or file names are not sensitive in this model.
Block IO data (but not meta data) is sensitive.
We consider data from input devices (such as key presses) sensitive. We also consider sound data or terminal data sensitive.
-Andi
[MODERATED] Encrypted Message
In reply to Greg KHFrom: Jon Masters <[email protected]>
To: speck for Greg KH <[email protected]>
Subject: Re: Encrypted Message
Quoted 21 lines · speck for Greg KH
Quoted 20 lines · speck for Jon Masters
From: Jon Masters <[email protected]>
To: speck for Greg KH <[email protected]>
Subject: Re: [PATCH v6 31/43] MDSv6Quoted 14 lines · speck for Greg KH
Quoted 3 lines · speck for Andi Kleen
However I will probably not be able to write a detailed description for each of the interrupt handlers changed because there are just too many.
Then how do you expect each subsystem / driver author to know if this is an acceptable change or not? How do you expect to educate driver authors to have them determine if they need to do this on their new drivers or not? Are you going to hand-audit each new driver that gets added to the kernel for forever?
Without this type of information, this seems like a futile exercise.
Quoted 7 lines
Quoted 4 lines
Forgive me if I'm being too cautious here, but it seems to make most sense to have the basic MDS infrastructure in place at unembargo. Unless it's very clear how the auto stuff can be safe, and the audit comprehensive, I wonder if that shouldn't just be done after.
I thought that was what Thomas's patchset provided and is what was alluded to in patch 00/43 of this series.
Indeed. I'm asking whether we're trying to figure out the "auto" stuff as well before unembargo or is the other discussion just for planning?
Jon.
Signature · 1 line
Computer Architect | Sent with my Fedora powered laptop
Quoted 37 lines · speck for Greg KH
Quoted 19 lines · speck for Andi Kleen
Quoted 12 lines · speck for Greg KH
Quoted 6 lines · speck for Andi Kleen
From: Andi Kleen <[email protected]>
Subject: mds sweep: Clear cpu for usbmon interceptsusbmon touches user data in interrupts that otherwise don't touch user data. Automatically schedule a clear cpu if usbmon is called from an interrupt.
I have written a long and very satisfying rant about this patch, that I than deleted, as it made me feel very better, but probably would not have helped anyone else out.
Quoted 5 lines
In turn, I need you to properly justify this patch as these two tiny sentences, and this small patch make no sense to me at all. Please explain _WHY_ this is needed in this specific location. Before responding, I would strongly recommend reading up on exactly what usbmon is and who is allowed to use it. If after doing that, you still feel
Quoted 6 lines
Right it's root only.
But this is not about leaking data to the root monitoring user (who can see the data anyways), but to unrelated processes which are not root, but happen to be interrupted by the USB interrupt.
Then why are you messing around with the usbmon callback? It has nothing to do with anything here. By hooking it here, you now have 2 calls to this function on the USB urb callback path.
The fact that a root process happens to be watching the USB data flowing through the system, or not, should have no affect on anything here, as the data flow is still the same (with the exception an extra copy in the irq could happen). Does multiple copys matter or not? I can't find anything in the documentation we have about this, am I missing it?
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
this patch is needed (and it might be, I still can not tell for sure),
Anything that touches user data in an interrupt needs to be marked with the lazy approach.
As I asked with the hcd change, what is "user data"?
FWIW when I started my review of the SCSI drivers (which I'm not super confident about) I was looking for anthing that copied non-meta data that could land in a cache line on all possible code paths while in interrupt context.
My understanding of MDS (which might not be as correct as others) is that the internal uArch buffers (fill, load, store) used when populating the cache lines can leak stale data to a attacking process doing a "sampling" looking for interesting data patterns. Such as secret key's or something. The attacker will need to be lucky and gather data over time but, over time some data could be useful.
Quoted 11 lines
Quoted 1 line
I can write more on this instance.
I nicely asked for that in the past but was ignored twice. Do I need to ask for it again in a non-nice manner?
Without that information, this patchset is pretty impossible to review.
Quoted 3 lines
However I will probably not be able to write a detailed description for each of the interrupt handlers changed because there are just too many.
Quoted 5 lines
Then how do you expect each subsystem / driver author to know if this is an acceptable change or not? How do you expect to educate driver authors to have them determine if they need to do this on their new drivers or not? Are you going to hand-audit each new driver that gets added to the kernel for forever?
Athough Andi's patch does include some Documentation changes that help explain what a driver author needs to look out for I think this approach will be hard to sustain (and backport).
--mark
Quoted 3 lines
Without this type of information, this seems like a futile exercise.
greg k-h
Sorry didn't answer the second part of the message.
Quoted 7 lines · speck for Greg KH
Quoted 4 lines
However I will probably not be able to write a detailed description for each of the interrupt handlers changed because there are just too many.
Then how do you expect each subsystem / driver author to know if this is an acceptable change or not? How do you expect to educate driver
They will need to read clearcpu.txt at some point. They will need to do that anyways to learn what they need to know for future code reviews.
If there's something missing in that file please point it out and I'll try to address it.
In theory we could duplicate clearcpu.txt into every patch, but I don't that would be a good approach
I can perhaps add some standard disclaimer as in "Please see Documentation/clearcpu.txt for more details"
Quoted 3 lines
authors to have them determine if they need to do this on their new drivers or not? Are you going to hand-audit each new driver that gets added to the kernel for forever?
Yes ongoing audit is needed. See 00/00.
That's the drawback of "really lazy".
The earlier "opt in" patch kits didn't need that, but Linus didn't like it.
-Andi
Quoted 5 lines
Quoted 2 lines
Instead of marking all the USB interrupts and timers as clear cpu only clear it when the user data touching actually happens.
Um, almost all irqs here _do_ receive data across the wire, and your patch shows this happening. The text here is all wrong.
Just to be clear touching here it means "access with the CPU" especially copying. Just manipulating data addresses is fine.
Quoted 4 lines
Also, why are you classifying USB data as "user data"? It's coming from some random piece of hardware. I don't see a definition of what you are calling "user data" anywhere in this patchset, did I miss that somewhere?
user data includes IO data (but not metadata)
USB could be key presses (e.g. your password) or mouse movements or block IO data
These are all considered sensitive.
-Andi