diff options
146 files changed, 1146 insertions, 680 deletions
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt index d73fbd2b2b45..026ec7d57384 100644 --- a/Documentation/kernel-doc-nano-HOWTO.txt +++ b/Documentation/kernel-doc-nano-HOWTO.txt | |||
@@ -43,7 +43,8 @@ Only comments so marked will be considered by the kernel-doc scripts, | |||
43 | and any comment so marked must be in kernel-doc format. Do not use | 43 | and any comment so marked must be in kernel-doc format. Do not use |
44 | "/**" to be begin a comment block unless the comment block contains | 44 | "/**" to be begin a comment block unless the comment block contains |
45 | kernel-doc formatted comments. The closing comment marker for | 45 | kernel-doc formatted comments. The closing comment marker for |
46 | kernel-doc comments can be either "*/" or "**/". | 46 | kernel-doc comments can be either "*/" or "**/", but "*/" is |
47 | preferred in the Linux kernel tree. | ||
47 | 48 | ||
48 | Kernel-doc comments should be placed just before the function | 49 | Kernel-doc comments should be placed just before the function |
49 | or data structure being described. | 50 | or data structure being described. |
@@ -63,7 +64,7 @@ Example kernel-doc function comment: | |||
63 | * comment lines. | 64 | * comment lines. |
64 | * | 65 | * |
65 | * The longer description can have multiple paragraphs. | 66 | * The longer description can have multiple paragraphs. |
66 | **/ | 67 | */ |
67 | 68 | ||
68 | The first line, with the short description, must be on a single line. | 69 | The first line, with the short description, must be on a single line. |
69 | 70 | ||
@@ -85,7 +86,7 @@ Example kernel-doc data structure comment. | |||
85 | * perhaps with more lines and words. | 86 | * perhaps with more lines and words. |
86 | * | 87 | * |
87 | * Longer description of this structure. | 88 | * Longer description of this structure. |
88 | **/ | 89 | */ |
89 | 90 | ||
90 | The kernel-doc function comments describe each parameter to the | 91 | The kernel-doc function comments describe each parameter to the |
91 | function, in order, with the @name lines. | 92 | function, in order, with the @name lines. |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 6390ffb520fd..fc22e9223427 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -938,6 +938,8 @@ and is between 256 and 4096 characters. It is defined in the file | |||
938 | 938 | ||
939 | 939 | ||
940 | intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option | 940 | intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option |
941 | on | ||
942 | Enable intel iommu driver. | ||
941 | off | 943 | off |
942 | Disable intel iommu driver. | 944 | Disable intel iommu driver. |
943 | igfx_off [Default Off] | 945 | igfx_off [Default Off] |
diff --git a/MAINTAINERS b/MAINTAINERS index 4486ac1ccac5..b7e4afc4bc44 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1202,6 +1202,8 @@ S: Supported | |||
1202 | CONTROL GROUPS (CGROUPS) | 1202 | CONTROL GROUPS (CGROUPS) |
1203 | P: Paul Menage | 1203 | P: Paul Menage |
1204 | M: menage@google.com | 1204 | M: menage@google.com |
1205 | P: Li Zefan | ||
1206 | M: lizf@cn.fujitsu.com | ||
1205 | L: containers@lists.linux-foundation.org | 1207 | L: containers@lists.linux-foundation.org |
1206 | S: Maintained | 1208 | S: Maintained |
1207 | 1209 | ||
@@ -3543,6 +3545,12 @@ S: Maintained | |||
3543 | PXA MMCI DRIVER | 3545 | PXA MMCI DRIVER |
3544 | S: Orphan | 3546 | S: Orphan |
3545 | 3547 | ||
3548 | PXA RTC DRIVER | ||
3549 | P: Robert Jarzmik | ||
3550 | M: robert.jarzmik@free.fr | ||
3551 | L: rtc-linux@googlegroups.com | ||
3552 | S: Maintained | ||
3553 | |||
3546 | QLOGIC QLA2XXX FC-SCSI DRIVER | 3554 | QLOGIC QLA2XXX FC-SCSI DRIVER |
3547 | P: Andrew Vasquez | 3555 | P: Andrew Vasquez |
3548 | M: linux-driver@qlogic.com | 3556 | M: linux-driver@qlogic.com |
@@ -4291,8 +4299,8 @@ P: Rajiv Andrade | |||
4291 | M: srajiv@linux.vnet.ibm.com | 4299 | M: srajiv@linux.vnet.ibm.com |
4292 | W: http://tpmdd.sourceforge.net | 4300 | W: http://tpmdd.sourceforge.net |
4293 | P: Marcel Selhorst | 4301 | P: Marcel Selhorst |
4294 | M: tpm@selhorst.net | 4302 | M: m.selhorst@sirrix.com |
4295 | W: http://www.prosec.rub.de/tpm/ | 4303 | W: http://www.sirrix.com |
4296 | L: tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers) | 4304 | L: tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers) |
4297 | S: Maintained | 4305 | S: Maintained |
4298 | 4306 | ||
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index 440dc62cdc3a..598ca61e7bca 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -13,8 +13,8 @@ | |||
13 | #include <asm/cacheflush.h> | 13 | #include <asm/cacheflush.h> |
14 | #include <asm/mach-types.h> | 14 | #include <asm/mach-types.h> |
15 | 15 | ||
16 | const extern unsigned char relocate_new_kernel[]; | 16 | extern const unsigned char relocate_new_kernel[]; |
17 | const extern unsigned int relocate_new_kernel_size; | 17 | extern const unsigned int relocate_new_kernel_size; |
18 | 18 | ||
19 | extern void setup_mm_for_reboot(char mode); | 19 | extern void setup_mm_for_reboot(char mode); |
20 | 20 | ||
diff --git a/arch/arm/mach-pxa/dma.c b/arch/arm/mach-pxa/dma.c index b1514fb20d3a..7de17fc5d54b 100644 --- a/arch/arm/mach-pxa/dma.c +++ b/arch/arm/mach-pxa/dma.c | |||
@@ -121,20 +121,22 @@ int __init pxa_init_dma(int num_ch) | |||
121 | if (dma_channels == NULL) | 121 | if (dma_channels == NULL) |
122 | return -ENOMEM; | 122 | return -ENOMEM; |
123 | 123 | ||
124 | ret = request_irq(IRQ_DMA, dma_irq_handler, IRQF_DISABLED, "DMA", NULL); | ||
125 | if (ret) { | ||
126 | printk (KERN_CRIT "Wow! Can't register IRQ for DMA\n"); | ||
127 | kfree(dma_channels); | ||
128 | return ret; | ||
129 | } | ||
130 | |||
131 | /* dma channel priorities on pxa2xx processors: | 124 | /* dma channel priorities on pxa2xx processors: |
132 | * ch 0 - 3, 16 - 19 <--> (0) DMA_PRIO_HIGH | 125 | * ch 0 - 3, 16 - 19 <--> (0) DMA_PRIO_HIGH |
133 | * ch 4 - 7, 20 - 23 <--> (1) DMA_PRIO_MEDIUM | 126 | * ch 4 - 7, 20 - 23 <--> (1) DMA_PRIO_MEDIUM |
134 | * ch 8 - 15, 24 - 31 <--> (2) DMA_PRIO_LOW | 127 | * ch 8 - 15, 24 - 31 <--> (2) DMA_PRIO_LOW |
135 | */ | 128 | */ |
136 | for (i = 0; i < num_ch; i++) | 129 | for (i = 0; i < num_ch; i++) { |
130 | DCSR(i) = 0; | ||
137 | dma_channels[i].prio = min((i & 0xf) >> 2, DMA_PRIO_LOW); | 131 | dma_channels[i].prio = min((i & 0xf) >> 2, DMA_PRIO_LOW); |
132 | } | ||
133 | |||
134 | ret = request_irq(IRQ_DMA, dma_irq_handler, IRQF_DISABLED, "DMA", NULL); | ||
135 | if (ret) { | ||
136 | printk (KERN_CRIT "Wow! Can't register IRQ for DMA\n"); | ||
137 | kfree(dma_channels); | ||
138 | return ret; | ||
139 | } | ||
138 | 140 | ||
139 | num_dma_channels = num_ch; | 141 | num_dma_channels = num_ch; |
140 | return 0; | 142 | return 0; |
diff --git a/arch/arm/mach-pxa/include/mach/regs-ac97.h b/arch/arm/mach-pxa/include/mach/regs-ac97.h index e41b9d202b8c..b8d14bd9ae59 100644 --- a/arch/arm/mach-pxa/include/mach/regs-ac97.h +++ b/arch/arm/mach-pxa/include/mach/regs-ac97.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __ASM_ARCH_REGS_AC97_H | 1 | #ifndef __ASM_ARCH_REGS_AC97_H |
2 | #define __ASM_ARCH_REGS_AC97_H | 2 | #define __ASM_ARCH_REGS_AC97_H |
3 | 3 | ||
4 | #include <mach/hardware.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * AC97 Controller registers | 7 | * AC97 Controller registers |
6 | */ | 8 | */ |
diff --git a/arch/arm/mach-pxa/include/mach/regs-ssp.h b/arch/arm/mach-pxa/include/mach/regs-ssp.h index 3c04cde2cf1f..cf31986f6f05 100644 --- a/arch/arm/mach-pxa/include/mach/regs-ssp.h +++ b/arch/arm/mach-pxa/include/mach/regs-ssp.h | |||
@@ -41,6 +41,9 @@ | |||
41 | #elif defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) | 41 | #elif defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) |
42 | #define SSCR0_SCR (0x000fff00) /* Serial Clock Rate (mask) */ | 42 | #define SSCR0_SCR (0x000fff00) /* Serial Clock Rate (mask) */ |
43 | #define SSCR0_SerClkDiv(x) (((x) - 1) << 8) /* Divisor [1..4096] */ | 43 | #define SSCR0_SerClkDiv(x) (((x) - 1) << 8) /* Divisor [1..4096] */ |
44 | #endif | ||
45 | |||
46 | #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) | ||
44 | #define SSCR0_EDSS (1 << 20) /* Extended data size select */ | 47 | #define SSCR0_EDSS (1 << 20) /* Extended data size select */ |
45 | #define SSCR0_NCS (1 << 21) /* Network clock select */ | 48 | #define SSCR0_NCS (1 << 21) /* Network clock select */ |
46 | #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ | 49 | #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ |
diff --git a/arch/arm/mach-pxa/pxa300.c b/arch/arm/mach-pxa/pxa300.c index f735e58e6669..83fb609b6eb7 100644 --- a/arch/arm/mach-pxa/pxa300.c +++ b/arch/arm/mach-pxa/pxa300.c | |||
@@ -88,13 +88,13 @@ static struct pxa3xx_mfp_addr_map pxa310_mfp_addr_map[] __initdata = { | |||
88 | static DEFINE_PXA3_CKEN(common_nand, NAND, 156000000, 0); | 88 | static DEFINE_PXA3_CKEN(common_nand, NAND, 156000000, 0); |
89 | 89 | ||
90 | static struct clk_lookup common_clkregs[] = { | 90 | static struct clk_lookup common_clkregs[] = { |
91 | INIT_CLKREG(&clk_common_nand, "pxa3xx-nand", "NANDCLK"), | 91 | INIT_CLKREG(&clk_common_nand, "pxa3xx-nand", NULL), |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static DEFINE_PXA3_CKEN(pxa310_mmc3, MMC3, 19500000, 0); | 94 | static DEFINE_PXA3_CKEN(pxa310_mmc3, MMC3, 19500000, 0); |
95 | 95 | ||
96 | static struct clk_lookup pxa310_clkregs[] = { | 96 | static struct clk_lookup pxa310_clkregs[] = { |
97 | INIT_CLKREG(&clk_pxa310_mmc3, "pxa2xx-mci.2", "MMCCLK"), | 97 | INIT_CLKREG(&clk_pxa310_mmc3, "pxa2xx-mci.2", NULL), |
98 | }; | 98 | }; |
99 | 99 | ||
100 | static int __init pxa300_init(void) | 100 | static int __init pxa300_init(void) |
diff --git a/arch/arm/mach-pxa/pxa320.c b/arch/arm/mach-pxa/pxa320.c index effe408c186f..36f066196fa2 100644 --- a/arch/arm/mach-pxa/pxa320.c +++ b/arch/arm/mach-pxa/pxa320.c | |||
@@ -83,7 +83,7 @@ static struct pxa3xx_mfp_addr_map pxa320_mfp_addr_map[] __initdata = { | |||
83 | static DEFINE_PXA3_CKEN(pxa320_nand, NAND, 104000000, 0); | 83 | static DEFINE_PXA3_CKEN(pxa320_nand, NAND, 104000000, 0); |
84 | 84 | ||
85 | static struct clk_lookup pxa320_clkregs[] = { | 85 | static struct clk_lookup pxa320_clkregs[] = { |
86 | INIT_CLKREG(&clk_pxa320_nand, "pxa3xx-nand", "NANDCLK"), | 86 | INIT_CLKREG(&clk_pxa320_nand, "pxa3xx-nand", NULL), |
87 | }; | 87 | }; |
88 | 88 | ||
89 | static int __init pxa320_init(void) | 89 | static int __init pxa320_init(void) |
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts index 909a89cab9ac..3ebf7ec0484c 100644 --- a/arch/powerpc/boot/dts/mpc8313erdb.dts +++ b/arch/powerpc/boot/dts/mpc8313erdb.dts | |||
@@ -191,7 +191,8 @@ | |||
191 | interrupts = <37 0x8 36 0x8 35 0x8>; | 191 | interrupts = <37 0x8 36 0x8 35 0x8>; |
192 | interrupt-parent = <&ipic>; | 192 | interrupt-parent = <&ipic>; |
193 | tbi-handle = < &tbi0 >; | 193 | tbi-handle = < &tbi0 >; |
194 | phy-handle = < &phy1 >; | 194 | /* Vitesse 7385 isn't on the MDIO bus */ |
195 | fixed-link = <1 1 1000 0 0>; | ||
195 | fsl,magic-packet; | 196 | fsl,magic-packet; |
196 | 197 | ||
197 | mdio@24520 { | 198 | mdio@24520 { |
@@ -199,12 +200,6 @@ | |||
199 | #size-cells = <0>; | 200 | #size-cells = <0>; |
200 | compatible = "fsl,gianfar-mdio"; | 201 | compatible = "fsl,gianfar-mdio"; |
201 | reg = <0x24520 0x20>; | 202 | reg = <0x24520 0x20>; |
202 | phy1: ethernet-phy@1 { | ||
203 | interrupt-parent = <&ipic>; | ||
204 | interrupts = <19 0x8>; | ||
205 | reg = <0x1>; | ||
206 | device_type = "ethernet-phy"; | ||
207 | }; | ||
208 | phy4: ethernet-phy@4 { | 203 | phy4: ethernet-phy@4 { |
209 | interrupt-parent = <&ipic>; | 204 | interrupt-parent = <&ipic>; |
210 | interrupts = <20 0x8>; | 205 | interrupts = <20 0x8>; |
@@ -219,6 +214,8 @@ | |||
219 | }; | 214 | }; |
220 | 215 | ||
221 | enet1: ethernet@25000 { | 216 | enet1: ethernet@25000 { |
217 | #address-cells = <1>; | ||
218 | #size-cells = <1>; | ||
222 | cell-index = <1>; | 219 | cell-index = <1>; |
223 | device_type = "network"; | 220 | device_type = "network"; |
224 | model = "eTSEC"; | 221 | model = "eTSEC"; |
diff --git a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig index 9e47ae957e2e..409d017621a8 100644 --- a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig +++ b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig | |||
@@ -651,7 +651,7 @@ CONFIG_CICADA_PHY=y | |||
651 | # CONFIG_NATIONAL_PHY is not set | 651 | # CONFIG_NATIONAL_PHY is not set |
652 | # CONFIG_STE10XP is not set | 652 | # CONFIG_STE10XP is not set |
653 | # CONFIG_LSI_ET1011C_PHY is not set | 653 | # CONFIG_LSI_ET1011C_PHY is not set |
654 | # CONFIG_FIXED_PHY is not set | 654 | CONFIG_FIXED_PHY=y |
655 | # CONFIG_MDIO_BITBANG is not set | 655 | # CONFIG_MDIO_BITBANG is not set |
656 | CONFIG_NET_ETHERNET=y | 656 | CONFIG_NET_ETHERNET=y |
657 | CONFIG_MII=y | 657 | CONFIG_MII=y |
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index 5355244c99ff..60c60ccf5e3c 100644 --- a/arch/powerpc/kernel/ftrace.c +++ b/arch/powerpc/kernel/ftrace.c | |||
@@ -195,8 +195,9 @@ __ftrace_make_nop(struct module *mod, | |||
195 | return -EINVAL; | 195 | return -EINVAL; |
196 | } | 196 | } |
197 | 197 | ||
198 | offset = (unsigned)((unsigned short)jmp[0]) << 16 | | 198 | /* The bottom half is signed extended */ |
199 | (unsigned)((unsigned short)jmp[1]); | 199 | offset = ((unsigned)((unsigned short)jmp[0]) << 16) + |
200 | (int)((short)jmp[1]); | ||
200 | 201 | ||
201 | DEBUGP(" %x ", offset); | 202 | DEBUGP(" %x ", offset); |
202 | 203 | ||
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 19b12d2cbb4b..0f4181272311 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -561,8 +561,21 @@ int pci_mmap_legacy_page_range(struct pci_bus *bus, | |||
561 | (unsigned long long)(offset + size - 1)); | 561 | (unsigned long long)(offset + size - 1)); |
562 | 562 | ||
563 | if (mmap_state == pci_mmap_mem) { | 563 | if (mmap_state == pci_mmap_mem) { |
564 | if ((offset + size) > hose->isa_mem_size) | 564 | /* Hack alert ! |
565 | return -ENXIO; | 565 | * |
566 | * Because X is lame and can fail starting if it gets an error trying | ||
567 | * to mmap legacy_mem (instead of just moving on without legacy memory | ||
568 | * access) we fake it here by giving it anonymous memory, effectively | ||
569 | * behaving just like /dev/zero | ||
570 | */ | ||
571 | if ((offset + size) > hose->isa_mem_size) { | ||
572 | printk(KERN_DEBUG | ||
573 | "Process %s (pid:%d) mapped non-existing PCI legacy memory for 0%04x:%02x\n", | ||
574 | current->comm, current->pid, pci_domain_nr(bus), bus->number); | ||
575 | if (vma->vm_flags & VM_SHARED) | ||
576 | return shmem_zero_setup(vma); | ||
577 | return 0; | ||
578 | } | ||
566 | offset += hose->isa_mem_phys; | 579 | offset += hose->isa_mem_phys; |
567 | } else { | 580 | } else { |
568 | unsigned long io_offset = (unsigned long)hose->io_base_virt - _IO_BASE; | 581 | unsigned long io_offset = (unsigned long)hose->io_base_virt - _IO_BASE; |
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index 4aae0c387645..13b7d54f185b 100644 --- a/arch/powerpc/lib/sstep.c +++ b/arch/powerpc/lib/sstep.c | |||
@@ -172,6 +172,8 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
172 | } | 172 | } |
173 | break; | 173 | break; |
174 | case 0x378: /* orx */ | 174 | case 0x378: /* orx */ |
175 | if (instr & 1) | ||
176 | break; | ||
175 | rs = (instr >> 21) & 0x1f; | 177 | rs = (instr >> 21) & 0x1f; |
176 | rb = (instr >> 11) & 0x1f; | 178 | rb = (instr >> 11) & 0x1f; |
177 | if (rs == rb) { /* mr */ | 179 | if (rs == rb) { /* mr */ |
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c index 1971e4ee3d6e..ea6e41e39d9f 100644 --- a/arch/powerpc/mm/fsl_booke_mmu.c +++ b/arch/powerpc/mm/fsl_booke_mmu.c | |||
@@ -73,7 +73,7 @@ extern unsigned int tlbcam_index; | |||
73 | /* | 73 | /* |
74 | * Return PA for this VA if it is mapped by a CAM, or 0 | 74 | * Return PA for this VA if it is mapped by a CAM, or 0 |
75 | */ | 75 | */ |
76 | unsigned long v_mapped_by_tlbcam(unsigned long va) | 76 | phys_addr_t v_mapped_by_tlbcam(unsigned long va) |
77 | { | 77 | { |
78 | int b; | 78 | int b; |
79 | for (b = 0; b < tlbcam_index; ++b) | 79 | for (b = 0; b < tlbcam_index; ++b) |
@@ -85,7 +85,7 @@ unsigned long v_mapped_by_tlbcam(unsigned long va) | |||
85 | /* | 85 | /* |
86 | * Return VA for a given PA or 0 if not mapped | 86 | * Return VA for a given PA or 0 if not mapped |
87 | */ | 87 | */ |
88 | unsigned long p_mapped_by_tlbcam(unsigned long pa) | 88 | unsigned long p_mapped_by_tlbcam(phys_addr_t pa) |
89 | { | 89 | { |
90 | int b; | 90 | int b; |
91 | for (b = 0; b < tlbcam_index; ++b) | 91 | for (b = 0; b < tlbcam_index; ++b) |
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S index 67850ec9feb3..14af8cedab70 100644 --- a/arch/powerpc/mm/hash_low_32.S +++ b/arch/powerpc/mm/hash_low_32.S | |||
@@ -320,7 +320,7 @@ _GLOBAL(create_hpte) | |||
320 | and r8,r8,r0 /* writable if _RW & _DIRTY */ | 320 | and r8,r8,r0 /* writable if _RW & _DIRTY */ |
321 | rlwimi r5,r5,32-1,30,30 /* _PAGE_USER -> PP msb */ | 321 | rlwimi r5,r5,32-1,30,30 /* _PAGE_USER -> PP msb */ |
322 | rlwimi r5,r5,32-2,31,31 /* _PAGE_USER -> PP lsb */ | 322 | rlwimi r5,r5,32-2,31,31 /* _PAGE_USER -> PP lsb */ |
323 | ori r8,r8,0xe14 /* clear out reserved bits and M */ | 323 | ori r8,r8,0xe04 /* clear out reserved bits */ |
324 | andc r8,r5,r8 /* PP = user? (rw&dirty? 2: 3): 0 */ | 324 | andc r8,r5,r8 /* PP = user? (rw&dirty? 2: 3): 0 */ |
325 | BEGIN_FTR_SECTION | 325 | BEGIN_FTR_SECTION |
326 | rlwinm r8,r8,0,~_PAGE_COHERENT /* clear M (coherence not required) */ | 326 | rlwinm r8,r8,0,~_PAGE_COHERENT /* clear M (coherence not required) */ |
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index 22972cd83cc9..58bcaeba728d 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c | |||
@@ -61,8 +61,8 @@ void setbat(int index, unsigned long virt, phys_addr_t phys, | |||
61 | 61 | ||
62 | #ifdef HAVE_TLBCAM | 62 | #ifdef HAVE_TLBCAM |
63 | extern unsigned int tlbcam_index; | 63 | extern unsigned int tlbcam_index; |
64 | extern unsigned long v_mapped_by_tlbcam(unsigned long va); | 64 | extern phys_addr_t v_mapped_by_tlbcam(unsigned long va); |
65 | extern unsigned long p_mapped_by_tlbcam(unsigned long pa); | 65 | extern unsigned long p_mapped_by_tlbcam(phys_addr_t pa); |
66 | #else /* !HAVE_TLBCAM */ | 66 | #else /* !HAVE_TLBCAM */ |
67 | #define v_mapped_by_tlbcam(x) (0UL) | 67 | #define v_mapped_by_tlbcam(x) (0UL) |
68 | #define p_mapped_by_tlbcam(x) (0UL) | 68 | #define p_mapped_by_tlbcam(x) (0UL) |
diff --git a/arch/powerpc/oprofile/cell/spu_profiler.c b/arch/powerpc/oprofile/cell/spu_profiler.c index 9305ddaac512..b129d007e7fe 100644 --- a/arch/powerpc/oprofile/cell/spu_profiler.c +++ b/arch/powerpc/oprofile/cell/spu_profiler.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <asm/cell-pmu.h> | 18 | #include <asm/cell-pmu.h> |
19 | #include <asm/time.h> | ||
19 | #include "pr_util.h" | 20 | #include "pr_util.h" |
20 | 21 | ||
21 | #define SCALE_SHIFT 14 | 22 | #define SCALE_SHIFT 14 |
diff --git a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c index 9876d7e072f4..ddf0bdc0fc8b 100644 --- a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c +++ b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c | |||
@@ -186,7 +186,7 @@ out_unmap_regs: | |||
186 | iounmap(priv->regs); | 186 | iounmap(priv->regs); |
187 | out_free_bootmem: | 187 | out_free_bootmem: |
188 | free_bootmem((unsigned long)priv, | 188 | free_bootmem((unsigned long)priv, |
189 | sizeof(sizeof(struct pq2ads_pci_pic))); | 189 | sizeof(struct pq2ads_pci_pic)); |
190 | of_node_put(np); | 190 | of_node_put(np); |
191 | out_unmap_irq: | 191 | out_unmap_irq: |
192 | irq_dispose_mapping(irq); | 192 | irq_dispose_mapping(irq); |
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c index a623ad256e9e..9b21ee68ea50 100644 --- a/arch/powerpc/platforms/pseries/hotplug-memory.c +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/firmware.h> | 14 | #include <asm/firmware.h> |
15 | #include <asm/machdep.h> | 15 | #include <asm/machdep.h> |
16 | #include <asm/pSeries_reconfig.h> | 16 | #include <asm/pSeries_reconfig.h> |
17 | #include <asm/sparsemem.h> | ||
17 | 18 | ||
18 | static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size) | 19 | static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size) |
19 | { | 20 | { |
diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c index b16ca3ed65d2..78f1f7cca0a0 100644 --- a/arch/powerpc/sysdev/cpm2_pic.c +++ b/arch/powerpc/sysdev/cpm2_pic.c | |||
@@ -165,7 +165,7 @@ static int cpm2_set_irq_type(unsigned int virq, unsigned int flow_type) | |||
165 | edibit = (14 - (src - CPM2_IRQ_EXT1)); | 165 | edibit = (14 - (src - CPM2_IRQ_EXT1)); |
166 | else | 166 | else |
167 | if (src >= CPM2_IRQ_PORTC15 && src <= CPM2_IRQ_PORTC0) | 167 | if (src >= CPM2_IRQ_PORTC15 && src <= CPM2_IRQ_PORTC0) |
168 | edibit = (31 - (src - CPM2_IRQ_PORTC15)); | 168 | edibit = (31 - (CPM2_IRQ_PORTC0 - src)); |
169 | else | 169 | else |
170 | return (flow_type & IRQ_TYPE_LEVEL_LOW) ? 0 : -EINVAL; | 170 | return (flow_type & IRQ_TYPE_LEVEL_LOW) ? 0 : -EINVAL; |
171 | 171 | ||
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index 88a983ece5c9..9a89cd3e80a2 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c | |||
@@ -890,7 +890,7 @@ unsigned int ipic_get_irq(void) | |||
890 | return irq_linear_revmap(primary_ipic->irqhost, irq); | 890 | return irq_linear_revmap(primary_ipic->irqhost, irq); |
891 | } | 891 | } |
892 | 892 | ||
893 | #ifdef CONFIG_PM | 893 | #ifdef CONFIG_SUSPEND |
894 | static struct { | 894 | static struct { |
895 | u32 sicfr; | 895 | u32 sicfr; |
896 | u32 siprr[2]; | 896 | u32 siprr[2]; |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index a0e748da9909..31e809c77790 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.28-rc6 | 3 | # Linux kernel version: 2.6.29-rc4 |
4 | # Thu Nov 27 11:00:49 2008 | 4 | # Wed Feb 11 10:07:16 2009 |
5 | # | 5 | # |
6 | CONFIG_SCHED_MC=y | 6 | CONFIG_SCHED_MC=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -14,12 +14,14 @@ CONFIG_RWSEM_XCHGADD_ALGORITHM=y | |||
14 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 14 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
15 | CONFIG_GENERIC_HWEIGHT=y | 15 | CONFIG_GENERIC_HWEIGHT=y |
16 | CONFIG_GENERIC_TIME=y | 16 | CONFIG_GENERIC_TIME=y |
17 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
17 | CONFIG_GENERIC_CLOCKEVENTS=y | 18 | CONFIG_GENERIC_CLOCKEVENTS=y |
18 | CONFIG_GENERIC_BUG=y | 19 | CONFIG_GENERIC_BUG=y |
19 | CONFIG_NO_IOMEM=y | 20 | CONFIG_NO_IOMEM=y |
20 | CONFIG_NO_DMA=y | 21 | CONFIG_NO_DMA=y |
21 | CONFIG_GENERIC_LOCKBREAK=y | 22 | CONFIG_GENERIC_LOCKBREAK=y |
22 | CONFIG_PGSTE=y | 23 | CONFIG_PGSTE=y |
24 | CONFIG_VIRT_CPU_ACCOUNTING=y | ||
23 | CONFIG_S390=y | 25 | CONFIG_S390=y |
24 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 26 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
25 | 27 | ||
@@ -39,20 +41,29 @@ CONFIG_POSIX_MQUEUE=y | |||
39 | # CONFIG_TASKSTATS is not set | 41 | # CONFIG_TASKSTATS is not set |
40 | CONFIG_AUDIT=y | 42 | CONFIG_AUDIT=y |
41 | # CONFIG_AUDITSYSCALL is not set | 43 | # CONFIG_AUDITSYSCALL is not set |
44 | |||
45 | # | ||
46 | # RCU Subsystem | ||
47 | # | ||
48 | CONFIG_CLASSIC_RCU=y | ||
49 | # CONFIG_TREE_RCU is not set | ||
50 | # CONFIG_PREEMPT_RCU is not set | ||
51 | # CONFIG_TREE_RCU_TRACE is not set | ||
52 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
42 | CONFIG_IKCONFIG=y | 53 | CONFIG_IKCONFIG=y |
43 | CONFIG_IKCONFIG_PROC=y | 54 | CONFIG_IKCONFIG_PROC=y |
44 | CONFIG_LOG_BUF_SHIFT=17 | 55 | CONFIG_LOG_BUF_SHIFT=17 |
56 | CONFIG_GROUP_SCHED=y | ||
57 | CONFIG_FAIR_GROUP_SCHED=y | ||
58 | # CONFIG_RT_GROUP_SCHED is not set | ||
59 | CONFIG_USER_SCHED=y | ||
60 | # CONFIG_CGROUP_SCHED is not set | ||
45 | CONFIG_CGROUPS=y | 61 | CONFIG_CGROUPS=y |
46 | # CONFIG_CGROUP_DEBUG is not set | 62 | # CONFIG_CGROUP_DEBUG is not set |
47 | CONFIG_CGROUP_NS=y | 63 | CONFIG_CGROUP_NS=y |
48 | # CONFIG_CGROUP_FREEZER is not set | 64 | # CONFIG_CGROUP_FREEZER is not set |
49 | # CONFIG_CGROUP_DEVICE is not set | 65 | # CONFIG_CGROUP_DEVICE is not set |
50 | # CONFIG_CPUSETS is not set | 66 | # CONFIG_CPUSETS is not set |
51 | CONFIG_GROUP_SCHED=y | ||
52 | CONFIG_FAIR_GROUP_SCHED=y | ||
53 | # CONFIG_RT_GROUP_SCHED is not set | ||
54 | CONFIG_USER_SCHED=y | ||
55 | # CONFIG_CGROUP_SCHED is not set | ||
56 | # CONFIG_CGROUP_CPUACCT is not set | 67 | # CONFIG_CGROUP_CPUACCT is not set |
57 | # CONFIG_RESOURCE_COUNTERS is not set | 68 | # CONFIG_RESOURCE_COUNTERS is not set |
58 | CONFIG_SYSFS_DEPRECATED=y | 69 | CONFIG_SYSFS_DEPRECATED=y |
@@ -63,6 +74,7 @@ CONFIG_UTS_NS=y | |||
63 | CONFIG_IPC_NS=y | 74 | CONFIG_IPC_NS=y |
64 | # CONFIG_USER_NS is not set | 75 | # CONFIG_USER_NS is not set |
65 | # CONFIG_PID_NS is not set | 76 | # CONFIG_PID_NS is not set |
77 | # CONFIG_NET_NS is not set | ||
66 | CONFIG_BLK_DEV_INITRD=y | 78 | CONFIG_BLK_DEV_INITRD=y |
67 | CONFIG_INITRAMFS_SOURCE="" | 79 | CONFIG_INITRAMFS_SOURCE="" |
68 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 80 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -91,17 +103,17 @@ CONFIG_SLAB=y | |||
91 | # CONFIG_SLUB is not set | 103 | # CONFIG_SLUB is not set |
92 | # CONFIG_SLOB is not set | 104 | # CONFIG_SLOB is not set |
93 | # CONFIG_PROFILING is not set | 105 | # CONFIG_PROFILING is not set |
94 | # CONFIG_MARKERS is not set | ||
95 | CONFIG_HAVE_OPROFILE=y | 106 | CONFIG_HAVE_OPROFILE=y |
96 | CONFIG_KPROBES=y | 107 | CONFIG_KPROBES=y |
108 | CONFIG_HAVE_SYSCALL_WRAPPERS=y | ||
97 | CONFIG_KRETPROBES=y | 109 | CONFIG_KRETPROBES=y |
98 | CONFIG_HAVE_KPROBES=y | 110 | CONFIG_HAVE_KPROBES=y |
99 | CONFIG_HAVE_KRETPROBES=y | 111 | CONFIG_HAVE_KRETPROBES=y |
100 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 112 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
113 | CONFIG_USE_GENERIC_SMP_HELPERS=y | ||
101 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 114 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
102 | CONFIG_SLABINFO=y | 115 | CONFIG_SLABINFO=y |
103 | CONFIG_RT_MUTEXES=y | 116 | CONFIG_RT_MUTEXES=y |
104 | # CONFIG_TINY_SHMEM is not set | ||
105 | CONFIG_BASE_SMALL=0 | 117 | CONFIG_BASE_SMALL=0 |
106 | CONFIG_MODULES=y | 118 | CONFIG_MODULES=y |
107 | # CONFIG_MODULE_FORCE_LOAD is not set | 119 | # CONFIG_MODULE_FORCE_LOAD is not set |
@@ -109,7 +121,7 @@ CONFIG_MODULE_UNLOAD=y | |||
109 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 121 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
110 | CONFIG_MODVERSIONS=y | 122 | CONFIG_MODVERSIONS=y |
111 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 123 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
112 | CONFIG_KMOD=y | 124 | CONFIG_INIT_ALL_POSSIBLE=y |
113 | CONFIG_STOP_MACHINE=y | 125 | CONFIG_STOP_MACHINE=y |
114 | CONFIG_BLOCK=y | 126 | CONFIG_BLOCK=y |
115 | # CONFIG_BLK_DEV_IO_TRACE is not set | 127 | # CONFIG_BLK_DEV_IO_TRACE is not set |
@@ -130,7 +142,6 @@ CONFIG_DEFAULT_DEADLINE=y | |||
130 | # CONFIG_DEFAULT_NOOP is not set | 142 | # CONFIG_DEFAULT_NOOP is not set |
131 | CONFIG_DEFAULT_IOSCHED="deadline" | 143 | CONFIG_DEFAULT_IOSCHED="deadline" |
132 | CONFIG_PREEMPT_NOTIFIERS=y | 144 | CONFIG_PREEMPT_NOTIFIERS=y |
133 | CONFIG_CLASSIC_RCU=y | ||
134 | # CONFIG_FREEZER is not set | 145 | # CONFIG_FREEZER is not set |
135 | 146 | ||
136 | # | 147 | # |
@@ -161,6 +172,7 @@ CONFIG_S390_EXEC_PROTECT=y | |||
161 | CONFIG_MARCH_Z900=y | 172 | CONFIG_MARCH_Z900=y |
162 | # CONFIG_MARCH_Z990 is not set | 173 | # CONFIG_MARCH_Z990 is not set |
163 | # CONFIG_MARCH_Z9_109 is not set | 174 | # CONFIG_MARCH_Z9_109 is not set |
175 | # CONFIG_MARCH_Z10 is not set | ||
164 | CONFIG_PACK_STACK=y | 176 | CONFIG_PACK_STACK=y |
165 | # CONFIG_SMALL_STACK is not set | 177 | # CONFIG_SMALL_STACK is not set |
166 | CONFIG_CHECK_STACK=y | 178 | CONFIG_CHECK_STACK=y |
@@ -174,7 +186,6 @@ CONFIG_ARCH_POPULATES_NODE_MAP=y | |||
174 | # CONFIG_PREEMPT_NONE is not set | 186 | # CONFIG_PREEMPT_NONE is not set |
175 | # CONFIG_PREEMPT_VOLUNTARY is not set | 187 | # CONFIG_PREEMPT_VOLUNTARY is not set |
176 | CONFIG_PREEMPT=y | 188 | CONFIG_PREEMPT=y |
177 | # CONFIG_PREEMPT_RCU is not set | ||
178 | CONFIG_ARCH_SPARSEMEM_ENABLE=y | 189 | CONFIG_ARCH_SPARSEMEM_ENABLE=y |
179 | CONFIG_ARCH_SPARSEMEM_DEFAULT=y | 190 | CONFIG_ARCH_SPARSEMEM_DEFAULT=y |
180 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | 191 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y |
@@ -195,7 +206,6 @@ CONFIG_MEMORY_HOTREMOVE=y | |||
195 | CONFIG_PAGEFLAGS_EXTENDED=y | 206 | CONFIG_PAGEFLAGS_EXTENDED=y |
196 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 207 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
197 | CONFIG_MIGRATION=y | 208 | CONFIG_MIGRATION=y |
198 | CONFIG_RESOURCES_64BIT=y | ||
199 | CONFIG_PHYS_ADDR_T_64BIT=y | 209 | CONFIG_PHYS_ADDR_T_64BIT=y |
200 | CONFIG_ZONE_DMA_FLAG=1 | 210 | CONFIG_ZONE_DMA_FLAG=1 |
201 | CONFIG_BOUNCE=y | 211 | CONFIG_BOUNCE=y |
@@ -207,7 +217,6 @@ CONFIG_UNEVICTABLE_LRU=y | |||
207 | # | 217 | # |
208 | CONFIG_MACHCHK_WARNING=y | 218 | CONFIG_MACHCHK_WARNING=y |
209 | CONFIG_QDIO=y | 219 | CONFIG_QDIO=y |
210 | # CONFIG_QDIO_DEBUG is not set | ||
211 | CONFIG_CHSC_SCH=m | 220 | CONFIG_CHSC_SCH=m |
212 | 221 | ||
213 | # | 222 | # |
@@ -227,15 +236,13 @@ CONFIG_PFAULT=y | |||
227 | # CONFIG_SHARED_KERNEL is not set | 236 | # CONFIG_SHARED_KERNEL is not set |
228 | # CONFIG_CMM is not set | 237 | # CONFIG_CMM is not set |
229 | # CONFIG_PAGE_STATES is not set | 238 | # CONFIG_PAGE_STATES is not set |
230 | CONFIG_VIRT_TIMER=y | ||
231 | CONFIG_VIRT_CPU_ACCOUNTING=y | ||
232 | # CONFIG_APPLDATA_BASE is not set | 239 | # CONFIG_APPLDATA_BASE is not set |
233 | CONFIG_HZ_100=y | 240 | CONFIG_HZ_100=y |
234 | # CONFIG_HZ_250 is not set | 241 | # CONFIG_HZ_250 is not set |
235 | # CONFIG_HZ_300 is not set | 242 | # CONFIG_HZ_300 is not set |
236 | # CONFIG_HZ_1000 is not set | 243 | # CONFIG_HZ_1000 is not set |
237 | CONFIG_HZ=100 | 244 | CONFIG_HZ=100 |
238 | # CONFIG_SCHED_HRTICK is not set | 245 | CONFIG_SCHED_HRTICK=y |
239 | CONFIG_S390_HYPFS_FS=y | 246 | CONFIG_S390_HYPFS_FS=y |
240 | CONFIG_KEXEC=y | 247 | CONFIG_KEXEC=y |
241 | # CONFIG_ZFCPDUMP is not set | 248 | # CONFIG_ZFCPDUMP is not set |
@@ -245,6 +252,7 @@ CONFIG_NET=y | |||
245 | # | 252 | # |
246 | # Networking options | 253 | # Networking options |
247 | # | 254 | # |
255 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
248 | CONFIG_PACKET=y | 256 | CONFIG_PACKET=y |
249 | # CONFIG_PACKET_MMAP is not set | 257 | # CONFIG_PACKET_MMAP is not set |
250 | CONFIG_UNIX=y | 258 | CONFIG_UNIX=y |
@@ -383,6 +391,7 @@ CONFIG_NET_SCH_TBF=m | |||
383 | CONFIG_NET_SCH_GRED=m | 391 | CONFIG_NET_SCH_GRED=m |
384 | CONFIG_NET_SCH_DSMARK=m | 392 | CONFIG_NET_SCH_DSMARK=m |
385 | # CONFIG_NET_SCH_NETEM is not set | 393 | # CONFIG_NET_SCH_NETEM is not set |
394 | # CONFIG_NET_SCH_DRR is not set | ||
386 | # CONFIG_NET_SCH_INGRESS is not set | 395 | # CONFIG_NET_SCH_INGRESS is not set |
387 | 396 | ||
388 | # | 397 | # |
@@ -400,6 +409,7 @@ CONFIG_CLS_U32_MARK=y | |||
400 | CONFIG_NET_CLS_RSVP=m | 409 | CONFIG_NET_CLS_RSVP=m |
401 | CONFIG_NET_CLS_RSVP6=m | 410 | CONFIG_NET_CLS_RSVP6=m |
402 | CONFIG_NET_CLS_FLOW=m | 411 | CONFIG_NET_CLS_FLOW=m |
412 | # CONFIG_NET_CLS_CGROUP is not set | ||
403 | # CONFIG_NET_EMATCH is not set | 413 | # CONFIG_NET_EMATCH is not set |
404 | CONFIG_NET_CLS_ACT=y | 414 | CONFIG_NET_CLS_ACT=y |
405 | CONFIG_NET_ACT_POLICE=y | 415 | CONFIG_NET_ACT_POLICE=y |
@@ -411,6 +421,7 @@ CONFIG_NET_ACT_NAT=m | |||
411 | # CONFIG_NET_ACT_SKBEDIT is not set | 421 | # CONFIG_NET_ACT_SKBEDIT is not set |
412 | # CONFIG_NET_CLS_IND is not set | 422 | # CONFIG_NET_CLS_IND is not set |
413 | CONFIG_NET_SCH_FIFO=y | 423 | CONFIG_NET_SCH_FIFO=y |
424 | # CONFIG_DCB is not set | ||
414 | 425 | ||
415 | # | 426 | # |
416 | # Network testing | 427 | # Network testing |
@@ -428,6 +439,7 @@ CONFIG_CAN_VCAN=m | |||
428 | # CONFIG_CAN_DEBUG_DEVICES is not set | 439 | # CONFIG_CAN_DEBUG_DEVICES is not set |
429 | # CONFIG_AF_RXRPC is not set | 440 | # CONFIG_AF_RXRPC is not set |
430 | # CONFIG_PHONET is not set | 441 | # CONFIG_PHONET is not set |
442 | # CONFIG_WIMAX is not set | ||
431 | # CONFIG_RFKILL is not set | 443 | # CONFIG_RFKILL is not set |
432 | # CONFIG_NET_9P is not set | 444 | # CONFIG_NET_9P is not set |
433 | # CONFIG_PCMCIA is not set | 445 | # CONFIG_PCMCIA is not set |
@@ -475,11 +487,15 @@ CONFIG_DASD_DIAG=y | |||
475 | CONFIG_DASD_EER=y | 487 | CONFIG_DASD_EER=y |
476 | CONFIG_VIRTIO_BLK=m | 488 | CONFIG_VIRTIO_BLK=m |
477 | CONFIG_MISC_DEVICES=y | 489 | CONFIG_MISC_DEVICES=y |
478 | # CONFIG_EEPROM_93CX6 is not set | ||
479 | # CONFIG_ENCLOSURE_SERVICES is not set | 490 | # CONFIG_ENCLOSURE_SERVICES is not set |
480 | # CONFIG_C2PORT is not set | 491 | # CONFIG_C2PORT is not set |
481 | 492 | ||
482 | # | 493 | # |
494 | # EEPROM support | ||
495 | # | ||
496 | # CONFIG_EEPROM_93CX6 is not set | ||
497 | |||
498 | # | ||
483 | # SCSI device support | 499 | # SCSI device support |
484 | # | 500 | # |
485 | # CONFIG_RAID_ATTRS is not set | 501 | # CONFIG_RAID_ATTRS is not set |
@@ -520,6 +536,7 @@ CONFIG_SCSI_FC_ATTRS=y | |||
520 | # CONFIG_SCSI_SRP_ATTRS is not set | 536 | # CONFIG_SCSI_SRP_ATTRS is not set |
521 | CONFIG_SCSI_LOWLEVEL=y | 537 | CONFIG_SCSI_LOWLEVEL=y |
522 | # CONFIG_ISCSI_TCP is not set | 538 | # CONFIG_ISCSI_TCP is not set |
539 | # CONFIG_LIBFC is not set | ||
523 | # CONFIG_SCSI_DEBUG is not set | 540 | # CONFIG_SCSI_DEBUG is not set |
524 | CONFIG_ZFCP=y | 541 | CONFIG_ZFCP=y |
525 | CONFIG_SCSI_DH=m | 542 | CONFIG_SCSI_DH=m |
@@ -566,6 +583,10 @@ CONFIG_NET_ETHERNET=y | |||
566 | CONFIG_NETDEV_1000=y | 583 | CONFIG_NETDEV_1000=y |
567 | CONFIG_NETDEV_10000=y | 584 | CONFIG_NETDEV_10000=y |
568 | # CONFIG_TR is not set | 585 | # CONFIG_TR is not set |
586 | |||
587 | # | ||
588 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
589 | # | ||
569 | # CONFIG_WAN is not set | 590 | # CONFIG_WAN is not set |
570 | 591 | ||
571 | # | 592 | # |
@@ -593,9 +614,11 @@ CONFIG_VIRTIO_NET=m | |||
593 | # | 614 | # |
594 | CONFIG_DEVKMEM=y | 615 | CONFIG_DEVKMEM=y |
595 | CONFIG_UNIX98_PTYS=y | 616 | CONFIG_UNIX98_PTYS=y |
617 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
596 | CONFIG_LEGACY_PTYS=y | 618 | CONFIG_LEGACY_PTYS=y |
597 | CONFIG_LEGACY_PTY_COUNT=256 | 619 | CONFIG_LEGACY_PTY_COUNT=256 |
598 | CONFIG_HVC_DRIVER=y | 620 | CONFIG_HVC_DRIVER=y |
621 | CONFIG_HVC_IUCV=y | ||
599 | CONFIG_VIRTIO_CONSOLE=y | 622 | CONFIG_VIRTIO_CONSOLE=y |
600 | CONFIG_HW_RANDOM=m | 623 | CONFIG_HW_RANDOM=m |
601 | CONFIG_HW_RANDOM_VIRTIO=m | 624 | CONFIG_HW_RANDOM_VIRTIO=m |
@@ -645,7 +668,6 @@ CONFIG_S390_VMUR=m | |||
645 | # CONFIG_NEW_LEDS is not set | 668 | # CONFIG_NEW_LEDS is not set |
646 | CONFIG_ACCESSIBILITY=y | 669 | CONFIG_ACCESSIBILITY=y |
647 | # CONFIG_STAGING is not set | 670 | # CONFIG_STAGING is not set |
648 | CONFIG_STAGING_EXCLUDE_BUILD=y | ||
649 | 671 | ||
650 | # | 672 | # |
651 | # File systems | 673 | # File systems |
@@ -668,6 +690,7 @@ CONFIG_FILE_LOCKING=y | |||
668 | # CONFIG_XFS_FS is not set | 690 | # CONFIG_XFS_FS is not set |
669 | # CONFIG_GFS2_FS is not set | 691 | # CONFIG_GFS2_FS is not set |
670 | # CONFIG_OCFS2_FS is not set | 692 | # CONFIG_OCFS2_FS is not set |
693 | # CONFIG_BTRFS_FS is not set | ||
671 | CONFIG_DNOTIFY=y | 694 | CONFIG_DNOTIFY=y |
672 | CONFIG_INOTIFY=y | 695 | CONFIG_INOTIFY=y |
673 | CONFIG_INOTIFY_USER=y | 696 | CONFIG_INOTIFY_USER=y |
@@ -703,10 +726,7 @@ CONFIG_TMPFS_POSIX_ACL=y | |||
703 | # CONFIG_HUGETLBFS is not set | 726 | # CONFIG_HUGETLBFS is not set |
704 | # CONFIG_HUGETLB_PAGE is not set | 727 | # CONFIG_HUGETLB_PAGE is not set |
705 | CONFIG_CONFIGFS_FS=m | 728 | CONFIG_CONFIGFS_FS=m |
706 | 729 | CONFIG_MISC_FILESYSTEMS=y | |
707 | # | ||
708 | # Miscellaneous filesystems | ||
709 | # | ||
710 | # CONFIG_ADFS_FS is not set | 730 | # CONFIG_ADFS_FS is not set |
711 | # CONFIG_AFFS_FS is not set | 731 | # CONFIG_AFFS_FS is not set |
712 | # CONFIG_HFS_FS is not set | 732 | # CONFIG_HFS_FS is not set |
@@ -715,6 +735,7 @@ CONFIG_CONFIGFS_FS=m | |||
715 | # CONFIG_BFS_FS is not set | 735 | # CONFIG_BFS_FS is not set |
716 | # CONFIG_EFS_FS is not set | 736 | # CONFIG_EFS_FS is not set |
717 | # CONFIG_CRAMFS is not set | 737 | # CONFIG_CRAMFS is not set |
738 | # CONFIG_SQUASHFS is not set | ||
718 | # CONFIG_VXFS_FS is not set | 739 | # CONFIG_VXFS_FS is not set |
719 | # CONFIG_MINIX_FS is not set | 740 | # CONFIG_MINIX_FS is not set |
720 | # CONFIG_OMFS_FS is not set | 741 | # CONFIG_OMFS_FS is not set |
@@ -808,6 +829,7 @@ CONFIG_DEBUG_BUGVERBOSE=y | |||
808 | CONFIG_DEBUG_MEMORY_INIT=y | 829 | CONFIG_DEBUG_MEMORY_INIT=y |
809 | # CONFIG_DEBUG_LIST is not set | 830 | # CONFIG_DEBUG_LIST is not set |
810 | # CONFIG_DEBUG_SG is not set | 831 | # CONFIG_DEBUG_SG is not set |
832 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
811 | # CONFIG_FRAME_POINTER is not set | 833 | # CONFIG_FRAME_POINTER is not set |
812 | # CONFIG_RCU_TORTURE_TEST is not set | 834 | # CONFIG_RCU_TORTURE_TEST is not set |
813 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 835 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
@@ -818,15 +840,19 @@ CONFIG_DEBUG_MEMORY_INIT=y | |||
818 | # CONFIG_FAULT_INJECTION is not set | 840 | # CONFIG_FAULT_INJECTION is not set |
819 | # CONFIG_LATENCYTOP is not set | 841 | # CONFIG_LATENCYTOP is not set |
820 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 842 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
843 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
821 | 844 | ||
822 | # | 845 | # |
823 | # Tracers | 846 | # Tracers |
824 | # | 847 | # |
848 | # CONFIG_FUNCTION_TRACER is not set | ||
825 | # CONFIG_IRQSOFF_TRACER is not set | 849 | # CONFIG_IRQSOFF_TRACER is not set |
826 | # CONFIG_PREEMPT_TRACER is not set | 850 | # CONFIG_PREEMPT_TRACER is not set |
827 | # CONFIG_SCHED_TRACER is not set | 851 | # CONFIG_SCHED_TRACER is not set |
828 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | 852 | # CONFIG_CONTEXT_SWITCH_TRACER is not set |
829 | # CONFIG_BOOT_TRACER is not set | 853 | # CONFIG_BOOT_TRACER is not set |
854 | # CONFIG_TRACE_BRANCH_PROFILING is not set | ||
855 | # CONFIG_STACK_TRACER is not set | ||
830 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | 856 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set |
831 | CONFIG_SAMPLES=y | 857 | CONFIG_SAMPLES=y |
832 | # CONFIG_SAMPLE_KOBJECT is not set | 858 | # CONFIG_SAMPLE_KOBJECT is not set |
@@ -847,11 +873,17 @@ CONFIG_CRYPTO=y | |||
847 | # | 873 | # |
848 | CONFIG_CRYPTO_FIPS=y | 874 | CONFIG_CRYPTO_FIPS=y |
849 | CONFIG_CRYPTO_ALGAPI=y | 875 | CONFIG_CRYPTO_ALGAPI=y |
850 | CONFIG_CRYPTO_AEAD=y | 876 | CONFIG_CRYPTO_ALGAPI2=y |
877 | CONFIG_CRYPTO_AEAD=m | ||
878 | CONFIG_CRYPTO_AEAD2=y | ||
851 | CONFIG_CRYPTO_BLKCIPHER=y | 879 | CONFIG_CRYPTO_BLKCIPHER=y |
852 | CONFIG_CRYPTO_HASH=y | 880 | CONFIG_CRYPTO_BLKCIPHER2=y |
853 | CONFIG_CRYPTO_RNG=y | 881 | CONFIG_CRYPTO_HASH=m |
882 | CONFIG_CRYPTO_HASH2=y | ||
883 | CONFIG_CRYPTO_RNG=m | ||
884 | CONFIG_CRYPTO_RNG2=y | ||
854 | CONFIG_CRYPTO_MANAGER=y | 885 | CONFIG_CRYPTO_MANAGER=y |
886 | CONFIG_CRYPTO_MANAGER2=y | ||
855 | CONFIG_CRYPTO_GF128MUL=m | 887 | CONFIG_CRYPTO_GF128MUL=m |
856 | # CONFIG_CRYPTO_NULL is not set | 888 | # CONFIG_CRYPTO_NULL is not set |
857 | # CONFIG_CRYPTO_CRYPTD is not set | 889 | # CONFIG_CRYPTO_CRYPTD is not set |
@@ -885,7 +917,7 @@ CONFIG_CRYPTO_HMAC=m | |||
885 | # | 917 | # |
886 | # Digest | 918 | # Digest |
887 | # | 919 | # |
888 | # CONFIG_CRYPTO_CRC32C is not set | 920 | CONFIG_CRYPTO_CRC32C=m |
889 | # CONFIG_CRYPTO_MD4 is not set | 921 | # CONFIG_CRYPTO_MD4 is not set |
890 | CONFIG_CRYPTO_MD5=m | 922 | CONFIG_CRYPTO_MD5=m |
891 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | 923 | # CONFIG_CRYPTO_MICHAEL_MIC is not set |
@@ -942,6 +974,7 @@ CONFIG_S390_PRNG=m | |||
942 | # Library routines | 974 | # Library routines |
943 | # | 975 | # |
944 | CONFIG_BITREVERSE=m | 976 | CONFIG_BITREVERSE=m |
977 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
945 | # CONFIG_CRC_CCITT is not set | 978 | # CONFIG_CRC_CCITT is not set |
946 | # CONFIG_CRC16 is not set | 979 | # CONFIG_CRC16 is not set |
947 | CONFIG_CRC_T10DIF=y | 980 | CONFIG_CRC_T10DIF=y |
diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h index ffdef5fe8587..f3720defdd16 100644 --- a/arch/s390/include/asm/lowcore.h +++ b/arch/s390/include/asm/lowcore.h | |||
@@ -384,8 +384,8 @@ struct _lowcore | |||
384 | __u32 panic_magic; /* 0xe00 */ | 384 | __u32 panic_magic; /* 0xe00 */ |
385 | 385 | ||
386 | /* Per cpu primary space access list */ | 386 | /* Per cpu primary space access list */ |
387 | __u8 pad_0xe04[0xe3c-0xe04]; /* 0xe04 */ | 387 | __u8 pad_0xe04[0xe38-0xe04]; /* 0xe04 */ |
388 | __u32 vdso_per_cpu_data; /* 0xe3c */ | 388 | __u64 vdso_per_cpu_data; /* 0xe38 */ |
389 | __u32 paste[16]; /* 0xe40 */ | 389 | __u32 paste[16]; /* 0xe40 */ |
390 | 390 | ||
391 | __u8 pad13[0x11b8-0xe80]; /* 0xe80 */ | 391 | __u8 pad13[0x11b8-0xe80]; /* 0xe80 */ |
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index e7c5bfb7c755..026a37a94fc9 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c | |||
@@ -95,6 +95,7 @@ asmlinkage void do_softirq(void) | |||
95 | local_irq_restore(flags); | 95 | local_irq_restore(flags); |
96 | } | 96 | } |
97 | 97 | ||
98 | #ifdef CONFIG_PROC_FS | ||
98 | void init_irq_proc(void) | 99 | void init_irq_proc(void) |
99 | { | 100 | { |
100 | struct proc_dir_entry *root_irq_dir; | 101 | struct proc_dir_entry *root_irq_dir; |
@@ -102,3 +103,4 @@ void init_irq_proc(void) | |||
102 | root_irq_dir = proc_mkdir("irq", NULL); | 103 | root_irq_dir = proc_mkdir("irq", NULL); |
103 | create_prof_cpu_mask(root_irq_dir); | 104 | create_prof_cpu_mask(root_irq_dir); |
104 | } | 105 | } |
106 | #endif | ||
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S index 8ffee714f932..a46c3a21e26d 100644 --- a/arch/sparc/kernel/head_64.S +++ b/arch/sparc/kernel/head_64.S | |||
@@ -891,10 +891,35 @@ prom_tba: .xword 0 | |||
891 | tlb_type: .word 0 /* Must NOT end up in BSS */ | 891 | tlb_type: .word 0 /* Must NOT end up in BSS */ |
892 | .section ".fixup",#alloc,#execinstr | 892 | .section ".fixup",#alloc,#execinstr |
893 | 893 | ||
894 | .globl __ret_efault, __retl_efault | 894 | .globl __ret_efault, __retl_efault, __ret_one, __retl_one |
895 | __ret_efault: | 895 | ENTRY(__ret_efault) |
896 | ret | 896 | ret |
897 | restore %g0, -EFAULT, %o0 | 897 | restore %g0, -EFAULT, %o0 |
898 | __retl_efault: | 898 | ENDPROC(__ret_efault) |
899 | |||
900 | ENTRY(__retl_efault) | ||
899 | retl | 901 | retl |
900 | mov -EFAULT, %o0 | 902 | mov -EFAULT, %o0 |
903 | ENDPROC(__retl_efault) | ||
904 | |||
905 | ENTRY(__retl_one) | ||
906 | retl | ||
907 | mov 1, %o0 | ||
908 | ENDPROC(__retl_one) | ||
909 | |||
910 | ENTRY(__ret_one_asi) | ||
911 | wr %g0, ASI_AIUS, %asi | ||
912 | ret | ||
913 | restore %g0, 1, %o0 | ||
914 | ENDPROC(__ret_one_asi) | ||
915 | |||
916 | ENTRY(__retl_one_asi) | ||
917 | wr %g0, ASI_AIUS, %asi | ||
918 | retl | ||
919 | mov 1, %o0 | ||
920 | ENDPROC(__retl_one_asi) | ||
921 | |||
922 | ENTRY(__retl_o1) | ||
923 | retl | ||
924 | mov %o1, %o0 | ||
925 | ENDPROC(__retl_o1) | ||
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c index 09f088ed4a64..f3577223c863 100644 --- a/arch/sparc/kernel/nmi.c +++ b/arch/sparc/kernel/nmi.c | |||
@@ -70,6 +70,7 @@ static void die_nmi(const char *str, struct pt_regs *regs, int do_panic) | |||
70 | printk(" on CPU%d, ip %08lx, registers:\n", | 70 | printk(" on CPU%d, ip %08lx, registers:\n", |
71 | smp_processor_id(), regs->tpc); | 71 | smp_processor_id(), regs->tpc); |
72 | show_regs(regs); | 72 | show_regs(regs); |
73 | dump_stack(); | ||
73 | 74 | ||
74 | bust_spinlocks(0); | 75 | bust_spinlocks(0); |
75 | 76 | ||
diff --git a/arch/sparc/kernel/pcr.c b/arch/sparc/kernel/pcr.c index 92e0dda141a4..1ae8cdd7e703 100644 --- a/arch/sparc/kernel/pcr.c +++ b/arch/sparc/kernel/pcr.c | |||
@@ -133,11 +133,16 @@ int __init pcr_arch_init(void) | |||
133 | 133 | ||
134 | case cheetah: | 134 | case cheetah: |
135 | case cheetah_plus: | 135 | case cheetah_plus: |
136 | case spitfire: | ||
137 | pcr_ops = &direct_pcr_ops; | 136 | pcr_ops = &direct_pcr_ops; |
138 | pcr_enable = PCR_SUN4U_ENABLE; | 137 | pcr_enable = PCR_SUN4U_ENABLE; |
139 | break; | 138 | break; |
140 | 139 | ||
140 | case spitfire: | ||
141 | /* UltraSPARC-I/II and derivatives lack a profile | ||
142 | * counter overflow interrupt so we can't make use of | ||
143 | * their hardware currently. | ||
144 | */ | ||
145 | /* fallthrough */ | ||
141 | default: | 146 | default: |
142 | err = -ENODEV; | 147 | err = -ENODEV; |
143 | goto out_unregister; | 148 | goto out_unregister; |
diff --git a/arch/sparc/lib/GENbzero.S b/arch/sparc/lib/GENbzero.S index 6a4f956a2f7a..8e7a843ddd88 100644 --- a/arch/sparc/lib/GENbzero.S +++ b/arch/sparc/lib/GENbzero.S | |||
@@ -6,13 +6,9 @@ | |||
6 | 6 | ||
7 | #define EX_ST(x,y) \ | 7 | #define EX_ST(x,y) \ |
8 | 98: x,y; \ | 8 | 98: x,y; \ |
9 | .section .fixup; \ | ||
10 | .align 4; \ | ||
11 | 99: retl; \ | ||
12 | mov %o1, %o0; \ | ||
13 | .section __ex_table,"a";\ | 9 | .section __ex_table,"a";\ |
14 | .align 4; \ | 10 | .align 4; \ |
15 | .word 98b, 99b; \ | 11 | .word 98b, __retl_o1; \ |
16 | .text; \ | 12 | .text; \ |
17 | .align 4; | 13 | .align 4; |
18 | 14 | ||
diff --git a/arch/sparc/lib/GENcopy_from_user.S b/arch/sparc/lib/GENcopy_from_user.S index 2b9df99e87f9..b7d0bd6b1406 100644 --- a/arch/sparc/lib/GENcopy_from_user.S +++ b/arch/sparc/lib/GENcopy_from_user.S | |||
@@ -5,13 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_LD(x) \ | 6 | #define EX_LD(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: retl; \ | ||
11 | mov 1, %o0; \ | ||
12 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
13 | .align 4; \ | 9 | .align 4; \ |
14 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one; \ |
15 | .text; \ | 11 | .text; \ |
16 | .align 4; | 12 | .align 4; |
17 | 13 | ||
@@ -27,7 +23,7 @@ | |||
27 | #define PREAMBLE \ | 23 | #define PREAMBLE \ |
28 | rd %asi, %g1; \ | 24 | rd %asi, %g1; \ |
29 | cmp %g1, ASI_AIUS; \ | 25 | cmp %g1, ASI_AIUS; \ |
30 | bne,pn %icc, memcpy_user_stub; \ | 26 | bne,pn %icc, ___copy_in_user; \ |
31 | nop | 27 | nop |
32 | #endif | 28 | #endif |
33 | 29 | ||
diff --git a/arch/sparc/lib/GENcopy_to_user.S b/arch/sparc/lib/GENcopy_to_user.S index bb3f7084daf9..780550e1afc7 100644 --- a/arch/sparc/lib/GENcopy_to_user.S +++ b/arch/sparc/lib/GENcopy_to_user.S | |||
@@ -5,13 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_ST(x) \ | 6 | #define EX_ST(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: retl; \ | ||
11 | mov 1, %o0; \ | ||
12 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
13 | .align 4; \ | 9 | .align 4; \ |
14 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one; \ |
15 | .text; \ | 11 | .text; \ |
16 | .align 4; | 12 | .align 4; |
17 | 13 | ||
@@ -31,7 +27,7 @@ | |||
31 | #define PREAMBLE \ | 27 | #define PREAMBLE \ |
32 | rd %asi, %g1; \ | 28 | rd %asi, %g1; \ |
33 | cmp %g1, ASI_AIUS; \ | 29 | cmp %g1, ASI_AIUS; \ |
34 | bne,pn %icc, memcpy_user_stub; \ | 30 | bne,pn %icc, ___copy_in_user; \ |
35 | nop | 31 | nop |
36 | #endif | 32 | #endif |
37 | 33 | ||
diff --git a/arch/sparc/lib/NG2copy_from_user.S b/arch/sparc/lib/NG2copy_from_user.S index c77ef5f22102..119ccb9a54f4 100644 --- a/arch/sparc/lib/NG2copy_from_user.S +++ b/arch/sparc/lib/NG2copy_from_user.S | |||
@@ -5,14 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_LD(x) \ | 6 | #define EX_LD(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: wr %g0, ASI_AIUS, %asi;\ | ||
11 | retl; \ | ||
12 | mov 1, %o0; \ | ||
13 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
14 | .align 4; \ | 9 | .align 4; \ |
15 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one_asi;\ |
16 | .text; \ | 11 | .text; \ |
17 | .align 4; | 12 | .align 4; |
18 | 13 | ||
@@ -33,7 +28,7 @@ | |||
33 | #define PREAMBLE \ | 28 | #define PREAMBLE \ |
34 | rd %asi, %g1; \ | 29 | rd %asi, %g1; \ |
35 | cmp %g1, ASI_AIUS; \ | 30 | cmp %g1, ASI_AIUS; \ |
36 | bne,pn %icc, memcpy_user_stub; \ | 31 | bne,pn %icc, ___copy_in_user; \ |
37 | nop | 32 | nop |
38 | #endif | 33 | #endif |
39 | 34 | ||
diff --git a/arch/sparc/lib/NG2copy_to_user.S b/arch/sparc/lib/NG2copy_to_user.S index 4bd4093acbbd..7fe1ccefd9d0 100644 --- a/arch/sparc/lib/NG2copy_to_user.S +++ b/arch/sparc/lib/NG2copy_to_user.S | |||
@@ -5,14 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_ST(x) \ | 6 | #define EX_ST(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: wr %g0, ASI_AIUS, %asi;\ | ||
11 | retl; \ | ||
12 | mov 1, %o0; \ | ||
13 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
14 | .align 4; \ | 9 | .align 4; \ |
15 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one_asi;\ |
16 | .text; \ | 11 | .text; \ |
17 | .align 4; | 12 | .align 4; |
18 | 13 | ||
@@ -42,7 +37,7 @@ | |||
42 | #define PREAMBLE \ | 37 | #define PREAMBLE \ |
43 | rd %asi, %g1; \ | 38 | rd %asi, %g1; \ |
44 | cmp %g1, ASI_AIUS; \ | 39 | cmp %g1, ASI_AIUS; \ |
45 | bne,pn %icc, memcpy_user_stub; \ | 40 | bne,pn %icc, ___copy_in_user; \ |
46 | nop | 41 | nop |
47 | #endif | 42 | #endif |
48 | 43 | ||
diff --git a/arch/sparc/lib/NGbzero.S b/arch/sparc/lib/NGbzero.S index 814d5f7a45e1..beab29bf419b 100644 --- a/arch/sparc/lib/NGbzero.S +++ b/arch/sparc/lib/NGbzero.S | |||
@@ -6,13 +6,9 @@ | |||
6 | 6 | ||
7 | #define EX_ST(x,y) \ | 7 | #define EX_ST(x,y) \ |
8 | 98: x,y; \ | 8 | 98: x,y; \ |
9 | .section .fixup; \ | ||
10 | .align 4; \ | ||
11 | 99: retl; \ | ||
12 | mov %o1, %o0; \ | ||
13 | .section __ex_table,"a";\ | 9 | .section __ex_table,"a";\ |
14 | .align 4; \ | 10 | .align 4; \ |
15 | .word 98b, 99b; \ | 11 | .word 98b, __retl_o1; \ |
16 | .text; \ | 12 | .text; \ |
17 | .align 4; | 13 | .align 4; |
18 | 14 | ||
diff --git a/arch/sparc/lib/NGcopy_from_user.S b/arch/sparc/lib/NGcopy_from_user.S index e7f433f71b42..5d1e4d1ac21e 100644 --- a/arch/sparc/lib/NGcopy_from_user.S +++ b/arch/sparc/lib/NGcopy_from_user.S | |||
@@ -5,14 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_LD(x) \ | 6 | #define EX_LD(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: wr %g0, ASI_AIUS, %asi;\ | ||
11 | ret; \ | ||
12 | restore %g0, 1, %o0; \ | ||
13 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
14 | .align 4; \ | 9 | .align 4; \ |
15 | .word 98b, 99b; \ | 10 | .word 98b, __ret_one_asi;\ |
16 | .text; \ | 11 | .text; \ |
17 | .align 4; | 12 | .align 4; |
18 | 13 | ||
@@ -30,7 +25,7 @@ | |||
30 | #define PREAMBLE \ | 25 | #define PREAMBLE \ |
31 | rd %asi, %g1; \ | 26 | rd %asi, %g1; \ |
32 | cmp %g1, ASI_AIUS; \ | 27 | cmp %g1, ASI_AIUS; \ |
33 | bne,pn %icc, memcpy_user_stub; \ | 28 | bne,pn %icc, ___copy_in_user; \ |
34 | nop | 29 | nop |
35 | #endif | 30 | #endif |
36 | 31 | ||
diff --git a/arch/sparc/lib/NGcopy_to_user.S b/arch/sparc/lib/NGcopy_to_user.S index 6ea01c5532a0..ff630dcb273c 100644 --- a/arch/sparc/lib/NGcopy_to_user.S +++ b/arch/sparc/lib/NGcopy_to_user.S | |||
@@ -5,14 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_ST(x) \ | 6 | #define EX_ST(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: wr %g0, ASI_AIUS, %asi;\ | ||
11 | ret; \ | ||
12 | restore %g0, 1, %o0; \ | ||
13 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
14 | .align 4; \ | 9 | .align 4; \ |
15 | .word 98b, 99b; \ | 10 | .word 98b, __ret_one_asi;\ |
16 | .text; \ | 11 | .text; \ |
17 | .align 4; | 12 | .align 4; |
18 | 13 | ||
@@ -33,7 +28,7 @@ | |||
33 | #define PREAMBLE \ | 28 | #define PREAMBLE \ |
34 | rd %asi, %g1; \ | 29 | rd %asi, %g1; \ |
35 | cmp %g1, ASI_AIUS; \ | 30 | cmp %g1, ASI_AIUS; \ |
36 | bne,pn %icc, memcpy_user_stub; \ | 31 | bne,pn %icc, ___copy_in_user; \ |
37 | nop | 32 | nop |
38 | #endif | 33 | #endif |
39 | 34 | ||
diff --git a/arch/sparc/lib/U1copy_from_user.S b/arch/sparc/lib/U1copy_from_user.S index 3192b0bf4fab..a6ae2ea04bf5 100644 --- a/arch/sparc/lib/U1copy_from_user.S +++ b/arch/sparc/lib/U1copy_from_user.S | |||
@@ -5,13 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_LD(x) \ | 6 | #define EX_LD(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: retl; \ | ||
11 | mov 1, %o0; \ | ||
12 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
13 | .align 4; \ | 9 | .align 4; \ |
14 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one; \ |
15 | .text; \ | 11 | .text; \ |
16 | .align 4; | 12 | .align 4; |
17 | 13 | ||
@@ -27,7 +23,7 @@ | |||
27 | #define PREAMBLE \ | 23 | #define PREAMBLE \ |
28 | rd %asi, %g1; \ | 24 | rd %asi, %g1; \ |
29 | cmp %g1, ASI_AIUS; \ | 25 | cmp %g1, ASI_AIUS; \ |
30 | bne,pn %icc, memcpy_user_stub; \ | 26 | bne,pn %icc, ___copy_in_user; \ |
31 | nop; \ | 27 | nop; \ |
32 | 28 | ||
33 | #include "U1memcpy.S" | 29 | #include "U1memcpy.S" |
diff --git a/arch/sparc/lib/U1copy_to_user.S b/arch/sparc/lib/U1copy_to_user.S index d1210ffb0b82..f4b970eeb485 100644 --- a/arch/sparc/lib/U1copy_to_user.S +++ b/arch/sparc/lib/U1copy_to_user.S | |||
@@ -5,13 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_ST(x) \ | 6 | #define EX_ST(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: retl; \ | ||
11 | mov 1, %o0; \ | ||
12 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
13 | .align 4; \ | 9 | .align 4; \ |
14 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one; \ |
15 | .text; \ | 11 | .text; \ |
16 | .align 4; | 12 | .align 4; |
17 | 13 | ||
@@ -27,7 +23,7 @@ | |||
27 | #define PREAMBLE \ | 23 | #define PREAMBLE \ |
28 | rd %asi, %g1; \ | 24 | rd %asi, %g1; \ |
29 | cmp %g1, ASI_AIUS; \ | 25 | cmp %g1, ASI_AIUS; \ |
30 | bne,pn %icc, memcpy_user_stub; \ | 26 | bne,pn %icc, ___copy_in_user; \ |
31 | nop; \ | 27 | nop; \ |
32 | 28 | ||
33 | #include "U1memcpy.S" | 29 | #include "U1memcpy.S" |
diff --git a/arch/sparc/lib/U3copy_from_user.S b/arch/sparc/lib/U3copy_from_user.S index f5bfc8d9d216..b1acd1331c33 100644 --- a/arch/sparc/lib/U3copy_from_user.S +++ b/arch/sparc/lib/U3copy_from_user.S | |||
@@ -5,13 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_LD(x) \ | 6 | #define EX_LD(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: retl; \ | ||
11 | mov 1, %o0; \ | ||
12 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
13 | .align 4; \ | 9 | .align 4; \ |
14 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one; \ |
15 | .text; \ | 11 | .text; \ |
16 | .align 4; | 12 | .align 4; |
17 | 13 | ||
diff --git a/arch/sparc/lib/U3copy_to_user.S b/arch/sparc/lib/U3copy_to_user.S index 2334f111bb0c..ef1e493afdfa 100644 --- a/arch/sparc/lib/U3copy_to_user.S +++ b/arch/sparc/lib/U3copy_to_user.S | |||
@@ -5,13 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_ST(x) \ | 6 | #define EX_ST(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: retl; \ | ||
11 | mov 1, %o0; \ | ||
12 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
13 | .align 4; \ | 9 | .align 4; \ |
14 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one; \ |
15 | .text; \ | 11 | .text; \ |
16 | .align 4; | 12 | .align 4; |
17 | 13 | ||
@@ -27,7 +23,7 @@ | |||
27 | #define PREAMBLE \ | 23 | #define PREAMBLE \ |
28 | rd %asi, %g1; \ | 24 | rd %asi, %g1; \ |
29 | cmp %g1, ASI_AIUS; \ | 25 | cmp %g1, ASI_AIUS; \ |
30 | bne,pn %icc, memcpy_user_stub; \ | 26 | bne,pn %icc, ___copy_in_user; \ |
31 | nop; \ | 27 | nop; \ |
32 | 28 | ||
33 | #include "U3memcpy.S" | 29 | #include "U3memcpy.S" |
diff --git a/arch/sparc/lib/bzero.S b/arch/sparc/lib/bzero.S index c7bbae8c590f..b6557297440f 100644 --- a/arch/sparc/lib/bzero.S +++ b/arch/sparc/lib/bzero.S | |||
@@ -88,13 +88,9 @@ __bzero_done: | |||
88 | 88 | ||
89 | #define EX_ST(x,y) \ | 89 | #define EX_ST(x,y) \ |
90 | 98: x,y; \ | 90 | 98: x,y; \ |
91 | .section .fixup; \ | ||
92 | .align 4; \ | ||
93 | 99: retl; \ | ||
94 | mov %o1, %o0; \ | ||
95 | .section __ex_table,"a";\ | 91 | .section __ex_table,"a";\ |
96 | .align 4; \ | 92 | .align 4; \ |
97 | .word 98b, 99b; \ | 93 | .word 98b, __retl_o1; \ |
98 | .text; \ | 94 | .text; \ |
99 | .align 4; | 95 | .align 4; |
100 | 96 | ||
diff --git a/arch/sparc/lib/copy_in_user.S b/arch/sparc/lib/copy_in_user.S index 650af3f21f78..302c0e60dc2c 100644 --- a/arch/sparc/lib/copy_in_user.S +++ b/arch/sparc/lib/copy_in_user.S | |||
@@ -3,19 +3,16 @@ | |||
3 | * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com) |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/linkage.h> | ||
6 | #include <asm/asi.h> | 7 | #include <asm/asi.h> |
7 | 8 | ||
8 | #define XCC xcc | 9 | #define XCC xcc |
9 | 10 | ||
10 | #define EX(x,y) \ | 11 | #define EX(x,y) \ |
11 | 98: x,y; \ | 12 | 98: x,y; \ |
12 | .section .fixup; \ | ||
13 | .align 4; \ | ||
14 | 99: retl; \ | ||
15 | mov 1, %o0; \ | ||
16 | .section __ex_table,"a";\ | 13 | .section __ex_table,"a";\ |
17 | .align 4; \ | 14 | .align 4; \ |
18 | .word 98b, 99b; \ | 15 | .word 98b, __retl_one; \ |
19 | .text; \ | 16 | .text; \ |
20 | .align 4; | 17 | .align 4; |
21 | 18 | ||
@@ -31,18 +28,7 @@ | |||
31 | * to copy register windows around during thread cloning. | 28 | * to copy register windows around during thread cloning. |
32 | */ | 29 | */ |
33 | 30 | ||
34 | .globl ___copy_in_user | 31 | ENTRY(___copy_in_user) /* %o0=dst, %o1=src, %o2=len */ |
35 | .type ___copy_in_user,#function | ||
36 | ___copy_in_user: /* %o0=dst, %o1=src, %o2=len */ | ||
37 | /* Writing to %asi is _expensive_ so we hardcode it. | ||
38 | * Reading %asi to check for KERNEL_DS is comparatively | ||
39 | * cheap. | ||
40 | */ | ||
41 | rd %asi, %g1 | ||
42 | cmp %g1, ASI_AIUS | ||
43 | bne,pn %icc, memcpy_user_stub | ||
44 | nop | ||
45 | |||
46 | cmp %o2, 0 | 32 | cmp %o2, 0 |
47 | be,pn %XCC, 85f | 33 | be,pn %XCC, 85f |
48 | or %o0, %o1, %o3 | 34 | or %o0, %o1, %o3 |
@@ -53,22 +39,24 @@ ___copy_in_user: /* %o0=dst, %o1=src, %o2=len */ | |||
53 | /* 16 < len <= 64 */ | 39 | /* 16 < len <= 64 */ |
54 | andcc %o3, 0x7, %g0 | 40 | andcc %o3, 0x7, %g0 |
55 | bne,pn %XCC, 90f | 41 | bne,pn %XCC, 90f |
56 | sub %o0, %o1, %o3 | 42 | nop |
57 | 43 | ||
58 | andn %o2, 0x7, %o4 | 44 | andn %o2, 0x7, %o4 |
59 | and %o2, 0x7, %o2 | 45 | and %o2, 0x7, %o2 |
60 | 1: subcc %o4, 0x8, %o4 | 46 | 1: subcc %o4, 0x8, %o4 |
61 | EX(ldxa [%o1] %asi, %o5) | 47 | EX(ldxa [%o1] %asi, %o5) |
62 | EX(stxa %o5, [%o1 + %o3] ASI_AIUS) | 48 | EX(stxa %o5, [%o0] %asi) |
49 | add %o1, 0x8, %o1 | ||
63 | bgu,pt %XCC, 1b | 50 | bgu,pt %XCC, 1b |
64 | add %o1, 0x8, %o1 | 51 | add %o0, 0x8, %o0 |
65 | andcc %o2, 0x4, %g0 | 52 | andcc %o2, 0x4, %g0 |
66 | be,pt %XCC, 1f | 53 | be,pt %XCC, 1f |
67 | nop | 54 | nop |
68 | sub %o2, 0x4, %o2 | 55 | sub %o2, 0x4, %o2 |
69 | EX(lduwa [%o1] %asi, %o5) | 56 | EX(lduwa [%o1] %asi, %o5) |
70 | EX(stwa %o5, [%o1 + %o3] ASI_AIUS) | 57 | EX(stwa %o5, [%o0] %asi) |
71 | add %o1, 0x4, %o1 | 58 | add %o1, 0x4, %o1 |
59 | add %o0, 0x4, %o0 | ||
72 | 1: cmp %o2, 0 | 60 | 1: cmp %o2, 0 |
73 | be,pt %XCC, 85f | 61 | be,pt %XCC, 85f |
74 | nop | 62 | nop |
@@ -78,14 +66,15 @@ ___copy_in_user: /* %o0=dst, %o1=src, %o2=len */ | |||
78 | 80: /* 0 < len <= 16 */ | 66 | 80: /* 0 < len <= 16 */ |
79 | andcc %o3, 0x3, %g0 | 67 | andcc %o3, 0x3, %g0 |
80 | bne,pn %XCC, 90f | 68 | bne,pn %XCC, 90f |
81 | sub %o0, %o1, %o3 | 69 | nop |
82 | 70 | ||
83 | 82: | 71 | 82: |
84 | subcc %o2, 4, %o2 | 72 | subcc %o2, 4, %o2 |
85 | EX(lduwa [%o1] %asi, %g1) | 73 | EX(lduwa [%o1] %asi, %g1) |
86 | EX(stwa %g1, [%o1 + %o3] ASI_AIUS) | 74 | EX(stwa %g1, [%o0] %asi) |
75 | add %o1, 4, %o1 | ||
87 | bgu,pt %XCC, 82b | 76 | bgu,pt %XCC, 82b |
88 | add %o1, 4, %o1 | 77 | add %o0, 4, %o0 |
89 | 78 | ||
90 | 85: retl | 79 | 85: retl |
91 | clr %o0 | 80 | clr %o0 |
@@ -94,26 +83,10 @@ ___copy_in_user: /* %o0=dst, %o1=src, %o2=len */ | |||
94 | 90: | 83 | 90: |
95 | subcc %o2, 1, %o2 | 84 | subcc %o2, 1, %o2 |
96 | EX(lduba [%o1] %asi, %g1) | 85 | EX(lduba [%o1] %asi, %g1) |
97 | EX(stba %g1, [%o1 + %o3] ASI_AIUS) | 86 | EX(stba %g1, [%o0] %asi) |
87 | add %o1, 1, %o1 | ||
98 | bgu,pt %XCC, 90b | 88 | bgu,pt %XCC, 90b |
99 | add %o1, 1, %o1 | 89 | add %o0, 1, %o0 |
100 | retl | 90 | retl |
101 | clr %o0 | 91 | clr %o0 |
102 | 92 | ENDPROC(___copy_in_user) | |
103 | .size ___copy_in_user, .-___copy_in_user | ||
104 | |||
105 | /* Act like copy_{to,in}_user(), ie. return zero instead | ||
106 | * of original destination pointer. This is invoked when | ||
107 | * copy_{to,in}_user() finds that %asi is kernel space. | ||
108 | */ | ||
109 | .globl memcpy_user_stub | ||
110 | .type memcpy_user_stub,#function | ||
111 | memcpy_user_stub: | ||
112 | save %sp, -192, %sp | ||
113 | mov %i0, %o0 | ||
114 | mov %i1, %o1 | ||
115 | call memcpy | ||
116 | mov %i2, %o2 | ||
117 | ret | ||
118 | restore %g0, %g0, %o0 | ||
119 | .size memcpy_user_stub, .-memcpy_user_stub | ||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 2cf7bbcaed4e..8fc9a847cf48 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -1803,6 +1803,17 @@ config DMAR | |||
1803 | and include PCI device scope covered by these DMA | 1803 | and include PCI device scope covered by these DMA |
1804 | remapping devices. | 1804 | remapping devices. |
1805 | 1805 | ||
1806 | config DMAR_DEFAULT_ON | ||
1807 | def_bool n | ||
1808 | prompt "Enable DMA Remapping Devices by default" | ||
1809 | depends on DMAR | ||
1810 | help | ||
1811 | Selecting this option will enable a DMAR device at boot time if | ||
1812 | one is found. If this option is not selected, DMAR support can | ||
1813 | be enabled by passing intel_iommu=on to the kernel. It is | ||
1814 | recommended you say N here while the DMAR code remains | ||
1815 | experimental. | ||
1816 | |||
1806 | config DMAR_GFX_WA | 1817 | config DMAR_GFX_WA |
1807 | def_bool y | 1818 | def_bool y |
1808 | prompt "Support for Graphics workaround" | 1819 | prompt "Support for Graphics workaround" |
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index 8078955845ae..c98d52e82966 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu | |||
@@ -167,9 +167,9 @@ config MK7 | |||
167 | config MK8 | 167 | config MK8 |
168 | bool "Opteron/Athlon64/Hammer/K8" | 168 | bool "Opteron/Athlon64/Hammer/K8" |
169 | help | 169 | help |
170 | Select this for an AMD Opteron or Athlon64 Hammer-family processor. Enables | 170 | Select this for an AMD Opteron or Athlon64 Hammer-family processor. |
171 | use of some extended instructions, and passes appropriate optimization | 171 | Enables use of some extended instructions, and passes appropriate |
172 | flags to GCC. | 172 | optimization flags to GCC. |
173 | 173 | ||
174 | config MCRUSOE | 174 | config MCRUSOE |
175 | bool "Crusoe" | 175 | bool "Crusoe" |
@@ -256,9 +256,11 @@ config MPSC | |||
256 | config MCORE2 | 256 | config MCORE2 |
257 | bool "Core 2/newer Xeon" | 257 | bool "Core 2/newer Xeon" |
258 | help | 258 | help |
259 | Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and 53xx) | 259 | |
260 | CPUs. You can distinguish newer from older Xeons by the CPU family | 260 | Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and |
261 | in /proc/cpuinfo. Newer ones have 6 and older ones 15 (not a typo) | 261 | 53xx) CPUs. You can distinguish newer from older Xeons by the CPU |
262 | family in /proc/cpuinfo. Newer ones have 6 and older ones 15 | ||
263 | (not a typo) | ||
262 | 264 | ||
263 | config GENERIC_CPU | 265 | config GENERIC_CPU |
264 | bool "Generic-x86-64" | 266 | bool "Generic-x86-64" |
@@ -320,14 +322,14 @@ config X86_PPRO_FENCE | |||
320 | bool "PentiumPro memory ordering errata workaround" | 322 | bool "PentiumPro memory ordering errata workaround" |
321 | depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1 | 323 | depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1 |
322 | help | 324 | help |
323 | Old PentiumPro multiprocessor systems had errata that could cause memory | 325 | Old PentiumPro multiprocessor systems had errata that could cause |
324 | operations to violate the x86 ordering standard in rare cases. Enabling this | 326 | memory operations to violate the x86 ordering standard in rare cases. |
325 | option will attempt to work around some (but not all) occurances of | 327 | Enabling this option will attempt to work around some (but not all) |
326 | this problem, at the cost of much heavier spinlock and memory barrier | 328 | occurances of this problem, at the cost of much heavier spinlock and |
327 | operations. | 329 | memory barrier operations. |
328 | 330 | ||
329 | If unsure, say n here. Even distro kernels should think twice before enabling | 331 | If unsure, say n here. Even distro kernels should think twice before |
330 | this: there are few systems, and an unlikely bug. | 332 | enabling this: there are few systems, and an unlikely bug. |
331 | 333 | ||
332 | config X86_F00F_BUG | 334 | config X86_F00F_BUG |
333 | def_bool y | 335 | def_bool y |
diff --git a/arch/x86/include/asm/a.out-core.h b/arch/x86/include/asm/a.out-core.h index 37822206083e..3c601f8224be 100644 --- a/arch/x86/include/asm/a.out-core.h +++ b/arch/x86/include/asm/a.out-core.h | |||
@@ -23,8 +23,6 @@ | |||
23 | */ | 23 | */ |
24 | static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) | 24 | static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) |
25 | { | 25 | { |
26 | u16 gs; | ||
27 | |||
28 | /* changed the size calculations - should hopefully work better. lbt */ | 26 | /* changed the size calculations - should hopefully work better. lbt */ |
29 | dump->magic = CMAGIC; | 27 | dump->magic = CMAGIC; |
30 | dump->start_code = 0; | 28 | dump->start_code = 0; |
@@ -57,7 +55,7 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) | |||
57 | dump->regs.ds = (u16)regs->ds; | 55 | dump->regs.ds = (u16)regs->ds; |
58 | dump->regs.es = (u16)regs->es; | 56 | dump->regs.es = (u16)regs->es; |
59 | dump->regs.fs = (u16)regs->fs; | 57 | dump->regs.fs = (u16)regs->fs; |
60 | savesegment(gs, gs); | 58 | savesegment(gs, dump->regs.gs); |
61 | dump->regs.orig_ax = regs->orig_ax; | 59 | dump->regs.orig_ax = regs->orig_ax; |
62 | dump->regs.ip = regs->ip; | 60 | dump->regs.ip = regs->ip; |
63 | dump->regs.cs = (u16)regs->cs; | 61 | dump->regs.cs = (u16)regs->cs; |
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index ea408dcba513..7301e60dc4a8 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
@@ -93,6 +93,7 @@ | |||
93 | #define X86_FEATURE_XTOPOLOGY (3*32+22) /* cpu topology enum extensions */ | 93 | #define X86_FEATURE_XTOPOLOGY (3*32+22) /* cpu topology enum extensions */ |
94 | #define X86_FEATURE_TSC_RELIABLE (3*32+23) /* TSC is known to be reliable */ | 94 | #define X86_FEATURE_TSC_RELIABLE (3*32+23) /* TSC is known to be reliable */ |
95 | #define X86_FEATURE_NONSTOP_TSC (3*32+24) /* TSC does not stop in C states */ | 95 | #define X86_FEATURE_NONSTOP_TSC (3*32+24) /* TSC does not stop in C states */ |
96 | #define X86_FEATURE_CLFLUSH_MONITOR (3*32+25) /* "" clflush reqd with monitor */ | ||
96 | 97 | ||
97 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ | 98 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ |
98 | #define X86_FEATURE_XMM3 (4*32+ 0) /* "pni" SSE-3 */ | 99 | #define X86_FEATURE_XMM3 (4*32+ 0) /* "pni" SSE-3 */ |
diff --git a/arch/x86/include/asm/math_emu.h b/arch/x86/include/asm/math_emu.h index 5a65b107ad58..031f6266f425 100644 --- a/arch/x86/include/asm/math_emu.h +++ b/arch/x86/include/asm/math_emu.h | |||
@@ -1,31 +1,18 @@ | |||
1 | #ifndef _ASM_X86_MATH_EMU_H | 1 | #ifndef _ASM_X86_MATH_EMU_H |
2 | #define _ASM_X86_MATH_EMU_H | 2 | #define _ASM_X86_MATH_EMU_H |
3 | 3 | ||
4 | #include <asm/ptrace.h> | ||
5 | #include <asm/vm86.h> | ||
6 | |||
4 | /* This structure matches the layout of the data saved to the stack | 7 | /* This structure matches the layout of the data saved to the stack |
5 | following a device-not-present interrupt, part of it saved | 8 | following a device-not-present interrupt, part of it saved |
6 | automatically by the 80386/80486. | 9 | automatically by the 80386/80486. |
7 | */ | 10 | */ |
8 | struct info { | 11 | struct math_emu_info { |
9 | long ___orig_eip; | 12 | long ___orig_eip; |
10 | long ___ebx; | 13 | union { |
11 | long ___ecx; | 14 | struct pt_regs *regs; |
12 | long ___edx; | 15 | struct kernel_vm86_regs *vm86; |
13 | long ___esi; | 16 | }; |
14 | long ___edi; | ||
15 | long ___ebp; | ||
16 | long ___eax; | ||
17 | long ___ds; | ||
18 | long ___es; | ||
19 | long ___fs; | ||
20 | long ___orig_eax; | ||
21 | long ___eip; | ||
22 | long ___cs; | ||
23 | long ___eflags; | ||
24 | long ___esp; | ||
25 | long ___ss; | ||
26 | long ___vm86_es; /* This and the following only in vm86 mode */ | ||
27 | long ___vm86_ds; | ||
28 | long ___vm86_fs; | ||
29 | long ___vm86_gs; | ||
30 | }; | 17 | }; |
31 | #endif /* _ASM_X86_MATH_EMU_H */ | 18 | #endif /* _ASM_X86_MATH_EMU_H */ |
diff --git a/arch/x86/include/asm/mpspec.h b/arch/x86/include/asm/mpspec.h index 62d14ce3cd00..bd22f2a3713f 100644 --- a/arch/x86/include/asm/mpspec.h +++ b/arch/x86/include/asm/mpspec.h | |||
@@ -60,6 +60,7 @@ extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, | |||
60 | u32 gsi); | 60 | u32 gsi); |
61 | extern void mp_config_acpi_legacy_irqs(void); | 61 | extern void mp_config_acpi_legacy_irqs(void); |
62 | extern int mp_register_gsi(u32 gsi, int edge_level, int active_high_low); | 62 | extern int mp_register_gsi(u32 gsi, int edge_level, int active_high_low); |
63 | extern int acpi_probe_gsi(void); | ||
63 | #ifdef CONFIG_X86_IO_APIC | 64 | #ifdef CONFIG_X86_IO_APIC |
64 | extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, | 65 | extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, |
65 | u32 gsi, int triggering, int polarity); | 66 | u32 gsi, int triggering, int polarity); |
@@ -71,6 +72,11 @@ mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, | |||
71 | return 0; | 72 | return 0; |
72 | } | 73 | } |
73 | #endif | 74 | #endif |
75 | #else /* !CONFIG_ACPI: */ | ||
76 | static inline int acpi_probe_gsi(void) | ||
77 | { | ||
78 | return 0; | ||
79 | } | ||
74 | #endif /* CONFIG_ACPI */ | 80 | #endif /* CONFIG_ACPI */ |
75 | 81 | ||
76 | #define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_APICS) | 82 | #define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_APICS) |
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 06bbcbd66e9c..4f5af8447d54 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -302,16 +302,30 @@ static inline pte_t pte_mkspecial(pte_t pte) | |||
302 | 302 | ||
303 | extern pteval_t __supported_pte_mask; | 303 | extern pteval_t __supported_pte_mask; |
304 | 304 | ||
305 | /* | ||
306 | * Mask out unsupported bits in a present pgprot. Non-present pgprots | ||
307 | * can use those bits for other purposes, so leave them be. | ||
308 | */ | ||
309 | static inline pgprotval_t massage_pgprot(pgprot_t pgprot) | ||
310 | { | ||
311 | pgprotval_t protval = pgprot_val(pgprot); | ||
312 | |||
313 | if (protval & _PAGE_PRESENT) | ||
314 | protval &= __supported_pte_mask; | ||
315 | |||
316 | return protval; | ||
317 | } | ||
318 | |||
305 | static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) | 319 | static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) |
306 | { | 320 | { |
307 | return __pte((((phys_addr_t)page_nr << PAGE_SHIFT) | | 321 | return __pte(((phys_addr_t)page_nr << PAGE_SHIFT) | |
308 | pgprot_val(pgprot)) & __supported_pte_mask); | 322 | massage_pgprot(pgprot)); |
309 | } | 323 | } |
310 | 324 | ||
311 | static inline pmd_t pfn_pmd(unsigned long page_nr, pgprot_t pgprot) | 325 | static inline pmd_t pfn_pmd(unsigned long page_nr, pgprot_t pgprot) |
312 | { | 326 | { |
313 | return __pmd((((phys_addr_t)page_nr << PAGE_SHIFT) | | 327 | return __pmd(((phys_addr_t)page_nr << PAGE_SHIFT) | |
314 | pgprot_val(pgprot)) & __supported_pte_mask); | 328 | massage_pgprot(pgprot)); |
315 | } | 329 | } |
316 | 330 | ||
317 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 331 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
@@ -323,7 +337,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
323 | * the newprot (if present): | 337 | * the newprot (if present): |
324 | */ | 338 | */ |
325 | val &= _PAGE_CHG_MASK; | 339 | val &= _PAGE_CHG_MASK; |
326 | val |= pgprot_val(newprot) & (~_PAGE_CHG_MASK) & __supported_pte_mask; | 340 | val |= massage_pgprot(newprot) & ~_PAGE_CHG_MASK; |
327 | 341 | ||
328 | return __pte(val); | 342 | return __pte(val); |
329 | } | 343 | } |
@@ -339,7 +353,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) | |||
339 | 353 | ||
340 | #define pte_pgprot(x) __pgprot(pte_flags(x) & PTE_FLAGS_MASK) | 354 | #define pte_pgprot(x) __pgprot(pte_flags(x) & PTE_FLAGS_MASK) |
341 | 355 | ||
342 | #define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) | 356 | #define canon_pgprot(p) __pgprot(massage_pgprot(p)) |
343 | 357 | ||
344 | static inline int is_new_memtype_allowed(unsigned long flags, | 358 | static inline int is_new_memtype_allowed(unsigned long flags, |
345 | unsigned long new_flags) | 359 | unsigned long new_flags) |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 091cd8855f2e..3bfd5235a9eb 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -353,7 +353,7 @@ struct i387_soft_struct { | |||
353 | u8 no_update; | 353 | u8 no_update; |
354 | u8 rm; | 354 | u8 rm; |
355 | u8 alimit; | 355 | u8 alimit; |
356 | struct info *info; | 356 | struct math_emu_info *info; |
357 | u32 entry_eip; | 357 | u32 entry_eip; |
358 | }; | 358 | }; |
359 | 359 | ||
diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h index 2ee0a3bceedf..cf3bb053da0b 100644 --- a/arch/x86/include/asm/traps.h +++ b/arch/x86/include/asm/traps.h | |||
@@ -41,7 +41,7 @@ dotraplinkage void do_int3(struct pt_regs *, long); | |||
41 | dotraplinkage void do_overflow(struct pt_regs *, long); | 41 | dotraplinkage void do_overflow(struct pt_regs *, long); |
42 | dotraplinkage void do_bounds(struct pt_regs *, long); | 42 | dotraplinkage void do_bounds(struct pt_regs *, long); |
43 | dotraplinkage void do_invalid_op(struct pt_regs *, long); | 43 | dotraplinkage void do_invalid_op(struct pt_regs *, long); |
44 | dotraplinkage void do_device_not_available(struct pt_regs *, long); | 44 | dotraplinkage void do_device_not_available(struct pt_regs); |
45 | dotraplinkage void do_coprocessor_segment_overrun(struct pt_regs *, long); | 45 | dotraplinkage void do_coprocessor_segment_overrun(struct pt_regs *, long); |
46 | dotraplinkage void do_invalid_TSS(struct pt_regs *, long); | 46 | dotraplinkage void do_invalid_TSS(struct pt_regs *, long); |
47 | dotraplinkage void do_segment_not_present(struct pt_regs *, long); | 47 | dotraplinkage void do_segment_not_present(struct pt_regs *, long); |
@@ -77,7 +77,7 @@ extern int panic_on_unrecovered_nmi; | |||
77 | extern int kstack_depth_to_print; | 77 | extern int kstack_depth_to_print; |
78 | 78 | ||
79 | void math_error(void __user *); | 79 | void math_error(void __user *); |
80 | asmlinkage void math_emulate(long); | 80 | void math_emulate(struct math_emu_info *); |
81 | #ifdef CONFIG_X86_32 | 81 | #ifdef CONFIG_X86_32 |
82 | unsigned long patch_espfix_desc(unsigned long, unsigned long); | 82 | unsigned long patch_espfix_desc(unsigned long, unsigned long); |
83 | #else | 83 | #else |
diff --git a/arch/x86/include/asm/xen/page.h b/arch/x86/include/asm/xen/page.h index 7ef617ef1df3..4bd990ee43df 100644 --- a/arch/x86/include/asm/xen/page.h +++ b/arch/x86/include/asm/xen/page.h | |||
@@ -137,7 +137,7 @@ static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot) | |||
137 | pte_t pte; | 137 | pte_t pte; |
138 | 138 | ||
139 | pte.pte = ((phys_addr_t)page_nr << PAGE_SHIFT) | | 139 | pte.pte = ((phys_addr_t)page_nr << PAGE_SHIFT) | |
140 | (pgprot_val(pgprot) & __supported_pte_mask); | 140 | massage_pgprot(pgprot); |
141 | 141 | ||
142 | return pte; | 142 | return pte; |
143 | } | 143 | } |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index d37593c2f438..7678f10c4568 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -973,6 +973,29 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base) | |||
973 | nr_ioapics++; | 973 | nr_ioapics++; |
974 | } | 974 | } |
975 | 975 | ||
976 | int __init acpi_probe_gsi(void) | ||
977 | { | ||
978 | int idx; | ||
979 | int gsi; | ||
980 | int max_gsi = 0; | ||
981 | |||
982 | if (acpi_disabled) | ||
983 | return 0; | ||
984 | |||
985 | if (!acpi_ioapic) | ||
986 | return 0; | ||
987 | |||
988 | max_gsi = 0; | ||
989 | for (idx = 0; idx < nr_ioapics; idx++) { | ||
990 | gsi = mp_ioapic_routing[idx].gsi_end; | ||
991 | |||
992 | if (gsi > max_gsi) | ||
993 | max_gsi = gsi; | ||
994 | } | ||
995 | |||
996 | return max_gsi + 1; | ||
997 | } | ||
998 | |||
976 | static void assign_to_mp_irq(struct mp_config_intsrc *m, | 999 | static void assign_to_mp_irq(struct mp_config_intsrc *m, |
977 | struct mp_config_intsrc *mp_irq) | 1000 | struct mp_config_intsrc *mp_irq) |
978 | { | 1001 | { |
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 430e5c38a544..24ff26a38ade 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -291,6 +291,9 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) | |||
291 | ds_init_intel(c); | 291 | ds_init_intel(c); |
292 | } | 292 | } |
293 | 293 | ||
294 | if (c->x86 == 6 && c->x86_model == 29 && cpu_has_clflush) | ||
295 | set_cpu_cap(c, X86_FEATURE_CLFLUSH_MONITOR); | ||
296 | |||
294 | #ifdef CONFIG_X86_64 | 297 | #ifdef CONFIG_X86_64 |
295 | if (c->x86 == 15) | 298 | if (c->x86 == 15) |
296 | c->x86_cache_alignment = c->x86_clflush_size * 2; | 299 | c->x86_cache_alignment = c->x86_clflush_size * 2; |
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c index f20f49f7d244..2f9c0c8cb4c7 100644 --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/kernel/ftrace.c | |||
@@ -468,8 +468,8 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) | |||
468 | * ignore such a protection. | 468 | * ignore such a protection. |
469 | */ | 469 | */ |
470 | asm volatile( | 470 | asm volatile( |
471 | "1: " _ASM_MOV " (%[parent_old]), %[old]\n" | 471 | "1: " _ASM_MOV " (%[parent]), %[old]\n" |
472 | "2: " _ASM_MOV " %[return_hooker], (%[parent_replaced])\n" | 472 | "2: " _ASM_MOV " %[return_hooker], (%[parent])\n" |
473 | " movl $0, %[faulted]\n" | 473 | " movl $0, %[faulted]\n" |
474 | "3:\n" | 474 | "3:\n" |
475 | 475 | ||
@@ -481,9 +481,8 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) | |||
481 | _ASM_EXTABLE(1b, 4b) | 481 | _ASM_EXTABLE(1b, 4b) |
482 | _ASM_EXTABLE(2b, 4b) | 482 | _ASM_EXTABLE(2b, 4b) |
483 | 483 | ||
484 | : [parent_replaced] "=r" (parent), [old] "=r" (old), | 484 | : [old] "=r" (old), [faulted] "=r" (faulted) |
485 | [faulted] "=r" (faulted) | 485 | : [parent] "r" (parent), [return_hooker] "r" (return_hooker) |
486 | : [parent_old] "0" (parent), [return_hooker] "r" (return_hooker) | ||
487 | : "memory" | 486 | : "memory" |
488 | ); | 487 | ); |
489 | 488 | ||
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 64d5ad0b8add..388254f69a2a 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -897,7 +897,7 @@ static unsigned long hpet_rtc_flags; | |||
897 | static int hpet_prev_update_sec; | 897 | static int hpet_prev_update_sec; |
898 | static struct rtc_time hpet_alarm_time; | 898 | static struct rtc_time hpet_alarm_time; |
899 | static unsigned long hpet_pie_count; | 899 | static unsigned long hpet_pie_count; |
900 | static unsigned long hpet_t1_cmp; | 900 | static u32 hpet_t1_cmp; |
901 | static unsigned long hpet_default_delta; | 901 | static unsigned long hpet_default_delta; |
902 | static unsigned long hpet_pie_delta; | 902 | static unsigned long hpet_pie_delta; |
903 | static unsigned long hpet_pie_limit; | 903 | static unsigned long hpet_pie_limit; |
@@ -905,6 +905,14 @@ static unsigned long hpet_pie_limit; | |||
905 | static rtc_irq_handler irq_handler; | 905 | static rtc_irq_handler irq_handler; |
906 | 906 | ||
907 | /* | 907 | /* |
908 | * Check that the hpet counter c1 is ahead of the c2 | ||
909 | */ | ||
910 | static inline int hpet_cnt_ahead(u32 c1, u32 c2) | ||
911 | { | ||
912 | return (s32)(c2 - c1) < 0; | ||
913 | } | ||
914 | |||
915 | /* | ||
908 | * Registers a IRQ handler. | 916 | * Registers a IRQ handler. |
909 | */ | 917 | */ |
910 | int hpet_register_irq_handler(rtc_irq_handler handler) | 918 | int hpet_register_irq_handler(rtc_irq_handler handler) |
@@ -1075,7 +1083,7 @@ static void hpet_rtc_timer_reinit(void) | |||
1075 | hpet_t1_cmp += delta; | 1083 | hpet_t1_cmp += delta; |
1076 | hpet_writel(hpet_t1_cmp, HPET_T1_CMP); | 1084 | hpet_writel(hpet_t1_cmp, HPET_T1_CMP); |
1077 | lost_ints++; | 1085 | lost_ints++; |
1078 | } while ((long)(hpet_readl(HPET_COUNTER) - hpet_t1_cmp) > 0); | 1086 | } while (!hpet_cnt_ahead(hpet_t1_cmp, hpet_readl(HPET_COUNTER))); |
1079 | 1087 | ||
1080 | if (lost_ints) { | 1088 | if (lost_ints) { |
1081 | if (hpet_rtc_flags & RTC_PIE) | 1089 | if (hpet_rtc_flags & RTC_PIE) |
diff --git a/arch/x86/kernel/i8237.c b/arch/x86/kernel/i8237.c index dbd6c1d1b638..b42ca694dc68 100644 --- a/arch/x86/kernel/i8237.c +++ b/arch/x86/kernel/i8237.c | |||
@@ -28,10 +28,10 @@ static int i8237A_resume(struct sys_device *dev) | |||
28 | 28 | ||
29 | flags = claim_dma_lock(); | 29 | flags = claim_dma_lock(); |
30 | 30 | ||
31 | dma_outb(DMA1_RESET_REG, 0); | 31 | dma_outb(0, DMA1_RESET_REG); |
32 | dma_outb(DMA2_RESET_REG, 0); | 32 | dma_outb(0, DMA2_RESET_REG); |
33 | 33 | ||
34 | for (i = 0;i < 8;i++) { | 34 | for (i = 0; i < 8; i++) { |
35 | set_dma_addr(i, 0x000000); | 35 | set_dma_addr(i, 0x000000); |
36 | /* DMA count is a bit weird so this is not 0 */ | 36 | /* DMA count is a bit weird so this is not 0 */ |
37 | set_dma_count(i, 1); | 37 | set_dma_count(i, 1); |
@@ -51,14 +51,14 @@ static int i8237A_suspend(struct sys_device *dev, pm_message_t state) | |||
51 | } | 51 | } |
52 | 52 | ||
53 | static struct sysdev_class i8237_sysdev_class = { | 53 | static struct sysdev_class i8237_sysdev_class = { |
54 | .name = "i8237", | 54 | .name = "i8237", |
55 | .suspend = i8237A_suspend, | 55 | .suspend = i8237A_suspend, |
56 | .resume = i8237A_resume, | 56 | .resume = i8237A_resume, |
57 | }; | 57 | }; |
58 | 58 | ||
59 | static struct sys_device device_i8237A = { | 59 | static struct sys_device device_i8237A = { |
60 | .id = 0, | 60 | .id = 0, |
61 | .cls = &i8237_sysdev_class, | 61 | .cls = &i8237_sysdev_class, |
62 | }; | 62 | }; |
63 | 63 | ||
64 | static int __init i8237A_init_sysfs(void) | 64 | static int __init i8237A_init_sysfs(void) |
@@ -68,5 +68,4 @@ static int __init i8237A_init_sysfs(void) | |||
68 | error = sysdev_register(&device_i8237A); | 68 | error = sysdev_register(&device_i8237A); |
69 | return error; | 69 | return error; |
70 | } | 70 | } |
71 | |||
72 | device_initcall(i8237A_init_sysfs); | 71 | device_initcall(i8237A_init_sysfs); |
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c index 9b0c480c383b..bc7ac4da90d7 100644 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/io_apic.c | |||
@@ -3841,14 +3841,24 @@ int __init io_apic_get_redir_entries (int ioapic) | |||
3841 | 3841 | ||
3842 | void __init probe_nr_irqs_gsi(void) | 3842 | void __init probe_nr_irqs_gsi(void) |
3843 | { | 3843 | { |
3844 | int idx; | ||
3845 | int nr = 0; | 3844 | int nr = 0; |
3846 | 3845 | ||
3847 | for (idx = 0; idx < nr_ioapics; idx++) | 3846 | nr = acpi_probe_gsi(); |
3848 | nr += io_apic_get_redir_entries(idx) + 1; | 3847 | if (nr > nr_irqs_gsi) { |
3849 | |||
3850 | if (nr > nr_irqs_gsi) | ||
3851 | nr_irqs_gsi = nr; | 3848 | nr_irqs_gsi = nr; |
3849 | } else { | ||
3850 | /* for acpi=off or acpi is not compiled in */ | ||
3851 | int idx; | ||
3852 | |||
3853 | nr = 0; | ||
3854 | for (idx = 0; idx < nr_ioapics; idx++) | ||
3855 | nr += io_apic_get_redir_entries(idx) + 1; | ||
3856 | |||
3857 | if (nr > nr_irqs_gsi) | ||
3858 | nr_irqs_gsi = nr; | ||
3859 | } | ||
3860 | |||
3861 | printk(KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi); | ||
3852 | } | 3862 | } |
3853 | 3863 | ||
3854 | /* -------------------------------------------------------------------------- | 3864 | /* -------------------------------------------------------------------------- |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 026819ffcb0c..51126b7c0923 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -180,6 +180,9 @@ void mwait_idle_with_hints(unsigned long ax, unsigned long cx) | |||
180 | 180 | ||
181 | trace_power_start(&it, POWER_CSTATE, (ax>>4)+1); | 181 | trace_power_start(&it, POWER_CSTATE, (ax>>4)+1); |
182 | if (!need_resched()) { | 182 | if (!need_resched()) { |
183 | if (cpu_has(¤t_cpu_data, X86_FEATURE_CLFLUSH_MONITOR)) | ||
184 | clflush((void *)¤t_thread_info()->flags); | ||
185 | |||
183 | __monitor((void *)¤t_thread_info()->flags, 0, 0); | 186 | __monitor((void *)¤t_thread_info()->flags, 0, 0); |
184 | smp_mb(); | 187 | smp_mb(); |
185 | if (!need_resched()) | 188 | if (!need_resched()) |
@@ -194,6 +197,9 @@ static void mwait_idle(void) | |||
194 | struct power_trace it; | 197 | struct power_trace it; |
195 | if (!need_resched()) { | 198 | if (!need_resched()) { |
196 | trace_power_start(&it, POWER_CSTATE, 1); | 199 | trace_power_start(&it, POWER_CSTATE, 1); |
200 | if (cpu_has(¤t_cpu_data, X86_FEATURE_CLFLUSH_MONITOR)) | ||
201 | clflush((void *)¤t_thread_info()->flags); | ||
202 | |||
197 | __monitor((void *)¤t_thread_info()->flags, 0, 0); | 203 | __monitor((void *)¤t_thread_info()->flags, 0, 0); |
198 | smp_mb(); | 204 | smp_mb(); |
199 | if (!need_resched()) | 205 | if (!need_resched()) |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 416fb9282f4f..85b4cb5c1980 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/uaccess.h> | 40 | #include <linux/uaccess.h> |
41 | #include <linux/io.h> | 41 | #include <linux/io.h> |
42 | #include <linux/ftrace.h> | 42 | #include <linux/ftrace.h> |
43 | #include <linux/dmi.h> | ||
43 | 44 | ||
44 | #include <asm/pgtable.h> | 45 | #include <asm/pgtable.h> |
45 | #include <asm/system.h> | 46 | #include <asm/system.h> |
@@ -151,14 +152,18 @@ void __show_regs(struct pt_regs *regs, int all) | |||
151 | unsigned long d0, d1, d2, d3, d6, d7; | 152 | unsigned long d0, d1, d2, d3, d6, d7; |
152 | unsigned int fsindex, gsindex; | 153 | unsigned int fsindex, gsindex; |
153 | unsigned int ds, cs, es; | 154 | unsigned int ds, cs, es; |
155 | const char *board; | ||
154 | 156 | ||
155 | printk("\n"); | 157 | printk("\n"); |
156 | print_modules(); | 158 | print_modules(); |
157 | printk(KERN_INFO "Pid: %d, comm: %.20s %s %s %.*s\n", | 159 | board = dmi_get_system_info(DMI_PRODUCT_NAME); |
160 | if (!board) | ||
161 | board = ""; | ||
162 | printk(KERN_INFO "Pid: %d, comm: %.20s %s %s %.*s %s\n", | ||
158 | current->pid, current->comm, print_tainted(), | 163 | current->pid, current->comm, print_tainted(), |
159 | init_utsname()->release, | 164 | init_utsname()->release, |
160 | (int)strcspn(init_utsname()->version, " "), | 165 | (int)strcspn(init_utsname()->version, " "), |
161 | init_utsname()->version); | 166 | init_utsname()->version, board); |
162 | printk(KERN_INFO "RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->ip); | 167 | printk(KERN_INFO "RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->ip); |
163 | printk_address(regs->ip, 1); | 168 | printk_address(regs->ip, 1); |
164 | printk(KERN_INFO "RSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, | 169 | printk(KERN_INFO "RSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index ae0d8042cf69..c461f6d69074 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -607,7 +607,7 @@ struct x86_quirks *x86_quirks __initdata = &default_x86_quirks; | |||
607 | static int __init dmi_low_memory_corruption(const struct dmi_system_id *d) | 607 | static int __init dmi_low_memory_corruption(const struct dmi_system_id *d) |
608 | { | 608 | { |
609 | printk(KERN_NOTICE | 609 | printk(KERN_NOTICE |
610 | "%s detected: BIOS may corrupt low RAM, working it around.\n", | 610 | "%s detected: BIOS may corrupt low RAM, working around it.\n", |
611 | d->ident); | 611 | d->ident); |
612 | 612 | ||
613 | e820_update_range(0, 0x10000, E820_RAM, E820_RESERVED); | 613 | e820_update_range(0, 0x10000, E820_RAM, E820_RESERVED); |
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 98c2d055284b..7932338d7cb3 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -896,7 +896,7 @@ asmlinkage void math_state_restore(void) | |||
896 | EXPORT_SYMBOL_GPL(math_state_restore); | 896 | EXPORT_SYMBOL_GPL(math_state_restore); |
897 | 897 | ||
898 | #ifndef CONFIG_MATH_EMULATION | 898 | #ifndef CONFIG_MATH_EMULATION |
899 | asmlinkage void math_emulate(long arg) | 899 | void math_emulate(struct math_emu_info *info) |
900 | { | 900 | { |
901 | printk(KERN_EMERG | 901 | printk(KERN_EMERG |
902 | "math-emulation not enabled and no coprocessor found.\n"); | 902 | "math-emulation not enabled and no coprocessor found.\n"); |
@@ -906,16 +906,19 @@ asmlinkage void math_emulate(long arg) | |||
906 | } | 906 | } |
907 | #endif /* CONFIG_MATH_EMULATION */ | 907 | #endif /* CONFIG_MATH_EMULATION */ |
908 | 908 | ||
909 | dotraplinkage void __kprobes | 909 | dotraplinkage void __kprobes do_device_not_available(struct pt_regs regs) |
910 | do_device_not_available(struct pt_regs *regs, long error) | ||
911 | { | 910 | { |
912 | #ifdef CONFIG_X86_32 | 911 | #ifdef CONFIG_X86_32 |
913 | if (read_cr0() & X86_CR0_EM) { | 912 | if (read_cr0() & X86_CR0_EM) { |
914 | conditional_sti(regs); | 913 | struct math_emu_info info = { }; |
915 | math_emulate(0); | 914 | |
915 | conditional_sti(®s); | ||
916 | |||
917 | info.regs = ®s; | ||
918 | math_emulate(&info); | ||
916 | } else { | 919 | } else { |
917 | math_state_restore(); /* interrupts still off */ | 920 | math_state_restore(); /* interrupts still off */ |
918 | conditional_sti(regs); | 921 | conditional_sti(®s); |
919 | } | 922 | } |
920 | #else | 923 | #else |
921 | math_state_restore(); | 924 | math_state_restore(); |
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c index 1d3302cc2ddf..bef58b4982db 100644 --- a/arch/x86/kernel/vmi_32.c +++ b/arch/x86/kernel/vmi_32.c | |||
@@ -321,6 +321,16 @@ static void vmi_release_pmd(unsigned long pfn) | |||
321 | } | 321 | } |
322 | 322 | ||
323 | /* | 323 | /* |
324 | * We use the pgd_free hook for releasing the pgd page: | ||
325 | */ | ||
326 | static void vmi_pgd_free(struct mm_struct *mm, pgd_t *pgd) | ||
327 | { | ||
328 | unsigned long pfn = __pa(pgd) >> PAGE_SHIFT; | ||
329 | |||
330 | vmi_ops.release_page(pfn, VMI_PAGE_L2); | ||
331 | } | ||
332 | |||
333 | /* | ||
324 | * Helper macros for MMU update flags. We can defer updates until a flush | 334 | * Helper macros for MMU update flags. We can defer updates until a flush |
325 | * or page invalidation only if the update is to the current address space | 335 | * or page invalidation only if the update is to the current address space |
326 | * (otherwise, there is no flush). We must check against init_mm, since | 336 | * (otherwise, there is no flush). We must check against init_mm, since |
@@ -762,6 +772,7 @@ static inline int __init activate_vmi(void) | |||
762 | if (vmi_ops.release_page) { | 772 | if (vmi_ops.release_page) { |
763 | pv_mmu_ops.release_pte = vmi_release_pte; | 773 | pv_mmu_ops.release_pte = vmi_release_pte; |
764 | pv_mmu_ops.release_pmd = vmi_release_pmd; | 774 | pv_mmu_ops.release_pmd = vmi_release_pmd; |
775 | pv_mmu_ops.pgd_free = vmi_pgd_free; | ||
765 | } | 776 | } |
766 | 777 | ||
767 | /* Set linear is needed in all cases */ | 778 | /* Set linear is needed in all cases */ |
diff --git a/arch/x86/math-emu/fpu_entry.c b/arch/x86/math-emu/fpu_entry.c index c7b06feb139b..5d87f586f8d7 100644 --- a/arch/x86/math-emu/fpu_entry.c +++ b/arch/x86/math-emu/fpu_entry.c | |||
@@ -131,7 +131,7 @@ u_char emulating = 0; | |||
131 | static int valid_prefix(u_char *Byte, u_char __user ** fpu_eip, | 131 | static int valid_prefix(u_char *Byte, u_char __user ** fpu_eip, |
132 | overrides * override); | 132 | overrides * override); |
133 | 133 | ||
134 | asmlinkage void math_emulate(long arg) | 134 | void math_emulate(struct math_emu_info *info) |
135 | { | 135 | { |
136 | u_char FPU_modrm, byte1; | 136 | u_char FPU_modrm, byte1; |
137 | unsigned short code; | 137 | unsigned short code; |
@@ -161,7 +161,7 @@ asmlinkage void math_emulate(long arg) | |||
161 | RE_ENTRANT_CHECK_ON; | 161 | RE_ENTRANT_CHECK_ON; |
162 | #endif /* RE_ENTRANT_CHECKING */ | 162 | #endif /* RE_ENTRANT_CHECKING */ |
163 | 163 | ||
164 | SETUP_DATA_AREA(arg); | 164 | FPU_info = info; |
165 | 165 | ||
166 | FPU_ORIG_EIP = FPU_EIP; | 166 | FPU_ORIG_EIP = FPU_EIP; |
167 | 167 | ||
@@ -659,7 +659,7 @@ static int valid_prefix(u_char *Byte, u_char __user **fpu_eip, | |||
659 | } | 659 | } |
660 | } | 660 | } |
661 | 661 | ||
662 | void math_abort(struct info *info, unsigned int signal) | 662 | void math_abort(struct math_emu_info *info, unsigned int signal) |
663 | { | 663 | { |
664 | FPU_EIP = FPU_ORIG_EIP; | 664 | FPU_EIP = FPU_ORIG_EIP; |
665 | current->thread.trap_no = 16; | 665 | current->thread.trap_no = 16; |
diff --git a/arch/x86/math-emu/fpu_proto.h b/arch/x86/math-emu/fpu_proto.h index aa49b6a0d850..9779df436b7d 100644 --- a/arch/x86/math-emu/fpu_proto.h +++ b/arch/x86/math-emu/fpu_proto.h | |||
@@ -51,8 +51,8 @@ extern void ffreep(void); | |||
51 | extern void fst_i_(void); | 51 | extern void fst_i_(void); |
52 | extern void fstp_i(void); | 52 | extern void fstp_i(void); |
53 | /* fpu_entry.c */ | 53 | /* fpu_entry.c */ |
54 | asmlinkage extern void math_emulate(long arg); | 54 | extern void math_emulate(struct math_emu_info *info); |
55 | extern void math_abort(struct info *info, unsigned int signal); | 55 | extern void math_abort(struct math_emu_info *info, unsigned int signal); |
56 | /* fpu_etc.c */ | 56 | /* fpu_etc.c */ |
57 | extern void FPU_etc(void); | 57 | extern void FPU_etc(void); |
58 | /* fpu_tags.c */ | 58 | /* fpu_tags.c */ |
diff --git a/arch/x86/math-emu/fpu_system.h b/arch/x86/math-emu/fpu_system.h index 13488fa153e0..50fa0ec2c8a5 100644 --- a/arch/x86/math-emu/fpu_system.h +++ b/arch/x86/math-emu/fpu_system.h | |||
@@ -16,10 +16,6 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | 18 | ||
19 | /* This sets the pointer FPU_info to point to the argument part | ||
20 | of the stack frame of math_emulate() */ | ||
21 | #define SETUP_DATA_AREA(arg) FPU_info = (struct info *) &arg | ||
22 | |||
23 | /* s is always from a cpu register, and the cpu does bounds checking | 19 | /* s is always from a cpu register, and the cpu does bounds checking |
24 | * during register load --> no further bounds checks needed */ | 20 | * during register load --> no further bounds checks needed */ |
25 | #define LDT_DESCRIPTOR(s) (((struct desc_struct *)current->mm->context.ldt)[(s) >> 3]) | 21 | #define LDT_DESCRIPTOR(s) (((struct desc_struct *)current->mm->context.ldt)[(s) >> 3]) |
@@ -38,12 +34,12 @@ | |||
38 | #define I387 (current->thread.xstate) | 34 | #define I387 (current->thread.xstate) |
39 | #define FPU_info (I387->soft.info) | 35 | #define FPU_info (I387->soft.info) |
40 | 36 | ||
41 | #define FPU_CS (*(unsigned short *) &(FPU_info->___cs)) | 37 | #define FPU_CS (*(unsigned short *) &(FPU_info->regs->cs)) |
42 | #define FPU_SS (*(unsigned short *) &(FPU_info->___ss)) | 38 | #define FPU_SS (*(unsigned short *) &(FPU_info->regs->ss)) |
43 | #define FPU_DS (*(unsigned short *) &(FPU_info->___ds)) | 39 | #define FPU_DS (*(unsigned short *) &(FPU_info->regs->ds)) |
44 | #define FPU_EAX (FPU_info->___eax) | 40 | #define FPU_EAX (FPU_info->regs->ax) |
45 | #define FPU_EFLAGS (FPU_info->___eflags) | 41 | #define FPU_EFLAGS (FPU_info->regs->flags) |
46 | #define FPU_EIP (FPU_info->___eip) | 42 | #define FPU_EIP (FPU_info->regs->ip) |
47 | #define FPU_ORIG_EIP (FPU_info->___orig_eip) | 43 | #define FPU_ORIG_EIP (FPU_info->___orig_eip) |
48 | 44 | ||
49 | #define FPU_lookahead (I387->soft.lookahead) | 45 | #define FPU_lookahead (I387->soft.lookahead) |
diff --git a/arch/x86/math-emu/get_address.c b/arch/x86/math-emu/get_address.c index d701e2b39e44..420b3b6e3915 100644 --- a/arch/x86/math-emu/get_address.c +++ b/arch/x86/math-emu/get_address.c | |||
@@ -29,46 +29,43 @@ | |||
29 | #define FPU_WRITE_BIT 0x10 | 29 | #define FPU_WRITE_BIT 0x10 |
30 | 30 | ||
31 | static int reg_offset[] = { | 31 | static int reg_offset[] = { |
32 | offsetof(struct info, ___eax), | 32 | offsetof(struct pt_regs, ax), |
33 | offsetof(struct info, ___ecx), | 33 | offsetof(struct pt_regs, cx), |
34 | offsetof(struct info, ___edx), | 34 | offsetof(struct pt_regs, dx), |
35 | offsetof(struct info, ___ebx), | 35 | offsetof(struct pt_regs, bx), |
36 | offsetof(struct info, ___esp), | 36 | offsetof(struct pt_regs, sp), |
37 | offsetof(struct info, ___ebp), | 37 | offsetof(struct pt_regs, bp), |
38 | offsetof(struct info, ___esi), | 38 | offsetof(struct pt_regs, si), |
39 | offsetof(struct info, ___edi) | 39 | offsetof(struct pt_regs, di) |
40 | }; | 40 | }; |
41 | 41 | ||
42 | #define REG_(x) (*(long *)(reg_offset[(x)]+(u_char *) FPU_info)) | 42 | #define REG_(x) (*(long *)(reg_offset[(x)] + (u_char *)FPU_info->regs)) |
43 | 43 | ||
44 | static int reg_offset_vm86[] = { | 44 | static int reg_offset_vm86[] = { |
45 | offsetof(struct info, ___cs), | 45 | offsetof(struct pt_regs, cs), |
46 | offsetof(struct info, ___vm86_ds), | 46 | offsetof(struct kernel_vm86_regs, ds), |
47 | offsetof(struct info, ___vm86_es), | 47 | offsetof(struct kernel_vm86_regs, es), |
48 | offsetof(struct info, ___vm86_fs), | 48 | offsetof(struct kernel_vm86_regs, fs), |
49 | offsetof(struct info, ___vm86_gs), | 49 | offsetof(struct kernel_vm86_regs, gs), |
50 | offsetof(struct info, ___ss), | 50 | offsetof(struct pt_regs, ss), |
51 | offsetof(struct info, ___vm86_ds) | 51 | offsetof(struct kernel_vm86_regs, ds) |
52 | }; | 52 | }; |
53 | 53 | ||
54 | #define VM86_REG_(x) (*(unsigned short *) \ | 54 | #define VM86_REG_(x) (*(unsigned short *) \ |
55 | (reg_offset_vm86[((unsigned)x)]+(u_char *) FPU_info)) | 55 | (reg_offset_vm86[((unsigned)x)] + (u_char *)FPU_info->regs)) |
56 | |||
57 | /* This dummy, gs is not saved on the stack. */ | ||
58 | #define ___GS ___ds | ||
59 | 56 | ||
60 | static int reg_offset_pm[] = { | 57 | static int reg_offset_pm[] = { |
61 | offsetof(struct info, ___cs), | 58 | offsetof(struct pt_regs, cs), |
62 | offsetof(struct info, ___ds), | 59 | offsetof(struct pt_regs, ds), |
63 | offsetof(struct info, ___es), | 60 | offsetof(struct pt_regs, es), |
64 | offsetof(struct info, ___fs), | 61 | offsetof(struct pt_regs, fs), |
65 | offsetof(struct info, ___GS), | 62 | offsetof(struct pt_regs, ds), /* dummy, not saved on stack */ |
66 | offsetof(struct info, ___ss), | 63 | offsetof(struct pt_regs, ss), |
67 | offsetof(struct info, ___ds) | 64 | offsetof(struct pt_regs, ds) |
68 | }; | 65 | }; |
69 | 66 | ||
70 | #define PM_REG_(x) (*(unsigned short *) \ | 67 | #define PM_REG_(x) (*(unsigned short *) \ |
71 | (reg_offset_pm[((unsigned)x)]+(u_char *) FPU_info)) | 68 | (reg_offset_pm[((unsigned)x)] + (u_char *)FPU_info->regs)) |
72 | 69 | ||
73 | /* Decode the SIB byte. This function assumes mod != 0 */ | 70 | /* Decode the SIB byte. This function assumes mod != 0 */ |
74 | static int sib(int mod, unsigned long *fpu_eip) | 71 | static int sib(int mod, unsigned long *fpu_eip) |
@@ -349,34 +346,34 @@ void __user *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip, | |||
349 | } | 346 | } |
350 | switch (rm) { | 347 | switch (rm) { |
351 | case 0: | 348 | case 0: |
352 | address += FPU_info->___ebx + FPU_info->___esi; | 349 | address += FPU_info->regs->bx + FPU_info->regs->si; |
353 | break; | 350 | break; |
354 | case 1: | 351 | case 1: |
355 | address += FPU_info->___ebx + FPU_info->___edi; | 352 | address += FPU_info->regs->bx + FPU_info->regs->di; |
356 | break; | 353 | break; |
357 | case 2: | 354 | case 2: |
358 | address += FPU_info->___ebp + FPU_info->___esi; | 355 | address += FPU_info->regs->bp + FPU_info->regs->si; |
359 | if (addr_modes.override.segment == PREFIX_DEFAULT) | 356 | if (addr_modes.override.segment == PREFIX_DEFAULT) |
360 | addr_modes.override.segment = PREFIX_SS_; | 357 | addr_modes.override.segment = PREFIX_SS_; |
361 | break; | 358 | break; |
362 | case 3: | 359 | case 3: |
363 | address += FPU_info->___ebp + FPU_info->___edi; | 360 | address += FPU_info->regs->bp + FPU_info->regs->di; |
364 | if (addr_modes.override.segment == PREFIX_DEFAULT) | 361 | if (addr_modes.override.segment == PREFIX_DEFAULT) |
365 | addr_modes.override.segment = PREFIX_SS_; | 362 | addr_modes.override.segment = PREFIX_SS_; |
366 | break; | 363 | break; |
367 | case 4: | 364 | case 4: |
368 | address += FPU_info->___esi; | 365 | address += FPU_info->regs->si; |
369 | break; | 366 | break; |
370 | case 5: | 367 | case 5: |
371 | address += FPU_info->___edi; | 368 | address += FPU_info->regs->di; |
372 | break; | 369 | break; |
373 | case 6: | 370 | case 6: |
374 | address += FPU_info->___ebp; | 371 | address += FPU_info->regs->bp; |
375 | if (addr_modes.override.segment == PREFIX_DEFAULT) | 372 | if (addr_modes.override.segment == PREFIX_DEFAULT) |
376 | addr_modes.override.segment = PREFIX_SS_; | 373 | addr_modes.override.segment = PREFIX_SS_; |
377 | break; | 374 | break; |
378 | case 7: | 375 | case 7: |
379 | address += FPU_info->___ebx; | 376 | address += FPU_info->regs->bx; |
380 | break; | 377 | break; |
381 | } | 378 | } |
382 | 379 | ||
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c index 72fc0f799a64..89d7a6e94c9c 100644 --- a/drivers/atm/solos-pci.c +++ b/drivers/atm/solos-pci.c | |||
@@ -685,6 +685,7 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
685 | out_release_regions: | 685 | out_release_regions: |
686 | pci_release_regions(dev); | 686 | pci_release_regions(dev); |
687 | out: | 687 | out: |
688 | kfree(card); | ||
688 | return err; | 689 | return err; |
689 | } | 690 | } |
690 | 691 | ||
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 34f80fa6fed1..8299e2d3b611 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -549,6 +549,15 @@ static void do_nbd_request(struct request_queue * q) | |||
549 | 549 | ||
550 | BUG_ON(lo->magic != LO_MAGIC); | 550 | BUG_ON(lo->magic != LO_MAGIC); |
551 | 551 | ||
552 | if (unlikely(!lo->sock)) { | ||
553 | printk(KERN_ERR "%s: Attempted send on closed socket\n", | ||
554 | lo->disk->disk_name); | ||
555 | req->errors++; | ||
556 | nbd_end_request(req); | ||
557 | spin_lock_irq(q->queue_lock); | ||
558 | continue; | ||
559 | } | ||
560 | |||
552 | spin_lock_irq(&lo->queue_lock); | 561 | spin_lock_irq(&lo->queue_lock); |
553 | list_add_tail(&req->queuelist, &lo->waiting_queue); | 562 | list_add_tail(&req->queuelist, &lo->waiting_queue); |
554 | spin_unlock_irq(&lo->queue_lock); | 563 | spin_unlock_irq(&lo->queue_lock); |
diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c index 726ee8a0277f..ecba4942fc8e 100644 --- a/drivers/char/tpm/tpm_infineon.c +++ b/drivers/char/tpm/tpm_infineon.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * SLD 9630 TT 1.1 and SLB 9635 TT 1.2 Trusted Platform Module | 4 | * SLD 9630 TT 1.1 and SLB 9635 TT 1.2 Trusted Platform Module |
5 | * Specifications at www.trustedcomputinggroup.org | 5 | * Specifications at www.trustedcomputinggroup.org |
6 | * | 6 | * |
7 | * Copyright (C) 2005, Marcel Selhorst <selhorst@crypto.rub.de> | 7 | * Copyright (C) 2005, Marcel Selhorst <m.selhorst@sirrix.com> |
8 | * Sirrix AG - security technologies, http://www.sirrix.com and | 8 | * Sirrix AG - security technologies, http://www.sirrix.com and |
9 | * Applied Data Security Group, Ruhr-University Bochum, Germany | 9 | * Applied Data Security Group, Ruhr-University Bochum, Germany |
10 | * Project-Homepage: http://www.prosec.rub.de/tpm | 10 | * Project-Homepage: http://www.prosec.rub.de/tpm |
@@ -636,7 +636,7 @@ static void __exit cleanup_inf(void) | |||
636 | module_init(init_inf); | 636 | module_init(init_inf); |
637 | module_exit(cleanup_inf); | 637 | module_exit(cleanup_inf); |
638 | 638 | ||
639 | MODULE_AUTHOR("Marcel Selhorst <selhorst@crypto.rub.de>"); | 639 | MODULE_AUTHOR("Marcel Selhorst <m.selhorst@sirrix.com>"); |
640 | MODULE_DESCRIPTION("Driver for Infineon TPM SLD 9630 TT 1.1 / SLB 9635 TT 1.2"); | 640 | MODULE_DESCRIPTION("Driver for Infineon TPM SLD 9630 TT 1.1 / SLB 9635 TT 1.2"); |
641 | MODULE_VERSION("1.9"); | 641 | MODULE_VERSION("1.9"); |
642 | MODULE_LICENSE("GPL"); | 642 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 595ba8eb4a07..0b28141e43bf 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c | |||
@@ -4599,6 +4599,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m) | |||
4599 | printk(KERN_ERR "%s: no memory for coeffs\n", | 4599 | printk(KERN_ERR "%s: no memory for coeffs\n", |
4600 | __func__); | 4600 | __func__); |
4601 | ret = -ENOMEM; | 4601 | ret = -ENOMEM; |
4602 | kfree(bch); | ||
4602 | goto free_chan; | 4603 | goto free_chan; |
4603 | } | 4604 | } |
4604 | bch->nr = ch; | 4605 | bch->nr = ch; |
@@ -4767,6 +4768,7 @@ init_multi_port(struct hfc_multi *hc, int pt) | |||
4767 | printk(KERN_ERR "%s: no memory for coeffs\n", | 4768 | printk(KERN_ERR "%s: no memory for coeffs\n", |
4768 | __func__); | 4769 | __func__); |
4769 | ret = -ENOMEM; | 4770 | ret = -ENOMEM; |
4771 | kfree(bch); | ||
4770 | goto free_chan; | 4772 | goto free_chan; |
4771 | } | 4773 | } |
4772 | bch->nr = ch + 1; | 4774 | bch->nr = ch + 1; |
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index 535c234286ea..8c694213035b 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c | |||
@@ -1475,6 +1475,7 @@ el3_resume(struct device *pdev) | |||
1475 | spin_lock_irqsave(&lp->lock, flags); | 1475 | spin_lock_irqsave(&lp->lock, flags); |
1476 | 1476 | ||
1477 | outw(PowerUp, ioaddr + EL3_CMD); | 1477 | outw(PowerUp, ioaddr + EL3_CMD); |
1478 | EL3WINDOW(0); | ||
1478 | el3_up(dev); | 1479 | el3_up(dev); |
1479 | 1480 | ||
1480 | if (netif_running(dev)) | 1481 | if (netif_running(dev)) |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index acae2d8cd688..9b12a13a640f 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -1629,6 +1629,12 @@ static void gfar_schedule_cleanup(struct net_device *dev) | |||
1629 | if (netif_rx_schedule_prep(&priv->napi)) { | 1629 | if (netif_rx_schedule_prep(&priv->napi)) { |
1630 | gfar_write(&priv->regs->imask, IMASK_RTX_DISABLED); | 1630 | gfar_write(&priv->regs->imask, IMASK_RTX_DISABLED); |
1631 | __netif_rx_schedule(&priv->napi); | 1631 | __netif_rx_schedule(&priv->napi); |
1632 | } else { | ||
1633 | /* | ||
1634 | * Clear IEVENT, so interrupts aren't called again | ||
1635 | * because of the packets that have already arrived. | ||
1636 | */ | ||
1637 | gfar_write(&priv->regs->ievent, IEVENT_RTX_MASK); | ||
1632 | } | 1638 | } |
1633 | 1639 | ||
1634 | spin_unlock(&priv->rxlock); | 1640 | spin_unlock(&priv->rxlock); |
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 9c78c963b721..f4dd9acb6877 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -1203,7 +1203,7 @@ typedef struct { | |||
1203 | #define NETXEN_IS_MSI_FAMILY(adapter) \ | 1203 | #define NETXEN_IS_MSI_FAMILY(adapter) \ |
1204 | ((adapter)->flags & (NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED)) | 1204 | ((adapter)->flags & (NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED)) |
1205 | 1205 | ||
1206 | #define MSIX_ENTRIES_PER_ADAPTER 8 | 1206 | #define MSIX_ENTRIES_PER_ADAPTER 1 |
1207 | #define NETXEN_MSIX_TBL_SPACE 8192 | 1207 | #define NETXEN_MSIX_TBL_SPACE 8192 |
1208 | #define NETXEN_PCI_REG_MSIX_TBL 0x44 | 1208 | #define NETXEN_PCI_REG_MSIX_TBL 0x44 |
1209 | 1209 | ||
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 645d384fe87e..3b17a7936147 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -76,6 +76,7 @@ static void netxen_nic_poll_controller(struct net_device *netdev); | |||
76 | #endif | 76 | #endif |
77 | static irqreturn_t netxen_intr(int irq, void *data); | 77 | static irqreturn_t netxen_intr(int irq, void *data); |
78 | static irqreturn_t netxen_msi_intr(int irq, void *data); | 78 | static irqreturn_t netxen_msi_intr(int irq, void *data); |
79 | static irqreturn_t netxen_msix_intr(int irq, void *data); | ||
79 | 80 | ||
80 | /* PCI Device ID Table */ | 81 | /* PCI Device ID Table */ |
81 | #define ENTRY(device) \ | 82 | #define ENTRY(device) \ |
@@ -1084,7 +1085,9 @@ static int netxen_nic_open(struct net_device *netdev) | |||
1084 | for (ring = 0; ring < adapter->max_rds_rings; ring++) | 1085 | for (ring = 0; ring < adapter->max_rds_rings; ring++) |
1085 | netxen_post_rx_buffers(adapter, ctx, ring); | 1086 | netxen_post_rx_buffers(adapter, ctx, ring); |
1086 | } | 1087 | } |
1087 | if (NETXEN_IS_MSI_FAMILY(adapter)) | 1088 | if (adapter->flags & NETXEN_NIC_MSIX_ENABLED) |
1089 | handler = netxen_msix_intr; | ||
1090 | else if (adapter->flags & NETXEN_NIC_MSI_ENABLED) | ||
1088 | handler = netxen_msi_intr; | 1091 | handler = netxen_msi_intr; |
1089 | else { | 1092 | else { |
1090 | flags |= IRQF_SHARED; | 1093 | flags |= IRQF_SHARED; |
@@ -1612,6 +1615,14 @@ static irqreturn_t netxen_msi_intr(int irq, void *data) | |||
1612 | return IRQ_HANDLED; | 1615 | return IRQ_HANDLED; |
1613 | } | 1616 | } |
1614 | 1617 | ||
1618 | static irqreturn_t netxen_msix_intr(int irq, void *data) | ||
1619 | { | ||
1620 | struct netxen_adapter *adapter = data; | ||
1621 | |||
1622 | napi_schedule(&adapter->napi); | ||
1623 | return IRQ_HANDLED; | ||
1624 | } | ||
1625 | |||
1615 | static int netxen_nic_poll(struct napi_struct *napi, int budget) | 1626 | static int netxen_nic_poll(struct napi_struct *napi, int budget) |
1616 | { | 1627 | { |
1617 | struct netxen_adapter *adapter = container_of(napi, struct netxen_adapter, napi); | 1628 | struct netxen_adapter *adapter = container_of(napi, struct netxen_adapter, napi); |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 2c73ca606b35..0771eb6fc6eb 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -437,6 +437,22 @@ enum features { | |||
437 | RTL_FEATURE_GMII = (1 << 2), | 437 | RTL_FEATURE_GMII = (1 << 2), |
438 | }; | 438 | }; |
439 | 439 | ||
440 | struct rtl8169_counters { | ||
441 | __le64 tx_packets; | ||
442 | __le64 rx_packets; | ||
443 | __le64 tx_errors; | ||
444 | __le32 rx_errors; | ||
445 | __le16 rx_missed; | ||
446 | __le16 align_errors; | ||
447 | __le32 tx_one_collision; | ||
448 | __le32 tx_multi_collision; | ||
449 | __le64 rx_unicast; | ||
450 | __le64 rx_broadcast; | ||
451 | __le32 rx_multicast; | ||
452 | __le16 tx_aborted; | ||
453 | __le16 tx_underun; | ||
454 | }; | ||
455 | |||
440 | struct rtl8169_private { | 456 | struct rtl8169_private { |
441 | void __iomem *mmio_addr; /* memory map physical address */ | 457 | void __iomem *mmio_addr; /* memory map physical address */ |
442 | struct pci_dev *pci_dev; /* Index of PCI device */ | 458 | struct pci_dev *pci_dev; /* Index of PCI device */ |
@@ -480,6 +496,7 @@ struct rtl8169_private { | |||
480 | unsigned features; | 496 | unsigned features; |
481 | 497 | ||
482 | struct mii_if_info mii; | 498 | struct mii_if_info mii; |
499 | struct rtl8169_counters counters; | ||
483 | }; | 500 | }; |
484 | 501 | ||
485 | MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>"); | 502 | MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>"); |
@@ -1100,22 +1117,6 @@ static const char rtl8169_gstrings[][ETH_GSTRING_LEN] = { | |||
1100 | "tx_underrun", | 1117 | "tx_underrun", |
1101 | }; | 1118 | }; |
1102 | 1119 | ||
1103 | struct rtl8169_counters { | ||
1104 | __le64 tx_packets; | ||
1105 | __le64 rx_packets; | ||
1106 | __le64 tx_errors; | ||
1107 | __le32 rx_errors; | ||
1108 | __le16 rx_missed; | ||
1109 | __le16 align_errors; | ||
1110 | __le32 tx_one_collision; | ||
1111 | __le32 tx_multi_collision; | ||
1112 | __le64 rx_unicast; | ||
1113 | __le64 rx_broadcast; | ||
1114 | __le32 rx_multicast; | ||
1115 | __le16 tx_aborted; | ||
1116 | __le16 tx_underun; | ||
1117 | }; | ||
1118 | |||
1119 | static int rtl8169_get_sset_count(struct net_device *dev, int sset) | 1120 | static int rtl8169_get_sset_count(struct net_device *dev, int sset) |
1120 | { | 1121 | { |
1121 | switch (sset) { | 1122 | switch (sset) { |
@@ -1126,16 +1127,21 @@ static int rtl8169_get_sset_count(struct net_device *dev, int sset) | |||
1126 | } | 1127 | } |
1127 | } | 1128 | } |
1128 | 1129 | ||
1129 | static void rtl8169_get_ethtool_stats(struct net_device *dev, | 1130 | static void rtl8169_update_counters(struct net_device *dev) |
1130 | struct ethtool_stats *stats, u64 *data) | ||
1131 | { | 1131 | { |
1132 | struct rtl8169_private *tp = netdev_priv(dev); | 1132 | struct rtl8169_private *tp = netdev_priv(dev); |
1133 | void __iomem *ioaddr = tp->mmio_addr; | 1133 | void __iomem *ioaddr = tp->mmio_addr; |
1134 | struct rtl8169_counters *counters; | 1134 | struct rtl8169_counters *counters; |
1135 | dma_addr_t paddr; | 1135 | dma_addr_t paddr; |
1136 | u32 cmd; | 1136 | u32 cmd; |
1137 | int wait = 1000; | ||
1137 | 1138 | ||
1138 | ASSERT_RTNL(); | 1139 | /* |
1140 | * Some chips are unable to dump tally counters when the receiver | ||
1141 | * is disabled. | ||
1142 | */ | ||
1143 | if ((RTL_R8(ChipCmd) & CmdRxEnb) == 0) | ||
1144 | return; | ||
1139 | 1145 | ||
1140 | counters = pci_alloc_consistent(tp->pci_dev, sizeof(*counters), &paddr); | 1146 | counters = pci_alloc_consistent(tp->pci_dev, sizeof(*counters), &paddr); |
1141 | if (!counters) | 1147 | if (!counters) |
@@ -1146,31 +1152,45 @@ static void rtl8169_get_ethtool_stats(struct net_device *dev, | |||
1146 | RTL_W32(CounterAddrLow, cmd); | 1152 | RTL_W32(CounterAddrLow, cmd); |
1147 | RTL_W32(CounterAddrLow, cmd | CounterDump); | 1153 | RTL_W32(CounterAddrLow, cmd | CounterDump); |
1148 | 1154 | ||
1149 | while (RTL_R32(CounterAddrLow) & CounterDump) { | 1155 | while (wait--) { |
1150 | if (msleep_interruptible(1)) | 1156 | if ((RTL_R32(CounterAddrLow) & CounterDump) == 0) { |
1157 | /* copy updated counters */ | ||
1158 | memcpy(&tp->counters, counters, sizeof(*counters)); | ||
1151 | break; | 1159 | break; |
1160 | } | ||
1161 | udelay(10); | ||
1152 | } | 1162 | } |
1153 | 1163 | ||
1154 | RTL_W32(CounterAddrLow, 0); | 1164 | RTL_W32(CounterAddrLow, 0); |
1155 | RTL_W32(CounterAddrHigh, 0); | 1165 | RTL_W32(CounterAddrHigh, 0); |
1156 | 1166 | ||
1157 | data[0] = le64_to_cpu(counters->tx_packets); | ||
1158 | data[1] = le64_to_cpu(counters->rx_packets); | ||
1159 | data[2] = le64_to_cpu(counters->tx_errors); | ||
1160 | data[3] = le32_to_cpu(counters->rx_errors); | ||
1161 | data[4] = le16_to_cpu(counters->rx_missed); | ||
1162 | data[5] = le16_to_cpu(counters->align_errors); | ||
1163 | data[6] = le32_to_cpu(counters->tx_one_collision); | ||
1164 | data[7] = le32_to_cpu(counters->tx_multi_collision); | ||
1165 | data[8] = le64_to_cpu(counters->rx_unicast); | ||
1166 | data[9] = le64_to_cpu(counters->rx_broadcast); | ||
1167 | data[10] = le32_to_cpu(counters->rx_multicast); | ||
1168 | data[11] = le16_to_cpu(counters->tx_aborted); | ||
1169 | data[12] = le16_to_cpu(counters->tx_underun); | ||
1170 | |||
1171 | pci_free_consistent(tp->pci_dev, sizeof(*counters), counters, paddr); | 1167 | pci_free_consistent(tp->pci_dev, sizeof(*counters), counters, paddr); |
1172 | } | 1168 | } |
1173 | 1169 | ||
1170 | static void rtl8169_get_ethtool_stats(struct net_device *dev, | ||
1171 | struct ethtool_stats *stats, u64 *data) | ||
1172 | { | ||
1173 | struct rtl8169_private *tp = netdev_priv(dev); | ||
1174 | |||
1175 | ASSERT_RTNL(); | ||
1176 | |||
1177 | rtl8169_update_counters(dev); | ||
1178 | |||
1179 | data[0] = le64_to_cpu(tp->counters.tx_packets); | ||
1180 | data[1] = le64_to_cpu(tp->counters.rx_packets); | ||
1181 | data[2] = le64_to_cpu(tp->counters.tx_errors); | ||
1182 | data[3] = le32_to_cpu(tp->counters.rx_errors); | ||
1183 | data[4] = le16_to_cpu(tp->counters.rx_missed); | ||
1184 | data[5] = le16_to_cpu(tp->counters.align_errors); | ||
1185 | data[6] = le32_to_cpu(tp->counters.tx_one_collision); | ||
1186 | data[7] = le32_to_cpu(tp->counters.tx_multi_collision); | ||
1187 | data[8] = le64_to_cpu(tp->counters.rx_unicast); | ||
1188 | data[9] = le64_to_cpu(tp->counters.rx_broadcast); | ||
1189 | data[10] = le32_to_cpu(tp->counters.rx_multicast); | ||
1190 | data[11] = le16_to_cpu(tp->counters.tx_aborted); | ||
1191 | data[12] = le16_to_cpu(tp->counters.tx_underun); | ||
1192 | } | ||
1193 | |||
1174 | static void rtl8169_get_strings(struct net_device *dev, u32 stringset, u8 *data) | 1194 | static void rtl8169_get_strings(struct net_device *dev, u32 stringset, u8 *data) |
1175 | { | 1195 | { |
1176 | switch(stringset) { | 1196 | switch(stringset) { |
@@ -3682,6 +3702,9 @@ static int rtl8169_close(struct net_device *dev) | |||
3682 | struct rtl8169_private *tp = netdev_priv(dev); | 3702 | struct rtl8169_private *tp = netdev_priv(dev); |
3683 | struct pci_dev *pdev = tp->pci_dev; | 3703 | struct pci_dev *pdev = tp->pci_dev; |
3684 | 3704 | ||
3705 | /* update counters before going down */ | ||
3706 | rtl8169_update_counters(dev); | ||
3707 | |||
3685 | rtl8169_down(dev); | 3708 | rtl8169_down(dev); |
3686 | 3709 | ||
3687 | free_irq(dev->irq, dev); | 3710 | free_irq(dev->irq, dev); |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index b17efa9cc530..491876341068 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -2221,6 +2221,8 @@ static int gem_do_start(struct net_device *dev) | |||
2221 | 2221 | ||
2222 | gp->running = 1; | 2222 | gp->running = 1; |
2223 | 2223 | ||
2224 | napi_enable(&gp->napi); | ||
2225 | |||
2224 | if (gp->lstate == link_up) { | 2226 | if (gp->lstate == link_up) { |
2225 | netif_carrier_on(gp->dev); | 2227 | netif_carrier_on(gp->dev); |
2226 | gem_set_link_modes(gp); | 2228 | gem_set_link_modes(gp); |
@@ -2238,6 +2240,8 @@ static int gem_do_start(struct net_device *dev) | |||
2238 | spin_lock_irqsave(&gp->lock, flags); | 2240 | spin_lock_irqsave(&gp->lock, flags); |
2239 | spin_lock(&gp->tx_lock); | 2241 | spin_lock(&gp->tx_lock); |
2240 | 2242 | ||
2243 | napi_disable(&gp->napi); | ||
2244 | |||
2241 | gp->running = 0; | 2245 | gp->running = 0; |
2242 | gem_reset(gp); | 2246 | gem_reset(gp); |
2243 | gem_clean_rings(gp); | 2247 | gem_clean_rings(gp); |
@@ -2338,8 +2342,6 @@ static int gem_open(struct net_device *dev) | |||
2338 | if (!gp->asleep) | 2342 | if (!gp->asleep) |
2339 | rc = gem_do_start(dev); | 2343 | rc = gem_do_start(dev); |
2340 | gp->opened = (rc == 0); | 2344 | gp->opened = (rc == 0); |
2341 | if (gp->opened) | ||
2342 | napi_enable(&gp->napi); | ||
2343 | 2345 | ||
2344 | mutex_unlock(&gp->pm_mutex); | 2346 | mutex_unlock(&gp->pm_mutex); |
2345 | 2347 | ||
@@ -2476,8 +2478,6 @@ static int gem_resume(struct pci_dev *pdev) | |||
2476 | 2478 | ||
2477 | /* Re-attach net device */ | 2479 | /* Re-attach net device */ |
2478 | netif_device_attach(dev); | 2480 | netif_device_attach(dev); |
2479 | |||
2480 | napi_enable(&gp->napi); | ||
2481 | } | 2481 | } |
2482 | 2482 | ||
2483 | spin_lock_irqsave(&gp->lock, flags); | 2483 | spin_lock_irqsave(&gp->lock, flags); |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index 7a72a3112f0a..cc4013be5e18 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -2629,6 +2629,14 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | |||
2629 | int i, qfe_slot = -1; | 2629 | int i, qfe_slot = -1; |
2630 | int err = -ENODEV; | 2630 | int err = -ENODEV; |
2631 | 2631 | ||
2632 | sbus_dp = to_of_device(op->dev.parent)->node; | ||
2633 | if (is_qfe) | ||
2634 | sbus_dp = to_of_device(op->dev.parent->parent)->node; | ||
2635 | |||
2636 | /* We can match PCI devices too, do not accept those here. */ | ||
2637 | if (strcmp(sbus_dp->name, "sbus")) | ||
2638 | return err; | ||
2639 | |||
2632 | if (is_qfe) { | 2640 | if (is_qfe) { |
2633 | qp = quattro_sbus_find(op); | 2641 | qp = quattro_sbus_find(op); |
2634 | if (qp == NULL) | 2642 | if (qp == NULL) |
@@ -2734,10 +2742,6 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | |||
2734 | if (qp != NULL) | 2742 | if (qp != NULL) |
2735 | hp->happy_flags |= HFLAG_QUATTRO; | 2743 | hp->happy_flags |= HFLAG_QUATTRO; |
2736 | 2744 | ||
2737 | sbus_dp = to_of_device(op->dev.parent)->node; | ||
2738 | if (is_qfe) | ||
2739 | sbus_dp = to_of_device(op->dev.parent->parent)->node; | ||
2740 | |||
2741 | /* Get the supported DVMA burst sizes from our Happy SBUS. */ | 2745 | /* Get the supported DVMA burst sizes from our Happy SBUS. */ |
2742 | hp->happy_bursts = of_getintprop_default(sbus_dp, | 2746 | hp->happy_bursts = of_getintprop_default(sbus_dp, |
2743 | "burst-sizes", 0x00); | 2747 | "burst-sizes", 0x00); |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index 0bf2114738be..d4c5ecc51f77 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -464,13 +464,14 @@ static void de_rx (struct de_private *de) | |||
464 | drop = 1; | 464 | drop = 1; |
465 | 465 | ||
466 | rx_next: | 466 | rx_next: |
467 | de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn); | ||
468 | if (rx_tail == (DE_RX_RING_SIZE - 1)) | 467 | if (rx_tail == (DE_RX_RING_SIZE - 1)) |
469 | de->rx_ring[rx_tail].opts2 = | 468 | de->rx_ring[rx_tail].opts2 = |
470 | cpu_to_le32(RingEnd | de->rx_buf_sz); | 469 | cpu_to_le32(RingEnd | de->rx_buf_sz); |
471 | else | 470 | else |
472 | de->rx_ring[rx_tail].opts2 = cpu_to_le32(de->rx_buf_sz); | 471 | de->rx_ring[rx_tail].opts2 = cpu_to_le32(de->rx_buf_sz); |
473 | de->rx_ring[rx_tail].addr1 = cpu_to_le32(mapping); | 472 | de->rx_ring[rx_tail].addr1 = cpu_to_le32(mapping); |
473 | wmb(); | ||
474 | de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn); | ||
474 | rx_tail = NEXT_RX(rx_tail); | 475 | rx_tail = NEXT_RX(rx_tail); |
475 | } | 476 | } |
476 | 477 | ||
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index d7b81e4fdd56..09fea31d3e36 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -157,10 +157,16 @@ static int update_filter(struct tap_filter *filter, void __user *arg) | |||
157 | 157 | ||
158 | nexact = n; | 158 | nexact = n; |
159 | 159 | ||
160 | /* The rest is hashed */ | 160 | /* Remaining multicast addresses are hashed, |
161 | * unicast will leave the filter disabled. */ | ||
161 | memset(filter->mask, 0, sizeof(filter->mask)); | 162 | memset(filter->mask, 0, sizeof(filter->mask)); |
162 | for (; n < uf.count; n++) | 163 | for (; n < uf.count; n++) { |
164 | if (!is_multicast_ether_addr(addr[n].u)) { | ||
165 | err = 0; /* no filter */ | ||
166 | goto done; | ||
167 | } | ||
163 | addr_hash_set(filter->mask, addr[n].u); | 168 | addr_hash_set(filter->mask, addr[n].u); |
169 | } | ||
164 | 170 | ||
165 | /* For ALLMULTI just set the mask to all ones. | 171 | /* For ALLMULTI just set the mask to all ones. |
166 | * This overrides the mask populated above. */ | 172 | * This overrides the mask populated above. */ |
diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c index 101ed49a2d15..032db815b0f9 100644 --- a/drivers/parport/parport_serial.c +++ b/drivers/parport/parport_serial.c | |||
@@ -64,6 +64,11 @@ struct parport_pc_pci { | |||
64 | 64 | ||
65 | static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc_pci *card, int autoirq, int autodma) | 65 | static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc_pci *card, int autoirq, int autodma) |
66 | { | 66 | { |
67 | /* the rule described below doesn't hold for this device */ | ||
68 | if (dev->device == PCI_DEVICE_ID_NETMOS_9835 && | ||
69 | dev->subsystem_vendor == PCI_VENDOR_ID_IBM && | ||
70 | dev->subsystem_device == 0x0299) | ||
71 | return -ENODEV; | ||
67 | /* | 72 | /* |
68 | * Netmos uses the subdevice ID to indicate the number of parallel | 73 | * Netmos uses the subdevice ID to indicate the number of parallel |
69 | * and serial ports. The form is 0x00PS, where <P> is the number of | 74 | * and serial ports. The form is 0x00PS, where <P> is the number of |
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 3dfecb20d5e7..f4b7c79023ff 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -268,7 +268,12 @@ static long list_size; | |||
268 | 268 | ||
269 | static void domain_remove_dev_info(struct dmar_domain *domain); | 269 | static void domain_remove_dev_info(struct dmar_domain *domain); |
270 | 270 | ||
271 | int dmar_disabled; | 271 | #ifdef CONFIG_DMAR_DEFAULT_ON |
272 | int dmar_disabled = 0; | ||
273 | #else | ||
274 | int dmar_disabled = 1; | ||
275 | #endif /*CONFIG_DMAR_DEFAULT_ON*/ | ||
276 | |||
272 | static int __initdata dmar_map_gfx = 1; | 277 | static int __initdata dmar_map_gfx = 1; |
273 | static int dmar_forcedac; | 278 | static int dmar_forcedac; |
274 | static int intel_iommu_strict; | 279 | static int intel_iommu_strict; |
@@ -284,9 +289,12 @@ static int __init intel_iommu_setup(char *str) | |||
284 | if (!str) | 289 | if (!str) |
285 | return -EINVAL; | 290 | return -EINVAL; |
286 | while (*str) { | 291 | while (*str) { |
287 | if (!strncmp(str, "off", 3)) { | 292 | if (!strncmp(str, "on", 2)) { |
293 | dmar_disabled = 0; | ||
294 | printk(KERN_INFO "Intel-IOMMU: enabled\n"); | ||
295 | } else if (!strncmp(str, "off", 3)) { | ||
288 | dmar_disabled = 1; | 296 | dmar_disabled = 1; |
289 | printk(KERN_INFO"Intel-IOMMU: disabled\n"); | 297 | printk(KERN_INFO "Intel-IOMMU: disabled\n"); |
290 | } else if (!strncmp(str, "igfx_off", 8)) { | 298 | } else if (!strncmp(str, "igfx_off", 8)) { |
291 | dmar_map_gfx = 0; | 299 | dmar_map_gfx = 0; |
292 | printk(KERN_INFO | 300 | printk(KERN_INFO |
diff --git a/drivers/power/pcf50633-charger.c b/drivers/power/pcf50633-charger.c index e988ec130fcd..41aec2acbb91 100644 --- a/drivers/power/pcf50633-charger.c +++ b/drivers/power/pcf50633-charger.c | |||
@@ -199,7 +199,8 @@ static int adapter_get_property(struct power_supply *psy, | |||
199 | enum power_supply_property psp, | 199 | enum power_supply_property psp, |
200 | union power_supply_propval *val) | 200 | union power_supply_propval *val) |
201 | { | 201 | { |
202 | struct pcf50633_mbc *mbc = container_of(psy, struct pcf50633_mbc, usb); | 202 | struct pcf50633_mbc *mbc = container_of(psy, |
203 | struct pcf50633_mbc, adapter); | ||
203 | int ret = 0; | 204 | int ret = 0; |
204 | 205 | ||
205 | switch (psp) { | 206 | switch (psp) { |
diff --git a/drivers/rtc/rtc-au1xxx.c b/drivers/rtc/rtc-au1xxx.c index 8906a688e6a6..979ed0406ce9 100644 --- a/drivers/rtc/rtc-au1xxx.c +++ b/drivers/rtc/rtc-au1xxx.c | |||
@@ -81,7 +81,7 @@ static int __devinit au1xtoy_rtc_probe(struct platform_device *pdev) | |||
81 | if (au_readl(SYS_TOYTRIM) != 32767) { | 81 | if (au_readl(SYS_TOYTRIM) != 32767) { |
82 | /* wait until hardware gives access to TRIM register */ | 82 | /* wait until hardware gives access to TRIM register */ |
83 | t = 0x00100000; | 83 | t = 0x00100000; |
84 | while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T0S) && t--) | 84 | while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T0S) && --t) |
85 | msleep(1); | 85 | msleep(1); |
86 | 86 | ||
87 | if (!t) { | 87 | if (!t) { |
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c index bd56a033bfd0..bb8cc05605ac 100644 --- a/drivers/rtc/rtc-pxa.c +++ b/drivers/rtc/rtc-pxa.c | |||
@@ -485,7 +485,7 @@ static void __exit pxa_rtc_exit(void) | |||
485 | module_init(pxa_rtc_init); | 485 | module_init(pxa_rtc_init); |
486 | module_exit(pxa_rtc_exit); | 486 | module_exit(pxa_rtc_exit); |
487 | 487 | ||
488 | MODULE_AUTHOR("Robert Jarzmik"); | 488 | MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>"); |
489 | MODULE_DESCRIPTION("PXA27x/PXA3xx Realtime Clock Driver (RTC)"); | 489 | MODULE_DESCRIPTION("PXA27x/PXA3xx Realtime Clock Driver (RTC)"); |
490 | MODULE_LICENSE("GPL"); | 490 | MODULE_LICENSE("GPL"); |
491 | MODULE_ALIAS("platform:pxa-rtc"); | 491 | MODULE_ALIAS("platform:pxa-rtc"); |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index bd5914994142..08c23a921012 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -57,6 +57,8 @@ static void dasd_device_tasklet(struct dasd_device *); | |||
57 | static void dasd_block_tasklet(struct dasd_block *); | 57 | static void dasd_block_tasklet(struct dasd_block *); |
58 | static void do_kick_device(struct work_struct *); | 58 | static void do_kick_device(struct work_struct *); |
59 | static void dasd_return_cqr_cb(struct dasd_ccw_req *, void *); | 59 | static void dasd_return_cqr_cb(struct dasd_ccw_req *, void *); |
60 | static void dasd_device_timeout(unsigned long); | ||
61 | static void dasd_block_timeout(unsigned long); | ||
60 | 62 | ||
61 | /* | 63 | /* |
62 | * SECTION: Operations on the device structure. | 64 | * SECTION: Operations on the device structure. |
@@ -99,6 +101,8 @@ struct dasd_device *dasd_alloc_device(void) | |||
99 | (unsigned long) device); | 101 | (unsigned long) device); |
100 | INIT_LIST_HEAD(&device->ccw_queue); | 102 | INIT_LIST_HEAD(&device->ccw_queue); |
101 | init_timer(&device->timer); | 103 | init_timer(&device->timer); |
104 | device->timer.function = dasd_device_timeout; | ||
105 | device->timer.data = (unsigned long) device; | ||
102 | INIT_WORK(&device->kick_work, do_kick_device); | 106 | INIT_WORK(&device->kick_work, do_kick_device); |
103 | device->state = DASD_STATE_NEW; | 107 | device->state = DASD_STATE_NEW; |
104 | device->target = DASD_STATE_NEW; | 108 | device->target = DASD_STATE_NEW; |
@@ -138,6 +142,8 @@ struct dasd_block *dasd_alloc_block(void) | |||
138 | INIT_LIST_HEAD(&block->ccw_queue); | 142 | INIT_LIST_HEAD(&block->ccw_queue); |
139 | spin_lock_init(&block->queue_lock); | 143 | spin_lock_init(&block->queue_lock); |
140 | init_timer(&block->timer); | 144 | init_timer(&block->timer); |
145 | block->timer.function = dasd_block_timeout; | ||
146 | block->timer.data = (unsigned long) block; | ||
141 | 147 | ||
142 | return block; | 148 | return block; |
143 | } | 149 | } |
@@ -915,19 +921,10 @@ static void dasd_device_timeout(unsigned long ptr) | |||
915 | */ | 921 | */ |
916 | void dasd_device_set_timer(struct dasd_device *device, int expires) | 922 | void dasd_device_set_timer(struct dasd_device *device, int expires) |
917 | { | 923 | { |
918 | if (expires == 0) { | 924 | if (expires == 0) |
919 | if (timer_pending(&device->timer)) | 925 | del_timer(&device->timer); |
920 | del_timer(&device->timer); | 926 | else |
921 | return; | 927 | mod_timer(&device->timer, jiffies + expires); |
922 | } | ||
923 | if (timer_pending(&device->timer)) { | ||
924 | if (mod_timer(&device->timer, jiffies + expires)) | ||
925 | return; | ||
926 | } | ||
927 | device->timer.function = dasd_device_timeout; | ||
928 | device->timer.data = (unsigned long) device; | ||
929 | device->timer.expires = jiffies + expires; | ||
930 | add_timer(&device->timer); | ||
931 | } | 928 | } |
932 | 929 | ||
933 | /* | 930 | /* |
@@ -935,8 +932,7 @@ void dasd_device_set_timer(struct dasd_device *device, int expires) | |||
935 | */ | 932 | */ |
936 | void dasd_device_clear_timer(struct dasd_device *device) | 933 | void dasd_device_clear_timer(struct dasd_device *device) |
937 | { | 934 | { |
938 | if (timer_pending(&device->timer)) | 935 | del_timer(&device->timer); |
939 | del_timer(&device->timer); | ||
940 | } | 936 | } |
941 | 937 | ||
942 | static void dasd_handle_killed_request(struct ccw_device *cdev, | 938 | static void dasd_handle_killed_request(struct ccw_device *cdev, |
@@ -1586,19 +1582,10 @@ static void dasd_block_timeout(unsigned long ptr) | |||
1586 | */ | 1582 | */ |
1587 | void dasd_block_set_timer(struct dasd_block *block, int expires) | 1583 | void dasd_block_set_timer(struct dasd_block *block, int expires) |
1588 | { | 1584 | { |
1589 | if (expires == 0) { | 1585 | if (expires == 0) |
1590 | if (timer_pending(&block->timer)) | 1586 | del_timer(&block->timer); |
1591 | del_timer(&block->timer); | 1587 | else |
1592 | return; | 1588 | mod_timer(&block->timer, jiffies + expires); |
1593 | } | ||
1594 | if (timer_pending(&block->timer)) { | ||
1595 | if (mod_timer(&block->timer, jiffies + expires)) | ||
1596 | return; | ||
1597 | } | ||
1598 | block->timer.function = dasd_block_timeout; | ||
1599 | block->timer.data = (unsigned long) block; | ||
1600 | block->timer.expires = jiffies + expires; | ||
1601 | add_timer(&block->timer); | ||
1602 | } | 1589 | } |
1603 | 1590 | ||
1604 | /* | 1591 | /* |
@@ -1606,8 +1593,7 @@ void dasd_block_set_timer(struct dasd_block *block, int expires) | |||
1606 | */ | 1593 | */ |
1607 | void dasd_block_clear_timer(struct dasd_block *block) | 1594 | void dasd_block_clear_timer(struct dasd_block *block) |
1608 | { | 1595 | { |
1609 | if (timer_pending(&block->timer)) | 1596 | del_timer(&block->timer); |
1610 | del_timer(&block->timer); | ||
1611 | } | 1597 | } |
1612 | 1598 | ||
1613 | /* | 1599 | /* |
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 300e28a531f8..34339902efb9 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -677,7 +677,7 @@ static ssize_t dasd_ff_show(struct device *dev, struct device_attribute *attr, | |||
677 | struct dasd_devmap *devmap; | 677 | struct dasd_devmap *devmap; |
678 | int ff_flag; | 678 | int ff_flag; |
679 | 679 | ||
680 | devmap = dasd_find_busid(dev->bus_id); | 680 | devmap = dasd_find_busid(dev_name(dev)); |
681 | if (!IS_ERR(devmap)) | 681 | if (!IS_ERR(devmap)) |
682 | ff_flag = (devmap->features & DASD_FEATURE_FAILFAST) != 0; | 682 | ff_flag = (devmap->features & DASD_FEATURE_FAILFAST) != 0; |
683 | else | 683 | else |
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c index 2a423d3a2a8e..90cfddabf1f7 100644 --- a/drivers/video/bfin-t350mcqb-fb.c +++ b/drivers/video/bfin-t350mcqb-fb.c | |||
@@ -447,7 +447,7 @@ static irqreturn_t bfin_t350mcqb_irq_error(int irq, void *dev_id) | |||
447 | return IRQ_HANDLED; | 447 | return IRQ_HANDLED; |
448 | } | 448 | } |
449 | 449 | ||
450 | static int __init bfin_t350mcqb_probe(struct platform_device *pdev) | 450 | static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev) |
451 | { | 451 | { |
452 | struct bfin_t350mcqbfb_info *info; | 452 | struct bfin_t350mcqbfb_info *info; |
453 | struct fb_info *fbinfo; | 453 | struct fb_info *fbinfo; |
diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c index 751e491ca8c8..f20eff8c4a81 100644 --- a/drivers/video/geode/gx1fb_core.c +++ b/drivers/video/geode/gx1fb_core.c | |||
@@ -136,13 +136,10 @@ static int gx1fb_set_par(struct fb_info *info) | |||
136 | { | 136 | { |
137 | struct geodefb_par *par = info->par; | 137 | struct geodefb_par *par = info->par; |
138 | 138 | ||
139 | if (info->var.bits_per_pixel == 16) { | 139 | if (info->var.bits_per_pixel == 16) |
140 | info->fix.visual = FB_VISUAL_TRUECOLOR; | 140 | info->fix.visual = FB_VISUAL_TRUECOLOR; |
141 | fb_dealloc_cmap(&info->cmap); | 141 | else |
142 | } else { | ||
143 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; | 142 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; |
144 | fb_alloc_cmap(&info->cmap, 1<<info->var.bits_per_pixel, 0); | ||
145 | } | ||
146 | 143 | ||
147 | info->fix.line_length = gx1_line_delta(info->var.xres, info->var.bits_per_pixel); | 144 | info->fix.line_length = gx1_line_delta(info->var.xres, info->var.bits_per_pixel); |
148 | 145 | ||
@@ -315,6 +312,10 @@ static struct fb_info * __init gx1fb_init_fbinfo(struct device *dev) | |||
315 | if (!par->panel_x) | 312 | if (!par->panel_x) |
316 | par->enable_crt = 1; /* fall back to CRT if no panel is specified */ | 313 | par->enable_crt = 1; /* fall back to CRT if no panel is specified */ |
317 | 314 | ||
315 | if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { | ||
316 | framebuffer_release(info); | ||
317 | return NULL; | ||
318 | } | ||
318 | return info; | 319 | return info; |
319 | } | 320 | } |
320 | 321 | ||
@@ -374,8 +375,11 @@ static int __init gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id * | |||
374 | release_mem_region(gx1_gx_base() + 0x8300, 0x100); | 375 | release_mem_region(gx1_gx_base() + 0x8300, 0x100); |
375 | } | 376 | } |
376 | 377 | ||
377 | if (info) | 378 | if (info) { |
379 | fb_dealloc_cmap(&info->cmap); | ||
378 | framebuffer_release(info); | 380 | framebuffer_release(info); |
381 | } | ||
382 | |||
379 | return ret; | 383 | return ret; |
380 | } | 384 | } |
381 | 385 | ||
@@ -395,6 +399,7 @@ static void gx1fb_remove(struct pci_dev *pdev) | |||
395 | iounmap(par->dc_regs); | 399 | iounmap(par->dc_regs); |
396 | release_mem_region(gx1_gx_base() + 0x8300, 0x100); | 400 | release_mem_region(gx1_gx_base() + 0x8300, 0x100); |
397 | 401 | ||
402 | fb_dealloc_cmap(&info->cmap); | ||
398 | pci_set_drvdata(pdev, NULL); | 403 | pci_set_drvdata(pdev, NULL); |
399 | 404 | ||
400 | framebuffer_release(info); | 405 | framebuffer_release(info); |
diff --git a/drivers/video/geode/gxfb_core.c b/drivers/video/geode/gxfb_core.c index 484118926318..2552cac39e1c 100644 --- a/drivers/video/geode/gxfb_core.c +++ b/drivers/video/geode/gxfb_core.c | |||
@@ -171,13 +171,10 @@ static int gxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
171 | 171 | ||
172 | static int gxfb_set_par(struct fb_info *info) | 172 | static int gxfb_set_par(struct fb_info *info) |
173 | { | 173 | { |
174 | if (info->var.bits_per_pixel > 8) { | 174 | if (info->var.bits_per_pixel > 8) |
175 | info->fix.visual = FB_VISUAL_TRUECOLOR; | 175 | info->fix.visual = FB_VISUAL_TRUECOLOR; |
176 | fb_dealloc_cmap(&info->cmap); | 176 | else |
177 | } else { | ||
178 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; | 177 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; |
179 | fb_alloc_cmap(&info->cmap, 1<<info->var.bits_per_pixel, 0); | ||
180 | } | ||
181 | 178 | ||
182 | info->fix.line_length = gx_line_delta(info->var.xres, info->var.bits_per_pixel); | 179 | info->fix.line_length = gx_line_delta(info->var.xres, info->var.bits_per_pixel); |
183 | 180 | ||
@@ -331,6 +328,11 @@ static struct fb_info * __init gxfb_init_fbinfo(struct device *dev) | |||
331 | 328 | ||
332 | info->var.grayscale = 0; | 329 | info->var.grayscale = 0; |
333 | 330 | ||
331 | if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { | ||
332 | framebuffer_release(info); | ||
333 | return NULL; | ||
334 | } | ||
335 | |||
334 | return info; | 336 | return info; |
335 | } | 337 | } |
336 | 338 | ||
@@ -443,8 +445,10 @@ static int __init gxfb_probe(struct pci_dev *pdev, const struct pci_device_id *i | |||
443 | pci_release_region(pdev, 1); | 445 | pci_release_region(pdev, 1); |
444 | } | 446 | } |
445 | 447 | ||
446 | if (info) | 448 | if (info) { |
449 | fb_dealloc_cmap(&info->cmap); | ||
447 | framebuffer_release(info); | 450 | framebuffer_release(info); |
451 | } | ||
448 | return ret; | 452 | return ret; |
449 | } | 453 | } |
450 | 454 | ||
@@ -467,6 +471,7 @@ static void gxfb_remove(struct pci_dev *pdev) | |||
467 | iounmap(par->gp_regs); | 471 | iounmap(par->gp_regs); |
468 | pci_release_region(pdev, 1); | 472 | pci_release_region(pdev, 1); |
469 | 473 | ||
474 | fb_dealloc_cmap(&info->cmap); | ||
470 | pci_set_drvdata(pdev, NULL); | 475 | pci_set_drvdata(pdev, NULL); |
471 | 476 | ||
472 | framebuffer_release(info); | 477 | framebuffer_release(info); |
diff --git a/drivers/video/geode/lxfb_core.c b/drivers/video/geode/lxfb_core.c index b965ecdbc604..889cbe39e580 100644 --- a/drivers/video/geode/lxfb_core.c +++ b/drivers/video/geode/lxfb_core.c | |||
@@ -278,13 +278,10 @@ static int lxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
278 | 278 | ||
279 | static int lxfb_set_par(struct fb_info *info) | 279 | static int lxfb_set_par(struct fb_info *info) |
280 | { | 280 | { |
281 | if (info->var.bits_per_pixel > 8) { | 281 | if (info->var.bits_per_pixel > 8) |
282 | info->fix.visual = FB_VISUAL_TRUECOLOR; | 282 | info->fix.visual = FB_VISUAL_TRUECOLOR; |
283 | fb_dealloc_cmap(&info->cmap); | 283 | else |
284 | } else { | ||
285 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; | 284 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; |
286 | fb_alloc_cmap(&info->cmap, 1<<info->var.bits_per_pixel, 0); | ||
287 | } | ||
288 | 285 | ||
289 | info->fix.line_length = lx_get_pitch(info->var.xres, | 286 | info->fix.line_length = lx_get_pitch(info->var.xres, |
290 | info->var.bits_per_pixel); | 287 | info->var.bits_per_pixel); |
@@ -451,6 +448,11 @@ static struct fb_info * __init lxfb_init_fbinfo(struct device *dev) | |||
451 | 448 | ||
452 | info->pseudo_palette = (void *)par + sizeof(struct lxfb_par); | 449 | info->pseudo_palette = (void *)par + sizeof(struct lxfb_par); |
453 | 450 | ||
451 | if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { | ||
452 | framebuffer_release(info); | ||
453 | return NULL; | ||
454 | } | ||
455 | |||
454 | info->var.grayscale = 0; | 456 | info->var.grayscale = 0; |
455 | 457 | ||
456 | return info; | 458 | return info; |
@@ -579,8 +581,10 @@ err: | |||
579 | pci_release_region(pdev, 3); | 581 | pci_release_region(pdev, 3); |
580 | } | 582 | } |
581 | 583 | ||
582 | if (info) | 584 | if (info) { |
585 | fb_dealloc_cmap(&info->cmap); | ||
583 | framebuffer_release(info); | 586 | framebuffer_release(info); |
587 | } | ||
584 | 588 | ||
585 | return ret; | 589 | return ret; |
586 | } | 590 | } |
@@ -604,6 +608,7 @@ static void lxfb_remove(struct pci_dev *pdev) | |||
604 | iounmap(par->vp_regs); | 608 | iounmap(par->vp_regs); |
605 | pci_release_region(pdev, 3); | 609 | pci_release_region(pdev, 3); |
606 | 610 | ||
611 | fb_dealloc_cmap(&info->cmap); | ||
607 | pci_set_drvdata(pdev, NULL); | 612 | pci_set_drvdata(pdev, NULL); |
608 | framebuffer_release(info); | 613 | framebuffer_release(info); |
609 | } | 614 | } |
diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c index 2c8dff9f77da..1ed3d554e372 100644 --- a/drivers/w1/slaves/w1_therm.c +++ b/drivers/w1/slaves/w1_therm.c | |||
@@ -115,7 +115,7 @@ static struct w1_therm_family_converter w1_therm_families[] = { | |||
115 | 115 | ||
116 | static inline int w1_DS18B20_convert_temp(u8 rom[9]) | 116 | static inline int w1_DS18B20_convert_temp(u8 rom[9]) |
117 | { | 117 | { |
118 | s16 t = (rom[1] << 8) | rom[0]; | 118 | int t = ((s16)rom[1] << 8) | rom[0]; |
119 | t = t*1000/16; | 119 | t = t*1000/16; |
120 | return t; | 120 | return t; |
121 | } | 121 | } |
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index da8bdeaa2e6d..7c6e3606f0ec 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c | |||
@@ -1185,9 +1185,12 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data) | |||
1185 | es = sbi->s_es; | 1185 | es = sbi->s_es; |
1186 | if (((sbi->s_mount_opt & EXT2_MOUNT_XIP) != | 1186 | if (((sbi->s_mount_opt & EXT2_MOUNT_XIP) != |
1187 | (old_mount_opt & EXT2_MOUNT_XIP)) && | 1187 | (old_mount_opt & EXT2_MOUNT_XIP)) && |
1188 | invalidate_inodes(sb)) | 1188 | invalidate_inodes(sb)) { |
1189 | ext2_warning(sb, __func__, "busy inodes while remounting "\ | 1189 | ext2_warning(sb, __func__, "refusing change of xip flag " |
1190 | "xip remain in cache (no functional problem)"); | 1190 | "with busy inodes while remounting"); |
1191 | sbi->s_mount_opt &= ~EXT2_MOUNT_XIP; | ||
1192 | sbi->s_mount_opt |= old_mount_opt & EXT2_MOUNT_XIP; | ||
1193 | } | ||
1191 | if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) | 1194 | if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) |
1192 | return 0; | 1195 | return 0; |
1193 | if (*flags & MS_RDONLY) { | 1196 | if (*flags & MS_RDONLY) { |
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index b70d90e08a3c..4a970411a458 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -2428,12 +2428,13 @@ static void ext3_write_super (struct super_block * sb) | |||
2428 | 2428 | ||
2429 | static int ext3_sync_fs(struct super_block *sb, int wait) | 2429 | static int ext3_sync_fs(struct super_block *sb, int wait) |
2430 | { | 2430 | { |
2431 | sb->s_dirt = 0; | 2431 | tid_t target; |
2432 | if (wait) | ||
2433 | ext3_force_commit(sb); | ||
2434 | else | ||
2435 | journal_start_commit(EXT3_SB(sb)->s_journal, NULL); | ||
2436 | 2432 | ||
2433 | sb->s_dirt = 0; | ||
2434 | if (journal_start_commit(EXT3_SB(sb)->s_journal, &target)) { | ||
2435 | if (wait) | ||
2436 | log_wait_commit(EXT3_SB(sb)->s_journal, target); | ||
2437 | } | ||
2437 | return 0; | 2438 | return 0; |
2438 | } | 2439 | } |
2439 | 2440 | ||
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 6903d37af037..9b800d97a687 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -108,7 +108,8 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) | |||
108 | 108 | ||
109 | if (hugetlb_reserve_pages(inode, | 109 | if (hugetlb_reserve_pages(inode, |
110 | vma->vm_pgoff >> huge_page_order(h), | 110 | vma->vm_pgoff >> huge_page_order(h), |
111 | len >> huge_page_shift(h), vma)) | 111 | len >> huge_page_shift(h), vma, |
112 | vma->vm_flags)) | ||
112 | goto out; | 113 | goto out; |
113 | 114 | ||
114 | ret = 0; | 115 | ret = 0; |
@@ -947,7 +948,7 @@ static int can_do_hugetlb_shm(void) | |||
947 | can_do_mlock()); | 948 | can_do_mlock()); |
948 | } | 949 | } |
949 | 950 | ||
950 | struct file *hugetlb_file_setup(const char *name, size_t size) | 951 | struct file *hugetlb_file_setup(const char *name, size_t size, int acctflag) |
951 | { | 952 | { |
952 | int error = -ENOMEM; | 953 | int error = -ENOMEM; |
953 | struct file *file; | 954 | struct file *file; |
@@ -981,7 +982,8 @@ struct file *hugetlb_file_setup(const char *name, size_t size) | |||
981 | 982 | ||
982 | error = -ENOMEM; | 983 | error = -ENOMEM; |
983 | if (hugetlb_reserve_pages(inode, 0, | 984 | if (hugetlb_reserve_pages(inode, 0, |
984 | size >> huge_page_shift(hstate_inode(inode)), NULL)) | 985 | size >> huge_page_shift(hstate_inode(inode)), NULL, |
986 | acctflag)) | ||
985 | goto out_inode; | 987 | goto out_inode; |
986 | 988 | ||
987 | d_instantiate(dentry, inode); | 989 | d_instantiate(dentry, inode); |
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c index 9e4fa52d7dc8..e79c07812afa 100644 --- a/fs/jbd/journal.c +++ b/fs/jbd/journal.c | |||
@@ -427,7 +427,7 @@ int __log_space_left(journal_t *journal) | |||
427 | } | 427 | } |
428 | 428 | ||
429 | /* | 429 | /* |
430 | * Called under j_state_lock. Returns true if a transaction was started. | 430 | * Called under j_state_lock. Returns true if a transaction commit was started. |
431 | */ | 431 | */ |
432 | int __log_start_commit(journal_t *journal, tid_t target) | 432 | int __log_start_commit(journal_t *journal, tid_t target) |
433 | { | 433 | { |
@@ -495,7 +495,8 @@ int journal_force_commit_nested(journal_t *journal) | |||
495 | 495 | ||
496 | /* | 496 | /* |
497 | * Start a commit of the current running transaction (if any). Returns true | 497 | * Start a commit of the current running transaction (if any). Returns true |
498 | * if a transaction was started, and fills its tid in at *ptid | 498 | * if a transaction is going to be committed (or is currently already |
499 | * committing), and fills its tid in at *ptid | ||
499 | */ | 500 | */ |
500 | int journal_start_commit(journal_t *journal, tid_t *ptid) | 501 | int journal_start_commit(journal_t *journal, tid_t *ptid) |
501 | { | 502 | { |
@@ -505,15 +506,19 @@ int journal_start_commit(journal_t *journal, tid_t *ptid) | |||
505 | if (journal->j_running_transaction) { | 506 | if (journal->j_running_transaction) { |
506 | tid_t tid = journal->j_running_transaction->t_tid; | 507 | tid_t tid = journal->j_running_transaction->t_tid; |
507 | 508 | ||
508 | ret = __log_start_commit(journal, tid); | 509 | __log_start_commit(journal, tid); |
509 | if (ret && ptid) | 510 | /* There's a running transaction and we've just made sure |
511 | * it's commit has been scheduled. */ | ||
512 | if (ptid) | ||
510 | *ptid = tid; | 513 | *ptid = tid; |
511 | } else if (journal->j_committing_transaction && ptid) { | 514 | ret = 1; |
515 | } else if (journal->j_committing_transaction) { | ||
512 | /* | 516 | /* |
513 | * If ext3_write_super() recently started a commit, then we | 517 | * If ext3_write_super() recently started a commit, then we |
514 | * have to wait for completion of that transaction | 518 | * have to wait for completion of that transaction |
515 | */ | 519 | */ |
516 | *ptid = journal->j_committing_transaction->t_tid; | 520 | if (ptid) |
521 | *ptid = journal->j_committing_transaction->t_tid; | ||
517 | ret = 1; | 522 | ret = 1; |
518 | } | 523 | } |
519 | spin_unlock(&journal->j_state_lock); | 524 | spin_unlock(&journal->j_state_lock); |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index e4e8e117d27d..499900d0cee7 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -378,6 +378,7 @@ struct cgroup_subsys { | |||
378 | * - initiating hotplug events | 378 | * - initiating hotplug events |
379 | */ | 379 | */ |
380 | struct mutex hierarchy_mutex; | 380 | struct mutex hierarchy_mutex; |
381 | struct lock_class_key subsys_key; | ||
381 | 382 | ||
382 | /* | 383 | /* |
383 | * Link to parent, and list entry in parent's children. | 384 | * Link to parent, and list entry in parent's children. |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 3e0f64c335c8..3e68469c1885 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -282,6 +282,18 @@ static inline void dmaengine_put(void) | |||
282 | } | 282 | } |
283 | #endif | 283 | #endif |
284 | 284 | ||
285 | #ifdef CONFIG_NET_DMA | ||
286 | #define net_dmaengine_get() dmaengine_get() | ||
287 | #define net_dmaengine_put() dmaengine_put() | ||
288 | #else | ||
289 | static inline void net_dmaengine_get(void) | ||
290 | { | ||
291 | } | ||
292 | static inline void net_dmaengine_put(void) | ||
293 | { | ||
294 | } | ||
295 | #endif | ||
296 | |||
285 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, | 297 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, |
286 | void *dest, void *src, size_t len); | 298 | void *dest, void *src, size_t len); |
287 | dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, | 299 | dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index f1d2fba19ea0..03be7f29ca01 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -33,7 +33,8 @@ unsigned long hugetlb_total_pages(void); | |||
33 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 33 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
34 | unsigned long address, int write_access); | 34 | unsigned long address, int write_access); |
35 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, | 35 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, |
36 | struct vm_area_struct *vma); | 36 | struct vm_area_struct *vma, |
37 | int acctflags); | ||
37 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); | 38 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); |
38 | 39 | ||
39 | extern unsigned long hugepages_treat_as_movable; | 40 | extern unsigned long hugepages_treat_as_movable; |
@@ -138,7 +139,7 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | |||
138 | 139 | ||
139 | extern const struct file_operations hugetlbfs_file_operations; | 140 | extern const struct file_operations hugetlbfs_file_operations; |
140 | extern struct vm_operations_struct hugetlb_vm_ops; | 141 | extern struct vm_operations_struct hugetlb_vm_ops; |
141 | struct file *hugetlb_file_setup(const char *name, size_t); | 142 | struct file *hugetlb_file_setup(const char *name, size_t, int); |
142 | int hugetlb_get_quota(struct address_space *mapping, long delta); | 143 | int hugetlb_get_quota(struct address_space *mapping, long delta); |
143 | void hugetlb_put_quota(struct address_space *mapping, long delta); | 144 | void hugetlb_put_quota(struct address_space *mapping, long delta); |
144 | 145 | ||
@@ -158,9 +159,9 @@ static inline void set_file_hugepages(struct file *file) | |||
158 | } | 159 | } |
159 | #else /* !CONFIG_HUGETLBFS */ | 160 | #else /* !CONFIG_HUGETLBFS */ |
160 | 161 | ||
161 | #define is_file_hugepages(file) 0 | 162 | #define is_file_hugepages(file) 0 |
162 | #define set_file_hugepages(file) BUG() | 163 | #define set_file_hugepages(file) BUG() |
163 | #define hugetlb_file_setup(name,size) ERR_PTR(-ENOSYS) | 164 | #define hugetlb_file_setup(name,size,acctflag) ERR_PTR(-ENOSYS) |
164 | 165 | ||
165 | #endif /* !CONFIG_HUGETLBFS */ | 166 | #endif /* !CONFIG_HUGETLBFS */ |
166 | 167 | ||
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index ea0ea1a4c36f..e752d973fa21 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -48,12 +48,11 @@ extern struct fs_struct init_fs; | |||
48 | .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ | 48 | .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ |
49 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ | 49 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ |
50 | .rlim = INIT_RLIMITS, \ | 50 | .rlim = INIT_RLIMITS, \ |
51 | .cputime = { .totals = { \ | 51 | .cputimer = { \ |
52 | .utime = cputime_zero, \ | 52 | .cputime = INIT_CPUTIME, \ |
53 | .stime = cputime_zero, \ | 53 | .running = 0, \ |
54 | .sum_exec_runtime = 0, \ | 54 | .lock = __SPIN_LOCK_UNLOCKED(sig.cputimer.lock), \ |
55 | .lock = __SPIN_LOCK_UNLOCKED(sig.cputime.totals.lock), \ | 55 | }, \ |
56 | }, }, \ | ||
57 | } | 56 | } |
58 | 57 | ||
59 | extern struct nsproxy init_nsproxy; | 58 | extern struct nsproxy init_nsproxy; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index e8ddc98b8405..323561582c10 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1129,8 +1129,7 @@ extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | |||
1129 | unsigned long flag, unsigned long pgoff); | 1129 | unsigned long flag, unsigned long pgoff); |
1130 | extern unsigned long mmap_region(struct file *file, unsigned long addr, | 1130 | extern unsigned long mmap_region(struct file *file, unsigned long addr, |
1131 | unsigned long len, unsigned long flags, | 1131 | unsigned long len, unsigned long flags, |
1132 | unsigned int vm_flags, unsigned long pgoff, | 1132 | unsigned int vm_flags, unsigned long pgoff); |
1133 | int accountable); | ||
1134 | 1133 | ||
1135 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, | 1134 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, |
1136 | unsigned long len, unsigned long prot, | 1135 | unsigned long len, unsigned long prot, |
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 3c103d636da3..8e6646a54acf 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h | |||
@@ -8,7 +8,7 @@ struct ring_buffer; | |||
8 | struct ring_buffer_iter; | 8 | struct ring_buffer_iter; |
9 | 9 | ||
10 | /* | 10 | /* |
11 | * Don't reference this struct directly, use functions below. | 11 | * Don't refer to this struct directly, use functions below. |
12 | */ | 12 | */ |
13 | struct ring_buffer_event { | 13 | struct ring_buffer_event { |
14 | u32 type:2, len:3, time_delta:27; | 14 | u32 type:2, len:3, time_delta:27; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 699edb8e1853..426666dd8203 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -445,7 +445,6 @@ struct pacct_struct { | |||
445 | * @utime: time spent in user mode, in &cputime_t units | 445 | * @utime: time spent in user mode, in &cputime_t units |
446 | * @stime: time spent in kernel mode, in &cputime_t units | 446 | * @stime: time spent in kernel mode, in &cputime_t units |
447 | * @sum_exec_runtime: total time spent on the CPU, in nanoseconds | 447 | * @sum_exec_runtime: total time spent on the CPU, in nanoseconds |
448 | * @lock: lock for fields in this struct | ||
449 | * | 448 | * |
450 | * This structure groups together three kinds of CPU time that are | 449 | * This structure groups together three kinds of CPU time that are |
451 | * tracked for threads and thread groups. Most things considering | 450 | * tracked for threads and thread groups. Most things considering |
@@ -456,23 +455,33 @@ struct task_cputime { | |||
456 | cputime_t utime; | 455 | cputime_t utime; |
457 | cputime_t stime; | 456 | cputime_t stime; |
458 | unsigned long long sum_exec_runtime; | 457 | unsigned long long sum_exec_runtime; |
459 | spinlock_t lock; | ||
460 | }; | 458 | }; |
461 | /* Alternate field names when used to cache expirations. */ | 459 | /* Alternate field names when used to cache expirations. */ |
462 | #define prof_exp stime | 460 | #define prof_exp stime |
463 | #define virt_exp utime | 461 | #define virt_exp utime |
464 | #define sched_exp sum_exec_runtime | 462 | #define sched_exp sum_exec_runtime |
465 | 463 | ||
464 | #define INIT_CPUTIME \ | ||
465 | (struct task_cputime) { \ | ||
466 | .utime = cputime_zero, \ | ||
467 | .stime = cputime_zero, \ | ||
468 | .sum_exec_runtime = 0, \ | ||
469 | } | ||
470 | |||
466 | /** | 471 | /** |
467 | * struct thread_group_cputime - thread group interval timer counts | 472 | * struct thread_group_cputimer - thread group interval timer counts |
468 | * @totals: thread group interval timers; substructure for | 473 | * @cputime: thread group interval timers. |
469 | * uniprocessor kernel, per-cpu for SMP kernel. | 474 | * @running: non-zero when there are timers running and |
475 | * @cputime receives updates. | ||
476 | * @lock: lock for fields in this struct. | ||
470 | * | 477 | * |
471 | * This structure contains the version of task_cputime, above, that is | 478 | * This structure contains the version of task_cputime, above, that is |
472 | * used for thread group CPU clock calculations. | 479 | * used for thread group CPU timer calculations. |
473 | */ | 480 | */ |
474 | struct thread_group_cputime { | 481 | struct thread_group_cputimer { |
475 | struct task_cputime totals; | 482 | struct task_cputime cputime; |
483 | int running; | ||
484 | spinlock_t lock; | ||
476 | }; | 485 | }; |
477 | 486 | ||
478 | /* | 487 | /* |
@@ -521,10 +530,10 @@ struct signal_struct { | |||
521 | cputime_t it_prof_incr, it_virt_incr; | 530 | cputime_t it_prof_incr, it_virt_incr; |
522 | 531 | ||
523 | /* | 532 | /* |
524 | * Thread group totals for process CPU clocks. | 533 | * Thread group totals for process CPU timers. |
525 | * See thread_group_cputime(), et al, for details. | 534 | * See thread_group_cputimer(), et al, for details. |
526 | */ | 535 | */ |
527 | struct thread_group_cputime cputime; | 536 | struct thread_group_cputimer cputimer; |
528 | 537 | ||
529 | /* Earliest-expiration cache. */ | 538 | /* Earliest-expiration cache. */ |
530 | struct task_cputime cputime_expires; | 539 | struct task_cputime cputime_expires; |
@@ -561,7 +570,7 @@ struct signal_struct { | |||
561 | * Live threads maintain their own counters and add to these | 570 | * Live threads maintain their own counters and add to these |
562 | * in __exit_signal, except for the group leader. | 571 | * in __exit_signal, except for the group leader. |
563 | */ | 572 | */ |
564 | cputime_t cutime, cstime; | 573 | cputime_t utime, stime, cutime, cstime; |
565 | cputime_t gtime; | 574 | cputime_t gtime; |
566 | cputime_t cgtime; | 575 | cputime_t cgtime; |
567 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; | 576 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; |
@@ -570,6 +579,14 @@ struct signal_struct { | |||
570 | struct task_io_accounting ioac; | 579 | struct task_io_accounting ioac; |
571 | 580 | ||
572 | /* | 581 | /* |
582 | * Cumulative ns of schedule CPU time fo dead threads in the | ||
583 | * group, not including a zombie group leader, (This only differs | ||
584 | * from jiffies_to_ns(utime + stime) if sched_clock uses something | ||
585 | * other than jiffies.) | ||
586 | */ | ||
587 | unsigned long long sum_sched_runtime; | ||
588 | |||
589 | /* | ||
573 | * We don't bother to synchronize most readers of this at all, | 590 | * We don't bother to synchronize most readers of this at all, |
574 | * because there is no reader checking a limit that actually needs | 591 | * because there is no reader checking a limit that actually needs |
575 | * to get both rlim_cur and rlim_max atomically, and either one | 592 | * to get both rlim_cur and rlim_max atomically, and either one |
@@ -2185,27 +2202,14 @@ static inline int spin_needbreak(spinlock_t *lock) | |||
2185 | /* | 2202 | /* |
2186 | * Thread group CPU time accounting. | 2203 | * Thread group CPU time accounting. |
2187 | */ | 2204 | */ |
2188 | 2205 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); | |
2189 | static inline | 2206 | void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); |
2190 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times) | ||
2191 | { | ||
2192 | struct task_cputime *totals = &tsk->signal->cputime.totals; | ||
2193 | unsigned long flags; | ||
2194 | |||
2195 | spin_lock_irqsave(&totals->lock, flags); | ||
2196 | *times = *totals; | ||
2197 | spin_unlock_irqrestore(&totals->lock, flags); | ||
2198 | } | ||
2199 | 2207 | ||
2200 | static inline void thread_group_cputime_init(struct signal_struct *sig) | 2208 | static inline void thread_group_cputime_init(struct signal_struct *sig) |
2201 | { | 2209 | { |
2202 | sig->cputime.totals = (struct task_cputime){ | 2210 | sig->cputimer.cputime = INIT_CPUTIME; |
2203 | .utime = cputime_zero, | 2211 | spin_lock_init(&sig->cputimer.lock); |
2204 | .stime = cputime_zero, | 2212 | sig->cputimer.running = 0; |
2205 | .sum_exec_runtime = 0, | ||
2206 | }; | ||
2207 | |||
2208 | spin_lock_init(&sig->cputime.totals.lock); | ||
2209 | } | 2213 | } |
2210 | 2214 | ||
2211 | static inline void thread_group_cputime_free(struct signal_struct *sig) | 2215 | static inline void thread_group_cputime_free(struct signal_struct *sig) |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 0eda02ff2414..f9f900cfd066 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -95,13 +95,13 @@ struct old_linux_dirent; | |||
95 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) | 95 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) |
96 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) | 96 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) |
97 | 97 | ||
98 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) | 98 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) |
99 | #define SYSCALL_DEFINE1(...) SYSCALL_DEFINEx(1, __VA_ARGS__) | 99 | #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) |
100 | #define SYSCALL_DEFINE2(...) SYSCALL_DEFINEx(2, __VA_ARGS__) | 100 | #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__) |
101 | #define SYSCALL_DEFINE3(...) SYSCALL_DEFINEx(3, __VA_ARGS__) | 101 | #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) |
102 | #define SYSCALL_DEFINE4(...) SYSCALL_DEFINEx(4, __VA_ARGS__) | 102 | #define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__) |
103 | #define SYSCALL_DEFINE5(...) SYSCALL_DEFINEx(5, __VA_ARGS__) | 103 | #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) |
104 | #define SYSCALL_DEFINE6(...) SYSCALL_DEFINEx(6, __VA_ARGS__) | 104 | #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) |
105 | 105 | ||
106 | #ifdef CONFIG_PPC64 | 106 | #ifdef CONFIG_PPC64 |
107 | #define SYSCALL_ALIAS(alias, name) \ | 107 | #define SYSCALL_ALIAS(alias, name) \ |
@@ -121,21 +121,21 @@ struct old_linux_dirent; | |||
121 | 121 | ||
122 | #define SYSCALL_DEFINE(name) static inline long SYSC_##name | 122 | #define SYSCALL_DEFINE(name) static inline long SYSC_##name |
123 | #define SYSCALL_DEFINEx(x, name, ...) \ | 123 | #define SYSCALL_DEFINEx(x, name, ...) \ |
124 | asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)); \ | 124 | asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__)); \ |
125 | static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)); \ | 125 | static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__)); \ |
126 | asmlinkage long SyS_##name(__SC_LONG##x(__VA_ARGS__)) \ | 126 | asmlinkage long SyS##name(__SC_LONG##x(__VA_ARGS__)) \ |
127 | { \ | 127 | { \ |
128 | __SC_TEST##x(__VA_ARGS__); \ | 128 | __SC_TEST##x(__VA_ARGS__); \ |
129 | return (long) SYSC_##name(__SC_CAST##x(__VA_ARGS__)); \ | 129 | return (long) SYSC##name(__SC_CAST##x(__VA_ARGS__)); \ |
130 | } \ | 130 | } \ |
131 | SYSCALL_ALIAS(sys_##name, SyS_##name); \ | 131 | SYSCALL_ALIAS(sys##name, SyS##name); \ |
132 | static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)) | 132 | static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__)) |
133 | 133 | ||
134 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | 134 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ |
135 | 135 | ||
136 | #define SYSCALL_DEFINE(name) asmlinkage long sys_##name | 136 | #define SYSCALL_DEFINE(name) asmlinkage long sys_##name |
137 | #define SYSCALL_DEFINEx(x, name, ...) \ | 137 | #define SYSCALL_DEFINEx(x, name, ...) \ |
138 | asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)) | 138 | asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__)) |
139 | 139 | ||
140 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | 140 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ |
141 | 141 | ||
@@ -340,6 +340,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) | |||
340 | struct file * file; | 340 | struct file * file; |
341 | char name[13]; | 341 | char name[13]; |
342 | int id; | 342 | int id; |
343 | int acctflag = 0; | ||
343 | 344 | ||
344 | if (size < SHMMIN || size > ns->shm_ctlmax) | 345 | if (size < SHMMIN || size > ns->shm_ctlmax) |
345 | return -EINVAL; | 346 | return -EINVAL; |
@@ -364,11 +365,12 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) | |||
364 | 365 | ||
365 | sprintf (name, "SYSV%08x", key); | 366 | sprintf (name, "SYSV%08x", key); |
366 | if (shmflg & SHM_HUGETLB) { | 367 | if (shmflg & SHM_HUGETLB) { |
367 | /* hugetlb_file_setup takes care of mlock user accounting */ | 368 | /* hugetlb_file_setup applies strict accounting */ |
368 | file = hugetlb_file_setup(name, size); | 369 | if (shmflg & SHM_NORESERVE) |
370 | acctflag = VM_NORESERVE; | ||
371 | file = hugetlb_file_setup(name, size, acctflag); | ||
369 | shp->mlock_user = current_user(); | 372 | shp->mlock_user = current_user(); |
370 | } else { | 373 | } else { |
371 | int acctflag = 0; | ||
372 | /* | 374 | /* |
373 | * Do not allow no accounting for OVERCOMMIT_NEVER, even | 375 | * Do not allow no accounting for OVERCOMMIT_NEVER, even |
374 | * if it's asked for. | 376 | * if it's asked for. |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 5a54ff42874e..e14db9c089b9 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -2351,7 +2351,7 @@ static void cgroup_lock_hierarchy(struct cgroupfs_root *root) | |||
2351 | for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) { | 2351 | for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) { |
2352 | struct cgroup_subsys *ss = subsys[i]; | 2352 | struct cgroup_subsys *ss = subsys[i]; |
2353 | if (ss->root == root) | 2353 | if (ss->root == root) |
2354 | mutex_lock_nested(&ss->hierarchy_mutex, i); | 2354 | mutex_lock(&ss->hierarchy_mutex); |
2355 | } | 2355 | } |
2356 | } | 2356 | } |
2357 | 2357 | ||
@@ -2637,6 +2637,7 @@ static void __init cgroup_init_subsys(struct cgroup_subsys *ss) | |||
2637 | BUG_ON(!list_empty(&init_task.tasks)); | 2637 | BUG_ON(!list_empty(&init_task.tasks)); |
2638 | 2638 | ||
2639 | mutex_init(&ss->hierarchy_mutex); | 2639 | mutex_init(&ss->hierarchy_mutex); |
2640 | lockdep_set_class(&ss->hierarchy_mutex, &ss->subsys_key); | ||
2640 | ss->active = 1; | 2641 | ss->active = 1; |
2641 | } | 2642 | } |
2642 | 2643 | ||
diff --git a/kernel/exit.c b/kernel/exit.c index f80dec3f1875..efd30ccf3858 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -118,6 +118,8 @@ static void __exit_signal(struct task_struct *tsk) | |||
118 | * We won't ever get here for the group leader, since it | 118 | * We won't ever get here for the group leader, since it |
119 | * will have been the last reference on the signal_struct. | 119 | * will have been the last reference on the signal_struct. |
120 | */ | 120 | */ |
121 | sig->utime = cputime_add(sig->utime, task_utime(tsk)); | ||
122 | sig->stime = cputime_add(sig->stime, task_stime(tsk)); | ||
121 | sig->gtime = cputime_add(sig->gtime, task_gtime(tsk)); | 123 | sig->gtime = cputime_add(sig->gtime, task_gtime(tsk)); |
122 | sig->min_flt += tsk->min_flt; | 124 | sig->min_flt += tsk->min_flt; |
123 | sig->maj_flt += tsk->maj_flt; | 125 | sig->maj_flt += tsk->maj_flt; |
@@ -126,6 +128,7 @@ static void __exit_signal(struct task_struct *tsk) | |||
126 | sig->inblock += task_io_get_inblock(tsk); | 128 | sig->inblock += task_io_get_inblock(tsk); |
127 | sig->oublock += task_io_get_oublock(tsk); | 129 | sig->oublock += task_io_get_oublock(tsk); |
128 | task_io_accounting_add(&sig->ioac, &tsk->ioac); | 130 | task_io_accounting_add(&sig->ioac, &tsk->ioac); |
131 | sig->sum_sched_runtime += tsk->se.sum_exec_runtime; | ||
129 | sig = NULL; /* Marker for below. */ | 132 | sig = NULL; /* Marker for below. */ |
130 | } | 133 | } |
131 | 134 | ||
diff --git a/kernel/fork.c b/kernel/fork.c index 6d5dbb7a13e2..a66fbde20715 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -851,13 +851,14 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) | |||
851 | sig->tty_old_pgrp = NULL; | 851 | sig->tty_old_pgrp = NULL; |
852 | sig->tty = NULL; | 852 | sig->tty = NULL; |
853 | 853 | ||
854 | sig->cutime = sig->cstime = cputime_zero; | 854 | sig->utime = sig->stime = sig->cutime = sig->cstime = cputime_zero; |
855 | sig->gtime = cputime_zero; | 855 | sig->gtime = cputime_zero; |
856 | sig->cgtime = cputime_zero; | 856 | sig->cgtime = cputime_zero; |
857 | sig->nvcsw = sig->nivcsw = sig->cnvcsw = sig->cnivcsw = 0; | 857 | sig->nvcsw = sig->nivcsw = sig->cnvcsw = sig->cnivcsw = 0; |
858 | sig->min_flt = sig->maj_flt = sig->cmin_flt = sig->cmaj_flt = 0; | 858 | sig->min_flt = sig->maj_flt = sig->cmin_flt = sig->cmaj_flt = 0; |
859 | sig->inblock = sig->oublock = sig->cinblock = sig->coublock = 0; | 859 | sig->inblock = sig->oublock = sig->cinblock = sig->coublock = 0; |
860 | task_io_accounting_init(&sig->ioac); | 860 | task_io_accounting_init(&sig->ioac); |
861 | sig->sum_sched_runtime = 0; | ||
861 | taskstats_tgid_init(sig); | 862 | taskstats_tgid_init(sig); |
862 | 863 | ||
863 | task_lock(current->group_leader); | 864 | task_lock(current->group_leader); |
@@ -1094,7 +1095,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1094 | #ifdef CONFIG_DEBUG_MUTEXES | 1095 | #ifdef CONFIG_DEBUG_MUTEXES |
1095 | p->blocked_on = NULL; /* not blocked yet */ | 1096 | p->blocked_on = NULL; /* not blocked yet */ |
1096 | #endif | 1097 | #endif |
1097 | if (unlikely(ptrace_reparented(current))) | 1098 | if (unlikely(current->ptrace)) |
1098 | ptrace_fork(p, clone_flags); | 1099 | ptrace_fork(p, clone_flags); |
1099 | 1100 | ||
1100 | /* Perform scheduler related setup. Assign this task to a CPU. */ | 1101 | /* Perform scheduler related setup. Assign this task to a CPU. */ |
diff --git a/kernel/itimer.c b/kernel/itimer.c index 6a5fe93dd8bd..58762f7077ec 100644 --- a/kernel/itimer.c +++ b/kernel/itimer.c | |||
@@ -62,7 +62,7 @@ int do_getitimer(int which, struct itimerval *value) | |||
62 | struct task_cputime cputime; | 62 | struct task_cputime cputime; |
63 | cputime_t utime; | 63 | cputime_t utime; |
64 | 64 | ||
65 | thread_group_cputime(tsk, &cputime); | 65 | thread_group_cputimer(tsk, &cputime); |
66 | utime = cputime.utime; | 66 | utime = cputime.utime; |
67 | if (cputime_le(cval, utime)) { /* about to fire */ | 67 | if (cputime_le(cval, utime)) { /* about to fire */ |
68 | cval = jiffies_to_cputime(1); | 68 | cval = jiffies_to_cputime(1); |
@@ -82,7 +82,7 @@ int do_getitimer(int which, struct itimerval *value) | |||
82 | struct task_cputime times; | 82 | struct task_cputime times; |
83 | cputime_t ptime; | 83 | cputime_t ptime; |
84 | 84 | ||
85 | thread_group_cputime(tsk, ×); | 85 | thread_group_cputimer(tsk, ×); |
86 | ptime = cputime_add(times.utime, times.stime); | 86 | ptime = cputime_add(times.utime, times.stime); |
87 | if (cputime_le(cval, ptime)) { /* about to fire */ | 87 | if (cputime_le(cval, ptime)) { /* about to fire */ |
88 | cval = jiffies_to_cputime(1); | 88 | cval = jiffies_to_cputime(1); |
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index fa07da94d7be..2313a4cc14ea 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c | |||
@@ -230,6 +230,71 @@ static int cpu_clock_sample(const clockid_t which_clock, struct task_struct *p, | |||
230 | return 0; | 230 | return 0; |
231 | } | 231 | } |
232 | 232 | ||
233 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times) | ||
234 | { | ||
235 | struct sighand_struct *sighand; | ||
236 | struct signal_struct *sig; | ||
237 | struct task_struct *t; | ||
238 | |||
239 | *times = INIT_CPUTIME; | ||
240 | |||
241 | rcu_read_lock(); | ||
242 | sighand = rcu_dereference(tsk->sighand); | ||
243 | if (!sighand) | ||
244 | goto out; | ||
245 | |||
246 | sig = tsk->signal; | ||
247 | |||
248 | t = tsk; | ||
249 | do { | ||
250 | times->utime = cputime_add(times->utime, t->utime); | ||
251 | times->stime = cputime_add(times->stime, t->stime); | ||
252 | times->sum_exec_runtime += t->se.sum_exec_runtime; | ||
253 | |||
254 | t = next_thread(t); | ||
255 | } while (t != tsk); | ||
256 | |||
257 | times->utime = cputime_add(times->utime, sig->utime); | ||
258 | times->stime = cputime_add(times->stime, sig->stime); | ||
259 | times->sum_exec_runtime += sig->sum_sched_runtime; | ||
260 | out: | ||
261 | rcu_read_unlock(); | ||
262 | } | ||
263 | |||
264 | static void update_gt_cputime(struct task_cputime *a, struct task_cputime *b) | ||
265 | { | ||
266 | if (cputime_gt(b->utime, a->utime)) | ||
267 | a->utime = b->utime; | ||
268 | |||
269 | if (cputime_gt(b->stime, a->stime)) | ||
270 | a->stime = b->stime; | ||
271 | |||
272 | if (b->sum_exec_runtime > a->sum_exec_runtime) | ||
273 | a->sum_exec_runtime = b->sum_exec_runtime; | ||
274 | } | ||
275 | |||
276 | void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times) | ||
277 | { | ||
278 | struct thread_group_cputimer *cputimer = &tsk->signal->cputimer; | ||
279 | struct task_cputime sum; | ||
280 | unsigned long flags; | ||
281 | |||
282 | spin_lock_irqsave(&cputimer->lock, flags); | ||
283 | if (!cputimer->running) { | ||
284 | cputimer->running = 1; | ||
285 | /* | ||
286 | * The POSIX timer interface allows for absolute time expiry | ||
287 | * values through the TIMER_ABSTIME flag, therefore we have | ||
288 | * to synchronize the timer to the clock every time we start | ||
289 | * it. | ||
290 | */ | ||
291 | thread_group_cputime(tsk, &sum); | ||
292 | update_gt_cputime(&cputimer->cputime, &sum); | ||
293 | } | ||
294 | *times = cputimer->cputime; | ||
295 | spin_unlock_irqrestore(&cputimer->lock, flags); | ||
296 | } | ||
297 | |||
233 | /* | 298 | /* |
234 | * Sample a process (thread group) clock for the given group_leader task. | 299 | * Sample a process (thread group) clock for the given group_leader task. |
235 | * Must be called with tasklist_lock held for reading. | 300 | * Must be called with tasklist_lock held for reading. |
@@ -457,7 +522,7 @@ void posix_cpu_timers_exit_group(struct task_struct *tsk) | |||
457 | { | 522 | { |
458 | struct task_cputime cputime; | 523 | struct task_cputime cputime; |
459 | 524 | ||
460 | thread_group_cputime(tsk, &cputime); | 525 | thread_group_cputimer(tsk, &cputime); |
461 | cleanup_timers(tsk->signal->cpu_timers, | 526 | cleanup_timers(tsk->signal->cpu_timers, |
462 | cputime.utime, cputime.stime, cputime.sum_exec_runtime); | 527 | cputime.utime, cputime.stime, cputime.sum_exec_runtime); |
463 | } | 528 | } |
@@ -964,6 +1029,19 @@ static void check_thread_timers(struct task_struct *tsk, | |||
964 | } | 1029 | } |
965 | } | 1030 | } |
966 | 1031 | ||
1032 | static void stop_process_timers(struct task_struct *tsk) | ||
1033 | { | ||
1034 | struct thread_group_cputimer *cputimer = &tsk->signal->cputimer; | ||
1035 | unsigned long flags; | ||
1036 | |||
1037 | if (!cputimer->running) | ||
1038 | return; | ||
1039 | |||
1040 | spin_lock_irqsave(&cputimer->lock, flags); | ||
1041 | cputimer->running = 0; | ||
1042 | spin_unlock_irqrestore(&cputimer->lock, flags); | ||
1043 | } | ||
1044 | |||
967 | /* | 1045 | /* |
968 | * Check for any per-thread CPU timers that have fired and move them | 1046 | * Check for any per-thread CPU timers that have fired and move them |
969 | * off the tsk->*_timers list onto the firing list. Per-thread timers | 1047 | * off the tsk->*_timers list onto the firing list. Per-thread timers |
@@ -987,13 +1065,15 @@ static void check_process_timers(struct task_struct *tsk, | |||
987 | sig->rlim[RLIMIT_CPU].rlim_cur == RLIM_INFINITY && | 1065 | sig->rlim[RLIMIT_CPU].rlim_cur == RLIM_INFINITY && |
988 | list_empty(&timers[CPUCLOCK_VIRT]) && | 1066 | list_empty(&timers[CPUCLOCK_VIRT]) && |
989 | cputime_eq(sig->it_virt_expires, cputime_zero) && | 1067 | cputime_eq(sig->it_virt_expires, cputime_zero) && |
990 | list_empty(&timers[CPUCLOCK_SCHED])) | 1068 | list_empty(&timers[CPUCLOCK_SCHED])) { |
1069 | stop_process_timers(tsk); | ||
991 | return; | 1070 | return; |
1071 | } | ||
992 | 1072 | ||
993 | /* | 1073 | /* |
994 | * Collect the current process totals. | 1074 | * Collect the current process totals. |
995 | */ | 1075 | */ |
996 | thread_group_cputime(tsk, &cputime); | 1076 | thread_group_cputimer(tsk, &cputime); |
997 | utime = cputime.utime; | 1077 | utime = cputime.utime; |
998 | ptime = cputime_add(utime, cputime.stime); | 1078 | ptime = cputime_add(utime, cputime.stime); |
999 | sum_sched_runtime = cputime.sum_exec_runtime; | 1079 | sum_sched_runtime = cputime.sum_exec_runtime; |
@@ -1259,7 +1339,7 @@ static inline int fastpath_timer_check(struct task_struct *tsk) | |||
1259 | if (!task_cputime_zero(&sig->cputime_expires)) { | 1339 | if (!task_cputime_zero(&sig->cputime_expires)) { |
1260 | struct task_cputime group_sample; | 1340 | struct task_cputime group_sample; |
1261 | 1341 | ||
1262 | thread_group_cputime(tsk, &group_sample); | 1342 | thread_group_cputimer(tsk, &group_sample); |
1263 | if (task_cputime_expired(&group_sample, &sig->cputime_expires)) | 1343 | if (task_cputime_expired(&group_sample, &sig->cputime_expires)) |
1264 | return 1; | 1344 | return 1; |
1265 | } | 1345 | } |
@@ -1329,6 +1409,33 @@ void run_posix_cpu_timers(struct task_struct *tsk) | |||
1329 | } | 1409 | } |
1330 | 1410 | ||
1331 | /* | 1411 | /* |
1412 | * Sample a process (thread group) timer for the given group_leader task. | ||
1413 | * Must be called with tasklist_lock held for reading. | ||
1414 | */ | ||
1415 | static int cpu_timer_sample_group(const clockid_t which_clock, | ||
1416 | struct task_struct *p, | ||
1417 | union cpu_time_count *cpu) | ||
1418 | { | ||
1419 | struct task_cputime cputime; | ||
1420 | |||
1421 | thread_group_cputimer(p, &cputime); | ||
1422 | switch (CPUCLOCK_WHICH(which_clock)) { | ||
1423 | default: | ||
1424 | return -EINVAL; | ||
1425 | case CPUCLOCK_PROF: | ||
1426 | cpu->cpu = cputime_add(cputime.utime, cputime.stime); | ||
1427 | break; | ||
1428 | case CPUCLOCK_VIRT: | ||
1429 | cpu->cpu = cputime.utime; | ||
1430 | break; | ||
1431 | case CPUCLOCK_SCHED: | ||
1432 | cpu->sched = cputime.sum_exec_runtime + task_delta_exec(p); | ||
1433 | break; | ||
1434 | } | ||
1435 | return 0; | ||
1436 | } | ||
1437 | |||
1438 | /* | ||
1332 | * Set one of the process-wide special case CPU timers. | 1439 | * Set one of the process-wide special case CPU timers. |
1333 | * The tsk->sighand->siglock must be held by the caller. | 1440 | * The tsk->sighand->siglock must be held by the caller. |
1334 | * The *newval argument is relative and we update it to be absolute, *oldval | 1441 | * The *newval argument is relative and we update it to be absolute, *oldval |
@@ -1341,7 +1448,7 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clock_idx, | |||
1341 | struct list_head *head; | 1448 | struct list_head *head; |
1342 | 1449 | ||
1343 | BUG_ON(clock_idx == CPUCLOCK_SCHED); | 1450 | BUG_ON(clock_idx == CPUCLOCK_SCHED); |
1344 | cpu_clock_sample_group(clock_idx, tsk, &now); | 1451 | cpu_timer_sample_group(clock_idx, tsk, &now); |
1345 | 1452 | ||
1346 | if (oldval) { | 1453 | if (oldval) { |
1347 | if (!cputime_eq(*oldval, cputime_zero)) { | 1454 | if (!cputime_eq(*oldval, cputime_zero)) { |
diff --git a/kernel/sched.c b/kernel/sched.c index 1ffb89514871..5dc3b0a5d35a 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -2266,16 +2266,6 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync) | |||
2266 | if (!sched_feat(SYNC_WAKEUPS)) | 2266 | if (!sched_feat(SYNC_WAKEUPS)) |
2267 | sync = 0; | 2267 | sync = 0; |
2268 | 2268 | ||
2269 | if (!sync) { | ||
2270 | if (current->se.avg_overlap < sysctl_sched_migration_cost && | ||
2271 | p->se.avg_overlap < sysctl_sched_migration_cost) | ||
2272 | sync = 1; | ||
2273 | } else { | ||
2274 | if (current->se.avg_overlap >= sysctl_sched_migration_cost || | ||
2275 | p->se.avg_overlap >= sysctl_sched_migration_cost) | ||
2276 | sync = 0; | ||
2277 | } | ||
2278 | |||
2279 | #ifdef CONFIG_SMP | 2269 | #ifdef CONFIG_SMP |
2280 | if (sched_feat(LB_WAKEUP_UPDATE)) { | 2270 | if (sched_feat(LB_WAKEUP_UPDATE)) { |
2281 | struct sched_domain *sd; | 2271 | struct sched_domain *sd; |
@@ -3890,19 +3880,24 @@ int select_nohz_load_balancer(int stop_tick) | |||
3890 | int cpu = smp_processor_id(); | 3880 | int cpu = smp_processor_id(); |
3891 | 3881 | ||
3892 | if (stop_tick) { | 3882 | if (stop_tick) { |
3893 | cpumask_set_cpu(cpu, nohz.cpu_mask); | ||
3894 | cpu_rq(cpu)->in_nohz_recently = 1; | 3883 | cpu_rq(cpu)->in_nohz_recently = 1; |
3895 | 3884 | ||
3896 | /* | 3885 | if (!cpu_active(cpu)) { |
3897 | * If we are going offline and still the leader, give up! | 3886 | if (atomic_read(&nohz.load_balancer) != cpu) |
3898 | */ | 3887 | return 0; |
3899 | if (!cpu_active(cpu) && | 3888 | |
3900 | atomic_read(&nohz.load_balancer) == cpu) { | 3889 | /* |
3890 | * If we are going offline and still the leader, | ||
3891 | * give up! | ||
3892 | */ | ||
3901 | if (atomic_cmpxchg(&nohz.load_balancer, cpu, -1) != cpu) | 3893 | if (atomic_cmpxchg(&nohz.load_balancer, cpu, -1) != cpu) |
3902 | BUG(); | 3894 | BUG(); |
3895 | |||
3903 | return 0; | 3896 | return 0; |
3904 | } | 3897 | } |
3905 | 3898 | ||
3899 | cpumask_set_cpu(cpu, nohz.cpu_mask); | ||
3900 | |||
3906 | /* time for ilb owner also to sleep */ | 3901 | /* time for ilb owner also to sleep */ |
3907 | if (cpumask_weight(nohz.cpu_mask) == num_online_cpus()) { | 3902 | if (cpumask_weight(nohz.cpu_mask) == num_online_cpus()) { |
3908 | if (atomic_read(&nohz.load_balancer) == cpu) | 3903 | if (atomic_read(&nohz.load_balancer) == cpu) |
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index a7e50ba185ac..0566f2a03c42 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -1191,15 +1191,20 @@ wake_affine(struct sched_domain *this_sd, struct rq *this_rq, | |||
1191 | int idx, unsigned long load, unsigned long this_load, | 1191 | int idx, unsigned long load, unsigned long this_load, |
1192 | unsigned int imbalance) | 1192 | unsigned int imbalance) |
1193 | { | 1193 | { |
1194 | struct task_struct *curr = this_rq->curr; | ||
1195 | struct task_group *tg; | ||
1194 | unsigned long tl = this_load; | 1196 | unsigned long tl = this_load; |
1195 | unsigned long tl_per_task; | 1197 | unsigned long tl_per_task; |
1196 | struct task_group *tg; | ||
1197 | unsigned long weight; | 1198 | unsigned long weight; |
1198 | int balanced; | 1199 | int balanced; |
1199 | 1200 | ||
1200 | if (!(this_sd->flags & SD_WAKE_AFFINE) || !sched_feat(AFFINE_WAKEUPS)) | 1201 | if (!(this_sd->flags & SD_WAKE_AFFINE) || !sched_feat(AFFINE_WAKEUPS)) |
1201 | return 0; | 1202 | return 0; |
1202 | 1203 | ||
1204 | if (sync && (curr->se.avg_overlap > sysctl_sched_migration_cost || | ||
1205 | p->se.avg_overlap > sysctl_sched_migration_cost)) | ||
1206 | sync = 0; | ||
1207 | |||
1203 | /* | 1208 | /* |
1204 | * If sync wakeup then subtract the (maximum possible) | 1209 | * If sync wakeup then subtract the (maximum possible) |
1205 | * effect of the currently running task from the load | 1210 | * effect of the currently running task from the load |
@@ -1426,7 +1431,9 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int sync) | |||
1426 | if (!sched_feat(WAKEUP_PREEMPT)) | 1431 | if (!sched_feat(WAKEUP_PREEMPT)) |
1427 | return; | 1432 | return; |
1428 | 1433 | ||
1429 | if (sched_feat(WAKEUP_OVERLAP) && sync) { | 1434 | if (sched_feat(WAKEUP_OVERLAP) && (sync || |
1435 | (se->avg_overlap < sysctl_sched_migration_cost && | ||
1436 | pse->avg_overlap < sysctl_sched_migration_cost))) { | ||
1430 | resched_task(curr); | 1437 | resched_task(curr); |
1431 | return; | 1438 | return; |
1432 | } | 1439 | } |
diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h index 8ab0cef8ecab..a8f93dd374e1 100644 --- a/kernel/sched_stats.h +++ b/kernel/sched_stats.h | |||
@@ -296,19 +296,21 @@ sched_info_switch(struct task_struct *prev, struct task_struct *next) | |||
296 | static inline void account_group_user_time(struct task_struct *tsk, | 296 | static inline void account_group_user_time(struct task_struct *tsk, |
297 | cputime_t cputime) | 297 | cputime_t cputime) |
298 | { | 298 | { |
299 | struct task_cputime *times; | 299 | struct thread_group_cputimer *cputimer; |
300 | struct signal_struct *sig; | ||
301 | 300 | ||
302 | /* tsk == current, ensure it is safe to use ->signal */ | 301 | /* tsk == current, ensure it is safe to use ->signal */ |
303 | if (unlikely(tsk->exit_state)) | 302 | if (unlikely(tsk->exit_state)) |
304 | return; | 303 | return; |
305 | 304 | ||
306 | sig = tsk->signal; | 305 | cputimer = &tsk->signal->cputimer; |
307 | times = &sig->cputime.totals; | ||
308 | 306 | ||
309 | spin_lock(×->lock); | 307 | if (!cputimer->running) |
310 | times->utime = cputime_add(times->utime, cputime); | 308 | return; |
311 | spin_unlock(×->lock); | 309 | |
310 | spin_lock(&cputimer->lock); | ||
311 | cputimer->cputime.utime = | ||
312 | cputime_add(cputimer->cputime.utime, cputime); | ||
313 | spin_unlock(&cputimer->lock); | ||
312 | } | 314 | } |
313 | 315 | ||
314 | /** | 316 | /** |
@@ -324,19 +326,21 @@ static inline void account_group_user_time(struct task_struct *tsk, | |||
324 | static inline void account_group_system_time(struct task_struct *tsk, | 326 | static inline void account_group_system_time(struct task_struct *tsk, |
325 | cputime_t cputime) | 327 | cputime_t cputime) |
326 | { | 328 | { |
327 | struct task_cputime *times; | 329 | struct thread_group_cputimer *cputimer; |
328 | struct signal_struct *sig; | ||
329 | 330 | ||
330 | /* tsk == current, ensure it is safe to use ->signal */ | 331 | /* tsk == current, ensure it is safe to use ->signal */ |
331 | if (unlikely(tsk->exit_state)) | 332 | if (unlikely(tsk->exit_state)) |
332 | return; | 333 | return; |
333 | 334 | ||
334 | sig = tsk->signal; | 335 | cputimer = &tsk->signal->cputimer; |
335 | times = &sig->cputime.totals; | 336 | |
337 | if (!cputimer->running) | ||
338 | return; | ||
336 | 339 | ||
337 | spin_lock(×->lock); | 340 | spin_lock(&cputimer->lock); |
338 | times->stime = cputime_add(times->stime, cputime); | 341 | cputimer->cputime.stime = |
339 | spin_unlock(×->lock); | 342 | cputime_add(cputimer->cputime.stime, cputime); |
343 | spin_unlock(&cputimer->lock); | ||
340 | } | 344 | } |
341 | 345 | ||
342 | /** | 346 | /** |
@@ -352,7 +356,7 @@ static inline void account_group_system_time(struct task_struct *tsk, | |||
352 | static inline void account_group_exec_runtime(struct task_struct *tsk, | 356 | static inline void account_group_exec_runtime(struct task_struct *tsk, |
353 | unsigned long long ns) | 357 | unsigned long long ns) |
354 | { | 358 | { |
355 | struct task_cputime *times; | 359 | struct thread_group_cputimer *cputimer; |
356 | struct signal_struct *sig; | 360 | struct signal_struct *sig; |
357 | 361 | ||
358 | sig = tsk->signal; | 362 | sig = tsk->signal; |
@@ -361,9 +365,12 @@ static inline void account_group_exec_runtime(struct task_struct *tsk, | |||
361 | if (unlikely(!sig)) | 365 | if (unlikely(!sig)) |
362 | return; | 366 | return; |
363 | 367 | ||
364 | times = &sig->cputime.totals; | 368 | cputimer = &sig->cputimer; |
369 | |||
370 | if (!cputimer->running) | ||
371 | return; | ||
365 | 372 | ||
366 | spin_lock(×->lock); | 373 | spin_lock(&cputimer->lock); |
367 | times->sum_exec_runtime += ns; | 374 | cputimer->cputime.sum_exec_runtime += ns; |
368 | spin_unlock(×->lock); | 375 | spin_unlock(&cputimer->lock); |
369 | } | 376 | } |
diff --git a/kernel/signal.c b/kernel/signal.c index b6b36768b758..2a74fe87c0dd 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -1367,7 +1367,6 @@ int do_notify_parent(struct task_struct *tsk, int sig) | |||
1367 | struct siginfo info; | 1367 | struct siginfo info; |
1368 | unsigned long flags; | 1368 | unsigned long flags; |
1369 | struct sighand_struct *psig; | 1369 | struct sighand_struct *psig; |
1370 | struct task_cputime cputime; | ||
1371 | int ret = sig; | 1370 | int ret = sig; |
1372 | 1371 | ||
1373 | BUG_ON(sig == -1); | 1372 | BUG_ON(sig == -1); |
@@ -1397,9 +1396,10 @@ int do_notify_parent(struct task_struct *tsk, int sig) | |||
1397 | info.si_uid = __task_cred(tsk)->uid; | 1396 | info.si_uid = __task_cred(tsk)->uid; |
1398 | rcu_read_unlock(); | 1397 | rcu_read_unlock(); |
1399 | 1398 | ||
1400 | thread_group_cputime(tsk, &cputime); | 1399 | info.si_utime = cputime_to_clock_t(cputime_add(tsk->utime, |
1401 | info.si_utime = cputime_to_jiffies(cputime.utime); | 1400 | tsk->signal->utime)); |
1402 | info.si_stime = cputime_to_jiffies(cputime.stime); | 1401 | info.si_stime = cputime_to_clock_t(cputime_add(tsk->stime, |
1402 | tsk->signal->stime)); | ||
1403 | 1403 | ||
1404 | info.si_status = tsk->exit_code & 0x7f; | 1404 | info.si_status = tsk->exit_code & 0x7f; |
1405 | if (tsk->exit_code & 0x80) | 1405 | if (tsk->exit_code & 0x80) |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 790f9d785663..c5ef44ff850f 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -101,6 +101,7 @@ static int two = 2; | |||
101 | 101 | ||
102 | static int zero; | 102 | static int zero; |
103 | static int one = 1; | 103 | static int one = 1; |
104 | static unsigned long one_ul = 1; | ||
104 | static int one_hundred = 100; | 105 | static int one_hundred = 100; |
105 | 106 | ||
106 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ | 107 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ |
@@ -974,7 +975,7 @@ static struct ctl_table vm_table[] = { | |||
974 | .mode = 0644, | 975 | .mode = 0644, |
975 | .proc_handler = &dirty_background_bytes_handler, | 976 | .proc_handler = &dirty_background_bytes_handler, |
976 | .strategy = &sysctl_intvec, | 977 | .strategy = &sysctl_intvec, |
977 | .extra1 = &one, | 978 | .extra1 = &one_ul, |
978 | }, | 979 | }, |
979 | { | 980 | { |
980 | .ctl_name = VM_DIRTY_RATIO, | 981 | .ctl_name = VM_DIRTY_RATIO, |
@@ -995,7 +996,7 @@ static struct ctl_table vm_table[] = { | |||
995 | .mode = 0644, | 996 | .mode = 0644, |
996 | .proc_handler = &dirty_bytes_handler, | 997 | .proc_handler = &dirty_bytes_handler, |
997 | .strategy = &sysctl_intvec, | 998 | .strategy = &sysctl_intvec, |
998 | .extra1 = &one, | 999 | .extra1 = &one_ul, |
999 | }, | 1000 | }, |
1000 | { | 1001 | { |
1001 | .procname = "dirty_writeback_centisecs", | 1002 | .procname = "dirty_writeback_centisecs", |
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 3a331289457a..6ff928acd453 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig | |||
@@ -134,6 +134,7 @@ config SYSPROF_TRACER | |||
134 | bool "Sysprof Tracer" | 134 | bool "Sysprof Tracer" |
135 | depends on X86 | 135 | depends on X86 |
136 | select TRACING | 136 | select TRACING |
137 | select CONTEXT_SWITCH_TRACER | ||
137 | help | 138 | help |
138 | This tracer provides the trace needed by the 'Sysprof' userspace | 139 | This tracer provides the trace needed by the 'Sysprof' userspace |
139 | tool. | 140 | tool. |
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 27ef3bf13ed2..a3901b550c93 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -59,7 +59,7 @@ enum { | |||
59 | RB_BUFFERS_DISABLED = 1 << RB_BUFFERS_DISABLED_BIT, | 59 | RB_BUFFERS_DISABLED = 1 << RB_BUFFERS_DISABLED_BIT, |
60 | }; | 60 | }; |
61 | 61 | ||
62 | static long ring_buffer_flags __read_mostly = RB_BUFFERS_ON; | 62 | static unsigned long ring_buffer_flags __read_mostly = RB_BUFFERS_ON; |
63 | 63 | ||
64 | /** | 64 | /** |
65 | * tracing_on - enable all tracing buffers | 65 | * tracing_on - enable all tracing buffers |
@@ -91,7 +91,7 @@ EXPORT_SYMBOL_GPL(tracing_off); | |||
91 | * tracing_off_permanent - permanently disable ring buffers | 91 | * tracing_off_permanent - permanently disable ring buffers |
92 | * | 92 | * |
93 | * This function, once called, will disable all ring buffers | 93 | * This function, once called, will disable all ring buffers |
94 | * permanenty. | 94 | * permanently. |
95 | */ | 95 | */ |
96 | void tracing_off_permanent(void) | 96 | void tracing_off_permanent(void) |
97 | { | 97 | { |
@@ -210,7 +210,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_event_data); | |||
210 | 210 | ||
211 | struct buffer_data_page { | 211 | struct buffer_data_page { |
212 | u64 time_stamp; /* page time stamp */ | 212 | u64 time_stamp; /* page time stamp */ |
213 | local_t commit; /* write commited index */ | 213 | local_t commit; /* write committed index */ |
214 | unsigned char data[]; /* data of buffer page */ | 214 | unsigned char data[]; /* data of buffer page */ |
215 | }; | 215 | }; |
216 | 216 | ||
@@ -260,7 +260,7 @@ struct ring_buffer_per_cpu { | |||
260 | struct list_head pages; | 260 | struct list_head pages; |
261 | struct buffer_page *head_page; /* read from head */ | 261 | struct buffer_page *head_page; /* read from head */ |
262 | struct buffer_page *tail_page; /* write to tail */ | 262 | struct buffer_page *tail_page; /* write to tail */ |
263 | struct buffer_page *commit_page; /* commited pages */ | 263 | struct buffer_page *commit_page; /* committed pages */ |
264 | struct buffer_page *reader_page; | 264 | struct buffer_page *reader_page; |
265 | unsigned long overrun; | 265 | unsigned long overrun; |
266 | unsigned long entries; | 266 | unsigned long entries; |
@@ -303,7 +303,7 @@ struct ring_buffer_iter { | |||
303 | * check_pages - integrity check of buffer pages | 303 | * check_pages - integrity check of buffer pages |
304 | * @cpu_buffer: CPU buffer with pages to test | 304 | * @cpu_buffer: CPU buffer with pages to test |
305 | * | 305 | * |
306 | * As a safty measure we check to make sure the data pages have not | 306 | * As a safety measure we check to make sure the data pages have not |
307 | * been corrupted. | 307 | * been corrupted. |
308 | */ | 308 | */ |
309 | static int rb_check_pages(struct ring_buffer_per_cpu *cpu_buffer) | 309 | static int rb_check_pages(struct ring_buffer_per_cpu *cpu_buffer) |
@@ -2332,13 +2332,14 @@ int ring_buffer_swap_cpu(struct ring_buffer *buffer_a, | |||
2332 | EXPORT_SYMBOL_GPL(ring_buffer_swap_cpu); | 2332 | EXPORT_SYMBOL_GPL(ring_buffer_swap_cpu); |
2333 | 2333 | ||
2334 | static void rb_remove_entries(struct ring_buffer_per_cpu *cpu_buffer, | 2334 | static void rb_remove_entries(struct ring_buffer_per_cpu *cpu_buffer, |
2335 | struct buffer_data_page *bpage) | 2335 | struct buffer_data_page *bpage, |
2336 | unsigned int offset) | ||
2336 | { | 2337 | { |
2337 | struct ring_buffer_event *event; | 2338 | struct ring_buffer_event *event; |
2338 | unsigned long head; | 2339 | unsigned long head; |
2339 | 2340 | ||
2340 | __raw_spin_lock(&cpu_buffer->lock); | 2341 | __raw_spin_lock(&cpu_buffer->lock); |
2341 | for (head = 0; head < local_read(&bpage->commit); | 2342 | for (head = offset; head < local_read(&bpage->commit); |
2342 | head += rb_event_length(event)) { | 2343 | head += rb_event_length(event)) { |
2343 | 2344 | ||
2344 | event = __rb_data_page_index(bpage, head); | 2345 | event = __rb_data_page_index(bpage, head); |
@@ -2406,12 +2407,12 @@ void ring_buffer_free_read_page(struct ring_buffer *buffer, void *data) | |||
2406 | * to swap with a page in the ring buffer. | 2407 | * to swap with a page in the ring buffer. |
2407 | * | 2408 | * |
2408 | * for example: | 2409 | * for example: |
2409 | * rpage = ring_buffer_alloc_page(buffer); | 2410 | * rpage = ring_buffer_alloc_read_page(buffer); |
2410 | * if (!rpage) | 2411 | * if (!rpage) |
2411 | * return error; | 2412 | * return error; |
2412 | * ret = ring_buffer_read_page(buffer, &rpage, cpu, 0); | 2413 | * ret = ring_buffer_read_page(buffer, &rpage, cpu, 0); |
2413 | * if (ret) | 2414 | * if (ret >= 0) |
2414 | * process_page(rpage); | 2415 | * process_page(rpage, ret); |
2415 | * | 2416 | * |
2416 | * When @full is set, the function will not return true unless | 2417 | * When @full is set, the function will not return true unless |
2417 | * the writer is off the reader page. | 2418 | * the writer is off the reader page. |
@@ -2422,8 +2423,8 @@ void ring_buffer_free_read_page(struct ring_buffer *buffer, void *data) | |||
2422 | * responsible for that. | 2423 | * responsible for that. |
2423 | * | 2424 | * |
2424 | * Returns: | 2425 | * Returns: |
2425 | * 1 if data has been transferred | 2426 | * >=0 if data has been transferred, returns the offset of consumed data. |
2426 | * 0 if no data has been transferred. | 2427 | * <0 if no data has been transferred. |
2427 | */ | 2428 | */ |
2428 | int ring_buffer_read_page(struct ring_buffer *buffer, | 2429 | int ring_buffer_read_page(struct ring_buffer *buffer, |
2429 | void **data_page, int cpu, int full) | 2430 | void **data_page, int cpu, int full) |
@@ -2432,7 +2433,8 @@ int ring_buffer_read_page(struct ring_buffer *buffer, | |||
2432 | struct ring_buffer_event *event; | 2433 | struct ring_buffer_event *event; |
2433 | struct buffer_data_page *bpage; | 2434 | struct buffer_data_page *bpage; |
2434 | unsigned long flags; | 2435 | unsigned long flags; |
2435 | int ret = 0; | 2436 | unsigned int read; |
2437 | int ret = -1; | ||
2436 | 2438 | ||
2437 | if (!data_page) | 2439 | if (!data_page) |
2438 | return 0; | 2440 | return 0; |
@@ -2454,25 +2456,29 @@ int ring_buffer_read_page(struct ring_buffer *buffer, | |||
2454 | /* check for data */ | 2456 | /* check for data */ |
2455 | if (!local_read(&cpu_buffer->reader_page->page->commit)) | 2457 | if (!local_read(&cpu_buffer->reader_page->page->commit)) |
2456 | goto out; | 2458 | goto out; |
2459 | |||
2460 | read = cpu_buffer->reader_page->read; | ||
2457 | /* | 2461 | /* |
2458 | * If the writer is already off of the read page, then simply | 2462 | * If the writer is already off of the read page, then simply |
2459 | * switch the read page with the given page. Otherwise | 2463 | * switch the read page with the given page. Otherwise |
2460 | * we need to copy the data from the reader to the writer. | 2464 | * we need to copy the data from the reader to the writer. |
2461 | */ | 2465 | */ |
2462 | if (cpu_buffer->reader_page == cpu_buffer->commit_page) { | 2466 | if (cpu_buffer->reader_page == cpu_buffer->commit_page) { |
2463 | unsigned int read = cpu_buffer->reader_page->read; | 2467 | unsigned int commit = rb_page_commit(cpu_buffer->reader_page); |
2468 | struct buffer_data_page *rpage = cpu_buffer->reader_page->page; | ||
2464 | 2469 | ||
2465 | if (full) | 2470 | if (full) |
2466 | goto out; | 2471 | goto out; |
2467 | /* The writer is still on the reader page, we must copy */ | 2472 | /* The writer is still on the reader page, we must copy */ |
2468 | bpage = cpu_buffer->reader_page->page; | 2473 | memcpy(bpage->data + read, rpage->data + read, commit - read); |
2469 | memcpy(bpage->data, | ||
2470 | cpu_buffer->reader_page->page->data + read, | ||
2471 | local_read(&bpage->commit) - read); | ||
2472 | 2474 | ||
2473 | /* consume what was read */ | 2475 | /* consume what was read */ |
2474 | cpu_buffer->reader_page += read; | 2476 | cpu_buffer->reader_page->read = commit; |
2475 | 2477 | ||
2478 | /* update bpage */ | ||
2479 | local_set(&bpage->commit, commit); | ||
2480 | if (!read) | ||
2481 | bpage->time_stamp = rpage->time_stamp; | ||
2476 | } else { | 2482 | } else { |
2477 | /* swap the pages */ | 2483 | /* swap the pages */ |
2478 | rb_init_page(bpage); | 2484 | rb_init_page(bpage); |
@@ -2481,10 +2487,10 @@ int ring_buffer_read_page(struct ring_buffer *buffer, | |||
2481 | cpu_buffer->reader_page->read = 0; | 2487 | cpu_buffer->reader_page->read = 0; |
2482 | *data_page = bpage; | 2488 | *data_page = bpage; |
2483 | } | 2489 | } |
2484 | ret = 1; | 2490 | ret = read; |
2485 | 2491 | ||
2486 | /* update the entry counter */ | 2492 | /* update the entry counter */ |
2487 | rb_remove_entries(cpu_buffer, bpage); | 2493 | rb_remove_entries(cpu_buffer, bpage, read); |
2488 | out: | 2494 | out: |
2489 | spin_unlock_irqrestore(&cpu_buffer->reader_lock, flags); | 2495 | spin_unlock_irqrestore(&cpu_buffer->reader_lock, flags); |
2490 | 2496 | ||
@@ -2495,7 +2501,7 @@ static ssize_t | |||
2495 | rb_simple_read(struct file *filp, char __user *ubuf, | 2501 | rb_simple_read(struct file *filp, char __user *ubuf, |
2496 | size_t cnt, loff_t *ppos) | 2502 | size_t cnt, loff_t *ppos) |
2497 | { | 2503 | { |
2498 | long *p = filp->private_data; | 2504 | unsigned long *p = filp->private_data; |
2499 | char buf[64]; | 2505 | char buf[64]; |
2500 | int r; | 2506 | int r; |
2501 | 2507 | ||
@@ -2511,9 +2517,9 @@ static ssize_t | |||
2511 | rb_simple_write(struct file *filp, const char __user *ubuf, | 2517 | rb_simple_write(struct file *filp, const char __user *ubuf, |
2512 | size_t cnt, loff_t *ppos) | 2518 | size_t cnt, loff_t *ppos) |
2513 | { | 2519 | { |
2514 | long *p = filp->private_data; | 2520 | unsigned long *p = filp->private_data; |
2515 | char buf[64]; | 2521 | char buf[64]; |
2516 | long val; | 2522 | unsigned long val; |
2517 | int ret; | 2523 | int ret; |
2518 | 2524 | ||
2519 | if (cnt >= sizeof(buf)) | 2525 | if (cnt >= sizeof(buf)) |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index d89821283b47..95f99a7abf2f 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -80,7 +80,7 @@ static int dummy_set_flag(u32 old_flags, u32 bit, int set) | |||
80 | * of the tracer is successful. But that is the only place that sets | 80 | * of the tracer is successful. But that is the only place that sets |
81 | * this back to zero. | 81 | * this back to zero. |
82 | */ | 82 | */ |
83 | int tracing_disabled = 1; | 83 | static int tracing_disabled = 1; |
84 | 84 | ||
85 | static DEFINE_PER_CPU(local_t, ftrace_cpu_disabled); | 85 | static DEFINE_PER_CPU(local_t, ftrace_cpu_disabled); |
86 | 86 | ||
@@ -459,6 +459,8 @@ update_max_tr_single(struct trace_array *tr, struct task_struct *tsk, int cpu) | |||
459 | * Register a new plugin tracer. | 459 | * Register a new plugin tracer. |
460 | */ | 460 | */ |
461 | int register_tracer(struct tracer *type) | 461 | int register_tracer(struct tracer *type) |
462 | __releases(kernel_lock) | ||
463 | __acquires(kernel_lock) | ||
462 | { | 464 | { |
463 | struct tracer *t; | 465 | struct tracer *t; |
464 | int len; | 466 | int len; |
@@ -626,7 +628,7 @@ static int cmdline_idx; | |||
626 | static DEFINE_SPINLOCK(trace_cmdline_lock); | 628 | static DEFINE_SPINLOCK(trace_cmdline_lock); |
627 | 629 | ||
628 | /* temporary disable recording */ | 630 | /* temporary disable recording */ |
629 | atomic_t trace_record_cmdline_disabled __read_mostly; | 631 | static atomic_t trace_record_cmdline_disabled __read_mostly; |
630 | 632 | ||
631 | static void trace_init_cmdlines(void) | 633 | static void trace_init_cmdlines(void) |
632 | { | 634 | { |
@@ -983,10 +985,12 @@ static void ftrace_trace_userstack(struct trace_array *tr, | |||
983 | #endif | 985 | #endif |
984 | } | 986 | } |
985 | 987 | ||
986 | void __trace_userstack(struct trace_array *tr, unsigned long flags) | 988 | #ifdef UNUSED |
989 | static void __trace_userstack(struct trace_array *tr, unsigned long flags) | ||
987 | { | 990 | { |
988 | ftrace_trace_userstack(tr, flags, preempt_count()); | 991 | ftrace_trace_userstack(tr, flags, preempt_count()); |
989 | } | 992 | } |
993 | #endif /* UNUSED */ | ||
990 | 994 | ||
991 | static void | 995 | static void |
992 | ftrace_trace_special(void *__tr, | 996 | ftrace_trace_special(void *__tr, |
@@ -1720,7 +1724,7 @@ int tracing_open_generic(struct inode *inode, struct file *filp) | |||
1720 | return 0; | 1724 | return 0; |
1721 | } | 1725 | } |
1722 | 1726 | ||
1723 | int tracing_release(struct inode *inode, struct file *file) | 1727 | static int tracing_release(struct inode *inode, struct file *file) |
1724 | { | 1728 | { |
1725 | struct seq_file *m = (struct seq_file *)file->private_data; | 1729 | struct seq_file *m = (struct seq_file *)file->private_data; |
1726 | struct trace_iterator *iter = m->private; | 1730 | struct trace_iterator *iter = m->private; |
@@ -1963,7 +1967,7 @@ tracing_trace_options_read(struct file *filp, char __user *ubuf, | |||
1963 | struct tracer_opt *trace_opts = current_trace->flags->opts; | 1967 | struct tracer_opt *trace_opts = current_trace->flags->opts; |
1964 | 1968 | ||
1965 | 1969 | ||
1966 | /* calulate max size */ | 1970 | /* calculate max size */ |
1967 | for (i = 0; trace_options[i]; i++) { | 1971 | for (i = 0; trace_options[i]; i++) { |
1968 | len += strlen(trace_options[i]); | 1972 | len += strlen(trace_options[i]); |
1969 | len += 3; /* "no" and space */ | 1973 | len += 3; /* "no" and space */ |
@@ -2145,7 +2149,7 @@ tracing_ctrl_write(struct file *filp, const char __user *ubuf, | |||
2145 | { | 2149 | { |
2146 | struct trace_array *tr = filp->private_data; | 2150 | struct trace_array *tr = filp->private_data; |
2147 | char buf[64]; | 2151 | char buf[64]; |
2148 | long val; | 2152 | unsigned long val; |
2149 | int ret; | 2153 | int ret; |
2150 | 2154 | ||
2151 | if (cnt >= sizeof(buf)) | 2155 | if (cnt >= sizeof(buf)) |
@@ -2293,9 +2297,9 @@ static ssize_t | |||
2293 | tracing_max_lat_write(struct file *filp, const char __user *ubuf, | 2297 | tracing_max_lat_write(struct file *filp, const char __user *ubuf, |
2294 | size_t cnt, loff_t *ppos) | 2298 | size_t cnt, loff_t *ppos) |
2295 | { | 2299 | { |
2296 | long *ptr = filp->private_data; | 2300 | unsigned long *ptr = filp->private_data; |
2297 | char buf[64]; | 2301 | char buf[64]; |
2298 | long val; | 2302 | unsigned long val; |
2299 | int ret; | 2303 | int ret; |
2300 | 2304 | ||
2301 | if (cnt >= sizeof(buf)) | 2305 | if (cnt >= sizeof(buf)) |
diff --git a/kernel/trace/trace_branch.c b/kernel/trace/trace_branch.c index f8ae2c50e01d..c2e68d440c4d 100644 --- a/kernel/trace/trace_branch.c +++ b/kernel/trace/trace_branch.c | |||
@@ -91,8 +91,6 @@ void trace_likely_condition(struct ftrace_branch_data *f, int val, int expect) | |||
91 | 91 | ||
92 | int enable_branch_tracing(struct trace_array *tr) | 92 | int enable_branch_tracing(struct trace_array *tr) |
93 | { | 93 | { |
94 | int ret = 0; | ||
95 | |||
96 | mutex_lock(&branch_tracing_mutex); | 94 | mutex_lock(&branch_tracing_mutex); |
97 | branch_tracer = tr; | 95 | branch_tracer = tr; |
98 | /* | 96 | /* |
@@ -103,7 +101,7 @@ int enable_branch_tracing(struct trace_array *tr) | |||
103 | branch_tracing_enabled++; | 101 | branch_tracing_enabled++; |
104 | mutex_unlock(&branch_tracing_mutex); | 102 | mutex_unlock(&branch_tracing_mutex); |
105 | 103 | ||
106 | return ret; | 104 | return 0; |
107 | } | 105 | } |
108 | 106 | ||
109 | void disable_branch_tracing(void) | 107 | void disable_branch_tracing(void) |
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index 782ec0fdf453..519a0cab1530 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c | |||
@@ -186,30 +186,30 @@ verif_pid(struct trace_seq *s, pid_t pid, int cpu, pid_t *last_pids_cpu) | |||
186 | ret = trace_seq_printf(s, | 186 | ret = trace_seq_printf(s, |
187 | " ------------------------------------------\n"); | 187 | " ------------------------------------------\n"); |
188 | if (!ret) | 188 | if (!ret) |
189 | TRACE_TYPE_PARTIAL_LINE; | 189 | return TRACE_TYPE_PARTIAL_LINE; |
190 | 190 | ||
191 | ret = print_graph_cpu(s, cpu); | 191 | ret = print_graph_cpu(s, cpu); |
192 | if (ret == TRACE_TYPE_PARTIAL_LINE) | 192 | if (ret == TRACE_TYPE_PARTIAL_LINE) |
193 | TRACE_TYPE_PARTIAL_LINE; | 193 | return TRACE_TYPE_PARTIAL_LINE; |
194 | 194 | ||
195 | ret = print_graph_proc(s, prev_pid); | 195 | ret = print_graph_proc(s, prev_pid); |
196 | if (ret == TRACE_TYPE_PARTIAL_LINE) | 196 | if (ret == TRACE_TYPE_PARTIAL_LINE) |
197 | TRACE_TYPE_PARTIAL_LINE; | 197 | return TRACE_TYPE_PARTIAL_LINE; |
198 | 198 | ||
199 | ret = trace_seq_printf(s, " => "); | 199 | ret = trace_seq_printf(s, " => "); |
200 | if (!ret) | 200 | if (!ret) |
201 | TRACE_TYPE_PARTIAL_LINE; | 201 | return TRACE_TYPE_PARTIAL_LINE; |
202 | 202 | ||
203 | ret = print_graph_proc(s, pid); | 203 | ret = print_graph_proc(s, pid); |
204 | if (ret == TRACE_TYPE_PARTIAL_LINE) | 204 | if (ret == TRACE_TYPE_PARTIAL_LINE) |
205 | TRACE_TYPE_PARTIAL_LINE; | 205 | return TRACE_TYPE_PARTIAL_LINE; |
206 | 206 | ||
207 | ret = trace_seq_printf(s, | 207 | ret = trace_seq_printf(s, |
208 | "\n ------------------------------------------\n\n"); | 208 | "\n ------------------------------------------\n\n"); |
209 | if (!ret) | 209 | if (!ret) |
210 | TRACE_TYPE_PARTIAL_LINE; | 210 | return TRACE_TYPE_PARTIAL_LINE; |
211 | 211 | ||
212 | return ret; | 212 | return TRACE_TYPE_HANDLED; |
213 | } | 213 | } |
214 | 214 | ||
215 | static struct ftrace_graph_ret_entry * | 215 | static struct ftrace_graph_ret_entry * |
diff --git a/kernel/trace/trace_hw_branches.c b/kernel/trace/trace_hw_branches.c index e3e7db61c067..0794dd33f27b 100644 --- a/kernel/trace/trace_hw_branches.c +++ b/kernel/trace/trace_hw_branches.c | |||
@@ -75,7 +75,7 @@ static void bts_trace_start(struct trace_array *tr) | |||
75 | } | 75 | } |
76 | 76 | ||
77 | /* | 77 | /* |
78 | * Start tracing on the current cpu. | 78 | * Stop tracing on the current cpu. |
79 | * The argument is ignored. | 79 | * The argument is ignored. |
80 | * | 80 | * |
81 | * pre: bts_tracer_mutex must be locked. | 81 | * pre: bts_tracer_mutex must be locked. |
diff --git a/kernel/trace/trace_sysprof.c b/kernel/trace/trace_sysprof.c index 84ca9d81e74d..7c9a2d82a7d8 100644 --- a/kernel/trace/trace_sysprof.c +++ b/kernel/trace/trace_sysprof.c | |||
@@ -88,7 +88,7 @@ static void backtrace_address(void *data, unsigned long addr, int reliable) | |||
88 | } | 88 | } |
89 | } | 89 | } |
90 | 90 | ||
91 | const static struct stacktrace_ops backtrace_ops = { | 91 | static const struct stacktrace_ops backtrace_ops = { |
92 | .warning = backtrace_warning, | 92 | .warning = backtrace_warning, |
93 | .warning_symbol = backtrace_warning_symbol, | 93 | .warning_symbol = backtrace_warning_symbol, |
94 | .stack = backtrace_stack, | 94 | .stack = backtrace_stack, |
@@ -238,6 +238,8 @@ static int stack_trace_init(struct trace_array *tr) | |||
238 | { | 238 | { |
239 | sysprof_trace = tr; | 239 | sysprof_trace = tr; |
240 | 240 | ||
241 | tracing_start_cmdline_record(); | ||
242 | |||
241 | mutex_lock(&sample_timer_lock); | 243 | mutex_lock(&sample_timer_lock); |
242 | start_stack_timers(); | 244 | start_stack_timers(); |
243 | tracer_enabled = 1; | 245 | tracer_enabled = 1; |
@@ -247,6 +249,7 @@ static int stack_trace_init(struct trace_array *tr) | |||
247 | 249 | ||
248 | static void stack_trace_reset(struct trace_array *tr) | 250 | static void stack_trace_reset(struct trace_array *tr) |
249 | { | 251 | { |
252 | tracing_stop_cmdline_record(); | ||
250 | stop_stack_trace(tr); | 253 | stop_stack_trace(tr); |
251 | } | 254 | } |
252 | 255 | ||
diff --git a/mm/fremap.c b/mm/fremap.c index 736ba7f3306a..b6ec85abbb39 100644 --- a/mm/fremap.c +++ b/mm/fremap.c | |||
@@ -198,7 +198,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, | |||
198 | flags &= MAP_NONBLOCK; | 198 | flags &= MAP_NONBLOCK; |
199 | get_file(file); | 199 | get_file(file); |
200 | addr = mmap_region(file, start, size, | 200 | addr = mmap_region(file, start, size, |
201 | flags, vma->vm_flags, pgoff, 1); | 201 | flags, vma->vm_flags, pgoff); |
202 | fput(file); | 202 | fput(file); |
203 | if (IS_ERR_VALUE(addr)) { | 203 | if (IS_ERR_VALUE(addr)) { |
204 | err = addr; | 204 | err = addr; |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 618e98304080..107da3d809a8 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -2269,12 +2269,18 @@ void hugetlb_change_protection(struct vm_area_struct *vma, | |||
2269 | 2269 | ||
2270 | int hugetlb_reserve_pages(struct inode *inode, | 2270 | int hugetlb_reserve_pages(struct inode *inode, |
2271 | long from, long to, | 2271 | long from, long to, |
2272 | struct vm_area_struct *vma) | 2272 | struct vm_area_struct *vma, |
2273 | int acctflag) | ||
2273 | { | 2274 | { |
2274 | long ret, chg; | 2275 | long ret, chg; |
2275 | struct hstate *h = hstate_inode(inode); | 2276 | struct hstate *h = hstate_inode(inode); |
2276 | 2277 | ||
2277 | if (vma && vma->vm_flags & VM_NORESERVE) | 2278 | /* |
2279 | * Only apply hugepage reservation if asked. At fault time, an | ||
2280 | * attempt will be made for VM_NORESERVE to allocate a page | ||
2281 | * and filesystem quota without using reserves | ||
2282 | */ | ||
2283 | if (acctflag & VM_NORESERVE) | ||
2278 | return 0; | 2284 | return 0; |
2279 | 2285 | ||
2280 | /* | 2286 | /* |
@@ -2299,13 +2305,31 @@ int hugetlb_reserve_pages(struct inode *inode, | |||
2299 | if (chg < 0) | 2305 | if (chg < 0) |
2300 | return chg; | 2306 | return chg; |
2301 | 2307 | ||
2308 | /* There must be enough filesystem quota for the mapping */ | ||
2302 | if (hugetlb_get_quota(inode->i_mapping, chg)) | 2309 | if (hugetlb_get_quota(inode->i_mapping, chg)) |
2303 | return -ENOSPC; | 2310 | return -ENOSPC; |
2311 | |||
2312 | /* | ||
2313 | * Check enough hugepages are available for the reservation. | ||
2314 | * Hand back the quota if there are not | ||
2315 | */ | ||
2304 | ret = hugetlb_acct_memory(h, chg); | 2316 | ret = hugetlb_acct_memory(h, chg); |
2305 | if (ret < 0) { | 2317 | if (ret < 0) { |
2306 | hugetlb_put_quota(inode->i_mapping, chg); | 2318 | hugetlb_put_quota(inode->i_mapping, chg); |
2307 | return ret; | 2319 | return ret; |
2308 | } | 2320 | } |
2321 | |||
2322 | /* | ||
2323 | * Account for the reservations made. Shared mappings record regions | ||
2324 | * that have reservations as they are shared by multiple VMAs. | ||
2325 | * When the last VMA disappears, the region map says how much | ||
2326 | * the reservation was and the page cache tells how much of | ||
2327 | * the reservation was consumed. Private mappings are per-VMA and | ||
2328 | * only the consumed reservations are tracked. When the VMA | ||
2329 | * disappears, the original reservation is the VMA size and the | ||
2330 | * consumed reservations are stored in the map. Hence, nothing | ||
2331 | * else has to be done for private mappings here | ||
2332 | */ | ||
2309 | if (!vma || vma->vm_flags & VM_SHARED) | 2333 | if (!vma || vma->vm_flags & VM_SHARED) |
2310 | region_add(&inode->i_mapping->private_list, from, to); | 2334 | region_add(&inode->i_mapping->private_list, from, to); |
2311 | return 0; | 2335 | return 0; |
diff --git a/mm/migrate.c b/mm/migrate.c index 2bb4e1d63520..a9eff3f092f6 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -1129,7 +1129,7 @@ int migrate_vmas(struct mm_struct *mm, const nodemask_t *to, | |||
1129 | struct vm_area_struct *vma; | 1129 | struct vm_area_struct *vma; |
1130 | int err = 0; | 1130 | int err = 0; |
1131 | 1131 | ||
1132 | for(vma = mm->mmap; vma->vm_next && !err; vma = vma->vm_next) { | 1132 | for (vma = mm->mmap; vma && !err; vma = vma->vm_next) { |
1133 | if (vma->vm_ops && vma->vm_ops->migrate) { | 1133 | if (vma->vm_ops && vma->vm_ops->migrate) { |
1134 | err = vma->vm_ops->migrate(vma, to, from, flags); | 1134 | err = vma->vm_ops->migrate(vma, to, from, flags); |
1135 | if (err) | 1135 | if (err) |
@@ -918,7 +918,6 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | |||
918 | struct inode *inode; | 918 | struct inode *inode; |
919 | unsigned int vm_flags; | 919 | unsigned int vm_flags; |
920 | int error; | 920 | int error; |
921 | int accountable = 1; | ||
922 | unsigned long reqprot = prot; | 921 | unsigned long reqprot = prot; |
923 | 922 | ||
924 | /* | 923 | /* |
@@ -1019,8 +1018,6 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | |||
1019 | return -EPERM; | 1018 | return -EPERM; |
1020 | vm_flags &= ~VM_MAYEXEC; | 1019 | vm_flags &= ~VM_MAYEXEC; |
1021 | } | 1020 | } |
1022 | if (is_file_hugepages(file)) | ||
1023 | accountable = 0; | ||
1024 | 1021 | ||
1025 | if (!file->f_op || !file->f_op->mmap) | 1022 | if (!file->f_op || !file->f_op->mmap) |
1026 | return -ENODEV; | 1023 | return -ENODEV; |
@@ -1053,8 +1050,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | |||
1053 | if (error) | 1050 | if (error) |
1054 | return error; | 1051 | return error; |
1055 | 1052 | ||
1056 | return mmap_region(file, addr, len, flags, vm_flags, pgoff, | 1053 | return mmap_region(file, addr, len, flags, vm_flags, pgoff); |
1057 | accountable); | ||
1058 | } | 1054 | } |
1059 | EXPORT_SYMBOL(do_mmap_pgoff); | 1055 | EXPORT_SYMBOL(do_mmap_pgoff); |
1060 | 1056 | ||
@@ -1092,17 +1088,23 @@ int vma_wants_writenotify(struct vm_area_struct *vma) | |||
1092 | 1088 | ||
1093 | /* | 1089 | /* |
1094 | * We account for memory if it's a private writeable mapping, | 1090 | * We account for memory if it's a private writeable mapping, |
1095 | * and VM_NORESERVE wasn't set. | 1091 | * not hugepages and VM_NORESERVE wasn't set. |
1096 | */ | 1092 | */ |
1097 | static inline int accountable_mapping(unsigned int vm_flags) | 1093 | static inline int accountable_mapping(struct file *file, unsigned int vm_flags) |
1098 | { | 1094 | { |
1095 | /* | ||
1096 | * hugetlb has its own accounting separate from the core VM | ||
1097 | * VM_HUGETLB may not be set yet so we cannot check for that flag. | ||
1098 | */ | ||
1099 | if (file && is_file_hugepages(file)) | ||
1100 | return 0; | ||
1101 | |||
1099 | return (vm_flags & (VM_NORESERVE | VM_SHARED | VM_WRITE)) == VM_WRITE; | 1102 | return (vm_flags & (VM_NORESERVE | VM_SHARED | VM_WRITE)) == VM_WRITE; |
1100 | } | 1103 | } |
1101 | 1104 | ||
1102 | unsigned long mmap_region(struct file *file, unsigned long addr, | 1105 | unsigned long mmap_region(struct file *file, unsigned long addr, |
1103 | unsigned long len, unsigned long flags, | 1106 | unsigned long len, unsigned long flags, |
1104 | unsigned int vm_flags, unsigned long pgoff, | 1107 | unsigned int vm_flags, unsigned long pgoff) |
1105 | int accountable) | ||
1106 | { | 1108 | { |
1107 | struct mm_struct *mm = current->mm; | 1109 | struct mm_struct *mm = current->mm; |
1108 | struct vm_area_struct *vma, *prev; | 1110 | struct vm_area_struct *vma, *prev; |
@@ -1128,18 +1130,22 @@ munmap_back: | |||
1128 | 1130 | ||
1129 | /* | 1131 | /* |
1130 | * Set 'VM_NORESERVE' if we should not account for the | 1132 | * Set 'VM_NORESERVE' if we should not account for the |
1131 | * memory use of this mapping. We only honor MAP_NORESERVE | 1133 | * memory use of this mapping. |
1132 | * if we're allowed to overcommit memory. | ||
1133 | */ | 1134 | */ |
1134 | if ((flags & MAP_NORESERVE) && sysctl_overcommit_memory != OVERCOMMIT_NEVER) | 1135 | if ((flags & MAP_NORESERVE)) { |
1135 | vm_flags |= VM_NORESERVE; | 1136 | /* We honor MAP_NORESERVE if allowed to overcommit */ |
1136 | if (!accountable) | 1137 | if (sysctl_overcommit_memory != OVERCOMMIT_NEVER) |
1137 | vm_flags |= VM_NORESERVE; | 1138 | vm_flags |= VM_NORESERVE; |
1139 | |||
1140 | /* hugetlb applies strict overcommit unless MAP_NORESERVE */ | ||
1141 | if (file && is_file_hugepages(file)) | ||
1142 | vm_flags |= VM_NORESERVE; | ||
1143 | } | ||
1138 | 1144 | ||
1139 | /* | 1145 | /* |
1140 | * Private writable mapping: check memory availability | 1146 | * Private writable mapping: check memory availability |
1141 | */ | 1147 | */ |
1142 | if (accountable_mapping(vm_flags)) { | 1148 | if (accountable_mapping(file, vm_flags)) { |
1143 | charged = len >> PAGE_SHIFT; | 1149 | charged = len >> PAGE_SHIFT; |
1144 | if (security_vm_enough_memory(charged)) | 1150 | if (security_vm_enough_memory(charged)) |
1145 | return -ENOMEM; | 1151 | return -ENOMEM; |
@@ -2078,12 +2084,8 @@ void exit_mmap(struct mm_struct *mm) | |||
2078 | unsigned long end; | 2084 | unsigned long end; |
2079 | 2085 | ||
2080 | /* mm's last user has gone, and its about to be pulled down */ | 2086 | /* mm's last user has gone, and its about to be pulled down */ |
2081 | arch_exit_mmap(mm); | ||
2082 | mmu_notifier_release(mm); | 2087 | mmu_notifier_release(mm); |
2083 | 2088 | ||
2084 | if (!mm->mmap) /* Can happen if dup_mmap() received an OOM */ | ||
2085 | return; | ||
2086 | |||
2087 | if (mm->locked_vm) { | 2089 | if (mm->locked_vm) { |
2088 | vma = mm->mmap; | 2090 | vma = mm->mmap; |
2089 | while (vma) { | 2091 | while (vma) { |
@@ -2092,7 +2094,13 @@ void exit_mmap(struct mm_struct *mm) | |||
2092 | vma = vma->vm_next; | 2094 | vma = vma->vm_next; |
2093 | } | 2095 | } |
2094 | } | 2096 | } |
2097 | |||
2098 | arch_exit_mmap(mm); | ||
2099 | |||
2095 | vma = mm->mmap; | 2100 | vma = mm->mmap; |
2101 | if (!vma) /* Can happen if dup_mmap() received an OOM */ | ||
2102 | return; | ||
2103 | |||
2096 | lru_add_drain(); | 2104 | lru_add_drain(); |
2097 | flush_cache_mm(mm); | 2105 | flush_cache_mm(mm); |
2098 | tlb = tlb_gather_mmu(mm, 1); | 2106 | tlb = tlb_gather_mmu(mm, 1); |
diff --git a/mm/mprotect.c b/mm/mprotect.c index abe2694e13f4..258197b76fb4 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c | |||
@@ -151,10 +151,11 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev, | |||
151 | /* | 151 | /* |
152 | * If we make a private mapping writable we increase our commit; | 152 | * If we make a private mapping writable we increase our commit; |
153 | * but (without finer accounting) cannot reduce our commit if we | 153 | * but (without finer accounting) cannot reduce our commit if we |
154 | * make it unwritable again. | 154 | * make it unwritable again. hugetlb mapping were accounted for |
155 | * even if read-only so there is no need to account for them here | ||
155 | */ | 156 | */ |
156 | if (newflags & VM_WRITE) { | 157 | if (newflags & VM_WRITE) { |
157 | if (!(oldflags & (VM_ACCOUNT|VM_WRITE| | 158 | if (!(oldflags & (VM_ACCOUNT|VM_WRITE|VM_HUGETLB| |
158 | VM_SHARED|VM_NORESERVE))) { | 159 | VM_SHARED|VM_NORESERVE))) { |
159 | charged = nrpages; | 160 | charged = nrpages; |
160 | if (security_vm_enough_memory(charged)) | 161 | if (security_vm_enough_memory(charged)) |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index dc32dae01e5f..3c84128596ba 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -209,7 +209,7 @@ int dirty_bytes_handler(struct ctl_table *table, int write, | |||
209 | struct file *filp, void __user *buffer, size_t *lenp, | 209 | struct file *filp, void __user *buffer, size_t *lenp, |
210 | loff_t *ppos) | 210 | loff_t *ppos) |
211 | { | 211 | { |
212 | int old_bytes = vm_dirty_bytes; | 212 | unsigned long old_bytes = vm_dirty_bytes; |
213 | int ret; | 213 | int ret; |
214 | 214 | ||
215 | ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos); | 215 | ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos); |
@@ -1051,20 +1051,23 @@ continue_unlock: | |||
1051 | } | 1051 | } |
1052 | } | 1052 | } |
1053 | 1053 | ||
1054 | if (nr_to_write > 0) | 1054 | if (nr_to_write > 0) { |
1055 | nr_to_write--; | 1055 | nr_to_write--; |
1056 | else if (wbc->sync_mode == WB_SYNC_NONE) { | 1056 | if (nr_to_write == 0 && |
1057 | /* | 1057 | wbc->sync_mode == WB_SYNC_NONE) { |
1058 | * We stop writing back only if we are not | 1058 | /* |
1059 | * doing integrity sync. In case of integrity | 1059 | * We stop writing back only if we are |
1060 | * sync we have to keep going because someone | 1060 | * not doing integrity sync. In case of |
1061 | * may be concurrently dirtying pages, and we | 1061 | * integrity sync we have to keep going |
1062 | * might have synced a lot of newly appeared | 1062 | * because someone may be concurrently |
1063 | * dirty pages, but have not synced all of the | 1063 | * dirtying pages, and we might have |
1064 | * old dirty pages. | 1064 | * synced a lot of newly appeared dirty |
1065 | */ | 1065 | * pages, but have not synced all of the |
1066 | done = 1; | 1066 | * old dirty pages. |
1067 | break; | 1067 | */ |
1068 | done = 1; | ||
1069 | break; | ||
1070 | } | ||
1068 | } | 1071 | } |
1069 | 1072 | ||
1070 | if (wbc->nonblocking && bdi_write_congested(bdi)) { | 1073 | if (wbc->nonblocking && bdi_write_congested(bdi)) { |
@@ -1076,7 +1079,7 @@ continue_unlock: | |||
1076 | pagevec_release(&pvec); | 1079 | pagevec_release(&pvec); |
1077 | cond_resched(); | 1080 | cond_resched(); |
1078 | } | 1081 | } |
1079 | if (!cycled) { | 1082 | if (!cycled && !done) { |
1080 | /* | 1083 | /* |
1081 | * range_cyclic: | 1084 | * range_cyclic: |
1082 | * We hit the last page and there is more work to be done: wrap | 1085 | * We hit the last page and there is more work to be done: wrap |
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c index 7006a11350c8..ceecfbb143fa 100644 --- a/mm/page_cgroup.c +++ b/mm/page_cgroup.c | |||
@@ -114,7 +114,8 @@ static int __init_refok init_section_page_cgroup(unsigned long pfn) | |||
114 | nid = page_to_nid(pfn_to_page(pfn)); | 114 | nid = page_to_nid(pfn_to_page(pfn)); |
115 | table_size = sizeof(struct page_cgroup) * PAGES_PER_SECTION; | 115 | table_size = sizeof(struct page_cgroup) * PAGES_PER_SECTION; |
116 | if (slab_is_available()) { | 116 | if (slab_is_available()) { |
117 | base = kmalloc_node(table_size, GFP_KERNEL, nid); | 117 | base = kmalloc_node(table_size, |
118 | GFP_KERNEL | __GFP_NOWARN, nid); | ||
118 | if (!base) | 119 | if (!base) |
119 | base = vmalloc_node(table_size, nid); | 120 | base = vmalloc_node(table_size, nid); |
120 | } else { | 121 | } else { |
@@ -1072,7 +1072,8 @@ static int try_to_unmap_file(struct page *page, int unlock, int migration) | |||
1072 | spin_lock(&mapping->i_mmap_lock); | 1072 | spin_lock(&mapping->i_mmap_lock); |
1073 | vma_prio_tree_foreach(vma, &iter, &mapping->i_mmap, pgoff, pgoff) { | 1073 | vma_prio_tree_foreach(vma, &iter, &mapping->i_mmap, pgoff, pgoff) { |
1074 | if (MLOCK_PAGES && unlikely(unlock)) { | 1074 | if (MLOCK_PAGES && unlikely(unlock)) { |
1075 | if (!(vma->vm_flags & VM_LOCKED)) | 1075 | if (!((vma->vm_flags & VM_LOCKED) && |
1076 | page_mapped_in_vma(page, vma))) | ||
1076 | continue; /* must visit all vmas */ | 1077 | continue; /* must visit all vmas */ |
1077 | ret = SWAP_MLOCK; | 1078 | ret = SWAP_MLOCK; |
1078 | } else { | 1079 | } else { |
@@ -4514,3 +4514,4 @@ size_t ksize(const void *objp) | |||
4514 | 4514 | ||
4515 | return obj_size(virt_to_cache(objp)); | 4515 | return obj_size(virt_to_cache(objp)); |
4516 | } | 4516 | } |
4517 | EXPORT_SYMBOL(ksize); | ||
@@ -535,6 +535,7 @@ size_t ksize(const void *block) | |||
535 | } else | 535 | } else |
536 | return sp->page.private; | 536 | return sp->page.private; |
537 | } | 537 | } |
538 | EXPORT_SYMBOL(ksize); | ||
538 | 539 | ||
539 | struct kmem_cache { | 540 | struct kmem_cache { |
540 | unsigned int size, align; | 541 | unsigned int size, align; |
@@ -2787,6 +2787,7 @@ size_t ksize(const void *object) | |||
2787 | */ | 2787 | */ |
2788 | return s->size; | 2788 | return s->size; |
2789 | } | 2789 | } |
2790 | EXPORT_SYMBOL(ksize); | ||
2790 | 2791 | ||
2791 | void kfree(const void *x) | 2792 | void kfree(const void *x) |
2792 | { | 2793 | { |
diff --git a/net/9p/protocol.c b/net/9p/protocol.c index dcd7666824ba..fc70147c771e 100644 --- a/net/9p/protocol.c +++ b/net/9p/protocol.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
30 | #include <linux/uaccess.h> | 30 | #include <linux/uaccess.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <linux/types.h> | ||
32 | #include <net/9p/9p.h> | 33 | #include <net/9p/9p.h> |
33 | #include <net/9p/client.h> | 34 | #include <net/9p/client.h> |
34 | #include "protocol.h" | 35 | #include "protocol.h" |
@@ -160,29 +161,32 @@ p9pdu_vreadf(struct p9_fcall *pdu, int optional, const char *fmt, va_list ap) | |||
160 | break; | 161 | break; |
161 | case 'w':{ | 162 | case 'w':{ |
162 | int16_t *val = va_arg(ap, int16_t *); | 163 | int16_t *val = va_arg(ap, int16_t *); |
163 | if (pdu_read(pdu, val, sizeof(*val))) { | 164 | __le16 le_val; |
165 | if (pdu_read(pdu, &le_val, sizeof(le_val))) { | ||
164 | errcode = -EFAULT; | 166 | errcode = -EFAULT; |
165 | break; | 167 | break; |
166 | } | 168 | } |
167 | *val = cpu_to_le16(*val); | 169 | *val = le16_to_cpu(le_val); |
168 | } | 170 | } |
169 | break; | 171 | break; |
170 | case 'd':{ | 172 | case 'd':{ |
171 | int32_t *val = va_arg(ap, int32_t *); | 173 | int32_t *val = va_arg(ap, int32_t *); |
172 | if (pdu_read(pdu, val, sizeof(*val))) { | 174 | __le32 le_val; |
175 | if (pdu_read(pdu, &le_val, sizeof(le_val))) { | ||
173 | errcode = -EFAULT; | 176 | errcode = -EFAULT; |
174 | break; | 177 | break; |
175 | } | 178 | } |
176 | *val = cpu_to_le32(*val); | 179 | *val = le32_to_cpu(le_val); |
177 | } | 180 | } |
178 | break; | 181 | break; |
179 | case 'q':{ | 182 | case 'q':{ |
180 | int64_t *val = va_arg(ap, int64_t *); | 183 | int64_t *val = va_arg(ap, int64_t *); |
181 | if (pdu_read(pdu, val, sizeof(*val))) { | 184 | __le64 le_val; |
185 | if (pdu_read(pdu, &le_val, sizeof(le_val))) { | ||
182 | errcode = -EFAULT; | 186 | errcode = -EFAULT; |
183 | break; | 187 | break; |
184 | } | 188 | } |
185 | *val = cpu_to_le64(*val); | 189 | *val = le64_to_cpu(le_val); |
186 | } | 190 | } |
187 | break; | 191 | break; |
188 | case 's':{ | 192 | case 's':{ |
@@ -362,19 +366,19 @@ p9pdu_vwritef(struct p9_fcall *pdu, int optional, const char *fmt, va_list ap) | |||
362 | } | 366 | } |
363 | break; | 367 | break; |
364 | case 'w':{ | 368 | case 'w':{ |
365 | int16_t val = va_arg(ap, int); | 369 | __le16 val = cpu_to_le16(va_arg(ap, int)); |
366 | if (pdu_write(pdu, &val, sizeof(val))) | 370 | if (pdu_write(pdu, &val, sizeof(val))) |
367 | errcode = -EFAULT; | 371 | errcode = -EFAULT; |
368 | } | 372 | } |
369 | break; | 373 | break; |
370 | case 'd':{ | 374 | case 'd':{ |
371 | int32_t val = va_arg(ap, int32_t); | 375 | __le32 val = cpu_to_le32(va_arg(ap, int32_t)); |
372 | if (pdu_write(pdu, &val, sizeof(val))) | 376 | if (pdu_write(pdu, &val, sizeof(val))) |
373 | errcode = -EFAULT; | 377 | errcode = -EFAULT; |
374 | } | 378 | } |
375 | break; | 379 | break; |
376 | case 'q':{ | 380 | case 'q':{ |
377 | int64_t val = va_arg(ap, int64_t); | 381 | __le64 val = cpu_to_le64(va_arg(ap, int64_t)); |
378 | if (pdu_write(pdu, &val, sizeof(val))) | 382 | if (pdu_write(pdu, &val, sizeof(val))) |
379 | errcode = -EFAULT; | 383 | errcode = -EFAULT; |
380 | } | 384 | } |
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c index bdd9ccea17ce..d2c27c808d3b 100644 --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c | |||
@@ -67,6 +67,11 @@ static void __br_forward(const struct net_bridge_port *to, struct sk_buff *skb) | |||
67 | { | 67 | { |
68 | struct net_device *indev; | 68 | struct net_device *indev; |
69 | 69 | ||
70 | if (skb_warn_if_lro(skb)) { | ||
71 | kfree_skb(skb); | ||
72 | return; | ||
73 | } | ||
74 | |||
70 | indev = skb->dev; | 75 | indev = skb->dev; |
71 | skb->dev = to->dev; | 76 | skb->dev = to->dev; |
72 | skb_forward_csum(skb); | 77 | skb_forward_csum(skb); |
@@ -89,7 +94,7 @@ void br_deliver(const struct net_bridge_port *to, struct sk_buff *skb) | |||
89 | /* called with rcu_read_lock */ | 94 | /* called with rcu_read_lock */ |
90 | void br_forward(const struct net_bridge_port *to, struct sk_buff *skb) | 95 | void br_forward(const struct net_bridge_port *to, struct sk_buff *skb) |
91 | { | 96 | { |
92 | if (!skb_warn_if_lro(skb) && should_deliver(to, skb)) { | 97 | if (should_deliver(to, skb)) { |
93 | __br_forward(to, skb); | 98 | __br_forward(to, skb); |
94 | return; | 99 | return; |
95 | } | 100 | } |
diff --git a/net/core/dev.c b/net/core/dev.c index 5379b0c1190a..a17e00662363 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1090,7 +1090,7 @@ int dev_open(struct net_device *dev) | |||
1090 | /* | 1090 | /* |
1091 | * Enable NET_DMA | 1091 | * Enable NET_DMA |
1092 | */ | 1092 | */ |
1093 | dmaengine_get(); | 1093 | net_dmaengine_get(); |
1094 | 1094 | ||
1095 | /* | 1095 | /* |
1096 | * Initialize multicasting status | 1096 | * Initialize multicasting status |
@@ -1172,7 +1172,7 @@ int dev_close(struct net_device *dev) | |||
1172 | /* | 1172 | /* |
1173 | * Shutdown NET_DMA | 1173 | * Shutdown NET_DMA |
1174 | */ | 1174 | */ |
1175 | dmaengine_put(); | 1175 | net_dmaengine_put(); |
1176 | 1176 | ||
1177 | return 0; | 1177 | return 0; |
1178 | } | 1178 | } |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index f66c58df8953..278a142d1047 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1994,8 +1994,8 @@ static int neightbl_dump_info(struct sk_buff *skb, struct netlink_callback *cb) | |||
1994 | if (!net_eq(neigh_parms_net(p), net)) | 1994 | if (!net_eq(neigh_parms_net(p), net)) |
1995 | continue; | 1995 | continue; |
1996 | 1996 | ||
1997 | if (nidx++ < neigh_skip) | 1997 | if (nidx < neigh_skip) |
1998 | continue; | 1998 | goto next; |
1999 | 1999 | ||
2000 | if (neightbl_fill_param_info(skb, tbl, p, | 2000 | if (neightbl_fill_param_info(skb, tbl, p, |
2001 | NETLINK_CB(cb->skb).pid, | 2001 | NETLINK_CB(cb->skb).pid, |
@@ -2003,6 +2003,8 @@ static int neightbl_dump_info(struct sk_buff *skb, struct netlink_callback *cb) | |||
2003 | RTM_NEWNEIGHTBL, | 2003 | RTM_NEWNEIGHTBL, |
2004 | NLM_F_MULTI) <= 0) | 2004 | NLM_F_MULTI) <= 0) |
2005 | goto out; | 2005 | goto out; |
2006 | next: | ||
2007 | nidx++; | ||
2006 | } | 2008 | } |
2007 | 2009 | ||
2008 | neigh_skip = 0; | 2010 | neigh_skip = 0; |
@@ -2082,12 +2084,10 @@ static int neigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb, | |||
2082 | if (h > s_h) | 2084 | if (h > s_h) |
2083 | s_idx = 0; | 2085 | s_idx = 0; |
2084 | for (n = tbl->hash_buckets[h], idx = 0; n; n = n->next) { | 2086 | for (n = tbl->hash_buckets[h], idx = 0; n; n = n->next) { |
2085 | int lidx; | ||
2086 | if (dev_net(n->dev) != net) | 2087 | if (dev_net(n->dev) != net) |
2087 | continue; | 2088 | continue; |
2088 | lidx = idx++; | 2089 | if (idx < s_idx) |
2089 | if (lidx < s_idx) | 2090 | goto next; |
2090 | continue; | ||
2091 | if (neigh_fill_info(skb, n, NETLINK_CB(cb->skb).pid, | 2091 | if (neigh_fill_info(skb, n, NETLINK_CB(cb->skb).pid, |
2092 | cb->nlh->nlmsg_seq, | 2092 | cb->nlh->nlmsg_seq, |
2093 | RTM_NEWNEIGH, | 2093 | RTM_NEWNEIGH, |
@@ -2096,6 +2096,8 @@ static int neigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb, | |||
2096 | rc = -1; | 2096 | rc = -1; |
2097 | goto out; | 2097 | goto out; |
2098 | } | 2098 | } |
2099 | next: | ||
2100 | idx++; | ||
2099 | } | 2101 | } |
2100 | } | 2102 | } |
2101 | read_unlock_bh(&tbl->lock); | 2103 | read_unlock_bh(&tbl->lock); |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index cc3a0a06c004..c47c989cb1fb 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1234,8 +1234,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, | |||
1234 | struct udphdr *uh; | 1234 | struct udphdr *uh; |
1235 | unsigned short ulen; | 1235 | unsigned short ulen; |
1236 | struct rtable *rt = (struct rtable*)skb->dst; | 1236 | struct rtable *rt = (struct rtable*)skb->dst; |
1237 | __be32 saddr = ip_hdr(skb)->saddr; | 1237 | __be32 saddr, daddr; |
1238 | __be32 daddr = ip_hdr(skb)->daddr; | ||
1239 | struct net *net = dev_net(skb->dev); | 1238 | struct net *net = dev_net(skb->dev); |
1240 | 1239 | ||
1241 | /* | 1240 | /* |
@@ -1259,6 +1258,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, | |||
1259 | if (udp4_csum_init(skb, uh, proto)) | 1258 | if (udp4_csum_init(skb, uh, proto)) |
1260 | goto csum_error; | 1259 | goto csum_error; |
1261 | 1260 | ||
1261 | saddr = ip_hdr(skb)->saddr; | ||
1262 | daddr = ip_hdr(skb)->daddr; | ||
1263 | |||
1262 | if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST)) | 1264 | if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST)) |
1263 | return __udp4_lib_mcast_deliver(net, skb, uh, | 1265 | return __udp4_lib_mcast_deliver(net, skb, uh, |
1264 | saddr, daddr, udptable); | 1266 | saddr, daddr, udptable); |
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index c62dd247774f..7712578bdc66 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
@@ -323,17 +323,21 @@ static struct ip6_flowlabel * | |||
323 | fl_create(struct net *net, struct in6_flowlabel_req *freq, char __user *optval, | 323 | fl_create(struct net *net, struct in6_flowlabel_req *freq, char __user *optval, |
324 | int optlen, int *err_p) | 324 | int optlen, int *err_p) |
325 | { | 325 | { |
326 | struct ip6_flowlabel *fl; | 326 | struct ip6_flowlabel *fl = NULL; |
327 | int olen; | 327 | int olen; |
328 | int addr_type; | 328 | int addr_type; |
329 | int err; | 329 | int err; |
330 | 330 | ||
331 | olen = optlen - CMSG_ALIGN(sizeof(*freq)); | ||
332 | err = -EINVAL; | ||
333 | if (olen > 64 * 1024) | ||
334 | goto done; | ||
335 | |||
331 | err = -ENOMEM; | 336 | err = -ENOMEM; |
332 | fl = kzalloc(sizeof(*fl), GFP_KERNEL); | 337 | fl = kzalloc(sizeof(*fl), GFP_KERNEL); |
333 | if (fl == NULL) | 338 | if (fl == NULL) |
334 | goto done; | 339 | goto done; |
335 | 340 | ||
336 | olen = optlen - CMSG_ALIGN(sizeof(*freq)); | ||
337 | if (olen > 0) { | 341 | if (olen > 0) { |
338 | struct msghdr msg; | 342 | struct msghdr msg; |
339 | struct flowi flowi; | 343 | struct flowi flowi; |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 58e2b0d93758..d994c55a5b16 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -249,8 +249,8 @@ static struct ip6_tnl *ip6_tnl_create(struct net *net, struct ip6_tnl_parm *p) | |||
249 | } | 249 | } |
250 | 250 | ||
251 | t = netdev_priv(dev); | 251 | t = netdev_priv(dev); |
252 | ip6_tnl_dev_init(dev); | ||
253 | t->parms = *p; | 252 | t->parms = *p; |
253 | ip6_tnl_dev_init(dev); | ||
254 | 254 | ||
255 | if ((err = register_netdevice(dev)) < 0) | 255 | if ((err = register_netdevice(dev)) < 0) |
256 | goto failed_free; | 256 | goto failed_free; |
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c index c455cf4ee756..c323643ffcf9 100644 --- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c +++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | |||
@@ -49,8 +49,19 @@ static bool icmpv6_pkt_to_tuple(const struct sk_buff *skb, | |||
49 | static const u_int8_t invmap[] = { | 49 | static const u_int8_t invmap[] = { |
50 | [ICMPV6_ECHO_REQUEST - 128] = ICMPV6_ECHO_REPLY + 1, | 50 | [ICMPV6_ECHO_REQUEST - 128] = ICMPV6_ECHO_REPLY + 1, |
51 | [ICMPV6_ECHO_REPLY - 128] = ICMPV6_ECHO_REQUEST + 1, | 51 | [ICMPV6_ECHO_REPLY - 128] = ICMPV6_ECHO_REQUEST + 1, |
52 | [ICMPV6_NI_QUERY - 128] = ICMPV6_NI_QUERY + 1, | 52 | [ICMPV6_NI_QUERY - 128] = ICMPV6_NI_REPLY + 1, |
53 | [ICMPV6_NI_REPLY - 128] = ICMPV6_NI_REPLY +1 | 53 | [ICMPV6_NI_REPLY - 128] = ICMPV6_NI_QUERY +1 |
54 | }; | ||
55 | |||
56 | static const u_int8_t noct_valid_new[] = { | ||
57 | [ICMPV6_MGM_QUERY - 130] = 1, | ||
58 | [ICMPV6_MGM_REPORT -130] = 1, | ||
59 | [ICMPV6_MGM_REDUCTION - 130] = 1, | ||
60 | [NDISC_ROUTER_SOLICITATION - 130] = 1, | ||
61 | [NDISC_ROUTER_ADVERTISEMENT - 130] = 1, | ||
62 | [NDISC_NEIGHBOUR_SOLICITATION - 130] = 1, | ||
63 | [NDISC_NEIGHBOUR_ADVERTISEMENT - 130] = 1, | ||
64 | [ICMPV6_MLD2_REPORT - 130] = 1 | ||
54 | }; | 65 | }; |
55 | 66 | ||
56 | static bool icmpv6_invert_tuple(struct nf_conntrack_tuple *tuple, | 67 | static bool icmpv6_invert_tuple(struct nf_conntrack_tuple *tuple, |
@@ -178,6 +189,7 @@ icmpv6_error(struct net *net, struct sk_buff *skb, unsigned int dataoff, | |||
178 | { | 189 | { |
179 | const struct icmp6hdr *icmp6h; | 190 | const struct icmp6hdr *icmp6h; |
180 | struct icmp6hdr _ih; | 191 | struct icmp6hdr _ih; |
192 | int type; | ||
181 | 193 | ||
182 | icmp6h = skb_header_pointer(skb, dataoff, sizeof(_ih), &_ih); | 194 | icmp6h = skb_header_pointer(skb, dataoff, sizeof(_ih), &_ih); |
183 | if (icmp6h == NULL) { | 195 | if (icmp6h == NULL) { |
@@ -194,6 +206,15 @@ icmpv6_error(struct net *net, struct sk_buff *skb, unsigned int dataoff, | |||
194 | return -NF_ACCEPT; | 206 | return -NF_ACCEPT; |
195 | } | 207 | } |
196 | 208 | ||
209 | type = icmp6h->icmp6_type - 130; | ||
210 | if (type >= 0 && type < sizeof(noct_valid_new) && | ||
211 | noct_valid_new[type]) { | ||
212 | skb->nfct = &nf_conntrack_untracked.ct_general; | ||
213 | skb->nfctinfo = IP_CT_NEW; | ||
214 | nf_conntrack_get(skb->nfct); | ||
215 | return NF_ACCEPT; | ||
216 | } | ||
217 | |||
197 | /* is not error message ? */ | 218 | /* is not error message ? */ |
198 | if (icmp6h->icmp6_type >= 128) | 219 | if (icmp6h->icmp6_type >= 128) |
199 | return NF_ACCEPT; | 220 | return NF_ACCEPT; |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index c32a7e8e3a1b..cb78aa00399e 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -434,7 +434,7 @@ static int ctnetlink_conntrack_event(struct notifier_block *this, | |||
434 | } else | 434 | } else |
435 | return NOTIFY_DONE; | 435 | return NOTIFY_DONE; |
436 | 436 | ||
437 | if (!nfnetlink_has_listeners(group)) | 437 | if (!item->report && !nfnetlink_has_listeners(group)) |
438 | return NOTIFY_DONE; | 438 | return NOTIFY_DONE; |
439 | 439 | ||
440 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC); | 440 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC); |
@@ -1215,6 +1215,16 @@ ctnetlink_create_conntrack(struct nlattr *cda[], | |||
1215 | } | 1215 | } |
1216 | } | 1216 | } |
1217 | 1217 | ||
1218 | #ifdef CONFIG_NF_NAT_NEEDED | ||
1219 | if (cda[CTA_NAT_SEQ_ADJ_ORIG] || cda[CTA_NAT_SEQ_ADJ_REPLY]) { | ||
1220 | err = ctnetlink_change_nat_seq_adj(ct, cda); | ||
1221 | if (err < 0) { | ||
1222 | rcu_read_unlock(); | ||
1223 | goto err; | ||
1224 | } | ||
1225 | } | ||
1226 | #endif | ||
1227 | |||
1218 | if (cda[CTA_PROTOINFO]) { | 1228 | if (cda[CTA_PROTOINFO]) { |
1219 | err = ctnetlink_change_protoinfo(ct, cda); | 1229 | err = ctnetlink_change_protoinfo(ct, cda); |
1220 | if (err < 0) { | 1230 | if (err < 0) { |
@@ -1492,7 +1502,8 @@ static int ctnetlink_expect_event(struct notifier_block *this, | |||
1492 | } else | 1502 | } else |
1493 | return NOTIFY_DONE; | 1503 | return NOTIFY_DONE; |
1494 | 1504 | ||
1495 | if (!nfnetlink_has_listeners(NFNLGRP_CONNTRACK_EXP_NEW)) | 1505 | if (!item->report && |
1506 | !nfnetlink_has_listeners(NFNLGRP_CONNTRACK_EXP_NEW)) | ||
1496 | return NOTIFY_DONE; | 1507 | return NOTIFY_DONE; |
1497 | 1508 | ||
1498 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC); | 1509 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC); |
diff --git a/net/netfilter/xt_sctp.c b/net/netfilter/xt_sctp.c index e223cb43ae8e..a189ada9128f 100644 --- a/net/netfilter/xt_sctp.c +++ b/net/netfilter/xt_sctp.c | |||
@@ -105,7 +105,7 @@ match_packet(const struct sk_buff *skb, | |||
105 | 105 | ||
106 | switch (chunk_match_type) { | 106 | switch (chunk_match_type) { |
107 | case SCTP_CHUNK_MATCH_ALL: | 107 | case SCTP_CHUNK_MATCH_ALL: |
108 | return SCTP_CHUNKMAP_IS_CLEAR(info->chunkmap); | 108 | return SCTP_CHUNKMAP_IS_CLEAR(chunkmapcopy); |
109 | case SCTP_CHUNK_MATCH_ANY: | 109 | case SCTP_CHUNK_MATCH_ANY: |
110 | return false; | 110 | return false; |
111 | case SCTP_CHUNK_MATCH_ONLY: | 111 | case SCTP_CHUNK_MATCH_ONLY: |
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index d7d2bed7a699..eac5e7bb7365 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c | |||
@@ -284,13 +284,13 @@ struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *sock, | |||
284 | if (IS_ERR(trans)) { | 284 | if (IS_ERR(trans)) { |
285 | call = ERR_CAST(trans); | 285 | call = ERR_CAST(trans); |
286 | trans = NULL; | 286 | trans = NULL; |
287 | goto out; | 287 | goto out_notrans; |
288 | } | 288 | } |
289 | } else { | 289 | } else { |
290 | trans = rx->trans; | 290 | trans = rx->trans; |
291 | if (!trans) { | 291 | if (!trans) { |
292 | call = ERR_PTR(-ENOTCONN); | 292 | call = ERR_PTR(-ENOTCONN); |
293 | goto out; | 293 | goto out_notrans; |
294 | } | 294 | } |
295 | atomic_inc(&trans->usage); | 295 | atomic_inc(&trans->usage); |
296 | } | 296 | } |
@@ -315,6 +315,7 @@ struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *sock, | |||
315 | rxrpc_put_bundle(trans, bundle); | 315 | rxrpc_put_bundle(trans, bundle); |
316 | out: | 316 | out: |
317 | rxrpc_put_transport(trans); | 317 | rxrpc_put_transport(trans); |
318 | out_notrans: | ||
318 | release_sock(&rx->sk); | 319 | release_sock(&rx->sk); |
319 | _leave(" = %p", call); | 320 | _leave(" = %p", call); |
320 | return call; | 321 | return call; |
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 8bb83a100edb..0f11870116dc 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -1827,6 +1827,40 @@ sub reset_state { | |||
1827 | $state = 0; | 1827 | $state = 0; |
1828 | } | 1828 | } |
1829 | 1829 | ||
1830 | sub syscall_munge() { | ||
1831 | my $void = 0; | ||
1832 | |||
1833 | $prototype =~ s@[\r\n\t]+@ @gos; # strip newlines/CR's/tabs | ||
1834 | ## if ($prototype =~ m/SYSCALL_DEFINE0\s*\(\s*(a-zA-Z0-9_)*\s*\)/) { | ||
1835 | if ($prototype =~ m/SYSCALL_DEFINE0/) { | ||
1836 | $void = 1; | ||
1837 | ## $prototype = "long sys_$1(void)"; | ||
1838 | } | ||
1839 | |||
1840 | $prototype =~ s/SYSCALL_DEFINE.*\(/long sys_/; # fix return type & func name | ||
1841 | if ($prototype =~ m/long (sys_.*?),/) { | ||
1842 | $prototype =~ s/,/\(/; | ||
1843 | } elsif ($void) { | ||
1844 | $prototype =~ s/\)/\(void\)/; | ||
1845 | } | ||
1846 | |||
1847 | # now delete all of the odd-number commas in $prototype | ||
1848 | # so that arg types & arg names don't have a comma between them | ||
1849 | my $count = 0; | ||
1850 | my $len = length($prototype); | ||
1851 | if ($void) { | ||
1852 | $len = 0; # skip the for-loop | ||
1853 | } | ||
1854 | for (my $ix = 0; $ix < $len; $ix++) { | ||
1855 | if (substr($prototype, $ix, 1) eq ',') { | ||
1856 | $count++; | ||
1857 | if ($count % 2 == 1) { | ||
1858 | substr($prototype, $ix, 1) = ' '; | ||
1859 | } | ||
1860 | } | ||
1861 | } | ||
1862 | } | ||
1863 | |||
1830 | sub process_state3_function($$) { | 1864 | sub process_state3_function($$) { |
1831 | my $x = shift; | 1865 | my $x = shift; |
1832 | my $file = shift; | 1866 | my $file = shift; |
@@ -1839,11 +1873,15 @@ sub process_state3_function($$) { | |||
1839 | elsif ($x =~ /([^\{]*)/) { | 1873 | elsif ($x =~ /([^\{]*)/) { |
1840 | $prototype .= $1; | 1874 | $prototype .= $1; |
1841 | } | 1875 | } |
1876 | |||
1842 | if (($x =~ /\{/) || ($x =~ /\#\s*define/) || ($x =~ /;/)) { | 1877 | if (($x =~ /\{/) || ($x =~ /\#\s*define/) || ($x =~ /;/)) { |
1843 | $prototype =~ s@/\*.*?\*/@@gos; # strip comments. | 1878 | $prototype =~ s@/\*.*?\*/@@gos; # strip comments. |
1844 | $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's. | 1879 | $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's. |
1845 | $prototype =~ s@^\s+@@gos; # strip leading spaces | 1880 | $prototype =~ s@^\s+@@gos; # strip leading spaces |
1846 | dump_function($prototype,$file); | 1881 | if ($prototype =~ /SYSCALL_DEFINE/) { |
1882 | syscall_munge(); | ||
1883 | } | ||
1884 | dump_function($prototype, $file); | ||
1847 | reset_state(); | 1885 | reset_state(); |
1848 | } | 1886 | } |
1849 | } | 1887 | } |
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 89096e811a4b..772901e41ecb 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
@@ -90,7 +90,7 @@ static void aaci_ac97_write(struct snd_ac97 *ac97, unsigned short reg, | |||
90 | */ | 90 | */ |
91 | do { | 91 | do { |
92 | v = readl(aaci->base + AACI_SLFR); | 92 | v = readl(aaci->base + AACI_SLFR); |
93 | } while ((v & (SLFR_1TXB|SLFR_2TXB)) && timeout--); | 93 | } while ((v & (SLFR_1TXB|SLFR_2TXB)) && --timeout); |
94 | 94 | ||
95 | if (!timeout) | 95 | if (!timeout) |
96 | dev_err(&aaci->dev->dev, | 96 | dev_err(&aaci->dev->dev, |
@@ -126,7 +126,7 @@ static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg) | |||
126 | */ | 126 | */ |
127 | do { | 127 | do { |
128 | v = readl(aaci->base + AACI_SLFR); | 128 | v = readl(aaci->base + AACI_SLFR); |
129 | } while ((v & SLFR_1TXB) && timeout--); | 129 | } while ((v & SLFR_1TXB) && --timeout); |
130 | 130 | ||
131 | if (!timeout) { | 131 | if (!timeout) { |
132 | dev_err(&aaci->dev->dev, "timeout on slot 1 TX busy\n"); | 132 | dev_err(&aaci->dev->dev, "timeout on slot 1 TX busy\n"); |
@@ -147,7 +147,7 @@ static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg) | |||
147 | do { | 147 | do { |
148 | cond_resched(); | 148 | cond_resched(); |
149 | v = readl(aaci->base + AACI_SLFR) & (SLFR_1RXV|SLFR_2RXV); | 149 | v = readl(aaci->base + AACI_SLFR) & (SLFR_1RXV|SLFR_2RXV); |
150 | } while ((v != (SLFR_1RXV|SLFR_2RXV)) && timeout--); | 150 | } while ((v != (SLFR_1RXV|SLFR_2RXV)) && --timeout); |
151 | 151 | ||
152 | if (!timeout) { | 152 | if (!timeout) { |
153 | dev_err(&aaci->dev->dev, "timeout on RX valid\n"); | 153 | dev_err(&aaci->dev->dev, "timeout on RX valid\n"); |