diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-10-29 06:23:32 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-10-29 06:23:32 -0400 |
commit | aac898548d04c7bff179b79f805874b0d6f87571 (patch) | |
tree | e8de975fd5de6c95bf4329861a872dbcfe0c7ead /arch | |
parent | 2f5e98802350627ad6f2e3cee4d177059fc0c2f2 (diff) | |
parent | cd65718712469ad844467250e8fad20a5838baae (diff) |
Merge branch 'perf/urgent' into perf/core
Conflicts:
tools/perf/builtin-record.c
tools/perf/builtin-top.c
tools/perf/util/hist.h
Diffstat (limited to 'arch')
32 files changed, 168 insertions, 71 deletions
diff --git a/arch/arm/boot/dts/integratorcp.dts b/arch/arm/boot/dts/integratorcp.dts index ff1aea0ee043..72693a69f830 100644 --- a/arch/arm/boot/dts/integratorcp.dts +++ b/arch/arm/boot/dts/integratorcp.dts | |||
@@ -9,11 +9,6 @@ | |||
9 | model = "ARM Integrator/CP"; | 9 | model = "ARM Integrator/CP"; |
10 | compatible = "arm,integrator-cp"; | 10 | compatible = "arm,integrator-cp"; |
11 | 11 | ||
12 | aliases { | ||
13 | arm,timer-primary = &timer2; | ||
14 | arm,timer-secondary = &timer1; | ||
15 | }; | ||
16 | |||
17 | chosen { | 12 | chosen { |
18 | bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk"; | 13 | bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk"; |
19 | }; | 14 | }; |
@@ -24,14 +19,18 @@ | |||
24 | }; | 19 | }; |
25 | 20 | ||
26 | timer0: timer@13000000 { | 21 | timer0: timer@13000000 { |
22 | /* TIMER0 runs @ 25MHz */ | ||
27 | compatible = "arm,integrator-cp-timer"; | 23 | compatible = "arm,integrator-cp-timer"; |
24 | status = "disabled"; | ||
28 | }; | 25 | }; |
29 | 26 | ||
30 | timer1: timer@13000100 { | 27 | timer1: timer@13000100 { |
28 | /* TIMER1 runs @ 1MHz */ | ||
31 | compatible = "arm,integrator-cp-timer"; | 29 | compatible = "arm,integrator-cp-timer"; |
32 | }; | 30 | }; |
33 | 31 | ||
34 | timer2: timer@13000200 { | 32 | timer2: timer@13000200 { |
33 | /* TIMER2 runs @ 1MHz */ | ||
35 | compatible = "arm,integrator-cp-timer"; | 34 | compatible = "arm,integrator-cp-timer"; |
36 | }; | 35 | }; |
37 | 36 | ||
diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c index 370236dd1a03..990250965f2c 100644 --- a/arch/arm/common/mcpm_entry.c +++ b/arch/arm/common/mcpm_entry.c | |||
@@ -51,7 +51,8 @@ void mcpm_cpu_power_down(void) | |||
51 | { | 51 | { |
52 | phys_reset_t phys_reset; | 52 | phys_reset_t phys_reset; |
53 | 53 | ||
54 | BUG_ON(!platform_ops); | 54 | if (WARN_ON_ONCE(!platform_ops || !platform_ops->power_down)) |
55 | return; | ||
55 | BUG_ON(!irqs_disabled()); | 56 | BUG_ON(!irqs_disabled()); |
56 | 57 | ||
57 | /* | 58 | /* |
@@ -93,7 +94,8 @@ void mcpm_cpu_suspend(u64 expected_residency) | |||
93 | { | 94 | { |
94 | phys_reset_t phys_reset; | 95 | phys_reset_t phys_reset; |
95 | 96 | ||
96 | BUG_ON(!platform_ops); | 97 | if (WARN_ON_ONCE(!platform_ops || !platform_ops->suspend)) |
98 | return; | ||
97 | BUG_ON(!irqs_disabled()); | 99 | BUG_ON(!irqs_disabled()); |
98 | 100 | ||
99 | /* Very similar to mcpm_cpu_power_down() */ | 101 | /* Very similar to mcpm_cpu_power_down() */ |
diff --git a/arch/arm/common/sharpsl_param.c b/arch/arm/common/sharpsl_param.c index d56c932580eb..025f6ce38596 100644 --- a/arch/arm/common/sharpsl_param.c +++ b/arch/arm/common/sharpsl_param.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <asm/mach/sharpsl_param.h> | 17 | #include <asm/mach/sharpsl_param.h> |
18 | #include <asm/memory.h> | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * Certain hardware parameters determined at the time of device manufacture, | 21 | * Certain hardware parameters determined at the time of device manufacture, |
@@ -25,8 +26,10 @@ | |||
25 | */ | 26 | */ |
26 | #ifdef CONFIG_ARCH_SA1100 | 27 | #ifdef CONFIG_ARCH_SA1100 |
27 | #define PARAM_BASE 0xe8ffc000 | 28 | #define PARAM_BASE 0xe8ffc000 |
29 | #define param_start(x) (void *)(x) | ||
28 | #else | 30 | #else |
29 | #define PARAM_BASE 0xa0000a00 | 31 | #define PARAM_BASE 0xa0000a00 |
32 | #define param_start(x) __va(x) | ||
30 | #endif | 33 | #endif |
31 | #define MAGIC_CHG(a,b,c,d) ( ( d << 24 ) | ( c << 16 ) | ( b << 8 ) | a ) | 34 | #define MAGIC_CHG(a,b,c,d) ( ( d << 24 ) | ( c << 16 ) | ( b << 8 ) | a ) |
32 | 35 | ||
@@ -41,7 +44,7 @@ EXPORT_SYMBOL(sharpsl_param); | |||
41 | 44 | ||
42 | void sharpsl_save_param(void) | 45 | void sharpsl_save_param(void) |
43 | { | 46 | { |
44 | memcpy(&sharpsl_param, (void *)PARAM_BASE, sizeof(struct sharpsl_param_info)); | 47 | memcpy(&sharpsl_param, param_start(PARAM_BASE), sizeof(struct sharpsl_param_info)); |
45 | 48 | ||
46 | if (sharpsl_param.comadj_keyword != COMADJ_MAGIC) | 49 | if (sharpsl_param.comadj_keyword != COMADJ_MAGIC) |
47 | sharpsl_param.comadj=-1; | 50 | sharpsl_param.comadj=-1; |
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild index d3db39860b9c..59ceae8f3c95 100644 --- a/arch/arm/include/asm/Kbuild +++ b/arch/arm/include/asm/Kbuild | |||
@@ -31,5 +31,4 @@ generic-y += termbits.h | |||
31 | generic-y += termios.h | 31 | generic-y += termios.h |
32 | generic-y += timex.h | 32 | generic-y += timex.h |
33 | generic-y += trace_clock.h | 33 | generic-y += trace_clock.h |
34 | generic-y += types.h | ||
35 | generic-y += unaligned.h | 34 | generic-y += unaligned.h |
diff --git a/arch/arm/include/asm/mcpm.h b/arch/arm/include/asm/mcpm.h index 0f7b7620e9a5..fc82a88f5b69 100644 --- a/arch/arm/include/asm/mcpm.h +++ b/arch/arm/include/asm/mcpm.h | |||
@@ -76,8 +76,11 @@ int mcpm_cpu_power_up(unsigned int cpu, unsigned int cluster); | |||
76 | * | 76 | * |
77 | * This must be called with interrupts disabled. | 77 | * This must be called with interrupts disabled. |
78 | * | 78 | * |
79 | * This does not return. Re-entry in the kernel is expected via | 79 | * On success this does not return. Re-entry in the kernel is expected |
80 | * mcpm_entry_point. | 80 | * via mcpm_entry_point. |
81 | * | ||
82 | * This will return if mcpm_platform_register() has not been called | ||
83 | * previously in which case the caller should take appropriate action. | ||
81 | */ | 84 | */ |
82 | void mcpm_cpu_power_down(void); | 85 | void mcpm_cpu_power_down(void); |
83 | 86 | ||
@@ -98,8 +101,11 @@ void mcpm_cpu_power_down(void); | |||
98 | * | 101 | * |
99 | * This must be called with interrupts disabled. | 102 | * This must be called with interrupts disabled. |
100 | * | 103 | * |
101 | * This does not return. Re-entry in the kernel is expected via | 104 | * On success this does not return. Re-entry in the kernel is expected |
102 | * mcpm_entry_point. | 105 | * via mcpm_entry_point. |
106 | * | ||
107 | * This will return if mcpm_platform_register() has not been called | ||
108 | * previously in which case the caller should take appropriate action. | ||
103 | */ | 109 | */ |
104 | void mcpm_cpu_suspend(u64 expected_residency); | 110 | void mcpm_cpu_suspend(u64 expected_residency); |
105 | 111 | ||
diff --git a/arch/arm/include/asm/syscall.h b/arch/arm/include/asm/syscall.h index f1d96d4e8092..73ddd7239b33 100644 --- a/arch/arm/include/asm/syscall.h +++ b/arch/arm/include/asm/syscall.h | |||
@@ -57,6 +57,9 @@ static inline void syscall_get_arguments(struct task_struct *task, | |||
57 | unsigned int i, unsigned int n, | 57 | unsigned int i, unsigned int n, |
58 | unsigned long *args) | 58 | unsigned long *args) |
59 | { | 59 | { |
60 | if (n == 0) | ||
61 | return; | ||
62 | |||
60 | if (i + n > SYSCALL_MAX_ARGS) { | 63 | if (i + n > SYSCALL_MAX_ARGS) { |
61 | unsigned long *args_bad = args + SYSCALL_MAX_ARGS - i; | 64 | unsigned long *args_bad = args + SYSCALL_MAX_ARGS - i; |
62 | unsigned int n_bad = n + i - SYSCALL_MAX_ARGS; | 65 | unsigned int n_bad = n + i - SYSCALL_MAX_ARGS; |
@@ -81,6 +84,9 @@ static inline void syscall_set_arguments(struct task_struct *task, | |||
81 | unsigned int i, unsigned int n, | 84 | unsigned int i, unsigned int n, |
82 | const unsigned long *args) | 85 | const unsigned long *args) |
83 | { | 86 | { |
87 | if (n == 0) | ||
88 | return; | ||
89 | |||
84 | if (i + n > SYSCALL_MAX_ARGS) { | 90 | if (i + n > SYSCALL_MAX_ARGS) { |
85 | pr_warning("%s called with max args %d, handling only %d\n", | 91 | pr_warning("%s called with max args %d, handling only %d\n", |
86 | __func__, i + n, SYSCALL_MAX_ARGS); | 92 | __func__, i + n, SYSCALL_MAX_ARGS); |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 2c7cc1e03473..476de57dcef2 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -487,7 +487,26 @@ __fixup_smp: | |||
487 | mrc p15, 0, r0, c0, c0, 5 @ read MPIDR | 487 | mrc p15, 0, r0, c0, c0, 5 @ read MPIDR |
488 | and r0, r0, #0xc0000000 @ multiprocessing extensions and | 488 | and r0, r0, #0xc0000000 @ multiprocessing extensions and |
489 | teq r0, #0x80000000 @ not part of a uniprocessor system? | 489 | teq r0, #0x80000000 @ not part of a uniprocessor system? |
490 | moveq pc, lr @ yes, assume SMP | 490 | bne __fixup_smp_on_up @ no, assume UP |
491 | |||
492 | @ Core indicates it is SMP. Check for Aegis SOC where a single | ||
493 | @ Cortex-A9 CPU is present but SMP operations fault. | ||
494 | mov r4, #0x41000000 | ||
495 | orr r4, r4, #0x0000c000 | ||
496 | orr r4, r4, #0x00000090 | ||
497 | teq r3, r4 @ Check for ARM Cortex-A9 | ||
498 | movne pc, lr @ Not ARM Cortex-A9, | ||
499 | |||
500 | @ If a future SoC *does* use 0x0 as the PERIPH_BASE, then the | ||
501 | @ below address check will need to be #ifdef'd or equivalent | ||
502 | @ for the Aegis platform. | ||
503 | mrc p15, 4, r0, c15, c0 @ get SCU base address | ||
504 | teq r0, #0x0 @ '0' on actual UP A9 hardware | ||
505 | beq __fixup_smp_on_up @ So its an A9 UP | ||
506 | ldr r0, [r0, #4] @ read SCU Config | ||
507 | and r0, r0, #0x3 @ number of CPUs | ||
508 | teq r0, #0x0 @ is 1? | ||
509 | movne pc, lr | ||
491 | 510 | ||
492 | __fixup_smp_on_up: | 511 | __fixup_smp_on_up: |
493 | adr r0, 1f | 512 | adr r0, 1f |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index f5e1a8471714..1272ed202dde 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -1232,7 +1232,8 @@ __iommu_create_mapping(struct device *dev, struct page **pages, size_t size) | |||
1232 | break; | 1232 | break; |
1233 | 1233 | ||
1234 | len = (j - i) << PAGE_SHIFT; | 1234 | len = (j - i) << PAGE_SHIFT; |
1235 | ret = iommu_map(mapping->domain, iova, phys, len, 0); | 1235 | ret = iommu_map(mapping->domain, iova, phys, len, |
1236 | IOMMU_READ|IOMMU_WRITE); | ||
1236 | if (ret < 0) | 1237 | if (ret < 0) |
1237 | goto fail; | 1238 | goto fail; |
1238 | iova += len; | 1239 | iova += len; |
@@ -1431,6 +1432,27 @@ static int arm_iommu_get_sgtable(struct device *dev, struct sg_table *sgt, | |||
1431 | GFP_KERNEL); | 1432 | GFP_KERNEL); |
1432 | } | 1433 | } |
1433 | 1434 | ||
1435 | static int __dma_direction_to_prot(enum dma_data_direction dir) | ||
1436 | { | ||
1437 | int prot; | ||
1438 | |||
1439 | switch (dir) { | ||
1440 | case DMA_BIDIRECTIONAL: | ||
1441 | prot = IOMMU_READ | IOMMU_WRITE; | ||
1442 | break; | ||
1443 | case DMA_TO_DEVICE: | ||
1444 | prot = IOMMU_READ; | ||
1445 | break; | ||
1446 | case DMA_FROM_DEVICE: | ||
1447 | prot = IOMMU_WRITE; | ||
1448 | break; | ||
1449 | default: | ||
1450 | prot = 0; | ||
1451 | } | ||
1452 | |||
1453 | return prot; | ||
1454 | } | ||
1455 | |||
1434 | /* | 1456 | /* |
1435 | * Map a part of the scatter-gather list into contiguous io address space | 1457 | * Map a part of the scatter-gather list into contiguous io address space |
1436 | */ | 1458 | */ |
@@ -1444,6 +1466,7 @@ static int __map_sg_chunk(struct device *dev, struct scatterlist *sg, | |||
1444 | int ret = 0; | 1466 | int ret = 0; |
1445 | unsigned int count; | 1467 | unsigned int count; |
1446 | struct scatterlist *s; | 1468 | struct scatterlist *s; |
1469 | int prot; | ||
1447 | 1470 | ||
1448 | size = PAGE_ALIGN(size); | 1471 | size = PAGE_ALIGN(size); |
1449 | *handle = DMA_ERROR_CODE; | 1472 | *handle = DMA_ERROR_CODE; |
@@ -1460,7 +1483,9 @@ static int __map_sg_chunk(struct device *dev, struct scatterlist *sg, | |||
1460 | !dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs)) | 1483 | !dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs)) |
1461 | __dma_page_cpu_to_dev(sg_page(s), s->offset, s->length, dir); | 1484 | __dma_page_cpu_to_dev(sg_page(s), s->offset, s->length, dir); |
1462 | 1485 | ||
1463 | ret = iommu_map(mapping->domain, iova, phys, len, 0); | 1486 | prot = __dma_direction_to_prot(dir); |
1487 | |||
1488 | ret = iommu_map(mapping->domain, iova, phys, len, prot); | ||
1464 | if (ret < 0) | 1489 | if (ret < 0) |
1465 | goto fail; | 1490 | goto fail; |
1466 | count += len >> PAGE_SHIFT; | 1491 | count += len >> PAGE_SHIFT; |
@@ -1665,19 +1690,7 @@ static dma_addr_t arm_coherent_iommu_map_page(struct device *dev, struct page *p | |||
1665 | if (dma_addr == DMA_ERROR_CODE) | 1690 | if (dma_addr == DMA_ERROR_CODE) |
1666 | return dma_addr; | 1691 | return dma_addr; |
1667 | 1692 | ||
1668 | switch (dir) { | 1693 | prot = __dma_direction_to_prot(dir); |
1669 | case DMA_BIDIRECTIONAL: | ||
1670 | prot = IOMMU_READ | IOMMU_WRITE; | ||
1671 | break; | ||
1672 | case DMA_TO_DEVICE: | ||
1673 | prot = IOMMU_READ; | ||
1674 | break; | ||
1675 | case DMA_FROM_DEVICE: | ||
1676 | prot = IOMMU_WRITE; | ||
1677 | break; | ||
1678 | default: | ||
1679 | prot = 0; | ||
1680 | } | ||
1681 | 1694 | ||
1682 | ret = iommu_map(mapping->domain, dma_addr, page_to_phys(page), len, prot); | 1695 | ret = iommu_map(mapping->domain, dma_addr, page_to_phys(page), len, prot); |
1683 | if (ret < 0) | 1696 | if (ret < 0) |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index febaee7ca57b..18ec4c504abf 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/nodemask.h> | 17 | #include <linux/nodemask.h> |
18 | #include <linux/initrd.h> | 18 | #include <linux/initrd.h> |
19 | #include <linux/of_fdt.h> | 19 | #include <linux/of_fdt.h> |
20 | #include <linux/of_reserved_mem.h> | ||
21 | #include <linux/highmem.h> | 20 | #include <linux/highmem.h> |
22 | #include <linux/gfp.h> | 21 | #include <linux/gfp.h> |
23 | #include <linux/memblock.h> | 22 | #include <linux/memblock.h> |
@@ -379,8 +378,6 @@ void __init arm_memblock_init(struct meminfo *mi, | |||
379 | if (mdesc->reserve) | 378 | if (mdesc->reserve) |
380 | mdesc->reserve(); | 379 | mdesc->reserve(); |
381 | 380 | ||
382 | early_init_dt_scan_reserved_mem(); | ||
383 | |||
384 | /* | 381 | /* |
385 | * reserve memory for DMA contigouos allocations, | 382 | * reserve memory for DMA contigouos allocations, |
386 | * must come from DMA area inside low memory | 383 | * must come from DMA area inside low memory |
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index f50d223a0bd3..99b44e0e8d86 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c | |||
@@ -930,4 +930,5 @@ void bpf_jit_free(struct sk_filter *fp) | |||
930 | { | 930 | { |
931 | if (fp->bpf_func != sk_run_filter) | 931 | if (fp->bpf_func != sk_run_filter) |
932 | module_free(NULL, fp->bpf_func); | 932 | module_free(NULL, fp->bpf_func); |
933 | kfree(fp); | ||
933 | } | 934 | } |
diff --git a/arch/parisc/configs/712_defconfig b/arch/parisc/configs/712_defconfig index 0f90569b9d85..9387cc2693f6 100644 --- a/arch/parisc/configs/712_defconfig +++ b/arch/parisc/configs/712_defconfig | |||
@@ -40,6 +40,8 @@ CONFIG_IP_NF_QUEUE=m | |||
40 | CONFIG_LLC2=m | 40 | CONFIG_LLC2=m |
41 | CONFIG_NET_PKTGEN=m | 41 | CONFIG_NET_PKTGEN=m |
42 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 42 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
43 | CONFIG_DEVTMPFS=y | ||
44 | CONFIG_DEVTMPFS_MOUNT=y | ||
43 | # CONFIG_STANDALONE is not set | 45 | # CONFIG_STANDALONE is not set |
44 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 46 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
45 | CONFIG_PARPORT=y | 47 | CONFIG_PARPORT=y |
diff --git a/arch/parisc/configs/a500_defconfig b/arch/parisc/configs/a500_defconfig index b647b182dacc..90025322b75e 100644 --- a/arch/parisc/configs/a500_defconfig +++ b/arch/parisc/configs/a500_defconfig | |||
@@ -79,6 +79,8 @@ CONFIG_IP_DCCP=m | |||
79 | CONFIG_LLC2=m | 79 | CONFIG_LLC2=m |
80 | CONFIG_NET_PKTGEN=m | 80 | CONFIG_NET_PKTGEN=m |
81 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 81 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
82 | CONFIG_DEVTMPFS=y | ||
83 | CONFIG_DEVTMPFS_MOUNT=y | ||
82 | # CONFIG_STANDALONE is not set | 84 | # CONFIG_STANDALONE is not set |
83 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 85 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
84 | CONFIG_BLK_DEV_UMEM=m | 86 | CONFIG_BLK_DEV_UMEM=m |
diff --git a/arch/parisc/configs/b180_defconfig b/arch/parisc/configs/b180_defconfig index e289f5bf3148..f1a0c25bef8d 100644 --- a/arch/parisc/configs/b180_defconfig +++ b/arch/parisc/configs/b180_defconfig | |||
@@ -4,6 +4,7 @@ CONFIG_IKCONFIG=y | |||
4 | CONFIG_IKCONFIG_PROC=y | 4 | CONFIG_IKCONFIG_PROC=y |
5 | CONFIG_LOG_BUF_SHIFT=16 | 5 | CONFIG_LOG_BUF_SHIFT=16 |
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | CONFIG_BLK_DEV_INITRD=y | ||
7 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
8 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
9 | CONFIG_MODVERSIONS=y | 10 | CONFIG_MODVERSIONS=y |
@@ -27,6 +28,8 @@ CONFIG_IP_PNP_BOOTP=y | |||
27 | # CONFIG_INET_LRO is not set | 28 | # CONFIG_INET_LRO is not set |
28 | CONFIG_IPV6=y | 29 | CONFIG_IPV6=y |
29 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 30 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
31 | CONFIG_DEVTMPFS=y | ||
32 | CONFIG_DEVTMPFS_MOUNT=y | ||
30 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 33 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
31 | CONFIG_PARPORT=y | 34 | CONFIG_PARPORT=y |
32 | CONFIG_PARPORT_PC=y | 35 | CONFIG_PARPORT_PC=y |
diff --git a/arch/parisc/configs/c3000_defconfig b/arch/parisc/configs/c3000_defconfig index 311ca367b622..ec1b014952b6 100644 --- a/arch/parisc/configs/c3000_defconfig +++ b/arch/parisc/configs/c3000_defconfig | |||
@@ -5,6 +5,7 @@ CONFIG_IKCONFIG=y | |||
5 | CONFIG_IKCONFIG_PROC=y | 5 | CONFIG_IKCONFIG_PROC=y |
6 | CONFIG_LOG_BUF_SHIFT=16 | 6 | CONFIG_LOG_BUF_SHIFT=16 |
7 | CONFIG_SYSFS_DEPRECATED_V2=y | 7 | CONFIG_SYSFS_DEPRECATED_V2=y |
8 | CONFIG_BLK_DEV_INITRD=y | ||
8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
9 | CONFIG_EXPERT=y | 10 | CONFIG_EXPERT=y |
10 | CONFIG_KALLSYMS_ALL=y | 11 | CONFIG_KALLSYMS_ALL=y |
@@ -39,6 +40,8 @@ CONFIG_NETFILTER_DEBUG=y | |||
39 | CONFIG_IP_NF_QUEUE=m | 40 | CONFIG_IP_NF_QUEUE=m |
40 | CONFIG_NET_PKTGEN=m | 41 | CONFIG_NET_PKTGEN=m |
41 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 42 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
43 | CONFIG_DEVTMPFS=y | ||
44 | CONFIG_DEVTMPFS_MOUNT=y | ||
42 | # CONFIG_STANDALONE is not set | 45 | # CONFIG_STANDALONE is not set |
43 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 46 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
44 | CONFIG_BLK_DEV_UMEM=m | 47 | CONFIG_BLK_DEV_UMEM=m |
diff --git a/arch/parisc/configs/c8000_defconfig b/arch/parisc/configs/c8000_defconfig index f11006361297..e1c8d2015c89 100644 --- a/arch/parisc/configs/c8000_defconfig +++ b/arch/parisc/configs/c8000_defconfig | |||
@@ -62,6 +62,8 @@ CONFIG_TIPC=m | |||
62 | CONFIG_LLC2=m | 62 | CONFIG_LLC2=m |
63 | CONFIG_DNS_RESOLVER=y | 63 | CONFIG_DNS_RESOLVER=y |
64 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 64 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
65 | CONFIG_DEVTMPFS=y | ||
66 | CONFIG_DEVTMPFS_MOUNT=y | ||
65 | # CONFIG_STANDALONE is not set | 67 | # CONFIG_STANDALONE is not set |
66 | CONFIG_PARPORT=y | 68 | CONFIG_PARPORT=y |
67 | CONFIG_PARPORT_PC=y | 69 | CONFIG_PARPORT_PC=y |
diff --git a/arch/parisc/configs/default_defconfig b/arch/parisc/configs/default_defconfig index dfe88f6c95c4..ba61495e1fa4 100644 --- a/arch/parisc/configs/default_defconfig +++ b/arch/parisc/configs/default_defconfig | |||
@@ -49,6 +49,8 @@ CONFIG_INET6_ESP=y | |||
49 | CONFIG_INET6_IPCOMP=y | 49 | CONFIG_INET6_IPCOMP=y |
50 | CONFIG_LLC2=m | 50 | CONFIG_LLC2=m |
51 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 51 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
52 | CONFIG_DEVTMPFS=y | ||
53 | CONFIG_DEVTMPFS_MOUNT=y | ||
52 | # CONFIG_STANDALONE is not set | 54 | # CONFIG_STANDALONE is not set |
53 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 55 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
54 | CONFIG_PARPORT=y | 56 | CONFIG_PARPORT=y |
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index b521c0adf4ec..c035673209f7 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c | |||
@@ -602,7 +602,6 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long | |||
602 | __flush_cache_page(vma, vmaddr, PFN_PHYS(pfn)); | 602 | __flush_cache_page(vma, vmaddr, PFN_PHYS(pfn)); |
603 | } | 603 | } |
604 | } | 604 | } |
605 | EXPORT_SYMBOL_GPL(flush_cache_page); | ||
606 | 605 | ||
607 | #ifdef CONFIG_PARISC_TMPALIAS | 606 | #ifdef CONFIG_PARISC_TMPALIAS |
608 | 607 | ||
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index 37aabd772fbb..d2d58258aea6 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S | |||
@@ -195,6 +195,8 @@ common_stext: | |||
195 | ldw MEM_PDC_HI(%r0),%r6 | 195 | ldw MEM_PDC_HI(%r0),%r6 |
196 | depd %r6, 31, 32, %r3 /* move to upper word */ | 196 | depd %r6, 31, 32, %r3 /* move to upper word */ |
197 | 197 | ||
198 | mfctl %cr30,%r6 /* PCX-W2 firmware bug */ | ||
199 | |||
198 | ldo PDC_PSW(%r0),%arg0 /* 21 */ | 200 | ldo PDC_PSW(%r0),%arg0 /* 21 */ |
199 | ldo PDC_PSW_SET_DEFAULTS(%r0),%arg1 /* 2 */ | 201 | ldo PDC_PSW_SET_DEFAULTS(%r0),%arg1 /* 2 */ |
200 | ldo PDC_PSW_WIDE_BIT(%r0),%arg2 /* 2 */ | 202 | ldo PDC_PSW_WIDE_BIT(%r0),%arg2 /* 2 */ |
@@ -203,6 +205,8 @@ common_stext: | |||
203 | copy %r0,%arg3 | 205 | copy %r0,%arg3 |
204 | 206 | ||
205 | stext_pdc_ret: | 207 | stext_pdc_ret: |
208 | mtctl %r6,%cr30 /* restore task thread info */ | ||
209 | |||
206 | /* restore rfi target address*/ | 210 | /* restore rfi target address*/ |
207 | ldd TI_TASK-THREAD_SZ_ALGN(%sp), %r10 | 211 | ldd TI_TASK-THREAD_SZ_ALGN(%sp), %r10 |
208 | tophys_r1 %r10 | 212 | tophys_r1 %r10 |
diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c index bf56e33f8257..2345bdb4d917 100644 --- a/arch/powerpc/net/bpf_jit_comp.c +++ b/arch/powerpc/net/bpf_jit_comp.c | |||
@@ -691,4 +691,5 @@ void bpf_jit_free(struct sk_filter *fp) | |||
691 | { | 691 | { |
692 | if (fp->bpf_func != sk_run_filter) | 692 | if (fp->bpf_func != sk_run_filter) |
693 | module_free(NULL, fp->bpf_func); | 693 | module_free(NULL, fp->bpf_func); |
694 | kfree(fp); | ||
694 | } | 695 | } |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 9b60a36c348d..2204400d0bd5 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -748,7 +748,9 @@ static inline void pgste_set_key(pte_t *ptep, pgste_t pgste, pte_t entry) | |||
748 | 748 | ||
749 | static inline void pgste_set_pte(pte_t *ptep, pte_t entry) | 749 | static inline void pgste_set_pte(pte_t *ptep, pte_t entry) |
750 | { | 750 | { |
751 | if (!MACHINE_HAS_ESOP && (pte_val(entry) & _PAGE_WRITE)) { | 751 | if (!MACHINE_HAS_ESOP && |
752 | (pte_val(entry) & _PAGE_PRESENT) && | ||
753 | (pte_val(entry) & _PAGE_WRITE)) { | ||
752 | /* | 754 | /* |
753 | * Without enhanced suppression-on-protection force | 755 | * Without enhanced suppression-on-protection force |
754 | * the dirty bit on for all writable ptes. | 756 | * the dirty bit on for all writable ptes. |
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h index 8ad8af915032..819b94d22720 100644 --- a/arch/s390/include/asm/timex.h +++ b/arch/s390/include/asm/timex.h | |||
@@ -71,30 +71,30 @@ static inline void local_tick_enable(unsigned long long comp) | |||
71 | 71 | ||
72 | typedef unsigned long long cycles_t; | 72 | typedef unsigned long long cycles_t; |
73 | 73 | ||
74 | static inline unsigned long long get_tod_clock(void) | ||
75 | { | ||
76 | unsigned long long clk; | ||
77 | |||
78 | #ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES | ||
79 | asm volatile(".insn s,0xb27c0000,%0" : "=Q" (clk) : : "cc"); | ||
80 | #else | ||
81 | asm volatile("stck %0" : "=Q" (clk) : : "cc"); | ||
82 | #endif | ||
83 | return clk; | ||
84 | } | ||
85 | |||
86 | static inline void get_tod_clock_ext(char *clk) | 74 | static inline void get_tod_clock_ext(char *clk) |
87 | { | 75 | { |
88 | asm volatile("stcke %0" : "=Q" (*clk) : : "cc"); | 76 | asm volatile("stcke %0" : "=Q" (*clk) : : "cc"); |
89 | } | 77 | } |
90 | 78 | ||
91 | static inline unsigned long long get_tod_clock_xt(void) | 79 | static inline unsigned long long get_tod_clock(void) |
92 | { | 80 | { |
93 | unsigned char clk[16]; | 81 | unsigned char clk[16]; |
94 | get_tod_clock_ext(clk); | 82 | get_tod_clock_ext(clk); |
95 | return *((unsigned long long *)&clk[1]); | 83 | return *((unsigned long long *)&clk[1]); |
96 | } | 84 | } |
97 | 85 | ||
86 | static inline unsigned long long get_tod_clock_fast(void) | ||
87 | { | ||
88 | #ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES | ||
89 | unsigned long long clk; | ||
90 | |||
91 | asm volatile("stckf %0" : "=Q" (clk) : : "cc"); | ||
92 | return clk; | ||
93 | #else | ||
94 | return get_tod_clock(); | ||
95 | #endif | ||
96 | } | ||
97 | |||
98 | static inline cycles_t get_cycles(void) | 98 | static inline cycles_t get_cycles(void) |
99 | { | 99 | { |
100 | return (cycles_t) get_tod_clock() >> 2; | 100 | return (cycles_t) get_tod_clock() >> 2; |
@@ -125,7 +125,7 @@ extern u64 sched_clock_base_cc; | |||
125 | */ | 125 | */ |
126 | static inline unsigned long long get_tod_clock_monotonic(void) | 126 | static inline unsigned long long get_tod_clock_monotonic(void) |
127 | { | 127 | { |
128 | return get_tod_clock_xt() - sched_clock_base_cc; | 128 | return get_tod_clock() - sched_clock_base_cc; |
129 | } | 129 | } |
130 | 130 | ||
131 | /** | 131 | /** |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index 1389b637dae5..adaa9e9478d8 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
@@ -99,7 +99,7 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) | |||
99 | break; | 99 | break; |
100 | } | 100 | } |
101 | } | 101 | } |
102 | return err; | 102 | return err ? -EFAULT : 0; |
103 | } | 103 | } |
104 | 104 | ||
105 | int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) | 105 | int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) |
@@ -148,7 +148,7 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) | |||
148 | break; | 148 | break; |
149 | } | 149 | } |
150 | } | 150 | } |
151 | return err; | 151 | return err ? -EFAULT : 0; |
152 | } | 152 | } |
153 | 153 | ||
154 | static int save_sigregs32(struct pt_regs *regs, _sigregs32 __user *sregs) | 154 | static int save_sigregs32(struct pt_regs *regs, _sigregs32 __user *sregs) |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index f1279dc2e1bc..17d62fe5d7b7 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -867,7 +867,7 @@ static inline void | |||
867 | debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level, | 867 | debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level, |
868 | int exception) | 868 | int exception) |
869 | { | 869 | { |
870 | active->id.stck = get_tod_clock(); | 870 | active->id.stck = get_tod_clock_fast(); |
871 | active->id.fields.cpuid = smp_processor_id(); | 871 | active->id.fields.cpuid = smp_processor_id(); |
872 | active->caller = __builtin_return_address(0); | 872 | active->caller = __builtin_return_address(0); |
873 | active->id.fields.exception = exception; | 873 | active->id.fields.exception = exception; |
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 7f35cb33e510..7f1f7ac5cf7f 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -385,7 +385,7 @@ static int kvm_cpu_has_interrupt(struct kvm_vcpu *vcpu) | |||
385 | } | 385 | } |
386 | 386 | ||
387 | if ((!rc) && (vcpu->arch.sie_block->ckc < | 387 | if ((!rc) && (vcpu->arch.sie_block->ckc < |
388 | get_tod_clock() + vcpu->arch.sie_block->epoch)) { | 388 | get_tod_clock_fast() + vcpu->arch.sie_block->epoch)) { |
389 | if ((!psw_extint_disabled(vcpu)) && | 389 | if ((!psw_extint_disabled(vcpu)) && |
390 | (vcpu->arch.sie_block->gcr[0] & 0x800ul)) | 390 | (vcpu->arch.sie_block->gcr[0] & 0x800ul)) |
391 | rc = 1; | 391 | rc = 1; |
@@ -425,7 +425,7 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu) | |||
425 | goto no_timer; | 425 | goto no_timer; |
426 | } | 426 | } |
427 | 427 | ||
428 | now = get_tod_clock() + vcpu->arch.sie_block->epoch; | 428 | now = get_tod_clock_fast() + vcpu->arch.sie_block->epoch; |
429 | if (vcpu->arch.sie_block->ckc < now) { | 429 | if (vcpu->arch.sie_block->ckc < now) { |
430 | __unset_cpu_idle(vcpu); | 430 | __unset_cpu_idle(vcpu); |
431 | return 0; | 431 | return 0; |
@@ -515,7 +515,7 @@ void kvm_s390_deliver_pending_interrupts(struct kvm_vcpu *vcpu) | |||
515 | } | 515 | } |
516 | 516 | ||
517 | if ((vcpu->arch.sie_block->ckc < | 517 | if ((vcpu->arch.sie_block->ckc < |
518 | get_tod_clock() + vcpu->arch.sie_block->epoch)) | 518 | get_tod_clock_fast() + vcpu->arch.sie_block->epoch)) |
519 | __try_deliver_ckc_interrupt(vcpu); | 519 | __try_deliver_ckc_interrupt(vcpu); |
520 | 520 | ||
521 | if (atomic_read(&fi->active)) { | 521 | if (atomic_read(&fi->active)) { |
diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c index 57c87d7d7ede..a9f3d0042d58 100644 --- a/arch/s390/lib/delay.c +++ b/arch/s390/lib/delay.c | |||
@@ -44,7 +44,7 @@ static void __udelay_disabled(unsigned long long usecs) | |||
44 | do { | 44 | do { |
45 | set_clock_comparator(end); | 45 | set_clock_comparator(end); |
46 | vtime_stop_cpu(); | 46 | vtime_stop_cpu(); |
47 | } while (get_tod_clock() < end); | 47 | } while (get_tod_clock_fast() < end); |
48 | lockdep_on(); | 48 | lockdep_on(); |
49 | __ctl_load(cr0, 0, 0); | 49 | __ctl_load(cr0, 0, 0); |
50 | __ctl_load(cr6, 6, 6); | 50 | __ctl_load(cr6, 6, 6); |
@@ -55,7 +55,7 @@ static void __udelay_enabled(unsigned long long usecs) | |||
55 | { | 55 | { |
56 | u64 clock_saved, end; | 56 | u64 clock_saved, end; |
57 | 57 | ||
58 | end = get_tod_clock() + (usecs << 12); | 58 | end = get_tod_clock_fast() + (usecs << 12); |
59 | do { | 59 | do { |
60 | clock_saved = 0; | 60 | clock_saved = 0; |
61 | if (end < S390_lowcore.clock_comparator) { | 61 | if (end < S390_lowcore.clock_comparator) { |
@@ -65,7 +65,7 @@ static void __udelay_enabled(unsigned long long usecs) | |||
65 | vtime_stop_cpu(); | 65 | vtime_stop_cpu(); |
66 | if (clock_saved) | 66 | if (clock_saved) |
67 | local_tick_enable(clock_saved); | 67 | local_tick_enable(clock_saved); |
68 | } while (get_tod_clock() < end); | 68 | } while (get_tod_clock_fast() < end); |
69 | } | 69 | } |
70 | 70 | ||
71 | /* | 71 | /* |
@@ -109,8 +109,8 @@ void udelay_simple(unsigned long long usecs) | |||
109 | { | 109 | { |
110 | u64 end; | 110 | u64 end; |
111 | 111 | ||
112 | end = get_tod_clock() + (usecs << 12); | 112 | end = get_tod_clock_fast() + (usecs << 12); |
113 | while (get_tod_clock() < end) | 113 | while (get_tod_clock_fast() < end) |
114 | cpu_relax(); | 114 | cpu_relax(); |
115 | } | 115 | } |
116 | 116 | ||
@@ -120,10 +120,10 @@ void __ndelay(unsigned long long nsecs) | |||
120 | 120 | ||
121 | nsecs <<= 9; | 121 | nsecs <<= 9; |
122 | do_div(nsecs, 125); | 122 | do_div(nsecs, 125); |
123 | end = get_tod_clock() + nsecs; | 123 | end = get_tod_clock_fast() + nsecs; |
124 | if (nsecs & ~0xfffUL) | 124 | if (nsecs & ~0xfffUL) |
125 | __udelay(nsecs >> 12); | 125 | __udelay(nsecs >> 12); |
126 | while (get_tod_clock() < end) | 126 | while (get_tod_clock_fast() < end) |
127 | barrier(); | 127 | barrier(); |
128 | } | 128 | } |
129 | EXPORT_SYMBOL(__ndelay); | 129 | EXPORT_SYMBOL(__ndelay); |
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index 709239285869..a5df511e27a2 100644 --- a/arch/s390/net/bpf_jit_comp.c +++ b/arch/s390/net/bpf_jit_comp.c | |||
@@ -881,7 +881,9 @@ void bpf_jit_free(struct sk_filter *fp) | |||
881 | struct bpf_binary_header *header = (void *)addr; | 881 | struct bpf_binary_header *header = (void *)addr; |
882 | 882 | ||
883 | if (fp->bpf_func == sk_run_filter) | 883 | if (fp->bpf_func == sk_run_filter) |
884 | return; | 884 | goto free_filter; |
885 | set_memory_rw(addr, header->pages); | 885 | set_memory_rw(addr, header->pages); |
886 | module_free(NULL, header); | 886 | module_free(NULL, header); |
887 | free_filter: | ||
888 | kfree(fp); | ||
887 | } | 889 | } |
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c index 9c7be59e6f5a..218b6b23c378 100644 --- a/arch/sparc/net/bpf_jit_comp.c +++ b/arch/sparc/net/bpf_jit_comp.c | |||
@@ -808,4 +808,5 @@ void bpf_jit_free(struct sk_filter *fp) | |||
808 | { | 808 | { |
809 | if (fp->bpf_func != sk_run_filter) | 809 | if (fp->bpf_func != sk_run_filter) |
810 | module_free(NULL, fp->bpf_func); | 810 | module_free(NULL, fp->bpf_func); |
811 | kfree(fp); | ||
811 | } | 812 | } |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 145d703227bf..f67e839f06c8 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -1033,6 +1033,7 @@ config X86_REBOOTFIXUPS | |||
1033 | 1033 | ||
1034 | config MICROCODE | 1034 | config MICROCODE |
1035 | tristate "CPU microcode loading support" | 1035 | tristate "CPU microcode loading support" |
1036 | depends on CPU_SUP_AMD || CPU_SUP_INTEL | ||
1036 | select FW_LOADER | 1037 | select FW_LOADER |
1037 | ---help--- | 1038 | ---help--- |
1038 | 1039 | ||
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 1191ac1c9d25..a419814cea57 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
@@ -113,7 +113,7 @@ static int __init early_get_pnodeid(void) | |||
113 | break; | 113 | break; |
114 | case UV3_HUB_PART_NUMBER: | 114 | case UV3_HUB_PART_NUMBER: |
115 | case UV3_HUB_PART_NUMBER_X: | 115 | case UV3_HUB_PART_NUMBER_X: |
116 | uv_min_hub_revision_id += UV3_HUB_REVISION_BASE - 1; | 116 | uv_min_hub_revision_id += UV3_HUB_REVISION_BASE; |
117 | break; | 117 | break; |
118 | } | 118 | } |
119 | 119 | ||
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 697b93af02dd..a0e2a8a80c94 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c | |||
@@ -775,11 +775,22 @@ void __init kvm_spinlock_init(void) | |||
775 | if (!kvm_para_has_feature(KVM_FEATURE_PV_UNHALT)) | 775 | if (!kvm_para_has_feature(KVM_FEATURE_PV_UNHALT)) |
776 | return; | 776 | return; |
777 | 777 | ||
778 | printk(KERN_INFO "KVM setup paravirtual spinlock\n"); | 778 | pv_lock_ops.lock_spinning = PV_CALLEE_SAVE(kvm_lock_spinning); |
779 | pv_lock_ops.unlock_kick = kvm_unlock_kick; | ||
780 | } | ||
781 | |||
782 | static __init int kvm_spinlock_init_jump(void) | ||
783 | { | ||
784 | if (!kvm_para_available()) | ||
785 | return 0; | ||
786 | if (!kvm_para_has_feature(KVM_FEATURE_PV_UNHALT)) | ||
787 | return 0; | ||
779 | 788 | ||
780 | static_key_slow_inc(¶virt_ticketlocks_enabled); | 789 | static_key_slow_inc(¶virt_ticketlocks_enabled); |
790 | printk(KERN_INFO "KVM setup paravirtual spinlock\n"); | ||
781 | 791 | ||
782 | pv_lock_ops.lock_spinning = PV_CALLEE_SAVE(kvm_lock_spinning); | 792 | return 0; |
783 | pv_lock_ops.unlock_kick = kvm_unlock_kick; | ||
784 | } | 793 | } |
794 | early_initcall(kvm_spinlock_init_jump); | ||
795 | |||
785 | #endif /* CONFIG_PARAVIRT_SPINLOCKS */ | 796 | #endif /* CONFIG_PARAVIRT_SPINLOCKS */ |
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c index 79c216aa0e2b..516593e1ce33 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c | |||
@@ -772,13 +772,21 @@ out: | |||
772 | return; | 772 | return; |
773 | } | 773 | } |
774 | 774 | ||
775 | static void bpf_jit_free_deferred(struct work_struct *work) | ||
776 | { | ||
777 | struct sk_filter *fp = container_of(work, struct sk_filter, work); | ||
778 | unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK; | ||
779 | struct bpf_binary_header *header = (void *)addr; | ||
780 | |||
781 | set_memory_rw(addr, header->pages); | ||
782 | module_free(NULL, header); | ||
783 | kfree(fp); | ||
784 | } | ||
785 | |||
775 | void bpf_jit_free(struct sk_filter *fp) | 786 | void bpf_jit_free(struct sk_filter *fp) |
776 | { | 787 | { |
777 | if (fp->bpf_func != sk_run_filter) { | 788 | if (fp->bpf_func != sk_run_filter) { |
778 | unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK; | 789 | INIT_WORK(&fp->work, bpf_jit_free_deferred); |
779 | struct bpf_binary_header *header = (void *)addr; | 790 | schedule_work(&fp->work); |
780 | |||
781 | set_memory_rw(addr, header->pages); | ||
782 | module_free(NULL, header); | ||
783 | } | 791 | } |
784 | } | 792 | } |
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index d1e4777b4e75..31d04758b76f 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c | |||
@@ -278,6 +278,15 @@ static void __init xen_smp_prepare_boot_cpu(void) | |||
278 | old memory can be recycled */ | 278 | old memory can be recycled */ |
279 | make_lowmem_page_readwrite(xen_initial_gdt); | 279 | make_lowmem_page_readwrite(xen_initial_gdt); |
280 | 280 | ||
281 | #ifdef CONFIG_X86_32 | ||
282 | /* | ||
283 | * Xen starts us with XEN_FLAT_RING1_DS, but linux code | ||
284 | * expects __USER_DS | ||
285 | */ | ||
286 | loadsegment(ds, __USER_DS); | ||
287 | loadsegment(es, __USER_DS); | ||
288 | #endif | ||
289 | |||
281 | xen_filter_cpu_maps(); | 290 | xen_filter_cpu_maps(); |
282 | xen_setup_vcpu_info_placement(); | 291 | xen_setup_vcpu_info_placement(); |
283 | } | 292 | } |