diff options
Diffstat (limited to 'arch')
99 files changed, 430 insertions, 293 deletions
diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index d290845aef59..6f7feb5db271 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c | |||
| @@ -48,7 +48,7 @@ SYSCALL_DEFINE2(osf_sigprocmask, int, how, unsigned long, newmask) | |||
| 48 | sigset_t mask; | 48 | sigset_t mask; |
| 49 | unsigned long res; | 49 | unsigned long res; |
| 50 | 50 | ||
| 51 | siginitset(&mask, newmask & ~_BLOCKABLE); | 51 | siginitset(&mask, newmask & _BLOCKABLE); |
| 52 | res = sigprocmask(how, &mask, &oldmask); | 52 | res = sigprocmask(how, &mask, &oldmask); |
| 53 | if (!res) { | 53 | if (!res) { |
| 54 | force_successful_syscall_return(); | 54 | force_successful_syscall_return(); |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 88c97bc7a6f5..9c26ba7244fb 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -1101,6 +1101,20 @@ config ARM_ERRATA_720789 | |||
| 1101 | invalidated are not, resulting in an incoherency in the system page | 1101 | invalidated are not, resulting in an incoherency in the system page |
| 1102 | tables. The workaround changes the TLB flushing routines to invalidate | 1102 | tables. The workaround changes the TLB flushing routines to invalidate |
| 1103 | entries regardless of the ASID. | 1103 | entries regardless of the ASID. |
| 1104 | |||
| 1105 | config ARM_ERRATA_743622 | ||
| 1106 | bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption" | ||
| 1107 | depends on CPU_V7 | ||
| 1108 | help | ||
| 1109 | This option enables the workaround for the 743622 Cortex-A9 | ||
| 1110 | (r2p0..r2p2) erratum. Under very rare conditions, a faulty | ||
| 1111 | optimisation in the Cortex-A9 Store Buffer may lead to data | ||
| 1112 | corruption. This workaround sets a specific bit in the diagnostic | ||
| 1113 | register of the Cortex-A9 which disables the Store Buffer | ||
| 1114 | optimisation, preventing the defect from occurring. This has no | ||
| 1115 | visible impact on the overall performance or power consumption of the | ||
| 1116 | processor. | ||
| 1117 | |||
| 1104 | endmenu | 1118 | endmenu |
| 1105 | 1119 | ||
| 1106 | source "arch/arm/common/Kconfig" | 1120 | source "arch/arm/common/Kconfig" |
diff --git a/arch/arm/kernel/kprobes-decode.c b/arch/arm/kernel/kprobes-decode.c index 8bccbfa693ff..2c1f0050c9c4 100644 --- a/arch/arm/kernel/kprobes-decode.c +++ b/arch/arm/kernel/kprobes-decode.c | |||
| @@ -1162,11 +1162,12 @@ space_cccc_001x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
| 1162 | { | 1162 | { |
| 1163 | /* | 1163 | /* |
| 1164 | * MSR : cccc 0011 0x10 xxxx xxxx xxxx xxxx xxxx | 1164 | * MSR : cccc 0011 0x10 xxxx xxxx xxxx xxxx xxxx |
| 1165 | * Undef : cccc 0011 0x00 xxxx xxxx xxxx xxxx xxxx | 1165 | * Undef : cccc 0011 0100 xxxx xxxx xxxx xxxx xxxx |
| 1166 | * ALU op with S bit and Rd == 15 : | 1166 | * ALU op with S bit and Rd == 15 : |
| 1167 | * cccc 001x xxx1 xxxx 1111 xxxx xxxx xxxx | 1167 | * cccc 001x xxx1 xxxx 1111 xxxx xxxx xxxx |
| 1168 | */ | 1168 | */ |
| 1169 | if ((insn & 0x0f900000) == 0x03200000 || /* MSR & Undef */ | 1169 | if ((insn & 0x0fb00000) == 0x03200000 || /* MSR */ |
| 1170 | (insn & 0x0ff00000) == 0x03400000 || /* Undef */ | ||
| 1170 | (insn & 0x0e10f000) == 0x0210f000) /* ALU s-bit, R15 */ | 1171 | (insn & 0x0e10f000) == 0x0210f000) /* ALU s-bit, R15 */ |
| 1171 | return INSN_REJECTED; | 1172 | return INSN_REJECTED; |
| 1172 | 1173 | ||
| @@ -1177,7 +1178,7 @@ space_cccc_001x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
| 1177 | * *S (bit 20) updates condition codes | 1178 | * *S (bit 20) updates condition codes |
| 1178 | * ADC/SBC/RSC reads the C flag | 1179 | * ADC/SBC/RSC reads the C flag |
| 1179 | */ | 1180 | */ |
| 1180 | insn &= 0xfff00fff; /* Rn = r0, Rd = r0 */ | 1181 | insn &= 0xffff0fff; /* Rd = r0 */ |
| 1181 | asi->insn[0] = insn; | 1182 | asi->insn[0] = insn; |
| 1182 | asi->insn_handler = (insn & (1 << 20)) ? /* S-bit */ | 1183 | asi->insn_handler = (insn & (1 << 20)) ? /* S-bit */ |
| 1183 | emulate_alu_imm_rwflags : emulate_alu_imm_rflags; | 1184 | emulate_alu_imm_rwflags : emulate_alu_imm_rflags; |
diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h index c80e090b3670..ee8db152592e 100644 --- a/arch/arm/mach-at91/include/mach/system.h +++ b/arch/arm/mach-at91/include/mach/system.h | |||
| @@ -28,17 +28,16 @@ | |||
| 28 | 28 | ||
| 29 | static inline void arch_idle(void) | 29 | static inline void arch_idle(void) |
| 30 | { | 30 | { |
| 31 | #ifndef CONFIG_DEBUG_KERNEL | ||
| 32 | /* | 31 | /* |
| 33 | * Disable the processor clock. The processor will be automatically | 32 | * Disable the processor clock. The processor will be automatically |
| 34 | * re-enabled by an interrupt or by a reset. | 33 | * re-enabled by an interrupt or by a reset. |
| 35 | */ | 34 | */ |
| 36 | at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK); | 35 | at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK); |
| 37 | #else | 36 | #ifndef CONFIG_CPU_ARM920T |
| 38 | /* | 37 | /* |
| 39 | * Set the processor (CP15) into 'Wait for Interrupt' mode. | 38 | * Set the processor (CP15) into 'Wait for Interrupt' mode. |
| 40 | * Unlike disabling the processor clock via the PMC (above) | 39 | * Post-RM9200 processors need this in conjunction with the above |
| 41 | * this allows the processor to be woken via JTAG. | 40 | * to save power when idle. |
| 42 | */ | 41 | */ |
| 43 | cpu_do_idle(); | 42 | cpu_do_idle(); |
| 44 | #endif | 43 | #endif |
diff --git a/arch/arm/mach-ep93xx/dma-m2p.c b/arch/arm/mach-ep93xx/dma-m2p.c index 8904ca4e2e24..a696d354b1f8 100644 --- a/arch/arm/mach-ep93xx/dma-m2p.c +++ b/arch/arm/mach-ep93xx/dma-m2p.c | |||
| @@ -276,7 +276,7 @@ static void channel_disable(struct m2p_channel *ch) | |||
| 276 | v &= ~(M2P_CONTROL_STALL_IRQ_EN | M2P_CONTROL_NFB_IRQ_EN); | 276 | v &= ~(M2P_CONTROL_STALL_IRQ_EN | M2P_CONTROL_NFB_IRQ_EN); |
| 277 | m2p_set_control(ch, v); | 277 | m2p_set_control(ch, v); |
| 278 | 278 | ||
| 279 | while (m2p_channel_state(ch) == STATE_ON) | 279 | while (m2p_channel_state(ch) >= STATE_ON) |
| 280 | cpu_relax(); | 280 | cpu_relax(); |
| 281 | 281 | ||
| 282 | m2p_set_control(ch, 0x0); | 282 | m2p_set_control(ch, 0x0); |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index c5c0369bb481..2f7e2728970d 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
| @@ -122,6 +122,7 @@ config MACH_CPUIMX27 | |||
| 122 | select IMX_HAVE_PLATFORM_IMX_I2C | 122 | select IMX_HAVE_PLATFORM_IMX_I2C |
| 123 | select IMX_HAVE_PLATFORM_IMX_UART | 123 | select IMX_HAVE_PLATFORM_IMX_UART |
| 124 | select IMX_HAVE_PLATFORM_MXC_NAND | 124 | select IMX_HAVE_PLATFORM_MXC_NAND |
| 125 | select MXC_ULPI if USB_ULPI | ||
| 125 | help | 126 | help |
| 126 | Include support for Eukrea CPUIMX27 platform. This includes | 127 | Include support for Eukrea CPUIMX27 platform. This includes |
| 127 | specific configurations for the module and its peripherals. | 128 | specific configurations for the module and its peripherals. |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 339150ab0ea5..6830afd1d2ba 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
| @@ -259,7 +259,7 @@ static void __init eukrea_cpuimx27_init(void) | |||
| 259 | i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices, | 259 | i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices, |
| 260 | ARRAY_SIZE(eukrea_cpuimx27_i2c_devices)); | 260 | ARRAY_SIZE(eukrea_cpuimx27_i2c_devices)); |
| 261 | 261 | ||
| 262 | imx27_add_i2c_imx1(&cpuimx27_i2c1_data); | 262 | imx27_add_i2c_imx0(&cpuimx27_i2c1_data); |
| 263 | 263 | ||
| 264 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 264 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
| 265 | 265 | ||
diff --git a/arch/arm/mach-s5p6440/cpu.c b/arch/arm/mach-s5p6440/cpu.c index 526f33adb31d..ec592e866054 100644 --- a/arch/arm/mach-s5p6440/cpu.c +++ b/arch/arm/mach-s5p6440/cpu.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/sysdev.h> | 19 | #include <linux/sysdev.h> |
| 20 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
| 21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
| 22 | #include <linux/sched.h> | ||
| 22 | 23 | ||
| 23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
| 24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-s5p6442/cpu.c b/arch/arm/mach-s5p6442/cpu.c index a48fb553fd01..70ac681af72b 100644 --- a/arch/arm/mach-s5p6442/cpu.c +++ b/arch/arm/mach-s5p6442/cpu.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/sysdev.h> | 19 | #include <linux/sysdev.h> |
| 20 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
| 21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
| 22 | #include <linux/sched.h> | ||
| 22 | 23 | ||
| 23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
| 24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-s5pc100/cpu.c b/arch/arm/mach-s5pc100/cpu.c index 251c92ac5b22..cd1afbce83e2 100644 --- a/arch/arm/mach-s5pc100/cpu.c +++ b/arch/arm/mach-s5pc100/cpu.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/sysdev.h> | 21 | #include <linux/sysdev.h> |
| 22 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
| 23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
| 24 | #include <linux/sched.h> | ||
| 24 | 25 | ||
| 25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
| 26 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index cfecd70657cb..d562670e1b0b 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c | |||
| @@ -173,11 +173,6 @@ static int s5pv210_clk_ip3_ctrl(struct clk *clk, int enable) | |||
| 173 | return s5p_gatectrl(S5P_CLKGATE_IP3, clk, enable); | 173 | return s5p_gatectrl(S5P_CLKGATE_IP3, clk, enable); |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | static int s5pv210_clk_ip4_ctrl(struct clk *clk, int enable) | ||
| 177 | { | ||
| 178 | return s5p_gatectrl(S5P_CLKGATE_IP4, clk, enable); | ||
| 179 | } | ||
| 180 | |||
| 181 | static int s5pv210_clk_mask0_ctrl(struct clk *clk, int enable) | 176 | static int s5pv210_clk_mask0_ctrl(struct clk *clk, int enable) |
| 182 | { | 177 | { |
| 183 | return s5p_gatectrl(S5P_CLK_SRC_MASK0, clk, enable); | 178 | return s5p_gatectrl(S5P_CLK_SRC_MASK0, clk, enable); |
diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c index 77f456c91ad3..245b82b53df4 100644 --- a/arch/arm/mach-s5pv210/cpu.c +++ b/arch/arm/mach-s5pv210/cpu.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
| 20 | #include <linux/sysdev.h> | 20 | #include <linux/sysdev.h> |
| 21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
| 22 | #include <linux/sched.h> | ||
| 22 | 23 | ||
| 23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
| 24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index efb127022d42..71fb17349520 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c | |||
| @@ -68,7 +68,7 @@ static void __init ct_ca9x4_init_irq(void) | |||
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | #if 0 | 70 | #if 0 |
| 71 | static void ct_ca9x4_timer_init(void) | 71 | static void __init ct_ca9x4_timer_init(void) |
| 72 | { | 72 | { |
| 73 | writel(0, MMIO_P2V(CT_CA9X4_TIMER0) + TIMER_CTRL); | 73 | writel(0, MMIO_P2V(CT_CA9X4_TIMER0) + TIMER_CTRL); |
| 74 | writel(0, MMIO_P2V(CT_CA9X4_TIMER1) + TIMER_CTRL); | 74 | writel(0, MMIO_P2V(CT_CA9X4_TIMER1) + TIMER_CTRL); |
| @@ -222,7 +222,7 @@ static struct platform_device pmu_device = { | |||
| 222 | .resource = pmu_resources, | 222 | .resource = pmu_resources, |
| 223 | }; | 223 | }; |
| 224 | 224 | ||
| 225 | static void ct_ca9x4_init(void) | 225 | static void __init ct_ca9x4_init(void) |
| 226 | { | 226 | { |
| 227 | int i; | 227 | int i; |
| 228 | 228 | ||
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 817f0ad38a0b..7eaa232180a5 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
| @@ -48,7 +48,7 @@ void __init v2m_map_io(struct map_desc *tile, size_t num) | |||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | 50 | ||
| 51 | static void v2m_timer_init(void) | 51 | static void __init v2m_timer_init(void) |
| 52 | { | 52 | { |
| 53 | writel(0, MMIO_P2V(V2M_TIMER0) + TIMER_CTRL); | 53 | writel(0, MMIO_P2V(V2M_TIMER0) + TIMER_CTRL); |
| 54 | writel(0, MMIO_P2V(V2M_TIMER1) + TIMER_CTRL); | 54 | writel(0, MMIO_P2V(V2M_TIMER1) + TIMER_CTRL); |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index ab506272b2d3..17e7b0b57e49 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
| @@ -204,8 +204,12 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn, | |||
| 204 | /* | 204 | /* |
| 205 | * Don't allow RAM to be mapped - this causes problems with ARMv6+ | 205 | * Don't allow RAM to be mapped - this causes problems with ARMv6+ |
| 206 | */ | 206 | */ |
| 207 | if (WARN_ON(pfn_valid(pfn))) | 207 | if (pfn_valid(pfn)) { |
| 208 | return NULL; | 208 | printk(KERN_WARNING "BUG: Your driver calls ioremap() on system memory. This leads\n" |
| 209 | KERN_WARNING "to architecturally unpredictable behaviour on ARMv6+, and ioremap()\n" | ||
| 210 | KERN_WARNING "will fail in the next kernel release. Please fix your driver.\n"); | ||
| 211 | WARN_ON(1); | ||
| 212 | } | ||
| 209 | 213 | ||
| 210 | type = get_mem_type(mtype); | 214 | type = get_mem_type(mtype); |
| 211 | if (!type) | 215 | if (!type) |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 6a3a2d0cd6db..e8ed9dc461fe 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
| @@ -248,7 +248,7 @@ static struct mem_type mem_types[] = { | |||
| 248 | }, | 248 | }, |
| 249 | [MT_MEMORY] = { | 249 | [MT_MEMORY] = { |
| 250 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | | 250 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | |
| 251 | L_PTE_USER | L_PTE_EXEC, | 251 | L_PTE_WRITE | L_PTE_EXEC, |
| 252 | .prot_l1 = PMD_TYPE_TABLE, | 252 | .prot_l1 = PMD_TYPE_TABLE, |
| 253 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, | 253 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, |
| 254 | .domain = DOMAIN_KERNEL, | 254 | .domain = DOMAIN_KERNEL, |
| @@ -259,7 +259,7 @@ static struct mem_type mem_types[] = { | |||
| 259 | }, | 259 | }, |
| 260 | [MT_MEMORY_NONCACHED] = { | 260 | [MT_MEMORY_NONCACHED] = { |
| 261 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | | 261 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | |
| 262 | L_PTE_USER | L_PTE_EXEC | L_PTE_MT_BUFFERABLE, | 262 | L_PTE_WRITE | L_PTE_EXEC | L_PTE_MT_BUFFERABLE, |
| 263 | .prot_l1 = PMD_TYPE_TABLE, | 263 | .prot_l1 = PMD_TYPE_TABLE, |
| 264 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, | 264 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, |
| 265 | .domain = DOMAIN_KERNEL, | 265 | .domain = DOMAIN_KERNEL, |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 7563ff0141bd..197f21bed5e9 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
| @@ -253,6 +253,14 @@ __v7_setup: | |||
| 253 | orreq r10, r10, #1 << 22 @ set bit #22 | 253 | orreq r10, r10, #1 << 22 @ set bit #22 |
| 254 | mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register | 254 | mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register |
| 255 | #endif | 255 | #endif |
| 256 | #ifdef CONFIG_ARM_ERRATA_743622 | ||
| 257 | teq r6, #0x20 @ present in r2p0 | ||
| 258 | teqne r6, #0x21 @ present in r2p1 | ||
| 259 | teqne r6, #0x22 @ present in r2p2 | ||
| 260 | mrceq p15, 0, r10, c15, c0, 1 @ read diagnostic register | ||
| 261 | orreq r10, r10, #1 << 6 @ set bit #6 | ||
| 262 | mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register | ||
| 263 | #endif | ||
| 256 | 264 | ||
| 257 | 3: mov r10, #0 | 265 | 3: mov r10, #0 |
| 258 | #ifdef HARVARD_CACHE | 266 | #ifdef HARVARD_CACHE |
| @@ -365,7 +373,7 @@ __v7_ca9mp_proc_info: | |||
| 365 | b __v7_ca9mp_setup | 373 | b __v7_ca9mp_setup |
| 366 | .long cpu_arch_name | 374 | .long cpu_arch_name |
| 367 | .long cpu_elf_name | 375 | .long cpu_elf_name |
| 368 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP | 376 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_TLS |
| 369 | .long cpu_v7_name | 377 | .long cpu_v7_name |
| 370 | .long v7_processor_functions | 378 | .long v7_processor_functions |
| 371 | .long v7wbi_tlb_fns | 379 | .long v7wbi_tlb_fns |
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index 0691176899ff..72e09eb642dd 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c | |||
| @@ -102,6 +102,7 @@ static int op_create_counter(int cpu, int event) | |||
| 102 | if (IS_ERR(pevent)) { | 102 | if (IS_ERR(pevent)) { |
| 103 | ret = PTR_ERR(pevent); | 103 | ret = PTR_ERR(pevent); |
| 104 | } else if (pevent->state != PERF_EVENT_STATE_ACTIVE) { | 104 | } else if (pevent->state != PERF_EVENT_STATE_ACTIVE) { |
| 105 | perf_event_release_kernel(pevent); | ||
| 105 | pr_warning("oprofile: failed to enable event %d " | 106 | pr_warning("oprofile: failed to enable event %d " |
| 106 | "on CPU %d\n", event, cpu); | 107 | "on CPU %d\n", event, cpu); |
| 107 | ret = -EBUSY; | 108 | ret = -EBUSY; |
| @@ -365,6 +366,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
| 365 | ret = init_driverfs(); | 366 | ret = init_driverfs(); |
| 366 | if (ret) { | 367 | if (ret) { |
| 367 | kfree(counter_config); | 368 | kfree(counter_config); |
| 369 | counter_config = NULL; | ||
| 368 | return ret; | 370 | return ret; |
| 369 | } | 371 | } |
| 370 | 372 | ||
| @@ -402,7 +404,6 @@ void oprofile_arch_exit(void) | |||
| 402 | struct perf_event *event; | 404 | struct perf_event *event; |
| 403 | 405 | ||
| 404 | if (*perf_events) { | 406 | if (*perf_events) { |
| 405 | exit_driverfs(); | ||
| 406 | for_each_possible_cpu(cpu) { | 407 | for_each_possible_cpu(cpu) { |
| 407 | for (id = 0; id < perf_num_counters; ++id) { | 408 | for (id = 0; id < perf_num_counters; ++id) { |
| 408 | event = perf_events[cpu][id]; | 409 | event = perf_events[cpu][id]; |
| @@ -413,8 +414,10 @@ void oprofile_arch_exit(void) | |||
| 413 | } | 414 | } |
| 414 | } | 415 | } |
| 415 | 416 | ||
| 416 | if (counter_config) | 417 | if (counter_config) { |
| 417 | kfree(counter_config); | 418 | kfree(counter_config); |
| 419 | exit_driverfs(); | ||
| 420 | } | ||
| 418 | } | 421 | } |
| 419 | #else | 422 | #else |
| 420 | int __init oprofile_arch_init(struct oprofile_operations *ops) | 423 | int __init oprofile_arch_init(struct oprofile_operations *ops) |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index e39a417a368d..a92cb499313f 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
| @@ -33,7 +33,7 @@ config OMAP_DEBUG_DEVICES | |||
| 33 | config OMAP_DEBUG_LEDS | 33 | config OMAP_DEBUG_LEDS |
| 34 | bool | 34 | bool |
| 35 | depends on OMAP_DEBUG_DEVICES | 35 | depends on OMAP_DEBUG_DEVICES |
| 36 | default y if LEDS | 36 | default y if LEDS_CLASS |
| 37 | 37 | ||
| 38 | config OMAP_RESET_CLOCKS | 38 | config OMAP_RESET_CLOCKS |
| 39 | bool "Reset unused clocks during boot" | 39 | bool "Reset unused clocks during boot" |
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c index a202a2ce6e3d..6cd151b31bc5 100644 --- a/arch/arm/plat-omap/iommu.c +++ b/arch/arm/plat-omap/iommu.c | |||
| @@ -320,6 +320,7 @@ void flush_iotlb_page(struct iommu *obj, u32 da) | |||
| 320 | if ((start <= da) && (da < start + bytes)) { | 320 | if ((start <= da) && (da < start + bytes)) { |
| 321 | dev_dbg(obj->dev, "%s: %08x<=%08x(%x)\n", | 321 | dev_dbg(obj->dev, "%s: %08x<=%08x(%x)\n", |
| 322 | __func__, start, da, bytes); | 322 | __func__, start, da, bytes); |
| 323 | iotlb_load_cr(obj, &cr); | ||
| 323 | iommu_write_reg(obj, 1, MMU_FLUSH_ENTRY); | 324 | iommu_write_reg(obj, 1, MMU_FLUSH_ENTRY); |
| 324 | } | 325 | } |
| 325 | } | 326 | } |
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index e31496e35b0f..0c8612fd8312 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
| @@ -156,7 +156,7 @@ static irqreturn_t omap_mcbsp_rx_irq_handler(int irq, void *dev_id) | |||
| 156 | /* Writing zero to RSYNC_ERR clears the IRQ */ | 156 | /* Writing zero to RSYNC_ERR clears the IRQ */ |
| 157 | MCBSP_WRITE(mcbsp_rx, SPCR1, MCBSP_READ_CACHE(mcbsp_rx, SPCR1)); | 157 | MCBSP_WRITE(mcbsp_rx, SPCR1, MCBSP_READ_CACHE(mcbsp_rx, SPCR1)); |
| 158 | } else { | 158 | } else { |
| 159 | complete(&mcbsp_rx->tx_irq_completion); | 159 | complete(&mcbsp_rx->rx_irq_completion); |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | return IRQ_HANDLED; | 162 | return IRQ_HANDLED; |
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index 04d9521ddc9f..e8f2be2d67f2 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c | |||
| @@ -435,7 +435,6 @@ static int s3c_adc_suspend(struct platform_device *pdev, pm_message_t state) | |||
| 435 | static int s3c_adc_resume(struct platform_device *pdev) | 435 | static int s3c_adc_resume(struct platform_device *pdev) |
| 436 | { | 436 | { |
| 437 | struct adc_device *adc = platform_get_drvdata(pdev); | 437 | struct adc_device *adc = platform_get_drvdata(pdev); |
| 438 | unsigned long flags; | ||
| 439 | 438 | ||
| 440 | clk_enable(adc->clk); | 439 | clk_enable(adc->clk); |
| 441 | enable_irq(adc->irq); | 440 | enable_irq(adc->irq); |
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index 90a20512d68d..e8d20b0bc50e 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c | |||
| @@ -48,6 +48,9 @@ | |||
| 48 | #include <plat/clock.h> | 48 | #include <plat/clock.h> |
| 49 | #include <plat/cpu.h> | 49 | #include <plat/cpu.h> |
| 50 | 50 | ||
| 51 | #include <linux/serial_core.h> | ||
| 52 | #include <plat/regs-serial.h> /* for s3c24xx_uart_devs */ | ||
| 53 | |||
| 51 | /* clock information */ | 54 | /* clock information */ |
| 52 | 55 | ||
| 53 | static LIST_HEAD(clocks); | 56 | static LIST_HEAD(clocks); |
| @@ -65,6 +68,28 @@ static int clk_null_enable(struct clk *clk, int enable) | |||
| 65 | return 0; | 68 | return 0; |
| 66 | } | 69 | } |
| 67 | 70 | ||
| 71 | static int dev_is_s3c_uart(struct device *dev) | ||
| 72 | { | ||
| 73 | struct platform_device **pdev = s3c24xx_uart_devs; | ||
| 74 | int i; | ||
| 75 | for (i = 0; i < ARRAY_SIZE(s3c24xx_uart_devs); i++, pdev++) | ||
| 76 | if (*pdev && dev == &(*pdev)->dev) | ||
| 77 | return 1; | ||
| 78 | return 0; | ||
| 79 | } | ||
| 80 | |||
| 81 | /* | ||
| 82 | * Serial drivers call get_clock() very early, before platform bus | ||
| 83 | * has been set up, this requires a special check to let them get | ||
| 84 | * a proper clock | ||
| 85 | */ | ||
| 86 | |||
| 87 | static int dev_is_platform_device(struct device *dev) | ||
| 88 | { | ||
| 89 | return dev->bus == &platform_bus_type || | ||
| 90 | (dev->bus == NULL && dev_is_s3c_uart(dev)); | ||
| 91 | } | ||
| 92 | |||
| 68 | /* Clock API calls */ | 93 | /* Clock API calls */ |
| 69 | 94 | ||
| 70 | struct clk *clk_get(struct device *dev, const char *id) | 95 | struct clk *clk_get(struct device *dev, const char *id) |
| @@ -73,7 +98,7 @@ struct clk *clk_get(struct device *dev, const char *id) | |||
| 73 | struct clk *clk = ERR_PTR(-ENOENT); | 98 | struct clk *clk = ERR_PTR(-ENOENT); |
| 74 | int idno; | 99 | int idno; |
| 75 | 100 | ||
| 76 | if (dev == NULL || dev->bus != &platform_bus_type) | 101 | if (dev == NULL || !dev_is_platform_device(dev)) |
| 77 | idno = -1; | 102 | idno = -1; |
| 78 | else | 103 | else |
| 79 | idno = to_platform_device(dev)->id; | 104 | idno = to_platform_device(dev)->id; |
diff --git a/arch/avr32/kernel/module.c b/arch/avr32/kernel/module.c index 98f94d041d9c..a727f54d64d6 100644 --- a/arch/avr32/kernel/module.c +++ b/arch/avr32/kernel/module.c | |||
| @@ -314,10 +314,9 @@ int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, | |||
| 314 | vfree(module->arch.syminfo); | 314 | vfree(module->arch.syminfo); |
| 315 | module->arch.syminfo = NULL; | 315 | module->arch.syminfo = NULL; |
| 316 | 316 | ||
| 317 | return module_bug_finalize(hdr, sechdrs, module); | 317 | return 0; |
| 318 | } | 318 | } |
| 319 | 319 | ||
| 320 | void module_arch_cleanup(struct module *module) | 320 | void module_arch_cleanup(struct module *module) |
| 321 | { | 321 | { |
| 322 | module_bug_cleanup(module); | ||
| 323 | } | 322 | } |
diff --git a/arch/h8300/kernel/module.c b/arch/h8300/kernel/module.c index 0865e291c20d..db4953dc4e1b 100644 --- a/arch/h8300/kernel/module.c +++ b/arch/h8300/kernel/module.c | |||
| @@ -112,10 +112,9 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 112 | const Elf_Shdr *sechdrs, | 112 | const Elf_Shdr *sechdrs, |
| 113 | struct module *me) | 113 | struct module *me) |
| 114 | { | 114 | { |
| 115 | return module_bug_finalize(hdr, sechdrs, me); | 115 | return 0; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | void module_arch_cleanup(struct module *mod) | 118 | void module_arch_cleanup(struct module *mod) |
| 119 | { | 119 | { |
| 120 | module_bug_cleanup(mod); | ||
| 121 | } | 120 | } |
diff --git a/arch/m32r/include/asm/elf.h b/arch/m32r/include/asm/elf.h index 2f85412ef730..b8da7d0574d2 100644 --- a/arch/m32r/include/asm/elf.h +++ b/arch/m32r/include/asm/elf.h | |||
| @@ -82,9 +82,9 @@ typedef elf_fpreg_t elf_fpregset_t; | |||
| 82 | * These are used to set parameters in the core dumps. | 82 | * These are used to set parameters in the core dumps. |
| 83 | */ | 83 | */ |
| 84 | #define ELF_CLASS ELFCLASS32 | 84 | #define ELF_CLASS ELFCLASS32 |
| 85 | #if defined(__LITTLE_ENDIAN) | 85 | #if defined(__LITTLE_ENDIAN__) |
| 86 | #define ELF_DATA ELFDATA2LSB | 86 | #define ELF_DATA ELFDATA2LSB |
| 87 | #elif defined(__BIG_ENDIAN) | 87 | #elif defined(__BIG_ENDIAN__) |
| 88 | #define ELF_DATA ELFDATA2MSB | 88 | #define ELF_DATA ELFDATA2MSB |
| 89 | #else | 89 | #else |
| 90 | #error no endian defined | 90 | #error no endian defined |
diff --git a/arch/m32r/kernel/.gitignore b/arch/m32r/kernel/.gitignore new file mode 100644 index 000000000000..c5f676c3c224 --- /dev/null +++ b/arch/m32r/kernel/.gitignore | |||
| @@ -0,0 +1 @@ | |||
| vmlinux.lds | |||
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index 7bbe38645ed5..a08697f0886d 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c | |||
| @@ -28,6 +28,8 @@ | |||
| 28 | 28 | ||
| 29 | #define DEBUG_SIG 0 | 29 | #define DEBUG_SIG 0 |
| 30 | 30 | ||
| 31 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | ||
| 32 | |||
| 31 | asmlinkage int | 33 | asmlinkage int |
| 32 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | 34 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, |
| 33 | unsigned long r2, unsigned long r3, unsigned long r4, | 35 | unsigned long r2, unsigned long r3, unsigned long r4, |
| @@ -254,7 +256,7 @@ give_sigsegv: | |||
| 254 | static int prev_insn(struct pt_regs *regs) | 256 | static int prev_insn(struct pt_regs *regs) |
| 255 | { | 257 | { |
| 256 | u16 inst; | 258 | u16 inst; |
| 257 | if (get_user(&inst, (u16 __user *)(regs->bpc - 2))) | 259 | if (get_user(inst, (u16 __user *)(regs->bpc - 2))) |
| 258 | return -EFAULT; | 260 | return -EFAULT; |
| 259 | if ((inst & 0xfff0) == 0x10f0) /* trap ? */ | 261 | if ((inst & 0xfff0) == 0x10f0) /* trap ? */ |
| 260 | regs->bpc -= 2; | 262 | regs->bpc -= 2; |
diff --git a/arch/m68k/mac/macboing.c b/arch/m68k/mac/macboing.c index 8f0640847ad2..05285d08e547 100644 --- a/arch/m68k/mac/macboing.c +++ b/arch/m68k/mac/macboing.c | |||
| @@ -162,7 +162,7 @@ static void mac_init_asc( void ) | |||
| 162 | void mac_mksound( unsigned int freq, unsigned int length ) | 162 | void mac_mksound( unsigned int freq, unsigned int length ) |
| 163 | { | 163 | { |
| 164 | __u32 cfreq = ( freq << 5 ) / 468; | 164 | __u32 cfreq = ( freq << 5 ) / 468; |
| 165 | __u32 flags; | 165 | unsigned long flags; |
| 166 | int i; | 166 | int i; |
| 167 | 167 | ||
| 168 | if ( mac_special_bell == NULL ) | 168 | if ( mac_special_bell == NULL ) |
| @@ -224,7 +224,7 @@ static void mac_nosound( unsigned long ignored ) | |||
| 224 | */ | 224 | */ |
| 225 | static void mac_quadra_start_bell( unsigned int freq, unsigned int length, unsigned int volume ) | 225 | static void mac_quadra_start_bell( unsigned int freq, unsigned int length, unsigned int volume ) |
| 226 | { | 226 | { |
| 227 | __u32 flags; | 227 | unsigned long flags; |
| 228 | 228 | ||
| 229 | /* if the bell is already ringing, ring longer */ | 229 | /* if the bell is already ringing, ring longer */ |
| 230 | if ( mac_bell_duration > 0 ) | 230 | if ( mac_bell_duration > 0 ) |
| @@ -271,7 +271,7 @@ static void mac_quadra_start_bell( unsigned int freq, unsigned int length, unsig | |||
| 271 | static void mac_quadra_ring_bell( unsigned long ignored ) | 271 | static void mac_quadra_ring_bell( unsigned long ignored ) |
| 272 | { | 272 | { |
| 273 | int i, count = mac_asc_samplespersec / HZ; | 273 | int i, count = mac_asc_samplespersec / HZ; |
| 274 | __u32 flags; | 274 | unsigned long flags; |
| 275 | 275 | ||
| 276 | /* | 276 | /* |
| 277 | * we neither want a sound buffer overflow nor underflow, so we need to match | 277 | * we neither want a sound buffer overflow nor underflow, so we need to match |
diff --git a/arch/mips/Kbuild b/arch/mips/Kbuild index e322d65f33a4..7dd65cfae837 100644 --- a/arch/mips/Kbuild +++ b/arch/mips/Kbuild | |||
| @@ -7,6 +7,10 @@ subdir-ccflags-y := -Werror | |||
| 7 | include arch/mips/Kbuild.platforms | 7 | include arch/mips/Kbuild.platforms |
| 8 | obj-y := $(platform-y) | 8 | obj-y := $(platform-y) |
| 9 | 9 | ||
| 10 | # make clean traverses $(obj-) without having included .config, so | ||
| 11 | # everything ends up here | ||
| 12 | obj- := $(platform-) | ||
| 13 | |||
| 10 | # mips object files | 14 | # mips object files |
| 11 | # The object files are linked as core-y files would be linked | 15 | # The object files are linked as core-y files would be linked |
| 12 | 16 | ||
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 3ad59dde4852..4c9f402295dd 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
| @@ -13,6 +13,7 @@ config MIPS | |||
| 13 | select HAVE_KPROBES | 13 | select HAVE_KPROBES |
| 14 | select HAVE_KRETPROBES | 14 | select HAVE_KRETPROBES |
| 15 | select RTC_LIB if !MACH_LOONGSON | 15 | select RTC_LIB if !MACH_LOONGSON |
| 16 | select GENERIC_ATOMIC64 if !64BIT | ||
| 16 | 17 | ||
| 17 | mainmenu "Linux/MIPS Kernel Configuration" | 18 | mainmenu "Linux/MIPS Kernel Configuration" |
| 18 | 19 | ||
| @@ -880,11 +881,15 @@ config NO_IOPORT | |||
| 880 | config GENERIC_ISA_DMA | 881 | config GENERIC_ISA_DMA |
| 881 | bool | 882 | bool |
| 882 | select ZONE_DMA if GENERIC_ISA_DMA_SUPPORT_BROKEN=n | 883 | select ZONE_DMA if GENERIC_ISA_DMA_SUPPORT_BROKEN=n |
| 884 | select ISA_DMA_API | ||
| 883 | 885 | ||
| 884 | config GENERIC_ISA_DMA_SUPPORT_BROKEN | 886 | config GENERIC_ISA_DMA_SUPPORT_BROKEN |
| 885 | bool | 887 | bool |
| 886 | select GENERIC_ISA_DMA | 888 | select GENERIC_ISA_DMA |
| 887 | 889 | ||
| 890 | config ISA_DMA_API | ||
| 891 | bool | ||
| 892 | |||
| 888 | config GENERIC_GPIO | 893 | config GENERIC_GPIO |
| 889 | bool | 894 | bool |
| 890 | 895 | ||
| @@ -1646,8 +1651,16 @@ config MIPS_MT_SMP | |||
| 1646 | select SYS_SUPPORTS_SMP | 1651 | select SYS_SUPPORTS_SMP |
| 1647 | select SMP_UP | 1652 | select SMP_UP |
| 1648 | help | 1653 | help |
| 1649 | This is a kernel model which is also known a VSMP or lately | 1654 | This is a kernel model which is known a VSMP but lately has been |
| 1650 | has been marketesed into SMVP. | 1655 | marketesed into SMVP. |
| 1656 | Virtual SMP uses the processor's VPEs to implement virtual | ||
| 1657 | processors. In currently available configuration of the 34K processor | ||
| 1658 | this allows for a dual processor. Both processors will share the same | ||
| 1659 | primary caches; each will obtain the half of the TLB for it's own | ||
| 1660 | exclusive use. For a layman this model can be described as similar to | ||
| 1661 | what Intel calls Hyperthreading. | ||
| 1662 | |||
| 1663 | For further information see http://www.linux-mips.org/wiki/34K#VSMP | ||
| 1651 | 1664 | ||
| 1652 | config MIPS_MT_SMTC | 1665 | config MIPS_MT_SMTC |
| 1653 | bool "SMTC: Use all TCs on all VPEs for SMP" | 1666 | bool "SMTC: Use all TCs on all VPEs for SMP" |
| @@ -1664,6 +1677,14 @@ config MIPS_MT_SMTC | |||
| 1664 | help | 1677 | help |
| 1665 | This is a kernel model which is known a SMTC or lately has been | 1678 | This is a kernel model which is known a SMTC or lately has been |
| 1666 | marketesed into SMVP. | 1679 | marketesed into SMVP. |
| 1680 | is presenting the available TC's of the core as processors to Linux. | ||
| 1681 | On currently available 34K processors this means a Linux system will | ||
| 1682 | see up to 5 processors. The implementation of the SMTC kernel differs | ||
| 1683 | significantly from VSMP and cannot efficiently coexist in the same | ||
| 1684 | kernel binary so the choice between VSMP and SMTC is a compile time | ||
| 1685 | decision. | ||
| 1686 | |||
| 1687 | For further information see http://www.linux-mips.org/wiki/34K#SMTC | ||
| 1667 | 1688 | ||
| 1668 | endchoice | 1689 | endchoice |
| 1669 | 1690 | ||
diff --git a/arch/mips/alchemy/common/prom.c b/arch/mips/alchemy/common/prom.c index c29511b11d44..534021059629 100644 --- a/arch/mips/alchemy/common/prom.c +++ b/arch/mips/alchemy/common/prom.c | |||
| @@ -43,7 +43,7 @@ int prom_argc; | |||
| 43 | char **prom_argv; | 43 | char **prom_argv; |
| 44 | char **prom_envp; | 44 | char **prom_envp; |
| 45 | 45 | ||
| 46 | void prom_init_cmdline(void) | 46 | void __init prom_init_cmdline(void) |
| 47 | { | 47 | { |
| 48 | int i; | 48 | int i; |
| 49 | 49 | ||
| @@ -104,7 +104,7 @@ static inline void str2eaddr(unsigned char *ea, unsigned char *str) | |||
| 104 | } | 104 | } |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | int prom_get_ethernet_addr(char *ethernet_addr) | 107 | int __init prom_get_ethernet_addr(char *ethernet_addr) |
| 108 | { | 108 | { |
| 109 | char *ethaddr_str; | 109 | char *ethaddr_str; |
| 110 | 110 | ||
| @@ -123,7 +123,6 @@ int prom_get_ethernet_addr(char *ethernet_addr) | |||
| 123 | 123 | ||
| 124 | return 0; | 124 | return 0; |
| 125 | } | 125 | } |
| 126 | EXPORT_SYMBOL(prom_get_ethernet_addr); | ||
| 127 | 126 | ||
| 128 | void __init prom_free_prom_memory(void) | 127 | void __init prom_free_prom_memory(void) |
| 129 | { | 128 | { |
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index ed9bb709c9a3..5042d51b0512 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile | |||
| @@ -59,7 +59,7 @@ $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE | |||
| 59 | hostprogs-y := calc_vmlinuz_load_addr | 59 | hostprogs-y := calc_vmlinuz_load_addr |
| 60 | 60 | ||
| 61 | VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \ | 61 | VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \ |
| 62 | $(objtree)/$(KBUILD_IMAGE) $(VMLINUX_LOAD_ADDRESS)) | 62 | $(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS)) |
| 63 | 63 | ||
| 64 | vmlinuzobjs-y += $(obj)/piggy.o | 64 | vmlinuzobjs-y += $(obj)/piggy.o |
| 65 | 65 | ||
| @@ -105,4 +105,4 @@ OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec | |||
| 105 | vmlinuz.srec: vmlinuz | 105 | vmlinuz.srec: vmlinuz |
| 106 | $(call cmd,objcopy) | 106 | $(call cmd,objcopy) |
| 107 | 107 | ||
| 108 | clean-files := $(objtree)/vmlinuz.* | 108 | clean-files := $(objtree)/vmlinuz $(objtree)/vmlinuz.{32,ecoff,bin,srec} |
diff --git a/arch/mips/cavium-octeon/Kconfig b/arch/mips/cavium-octeon/Kconfig index 094c17e38e16..47323ca452dc 100644 --- a/arch/mips/cavium-octeon/Kconfig +++ b/arch/mips/cavium-octeon/Kconfig | |||
| @@ -83,3 +83,7 @@ config ARCH_SPARSEMEM_ENABLE | |||
| 83 | def_bool y | 83 | def_bool y |
| 84 | select SPARSEMEM_STATIC | 84 | select SPARSEMEM_STATIC |
| 85 | depends on CPU_CAVIUM_OCTEON | 85 | depends on CPU_CAVIUM_OCTEON |
| 86 | |||
| 87 | config CAVIUM_OCTEON_HELPER | ||
| 88 | def_bool y | ||
| 89 | depends on OCTEON_ETHERNET || PCI | ||
diff --git a/arch/mips/cavium-octeon/cpu.c b/arch/mips/cavium-octeon/cpu.c index c664c8cc2b42..a5b427909b5c 100644 --- a/arch/mips/cavium-octeon/cpu.c +++ b/arch/mips/cavium-octeon/cpu.c | |||
| @@ -41,7 +41,7 @@ static int cnmips_cu2_call(struct notifier_block *nfb, unsigned long action, | |||
| 41 | return NOTIFY_OK; /* Let default notifier send signals */ | 41 | return NOTIFY_OK; /* Let default notifier send signals */ |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | static int cnmips_cu2_setup(void) | 44 | static int __init cnmips_cu2_setup(void) |
| 45 | { | 45 | { |
| 46 | return cu2_notifier(cnmips_cu2_call, 0); | 46 | return cu2_notifier(cnmips_cu2_call, 0); |
| 47 | } | 47 | } |
diff --git a/arch/mips/cavium-octeon/executive/Makefile b/arch/mips/cavium-octeon/executive/Makefile index 2fd66db6939e..7f41c5be2190 100644 --- a/arch/mips/cavium-octeon/executive/Makefile +++ b/arch/mips/cavium-octeon/executive/Makefile | |||
| @@ -11,4 +11,4 @@ | |||
| 11 | 11 | ||
| 12 | obj-y += cvmx-bootmem.o cvmx-l2c.o cvmx-sysinfo.o octeon-model.o | 12 | obj-y += cvmx-bootmem.o cvmx-l2c.o cvmx-sysinfo.o octeon-model.o |
| 13 | 13 | ||
| 14 | obj-$(CONFIG_PCI) += cvmx-helper-errata.o cvmx-helper-jtag.o | 14 | obj-$(CONFIG_CAVIUM_OCTEON_HELPER) += cvmx-helper-errata.o cvmx-helper-jtag.o |
diff --git a/arch/mips/dec/Platform b/arch/mips/dec/Platform index 3adbcbd95db1..cf55a6f4e720 100644 --- a/arch/mips/dec/Platform +++ b/arch/mips/dec/Platform | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # | 1 | # |
| 2 | # DECstation family | 2 | # DECstation family |
| 3 | # | 3 | # |
| 4 | platform-$(CONFIG_MACH_DECSTATION) = dec/ | 4 | platform-$(CONFIG_MACH_DECSTATION) += dec/ |
| 5 | cflags-$(CONFIG_MACH_DECSTATION) += \ | 5 | cflags-$(CONFIG_MACH_DECSTATION) += \ |
| 6 | -I$(srctree)/arch/mips/include/asm/mach-dec | 6 | -I$(srctree)/arch/mips/include/asm/mach-dec |
| 7 | libs-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/prom/ | 7 | libs-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/prom/ |
diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h index c63c56bfd184..47d87da379f9 100644 --- a/arch/mips/include/asm/atomic.h +++ b/arch/mips/include/asm/atomic.h | |||
| @@ -782,6 +782,10 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | |||
| 782 | */ | 782 | */ |
| 783 | #define atomic64_add_negative(i, v) (atomic64_add_return(i, (v)) < 0) | 783 | #define atomic64_add_negative(i, v) (atomic64_add_return(i, (v)) < 0) |
| 784 | 784 | ||
| 785 | #else /* !CONFIG_64BIT */ | ||
| 786 | |||
| 787 | #include <asm-generic/atomic64.h> | ||
| 788 | |||
| 785 | #endif /* CONFIG_64BIT */ | 789 | #endif /* CONFIG_64BIT */ |
| 786 | 790 | ||
| 787 | /* | 791 | /* |
diff --git a/arch/mips/include/asm/cop2.h b/arch/mips/include/asm/cop2.h index 2cb2f0c2c4f8..3532e2c5f098 100644 --- a/arch/mips/include/asm/cop2.h +++ b/arch/mips/include/asm/cop2.h | |||
| @@ -24,7 +24,7 @@ extern int cu2_notifier_call_chain(unsigned long val, void *v); | |||
| 24 | 24 | ||
| 25 | #define cu2_notifier(fn, pri) \ | 25 | #define cu2_notifier(fn, pri) \ |
| 26 | ({ \ | 26 | ({ \ |
| 27 | static struct notifier_block fn##_nb __cpuinitdata = { \ | 27 | static struct notifier_block fn##_nb = { \ |
| 28 | .notifier_call = fn, \ | 28 | .notifier_call = fn, \ |
| 29 | .priority = pri \ | 29 | .priority = pri \ |
| 30 | }; \ | 30 | }; \ |
diff --git a/arch/mips/include/asm/fcntl.h b/arch/mips/include/asm/fcntl.h index e482fe90fe88..75eddedcfc3e 100644 --- a/arch/mips/include/asm/fcntl.h +++ b/arch/mips/include/asm/fcntl.h | |||
| @@ -56,6 +56,7 @@ | |||
| 56 | */ | 56 | */ |
| 57 | 57 | ||
| 58 | #ifdef CONFIG_32BIT | 58 | #ifdef CONFIG_32BIT |
| 59 | #include <linux/types.h> | ||
| 59 | 60 | ||
| 60 | struct flock { | 61 | struct flock { |
| 61 | short l_type; | 62 | short l_type; |
diff --git a/arch/mips/include/asm/gic.h b/arch/mips/include/asm/gic.h index 9b9436a4d816..86548da650e7 100644 --- a/arch/mips/include/asm/gic.h +++ b/arch/mips/include/asm/gic.h | |||
| @@ -321,6 +321,7 @@ struct gic_intrmask_regs { | |||
| 321 | */ | 321 | */ |
| 322 | struct gic_intr_map { | 322 | struct gic_intr_map { |
| 323 | unsigned int cpunum; /* Directed to this CPU */ | 323 | unsigned int cpunum; /* Directed to this CPU */ |
| 324 | #define GIC_UNUSED 0xdead /* Dummy data */ | ||
| 324 | unsigned int pin; /* Directed to this Pin */ | 325 | unsigned int pin; /* Directed to this Pin */ |
| 325 | unsigned int polarity; /* Polarity : +/- */ | 326 | unsigned int polarity; /* Polarity : +/- */ |
| 326 | unsigned int trigtype; /* Trigger : Edge/Levl */ | 327 | unsigned int trigtype; /* Trigger : Edge/Levl */ |
diff --git a/arch/mips/include/asm/mach-tx49xx/kmalloc.h b/arch/mips/include/asm/mach-tx49xx/kmalloc.h index b74caf65482b..ff9a8b86cb93 100644 --- a/arch/mips/include/asm/mach-tx49xx/kmalloc.h +++ b/arch/mips/include/asm/mach-tx49xx/kmalloc.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #ifndef __ASM_MACH_TX49XX_KMALLOC_H | 1 | #ifndef __ASM_MACH_TX49XX_KMALLOC_H |
| 2 | #define __ASM_MACH_TX49XX_KMALLOC_H | 2 | #define __ASM_MACH_TX49XX_KMALLOC_H |
| 3 | 3 | ||
| 4 | #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES | 4 | #define ARCH_DMA_MINALIGN L1_CACHE_BYTES |
| 5 | 5 | ||
| 6 | #endif /* __ASM_MACH_TX49XX_KMALLOC_H */ | 6 | #endif /* __ASM_MACH_TX49XX_KMALLOC_H */ |
diff --git a/arch/mips/include/asm/mips-boards/maltaint.h b/arch/mips/include/asm/mips-boards/maltaint.h index cea872fc6f5c..d11aa02a956a 100644 --- a/arch/mips/include/asm/mips-boards/maltaint.h +++ b/arch/mips/include/asm/mips-boards/maltaint.h | |||
| @@ -88,9 +88,6 @@ | |||
| 88 | 88 | ||
| 89 | #define GIC_EXT_INTR(x) x | 89 | #define GIC_EXT_INTR(x) x |
| 90 | 90 | ||
| 91 | /* Dummy data */ | ||
| 92 | #define X 0xdead | ||
| 93 | |||
| 94 | /* External Interrupts used for IPI */ | 91 | /* External Interrupts used for IPI */ |
| 95 | #define GIC_IPI_EXT_INTR_RESCHED_VPE0 16 | 92 | #define GIC_IPI_EXT_INTR_RESCHED_VPE0 16 |
| 96 | #define GIC_IPI_EXT_INTR_CALLFNC_VPE0 17 | 93 | #define GIC_IPI_EXT_INTR_CALLFNC_VPE0 17 |
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index a16beafcea91..e59cd1ac09c2 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
| @@ -150,6 +150,20 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
| 150 | ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET) | 150 | ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET) |
| 151 | #endif | 151 | #endif |
| 152 | #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET)) | 152 | #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET)) |
| 153 | |||
| 154 | /* | ||
| 155 | * RELOC_HIDE was originally added by 6007b903dfe5f1d13e0c711ac2894bdd4a61b1ad | ||
| 156 | * (lmo) rsp. 8431fd094d625b94d364fe393076ccef88e6ce18 (kernel.org). The | ||
| 157 | * discussion can be found in lkml posting | ||
| 158 | * <a2ebde260608230500o3407b108hc03debb9da6e62c@mail.gmail.com> which is | ||
| 159 | * archived at http://lists.linuxcoding.com/kernel/2006-q3/msg17360.html | ||
| 160 | * | ||
| 161 | * It is unclear if the misscompilations mentioned in | ||
| 162 | * http://lkml.org/lkml/2010/8/8/138 also affect MIPS so we keep this one | ||
| 163 | * until GCC 3.x has been retired before we can apply | ||
| 164 | * https://patchwork.linux-mips.org/patch/1541/ | ||
| 165 | */ | ||
| 166 | |||
| 153 | #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0)) | 167 | #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0)) |
| 154 | 168 | ||
| 155 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | 169 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
diff --git a/arch/mips/include/asm/siginfo.h b/arch/mips/include/asm/siginfo.h index 96e28f18dad1..1ca64b4d33d9 100644 --- a/arch/mips/include/asm/siginfo.h +++ b/arch/mips/include/asm/siginfo.h | |||
| @@ -88,6 +88,7 @@ typedef struct siginfo { | |||
| 88 | #ifdef __ARCH_SI_TRAPNO | 88 | #ifdef __ARCH_SI_TRAPNO |
| 89 | int _trapno; /* TRAP # which caused the signal */ | 89 | int _trapno; /* TRAP # which caused the signal */ |
| 90 | #endif | 90 | #endif |
| 91 | short _addr_lsb; | ||
| 91 | } _sigfault; | 92 | } _sigfault; |
| 92 | 93 | ||
| 93 | /* SIGPOLL, SIGXFSZ (To do ...) */ | 94 | /* SIGPOLL, SIGXFSZ (To do ...) */ |
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index 2376f2e06e47..70df9c0d3c5b 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h | |||
| @@ -146,7 +146,8 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
| 146 | #define _TIF_LOAD_WATCH (1<<TIF_LOAD_WATCH) | 146 | #define _TIF_LOAD_WATCH (1<<TIF_LOAD_WATCH) |
| 147 | 147 | ||
| 148 | /* work to do on interrupt/exception return */ | 148 | /* work to do on interrupt/exception return */ |
| 149 | #define _TIF_WORK_MASK (0x0000ffef & ~_TIF_SECCOMP) | 149 | #define _TIF_WORK_MASK (0x0000ffef & \ |
| 150 | ~(_TIF_SECCOMP | _TIF_SYSCALL_AUDIT)) | ||
| 150 | /* work to do on any return to u-space */ | 151 | /* work to do on any return to u-space */ |
| 151 | #define _TIF_ALLWORK_MASK (0x8000ffff & ~_TIF_SECCOMP) | 152 | #define _TIF_ALLWORK_MASK (0x8000ffff & ~_TIF_SECCOMP) |
| 152 | 153 | ||
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h index baa318a59c97..550725b881d5 100644 --- a/arch/mips/include/asm/unistd.h +++ b/arch/mips/include/asm/unistd.h | |||
| @@ -356,16 +356,19 @@ | |||
| 356 | #define __NR_perf_event_open (__NR_Linux + 333) | 356 | #define __NR_perf_event_open (__NR_Linux + 333) |
| 357 | #define __NR_accept4 (__NR_Linux + 334) | 357 | #define __NR_accept4 (__NR_Linux + 334) |
| 358 | #define __NR_recvmmsg (__NR_Linux + 335) | 358 | #define __NR_recvmmsg (__NR_Linux + 335) |
| 359 | #define __NR_fanotify_init (__NR_Linux + 336) | ||
| 360 | #define __NR_fanotify_mark (__NR_Linux + 337) | ||
| 361 | #define __NR_prlimit64 (__NR_Linux + 338) | ||
| 359 | 362 | ||
| 360 | /* | 363 | /* |
| 361 | * Offset of the last Linux o32 flavoured syscall | 364 | * Offset of the last Linux o32 flavoured syscall |
| 362 | */ | 365 | */ |
| 363 | #define __NR_Linux_syscalls 335 | 366 | #define __NR_Linux_syscalls 338 |
| 364 | 367 | ||
| 365 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 368 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
| 366 | 369 | ||
| 367 | #define __NR_O32_Linux 4000 | 370 | #define __NR_O32_Linux 4000 |
| 368 | #define __NR_O32_Linux_syscalls 335 | 371 | #define __NR_O32_Linux_syscalls 338 |
| 369 | 372 | ||
| 370 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 373 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
| 371 | 374 | ||
| @@ -668,16 +671,19 @@ | |||
| 668 | #define __NR_perf_event_open (__NR_Linux + 292) | 671 | #define __NR_perf_event_open (__NR_Linux + 292) |
| 669 | #define __NR_accept4 (__NR_Linux + 293) | 672 | #define __NR_accept4 (__NR_Linux + 293) |
| 670 | #define __NR_recvmmsg (__NR_Linux + 294) | 673 | #define __NR_recvmmsg (__NR_Linux + 294) |
| 674 | #define __NR_fanotify_init (__NR_Linux + 295) | ||
| 675 | #define __NR_fanotify_mark (__NR_Linux + 296) | ||
| 676 | #define __NR_prlimit64 (__NR_Linux + 297) | ||
| 671 | 677 | ||
| 672 | /* | 678 | /* |
| 673 | * Offset of the last Linux 64-bit flavoured syscall | 679 | * Offset of the last Linux 64-bit flavoured syscall |
| 674 | */ | 680 | */ |
| 675 | #define __NR_Linux_syscalls 294 | 681 | #define __NR_Linux_syscalls 297 |
| 676 | 682 | ||
| 677 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 683 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
| 678 | 684 | ||
| 679 | #define __NR_64_Linux 5000 | 685 | #define __NR_64_Linux 5000 |
| 680 | #define __NR_64_Linux_syscalls 294 | 686 | #define __NR_64_Linux_syscalls 297 |
| 681 | 687 | ||
| 682 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 688 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
| 683 | 689 | ||
| @@ -985,16 +991,19 @@ | |||
| 985 | #define __NR_accept4 (__NR_Linux + 297) | 991 | #define __NR_accept4 (__NR_Linux + 297) |
| 986 | #define __NR_recvmmsg (__NR_Linux + 298) | 992 | #define __NR_recvmmsg (__NR_Linux + 298) |
| 987 | #define __NR_getdents64 (__NR_Linux + 299) | 993 | #define __NR_getdents64 (__NR_Linux + 299) |
| 994 | #define __NR_fanotify_init (__NR_Linux + 300) | ||
| 995 | #define __NR_fanotify_mark (__NR_Linux + 301) | ||
| 996 | #define __NR_prlimit64 (__NR_Linux + 302) | ||
| 988 | 997 | ||
| 989 | /* | 998 | /* |
| 990 | * Offset of the last N32 flavoured syscall | 999 | * Offset of the last N32 flavoured syscall |
| 991 | */ | 1000 | */ |
| 992 | #define __NR_Linux_syscalls 299 | 1001 | #define __NR_Linux_syscalls 302 |
| 993 | 1002 | ||
| 994 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 1003 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
| 995 | 1004 | ||
| 996 | #define __NR_N32_Linux 6000 | 1005 | #define __NR_N32_Linux 6000 |
| 997 | #define __NR_N32_Linux_syscalls 299 | 1006 | #define __NR_N32_Linux_syscalls 302 |
| 998 | 1007 | ||
| 999 | #ifdef __KERNEL__ | 1008 | #ifdef __KERNEL__ |
| 1000 | 1009 | ||
diff --git a/arch/mips/jz4740/Platform b/arch/mips/jz4740/Platform index 6a97230e3d05..ba91be9c21ef 100644 --- a/arch/mips/jz4740/Platform +++ b/arch/mips/jz4740/Platform | |||
| @@ -1,3 +1,3 @@ | |||
| 1 | core-$(CONFIG_MACH_JZ4740) += arch/mips/jz4740/ | 1 | platform-$(CONFIG_MACH_JZ4740) += jz4740/ |
| 2 | cflags-$(CONFIG_MACH_JZ4740) += -I$(srctree)/arch/mips/include/asm/mach-jz4740 | 2 | cflags-$(CONFIG_MACH_JZ4740) += -I$(srctree)/arch/mips/include/asm/mach-jz4740 |
| 3 | load-$(CONFIG_MACH_JZ4740) += 0xffffffff80010000 | 3 | load-$(CONFIG_MACH_JZ4740) += 0xffffffff80010000 |
diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c index 0176ed015c89..32103cc2a257 100644 --- a/arch/mips/kernel/branch.c +++ b/arch/mips/kernel/branch.c | |||
| @@ -40,7 +40,6 @@ int __compute_return_epc(struct pt_regs *regs) | |||
| 40 | return -EFAULT; | 40 | return -EFAULT; |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | regs->regs[0] = 0; | ||
| 44 | switch (insn.i_format.opcode) { | 43 | switch (insn.i_format.opcode) { |
| 45 | /* | 44 | /* |
| 46 | * jr and jalr are in r_format format. | 45 | * jr and jalr are in r_format format. |
diff --git a/arch/mips/kernel/irq-gic.c b/arch/mips/kernel/irq-gic.c index b181f2f0ea8e..82ba9f62f49e 100644 --- a/arch/mips/kernel/irq-gic.c +++ b/arch/mips/kernel/irq-gic.c | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | #include <asm/io.h> | 7 | #include <asm/io.h> |
| 8 | #include <asm/gic.h> | 8 | #include <asm/gic.h> |
| 9 | #include <asm/gcmpregs.h> | 9 | #include <asm/gcmpregs.h> |
| 10 | #include <asm/mips-boards/maltaint.h> | ||
| 11 | #include <asm/irq.h> | 10 | #include <asm/irq.h> |
| 12 | #include <linux/hardirq.h> | 11 | #include <linux/hardirq.h> |
| 13 | #include <asm-generic/bitops/find.h> | 12 | #include <asm-generic/bitops/find.h> |
| @@ -131,7 +130,7 @@ static int gic_set_affinity(unsigned int irq, const struct cpumask *cpumask) | |||
| 131 | int i; | 130 | int i; |
| 132 | 131 | ||
| 133 | irq -= _irqbase; | 132 | irq -= _irqbase; |
| 134 | pr_debug(KERN_DEBUG "%s(%d) called\n", __func__, irq); | 133 | pr_debug("%s(%d) called\n", __func__, irq); |
| 135 | cpumask_and(&tmp, cpumask, cpu_online_mask); | 134 | cpumask_and(&tmp, cpumask, cpu_online_mask); |
| 136 | if (cpus_empty(tmp)) | 135 | if (cpus_empty(tmp)) |
| 137 | return -1; | 136 | return -1; |
| @@ -222,7 +221,7 @@ static void __init gic_basic_init(int numintrs, int numvpes, | |||
| 222 | /* Setup specifics */ | 221 | /* Setup specifics */ |
| 223 | for (i = 0; i < mapsize; i++) { | 222 | for (i = 0; i < mapsize; i++) { |
| 224 | cpu = intrmap[i].cpunum; | 223 | cpu = intrmap[i].cpunum; |
| 225 | if (cpu == X) | 224 | if (cpu == GIC_UNUSED) |
| 226 | continue; | 225 | continue; |
| 227 | if (cpu == 0 && i != 0 && intrmap[i].flags == 0) | 226 | if (cpu == 0 && i != 0 && intrmap[i].flags == 0) |
| 228 | continue; | 227 | continue; |
diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c index 1f4e2fa64140..f4546e97c60d 100644 --- a/arch/mips/kernel/kgdb.c +++ b/arch/mips/kernel/kgdb.c | |||
| @@ -283,7 +283,7 @@ static int kgdb_mips_notify(struct notifier_block *self, unsigned long cmd, | |||
| 283 | struct pt_regs *regs = args->regs; | 283 | struct pt_regs *regs = args->regs; |
| 284 | int trap = (regs->cp0_cause & 0x7c) >> 2; | 284 | int trap = (regs->cp0_cause & 0x7c) >> 2; |
| 285 | 285 | ||
| 286 | /* Userpace events, ignore. */ | 286 | /* Userspace events, ignore. */ |
| 287 | if (user_mode(regs)) | 287 | if (user_mode(regs)) |
| 288 | return NOTIFY_DONE; | 288 | return NOTIFY_DONE; |
| 289 | 289 | ||
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c index 80e2ba694bab..29811f043399 100644 --- a/arch/mips/kernel/kspd.c +++ b/arch/mips/kernel/kspd.c | |||
| @@ -251,7 +251,7 @@ void sp_work_handle_request(void) | |||
| 251 | memset(&tz, 0, sizeof(tz)); | 251 | memset(&tz, 0, sizeof(tz)); |
| 252 | if ((ret.retval = sp_syscall(__NR_gettimeofday, (int)&tv, | 252 | if ((ret.retval = sp_syscall(__NR_gettimeofday, (int)&tv, |
| 253 | (int)&tz, 0, 0)) == 0) | 253 | (int)&tz, 0, 0)) == 0) |
| 254 | ret.retval = tv.tv_sec; | 254 | ret.retval = tv.tv_sec; |
| 255 | break; | 255 | break; |
| 256 | 256 | ||
| 257 | case MTSP_SYSCALL_EXIT: | 257 | case MTSP_SYSCALL_EXIT: |
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index c2dab140dc98..6343b4a5b835 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
| @@ -341,3 +341,10 @@ asmlinkage long sys32_lookup_dcookie(u32 a0, u32 a1, char __user *buf, | |||
| 341 | { | 341 | { |
| 342 | return sys_lookup_dcookie(merge_64(a0, a1), buf, len); | 342 | return sys_lookup_dcookie(merge_64(a0, a1), buf, len); |
| 343 | } | 343 | } |
| 344 | |||
| 345 | SYSCALL_DEFINE6(32_fanotify_mark, int, fanotify_fd, unsigned int, flags, | ||
| 346 | u64, a3, u64, a4, int, dfd, const char __user *, pathname) | ||
| 347 | { | ||
| 348 | return sys_fanotify_mark(fanotify_fd, flags, merge_64(a3, a4), | ||
| 349 | dfd, pathname); | ||
| 350 | } | ||
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index c51b95ff8644..c8777333e198 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c | |||
| @@ -536,7 +536,7 @@ asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit) | |||
| 536 | { | 536 | { |
| 537 | /* do the secure computing check first */ | 537 | /* do the secure computing check first */ |
| 538 | if (!entryexit) | 538 | if (!entryexit) |
| 539 | secure_computing(regs->regs[0]); | 539 | secure_computing(regs->regs[2]); |
| 540 | 540 | ||
| 541 | if (unlikely(current->audit_context) && entryexit) | 541 | if (unlikely(current->audit_context) && entryexit) |
| 542 | audit_syscall_exit(AUDITSC_RESULT(regs->regs[2]), | 542 | audit_syscall_exit(AUDITSC_RESULT(regs->regs[2]), |
| @@ -565,7 +565,7 @@ asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit) | |||
| 565 | 565 | ||
| 566 | out: | 566 | out: |
| 567 | if (unlikely(current->audit_context) && !entryexit) | 567 | if (unlikely(current->audit_context) && !entryexit) |
| 568 | audit_syscall_entry(audit_arch(), regs->regs[0], | 568 | audit_syscall_entry(audit_arch(), regs->regs[2], |
| 569 | regs->regs[4], regs->regs[5], | 569 | regs->regs[4], regs->regs[5], |
| 570 | regs->regs[6], regs->regs[7]); | 570 | regs->regs[6], regs->regs[7]); |
| 571 | } | 571 | } |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 17202bbe843f..fbaabad0e6e2 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
| @@ -63,9 +63,9 @@ stack_done: | |||
| 63 | sw t0, PT_R7(sp) # set error flag | 63 | sw t0, PT_R7(sp) # set error flag |
| 64 | beqz t0, 1f | 64 | beqz t0, 1f |
| 65 | 65 | ||
| 66 | lw t1, PT_R2(sp) # syscall number | ||
| 66 | negu v0 # error | 67 | negu v0 # error |
| 67 | sw v0, PT_R0(sp) # set flag for syscall | 68 | sw t1, PT_R0(sp) # save it for syscall restarting |
| 68 | # restarting | ||
| 69 | 1: sw v0, PT_R2(sp) # result | 69 | 1: sw v0, PT_R2(sp) # result |
| 70 | 70 | ||
| 71 | o32_syscall_exit: | 71 | o32_syscall_exit: |
| @@ -104,9 +104,9 @@ syscall_trace_entry: | |||
| 104 | sw t0, PT_R7(sp) # set error flag | 104 | sw t0, PT_R7(sp) # set error flag |
| 105 | beqz t0, 1f | 105 | beqz t0, 1f |
| 106 | 106 | ||
| 107 | lw t1, PT_R2(sp) # syscall number | ||
| 107 | negu v0 # error | 108 | negu v0 # error |
| 108 | sw v0, PT_R0(sp) # set flag for syscall | 109 | sw t1, PT_R0(sp) # save it for syscall restarting |
| 109 | # restarting | ||
| 110 | 1: sw v0, PT_R2(sp) # result | 110 | 1: sw v0, PT_R2(sp) # result |
| 111 | 111 | ||
| 112 | j syscall_exit | 112 | j syscall_exit |
| @@ -169,8 +169,7 @@ stackargs: | |||
| 169 | * We probably should handle this case a bit more drastic. | 169 | * We probably should handle this case a bit more drastic. |
| 170 | */ | 170 | */ |
| 171 | bad_stack: | 171 | bad_stack: |
| 172 | negu v0 # error | 172 | li v0, EFAULT |
| 173 | sw v0, PT_R0(sp) | ||
| 174 | sw v0, PT_R2(sp) | 173 | sw v0, PT_R2(sp) |
| 175 | li t0, 1 # set error flag | 174 | li t0, 1 # set error flag |
| 176 | sw t0, PT_R7(sp) | 175 | sw t0, PT_R7(sp) |
| @@ -583,7 +582,10 @@ einval: li v0, -ENOSYS | |||
| 583 | sys sys_rt_tgsigqueueinfo 4 | 582 | sys sys_rt_tgsigqueueinfo 4 |
| 584 | sys sys_perf_event_open 5 | 583 | sys sys_perf_event_open 5 |
| 585 | sys sys_accept4 4 | 584 | sys sys_accept4 4 |
| 586 | sys sys_recvmmsg 5 | 585 | sys sys_recvmmsg 5 /* 4335 */ |
| 586 | sys sys_fanotify_init 2 | ||
| 587 | sys sys_fanotify_mark 6 | ||
| 588 | sys sys_prlimit64 4 | ||
| 587 | .endm | 589 | .endm |
| 588 | 590 | ||
| 589 | /* We pre-compute the number of _instruction_ bytes needed to | 591 | /* We pre-compute the number of _instruction_ bytes needed to |
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index a8a6c596eb04..3f4179283207 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
| @@ -66,9 +66,9 @@ NESTED(handle_sys64, PT_SIZE, sp) | |||
| 66 | sd t0, PT_R7(sp) # set error flag | 66 | sd t0, PT_R7(sp) # set error flag |
| 67 | beqz t0, 1f | 67 | beqz t0, 1f |
| 68 | 68 | ||
| 69 | ld t1, PT_R2(sp) # syscall number | ||
| 69 | dnegu v0 # error | 70 | dnegu v0 # error |
| 70 | sd v0, PT_R0(sp) # set flag for syscall | 71 | sd t1, PT_R0(sp) # save it for syscall restarting |
| 71 | # restarting | ||
| 72 | 1: sd v0, PT_R2(sp) # result | 72 | 1: sd v0, PT_R2(sp) # result |
| 73 | 73 | ||
| 74 | n64_syscall_exit: | 74 | n64_syscall_exit: |
| @@ -109,8 +109,9 @@ syscall_trace_entry: | |||
| 109 | sd t0, PT_R7(sp) # set error flag | 109 | sd t0, PT_R7(sp) # set error flag |
| 110 | beqz t0, 1f | 110 | beqz t0, 1f |
| 111 | 111 | ||
| 112 | ld t1, PT_R2(sp) # syscall number | ||
| 112 | dnegu v0 # error | 113 | dnegu v0 # error |
| 113 | sd v0, PT_R0(sp) # set flag for syscall restarting | 114 | sd t1, PT_R0(sp) # save it for syscall restarting |
| 114 | 1: sd v0, PT_R2(sp) # result | 115 | 1: sd v0, PT_R2(sp) # result |
| 115 | 116 | ||
| 116 | j syscall_exit | 117 | j syscall_exit |
| @@ -416,9 +417,12 @@ sys_call_table: | |||
| 416 | PTR sys_pipe2 | 417 | PTR sys_pipe2 |
| 417 | PTR sys_inotify_init1 | 418 | PTR sys_inotify_init1 |
| 418 | PTR sys_preadv | 419 | PTR sys_preadv |
| 419 | PTR sys_pwritev /* 5390 */ | 420 | PTR sys_pwritev /* 5290 */ |
| 420 | PTR sys_rt_tgsigqueueinfo | 421 | PTR sys_rt_tgsigqueueinfo |
| 421 | PTR sys_perf_event_open | 422 | PTR sys_perf_event_open |
| 422 | PTR sys_accept4 | 423 | PTR sys_accept4 |
| 423 | PTR sys_recvmmsg | 424 | PTR sys_recvmmsg |
| 425 | PTR sys_fanotify_init /* 5295 */ | ||
| 426 | PTR sys_fanotify_mark | ||
| 427 | PTR sys_prlimit64 | ||
| 424 | .size sys_call_table,.-sys_call_table | 428 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index a3d66137731a..f08ece6d8acc 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
| @@ -65,8 +65,9 @@ NESTED(handle_sysn32, PT_SIZE, sp) | |||
| 65 | sd t0, PT_R7(sp) # set error flag | 65 | sd t0, PT_R7(sp) # set error flag |
| 66 | beqz t0, 1f | 66 | beqz t0, 1f |
| 67 | 67 | ||
| 68 | ld t1, PT_R2(sp) # syscall number | ||
| 68 | dnegu v0 # error | 69 | dnegu v0 # error |
| 69 | sd v0, PT_R0(sp) # set flag for syscall restarting | 70 | sd t1, PT_R0(sp) # save it for syscall restarting |
| 70 | 1: sd v0, PT_R2(sp) # result | 71 | 1: sd v0, PT_R2(sp) # result |
| 71 | 72 | ||
| 72 | local_irq_disable # make sure need_resched and | 73 | local_irq_disable # make sure need_resched and |
| @@ -106,8 +107,9 @@ n32_syscall_trace_entry: | |||
| 106 | sd t0, PT_R7(sp) # set error flag | 107 | sd t0, PT_R7(sp) # set error flag |
| 107 | beqz t0, 1f | 108 | beqz t0, 1f |
| 108 | 109 | ||
| 110 | ld t1, PT_R2(sp) # syscall number | ||
| 109 | dnegu v0 # error | 111 | dnegu v0 # error |
| 110 | sd v0, PT_R0(sp) # set flag for syscall restarting | 112 | sd t1, PT_R0(sp) # save it for syscall restarting |
| 111 | 1: sd v0, PT_R2(sp) # result | 113 | 1: sd v0, PT_R2(sp) # result |
| 112 | 114 | ||
| 113 | j syscall_exit | 115 | j syscall_exit |
| @@ -320,10 +322,10 @@ EXPORT(sysn32_call_table) | |||
| 320 | PTR sys_cacheflush | 322 | PTR sys_cacheflush |
| 321 | PTR sys_cachectl | 323 | PTR sys_cachectl |
| 322 | PTR sys_sysmips | 324 | PTR sys_sysmips |
| 323 | PTR sys_io_setup /* 6200 */ | 325 | PTR compat_sys_io_setup /* 6200 */ |
| 324 | PTR sys_io_destroy | 326 | PTR sys_io_destroy |
| 325 | PTR sys_io_getevents | 327 | PTR compat_sys_io_getevents |
| 326 | PTR sys_io_submit | 328 | PTR compat_sys_io_submit |
| 327 | PTR sys_io_cancel | 329 | PTR sys_io_cancel |
| 328 | PTR sys_exit_group /* 6205 */ | 330 | PTR sys_exit_group /* 6205 */ |
| 329 | PTR sys_lookup_dcookie | 331 | PTR sys_lookup_dcookie |
| @@ -419,5 +421,8 @@ EXPORT(sysn32_call_table) | |||
| 419 | PTR sys_perf_event_open | 421 | PTR sys_perf_event_open |
| 420 | PTR sys_accept4 | 422 | PTR sys_accept4 |
| 421 | PTR compat_sys_recvmmsg | 423 | PTR compat_sys_recvmmsg |
| 422 | PTR sys_getdents | 424 | PTR sys_getdents64 |
| 425 | PTR sys_fanotify_init /* 6300 */ | ||
| 426 | PTR sys_fanotify_mark | ||
| 427 | PTR sys_prlimit64 | ||
| 423 | .size sysn32_call_table,.-sysn32_call_table | 428 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 813689ef2384..78d768a3e19d 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
| @@ -93,8 +93,9 @@ NESTED(handle_sys, PT_SIZE, sp) | |||
| 93 | sd t0, PT_R7(sp) # set error flag | 93 | sd t0, PT_R7(sp) # set error flag |
| 94 | beqz t0, 1f | 94 | beqz t0, 1f |
| 95 | 95 | ||
| 96 | ld t1, PT_R2(sp) # syscall number | ||
| 96 | dnegu v0 # error | 97 | dnegu v0 # error |
| 97 | sd v0, PT_R0(sp) # flag for syscall restarting | 98 | sd t1, PT_R0(sp) # save it for syscall restarting |
| 98 | 1: sd v0, PT_R2(sp) # result | 99 | 1: sd v0, PT_R2(sp) # result |
| 99 | 100 | ||
| 100 | o32_syscall_exit: | 101 | o32_syscall_exit: |
| @@ -142,8 +143,9 @@ trace_a_syscall: | |||
| 142 | sd t0, PT_R7(sp) # set error flag | 143 | sd t0, PT_R7(sp) # set error flag |
| 143 | beqz t0, 1f | 144 | beqz t0, 1f |
| 144 | 145 | ||
| 146 | ld t1, PT_R2(sp) # syscall number | ||
| 145 | dnegu v0 # error | 147 | dnegu v0 # error |
| 146 | sd v0, PT_R0(sp) # set flag for syscall restarting | 148 | sd t1, PT_R0(sp) # save it for syscall restarting |
| 147 | 1: sd v0, PT_R2(sp) # result | 149 | 1: sd v0, PT_R2(sp) # result |
| 148 | 150 | ||
| 149 | j syscall_exit | 151 | j syscall_exit |
| @@ -154,8 +156,7 @@ trace_a_syscall: | |||
| 154 | * The stackpointer for a call with more than 4 arguments is bad. | 156 | * The stackpointer for a call with more than 4 arguments is bad. |
| 155 | */ | 157 | */ |
| 156 | bad_stack: | 158 | bad_stack: |
| 157 | dnegu v0 # error | 159 | li v0, EFAULT |
| 158 | sd v0, PT_R0(sp) | ||
| 159 | sd v0, PT_R2(sp) | 160 | sd v0, PT_R2(sp) |
| 160 | li t0, 1 # set error flag | 161 | li t0, 1 # set error flag |
| 161 | sd t0, PT_R7(sp) | 162 | sd t0, PT_R7(sp) |
| @@ -444,10 +445,10 @@ sys_call_table: | |||
| 444 | PTR compat_sys_futex | 445 | PTR compat_sys_futex |
| 445 | PTR compat_sys_sched_setaffinity | 446 | PTR compat_sys_sched_setaffinity |
| 446 | PTR compat_sys_sched_getaffinity /* 4240 */ | 447 | PTR compat_sys_sched_getaffinity /* 4240 */ |
| 447 | PTR sys_io_setup | 448 | PTR compat_sys_io_setup |
| 448 | PTR sys_io_destroy | 449 | PTR sys_io_destroy |
| 449 | PTR sys_io_getevents | 450 | PTR compat_sys_io_getevents |
| 450 | PTR sys_io_submit | 451 | PTR compat_sys_io_submit |
| 451 | PTR sys_io_cancel /* 4245 */ | 452 | PTR sys_io_cancel /* 4245 */ |
| 452 | PTR sys_exit_group | 453 | PTR sys_exit_group |
| 453 | PTR sys32_lookup_dcookie | 454 | PTR sys32_lookup_dcookie |
| @@ -538,5 +539,8 @@ sys_call_table: | |||
| 538 | PTR compat_sys_rt_tgsigqueueinfo | 539 | PTR compat_sys_rt_tgsigqueueinfo |
| 539 | PTR sys_perf_event_open | 540 | PTR sys_perf_event_open |
| 540 | PTR sys_accept4 | 541 | PTR sys_accept4 |
| 541 | PTR compat_sys_recvmmsg | 542 | PTR compat_sys_recvmmsg /* 4335 */ |
| 543 | PTR sys_fanotify_init | ||
| 544 | PTR sys_32_fanotify_mark | ||
| 545 | PTR sys_prlimit64 | ||
| 542 | .size sys_call_table,.-sys_call_table | 546 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 2099d5a4c4b7..5922342bca39 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c | |||
| @@ -390,7 +390,6 @@ asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
| 390 | { | 390 | { |
| 391 | struct rt_sigframe __user *frame; | 391 | struct rt_sigframe __user *frame; |
| 392 | sigset_t set; | 392 | sigset_t set; |
| 393 | stack_t st; | ||
| 394 | int sig; | 393 | int sig; |
| 395 | 394 | ||
| 396 | frame = (struct rt_sigframe __user *) regs.regs[29]; | 395 | frame = (struct rt_sigframe __user *) regs.regs[29]; |
| @@ -411,11 +410,9 @@ asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
| 411 | else if (sig) | 410 | else if (sig) |
| 412 | force_sig(sig, current); | 411 | force_sig(sig, current); |
| 413 | 412 | ||
| 414 | if (__copy_from_user(&st, &frame->rs_uc.uc_stack, sizeof(st))) | ||
| 415 | goto badframe; | ||
| 416 | /* It is more difficult to avoid calling this function than to | 413 | /* It is more difficult to avoid calling this function than to |
| 417 | call it and ignore errors. */ | 414 | call it and ignore errors. */ |
| 418 | do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]); | 415 | do_sigaltstack(&frame->rs_uc.uc_stack, NULL, regs.regs[29]); |
| 419 | 416 | ||
| 420 | /* | 417 | /* |
| 421 | * Don't let your children do this ... | 418 | * Don't let your children do this ... |
| @@ -550,23 +547,26 @@ static int handle_signal(unsigned long sig, siginfo_t *info, | |||
| 550 | struct mips_abi *abi = current->thread.abi; | 547 | struct mips_abi *abi = current->thread.abi; |
| 551 | void *vdso = current->mm->context.vdso; | 548 | void *vdso = current->mm->context.vdso; |
| 552 | 549 | ||
| 553 | switch(regs->regs[0]) { | 550 | if (regs->regs[0]) { |
| 554 | case ERESTART_RESTARTBLOCK: | 551 | switch(regs->regs[2]) { |
| 555 | case ERESTARTNOHAND: | 552 | case ERESTART_RESTARTBLOCK: |
| 556 | regs->regs[2] = EINTR; | 553 | case ERESTARTNOHAND: |
| 557 | break; | ||
| 558 | case ERESTARTSYS: | ||
| 559 | if (!(ka->sa.sa_flags & SA_RESTART)) { | ||
| 560 | regs->regs[2] = EINTR; | 554 | regs->regs[2] = EINTR; |
| 561 | break; | 555 | break; |
| 556 | case ERESTARTSYS: | ||
| 557 | if (!(ka->sa.sa_flags & SA_RESTART)) { | ||
| 558 | regs->regs[2] = EINTR; | ||
| 559 | break; | ||
| 560 | } | ||
| 561 | /* fallthrough */ | ||
| 562 | case ERESTARTNOINTR: | ||
| 563 | regs->regs[7] = regs->regs[26]; | ||
| 564 | regs->regs[2] = regs->regs[0]; | ||
| 565 | regs->cp0_epc -= 4; | ||
| 562 | } | 566 | } |
| 563 | /* fallthrough */ | ||
| 564 | case ERESTARTNOINTR: /* Userland will reload $v0. */ | ||
| 565 | regs->regs[7] = regs->regs[26]; | ||
| 566 | regs->cp0_epc -= 8; | ||
| 567 | } | ||
| 568 | 567 | ||
| 569 | regs->regs[0] = 0; /* Don't deal with this again. */ | 568 | regs->regs[0] = 0; /* Don't deal with this again. */ |
| 569 | } | ||
| 570 | 570 | ||
| 571 | if (sig_uses_siginfo(ka)) | 571 | if (sig_uses_siginfo(ka)) |
| 572 | ret = abi->setup_rt_frame(vdso + abi->rt_signal_return_offset, | 572 | ret = abi->setup_rt_frame(vdso + abi->rt_signal_return_offset, |
| @@ -575,6 +575,9 @@ static int handle_signal(unsigned long sig, siginfo_t *info, | |||
| 575 | ret = abi->setup_frame(vdso + abi->signal_return_offset, | 575 | ret = abi->setup_frame(vdso + abi->signal_return_offset, |
| 576 | ka, regs, sig, oldset); | 576 | ka, regs, sig, oldset); |
| 577 | 577 | ||
| 578 | if (ret) | ||
| 579 | return ret; | ||
| 580 | |||
| 578 | spin_lock_irq(¤t->sighand->siglock); | 581 | spin_lock_irq(¤t->sighand->siglock); |
| 579 | sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); | 582 | sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); |
| 580 | if (!(ka->sa.sa_flags & SA_NODEFER)) | 583 | if (!(ka->sa.sa_flags & SA_NODEFER)) |
| @@ -622,17 +625,13 @@ static void do_signal(struct pt_regs *regs) | |||
| 622 | return; | 625 | return; |
| 623 | } | 626 | } |
| 624 | 627 | ||
| 625 | /* | ||
| 626 | * Who's code doesn't conform to the restartable syscall convention | ||
| 627 | * dies here!!! The li instruction, a single machine instruction, | ||
| 628 | * must directly be followed by the syscall instruction. | ||
| 629 | */ | ||
| 630 | if (regs->regs[0]) { | 628 | if (regs->regs[0]) { |
| 631 | if (regs->regs[2] == ERESTARTNOHAND || | 629 | if (regs->regs[2] == ERESTARTNOHAND || |
| 632 | regs->regs[2] == ERESTARTSYS || | 630 | regs->regs[2] == ERESTARTSYS || |
| 633 | regs->regs[2] == ERESTARTNOINTR) { | 631 | regs->regs[2] == ERESTARTNOINTR) { |
| 632 | regs->regs[2] = regs->regs[0]; | ||
| 634 | regs->regs[7] = regs->regs[26]; | 633 | regs->regs[7] = regs->regs[26]; |
| 635 | regs->cp0_epc -= 8; | 634 | regs->cp0_epc -= 4; |
| 636 | } | 635 | } |
| 637 | if (regs->regs[2] == ERESTART_RESTARTBLOCK) { | 636 | if (regs->regs[2] == ERESTART_RESTARTBLOCK) { |
| 638 | regs->regs[2] = current->thread.abi->restart; | 637 | regs->regs[2] = current->thread.abi->restart; |
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index 2c5df818c65a..ee24d814d5b9 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c | |||
| @@ -109,6 +109,7 @@ asmlinkage int sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | |||
| 109 | asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | 109 | asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) |
| 110 | { | 110 | { |
| 111 | struct rt_sigframe_n32 __user *frame; | 111 | struct rt_sigframe_n32 __user *frame; |
| 112 | mm_segment_t old_fs; | ||
| 112 | sigset_t set; | 113 | sigset_t set; |
| 113 | stack_t st; | 114 | stack_t st; |
| 114 | s32 sp; | 115 | s32 sp; |
| @@ -143,7 +144,11 @@ asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
| 143 | 144 | ||
| 144 | /* It is more difficult to avoid calling this function than to | 145 | /* It is more difficult to avoid calling this function than to |
| 145 | call it and ignore errors. */ | 146 | call it and ignore errors. */ |
| 147 | old_fs = get_fs(); | ||
| 148 | set_fs(KERNEL_DS); | ||
| 146 | do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]); | 149 | do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]); |
| 150 | set_fs(old_fs); | ||
| 151 | |||
| 147 | 152 | ||
| 148 | /* | 153 | /* |
| 149 | * Don't let your children do this ... | 154 | * Don't let your children do this ... |
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c index 69b039ca8d83..33d5a5ce4a29 100644 --- a/arch/mips/kernel/unaligned.c +++ b/arch/mips/kernel/unaligned.c | |||
| @@ -109,8 +109,6 @@ static void emulate_load_store_insn(struct pt_regs *regs, | |||
| 109 | unsigned long value; | 109 | unsigned long value; |
| 110 | unsigned int res; | 110 | unsigned int res; |
| 111 | 111 | ||
| 112 | regs->regs[0] = 0; | ||
| 113 | |||
| 114 | /* | 112 | /* |
| 115 | * This load never faults. | 113 | * This load never faults. |
| 116 | */ | 114 | */ |
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index 7ba890860d98..469d4019f795 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
| @@ -44,27 +44,39 @@ static inline int cpu_is_noncoherent_r10000(struct device *dev) | |||
| 44 | 44 | ||
| 45 | static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp) | 45 | static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp) |
| 46 | { | 46 | { |
| 47 | gfp_t dma_flag; | ||
| 48 | |||
| 47 | /* ignore region specifiers */ | 49 | /* ignore region specifiers */ |
| 48 | gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); | 50 | gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); |
| 49 | 51 | ||
| 50 | #ifdef CONFIG_ZONE_DMA | 52 | #ifdef CONFIG_ISA |
| 51 | if (dev == NULL) | 53 | if (dev == NULL) |
| 52 | gfp |= __GFP_DMA; | 54 | dma_flag = __GFP_DMA; |
| 53 | else if (dev->coherent_dma_mask < DMA_BIT_MASK(24)) | ||
| 54 | gfp |= __GFP_DMA; | ||
| 55 | else | 55 | else |
| 56 | #endif | 56 | #endif |
| 57 | #ifdef CONFIG_ZONE_DMA32 | 57 | #if defined(CONFIG_ZONE_DMA32) && defined(CONFIG_ZONE_DMA) |
| 58 | if (dev->coherent_dma_mask < DMA_BIT_MASK(32)) | 58 | if (dev->coherent_dma_mask < DMA_BIT_MASK(32)) |
| 59 | gfp |= __GFP_DMA32; | 59 | dma_flag = __GFP_DMA; |
| 60 | else if (dev->coherent_dma_mask < DMA_BIT_MASK(64)) | ||
| 61 | dma_flag = __GFP_DMA32; | ||
| 62 | else | ||
| 63 | #endif | ||
| 64 | #if defined(CONFIG_ZONE_DMA32) && !defined(CONFIG_ZONE_DMA) | ||
| 65 | if (dev->coherent_dma_mask < DMA_BIT_MASK(64)) | ||
| 66 | dma_flag = __GFP_DMA32; | ||
| 67 | else | ||
| 68 | #endif | ||
| 69 | #if defined(CONFIG_ZONE_DMA) && !defined(CONFIG_ZONE_DMA32) | ||
| 70 | if (dev->coherent_dma_mask < DMA_BIT_MASK(64)) | ||
| 71 | dma_flag = __GFP_DMA; | ||
| 60 | else | 72 | else |
| 61 | #endif | 73 | #endif |
| 62 | ; | 74 | dma_flag = 0; |
| 63 | 75 | ||
| 64 | /* Don't invoke OOM killer */ | 76 | /* Don't invoke OOM killer */ |
| 65 | gfp |= __GFP_NORETRY; | 77 | gfp |= __GFP_NORETRY; |
| 66 | 78 | ||
| 67 | return gfp; | 79 | return gfp | dma_flag; |
| 68 | } | 80 | } |
| 69 | 81 | ||
| 70 | void *dma_alloc_noncoherent(struct device *dev, size_t size, | 82 | void *dma_alloc_noncoherent(struct device *dev, size_t size, |
diff --git a/arch/mips/mm/sc-rm7k.c b/arch/mips/mm/sc-rm7k.c index 1ef75cd80a0d..274af3be1442 100644 --- a/arch/mips/mm/sc-rm7k.c +++ b/arch/mips/mm/sc-rm7k.c | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | #define tc_lsize 32 | 30 | #define tc_lsize 32 |
| 31 | 31 | ||
| 32 | extern unsigned long icache_way_size, dcache_way_size; | 32 | extern unsigned long icache_way_size, dcache_way_size; |
| 33 | unsigned long tcache_size; | 33 | static unsigned long tcache_size; |
| 34 | 34 | ||
| 35 | #include <asm/r4kcache.h> | 35 | #include <asm/r4kcache.h> |
| 36 | 36 | ||
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c index 15949b0be811..b79b24afe3a2 100644 --- a/arch/mips/mti-malta/malta-int.c +++ b/arch/mips/mti-malta/malta-int.c | |||
| @@ -385,6 +385,8 @@ static int __initdata msc_nr_eicirqs = ARRAY_SIZE(msc_eicirqmap); | |||
| 385 | */ | 385 | */ |
| 386 | 386 | ||
| 387 | #define GIC_CPU_NMI GIC_MAP_TO_NMI_MSK | 387 | #define GIC_CPU_NMI GIC_MAP_TO_NMI_MSK |
| 388 | #define X GIC_UNUSED | ||
| 389 | |||
| 388 | static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = { | 390 | static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = { |
| 389 | { X, X, X, X, 0 }, | 391 | { X, X, X, X, 0 }, |
| 390 | { X, X, X, X, 0 }, | 392 | { X, X, X, X, 0 }, |
| @@ -404,6 +406,7 @@ static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = { | |||
| 404 | { X, X, X, X, 0 }, | 406 | { X, X, X, X, 0 }, |
| 405 | /* The remainder of this table is initialised by fill_ipi_map */ | 407 | /* The remainder of this table is initialised by fill_ipi_map */ |
| 406 | }; | 408 | }; |
| 409 | #undef X | ||
| 407 | 410 | ||
| 408 | /* | 411 | /* |
| 409 | * GCMP needs to be detected before any SMP initialisation | 412 | * GCMP needs to be detected before any SMP initialisation |
diff --git a/arch/mips/pci/pci-rc32434.c b/arch/mips/pci/pci-rc32434.c index 71f7d27b0d4c..f31218e17d3c 100644 --- a/arch/mips/pci/pci-rc32434.c +++ b/arch/mips/pci/pci-rc32434.c | |||
| @@ -118,7 +118,7 @@ static int __init rc32434_pcibridge_init(void) | |||
| 118 | if (!((pcicvalue == PCIM_H_EA) || | 118 | if (!((pcicvalue == PCIM_H_EA) || |
| 119 | (pcicvalue == PCIM_H_IA_FIX) || | 119 | (pcicvalue == PCIM_H_IA_FIX) || |
| 120 | (pcicvalue == PCIM_H_IA_RR))) { | 120 | (pcicvalue == PCIM_H_IA_RR))) { |
| 121 | pr_err(KERN_ERR "PCI init error!!!\n"); | 121 | pr_err("PCI init error!!!\n"); |
| 122 | /* Not in Host Mode, return ERROR */ | 122 | /* Not in Host Mode, return ERROR */ |
| 123 | return -1; | 123 | return -1; |
| 124 | } | 124 | } |
diff --git a/arch/mips/pnx8550/common/reset.c b/arch/mips/pnx8550/common/reset.c index fadd8744a6bc..e7a12ff304b9 100644 --- a/arch/mips/pnx8550/common/reset.c +++ b/arch/mips/pnx8550/common/reset.c | |||
| @@ -22,29 +22,19 @@ | |||
| 22 | */ | 22 | */ |
| 23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
| 24 | 24 | ||
| 25 | #include <asm/processor.h> | ||
| 25 | #include <asm/reboot.h> | 26 | #include <asm/reboot.h> |
| 26 | #include <glb.h> | 27 | #include <glb.h> |
| 27 | 28 | ||
| 28 | void pnx8550_machine_restart(char *command) | 29 | void pnx8550_machine_restart(char *command) |
| 29 | { | 30 | { |
| 30 | char head[] = "************* Machine restart *************"; | ||
| 31 | char foot[] = "*******************************************"; | ||
| 32 | |||
| 33 | printk("\n\n"); | ||
| 34 | printk("%s\n", head); | ||
| 35 | if (command != NULL) | ||
| 36 | printk("* %s\n", command); | ||
| 37 | printk("%s\n", foot); | ||
| 38 | |||
| 39 | PNX8550_RST_CTL = PNX8550_RST_DO_SW_RST; | 31 | PNX8550_RST_CTL = PNX8550_RST_DO_SW_RST; |
| 40 | } | 32 | } |
| 41 | 33 | ||
| 42 | void pnx8550_machine_halt(void) | 34 | void pnx8550_machine_halt(void) |
| 43 | { | 35 | { |
| 44 | printk("*** Machine halt. (Not implemented) ***\n"); | 36 | while (1) { |
| 45 | } | 37 | if (cpu_wait) |
| 46 | 38 | cpu_wait(); | |
| 47 | void pnx8550_machine_power_off(void) | 39 | } |
| 48 | { | ||
| 49 | printk("*** Machine power off. (Not implemented) ***\n"); | ||
| 50 | } | 40 | } |
diff --git a/arch/mips/pnx8550/common/setup.c b/arch/mips/pnx8550/common/setup.c index 64246c9c875c..43cb3945fdbf 100644 --- a/arch/mips/pnx8550/common/setup.c +++ b/arch/mips/pnx8550/common/setup.c | |||
| @@ -44,7 +44,6 @@ | |||
| 44 | extern void __init board_setup(void); | 44 | extern void __init board_setup(void); |
| 45 | extern void pnx8550_machine_restart(char *); | 45 | extern void pnx8550_machine_restart(char *); |
| 46 | extern void pnx8550_machine_halt(void); | 46 | extern void pnx8550_machine_halt(void); |
| 47 | extern void pnx8550_machine_power_off(void); | ||
| 48 | extern struct resource ioport_resource; | 47 | extern struct resource ioport_resource; |
| 49 | extern struct resource iomem_resource; | 48 | extern struct resource iomem_resource; |
| 50 | extern char *prom_getcmdline(void); | 49 | extern char *prom_getcmdline(void); |
| @@ -100,7 +99,7 @@ void __init plat_mem_setup(void) | |||
| 100 | 99 | ||
| 101 | _machine_restart = pnx8550_machine_restart; | 100 | _machine_restart = pnx8550_machine_restart; |
| 102 | _machine_halt = pnx8550_machine_halt; | 101 | _machine_halt = pnx8550_machine_halt; |
| 103 | pm_power_off = pnx8550_machine_power_off; | 102 | pm_power_off = pnx8550_machine_halt; |
| 104 | 103 | ||
| 105 | /* Clear the Global 2 Register, PCI Inta Output Enable Registers | 104 | /* Clear the Global 2 Register, PCI Inta Output Enable Registers |
| 106 | Bit 1:Enable DAC Powerdown | 105 | Bit 1:Enable DAC Powerdown |
diff --git a/arch/mn10300/kernel/module.c b/arch/mn10300/kernel/module.c index 6aea7fd76993..196a111e2e29 100644 --- a/arch/mn10300/kernel/module.c +++ b/arch/mn10300/kernel/module.c | |||
| @@ -206,7 +206,7 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 206 | const Elf_Shdr *sechdrs, | 206 | const Elf_Shdr *sechdrs, |
| 207 | struct module *me) | 207 | struct module *me) |
| 208 | { | 208 | { |
| 209 | return module_bug_finalize(hdr, sechdrs, me); | 209 | return 0; |
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | /* | 212 | /* |
| @@ -214,5 +214,4 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 214 | */ | 214 | */ |
| 215 | void module_arch_cleanup(struct module *mod) | 215 | void module_arch_cleanup(struct module *mod) |
| 216 | { | 216 | { |
| 217 | module_bug_cleanup(mod); | ||
| 218 | } | 217 | } |
diff --git a/arch/mn10300/mm/Makefile b/arch/mn10300/mm/Makefile index 28b9d983db0c..1557277fbc5c 100644 --- a/arch/mn10300/mm/Makefile +++ b/arch/mn10300/mm/Makefile | |||
| @@ -2,13 +2,11 @@ | |||
| 2 | # Makefile for the MN10300-specific memory management code | 2 | # Makefile for the MN10300-specific memory management code |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | cacheflush-y := cache.o cache-mn10300.o | ||
| 6 | cacheflush-$(CONFIG_MN10300_CACHE_WBACK) += cache-flush-mn10300.o | ||
| 7 | |||
| 8 | cacheflush-$(CONFIG_MN10300_CACHE_DISABLED) := cache-disabled.o | ||
| 9 | |||
| 5 | obj-y := \ | 10 | obj-y := \ |
| 6 | init.o fault.o pgtable.o extable.o tlb-mn10300.o mmu-context.o \ | 11 | init.o fault.o pgtable.o extable.o tlb-mn10300.o mmu-context.o \ |
| 7 | misalignment.o dma-alloc.o | 12 | misalignment.o dma-alloc.o $(cacheflush-y) |
| 8 | |||
| 9 | ifneq ($(CONFIG_MN10300_CACHE_DISABLED),y) | ||
| 10 | obj-y += cache.o cache-mn10300.o | ||
| 11 | ifeq ($(CONFIG_MN10300_CACHE_WBACK),y) | ||
| 12 | obj-y += cache-flush-mn10300.o | ||
| 13 | endif | ||
| 14 | endif | ||
diff --git a/arch/mn10300/mm/cache-disabled.c b/arch/mn10300/mm/cache-disabled.c new file mode 100644 index 000000000000..f669ea42aba6 --- /dev/null +++ b/arch/mn10300/mm/cache-disabled.c | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* Handle the cache being disabled | ||
| 2 | * | ||
| 3 | * Copyright (C) 2010 Red Hat, Inc. All Rights Reserved. | ||
| 4 | * Written by David Howells (dhowells@redhat.com) | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public Licence | ||
| 8 | * as published by the Free Software Foundation; either version | ||
| 9 | * 2 of the Licence, or (at your option) any later version. | ||
| 10 | */ | ||
| 11 | #include <linux/mm.h> | ||
| 12 | |||
| 13 | /* | ||
| 14 | * allow userspace to flush the instruction cache | ||
| 15 | */ | ||
| 16 | asmlinkage long sys_cacheflush(unsigned long start, unsigned long end) | ||
| 17 | { | ||
| 18 | if (end < start) | ||
| 19 | return -EINVAL; | ||
| 20 | return 0; | ||
| 21 | } | ||
diff --git a/arch/mn10300/mm/cache.c b/arch/mn10300/mm/cache.c index 1b76719ec1c3..9261217e8d2c 100644 --- a/arch/mn10300/mm/cache.c +++ b/arch/mn10300/mm/cache.c | |||
| @@ -54,13 +54,30 @@ EXPORT_SYMBOL(flush_icache_page); | |||
| 54 | void flush_icache_range(unsigned long start, unsigned long end) | 54 | void flush_icache_range(unsigned long start, unsigned long end) |
| 55 | { | 55 | { |
| 56 | #ifdef CONFIG_MN10300_CACHE_WBACK | 56 | #ifdef CONFIG_MN10300_CACHE_WBACK |
| 57 | unsigned long addr, size, off; | 57 | unsigned long addr, size, base, off; |
| 58 | struct page *page; | 58 | struct page *page; |
| 59 | pgd_t *pgd; | 59 | pgd_t *pgd; |
| 60 | pud_t *pud; | 60 | pud_t *pud; |
| 61 | pmd_t *pmd; | 61 | pmd_t *pmd; |
| 62 | pte_t *ppte, pte; | 62 | pte_t *ppte, pte; |
| 63 | 63 | ||
| 64 | if (end > 0x80000000UL) { | ||
| 65 | /* addresses above 0xa0000000 do not go through the cache */ | ||
| 66 | if (end > 0xa0000000UL) { | ||
| 67 | end = 0xa0000000UL; | ||
| 68 | if (start >= end) | ||
| 69 | return; | ||
| 70 | } | ||
| 71 | |||
| 72 | /* kernel addresses between 0x80000000 and 0x9fffffff do not | ||
| 73 | * require page tables, so we just map such addresses directly */ | ||
| 74 | base = (start >= 0x80000000UL) ? start : 0x80000000UL; | ||
| 75 | mn10300_dcache_flush_range(base, end); | ||
| 76 | if (base == start) | ||
| 77 | goto invalidate; | ||
| 78 | end = base; | ||
| 79 | } | ||
| 80 | |||
| 64 | for (; start < end; start += size) { | 81 | for (; start < end; start += size) { |
| 65 | /* work out how much of the page to flush */ | 82 | /* work out how much of the page to flush */ |
| 66 | off = start & (PAGE_SIZE - 1); | 83 | off = start & (PAGE_SIZE - 1); |
| @@ -104,6 +121,7 @@ void flush_icache_range(unsigned long start, unsigned long end) | |||
| 104 | } | 121 | } |
| 105 | #endif | 122 | #endif |
| 106 | 123 | ||
| 124 | invalidate: | ||
| 107 | mn10300_icache_inv(); | 125 | mn10300_icache_inv(); |
| 108 | } | 126 | } |
| 109 | EXPORT_SYMBOL(flush_icache_range); | 127 | EXPORT_SYMBOL(flush_icache_range); |
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index 159a2b81e90c..6e81bb596e5b 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c | |||
| @@ -941,11 +941,10 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 941 | nsyms = newptr - (Elf_Sym *)symhdr->sh_addr; | 941 | nsyms = newptr - (Elf_Sym *)symhdr->sh_addr; |
| 942 | DEBUGP("NEW num_symtab %lu\n", nsyms); | 942 | DEBUGP("NEW num_symtab %lu\n", nsyms); |
| 943 | symhdr->sh_size = nsyms * sizeof(Elf_Sym); | 943 | symhdr->sh_size = nsyms * sizeof(Elf_Sym); |
| 944 | return module_bug_finalize(hdr, sechdrs, me); | 944 | return 0; |
| 945 | } | 945 | } |
| 946 | 946 | ||
| 947 | void module_arch_cleanup(struct module *mod) | 947 | void module_arch_cleanup(struct module *mod) |
| 948 | { | 948 | { |
| 949 | deregister_unwind_table(mod); | 949 | deregister_unwind_table(mod); |
| 950 | module_bug_cleanup(mod); | ||
| 951 | } | 950 | } |
diff --git a/arch/powerpc/kernel/module.c b/arch/powerpc/kernel/module.c index 477c663e0140..49cee9df225b 100644 --- a/arch/powerpc/kernel/module.c +++ b/arch/powerpc/kernel/module.c | |||
| @@ -63,11 +63,6 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 63 | const Elf_Shdr *sechdrs, struct module *me) | 63 | const Elf_Shdr *sechdrs, struct module *me) |
| 64 | { | 64 | { |
| 65 | const Elf_Shdr *sect; | 65 | const Elf_Shdr *sect; |
| 66 | int err; | ||
| 67 | |||
| 68 | err = module_bug_finalize(hdr, sechdrs, me); | ||
| 69 | if (err) | ||
| 70 | return err; | ||
| 71 | 66 | ||
| 72 | /* Apply feature fixups */ | 67 | /* Apply feature fixups */ |
| 73 | sect = find_section(hdr, sechdrs, "__ftr_fixup"); | 68 | sect = find_section(hdr, sechdrs, "__ftr_fixup"); |
| @@ -101,5 +96,4 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 101 | 96 | ||
| 102 | void module_arch_cleanup(struct module *mod) | 97 | void module_arch_cleanup(struct module *mod) |
| 103 | { | 98 | { |
| 104 | module_bug_cleanup(mod); | ||
| 105 | } | 99 | } |
diff --git a/arch/powerpc/platforms/512x/clock.c b/arch/powerpc/platforms/512x/clock.c index 5b243bd3eb3b..3dc2a8d262b8 100644 --- a/arch/powerpc/platforms/512x/clock.c +++ b/arch/powerpc/platforms/512x/clock.c | |||
| @@ -57,7 +57,7 @@ static struct clk *mpc5121_clk_get(struct device *dev, const char *id) | |||
| 57 | int id_match = 0; | 57 | int id_match = 0; |
| 58 | 58 | ||
| 59 | if (dev == NULL || id == NULL) | 59 | if (dev == NULL || id == NULL) |
| 60 | return NULL; | 60 | return clk; |
| 61 | 61 | ||
| 62 | mutex_lock(&clocks_mutex); | 62 | mutex_lock(&clocks_mutex); |
| 63 | list_for_each_entry(p, &clocks, node) { | 63 | list_for_each_entry(p, &clocks, node) { |
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c index 45c0cb9b67e6..18c104820198 100644 --- a/arch/powerpc/platforms/52xx/efika.c +++ b/arch/powerpc/platforms/52xx/efika.c | |||
| @@ -99,7 +99,7 @@ static void __init efika_pcisetup(void) | |||
| 99 | if (bus_range == NULL || len < 2 * sizeof(int)) { | 99 | if (bus_range == NULL || len < 2 * sizeof(int)) { |
| 100 | printk(KERN_WARNING EFIKA_PLATFORM_NAME | 100 | printk(KERN_WARNING EFIKA_PLATFORM_NAME |
| 101 | ": Can't get bus-range for %s\n", pcictrl->full_name); | 101 | ": Can't get bus-range for %s\n", pcictrl->full_name); |
| 102 | return; | 102 | goto out_put; |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | if (bus_range[1] == bus_range[0]) | 105 | if (bus_range[1] == bus_range[0]) |
| @@ -111,12 +111,12 @@ static void __init efika_pcisetup(void) | |||
| 111 | printk(" controlled by %s\n", pcictrl->full_name); | 111 | printk(" controlled by %s\n", pcictrl->full_name); |
| 112 | printk("\n"); | 112 | printk("\n"); |
| 113 | 113 | ||
| 114 | hose = pcibios_alloc_controller(of_node_get(pcictrl)); | 114 | hose = pcibios_alloc_controller(pcictrl); |
| 115 | if (!hose) { | 115 | if (!hose) { |
| 116 | printk(KERN_WARNING EFIKA_PLATFORM_NAME | 116 | printk(KERN_WARNING EFIKA_PLATFORM_NAME |
| 117 | ": Can't allocate PCI controller structure for %s\n", | 117 | ": Can't allocate PCI controller structure for %s\n", |
| 118 | pcictrl->full_name); | 118 | pcictrl->full_name); |
| 119 | return; | 119 | goto out_put; |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | hose->first_busno = bus_range[0]; | 122 | hose->first_busno = bus_range[0]; |
| @@ -124,6 +124,9 @@ static void __init efika_pcisetup(void) | |||
| 124 | hose->ops = &rtas_pci_ops; | 124 | hose->ops = &rtas_pci_ops; |
| 125 | 125 | ||
| 126 | pci_process_bridge_OF_ranges(hose, pcictrl, 0); | 126 | pci_process_bridge_OF_ranges(hose, pcictrl, 0); |
| 127 | return; | ||
| 128 | out_put: | ||
| 129 | of_node_put(pcictrl); | ||
| 127 | } | 130 | } |
| 128 | 131 | ||
| 129 | #else | 132 | #else |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c index 6e905314ad5d..41f3a7eda1de 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_common.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c | |||
| @@ -325,12 +325,16 @@ int mpc5200_psc_ac97_gpio_reset(int psc_number) | |||
| 325 | clrbits32(&simple_gpio->simple_dvo, sync | out); | 325 | clrbits32(&simple_gpio->simple_dvo, sync | out); |
| 326 | clrbits8(&wkup_gpio->wkup_dvo, reset); | 326 | clrbits8(&wkup_gpio->wkup_dvo, reset); |
| 327 | 327 | ||
| 328 | /* wait at lease 1 us */ | 328 | /* wait for 1 us */ |
| 329 | udelay(2); | 329 | udelay(1); |
| 330 | 330 | ||
| 331 | /* Deassert reset */ | 331 | /* Deassert reset */ |
| 332 | setbits8(&wkup_gpio->wkup_dvo, reset); | 332 | setbits8(&wkup_gpio->wkup_dvo, reset); |
| 333 | 333 | ||
| 334 | /* wait at least 200ns */ | ||
| 335 | /* 7 ~= (200ns * timebase) / ns2sec */ | ||
| 336 | __delay(7); | ||
| 337 | |||
| 334 | /* Restore pin-muxing */ | 338 | /* Restore pin-muxing */ |
| 335 | out_be32(&simple_gpio->port_config, mux); | 339 | out_be32(&simple_gpio->port_config, mux); |
| 336 | 340 | ||
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c index 22cfd634c355..f7167ee4604c 100644 --- a/arch/s390/kernel/module.c +++ b/arch/s390/kernel/module.c | |||
| @@ -407,10 +407,9 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 407 | { | 407 | { |
| 408 | vfree(me->arch.syminfo); | 408 | vfree(me->arch.syminfo); |
| 409 | me->arch.syminfo = NULL; | 409 | me->arch.syminfo = NULL; |
| 410 | return module_bug_finalize(hdr, sechdrs, me); | 410 | return 0; |
| 411 | } | 411 | } |
| 412 | 412 | ||
| 413 | void module_arch_cleanup(struct module *mod) | 413 | void module_arch_cleanup(struct module *mod) |
| 414 | { | 414 | { |
| 415 | module_bug_cleanup(mod); | ||
| 416 | } | 415 | } |
diff --git a/arch/sh/kernel/module.c b/arch/sh/kernel/module.c index 43adddfe4c04..ae0be697a89e 100644 --- a/arch/sh/kernel/module.c +++ b/arch/sh/kernel/module.c | |||
| @@ -149,13 +149,11 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 149 | int ret = 0; | 149 | int ret = 0; |
| 150 | 150 | ||
| 151 | ret |= module_dwarf_finalize(hdr, sechdrs, me); | 151 | ret |= module_dwarf_finalize(hdr, sechdrs, me); |
| 152 | ret |= module_bug_finalize(hdr, sechdrs, me); | ||
| 153 | 152 | ||
| 154 | return ret; | 153 | return ret; |
| 155 | } | 154 | } |
| 156 | 155 | ||
| 157 | void module_arch_cleanup(struct module *mod) | 156 | void module_arch_cleanup(struct module *mod) |
| 158 | { | 157 | { |
| 159 | module_bug_cleanup(mod); | ||
| 160 | module_dwarf_cleanup(mod); | 158 | module_dwarf_cleanup(mod); |
| 161 | } | 159 | } |
diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c index 0c46e398cd8f..63c740a85b4c 100644 --- a/arch/um/drivers/hostaudio_kern.c +++ b/arch/um/drivers/hostaudio_kern.c | |||
| @@ -40,6 +40,11 @@ static char *mixer = HOSTAUDIO_DEV_MIXER; | |||
| 40 | " This is used to specify the host mixer device to the hostaudio driver.\n"\ | 40 | " This is used to specify the host mixer device to the hostaudio driver.\n"\ |
| 41 | " The default is \"" HOSTAUDIO_DEV_MIXER "\".\n\n" | 41 | " The default is \"" HOSTAUDIO_DEV_MIXER "\".\n\n" |
| 42 | 42 | ||
| 43 | module_param(dsp, charp, 0644); | ||
| 44 | MODULE_PARM_DESC(dsp, DSP_HELP); | ||
| 45 | module_param(mixer, charp, 0644); | ||
| 46 | MODULE_PARM_DESC(mixer, MIXER_HELP); | ||
| 47 | |||
| 43 | #ifndef MODULE | 48 | #ifndef MODULE |
| 44 | static int set_dsp(char *name, int *add) | 49 | static int set_dsp(char *name, int *add) |
| 45 | { | 50 | { |
| @@ -56,15 +61,6 @@ static int set_mixer(char *name, int *add) | |||
| 56 | } | 61 | } |
| 57 | 62 | ||
| 58 | __uml_setup("mixer=", set_mixer, "mixer=<mixer device>\n" MIXER_HELP); | 63 | __uml_setup("mixer=", set_mixer, "mixer=<mixer device>\n" MIXER_HELP); |
| 59 | |||
| 60 | #else /*MODULE*/ | ||
| 61 | |||
| 62 | module_param(dsp, charp, 0644); | ||
| 63 | MODULE_PARM_DESC(dsp, DSP_HELP); | ||
| 64 | |||
| 65 | module_param(mixer, charp, 0644); | ||
| 66 | MODULE_PARM_DESC(mixer, MIXER_HELP); | ||
| 67 | |||
| 68 | #endif | 64 | #endif |
| 69 | 65 | ||
| 70 | /* /dev/dsp file operations */ | 66 | /* /dev/dsp file operations */ |
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 2ab233ba32c1..47d0c37897d5 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
| @@ -255,18 +255,6 @@ static void uml_net_tx_timeout(struct net_device *dev) | |||
| 255 | netif_wake_queue(dev); | 255 | netif_wake_queue(dev); |
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | static int uml_net_set_mac(struct net_device *dev, void *addr) | ||
| 259 | { | ||
| 260 | struct uml_net_private *lp = netdev_priv(dev); | ||
| 261 | struct sockaddr *hwaddr = addr; | ||
| 262 | |||
| 263 | spin_lock_irq(&lp->lock); | ||
| 264 | eth_mac_addr(dev, hwaddr->sa_data); | ||
| 265 | spin_unlock_irq(&lp->lock); | ||
| 266 | |||
| 267 | return 0; | ||
| 268 | } | ||
| 269 | |||
| 270 | static int uml_net_change_mtu(struct net_device *dev, int new_mtu) | 258 | static int uml_net_change_mtu(struct net_device *dev, int new_mtu) |
| 271 | { | 259 | { |
| 272 | dev->mtu = new_mtu; | 260 | dev->mtu = new_mtu; |
| @@ -373,7 +361,7 @@ static const struct net_device_ops uml_netdev_ops = { | |||
| 373 | .ndo_start_xmit = uml_net_start_xmit, | 361 | .ndo_start_xmit = uml_net_start_xmit, |
| 374 | .ndo_set_multicast_list = uml_net_set_multicast_list, | 362 | .ndo_set_multicast_list = uml_net_set_multicast_list, |
| 375 | .ndo_tx_timeout = uml_net_tx_timeout, | 363 | .ndo_tx_timeout = uml_net_tx_timeout, |
| 376 | .ndo_set_mac_address = uml_net_set_mac, | 364 | .ndo_set_mac_address = eth_mac_addr, |
| 377 | .ndo_change_mtu = uml_net_change_mtu, | 365 | .ndo_change_mtu = uml_net_change_mtu, |
| 378 | .ndo_validate_addr = eth_validate_addr, | 366 | .ndo_validate_addr = eth_validate_addr, |
| 379 | }; | 367 | }; |
| @@ -472,7 +460,8 @@ static void eth_configure(int n, void *init, char *mac, | |||
| 472 | ((*transport->user->init)(&lp->user, dev) != 0)) | 460 | ((*transport->user->init)(&lp->user, dev) != 0)) |
| 473 | goto out_unregister; | 461 | goto out_unregister; |
| 474 | 462 | ||
| 475 | eth_mac_addr(dev, device->mac); | 463 | /* don't use eth_mac_addr, it will not work here */ |
| 464 | memcpy(dev->dev_addr, device->mac, ETH_ALEN); | ||
| 476 | dev->mtu = transport->user->mtu; | 465 | dev->mtu = transport->user->mtu; |
| 477 | dev->netdev_ops = ¨_netdev_ops; | 466 | dev->netdev_ops = ¨_netdev_ops; |
| 478 | dev->ethtool_ops = ¨_net_ethtool_ops; | 467 | dev->ethtool_ops = ¨_net_ethtool_ops; |
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 1bcd208c459f..9734994cba1e 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
| @@ -163,6 +163,7 @@ struct ubd { | |||
| 163 | struct scatterlist sg[MAX_SG]; | 163 | struct scatterlist sg[MAX_SG]; |
| 164 | struct request *request; | 164 | struct request *request; |
| 165 | int start_sg, end_sg; | 165 | int start_sg, end_sg; |
| 166 | sector_t rq_pos; | ||
| 166 | }; | 167 | }; |
| 167 | 168 | ||
| 168 | #define DEFAULT_COW { \ | 169 | #define DEFAULT_COW { \ |
| @@ -187,6 +188,7 @@ struct ubd { | |||
| 187 | .request = NULL, \ | 188 | .request = NULL, \ |
| 188 | .start_sg = 0, \ | 189 | .start_sg = 0, \ |
| 189 | .end_sg = 0, \ | 190 | .end_sg = 0, \ |
| 191 | .rq_pos = 0, \ | ||
| 190 | } | 192 | } |
| 191 | 193 | ||
| 192 | /* Protected by ubd_lock */ | 194 | /* Protected by ubd_lock */ |
| @@ -1228,7 +1230,6 @@ static void do_ubd_request(struct request_queue *q) | |||
| 1228 | { | 1230 | { |
| 1229 | struct io_thread_req *io_req; | 1231 | struct io_thread_req *io_req; |
| 1230 | struct request *req; | 1232 | struct request *req; |
| 1231 | sector_t sector; | ||
| 1232 | int n; | 1233 | int n; |
| 1233 | 1234 | ||
| 1234 | while(1){ | 1235 | while(1){ |
| @@ -1239,12 +1240,12 @@ static void do_ubd_request(struct request_queue *q) | |||
| 1239 | return; | 1240 | return; |
| 1240 | 1241 | ||
| 1241 | dev->request = req; | 1242 | dev->request = req; |
| 1243 | dev->rq_pos = blk_rq_pos(req); | ||
| 1242 | dev->start_sg = 0; | 1244 | dev->start_sg = 0; |
| 1243 | dev->end_sg = blk_rq_map_sg(q, req, dev->sg); | 1245 | dev->end_sg = blk_rq_map_sg(q, req, dev->sg); |
| 1244 | } | 1246 | } |
| 1245 | 1247 | ||
| 1246 | req = dev->request; | 1248 | req = dev->request; |
| 1247 | sector = blk_rq_pos(req); | ||
| 1248 | while(dev->start_sg < dev->end_sg){ | 1249 | while(dev->start_sg < dev->end_sg){ |
| 1249 | struct scatterlist *sg = &dev->sg[dev->start_sg]; | 1250 | struct scatterlist *sg = &dev->sg[dev->start_sg]; |
| 1250 | 1251 | ||
| @@ -1256,10 +1257,9 @@ static void do_ubd_request(struct request_queue *q) | |||
| 1256 | return; | 1257 | return; |
| 1257 | } | 1258 | } |
| 1258 | prepare_request(req, io_req, | 1259 | prepare_request(req, io_req, |
| 1259 | (unsigned long long)sector << 9, | 1260 | (unsigned long long)dev->rq_pos << 9, |
| 1260 | sg->offset, sg->length, sg_page(sg)); | 1261 | sg->offset, sg->length, sg_page(sg)); |
| 1261 | 1262 | ||
| 1262 | sector += sg->length >> 9; | ||
| 1263 | n = os_write_file(thread_fd, &io_req, | 1263 | n = os_write_file(thread_fd, &io_req, |
| 1264 | sizeof(struct io_thread_req *)); | 1264 | sizeof(struct io_thread_req *)); |
| 1265 | if(n != sizeof(struct io_thread_req *)){ | 1265 | if(n != sizeof(struct io_thread_req *)){ |
| @@ -1272,6 +1272,7 @@ static void do_ubd_request(struct request_queue *q) | |||
| 1272 | return; | 1272 | return; |
| 1273 | } | 1273 | } |
| 1274 | 1274 | ||
| 1275 | dev->rq_pos += sg->length >> 9; | ||
| 1275 | dev->start_sg++; | 1276 | dev->start_sg++; |
| 1276 | } | 1277 | } |
| 1277 | dev->end_sg = 0; | 1278 | dev->end_sg = 0; |
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index 0350311906ae..2d93bdbc9ac0 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | #include <asm/ia32.h> | 34 | #include <asm/ia32.h> |
| 35 | 35 | ||
| 36 | #undef WARN_OLD | 36 | #undef WARN_OLD |
| 37 | #undef CORE_DUMP /* probably broken */ | 37 | #undef CORE_DUMP /* definitely broken */ |
| 38 | 38 | ||
| 39 | static int load_aout_binary(struct linux_binprm *, struct pt_regs *regs); | 39 | static int load_aout_binary(struct linux_binprm *, struct pt_regs *regs); |
| 40 | static int load_aout_library(struct file *); | 40 | static int load_aout_library(struct file *); |
| @@ -131,21 +131,15 @@ static void set_brk(unsigned long start, unsigned long end) | |||
| 131 | * macros to write out all the necessary info. | 131 | * macros to write out all the necessary info. |
| 132 | */ | 132 | */ |
| 133 | 133 | ||
| 134 | static int dump_write(struct file *file, const void *addr, int nr) | 134 | #include <linux/coredump.h> |
| 135 | { | ||
| 136 | return file->f_op->write(file, addr, nr, &file->f_pos) == nr; | ||
| 137 | } | ||
| 138 | 135 | ||
| 139 | #define DUMP_WRITE(addr, nr) \ | 136 | #define DUMP_WRITE(addr, nr) \ |
| 140 | if (!dump_write(file, (void *)(addr), (nr))) \ | 137 | if (!dump_write(file, (void *)(addr), (nr))) \ |
| 141 | goto end_coredump; | 138 | goto end_coredump; |
| 142 | 139 | ||
| 143 | #define DUMP_SEEK(offset) \ | 140 | #define DUMP_SEEK(offset) \ |
| 144 | if (file->f_op->llseek) { \ | 141 | if (!dump_seek(file, offset)) \ |
| 145 | if (file->f_op->llseek(file, (offset), 0) != (offset)) \ | 142 | goto end_coredump; |
| 146 | goto end_coredump; \ | ||
| 147 | } else \ | ||
| 148 | file->f_pos = (offset) | ||
| 149 | 143 | ||
| 150 | #define START_DATA() (u.u_tsize << PAGE_SHIFT) | 144 | #define START_DATA() (u.u_tsize << PAGE_SHIFT) |
| 151 | #define START_STACK(u) (u.start_stack) | 145 | #define START_STACK(u) (u.start_stack) |
| @@ -217,12 +211,6 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, | |||
| 217 | dump_size = dump.u_ssize << PAGE_SHIFT; | 211 | dump_size = dump.u_ssize << PAGE_SHIFT; |
| 218 | DUMP_WRITE(dump_start, dump_size); | 212 | DUMP_WRITE(dump_start, dump_size); |
| 219 | } | 213 | } |
| 220 | /* | ||
| 221 | * Finally dump the task struct. Not be used by gdb, but | ||
| 222 | * could be useful | ||
| 223 | */ | ||
| 224 | set_fs(KERNEL_DS); | ||
| 225 | DUMP_WRITE(current, sizeof(*current)); | ||
| 226 | end_coredump: | 214 | end_coredump: |
| 227 | set_fs(fs); | 215 | set_fs(fs); |
| 228 | return has_dumped; | 216 | return has_dumped; |
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 502e53f999cf..c52e2eb40a1e 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
| @@ -652,20 +652,6 @@ static inline struct kvm_mmu_page *page_header(hpa_t shadow_page) | |||
| 652 | return (struct kvm_mmu_page *)page_private(page); | 652 | return (struct kvm_mmu_page *)page_private(page); |
| 653 | } | 653 | } |
| 654 | 654 | ||
| 655 | static inline u16 kvm_read_fs(void) | ||
| 656 | { | ||
| 657 | u16 seg; | ||
| 658 | asm("mov %%fs, %0" : "=g"(seg)); | ||
| 659 | return seg; | ||
| 660 | } | ||
| 661 | |||
| 662 | static inline u16 kvm_read_gs(void) | ||
| 663 | { | ||
| 664 | u16 seg; | ||
| 665 | asm("mov %%gs, %0" : "=g"(seg)); | ||
| 666 | return seg; | ||
| 667 | } | ||
| 668 | |||
| 669 | static inline u16 kvm_read_ldt(void) | 655 | static inline u16 kvm_read_ldt(void) |
| 670 | { | 656 | { |
| 671 | u16 ldt; | 657 | u16 ldt; |
| @@ -673,16 +659,6 @@ static inline u16 kvm_read_ldt(void) | |||
| 673 | return ldt; | 659 | return ldt; |
| 674 | } | 660 | } |
| 675 | 661 | ||
| 676 | static inline void kvm_load_fs(u16 sel) | ||
| 677 | { | ||
| 678 | asm("mov %0, %%fs" : : "rm"(sel)); | ||
| 679 | } | ||
| 680 | |||
| 681 | static inline void kvm_load_gs(u16 sel) | ||
| 682 | { | ||
| 683 | asm("mov %0, %%gs" : : "rm"(sel)); | ||
| 684 | } | ||
| 685 | |||
| 686 | static inline void kvm_load_ldt(u16 sel) | 662 | static inline void kvm_load_ldt(u16 sel) |
| 687 | { | 663 | { |
| 688 | asm("lldt %0" : : "rm"(sel)); | 664 | asm("lldt %0" : : "rm"(sel)); |
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c index fb7a5f052e2b..fb16f17e59be 100644 --- a/arch/x86/kernel/acpi/cstate.c +++ b/arch/x86/kernel/acpi/cstate.c | |||
| @@ -61,7 +61,7 @@ struct cstate_entry { | |||
| 61 | unsigned int ecx; | 61 | unsigned int ecx; |
| 62 | } states[ACPI_PROCESSOR_MAX_POWER]; | 62 | } states[ACPI_PROCESSOR_MAX_POWER]; |
| 63 | }; | 63 | }; |
| 64 | static struct cstate_entry *cpu_cstate_entry; /* per CPU ptr */ | 64 | static struct cstate_entry __percpu *cpu_cstate_entry; /* per CPU ptr */ |
| 65 | 65 | ||
| 66 | static short mwait_supported[ACPI_PROCESSOR_MAX_POWER]; | 66 | static short mwait_supported[ACPI_PROCESSOR_MAX_POWER]; |
| 67 | 67 | ||
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index f1efebaf5510..5c5b8f3dddb5 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
| @@ -306,14 +306,19 @@ void arch_init_copy_chip_data(struct irq_desc *old_desc, | |||
| 306 | 306 | ||
| 307 | old_cfg = old_desc->chip_data; | 307 | old_cfg = old_desc->chip_data; |
| 308 | 308 | ||
| 309 | memcpy(cfg, old_cfg, sizeof(struct irq_cfg)); | 309 | cfg->vector = old_cfg->vector; |
| 310 | cfg->move_in_progress = old_cfg->move_in_progress; | ||
| 311 | cpumask_copy(cfg->domain, old_cfg->domain); | ||
| 312 | cpumask_copy(cfg->old_domain, old_cfg->old_domain); | ||
| 310 | 313 | ||
| 311 | init_copy_irq_2_pin(old_cfg, cfg, node); | 314 | init_copy_irq_2_pin(old_cfg, cfg, node); |
| 312 | } | 315 | } |
| 313 | 316 | ||
| 314 | static void free_irq_cfg(struct irq_cfg *old_cfg) | 317 | static void free_irq_cfg(struct irq_cfg *cfg) |
| 315 | { | 318 | { |
| 316 | kfree(old_cfg); | 319 | free_cpumask_var(cfg->domain); |
| 320 | free_cpumask_var(cfg->old_domain); | ||
| 321 | kfree(cfg); | ||
| 317 | } | 322 | } |
| 318 | 323 | ||
| 319 | void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc) | 324 | void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc) |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 490dac63c2d2..f2f9ac7da25c 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
| @@ -545,7 +545,7 @@ void __cpuinit cpu_detect(struct cpuinfo_x86 *c) | |||
| 545 | } | 545 | } |
| 546 | } | 546 | } |
| 547 | 547 | ||
| 548 | static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c) | 548 | void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c) |
| 549 | { | 549 | { |
| 550 | u32 tfms, xlvl; | 550 | u32 tfms, xlvl; |
| 551 | u32 ebx; | 551 | u32 ebx; |
diff --git a/arch/x86/kernel/cpu/cpu.h b/arch/x86/kernel/cpu/cpu.h index 3624e8a0f71b..f668bb1f7d43 100644 --- a/arch/x86/kernel/cpu/cpu.h +++ b/arch/x86/kernel/cpu/cpu.h | |||
| @@ -33,5 +33,6 @@ extern const struct cpu_dev *const __x86_cpu_dev_start[], | |||
| 33 | *const __x86_cpu_dev_end[]; | 33 | *const __x86_cpu_dev_end[]; |
| 34 | 34 | ||
| 35 | extern void cpu_detect_cache_sizes(struct cpuinfo_x86 *c); | 35 | extern void cpu_detect_cache_sizes(struct cpuinfo_x86 *c); |
| 36 | extern void get_cpu_cap(struct cpuinfo_x86 *c); | ||
| 36 | 37 | ||
| 37 | #endif | 38 | #endif |
diff --git a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c index 994230d4dc4e..4f6f679f2799 100644 --- a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c | |||
| @@ -368,16 +368,22 @@ static int __init pcc_cpufreq_do_osc(acpi_handle *handle) | |||
| 368 | return -ENODEV; | 368 | return -ENODEV; |
| 369 | 369 | ||
| 370 | out_obj = output.pointer; | 370 | out_obj = output.pointer; |
| 371 | if (out_obj->type != ACPI_TYPE_BUFFER) | 371 | if (out_obj->type != ACPI_TYPE_BUFFER) { |
| 372 | return -ENODEV; | 372 | ret = -ENODEV; |
| 373 | goto out_free; | ||
| 374 | } | ||
| 373 | 375 | ||
| 374 | errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0); | 376 | errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0); |
| 375 | if (errors) | 377 | if (errors) { |
| 376 | return -ENODEV; | 378 | ret = -ENODEV; |
| 379 | goto out_free; | ||
| 380 | } | ||
| 377 | 381 | ||
| 378 | supported = *((u32 *)(out_obj->buffer.pointer + 4)); | 382 | supported = *((u32 *)(out_obj->buffer.pointer + 4)); |
| 379 | if (!(supported & 0x1)) | 383 | if (!(supported & 0x1)) { |
| 380 | return -ENODEV; | 384 | ret = -ENODEV; |
| 385 | goto out_free; | ||
| 386 | } | ||
| 381 | 387 | ||
| 382 | out_free: | 388 | out_free: |
| 383 | kfree(output.pointer); | 389 | kfree(output.pointer); |
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 85f69cdeae10..b4389441efbb 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
| @@ -39,6 +39,7 @@ static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) | |||
| 39 | misc_enable &= ~MSR_IA32_MISC_ENABLE_LIMIT_CPUID; | 39 | misc_enable &= ~MSR_IA32_MISC_ENABLE_LIMIT_CPUID; |
| 40 | wrmsrl(MSR_IA32_MISC_ENABLE, misc_enable); | 40 | wrmsrl(MSR_IA32_MISC_ENABLE, misc_enable); |
| 41 | c->cpuid_level = cpuid_eax(0); | 41 | c->cpuid_level = cpuid_eax(0); |
| 42 | get_cpu_cap(c); | ||
| 42 | } | 43 | } |
| 43 | } | 44 | } |
| 44 | 45 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index 5e975298fa81..39aaee5c1ab2 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c | |||
| @@ -141,6 +141,7 @@ void mce_amd_feature_init(struct cpuinfo_x86 *c) | |||
| 141 | address = (low & MASK_BLKPTR_LO) >> 21; | 141 | address = (low & MASK_BLKPTR_LO) >> 21; |
| 142 | if (!address) | 142 | if (!address) |
| 143 | break; | 143 | break; |
| 144 | |||
| 144 | address += MCG_XBLK_ADDR; | 145 | address += MCG_XBLK_ADDR; |
| 145 | } else | 146 | } else |
| 146 | ++address; | 147 | ++address; |
| @@ -148,12 +149,8 @@ void mce_amd_feature_init(struct cpuinfo_x86 *c) | |||
| 148 | if (rdmsr_safe(address, &low, &high)) | 149 | if (rdmsr_safe(address, &low, &high)) |
| 149 | break; | 150 | break; |
| 150 | 151 | ||
| 151 | if (!(high & MASK_VALID_HI)) { | 152 | if (!(high & MASK_VALID_HI)) |
| 152 | if (block) | 153 | continue; |
| 153 | continue; | ||
| 154 | else | ||
| 155 | break; | ||
| 156 | } | ||
| 157 | 154 | ||
| 158 | if (!(high & MASK_CNTP_HI) || | 155 | if (!(high & MASK_CNTP_HI) || |
| 159 | (high & MASK_LOCKED_HI)) | 156 | (high & MASK_LOCKED_HI)) |
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index d9368eeda309..169d8804a9f8 100644 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c | |||
| @@ -216,7 +216,7 @@ static __cpuinit int thermal_throttle_add_dev(struct sys_device *sys_dev, | |||
| 216 | err = sysfs_add_file_to_group(&sys_dev->kobj, | 216 | err = sysfs_add_file_to_group(&sys_dev->kobj, |
| 217 | &attr_core_power_limit_count.attr, | 217 | &attr_core_power_limit_count.attr, |
| 218 | thermal_attr_group.name); | 218 | thermal_attr_group.name); |
| 219 | if (cpu_has(c, X86_FEATURE_PTS)) | 219 | if (cpu_has(c, X86_FEATURE_PTS)) { |
| 220 | err = sysfs_add_file_to_group(&sys_dev->kobj, | 220 | err = sysfs_add_file_to_group(&sys_dev->kobj, |
| 221 | &attr_package_throttle_count.attr, | 221 | &attr_package_throttle_count.attr, |
| 222 | thermal_attr_group.name); | 222 | thermal_attr_group.name); |
| @@ -224,6 +224,7 @@ static __cpuinit int thermal_throttle_add_dev(struct sys_device *sys_dev, | |||
| 224 | err = sysfs_add_file_to_group(&sys_dev->kobj, | 224 | err = sysfs_add_file_to_group(&sys_dev->kobj, |
| 225 | &attr_package_power_limit_count.attr, | 225 | &attr_package_power_limit_count.attr, |
| 226 | thermal_attr_group.name); | 226 | thermal_attr_group.name); |
| 227 | } | ||
| 227 | 228 | ||
| 228 | return err; | 229 | return err; |
| 229 | } | 230 | } |
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c index b560db3305be..249015173992 100644 --- a/arch/x86/kernel/cpu/perf_event_p4.c +++ b/arch/x86/kernel/cpu/perf_event_p4.c | |||
| @@ -660,8 +660,12 @@ static int p4_pmu_handle_irq(struct pt_regs *regs) | |||
| 660 | for (idx = 0; idx < x86_pmu.num_counters; idx++) { | 660 | for (idx = 0; idx < x86_pmu.num_counters; idx++) { |
| 661 | int overflow; | 661 | int overflow; |
| 662 | 662 | ||
| 663 | if (!test_bit(idx, cpuc->active_mask)) | 663 | if (!test_bit(idx, cpuc->active_mask)) { |
| 664 | /* catch in-flight IRQs */ | ||
| 665 | if (__test_and_clear_bit(idx, cpuc->running)) | ||
| 666 | handled++; | ||
| 664 | continue; | 667 | continue; |
| 668 | } | ||
| 665 | 669 | ||
| 666 | event = cpuc->events[idx]; | 670 | event = cpuc->events[idx]; |
| 667 | hwc = &event->hw; | 671 | hwc = &event->hw; |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 410fdb3f1939..7494999141b3 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
| @@ -506,7 +506,7 @@ static int hpet_assign_irq(struct hpet_dev *dev) | |||
| 506 | { | 506 | { |
| 507 | unsigned int irq; | 507 | unsigned int irq; |
| 508 | 508 | ||
| 509 | irq = create_irq(); | 509 | irq = create_irq_nr(0, -1); |
| 510 | if (!irq) | 510 | if (!irq) |
| 511 | return -EINVAL; | 511 | return -EINVAL; |
| 512 | 512 | ||
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c index e0bc186d7501..1c355c550960 100644 --- a/arch/x86/kernel/module.c +++ b/arch/x86/kernel/module.c | |||
| @@ -239,11 +239,10 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
| 239 | apply_paravirt(pseg, pseg + para->sh_size); | 239 | apply_paravirt(pseg, pseg + para->sh_size); |
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | return module_bug_finalize(hdr, sechdrs, me); | 242 | return 0; |
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | void module_arch_cleanup(struct module *mod) | 245 | void module_arch_cleanup(struct module *mod) |
| 246 | { | 246 | { |
| 247 | alternatives_smp_module_del(mod); | 247 | alternatives_smp_module_del(mod); |
| 248 | module_bug_cleanup(mod); | ||
| 249 | } | 248 | } |
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index bc5b9b8d4a33..8a3f9f64f86f 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
| @@ -766,7 +766,6 @@ static void init_vmcb(struct vcpu_svm *svm) | |||
| 766 | 766 | ||
| 767 | control->iopm_base_pa = iopm_base; | 767 | control->iopm_base_pa = iopm_base; |
| 768 | control->msrpm_base_pa = __pa(svm->msrpm); | 768 | control->msrpm_base_pa = __pa(svm->msrpm); |
| 769 | control->tsc_offset = 0; | ||
| 770 | control->int_ctl = V_INTR_MASKING_MASK; | 769 | control->int_ctl = V_INTR_MASKING_MASK; |
| 771 | 770 | ||
| 772 | init_seg(&save->es); | 771 | init_seg(&save->es); |
| @@ -902,6 +901,7 @@ static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id) | |||
| 902 | svm->vmcb_pa = page_to_pfn(page) << PAGE_SHIFT; | 901 | svm->vmcb_pa = page_to_pfn(page) << PAGE_SHIFT; |
| 903 | svm->asid_generation = 0; | 902 | svm->asid_generation = 0; |
| 904 | init_vmcb(svm); | 903 | init_vmcb(svm); |
| 904 | svm->vmcb->control.tsc_offset = 0-native_read_tsc(); | ||
| 905 | 905 | ||
| 906 | err = fx_init(&svm->vcpu); | 906 | err = fx_init(&svm->vcpu); |
| 907 | if (err) | 907 | if (err) |
| @@ -3163,8 +3163,8 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu) | |||
| 3163 | sync_lapic_to_cr8(vcpu); | 3163 | sync_lapic_to_cr8(vcpu); |
| 3164 | 3164 | ||
| 3165 | save_host_msrs(vcpu); | 3165 | save_host_msrs(vcpu); |
| 3166 | fs_selector = kvm_read_fs(); | 3166 | savesegment(fs, fs_selector); |
| 3167 | gs_selector = kvm_read_gs(); | 3167 | savesegment(gs, gs_selector); |
| 3168 | ldt_selector = kvm_read_ldt(); | 3168 | ldt_selector = kvm_read_ldt(); |
| 3169 | svm->vmcb->save.cr2 = vcpu->arch.cr2; | 3169 | svm->vmcb->save.cr2 = vcpu->arch.cr2; |
| 3170 | /* required for live migration with NPT */ | 3170 | /* required for live migration with NPT */ |
| @@ -3251,10 +3251,15 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu) | |||
| 3251 | vcpu->arch.regs[VCPU_REGS_RSP] = svm->vmcb->save.rsp; | 3251 | vcpu->arch.regs[VCPU_REGS_RSP] = svm->vmcb->save.rsp; |
| 3252 | vcpu->arch.regs[VCPU_REGS_RIP] = svm->vmcb->save.rip; | 3252 | vcpu->arch.regs[VCPU_REGS_RIP] = svm->vmcb->save.rip; |
| 3253 | 3253 | ||
| 3254 | kvm_load_fs(fs_selector); | ||
| 3255 | kvm_load_gs(gs_selector); | ||
| 3256 | kvm_load_ldt(ldt_selector); | ||
| 3257 | load_host_msrs(vcpu); | 3254 | load_host_msrs(vcpu); |
| 3255 | loadsegment(fs, fs_selector); | ||
| 3256 | #ifdef CONFIG_X86_64 | ||
| 3257 | load_gs_index(gs_selector); | ||
| 3258 | wrmsrl(MSR_KERNEL_GS_BASE, current->thread.gs); | ||
| 3259 | #else | ||
| 3260 | loadsegment(gs, gs_selector); | ||
| 3261 | #endif | ||
| 3262 | kvm_load_ldt(ldt_selector); | ||
| 3258 | 3263 | ||
| 3259 | reload_tss(vcpu); | 3264 | reload_tss(vcpu); |
| 3260 | 3265 | ||
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 49b25eee25ac..7bddfab12013 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
| @@ -803,7 +803,7 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu) | |||
| 803 | */ | 803 | */ |
| 804 | vmx->host_state.ldt_sel = kvm_read_ldt(); | 804 | vmx->host_state.ldt_sel = kvm_read_ldt(); |
| 805 | vmx->host_state.gs_ldt_reload_needed = vmx->host_state.ldt_sel; | 805 | vmx->host_state.gs_ldt_reload_needed = vmx->host_state.ldt_sel; |
| 806 | vmx->host_state.fs_sel = kvm_read_fs(); | 806 | savesegment(fs, vmx->host_state.fs_sel); |
| 807 | if (!(vmx->host_state.fs_sel & 7)) { | 807 | if (!(vmx->host_state.fs_sel & 7)) { |
| 808 | vmcs_write16(HOST_FS_SELECTOR, vmx->host_state.fs_sel); | 808 | vmcs_write16(HOST_FS_SELECTOR, vmx->host_state.fs_sel); |
| 809 | vmx->host_state.fs_reload_needed = 0; | 809 | vmx->host_state.fs_reload_needed = 0; |
| @@ -811,7 +811,7 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu) | |||
| 811 | vmcs_write16(HOST_FS_SELECTOR, 0); | 811 | vmcs_write16(HOST_FS_SELECTOR, 0); |
| 812 | vmx->host_state.fs_reload_needed = 1; | 812 | vmx->host_state.fs_reload_needed = 1; |
| 813 | } | 813 | } |
| 814 | vmx->host_state.gs_sel = kvm_read_gs(); | 814 | savesegment(gs, vmx->host_state.gs_sel); |
| 815 | if (!(vmx->host_state.gs_sel & 7)) | 815 | if (!(vmx->host_state.gs_sel & 7)) |
| 816 | vmcs_write16(HOST_GS_SELECTOR, vmx->host_state.gs_sel); | 816 | vmcs_write16(HOST_GS_SELECTOR, vmx->host_state.gs_sel); |
| 817 | else { | 817 | else { |
| @@ -841,27 +841,21 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu) | |||
| 841 | 841 | ||
| 842 | static void __vmx_load_host_state(struct vcpu_vmx *vmx) | 842 | static void __vmx_load_host_state(struct vcpu_vmx *vmx) |
| 843 | { | 843 | { |
| 844 | unsigned long flags; | ||
| 845 | |||
| 846 | if (!vmx->host_state.loaded) | 844 | if (!vmx->host_state.loaded) |
| 847 | return; | 845 | return; |
| 848 | 846 | ||
| 849 | ++vmx->vcpu.stat.host_state_reload; | 847 | ++vmx->vcpu.stat.host_state_reload; |
| 850 | vmx->host_state.loaded = 0; | 848 | vmx->host_state.loaded = 0; |
| 851 | if (vmx->host_state.fs_reload_needed) | 849 | if (vmx->host_state.fs_reload_needed) |
| 852 | kvm_load_fs(vmx->host_state.fs_sel); | 850 | loadsegment(fs, vmx->host_state.fs_sel); |
| 853 | if (vmx->host_state.gs_ldt_reload_needed) { | 851 | if (vmx->host_state.gs_ldt_reload_needed) { |
| 854 | kvm_load_ldt(vmx->host_state.ldt_sel); | 852 | kvm_load_ldt(vmx->host_state.ldt_sel); |
| 855 | /* | ||
| 856 | * If we have to reload gs, we must take care to | ||
| 857 | * preserve our gs base. | ||
| 858 | */ | ||
| 859 | local_irq_save(flags); | ||
| 860 | kvm_load_gs(vmx->host_state.gs_sel); | ||
| 861 | #ifdef CONFIG_X86_64 | 853 | #ifdef CONFIG_X86_64 |
| 862 | wrmsrl(MSR_GS_BASE, vmcs_readl(HOST_GS_BASE)); | 854 | load_gs_index(vmx->host_state.gs_sel); |
| 855 | wrmsrl(MSR_KERNEL_GS_BASE, current->thread.gs); | ||
| 856 | #else | ||
| 857 | loadsegment(gs, vmx->host_state.gs_sel); | ||
| 863 | #endif | 858 | #endif |
| 864 | local_irq_restore(flags); | ||
| 865 | } | 859 | } |
| 866 | reload_tss(); | 860 | reload_tss(); |
| 867 | #ifdef CONFIG_X86_64 | 861 | #ifdef CONFIG_X86_64 |
| @@ -2589,8 +2583,8 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx) | |||
| 2589 | vmcs_write16(HOST_CS_SELECTOR, __KERNEL_CS); /* 22.2.4 */ | 2583 | vmcs_write16(HOST_CS_SELECTOR, __KERNEL_CS); /* 22.2.4 */ |
| 2590 | vmcs_write16(HOST_DS_SELECTOR, __KERNEL_DS); /* 22.2.4 */ | 2584 | vmcs_write16(HOST_DS_SELECTOR, __KERNEL_DS); /* 22.2.4 */ |
| 2591 | vmcs_write16(HOST_ES_SELECTOR, __KERNEL_DS); /* 22.2.4 */ | 2585 | vmcs_write16(HOST_ES_SELECTOR, __KERNEL_DS); /* 22.2.4 */ |
| 2592 | vmcs_write16(HOST_FS_SELECTOR, kvm_read_fs()); /* 22.2.4 */ | 2586 | vmcs_write16(HOST_FS_SELECTOR, 0); /* 22.2.4 */ |
| 2593 | vmcs_write16(HOST_GS_SELECTOR, kvm_read_gs()); /* 22.2.4 */ | 2587 | vmcs_write16(HOST_GS_SELECTOR, 0); /* 22.2.4 */ |
| 2594 | vmcs_write16(HOST_SS_SELECTOR, __KERNEL_DS); /* 22.2.4 */ | 2588 | vmcs_write16(HOST_SS_SELECTOR, __KERNEL_DS); /* 22.2.4 */ |
| 2595 | #ifdef CONFIG_X86_64 | 2589 | #ifdef CONFIG_X86_64 |
| 2596 | rdmsrl(MSR_FS_BASE, a); | 2590 | rdmsrl(MSR_FS_BASE, a); |
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c index f9897f7a9ef1..9c0d0d399c30 100644 --- a/arch/x86/mm/srat_64.c +++ b/arch/x86/mm/srat_64.c | |||
| @@ -420,9 +420,11 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) | |||
| 420 | return -1; | 420 | return -1; |
| 421 | } | 421 | } |
| 422 | 422 | ||
| 423 | for_each_node_mask(i, nodes_parsed) | 423 | for (i = 0; i < num_node_memblks; i++) |
| 424 | e820_register_active_regions(i, nodes[i].start >> PAGE_SHIFT, | 424 | e820_register_active_regions(memblk_nodeid[i], |
| 425 | nodes[i].end >> PAGE_SHIFT); | 425 | node_memblk_range[i].start >> PAGE_SHIFT, |
| 426 | node_memblk_range[i].end >> PAGE_SHIFT); | ||
| 427 | |||
| 426 | /* for out of order entries in SRAT */ | 428 | /* for out of order entries in SRAT */ |
| 427 | sort_node_map(); | 429 | sort_node_map(); |
| 428 | if (!nodes_cover_memory(nodes)) { | 430 | if (!nodes_cover_memory(nodes)) { |
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 009b819f48d0..f1575c9a2572 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
| @@ -674,6 +674,7 @@ static int __init ppro_init(char **cpu_type) | |||
| 674 | case 0x0f: | 674 | case 0x0f: |
| 675 | case 0x16: | 675 | case 0x16: |
| 676 | case 0x17: | 676 | case 0x17: |
| 677 | case 0x1d: | ||
| 677 | *cpu_type = "i386/core_2"; | 678 | *cpu_type = "i386/core_2"; |
| 678 | break; | 679 | break; |
| 679 | case 0x1a: | 680 | case 0x1a: |
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c index 1a5353a753fc..b2bb5aa3b054 100644 --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c | |||
| @@ -489,8 +489,9 @@ static void xen_hvm_setup_cpu_clockevents(void) | |||
| 489 | __init void xen_hvm_init_time_ops(void) | 489 | __init void xen_hvm_init_time_ops(void) |
| 490 | { | 490 | { |
| 491 | /* vector callback is needed otherwise we cannot receive interrupts | 491 | /* vector callback is needed otherwise we cannot receive interrupts |
| 492 | * on cpu > 0 */ | 492 | * on cpu > 0 and at this point we don't know how many cpus are |
| 493 | if (!xen_have_vector_callback && num_present_cpus() > 1) | 493 | * available */ |
| 494 | if (!xen_have_vector_callback) | ||
| 494 | return; | 495 | return; |
| 495 | if (!xen_feature(XENFEAT_hvm_safe_pvclock)) { | 496 | if (!xen_feature(XENFEAT_hvm_safe_pvclock)) { |
| 496 | printk(KERN_INFO "Xen doesn't support pvclock on HVM," | 497 | printk(KERN_INFO "Xen doesn't support pvclock on HVM," |
