diff options
-rw-r--r-- | arch/s390/include/asm/compat.h | 7 | ||||
-rw-r--r-- | arch/s390/kernel/process.c | 1 | ||||
-rw-r--r-- | arch/s390/kernel/ptrace.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/signal.c | 1 | ||||
-rw-r--r-- | arch/s390/mm/fault.c | 1 | ||||
-rw-r--r-- | arch/s390/mm/mmap.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/intel_cacheinfo.c | 44 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_amd.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/entry_64.S | 9 | ||||
-rw-r--r-- | arch/x86/kernel/microcode_amd.c | 1 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 2 | ||||
-rw-r--r-- | drivers/s390/block/dasd_ioctl.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/fs3270.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/vmcp.c | 1 | ||||
-rw-r--r-- | drivers/s390/cio/chsc_sch.c | 1 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_cfdc.c | 1 | ||||
-rw-r--r-- | include/trace/events/sched.h | 50 | ||||
-rw-r--r-- | kernel/irq/autoprobe.c | 4 | ||||
-rw-r--r-- | kernel/irq/chip.c | 42 | ||||
-rw-r--r-- | kernel/irq/internals.h | 2 | ||||
-rw-r--r-- | kernel/irq/manage.c | 2 | ||||
-rw-r--r-- | kernel/sched/core.c | 1 | ||||
-rw-r--r-- | kernel/sched/fair.c | 2 |
24 files changed, 94 insertions, 88 deletions
diff --git a/arch/s390/include/asm/compat.h b/arch/s390/include/asm/compat.h index 2e49748b27da..234f1d859cea 100644 --- a/arch/s390/include/asm/compat.h +++ b/arch/s390/include/asm/compat.h | |||
@@ -172,13 +172,6 @@ static inline int is_compat_task(void) | |||
172 | return is_32bit_task(); | 172 | return is_32bit_task(); |
173 | } | 173 | } |
174 | 174 | ||
175 | #else | ||
176 | |||
177 | static inline int is_compat_task(void) | ||
178 | { | ||
179 | return 0; | ||
180 | } | ||
181 | |||
182 | #endif | 175 | #endif |
183 | 176 | ||
184 | static inline void __user *arch_compat_alloc_user_space(long len) | 177 | static inline void __user *arch_compat_alloc_user_space(long len) |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 4261aa799774..e795933eb2cb 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
30 | #include <asm/timer.h> | 30 | #include <asm/timer.h> |
31 | #include <asm/nmi.h> | 31 | #include <asm/nmi.h> |
32 | #include <asm/compat.h> | ||
33 | #include <asm/smp.h> | 32 | #include <asm/smp.h> |
34 | #include "entry.h" | 33 | #include "entry.h" |
35 | 34 | ||
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 9d82ed4bcb27..61f95489d70c 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -20,8 +20,8 @@ | |||
20 | #include <linux/regset.h> | 20 | #include <linux/regset.h> |
21 | #include <linux/tracehook.h> | 21 | #include <linux/tracehook.h> |
22 | #include <linux/seccomp.h> | 22 | #include <linux/seccomp.h> |
23 | #include <linux/compat.h> | ||
23 | #include <trace/syscall.h> | 24 | #include <trace/syscall.h> |
24 | #include <asm/compat.h> | ||
25 | #include <asm/segment.h> | 25 | #include <asm/segment.h> |
26 | #include <asm/page.h> | 26 | #include <asm/page.h> |
27 | #include <asm/pgtable.h> | 27 | #include <asm/pgtable.h> |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 354de0763eff..3b2efc81f34e 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/kexec.h> | 46 | #include <linux/kexec.h> |
47 | #include <linux/crash_dump.h> | 47 | #include <linux/crash_dump.h> |
48 | #include <linux/memory.h> | 48 | #include <linux/memory.h> |
49 | #include <linux/compat.h> | ||
49 | 50 | ||
50 | #include <asm/ipl.h> | 51 | #include <asm/ipl.h> |
51 | #include <asm/uaccess.h> | 52 | #include <asm/uaccess.h> |
@@ -59,7 +60,6 @@ | |||
59 | #include <asm/ptrace.h> | 60 | #include <asm/ptrace.h> |
60 | #include <asm/sections.h> | 61 | #include <asm/sections.h> |
61 | #include <asm/ebcdic.h> | 62 | #include <asm/ebcdic.h> |
62 | #include <asm/compat.h> | ||
63 | #include <asm/kvm_virtio.h> | 63 | #include <asm/kvm_virtio.h> |
64 | #include <asm/diag.h> | 64 | #include <asm/diag.h> |
65 | 65 | ||
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index a8ba840294ff..2d421d90fada 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/ucontext.h> | 30 | #include <asm/ucontext.h> |
31 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
32 | #include <asm/lowcore.h> | 32 | #include <asm/lowcore.h> |
33 | #include <asm/compat.h> | ||
34 | #include "entry.h" | 33 | #include "entry.h" |
35 | 34 | ||
36 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 35 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 354dd39073ef..e8fcd928dc78 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/pgtable.h> | 36 | #include <asm/pgtable.h> |
37 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
38 | #include <asm/mmu_context.h> | 38 | #include <asm/mmu_context.h> |
39 | #include <asm/compat.h> | ||
40 | #include "../kernel/entry.h" | 39 | #include "../kernel/entry.h" |
41 | 40 | ||
42 | #ifndef CONFIG_64BIT | 41 | #ifndef CONFIG_64BIT |
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c index f09c74881b7e..a0155c02e324 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c | |||
@@ -29,8 +29,8 @@ | |||
29 | #include <linux/mman.h> | 29 | #include <linux/mman.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/random.h> | 31 | #include <linux/random.h> |
32 | #include <linux/compat.h> | ||
32 | #include <asm/pgalloc.h> | 33 | #include <asm/pgalloc.h> |
33 | #include <asm/compat.h> | ||
34 | 34 | ||
35 | static unsigned long stack_maxrandom_size(void) | 35 | static unsigned long stack_maxrandom_size(void) |
36 | { | 36 | { |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 6b45e5e7a901..73d08ed98a64 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -326,8 +326,7 @@ static void __cpuinit amd_calc_l3_indices(struct amd_northbridge *nb) | |||
326 | l3->indices = (max(max3(sc0, sc1, sc2), sc3) << 10) - 1; | 326 | l3->indices = (max(max3(sc0, sc1, sc2), sc3) << 10) - 1; |
327 | } | 327 | } |
328 | 328 | ||
329 | static void __cpuinit amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf, | 329 | static void __cpuinit amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf, int index) |
330 | int index) | ||
331 | { | 330 | { |
332 | int node; | 331 | int node; |
333 | 332 | ||
@@ -725,14 +724,16 @@ static DEFINE_PER_CPU(struct _cpuid4_info *, ici_cpuid4_info); | |||
725 | #define CPUID4_INFO_IDX(x, y) (&((per_cpu(ici_cpuid4_info, x))[y])) | 724 | #define CPUID4_INFO_IDX(x, y) (&((per_cpu(ici_cpuid4_info, x))[y])) |
726 | 725 | ||
727 | #ifdef CONFIG_SMP | 726 | #ifdef CONFIG_SMP |
728 | static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | 727 | |
728 | static int __cpuinit cache_shared_amd_cpu_map_setup(unsigned int cpu, int index) | ||
729 | { | 729 | { |
730 | struct _cpuid4_info *this_leaf, *sibling_leaf; | 730 | struct _cpuid4_info *this_leaf; |
731 | unsigned long num_threads_sharing; | 731 | int ret, i, sibling; |
732 | int index_msb, i, sibling; | ||
733 | struct cpuinfo_x86 *c = &cpu_data(cpu); | 732 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
734 | 733 | ||
735 | if ((index == 3) && (c->x86_vendor == X86_VENDOR_AMD)) { | 734 | ret = 0; |
735 | if (index == 3) { | ||
736 | ret = 1; | ||
736 | for_each_cpu(i, cpu_llc_shared_mask(cpu)) { | 737 | for_each_cpu(i, cpu_llc_shared_mask(cpu)) { |
737 | if (!per_cpu(ici_cpuid4_info, i)) | 738 | if (!per_cpu(ici_cpuid4_info, i)) |
738 | continue; | 739 | continue; |
@@ -743,8 +744,35 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | |||
743 | set_bit(sibling, this_leaf->shared_cpu_map); | 744 | set_bit(sibling, this_leaf->shared_cpu_map); |
744 | } | 745 | } |
745 | } | 746 | } |
746 | return; | 747 | } else if ((c->x86 == 0x15) && ((index == 1) || (index == 2))) { |
748 | ret = 1; | ||
749 | for_each_cpu(i, cpu_sibling_mask(cpu)) { | ||
750 | if (!per_cpu(ici_cpuid4_info, i)) | ||
751 | continue; | ||
752 | this_leaf = CPUID4_INFO_IDX(i, index); | ||
753 | for_each_cpu(sibling, cpu_sibling_mask(cpu)) { | ||
754 | if (!cpu_online(sibling)) | ||
755 | continue; | ||
756 | set_bit(sibling, this_leaf->shared_cpu_map); | ||
757 | } | ||
758 | } | ||
747 | } | 759 | } |
760 | |||
761 | return ret; | ||
762 | } | ||
763 | |||
764 | static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | ||
765 | { | ||
766 | struct _cpuid4_info *this_leaf, *sibling_leaf; | ||
767 | unsigned long num_threads_sharing; | ||
768 | int index_msb, i; | ||
769 | struct cpuinfo_x86 *c = &cpu_data(cpu); | ||
770 | |||
771 | if (c->x86_vendor == X86_VENDOR_AMD) { | ||
772 | if (cache_shared_amd_cpu_map_setup(cpu, index)) | ||
773 | return; | ||
774 | } | ||
775 | |||
748 | this_leaf = CPUID4_INFO_IDX(cpu, index); | 776 | this_leaf = CPUID4_INFO_IDX(cpu, index); |
749 | num_threads_sharing = 1 + this_leaf->base.eax.split.num_threads_sharing; | 777 | num_threads_sharing = 1 + this_leaf->base.eax.split.num_threads_sharing; |
750 | 778 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index 786e76a86322..e4eeaaf58a47 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c | |||
@@ -528,6 +528,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) | |||
528 | 528 | ||
529 | sprintf(name, "threshold_bank%i", bank); | 529 | sprintf(name, "threshold_bank%i", bank); |
530 | 530 | ||
531 | #ifdef CONFIG_SMP | ||
531 | if (cpu_data(cpu).cpu_core_id && shared_bank[bank]) { /* symlink */ | 532 | if (cpu_data(cpu).cpu_core_id && shared_bank[bank]) { /* symlink */ |
532 | i = cpumask_first(cpu_llc_shared_mask(cpu)); | 533 | i = cpumask_first(cpu_llc_shared_mask(cpu)); |
533 | 534 | ||
@@ -553,6 +554,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) | |||
553 | 554 | ||
554 | goto out; | 555 | goto out; |
555 | } | 556 | } |
557 | #endif | ||
556 | 558 | ||
557 | b = kzalloc(sizeof(struct threshold_bank), GFP_KERNEL); | 559 | b = kzalloc(sizeof(struct threshold_bank), GFP_KERNEL); |
558 | if (!b) { | 560 | if (!b) { |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 3fe8239fd8fb..1333d9851778 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -1532,10 +1532,17 @@ ENTRY(nmi) | |||
1532 | pushq_cfi %rdx | 1532 | pushq_cfi %rdx |
1533 | 1533 | ||
1534 | /* | 1534 | /* |
1535 | * If %cs was not the kernel segment, then the NMI triggered in user | ||
1536 | * space, which means it is definitely not nested. | ||
1537 | */ | ||
1538 | cmpl $__KERNEL_CS, 16(%rsp) | ||
1539 | jne first_nmi | ||
1540 | |||
1541 | /* | ||
1535 | * Check the special variable on the stack to see if NMIs are | 1542 | * Check the special variable on the stack to see if NMIs are |
1536 | * executing. | 1543 | * executing. |
1537 | */ | 1544 | */ |
1538 | cmp $1, -8(%rsp) | 1545 | cmpl $1, -8(%rsp) |
1539 | je nested_nmi | 1546 | je nested_nmi |
1540 | 1547 | ||
1541 | /* | 1548 | /* |
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index ac0417be9131..73465aab28f8 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c | |||
@@ -360,7 +360,6 @@ out: | |||
360 | static enum ucode_state | 360 | static enum ucode_state |
361 | request_microcode_user(int cpu, const void __user *buf, size_t size) | 361 | request_microcode_user(int cpu, const void __user *buf, size_t size) |
362 | { | 362 | { |
363 | pr_info("AMD microcode update via /dev/cpu/microcode not supported\n"); | ||
364 | return UCODE_ERROR; | 363 | return UCODE_ERROR; |
365 | } | 364 | } |
366 | 365 | ||
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 70880be26015..2617b1ed4709 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -18,12 +18,12 @@ | |||
18 | #include <linux/hdreg.h> /* HDIO_GETGEO */ | 18 | #include <linux/hdreg.h> /* HDIO_GETGEO */ |
19 | #include <linux/bio.h> | 19 | #include <linux/bio.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/compat.h> | ||
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
22 | 23 | ||
23 | #include <asm/debug.h> | 24 | #include <asm/debug.h> |
24 | #include <asm/idals.h> | 25 | #include <asm/idals.h> |
25 | #include <asm/ebcdic.h> | 26 | #include <asm/ebcdic.h> |
26 | #include <asm/compat.h> | ||
27 | #include <asm/io.h> | 27 | #include <asm/io.h> |
28 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
29 | #include <asm/cio.h> | 29 | #include <asm/cio.h> |
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index f1a2016829fc..792c69e78fe2 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #define KMSG_COMPONENT "dasd" | 13 | #define KMSG_COMPONENT "dasd" |
14 | 14 | ||
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/compat.h> | ||
16 | #include <linux/major.h> | 17 | #include <linux/major.h> |
17 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
18 | #include <linux/blkpg.h> | 19 | #include <linux/blkpg.h> |
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c index e71298158f9e..911704571b9c 100644 --- a/drivers/s390/char/fs3270.c +++ b/drivers/s390/char/fs3270.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/console.h> | 11 | #include <linux/console.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/compat.h> | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/list.h> | 16 | #include <linux/list.h> |
16 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c index 75bde6a8b7dc..89c03e6b1c0c 100644 --- a/drivers/s390/char/vmcp.c +++ b/drivers/s390/char/vmcp.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/compat.h> | ||
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
17 | #include <linux/miscdevice.h> | 18 | #include <linux/miscdevice.h> |
18 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
diff --git a/drivers/s390/cio/chsc_sch.c b/drivers/s390/cio/chsc_sch.c index 0c87b0fc7714..8f9a1a384496 100644 --- a/drivers/s390/cio/chsc_sch.c +++ b/drivers/s390/cio/chsc_sch.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/compat.h> | ||
11 | #include <linux/device.h> | 12 | #include <linux/device.h> |
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/uaccess.h> | 14 | #include <linux/uaccess.h> |
diff --git a/drivers/s390/scsi/zfcp_cfdc.c b/drivers/s390/scsi/zfcp_cfdc.c index 303dde09d294..fab2c2592a97 100644 --- a/drivers/s390/scsi/zfcp_cfdc.c +++ b/drivers/s390/scsi/zfcp_cfdc.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #define KMSG_COMPONENT "zfcp" | 11 | #define KMSG_COMPONENT "zfcp" |
12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
13 | 13 | ||
14 | #include <linux/compat.h> | ||
14 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
15 | #include <linux/types.h> | 16 | #include <linux/types.h> |
16 | #include <linux/miscdevice.h> | 17 | #include <linux/miscdevice.h> |
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 6ba596b07a72..e33ed1bfa113 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -370,56 +370,6 @@ TRACE_EVENT(sched_stat_runtime, | |||
370 | (unsigned long long)__entry->vruntime) | 370 | (unsigned long long)__entry->vruntime) |
371 | ); | 371 | ); |
372 | 372 | ||
373 | #ifdef CREATE_TRACE_POINTS | ||
374 | static inline u64 trace_get_sleeptime(struct task_struct *tsk) | ||
375 | { | ||
376 | #ifdef CONFIG_SCHEDSTATS | ||
377 | u64 block, sleep; | ||
378 | |||
379 | block = tsk->se.statistics.block_start; | ||
380 | sleep = tsk->se.statistics.sleep_start; | ||
381 | tsk->se.statistics.block_start = 0; | ||
382 | tsk->se.statistics.sleep_start = 0; | ||
383 | |||
384 | return block ? block : sleep ? sleep : 0; | ||
385 | #else | ||
386 | return 0; | ||
387 | #endif | ||
388 | } | ||
389 | #endif | ||
390 | |||
391 | /* | ||
392 | * Tracepoint for accounting sleeptime (time the task is sleeping | ||
393 | * or waiting for I/O). | ||
394 | */ | ||
395 | TRACE_EVENT(sched_stat_sleeptime, | ||
396 | |||
397 | TP_PROTO(struct task_struct *tsk, u64 now), | ||
398 | |||
399 | TP_ARGS(tsk, now), | ||
400 | |||
401 | TP_STRUCT__entry( | ||
402 | __array( char, comm, TASK_COMM_LEN ) | ||
403 | __field( pid_t, pid ) | ||
404 | __field( u64, sleeptime ) | ||
405 | ), | ||
406 | |||
407 | TP_fast_assign( | ||
408 | memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); | ||
409 | __entry->pid = tsk->pid; | ||
410 | __entry->sleeptime = trace_get_sleeptime(tsk); | ||
411 | __entry->sleeptime = __entry->sleeptime ? | ||
412 | now - __entry->sleeptime : 0; | ||
413 | ) | ||
414 | TP_perf_assign( | ||
415 | __perf_count(__entry->sleeptime); | ||
416 | ), | ||
417 | |||
418 | TP_printk("comm=%s pid=%d sleeptime=%Lu [ns]", | ||
419 | __entry->comm, __entry->pid, | ||
420 | (unsigned long long)__entry->sleeptime) | ||
421 | ); | ||
422 | |||
423 | /* | 373 | /* |
424 | * Tracepoint for showing priority inheritance modifying a tasks | 374 | * Tracepoint for showing priority inheritance modifying a tasks |
425 | * priority. | 375 | * priority. |
diff --git a/kernel/irq/autoprobe.c b/kernel/irq/autoprobe.c index 342d8f44e401..0119b9d467ae 100644 --- a/kernel/irq/autoprobe.c +++ b/kernel/irq/autoprobe.c | |||
@@ -53,7 +53,7 @@ unsigned long probe_irq_on(void) | |||
53 | if (desc->irq_data.chip->irq_set_type) | 53 | if (desc->irq_data.chip->irq_set_type) |
54 | desc->irq_data.chip->irq_set_type(&desc->irq_data, | 54 | desc->irq_data.chip->irq_set_type(&desc->irq_data, |
55 | IRQ_TYPE_PROBE); | 55 | IRQ_TYPE_PROBE); |
56 | irq_startup(desc); | 56 | irq_startup(desc, false); |
57 | } | 57 | } |
58 | raw_spin_unlock_irq(&desc->lock); | 58 | raw_spin_unlock_irq(&desc->lock); |
59 | } | 59 | } |
@@ -70,7 +70,7 @@ unsigned long probe_irq_on(void) | |||
70 | raw_spin_lock_irq(&desc->lock); | 70 | raw_spin_lock_irq(&desc->lock); |
71 | if (!desc->action && irq_settings_can_probe(desc)) { | 71 | if (!desc->action && irq_settings_can_probe(desc)) { |
72 | desc->istate |= IRQS_AUTODETECT | IRQS_WAITING; | 72 | desc->istate |= IRQS_AUTODETECT | IRQS_WAITING; |
73 | if (irq_startup(desc)) | 73 | if (irq_startup(desc, false)) |
74 | desc->istate |= IRQS_PENDING; | 74 | desc->istate |= IRQS_PENDING; |
75 | } | 75 | } |
76 | raw_spin_unlock_irq(&desc->lock); | 76 | raw_spin_unlock_irq(&desc->lock); |
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index f7c543a801d9..fb7db75ee0c8 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -157,19 +157,22 @@ static void irq_state_set_masked(struct irq_desc *desc) | |||
157 | irqd_set(&desc->irq_data, IRQD_IRQ_MASKED); | 157 | irqd_set(&desc->irq_data, IRQD_IRQ_MASKED); |
158 | } | 158 | } |
159 | 159 | ||
160 | int irq_startup(struct irq_desc *desc) | 160 | int irq_startup(struct irq_desc *desc, bool resend) |
161 | { | 161 | { |
162 | int ret = 0; | ||
163 | |||
162 | irq_state_clr_disabled(desc); | 164 | irq_state_clr_disabled(desc); |
163 | desc->depth = 0; | 165 | desc->depth = 0; |
164 | 166 | ||
165 | if (desc->irq_data.chip->irq_startup) { | 167 | if (desc->irq_data.chip->irq_startup) { |
166 | int ret = desc->irq_data.chip->irq_startup(&desc->irq_data); | 168 | ret = desc->irq_data.chip->irq_startup(&desc->irq_data); |
167 | irq_state_clr_masked(desc); | 169 | irq_state_clr_masked(desc); |
168 | return ret; | 170 | } else { |
171 | irq_enable(desc); | ||
169 | } | 172 | } |
170 | 173 | if (resend) | |
171 | irq_enable(desc); | 174 | check_irq_resend(desc, desc->irq_data.irq); |
172 | return 0; | 175 | return ret; |
173 | } | 176 | } |
174 | 177 | ||
175 | void irq_shutdown(struct irq_desc *desc) | 178 | void irq_shutdown(struct irq_desc *desc) |
@@ -330,6 +333,24 @@ out_unlock: | |||
330 | } | 333 | } |
331 | EXPORT_SYMBOL_GPL(handle_simple_irq); | 334 | EXPORT_SYMBOL_GPL(handle_simple_irq); |
332 | 335 | ||
336 | /* | ||
337 | * Called unconditionally from handle_level_irq() and only for oneshot | ||
338 | * interrupts from handle_fasteoi_irq() | ||
339 | */ | ||
340 | static void cond_unmask_irq(struct irq_desc *desc) | ||
341 | { | ||
342 | /* | ||
343 | * We need to unmask in the following cases: | ||
344 | * - Standard level irq (IRQF_ONESHOT is not set) | ||
345 | * - Oneshot irq which did not wake the thread (caused by a | ||
346 | * spurious interrupt or a primary handler handling it | ||
347 | * completely). | ||
348 | */ | ||
349 | if (!irqd_irq_disabled(&desc->irq_data) && | ||
350 | irqd_irq_masked(&desc->irq_data) && !desc->threads_oneshot) | ||
351 | unmask_irq(desc); | ||
352 | } | ||
353 | |||
333 | /** | 354 | /** |
334 | * handle_level_irq - Level type irq handler | 355 | * handle_level_irq - Level type irq handler |
335 | * @irq: the interrupt number | 356 | * @irq: the interrupt number |
@@ -362,8 +383,8 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc) | |||
362 | 383 | ||
363 | handle_irq_event(desc); | 384 | handle_irq_event(desc); |
364 | 385 | ||
365 | if (!irqd_irq_disabled(&desc->irq_data) && !(desc->istate & IRQS_ONESHOT)) | 386 | cond_unmask_irq(desc); |
366 | unmask_irq(desc); | 387 | |
367 | out_unlock: | 388 | out_unlock: |
368 | raw_spin_unlock(&desc->lock); | 389 | raw_spin_unlock(&desc->lock); |
369 | } | 390 | } |
@@ -417,6 +438,9 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) | |||
417 | preflow_handler(desc); | 438 | preflow_handler(desc); |
418 | handle_irq_event(desc); | 439 | handle_irq_event(desc); |
419 | 440 | ||
441 | if (desc->istate & IRQS_ONESHOT) | ||
442 | cond_unmask_irq(desc); | ||
443 | |||
420 | out_eoi: | 444 | out_eoi: |
421 | desc->irq_data.chip->irq_eoi(&desc->irq_data); | 445 | desc->irq_data.chip->irq_eoi(&desc->irq_data); |
422 | out_unlock: | 446 | out_unlock: |
@@ -625,7 +649,7 @@ __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | |||
625 | irq_settings_set_noprobe(desc); | 649 | irq_settings_set_noprobe(desc); |
626 | irq_settings_set_norequest(desc); | 650 | irq_settings_set_norequest(desc); |
627 | irq_settings_set_nothread(desc); | 651 | irq_settings_set_nothread(desc); |
628 | irq_startup(desc); | 652 | irq_startup(desc, true); |
629 | } | 653 | } |
630 | out: | 654 | out: |
631 | irq_put_desc_busunlock(desc, flags); | 655 | irq_put_desc_busunlock(desc, flags); |
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index b7952316016a..40378ff877e7 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h | |||
@@ -67,7 +67,7 @@ extern int __irq_set_trigger(struct irq_desc *desc, unsigned int irq, | |||
67 | extern void __disable_irq(struct irq_desc *desc, unsigned int irq, bool susp); | 67 | extern void __disable_irq(struct irq_desc *desc, unsigned int irq, bool susp); |
68 | extern void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume); | 68 | extern void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume); |
69 | 69 | ||
70 | extern int irq_startup(struct irq_desc *desc); | 70 | extern int irq_startup(struct irq_desc *desc, bool resend); |
71 | extern void irq_shutdown(struct irq_desc *desc); | 71 | extern void irq_shutdown(struct irq_desc *desc); |
72 | extern void irq_enable(struct irq_desc *desc); | 72 | extern void irq_enable(struct irq_desc *desc); |
73 | extern void irq_disable(struct irq_desc *desc); | 73 | extern void irq_disable(struct irq_desc *desc); |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index a9a9dbe49fea..32313c084442 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -1027,7 +1027,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | |||
1027 | desc->istate |= IRQS_ONESHOT; | 1027 | desc->istate |= IRQS_ONESHOT; |
1028 | 1028 | ||
1029 | if (irq_settings_can_autoenable(desc)) | 1029 | if (irq_settings_can_autoenable(desc)) |
1030 | irq_startup(desc); | 1030 | irq_startup(desc, true); |
1031 | else | 1031 | else |
1032 | /* Undo nested disables: */ | 1032 | /* Undo nested disables: */ |
1033 | desc->depth = 1; | 1033 | desc->depth = 1; |
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 5255c9d2e053..b342f57879e6 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -1932,7 +1932,6 @@ static void finish_task_switch(struct rq *rq, struct task_struct *prev) | |||
1932 | local_irq_enable(); | 1932 | local_irq_enable(); |
1933 | #endif /* __ARCH_WANT_INTERRUPTS_ON_CTXSW */ | 1933 | #endif /* __ARCH_WANT_INTERRUPTS_ON_CTXSW */ |
1934 | finish_lock_switch(rq, prev); | 1934 | finish_lock_switch(rq, prev); |
1935 | trace_sched_stat_sleeptime(current, rq->clock); | ||
1936 | 1935 | ||
1937 | fire_sched_in_preempt_notifiers(current); | 1936 | fire_sched_in_preempt_notifiers(current); |
1938 | if (mm) | 1937 | if (mm) |
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7c6414fc669d..aca16b843b7e 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -1003,6 +1003,7 @@ static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se) | |||
1003 | if (unlikely(delta > se->statistics.sleep_max)) | 1003 | if (unlikely(delta > se->statistics.sleep_max)) |
1004 | se->statistics.sleep_max = delta; | 1004 | se->statistics.sleep_max = delta; |
1005 | 1005 | ||
1006 | se->statistics.sleep_start = 0; | ||
1006 | se->statistics.sum_sleep_runtime += delta; | 1007 | se->statistics.sum_sleep_runtime += delta; |
1007 | 1008 | ||
1008 | if (tsk) { | 1009 | if (tsk) { |
@@ -1019,6 +1020,7 @@ static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se) | |||
1019 | if (unlikely(delta > se->statistics.block_max)) | 1020 | if (unlikely(delta > se->statistics.block_max)) |
1020 | se->statistics.block_max = delta; | 1021 | se->statistics.block_max = delta; |
1021 | 1022 | ||
1023 | se->statistics.block_start = 0; | ||
1022 | se->statistics.sum_sleep_runtime += delta; | 1024 | se->statistics.sum_sleep_runtime += delta; |
1023 | 1025 | ||
1024 | if (tsk) { | 1026 | if (tsk) { |