aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-davinci/psc.c3
-rw-r--r--arch/arm/mach-sa1100/include/mach/jornada720.h11
-rw-r--r--arch/arm/mach-sa1100/jornada720_ssp.c10
-rw-r--r--arch/arm/plat-omap/devices.c13
-rw-r--r--arch/avr32/boards/atstk1000/atstk1002.c2
-rw-r--r--arch/avr32/boot/images/.gitignore4
-rw-r--r--arch/avr32/kernel/.gitignore1
-rw-r--r--arch/avr32/kernel/avr32_ksyms.c1
-rw-r--r--arch/avr32/kernel/syscall-stubs.S9
-rw-r--r--arch/avr32/kernel/syscall_table.S2
-rw-r--r--arch/avr32/kernel/traps.c8
-rw-r--r--arch/avr32/lib/findbit.S30
-rw-r--r--arch/mips/vr41xx/common/irq.c6
-rw-r--r--arch/powerpc/boot/Makefile2
-rw-r--r--arch/powerpc/boot/dts/mpc8610_hpcd.dts8
-rw-r--r--arch/powerpc/include/asm/elf.h7
-rw-r--r--arch/powerpc/include/asm/sections.h12
-rw-r--r--arch/powerpc/kernel/module_64.c19
-rw-r--r--arch/sparc64/kernel/irq.c5
-rw-r--r--arch/sparc64/kernel/pci_psycho.c8
-rw-r--r--arch/sparc64/kernel/traps.c3
-rw-r--r--arch/x86/kernel/cpu/common.c24
-rw-r--r--arch/x86/kernel/kdebugfs.c1
-rw-r--r--arch/x86/kernel/setup.c5
-rw-r--r--arch/x86/mm/init_32.c4
-rw-r--r--arch/x86/xen/setup.c2
-rw-r--r--drivers/clocksource/acpi_pm.c21
-rw-r--r--drivers/infiniband/hw/mlx4/qp.c6
-rw-r--r--drivers/infiniband/hw/nes/nes_cm.c11
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib.h2
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c1
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c31
-rw-r--r--drivers/md/md.c8
-rw-r--r--drivers/net/bnx2.h2
-rw-r--r--drivers/net/e100.c4
-rw-r--r--drivers/net/e1000/e1000_hw.c23
-rw-r--r--drivers/net/forcedeth.c16
-rw-r--r--drivers/net/hp-plus.c8
-rw-r--r--drivers/net/mlx4/mr.c10
-rw-r--r--drivers/net/wireless/b43/rfkill.c18
-rw-r--r--drivers/net/wireless/b43legacy/rfkill.c18
-rw-r--r--include/asm-generic/bug.h10
-rw-r--r--include/linux/mlx4/device.h4
-rw-r--r--include/linux/pnp.h7
-rw-r--r--kernel/sched.c6
-rw-r--r--kernel/sched_rt.c1
-rw-r--r--kernel/time/clockevents.c12
-rw-r--r--kernel/time/tick-broadcast.c9
-rw-r--r--kernel/time/tick-common.c4
-rw-r--r--kernel/time/tick-internal.h2
-rw-r--r--mm/slub.c1
-rw-r--r--net/ipv4/udp.c62
-rw-r--r--net/sched/sch_generic.c3
-rw-r--r--net/sctp/associola.c9
-rw-r--r--net/sctp/output.c3
-rw-r--r--net/sctp/sm_make_chunk.c15
56 files changed, 306 insertions, 221 deletions
diff --git a/arch/arm/mach-davinci/psc.c b/arch/arm/mach-davinci/psc.c
index 720c48b9ee04..aa2fc375a325 100644
--- a/arch/arm/mach-davinci/psc.c
+++ b/arch/arm/mach-davinci/psc.c
@@ -70,9 +70,6 @@ void davinci_psc_config(unsigned int domain, unsigned int id, char enable)
70{ 70{
71 u32 epcpr, ptcmd, ptstat, pdstat, pdctl1, mdstat, mdctl, mdstat_mask; 71 u32 epcpr, ptcmd, ptstat, pdstat, pdctl1, mdstat, mdctl, mdstat_mask;
72 72
73 if (id < 0)
74 return;
75
76 mdctl = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE + MDCTL + 4 * id); 73 mdctl = davinci_readl(DAVINCI_PWR_SLEEP_CNTRL_BASE + MDCTL + 4 * id);
77 if (enable) 74 if (enable)
78 mdctl |= 0x00000003; /* Enable Module */ 75 mdctl |= 0x00000003; /* Enable Module */
diff --git a/arch/arm/mach-sa1100/include/mach/jornada720.h b/arch/arm/mach-sa1100/include/mach/jornada720.h
index bc120850d313..cc6b4bfcecf6 100644
--- a/arch/arm/mach-sa1100/include/mach/jornada720.h
+++ b/arch/arm/mach-sa1100/include/mach/jornada720.h
@@ -1,10 +1,10 @@
1/* 1/*
2 * arch/arm/mach-sa1100/include/mach/jornada720.h 2 * arch/arm/mach-sa1100/include/mach/jornada720.h
3 * 3 *
4 * This file contains SSP/MCU communication definitions for HP Jornada 710/720/728 4 * SSP/MCU communication definitions for HP Jornada 710/720/728
5 * 5 *
6 * Copyright (C) 2007 Kristoffer Ericson <Kristoffer.Ericson@gmail.com> 6 * Copyright 2007,2008 Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
7 * Copyright (C) 2000 John Ankcorn <jca@lcs.mit.edu> 7 * Copyright 2000 John Ankcorn <jca@lcs.mit.edu>
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
@@ -25,3 +25,8 @@
25#define PWMOFF 0xDF 25#define PWMOFF 0xDF
26#define TXDUMMY 0x11 26#define TXDUMMY 0x11
27#define ERRORCODE 0x00 27#define ERRORCODE 0x00
28
29extern void jornada_ssp_start(void);
30extern void jornada_ssp_end(void);
31extern int jornada_ssp_inout(u8 byte);
32extern int jornada_ssp_byte(u8 byte);
diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c
index 06ea7abd9170..28cf36967977 100644
--- a/arch/arm/mach-sa1100/jornada720_ssp.c
+++ b/arch/arm/mach-sa1100/jornada720_ssp.c
@@ -21,8 +21,8 @@
21#include <linux/slab.h> 21#include <linux/slab.h>
22 22
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24#include <asm/hardware/ssp.h>
25#include <mach/jornada720.h> 24#include <mach/jornada720.h>
25#include <asm/hardware/ssp.h>
26 26
27static DEFINE_SPINLOCK(jornada_ssp_lock); 27static DEFINE_SPINLOCK(jornada_ssp_lock);
28static unsigned long jornada_ssp_flags; 28static unsigned long jornada_ssp_flags;
@@ -109,12 +109,12 @@ EXPORT_SYMBOL(jornada_ssp_inout);
109 * jornada_ssp_start - enable mcu 109 * jornada_ssp_start - enable mcu
110 * 110 *
111 */ 111 */
112int jornada_ssp_start() 112void jornada_ssp_start(void)
113{ 113{
114 spin_lock_irqsave(&jornada_ssp_lock, jornada_ssp_flags); 114 spin_lock_irqsave(&jornada_ssp_lock, jornada_ssp_flags);
115 GPCR = GPIO_GPIO25; 115 GPCR = GPIO_GPIO25;
116 udelay(50); 116 udelay(50);
117 return 0; 117 return;
118}; 118};
119EXPORT_SYMBOL(jornada_ssp_start); 119EXPORT_SYMBOL(jornada_ssp_start);
120 120
@@ -122,11 +122,11 @@ EXPORT_SYMBOL(jornada_ssp_start);
122 * jornada_ssp_end - disable mcu and turn off lock 122 * jornada_ssp_end - disable mcu and turn off lock
123 * 123 *
124 */ 124 */
125int jornada_ssp_end() 125void jornada_ssp_end(void)
126{ 126{
127 GPSR = GPIO_GPIO25; 127 GPSR = GPIO_GPIO25;
128 spin_unlock_irqrestore(&jornada_ssp_lock, jornada_ssp_flags); 128 spin_unlock_irqrestore(&jornada_ssp_lock, jornada_ssp_flags);
129 return 0; 129 return;
130}; 130};
131EXPORT_SYMBOL(jornada_ssp_end); 131EXPORT_SYMBOL(jornada_ssp_end);
132 132
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index bc1cf30c83e0..01da719a7453 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -316,19 +316,6 @@ static inline void omap_init_mmc_conf(const struct omap_mmc_config *mmc_conf)
316 omap_cfg_reg(MMC_DAT3); 316 omap_cfg_reg(MMC_DAT3);
317 } 317 }
318 } 318 }
319#if defined(CONFIG_ARCH_OMAP2420)
320 if (mmc_conf->mmc[0].internal_clock) {
321 /*
322 * Use internal loop-back in MMC/SDIO
323 * Module Input Clock selection
324 */
325 if (cpu_is_omap24xx()) {
326 u32 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
327 v |= (1 << 24); /* not used in 243x */
328 omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0);
329 }
330 }
331#endif
332 } 319 }
333 320
334#ifdef CONFIG_ARCH_OMAP16XX 321#ifdef CONFIG_ARCH_OMAP16XX
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index ee4c292683e1..dfc3443e23aa 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -325,7 +325,7 @@ static int __init atstk1002_init(void)
325#ifdef CONFIG_BOARD_ATSTK100X_SPI1 325#ifdef CONFIG_BOARD_ATSTK100X_SPI1
326 at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info)); 326 at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info));
327#endif 327#endif
328#ifndef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM 328#ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
329 at32_add_device_mci(0, MCI_PDATA); 329 at32_add_device_mci(0, MCI_PDATA);
330#endif 330#endif
331#ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM 331#ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM
diff --git a/arch/avr32/boot/images/.gitignore b/arch/avr32/boot/images/.gitignore
new file mode 100644
index 000000000000..64ea9d0141d2
--- /dev/null
+++ b/arch/avr32/boot/images/.gitignore
@@ -0,0 +1,4 @@
1uImage
2uImage.srec
3vmlinux.cso
4sfdwarf.log
diff --git a/arch/avr32/kernel/.gitignore b/arch/avr32/kernel/.gitignore
new file mode 100644
index 000000000000..c5f676c3c224
--- /dev/null
+++ b/arch/avr32/kernel/.gitignore
@@ -0,0 +1 @@
vmlinux.lds
diff --git a/arch/avr32/kernel/avr32_ksyms.c b/arch/avr32/kernel/avr32_ksyms.c
index 84a7d44edc67..11e310c567a9 100644
--- a/arch/avr32/kernel/avr32_ksyms.c
+++ b/arch/avr32/kernel/avr32_ksyms.c
@@ -58,6 +58,7 @@ EXPORT_SYMBOL(find_first_zero_bit);
58EXPORT_SYMBOL(find_next_zero_bit); 58EXPORT_SYMBOL(find_next_zero_bit);
59EXPORT_SYMBOL(find_first_bit); 59EXPORT_SYMBOL(find_first_bit);
60EXPORT_SYMBOL(find_next_bit); 60EXPORT_SYMBOL(find_next_bit);
61EXPORT_SYMBOL(generic_find_next_le_bit);
61EXPORT_SYMBOL(generic_find_next_zero_le_bit); 62EXPORT_SYMBOL(generic_find_next_zero_le_bit);
62 63
63/* I/O primitives (lib/io-*.S) */ 64/* I/O primitives (lib/io-*.S) */
diff --git a/arch/avr32/kernel/syscall-stubs.S b/arch/avr32/kernel/syscall-stubs.S
index 890286a1e62b..673178e235f3 100644
--- a/arch/avr32/kernel/syscall-stubs.S
+++ b/arch/avr32/kernel/syscall-stubs.S
@@ -109,3 +109,12 @@ __sys_epoll_pwait:
109 rcall sys_epoll_pwait 109 rcall sys_epoll_pwait
110 sub sp, -4 110 sub sp, -4
111 popm pc 111 popm pc
112
113 .global __sys_sync_file_range
114 .type __sys_sync_file_range,@function
115__sys_sync_file_range:
116 pushm lr
117 st.w --sp, ARG6
118 rcall sys_sync_file_range
119 sub sp, -4
120 popm pc
diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S
index 478bda4c4a09..7ee0057613b3 100644
--- a/arch/avr32/kernel/syscall_table.S
+++ b/arch/avr32/kernel/syscall_table.S
@@ -275,7 +275,7 @@ sys_call_table:
275 .long sys_set_robust_list 275 .long sys_set_robust_list
276 .long sys_get_robust_list /* 260 */ 276 .long sys_get_robust_list /* 260 */
277 .long __sys_splice 277 .long __sys_splice
278 .long sys_sync_file_range 278 .long __sys_sync_file_range
279 .long sys_tee 279 .long sys_tee
280 .long sys_vmsplice 280 .long sys_vmsplice
281 .long __sys_epoll_pwait /* 265 */ 281 .long __sys_epoll_pwait /* 265 */
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c
index b835c4c01368..0d987373bc01 100644
--- a/arch/avr32/kernel/traps.c
+++ b/arch/avr32/kernel/traps.c
@@ -116,15 +116,15 @@ asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs)
116 switch (ret) { 116 switch (ret) {
117 case NOTIFY_OK: 117 case NOTIFY_OK:
118 case NOTIFY_STOP: 118 case NOTIFY_STOP:
119 return; 119 break;
120 case NOTIFY_BAD: 120 case NOTIFY_BAD:
121 die("Fatal Non-Maskable Interrupt", regs, SIGINT); 121 die("Fatal Non-Maskable Interrupt", regs, SIGINT);
122 default: 122 default:
123 printk(KERN_ALERT "Got NMI, but nobody cared. Disabling...\n");
124 nmi_disable();
123 break; 125 break;
124 } 126 }
125 127 nmi_exit();
126 printk(KERN_ALERT "Got NMI, but nobody cared. Disabling...\n");
127 nmi_disable();
128} 128}
129 129
130asmlinkage void do_critical_exception(unsigned long ecr, struct pt_regs *regs) 130asmlinkage void do_critical_exception(unsigned long ecr, struct pt_regs *regs)
diff --git a/arch/avr32/lib/findbit.S b/arch/avr32/lib/findbit.S
index c6b91dee857c..997b33b2288a 100644
--- a/arch/avr32/lib/findbit.S
+++ b/arch/avr32/lib/findbit.S
@@ -123,6 +123,36 @@ ENTRY(find_next_bit)
123 brgt 1b 123 brgt 1b
124 retal r11 124 retal r11
125 125
126ENTRY(generic_find_next_le_bit)
127 lsr r8, r10, 5
128 sub r9, r11, r10
129 retle r11
130
131 lsl r8, 2
132 add r12, r8
133 andl r10, 31, COH
134 breq 1f
135
136 /* offset is not word-aligned. Handle the first (32 - r10) bits */
137 ldswp.w r8, r12[0]
138 sub r12, -4
139 lsr r8, r8, r10
140 brne .L_found
141
142 /* r9 = r9 - (32 - r10) = r9 + r10 - 32 */
143 add r9, r10
144 sub r9, 32
145 retle r11
146
147 /* Main loop. offset must be word-aligned */
1481: ldswp.w r8, r12[0]
149 cp.w r8, 0
150 brne .L_found
151 sub r12, -4
152 sub r9, 32
153 brgt 1b
154 retal r11
155
126ENTRY(generic_find_next_zero_le_bit) 156ENTRY(generic_find_next_zero_le_bit)
127 lsr r8, r10, 5 157 lsr r8, r10, 5
128 sub r9, r11, r10 158 sub r9, r11, r10
diff --git a/arch/mips/vr41xx/common/irq.c b/arch/mips/vr41xx/common/irq.c
index cba36a247e32..92dd1a0ca352 100644
--- a/arch/mips/vr41xx/common/irq.c
+++ b/arch/mips/vr41xx/common/irq.c
@@ -72,6 +72,7 @@ static void irq_dispatch(unsigned int irq)
72 cascade = irq_cascade + irq; 72 cascade = irq_cascade + irq;
73 if (cascade->get_irq != NULL) { 73 if (cascade->get_irq != NULL) {
74 unsigned int source_irq = irq; 74 unsigned int source_irq = irq;
75 int ret;
75 desc = irq_desc + source_irq; 76 desc = irq_desc + source_irq;
76 if (desc->chip->mask_ack) 77 if (desc->chip->mask_ack)
77 desc->chip->mask_ack(source_irq); 78 desc->chip->mask_ack(source_irq);
@@ -79,8 +80,9 @@ static void irq_dispatch(unsigned int irq)
79 desc->chip->mask(source_irq); 80 desc->chip->mask(source_irq);
80 desc->chip->ack(source_irq); 81 desc->chip->ack(source_irq);
81 } 82 }
82 irq = cascade->get_irq(irq); 83 ret = cascade->get_irq(irq);
83 if (irq < 0) 84 irq = ret;
85 if (ret < 0)
84 atomic_inc(&irq_err_count); 86 atomic_inc(&irq_err_count);
85 else 87 else
86 irq_dispatch(irq); 88 irq_dispatch(irq);
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 717a3bc1352e..65d1a8454d2c 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -195,7 +195,7 @@ image-$(CONFIG_PPC_CELLEB) += zImage.pseries
195image-$(CONFIG_PPC_CHRP) += zImage.chrp 195image-$(CONFIG_PPC_CHRP) += zImage.chrp
196image-$(CONFIG_PPC_EFIKA) += zImage.chrp 196image-$(CONFIG_PPC_EFIKA) += zImage.chrp
197image-$(CONFIG_PPC_PMAC) += zImage.pmac 197image-$(CONFIG_PPC_PMAC) += zImage.pmac
198image-$(CONFIG_PPC_HOLLY) += zImage.holly 198image-$(CONFIG_PPC_HOLLY) += dtbImage.holly
199image-$(CONFIG_PPC_PRPMC2800) += dtbImage.prpmc2800 199image-$(CONFIG_PPC_PRPMC2800) += dtbImage.prpmc2800
200image-$(CONFIG_PPC_ISERIES) += zImage.iseries 200image-$(CONFIG_PPC_ISERIES) += zImage.iseries
201image-$(CONFIG_DEFAULT_UIMAGE) += uImage 201image-$(CONFIG_DEFAULT_UIMAGE) += uImage
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
index 3b3a1062cb25..584a4f184eb2 100644
--- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts
+++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
@@ -281,7 +281,7 @@
281 cell-index = <0>; 281 cell-index = <0>;
282 reg = <0x0 0x80>; 282 reg = <0x0 0x80>;
283 interrupt-parent = <&mpic>; 283 interrupt-parent = <&mpic>;
284 interrupts = <60 2>; 284 interrupts = <76 2>;
285 }; 285 };
286 dma-channel@1 { 286 dma-channel@1 {
287 compatible = "fsl,mpc8610-dma-channel", 287 compatible = "fsl,mpc8610-dma-channel",
@@ -289,7 +289,7 @@
289 cell-index = <1>; 289 cell-index = <1>;
290 reg = <0x80 0x80>; 290 reg = <0x80 0x80>;
291 interrupt-parent = <&mpic>; 291 interrupt-parent = <&mpic>;
292 interrupts = <61 2>; 292 interrupts = <77 2>;
293 }; 293 };
294 dma-channel@2 { 294 dma-channel@2 {
295 compatible = "fsl,mpc8610-dma-channel", 295 compatible = "fsl,mpc8610-dma-channel",
@@ -297,7 +297,7 @@
297 cell-index = <2>; 297 cell-index = <2>;
298 reg = <0x100 0x80>; 298 reg = <0x100 0x80>;
299 interrupt-parent = <&mpic>; 299 interrupt-parent = <&mpic>;
300 interrupts = <62 2>; 300 interrupts = <78 2>;
301 }; 301 };
302 dma-channel@3 { 302 dma-channel@3 {
303 compatible = "fsl,mpc8610-dma-channel", 303 compatible = "fsl,mpc8610-dma-channel",
@@ -305,7 +305,7 @@
305 cell-index = <3>; 305 cell-index = <3>;
306 reg = <0x180 0x80>; 306 reg = <0x180 0x80>;
307 interrupt-parent = <&mpic>; 307 interrupt-parent = <&mpic>;
308 interrupts = <63 2>; 308 interrupts = <79 2>;
309 }; 309 };
310 }; 310 };
311 311
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index 80d1f399ee51..64c6ee22eefd 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -409,6 +409,13 @@ do { \
409/* Keep this the last entry. */ 409/* Keep this the last entry. */
410#define R_PPC64_NUM 107 410#define R_PPC64_NUM 107
411 411
412/* There's actually a third entry here, but it's unused */
413struct ppc64_opd_entry
414{
415 unsigned long funcaddr;
416 unsigned long r2;
417};
418
412#ifdef __KERNEL__ 419#ifdef __KERNEL__
413 420
414#ifdef CONFIG_SPU_BASE 421#ifdef CONFIG_SPU_BASE
diff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h
index 7710e9e6660f..07956f3e7844 100644
--- a/arch/powerpc/include/asm/sections.h
+++ b/arch/powerpc/include/asm/sections.h
@@ -2,6 +2,8 @@
2#define _ASM_POWERPC_SECTIONS_H 2#define _ASM_POWERPC_SECTIONS_H
3#ifdef __KERNEL__ 3#ifdef __KERNEL__
4 4
5#include <linux/elf.h>
6#include <linux/uaccess.h>
5#include <asm-generic/sections.h> 7#include <asm-generic/sections.h>
6 8
7#ifdef __powerpc64__ 9#ifdef __powerpc64__
@@ -17,7 +19,15 @@ static inline int in_kernel_text(unsigned long addr)
17} 19}
18 20
19#undef dereference_function_descriptor 21#undef dereference_function_descriptor
20void *dereference_function_descriptor(void *); 22static inline void *dereference_function_descriptor(void *ptr)
23{
24 struct ppc64_opd_entry *desc = ptr;
25 void *p;
26
27 if (!probe_kernel_address(&desc->funcaddr, p))
28 ptr = p;
29 return ptr;
30}
21 31
22#endif 32#endif
23 33
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
index ad79de272ff3..1af2377e4992 100644
--- a/arch/powerpc/kernel/module_64.c
+++ b/arch/powerpc/kernel/module_64.c
@@ -21,9 +21,7 @@
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/vmalloc.h> 22#include <linux/vmalloc.h>
23#include <linux/bug.h> 23#include <linux/bug.h>
24#include <linux/uaccess.h>
25#include <asm/module.h> 24#include <asm/module.h>
26#include <asm/sections.h>
27#include <asm/firmware.h> 25#include <asm/firmware.h>
28#include <asm/code-patching.h> 26#include <asm/code-patching.h>
29#include <linux/sort.h> 27#include <linux/sort.h>
@@ -43,13 +41,6 @@
43#define DEBUGP(fmt , ...) 41#define DEBUGP(fmt , ...)
44#endif 42#endif
45 43
46/* There's actually a third entry here, but it's unused */
47struct ppc64_opd_entry
48{
49 unsigned long funcaddr;
50 unsigned long r2;
51};
52
53/* Like PPC32, we need little trampolines to do > 24-bit jumps (into 44/* Like PPC32, we need little trampolines to do > 24-bit jumps (into
54 the kernel itself). But on PPC64, these need to be used for every 45 the kernel itself). But on PPC64, these need to be used for every
55 jump, actually, to reset r2 (TOC+0x8000). */ 46 jump, actually, to reset r2 (TOC+0x8000). */
@@ -452,13 +443,3 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
452 443
453 return 0; 444 return 0;
454} 445}
455
456void *dereference_function_descriptor(void *ptr)
457{
458 struct ppc64_opd_entry *desc = ptr;
459 void *p;
460
461 if (!probe_kernel_address(&desc->funcaddr, p))
462 ptr = p;
463 return ptr;
464}
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index 23963882bc18..7495bc774685 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -7,6 +7,7 @@
7 7
8#include <linux/module.h> 8#include <linux/module.h>
9#include <linux/sched.h> 9#include <linux/sched.h>
10#include <linux/linkage.h>
10#include <linux/ptrace.h> 11#include <linux/ptrace.h>
11#include <linux/errno.h> 12#include <linux/errno.h>
12#include <linux/kernel_stat.h> 13#include <linux/kernel_stat.h>
@@ -866,7 +867,7 @@ static void kill_prom_timer(void)
866 : "g1", "g2"); 867 : "g1", "g2");
867} 868}
868 869
869void init_irqwork_curcpu(void) 870void notrace init_irqwork_curcpu(void)
870{ 871{
871 int cpu = hard_smp_processor_id(); 872 int cpu = hard_smp_processor_id();
872 873
@@ -897,7 +898,7 @@ static void __cpuinit register_one_mondo(unsigned long paddr, unsigned long type
897 } 898 }
898} 899}
899 900
900void __cpuinit sun4v_register_mondo_queues(int this_cpu) 901void __cpuinit notrace sun4v_register_mondo_queues(int this_cpu)
901{ 902{
902 struct trap_per_cpu *tb = &trap_block[this_cpu]; 903 struct trap_per_cpu *tb = &trap_block[this_cpu];
903 904
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c
index e205ade69cfc..f85b6bebb0be 100644
--- a/arch/sparc64/kernel/pci_psycho.c
+++ b/arch/sparc64/kernel/pci_psycho.c
@@ -575,7 +575,7 @@ static irqreturn_t psycho_pcierr_intr_other(struct pci_pbm_info *pbm, int is_pbm
575{ 575{
576 unsigned long csr_reg, csr, csr_error_bits; 576 unsigned long csr_reg, csr, csr_error_bits;
577 irqreturn_t ret = IRQ_NONE; 577 irqreturn_t ret = IRQ_NONE;
578 u16 stat; 578 u16 stat, *addr;
579 579
580 if (is_pbm_a) { 580 if (is_pbm_a) {
581 csr_reg = pbm->controller_regs + PSYCHO_PCIA_CTRL; 581 csr_reg = pbm->controller_regs + PSYCHO_PCIA_CTRL;
@@ -597,7 +597,9 @@ static irqreturn_t psycho_pcierr_intr_other(struct pci_pbm_info *pbm, int is_pbm
597 printk("%s: PCI SERR signal asserted.\n", pbm->name); 597 printk("%s: PCI SERR signal asserted.\n", pbm->name);
598 ret = IRQ_HANDLED; 598 ret = IRQ_HANDLED;
599 } 599 }
600 pci_read_config_word(pbm->pci_bus->self, PCI_STATUS, &stat); 600 addr = psycho_pci_config_mkaddr(pbm, pbm->pci_first_busno,
601 0, PCI_STATUS);
602 pci_config_read16(addr, &stat);
601 if (stat & (PCI_STATUS_PARITY | 603 if (stat & (PCI_STATUS_PARITY |
602 PCI_STATUS_SIG_TARGET_ABORT | 604 PCI_STATUS_SIG_TARGET_ABORT |
603 PCI_STATUS_REC_TARGET_ABORT | 605 PCI_STATUS_REC_TARGET_ABORT |
@@ -605,7 +607,7 @@ static irqreturn_t psycho_pcierr_intr_other(struct pci_pbm_info *pbm, int is_pbm
605 PCI_STATUS_SIG_SYSTEM_ERROR)) { 607 PCI_STATUS_SIG_SYSTEM_ERROR)) {
606 printk("%s: PCI bus error, PCI_STATUS[%04x]\n", 608 printk("%s: PCI bus error, PCI_STATUS[%04x]\n",
607 pbm->name, stat); 609 pbm->name, stat);
608 pci_write_config_word(pbm->pci_bus->self, PCI_STATUS, 0xffff); 610 pci_config_write16(addr, 0xffff);
609 ret = IRQ_HANDLED; 611 ret = IRQ_HANDLED;
610 } 612 }
611 return ret; 613 return ret;
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index 3d924121c796..c824df13f589 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -10,6 +10,7 @@
10 10
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/sched.h> 12#include <linux/sched.h>
13#include <linux/linkage.h>
13#include <linux/kernel.h> 14#include <linux/kernel.h>
14#include <linux/signal.h> 15#include <linux/signal.h>
15#include <linux/smp.h> 16#include <linux/smp.h>
@@ -2453,7 +2454,7 @@ struct trap_per_cpu trap_block[NR_CPUS];
2453/* This can get invoked before sched_init() so play it super safe 2454/* This can get invoked before sched_init() so play it super safe
2454 * and use hard_smp_processor_id(). 2455 * and use hard_smp_processor_id().
2455 */ 2456 */
2456void init_cur_cpu_trap(struct thread_info *t) 2457void notrace init_cur_cpu_trap(struct thread_info *t)
2457{ 2458{
2458 int cpu = hard_smp_processor_id(); 2459 int cpu = hard_smp_processor_id();
2459 struct trap_per_cpu *p = &trap_block[cpu]; 2460 struct trap_per_cpu *p = &trap_block[cpu];
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 8aab8517642e..4e456bd955bb 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -344,31 +344,15 @@ static void __init early_cpu_detect(void)
344 344
345/* 345/*
346 * The NOPL instruction is supposed to exist on all CPUs with 346 * The NOPL instruction is supposed to exist on all CPUs with
347 * family >= 6, unfortunately, that's not true in practice because 347 * family >= 6; unfortunately, that's not true in practice because
348 * of early VIA chips and (more importantly) broken virtualizers that 348 * of early VIA chips and (more importantly) broken virtualizers that
349 * are not easy to detect. Hence, probe for it based on first 349 * are not easy to detect. In the latter case it doesn't even *fail*
350 * principles. 350 * reliably, so probing for it doesn't even work. Disable it completely
351 * unless we can find a reliable way to detect all the broken cases.
351 */ 352 */
352static void __cpuinit detect_nopl(struct cpuinfo_x86 *c) 353static void __cpuinit detect_nopl(struct cpuinfo_x86 *c)
353{ 354{
354 const u32 nopl_signature = 0x888c53b1; /* Random number */
355 u32 has_nopl = nopl_signature;
356
357 clear_cpu_cap(c, X86_FEATURE_NOPL); 355 clear_cpu_cap(c, X86_FEATURE_NOPL);
358 if (c->x86 >= 6) {
359 asm volatile("\n"
360 "1: .byte 0x0f,0x1f,0xc0\n" /* nopl %eax */
361 "2:\n"
362 " .section .fixup,\"ax\"\n"
363 "3: xor %0,%0\n"
364 " jmp 2b\n"
365 " .previous\n"
366 _ASM_EXTABLE(1b,3b)
367 : "+a" (has_nopl));
368
369 if (has_nopl == nopl_signature)
370 set_cpu_cap(c, X86_FEATURE_NOPL);
371 }
372} 356}
373 357
374static void __cpuinit generic_identify(struct cpuinfo_x86 *c) 358static void __cpuinit generic_identify(struct cpuinfo_x86 *c)
diff --git a/arch/x86/kernel/kdebugfs.c b/arch/x86/kernel/kdebugfs.c
index f2d43bc75514..ff7d3b0124f1 100644
--- a/arch/x86/kernel/kdebugfs.c
+++ b/arch/x86/kernel/kdebugfs.c
@@ -139,6 +139,7 @@ static int __init create_setup_data_nodes(struct dentry *parent)
139 if (PageHighMem(pg)) { 139 if (PageHighMem(pg)) {
140 data = ioremap_cache(pa_data, sizeof(*data)); 140 data = ioremap_cache(pa_data, sizeof(*data));
141 if (!data) { 141 if (!data) {
142 kfree(node);
142 error = -ENXIO; 143 error = -ENXIO;
143 goto err_dir; 144 goto err_dir;
144 } 145 }
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 362d4e7f2d38..9838f2539dfc 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -670,6 +670,10 @@ void __init setup_arch(char **cmdline_p)
670 670
671 parse_early_param(); 671 parse_early_param();
672 672
673#ifdef CONFIG_X86_64
674 check_efer();
675#endif
676
673#if defined(CONFIG_VMI) && defined(CONFIG_X86_32) 677#if defined(CONFIG_VMI) && defined(CONFIG_X86_32)
674 /* 678 /*
675 * Must be before kernel pagetables are setup 679 * Must be before kernel pagetables are setup
@@ -738,7 +742,6 @@ void __init setup_arch(char **cmdline_p)
738#else 742#else
739 num_physpages = max_pfn; 743 num_physpages = max_pfn;
740 744
741 check_efer();
742 745
743 /* How many end-of-memory variables you have, grandma! */ 746 /* How many end-of-memory variables you have, grandma! */
744 /* need this before calling reserve_initrd */ 747 /* need this before calling reserve_initrd */
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index d37f29376b0c..60ec1d08ff24 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -458,11 +458,7 @@ static void __init pagetable_init(void)
458{ 458{
459 pgd_t *pgd_base = swapper_pg_dir; 459 pgd_t *pgd_base = swapper_pg_dir;
460 460
461 paravirt_pagetable_setup_start(pgd_base);
462
463 permanent_kmaps_init(pgd_base); 461 permanent_kmaps_init(pgd_base);
464
465 paravirt_pagetable_setup_done(pgd_base);
466} 462}
467 463
468#ifdef CONFIG_ACPI_SLEEP 464#ifdef CONFIG_ACPI_SLEEP
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index b6acc3a0af46..d67901083888 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -42,7 +42,7 @@ char * __init xen_memory_setup(void)
42 42
43 e820.nr_map = 0; 43 e820.nr_map = 0;
44 44
45 e820_add_region(0, PFN_PHYS(max_pfn), E820_RAM); 45 e820_add_region(0, PFN_PHYS((u64)max_pfn), E820_RAM);
46 46
47 /* 47 /*
48 * Even though this is normal, usable memory under Xen, reserve 48 * Even though this is normal, usable memory under Xen, reserve
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c
index 4eee533f3f4a..71d2ac4e3f46 100644
--- a/drivers/clocksource/acpi_pm.c
+++ b/drivers/clocksource/acpi_pm.c
@@ -178,11 +178,13 @@ static int verify_pmtmr_rate(void)
178 178
179/* Number of monotonicity checks to perform during initialization */ 179/* Number of monotonicity checks to perform during initialization */
180#define ACPI_PM_MONOTONICITY_CHECKS 10 180#define ACPI_PM_MONOTONICITY_CHECKS 10
181/* Number of reads we try to get two different values */
182#define ACPI_PM_READ_CHECKS 10000
181 183
182static int __init init_acpi_pm_clocksource(void) 184static int __init init_acpi_pm_clocksource(void)
183{ 185{
184 cycle_t value1, value2; 186 cycle_t value1, value2;
185 unsigned int i, j, good = 0; 187 unsigned int i, j = 0;
186 188
187 if (!pmtmr_ioport) 189 if (!pmtmr_ioport)
188 return -ENODEV; 190 return -ENODEV;
@@ -192,29 +194,26 @@ static int __init init_acpi_pm_clocksource(void)
192 194
193 /* "verify" this timing source: */ 195 /* "verify" this timing source: */
194 for (j = 0; j < ACPI_PM_MONOTONICITY_CHECKS; j++) { 196 for (j = 0; j < ACPI_PM_MONOTONICITY_CHECKS; j++) {
197 udelay(100 * j);
195 value1 = clocksource_acpi_pm.read(); 198 value1 = clocksource_acpi_pm.read();
196 for (i = 0; i < 10000; i++) { 199 for (i = 0; i < ACPI_PM_READ_CHECKS; i++) {
197 value2 = clocksource_acpi_pm.read(); 200 value2 = clocksource_acpi_pm.read();
198 if (value2 == value1) 201 if (value2 == value1)
199 continue; 202 continue;
200 if (value2 > value1) 203 if (value2 > value1)
201 good++;
202 break; 204 break;
203 if ((value2 < value1) && ((value2) < 0xFFF)) 205 if ((value2 < value1) && ((value2) < 0xFFF))
204 good++;
205 break; 206 break;
206 printk(KERN_INFO "PM-Timer had inconsistent results:" 207 printk(KERN_INFO "PM-Timer had inconsistent results:"
207 " 0x%#llx, 0x%#llx - aborting.\n", 208 " 0x%#llx, 0x%#llx - aborting.\n",
208 value1, value2); 209 value1, value2);
209 return -EINVAL; 210 return -EINVAL;
210 } 211 }
211 udelay(300 * i); 212 if (i == ACPI_PM_READ_CHECKS) {
212 } 213 printk(KERN_INFO "PM-Timer failed consistency check "
213 214 " (0x%#llx) - aborting.\n", value1);
214 if (good != ACPI_PM_MONOTONICITY_CHECKS) { 215 return -ENODEV;
215 printk(KERN_INFO "PM-Timer failed consistency check " 216 }
216 " (0x%#llx) - aborting.\n", value1);
217 return -ENODEV;
218 } 217 }
219 218
220 if (verify_pmtmr_rate() != 0) 219 if (verify_pmtmr_rate() != 0)
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index f29dbb767e87..9559248f265b 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -1342,6 +1342,12 @@ static __be32 convert_access(int acc)
1342static void set_fmr_seg(struct mlx4_wqe_fmr_seg *fseg, struct ib_send_wr *wr) 1342static void set_fmr_seg(struct mlx4_wqe_fmr_seg *fseg, struct ib_send_wr *wr)
1343{ 1343{
1344 struct mlx4_ib_fast_reg_page_list *mfrpl = to_mfrpl(wr->wr.fast_reg.page_list); 1344 struct mlx4_ib_fast_reg_page_list *mfrpl = to_mfrpl(wr->wr.fast_reg.page_list);
1345 int i;
1346
1347 for (i = 0; i < wr->wr.fast_reg.page_list_len; ++i)
1348 wr->wr.fast_reg.page_list->page_list[i] =
1349 cpu_to_be64(wr->wr.fast_reg.page_list->page_list[i] |
1350 MLX4_MTT_FLAG_PRESENT);
1345 1351
1346 fseg->flags = convert_access(wr->wr.fast_reg.access_flags); 1352 fseg->flags = convert_access(wr->wr.fast_reg.access_flags);
1347 fseg->mem_key = cpu_to_be32(wr->wr.fast_reg.rkey); 1353 fseg->mem_key = cpu_to_be32(wr->wr.fast_reg.rkey);
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 9f0b964b2c99..499d3cf83e1f 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1956,13 +1956,6 @@ static int mini_cm_reject(struct nes_cm_core *cm_core,
1956 return ret; 1956 return ret;
1957 cleanup_retrans_entry(cm_node); 1957 cleanup_retrans_entry(cm_node);
1958 cm_node->state = NES_CM_STATE_CLOSED; 1958 cm_node->state = NES_CM_STATE_CLOSED;
1959 ret = send_fin(cm_node, NULL);
1960
1961 if (cm_node->accept_pend) {
1962 BUG_ON(!cm_node->listener);
1963 atomic_dec(&cm_node->listener->pend_accepts_cnt);
1964 BUG_ON(atomic_read(&cm_node->listener->pend_accepts_cnt) < 0);
1965 }
1966 1959
1967 ret = send_reset(cm_node, NULL); 1960 ret = send_reset(cm_node, NULL);
1968 return ret; 1961 return ret;
@@ -2383,6 +2376,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp)
2383 atomic_inc(&cm_disconnects); 2376 atomic_inc(&cm_disconnects);
2384 cm_event.event = IW_CM_EVENT_DISCONNECT; 2377 cm_event.event = IW_CM_EVENT_DISCONNECT;
2385 if (last_ae == NES_AEQE_AEID_LLP_CONNECTION_RESET) { 2378 if (last_ae == NES_AEQE_AEID_LLP_CONNECTION_RESET) {
2379 issued_disconnect_reset = 1;
2386 cm_event.status = IW_CM_EVENT_STATUS_RESET; 2380 cm_event.status = IW_CM_EVENT_STATUS_RESET;
2387 nes_debug(NES_DBG_CM, "Generating a CM " 2381 nes_debug(NES_DBG_CM, "Generating a CM "
2388 "Disconnect Event (status reset) for " 2382 "Disconnect Event (status reset) for "
@@ -2508,7 +2502,6 @@ static int nes_disconnect(struct nes_qp *nesqp, int abrupt)
2508 nes_debug(NES_DBG_CM, "Call close API\n"); 2502 nes_debug(NES_DBG_CM, "Call close API\n");
2509 2503
2510 g_cm_core->api->close(g_cm_core, nesqp->cm_node); 2504 g_cm_core->api->close(g_cm_core, nesqp->cm_node);
2511 nesqp->cm_node = NULL;
2512 } 2505 }
2513 2506
2514 return ret; 2507 return ret;
@@ -2837,6 +2830,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
2837 cm_node->apbvt_set = 1; 2830 cm_node->apbvt_set = 1;
2838 nesqp->cm_node = cm_node; 2831 nesqp->cm_node = cm_node;
2839 cm_node->nesqp = nesqp; 2832 cm_node->nesqp = nesqp;
2833 nes_add_ref(&nesqp->ibqp);
2840 2834
2841 return 0; 2835 return 0;
2842} 2836}
@@ -3167,7 +3161,6 @@ static void cm_event_connect_error(struct nes_cm_event *event)
3167 if (ret) 3161 if (ret)
3168 printk(KERN_ERR "%s[%u] OFA CM event_handler returned, " 3162 printk(KERN_ERR "%s[%u] OFA CM event_handler returned, "
3169 "ret=%d\n", __func__, __LINE__, ret); 3163 "ret=%d\n", __func__, __LINE__, ret);
3170 nes_rem_ref(&nesqp->ibqp);
3171 cm_id->rem_ref(cm_id); 3164 cm_id->rem_ref(cm_id);
3172 3165
3173 rem_ref_cm_node(event->cm_node->cm_core, event->cm_node); 3166 rem_ref_cm_node(event->cm_node->cm_core, event->cm_node);
diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
index b0ffc9abe8c0..05eb41b8ab63 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib.h
+++ b/drivers/infiniband/ulp/ipoib/ipoib.h
@@ -293,6 +293,7 @@ struct ipoib_dev_priv {
293 293
294 struct delayed_work pkey_poll_task; 294 struct delayed_work pkey_poll_task;
295 struct delayed_work mcast_task; 295 struct delayed_work mcast_task;
296 struct work_struct carrier_on_task;
296 struct work_struct flush_light; 297 struct work_struct flush_light;
297 struct work_struct flush_normal; 298 struct work_struct flush_normal;
298 struct work_struct flush_heavy; 299 struct work_struct flush_heavy;
@@ -464,6 +465,7 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port);
464void ipoib_dev_cleanup(struct net_device *dev); 465void ipoib_dev_cleanup(struct net_device *dev);
465 466
466void ipoib_mcast_join_task(struct work_struct *work); 467void ipoib_mcast_join_task(struct work_struct *work);
468void ipoib_mcast_carrier_on_task(struct work_struct *work);
467void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb); 469void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb);
468 470
469void ipoib_mcast_restart_task(struct work_struct *work); 471void ipoib_mcast_restart_task(struct work_struct *work);
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 7e9e218738fa..1b1df5cc4113 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1075,6 +1075,7 @@ static void ipoib_setup(struct net_device *dev)
1075 1075
1076 INIT_DELAYED_WORK(&priv->pkey_poll_task, ipoib_pkey_poll); 1076 INIT_DELAYED_WORK(&priv->pkey_poll_task, ipoib_pkey_poll);
1077 INIT_DELAYED_WORK(&priv->mcast_task, ipoib_mcast_join_task); 1077 INIT_DELAYED_WORK(&priv->mcast_task, ipoib_mcast_join_task);
1078 INIT_WORK(&priv->carrier_on_task, ipoib_mcast_carrier_on_task);
1078 INIT_WORK(&priv->flush_light, ipoib_ib_dev_flush_light); 1079 INIT_WORK(&priv->flush_light, ipoib_ib_dev_flush_light);
1079 INIT_WORK(&priv->flush_normal, ipoib_ib_dev_flush_normal); 1080 INIT_WORK(&priv->flush_normal, ipoib_ib_dev_flush_normal);
1080 INIT_WORK(&priv->flush_heavy, ipoib_ib_dev_flush_heavy); 1081 INIT_WORK(&priv->flush_heavy, ipoib_ib_dev_flush_heavy);
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index ac33c8f3ea85..aae28620a6e5 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -366,6 +366,21 @@ static int ipoib_mcast_sendonly_join(struct ipoib_mcast *mcast)
366 return ret; 366 return ret;
367} 367}
368 368
369void ipoib_mcast_carrier_on_task(struct work_struct *work)
370{
371 struct ipoib_dev_priv *priv = container_of(work, struct ipoib_dev_priv,
372 carrier_on_task);
373
374 /*
375 * Take rtnl_lock to avoid racing with ipoib_stop() and
376 * turning the carrier back on while a device is being
377 * removed.
378 */
379 rtnl_lock();
380 netif_carrier_on(priv->dev);
381 rtnl_unlock();
382}
383
369static int ipoib_mcast_join_complete(int status, 384static int ipoib_mcast_join_complete(int status,
370 struct ib_sa_multicast *multicast) 385 struct ib_sa_multicast *multicast)
371{ 386{
@@ -392,16 +407,12 @@ static int ipoib_mcast_join_complete(int status,
392 &priv->mcast_task, 0); 407 &priv->mcast_task, 0);
393 mutex_unlock(&mcast_mutex); 408 mutex_unlock(&mcast_mutex);
394 409
395 if (mcast == priv->broadcast) { 410 /*
396 /* 411 * Defer carrier on work to ipoib_workqueue to avoid a
397 * Take RTNL lock here to avoid racing with 412 * deadlock on rtnl_lock here.
398 * ipoib_stop() and turning the carrier back 413 */
399 * on while a device is being removed. 414 if (mcast == priv->broadcast)
400 */ 415 queue_work(ipoib_workqueue, &priv->carrier_on_task);
401 rtnl_lock();
402 netif_carrier_on(dev);
403 rtnl_unlock();
404 }
405 416
406 return 0; 417 return 0;
407 } 418 }
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 4790c83d78d0..deeac4b44173 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5761,7 +5761,11 @@ void md_do_sync(mddev_t *mddev)
5761 * time 'round when curr_resync == 2 5761 * time 'round when curr_resync == 2
5762 */ 5762 */
5763 continue; 5763 continue;
5764 prepare_to_wait(&resync_wait, &wq, TASK_UNINTERRUPTIBLE); 5764 /* We need to wait 'interruptible' so as not to
5765 * contribute to the load average, and not to
5766 * be caught by 'softlockup'
5767 */
5768 prepare_to_wait(&resync_wait, &wq, TASK_INTERRUPTIBLE);
5765 if (!kthread_should_stop() && 5769 if (!kthread_should_stop() &&
5766 mddev2->curr_resync >= mddev->curr_resync) { 5770 mddev2->curr_resync >= mddev->curr_resync) {
5767 printk(KERN_INFO "md: delaying %s of %s" 5771 printk(KERN_INFO "md: delaying %s of %s"
@@ -5769,6 +5773,8 @@ void md_do_sync(mddev_t *mddev)
5769 " share one or more physical units)\n", 5773 " share one or more physical units)\n",
5770 desc, mdname(mddev), mdname(mddev2)); 5774 desc, mdname(mddev), mdname(mddev2));
5771 mddev_put(mddev2); 5775 mddev_put(mddev2);
5776 if (signal_pending(current))
5777 flush_signals(current);
5772 schedule(); 5778 schedule();
5773 finish_wait(&resync_wait, &wq); 5779 finish_wait(&resync_wait, &wq);
5774 goto try_again; 5780 goto try_again;
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index c3c579f98ed0..dfacd31f7ed0 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -6597,7 +6597,7 @@ struct flash_spec {
6597 6597
6598struct bnx2_irq { 6598struct bnx2_irq {
6599 irq_handler_t handler; 6599 irq_handler_t handler;
6600 u16 vector; 6600 unsigned int vector;
6601 u8 requested; 6601 u8 requested;
6602 char name[16]; 6602 char name[16];
6603}; 6603};
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 453115acaad2..5cf78d612c45 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2738,9 +2738,7 @@ static int __devinit e100_probe(struct pci_dev *pdev,
2738 nic->flags |= wol_magic; 2738 nic->flags |= wol_magic;
2739 2739
2740 /* ack any pending wake events, disable PME */ 2740 /* ack any pending wake events, disable PME */
2741 err = pci_enable_wake(pdev, 0, 0); 2741 pci_pme_active(pdev, false);
2742 if (err)
2743 DPRINTK(PROBE, ERR, "Error clearing wake event\n");
2744 2742
2745 strcpy(netdev->name, "eth%d"); 2743 strcpy(netdev->name, "eth%d");
2746 if((err = register_netdev(netdev))) { 2744 if((err = register_netdev(netdev))) {
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 9d6edf3e73f9..d04eef53571e 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -144,6 +144,8 @@ static s32 e1000_host_if_read_cookie(struct e1000_hw *hw, u8 *buffer);
144static u8 e1000_calculate_mng_checksum(char *buffer, u32 length); 144static u8 e1000_calculate_mng_checksum(char *buffer, u32 length);
145static s32 e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, u16 duplex); 145static s32 e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, u16 duplex);
146static s32 e1000_configure_kmrn_for_1000(struct e1000_hw *hw); 146static s32 e1000_configure_kmrn_for_1000(struct e1000_hw *hw);
147static s32 e1000_do_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
148static s32 e1000_do_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
147 149
148/* IGP cable length table */ 150/* IGP cable length table */
149static const 151static const
@@ -168,6 +170,8 @@ u16 e1000_igp_2_cable_length_table[IGP02E1000_AGC_LENGTH_TABLE_SIZE] =
168 83, 89, 95, 100, 105, 109, 113, 116, 119, 122, 124, 170 83, 89, 95, 100, 105, 109, 113, 116, 119, 122, 124,
169 104, 109, 114, 118, 121, 124}; 171 104, 109, 114, 118, 121, 124};
170 172
173static DEFINE_SPINLOCK(e1000_eeprom_lock);
174
171/****************************************************************************** 175/******************************************************************************
172 * Set the phy type member in the hw struct. 176 * Set the phy type member in the hw struct.
173 * 177 *
@@ -4904,6 +4908,15 @@ static s32 e1000_spi_eeprom_ready(struct e1000_hw *hw)
4904 *****************************************************************************/ 4908 *****************************************************************************/
4905s32 e1000_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) 4909s32 e1000_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
4906{ 4910{
4911 s32 ret;
4912 spin_lock(&e1000_eeprom_lock);
4913 ret = e1000_do_read_eeprom(hw, offset, words, data);
4914 spin_unlock(&e1000_eeprom_lock);
4915 return ret;
4916}
4917
4918static s32 e1000_do_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
4919{
4907 struct e1000_eeprom_info *eeprom = &hw->eeprom; 4920 struct e1000_eeprom_info *eeprom = &hw->eeprom;
4908 u32 i = 0; 4921 u32 i = 0;
4909 4922
@@ -5236,6 +5249,16 @@ s32 e1000_update_eeprom_checksum(struct e1000_hw *hw)
5236 *****************************************************************************/ 5249 *****************************************************************************/
5237s32 e1000_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) 5250s32 e1000_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
5238{ 5251{
5252 s32 ret;
5253 spin_lock(&e1000_eeprom_lock);
5254 ret = e1000_do_write_eeprom(hw, offset, words, data);
5255 spin_unlock(&e1000_eeprom_lock);
5256 return ret;
5257}
5258
5259
5260static s32 e1000_do_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
5261{
5239 struct e1000_eeprom_info *eeprom = &hw->eeprom; 5262 struct e1000_eeprom_info *eeprom = &hw->eeprom;
5240 s32 status = 0; 5263 s32 status = 0;
5241 5264
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 0b6ecef9a849..eeb55ed2152d 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5643,6 +5643,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5643 dev->dev_addr[4] = (np->orig_mac[0] >> 8) & 0xff; 5643 dev->dev_addr[4] = (np->orig_mac[0] >> 8) & 0xff;
5644 dev->dev_addr[5] = (np->orig_mac[0] >> 0) & 0xff; 5644 dev->dev_addr[5] = (np->orig_mac[0] >> 0) & 0xff;
5645 writel(txreg|NVREG_TRANSMITPOLL_MAC_ADDR_REV, base + NvRegTransmitPoll); 5645 writel(txreg|NVREG_TRANSMITPOLL_MAC_ADDR_REV, base + NvRegTransmitPoll);
5646 printk(KERN_DEBUG "nv_probe: set workaround bit for reversed mac addr\n");
5646 } 5647 }
5647 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 5648 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
5648 5649
@@ -5890,14 +5891,12 @@ static void nv_restore_phy(struct net_device *dev)
5890 } 5891 }
5891} 5892}
5892 5893
5893static void __devexit nv_remove(struct pci_dev *pci_dev) 5894static void nv_restore_mac_addr(struct pci_dev *pci_dev)
5894{ 5895{
5895 struct net_device *dev = pci_get_drvdata(pci_dev); 5896 struct net_device *dev = pci_get_drvdata(pci_dev);
5896 struct fe_priv *np = netdev_priv(dev); 5897 struct fe_priv *np = netdev_priv(dev);
5897 u8 __iomem *base = get_hwbase(dev); 5898 u8 __iomem *base = get_hwbase(dev);
5898 5899
5899 unregister_netdev(dev);
5900
5901 /* special op: write back the misordered MAC address - otherwise 5900 /* special op: write back the misordered MAC address - otherwise
5902 * the next nv_probe would see a wrong address. 5901 * the next nv_probe would see a wrong address.
5903 */ 5902 */
@@ -5905,6 +5904,15 @@ static void __devexit nv_remove(struct pci_dev *pci_dev)
5905 writel(np->orig_mac[1], base + NvRegMacAddrB); 5904 writel(np->orig_mac[1], base + NvRegMacAddrB);
5906 writel(readl(base + NvRegTransmitPoll) & ~NVREG_TRANSMITPOLL_MAC_ADDR_REV, 5905 writel(readl(base + NvRegTransmitPoll) & ~NVREG_TRANSMITPOLL_MAC_ADDR_REV,
5907 base + NvRegTransmitPoll); 5906 base + NvRegTransmitPoll);
5907}
5908
5909static void __devexit nv_remove(struct pci_dev *pci_dev)
5910{
5911 struct net_device *dev = pci_get_drvdata(pci_dev);
5912
5913 unregister_netdev(dev);
5914
5915 nv_restore_mac_addr(pci_dev);
5908 5916
5909 /* restore any phy related changes */ 5917 /* restore any phy related changes */
5910 nv_restore_phy(dev); 5918 nv_restore_phy(dev);
@@ -5975,6 +5983,8 @@ static void nv_shutdown(struct pci_dev *pdev)
5975 if (netif_running(dev)) 5983 if (netif_running(dev))
5976 nv_close(dev); 5984 nv_close(dev);
5977 5985
5986 nv_restore_mac_addr(pdev);
5987
5978 pci_disable_device(pdev); 5988 pci_disable_device(pdev);
5979 if (system_state == SYSTEM_POWER_OFF) { 5989 if (system_state == SYSTEM_POWER_OFF) {
5980 if (pci_enable_wake(pdev, PCI_D3cold, np->wolenabled)) 5990 if (pci_enable_wake(pdev, PCI_D3cold, np->wolenabled))
diff --git a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c
index 8239939554bc..fbbd3e660c27 100644
--- a/drivers/net/hp-plus.c
+++ b/drivers/net/hp-plus.c
@@ -139,7 +139,7 @@ static int __init do_hpp_probe(struct net_device *dev)
139#ifndef MODULE 139#ifndef MODULE
140struct net_device * __init hp_plus_probe(int unit) 140struct net_device * __init hp_plus_probe(int unit)
141{ 141{
142 struct net_device *dev = alloc_ei_netdev(); 142 struct net_device *dev = alloc_eip_netdev();
143 int err; 143 int err;
144 144
145 if (!dev) 145 if (!dev)
@@ -284,7 +284,7 @@ hpp_open(struct net_device *dev)
284 int option_reg; 284 int option_reg;
285 int retval; 285 int retval;
286 286
287 if ((retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev))) { 287 if ((retval = request_irq(dev->irq, eip_interrupt, 0, dev->name, dev))) {
288 return retval; 288 return retval;
289 } 289 }
290 290
@@ -302,7 +302,7 @@ hpp_open(struct net_device *dev)
302 /* Select the operational page. */ 302 /* Select the operational page. */
303 outw(Perf_Page, ioaddr + HP_PAGING); 303 outw(Perf_Page, ioaddr + HP_PAGING);
304 304
305 ei_open(dev); 305 eip_open(dev);
306 return 0; 306 return 0;
307} 307}
308 308
@@ -313,7 +313,7 @@ hpp_close(struct net_device *dev)
313 int option_reg = inw(ioaddr + HPP_OPTION); 313 int option_reg = inw(ioaddr + HPP_OPTION);
314 314
315 free_irq(dev->irq, dev); 315 free_irq(dev->irq, dev);
316 ei_close(dev); 316 eip_close(dev);
317 outw((option_reg & ~EnableIRQ) | MemDisable | NICReset | ChipReset, 317 outw((option_reg & ~EnableIRQ) | MemDisable | NICReset | ChipReset,
318 ioaddr + HPP_OPTION); 318 ioaddr + HPP_OPTION);
319 319
diff --git a/drivers/net/mlx4/mr.c b/drivers/net/mlx4/mr.c
index 62071d9c4a55..d1dd5b48dbd1 100644
--- a/drivers/net/mlx4/mr.c
+++ b/drivers/net/mlx4/mr.c
@@ -67,11 +67,10 @@ struct mlx4_mpt_entry {
67#define MLX4_MPT_FLAG_PHYSICAL (1 << 9) 67#define MLX4_MPT_FLAG_PHYSICAL (1 << 9)
68#define MLX4_MPT_FLAG_REGION (1 << 8) 68#define MLX4_MPT_FLAG_REGION (1 << 8)
69 69
70#define MLX4_MPT_PD_FLAG_FAST_REG (1 << 26) 70#define MLX4_MPT_PD_FLAG_FAST_REG (1 << 27)
71#define MLX4_MPT_PD_FLAG_RAE (1 << 28)
71#define MLX4_MPT_PD_FLAG_EN_INV (3 << 24) 72#define MLX4_MPT_PD_FLAG_EN_INV (3 << 24)
72 73
73#define MLX4_MTT_FLAG_PRESENT 1
74
75#define MLX4_MPT_STATUS_SW 0xF0 74#define MLX4_MPT_STATUS_SW 0xF0
76#define MLX4_MPT_STATUS_HW 0x00 75#define MLX4_MPT_STATUS_HW 0x00
77 76
@@ -348,7 +347,10 @@ int mlx4_mr_enable(struct mlx4_dev *dev, struct mlx4_mr *mr)
348 if (mr->mtt.order >= 0 && mr->mtt.page_shift == 0) { 347 if (mr->mtt.order >= 0 && mr->mtt.page_shift == 0) {
349 /* fast register MR in free state */ 348 /* fast register MR in free state */
350 mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_FREE); 349 mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_FREE);
351 mpt_entry->pd_flags |= cpu_to_be32(MLX4_MPT_PD_FLAG_FAST_REG); 350 mpt_entry->pd_flags |= cpu_to_be32(MLX4_MPT_PD_FLAG_FAST_REG |
351 MLX4_MPT_PD_FLAG_RAE);
352 mpt_entry->mtt_sz = cpu_to_be32((1 << mr->mtt.order) *
353 MLX4_MTT_ENTRY_PER_SEG);
352 } else { 354 } else {
353 mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_SW_OWNS); 355 mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_SW_OWNS);
354 } 356 }
diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c
index fec5645944a4..34ae125d5384 100644
--- a/drivers/net/wireless/b43/rfkill.c
+++ b/drivers/net/wireless/b43/rfkill.c
@@ -43,23 +43,6 @@ static bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
43 return 0; 43 return 0;
44} 44}
45 45
46/* Update the rfkill state */
47static void b43_rfkill_update_state(struct b43_wldev *dev)
48{
49 struct b43_rfkill *rfk = &(dev->wl->rfkill);
50
51 if (!dev->radio_hw_enable) {
52 rfk->rfkill->state = RFKILL_STATE_HARD_BLOCKED;
53 return;
54 }
55
56 if (!dev->phy.radio_on)
57 rfk->rfkill->state = RFKILL_STATE_SOFT_BLOCKED;
58 else
59 rfk->rfkill->state = RFKILL_STATE_UNBLOCKED;
60
61}
62
63/* The poll callback for the hardware button. */ 46/* The poll callback for the hardware button. */
64static void b43_rfkill_poll(struct input_polled_dev *poll_dev) 47static void b43_rfkill_poll(struct input_polled_dev *poll_dev)
65{ 48{
@@ -77,7 +60,6 @@ static void b43_rfkill_poll(struct input_polled_dev *poll_dev)
77 if (unlikely(enabled != dev->radio_hw_enable)) { 60 if (unlikely(enabled != dev->radio_hw_enable)) {
78 dev->radio_hw_enable = enabled; 61 dev->radio_hw_enable = enabled;
79 report_change = 1; 62 report_change = 1;
80 b43_rfkill_update_state(dev);
81 b43info(wl, "Radio hardware status changed to %s\n", 63 b43info(wl, "Radio hardware status changed to %s\n",
82 enabled ? "ENABLED" : "DISABLED"); 64 enabled ? "ENABLED" : "DISABLED");
83 } 65 }
diff --git a/drivers/net/wireless/b43legacy/rfkill.c b/drivers/net/wireless/b43legacy/rfkill.c
index 476add97e974..b32bf6a94f19 100644
--- a/drivers/net/wireless/b43legacy/rfkill.c
+++ b/drivers/net/wireless/b43legacy/rfkill.c
@@ -44,23 +44,6 @@ static bool b43legacy_is_hw_radio_enabled(struct b43legacy_wldev *dev)
44 return 0; 44 return 0;
45} 45}
46 46
47/* Update the rfkill state */
48static void b43legacy_rfkill_update_state(struct b43legacy_wldev *dev)
49{
50 struct b43legacy_rfkill *rfk = &(dev->wl->rfkill);
51
52 if (!dev->radio_hw_enable) {
53 rfk->rfkill->state = RFKILL_STATE_HARD_BLOCKED;
54 return;
55 }
56
57 if (!dev->phy.radio_on)
58 rfk->rfkill->state = RFKILL_STATE_SOFT_BLOCKED;
59 else
60 rfk->rfkill->state = RFKILL_STATE_UNBLOCKED;
61
62}
63
64/* The poll callback for the hardware button. */ 47/* The poll callback for the hardware button. */
65static void b43legacy_rfkill_poll(struct input_polled_dev *poll_dev) 48static void b43legacy_rfkill_poll(struct input_polled_dev *poll_dev)
66{ 49{
@@ -78,7 +61,6 @@ static void b43legacy_rfkill_poll(struct input_polled_dev *poll_dev)
78 if (unlikely(enabled != dev->radio_hw_enable)) { 61 if (unlikely(enabled != dev->radio_hw_enable)) {
79 dev->radio_hw_enable = enabled; 62 dev->radio_hw_enable = enabled;
80 report_change = 1; 63 report_change = 1;
81 b43legacy_rfkill_update_state(dev);
82 b43legacyinfo(wl, "Radio hardware status changed to %s\n", 64 b43legacyinfo(wl, "Radio hardware status changed to %s\n",
83 enabled ? "ENABLED" : "DISABLED"); 65 enabled ? "ENABLED" : "DISABLED");
84 } 66 }
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index a3f738cffdb6..edc6ba82e090 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -97,6 +97,16 @@ extern void warn_slowpath(const char *file, const int line,
97 unlikely(__ret_warn_once); \ 97 unlikely(__ret_warn_once); \
98}) 98})
99 99
100#define WARN_ONCE(condition, format...) ({ \
101 static int __warned; \
102 int __ret_warn_once = !!(condition); \
103 \
104 if (unlikely(__ret_warn_once)) \
105 if (WARN(!__warned, format)) \
106 __warned = 1; \
107 unlikely(__ret_warn_once); \
108})
109
100#define WARN_ON_RATELIMIT(condition, state) \ 110#define WARN_ON_RATELIMIT(condition, state) \
101 WARN_ON((condition) && __ratelimit(state)) 111 WARN_ON((condition) && __ratelimit(state))
102 112
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 655ea0d1ee14..b2f944468313 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -141,6 +141,10 @@ enum {
141 MLX4_STAT_RATE_OFFSET = 5 141 MLX4_STAT_RATE_OFFSET = 5
142}; 142};
143 143
144enum {
145 MLX4_MTT_FLAG_PRESENT = 1
146};
147
144static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) 148static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor)
145{ 149{
146 return (major << 32) | (minor << 16) | subminor; 150 return (major << 32) | (minor << 16) | subminor;
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index 1ce54b63085d..be764e514e35 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -21,7 +21,14 @@ struct pnp_dev;
21/* 21/*
22 * Resource Management 22 * Resource Management
23 */ 23 */
24#ifdef CONFIG_PNP
24struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int); 25struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int);
26#else
27static inline struct resource *pnp_get_resource(struct pnp_dev *dev, unsigned int type, unsigned int num)
28{
29 return NULL;
30}
31#endif
25 32
26static inline int pnp_resource_valid(struct resource *res) 33static inline int pnp_resource_valid(struct resource *res)
27{ 34{
diff --git a/kernel/sched.c b/kernel/sched.c
index cc1f81b50b82..98890807375b 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -8909,6 +8909,9 @@ static int sched_rt_global_constraints(void)
8909 u64 rt_runtime, rt_period; 8909 u64 rt_runtime, rt_period;
8910 int ret = 0; 8910 int ret = 0;
8911 8911
8912 if (sysctl_sched_rt_period <= 0)
8913 return -EINVAL;
8914
8912 rt_period = ktime_to_ns(tg->rt_bandwidth.rt_period); 8915 rt_period = ktime_to_ns(tg->rt_bandwidth.rt_period);
8913 rt_runtime = tg->rt_bandwidth.rt_runtime; 8916 rt_runtime = tg->rt_bandwidth.rt_runtime;
8914 8917
@@ -8925,6 +8928,9 @@ static int sched_rt_global_constraints(void)
8925 unsigned long flags; 8928 unsigned long flags;
8926 int i; 8929 int i;
8927 8930
8931 if (sysctl_sched_rt_period <= 0)
8932 return -EINVAL;
8933
8928 spin_lock_irqsave(&def_rt_bandwidth.rt_runtime_lock, flags); 8934 spin_lock_irqsave(&def_rt_bandwidth.rt_runtime_lock, flags);
8929 for_each_possible_cpu(i) { 8935 for_each_possible_cpu(i) {
8930 struct rt_rq *rt_rq = &cpu_rq(i)->rt; 8936 struct rt_rq *rt_rq = &cpu_rq(i)->rt;
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 552310798dad..1113157b2058 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -350,6 +350,7 @@ static void __enable_runtime(struct rq *rq)
350 spin_lock(&rt_rq->rt_runtime_lock); 350 spin_lock(&rt_rq->rt_runtime_lock);
351 rt_rq->rt_runtime = rt_b->rt_runtime; 351 rt_rq->rt_runtime = rt_b->rt_runtime;
352 rt_rq->rt_time = 0; 352 rt_rq->rt_time = 0;
353 rt_rq->rt_throttled = 0;
353 spin_unlock(&rt_rq->rt_runtime_lock); 354 spin_unlock(&rt_rq->rt_runtime_lock);
354 spin_unlock(&rt_b->rt_runtime_lock); 355 spin_unlock(&rt_b->rt_runtime_lock);
355 } 356 }
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 1876b526c778..f8d968063cea 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -72,6 +72,16 @@ void clockevents_set_mode(struct clock_event_device *dev,
72} 72}
73 73
74/** 74/**
75 * clockevents_shutdown - shutdown the device and clear next_event
76 * @dev: device to shutdown
77 */
78void clockevents_shutdown(struct clock_event_device *dev)
79{
80 clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
81 dev->next_event.tv64 = KTIME_MAX;
82}
83
84/**
75 * clockevents_program_event - Reprogram the clock event device. 85 * clockevents_program_event - Reprogram the clock event device.
76 * @expires: absolute expiry time (monotonic clock) 86 * @expires: absolute expiry time (monotonic clock)
77 * 87 *
@@ -206,7 +216,7 @@ void clockevents_exchange_device(struct clock_event_device *old,
206 216
207 if (new) { 217 if (new) {
208 BUG_ON(new->mode != CLOCK_EVT_MODE_UNUSED); 218 BUG_ON(new->mode != CLOCK_EVT_MODE_UNUSED);
209 clockevents_set_mode(new, CLOCK_EVT_MODE_SHUTDOWN); 219 clockevents_shutdown(new);
210 } 220 }
211 local_irq_restore(flags); 221 local_irq_restore(flags);
212} 222}
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 2f5a38294bf9..f1f3eee28113 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -236,8 +236,7 @@ static void tick_do_broadcast_on_off(void *why)
236 if (!cpu_isset(cpu, tick_broadcast_mask)) { 236 if (!cpu_isset(cpu, tick_broadcast_mask)) {
237 cpu_set(cpu, tick_broadcast_mask); 237 cpu_set(cpu, tick_broadcast_mask);
238 if (td->mode == TICKDEV_MODE_PERIODIC) 238 if (td->mode == TICKDEV_MODE_PERIODIC)
239 clockevents_set_mode(dev, 239 clockevents_shutdown(dev);
240 CLOCK_EVT_MODE_SHUTDOWN);
241 } 240 }
242 if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE) 241 if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE)
243 tick_broadcast_force = 1; 242 tick_broadcast_force = 1;
@@ -254,7 +253,7 @@ static void tick_do_broadcast_on_off(void *why)
254 253
255 if (cpus_empty(tick_broadcast_mask)) { 254 if (cpus_empty(tick_broadcast_mask)) {
256 if (!bc_stopped) 255 if (!bc_stopped)
257 clockevents_set_mode(bc, CLOCK_EVT_MODE_SHUTDOWN); 256 clockevents_shutdown(bc);
258 } else if (bc_stopped) { 257 } else if (bc_stopped) {
259 if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC) 258 if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC)
260 tick_broadcast_start_periodic(bc); 259 tick_broadcast_start_periodic(bc);
@@ -306,7 +305,7 @@ void tick_shutdown_broadcast(unsigned int *cpup)
306 305
307 if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC) { 306 if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC) {
308 if (bc && cpus_empty(tick_broadcast_mask)) 307 if (bc && cpus_empty(tick_broadcast_mask))
309 clockevents_set_mode(bc, CLOCK_EVT_MODE_SHUTDOWN); 308 clockevents_shutdown(bc);
310 } 309 }
311 310
312 spin_unlock_irqrestore(&tick_broadcast_lock, flags); 311 spin_unlock_irqrestore(&tick_broadcast_lock, flags);
@@ -321,7 +320,7 @@ void tick_suspend_broadcast(void)
321 320
322 bc = tick_broadcast_device.evtdev; 321 bc = tick_broadcast_device.evtdev;
323 if (bc) 322 if (bc)
324 clockevents_set_mode(bc, CLOCK_EVT_MODE_SHUTDOWN); 323 clockevents_shutdown(bc);
325 324
326 spin_unlock_irqrestore(&tick_broadcast_lock, flags); 325 spin_unlock_irqrestore(&tick_broadcast_lock, flags);
327} 326}
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index c4777193d567..019315ebf9de 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -249,7 +249,7 @@ static int tick_check_new_device(struct clock_event_device *newdev)
249 * not give it back to the clockevents layer ! 249 * not give it back to the clockevents layer !
250 */ 250 */
251 if (tick_is_broadcast_device(curdev)) { 251 if (tick_is_broadcast_device(curdev)) {
252 clockevents_set_mode(curdev, CLOCK_EVT_MODE_SHUTDOWN); 252 clockevents_shutdown(curdev);
253 curdev = NULL; 253 curdev = NULL;
254 } 254 }
255 clockevents_exchange_device(curdev, newdev); 255 clockevents_exchange_device(curdev, newdev);
@@ -311,7 +311,7 @@ static void tick_suspend(void)
311 unsigned long flags; 311 unsigned long flags;
312 312
313 spin_lock_irqsave(&tick_device_lock, flags); 313 spin_lock_irqsave(&tick_device_lock, flags);
314 clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_SHUTDOWN); 314 clockevents_shutdown(td->evtdev);
315 spin_unlock_irqrestore(&tick_device_lock, flags); 315 spin_unlock_irqrestore(&tick_device_lock, flags);
316} 316}
317 317
diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h
index 0ffc2918ea6f..6e9db9734aa6 100644
--- a/kernel/time/tick-internal.h
+++ b/kernel/time/tick-internal.h
@@ -10,6 +10,8 @@ extern int tick_do_timer_cpu __read_mostly;
10extern void tick_setup_periodic(struct clock_event_device *dev, int broadcast); 10extern void tick_setup_periodic(struct clock_event_device *dev, int broadcast);
11extern void tick_handle_periodic(struct clock_event_device *dev); 11extern void tick_handle_periodic(struct clock_event_device *dev);
12 12
13extern void clockevents_shutdown(struct clock_event_device *dev);
14
13/* 15/*
14 * NO_HZ / high resolution timer shared code 16 * NO_HZ / high resolution timer shared code
15 */ 17 */
diff --git a/mm/slub.c b/mm/slub.c
index fb486d5540f8..0c83e6afe7b2 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1932,6 +1932,7 @@ init_kmem_cache_node(struct kmem_cache_node *n, struct kmem_cache *s)
1932 INIT_LIST_HEAD(&n->partial); 1932 INIT_LIST_HEAD(&n->partial);
1933#ifdef CONFIG_SLUB_DEBUG 1933#ifdef CONFIG_SLUB_DEBUG
1934 atomic_long_set(&n->nr_slabs, 0); 1934 atomic_long_set(&n->nr_slabs, 0);
1935 atomic_long_set(&n->total_objects, 0);
1935 INIT_LIST_HEAD(&n->full); 1936 INIT_LIST_HEAD(&n->full);
1936#endif 1937#endif
1937} 1938}
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 8e42fbbd5761..57e26fa66185 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -951,6 +951,27 @@ int udp_disconnect(struct sock *sk, int flags)
951 return 0; 951 return 0;
952} 952}
953 953
954static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
955{
956 int is_udplite = IS_UDPLITE(sk);
957 int rc;
958
959 if ((rc = sock_queue_rcv_skb(sk, skb)) < 0) {
960 /* Note that an ENOMEM error is charged twice */
961 if (rc == -ENOMEM)
962 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
963 is_udplite);
964 goto drop;
965 }
966
967 return 0;
968
969drop:
970 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
971 kfree_skb(skb);
972 return -1;
973}
974
954/* returns: 975/* returns:
955 * -1: error 976 * -1: error
956 * 0: success 977 * 0: success
@@ -989,9 +1010,7 @@ int udp_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
989 up->encap_rcv != NULL) { 1010 up->encap_rcv != NULL) {
990 int ret; 1011 int ret;
991 1012
992 bh_unlock_sock(sk);
993 ret = (*up->encap_rcv)(sk, skb); 1013 ret = (*up->encap_rcv)(sk, skb);
994 bh_lock_sock(sk);
995 if (ret <= 0) { 1014 if (ret <= 0) {
996 UDP_INC_STATS_BH(sock_net(sk), 1015 UDP_INC_STATS_BH(sock_net(sk),
997 UDP_MIB_INDATAGRAMS, 1016 UDP_MIB_INDATAGRAMS,
@@ -1044,17 +1063,16 @@ int udp_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
1044 goto drop; 1063 goto drop;
1045 } 1064 }
1046 1065
1047 if ((rc = sock_queue_rcv_skb(sk,skb)) < 0) { 1066 rc = 0;
1048 /* Note that an ENOMEM error is charged twice */
1049 if (rc == -ENOMEM) {
1050 UDP_INC_STATS_BH(sock_net(sk),
1051 UDP_MIB_RCVBUFERRORS, is_udplite);
1052 atomic_inc(&sk->sk_drops);
1053 }
1054 goto drop;
1055 }
1056 1067
1057 return 0; 1068 bh_lock_sock(sk);
1069 if (!sock_owned_by_user(sk))
1070 rc = __udp_queue_rcv_skb(sk, skb);
1071 else
1072 sk_add_backlog(sk, skb);
1073 bh_unlock_sock(sk);
1074
1075 return rc;
1058 1076
1059drop: 1077drop:
1060 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite); 1078 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
@@ -1092,15 +1110,7 @@ static int __udp4_lib_mcast_deliver(struct net *net, struct sk_buff *skb,
1092 skb1 = skb_clone(skb, GFP_ATOMIC); 1110 skb1 = skb_clone(skb, GFP_ATOMIC);
1093 1111
1094 if (skb1) { 1112 if (skb1) {
1095 int ret = 0; 1113 int ret = udp_queue_rcv_skb(sk, skb1);
1096
1097 bh_lock_sock(sk);
1098 if (!sock_owned_by_user(sk))
1099 ret = udp_queue_rcv_skb(sk, skb1);
1100 else
1101 sk_add_backlog(sk, skb1);
1102 bh_unlock_sock(sk);
1103
1104 if (ret > 0) 1114 if (ret > 0)
1105 /* we should probably re-process instead 1115 /* we should probably re-process instead
1106 * of dropping packets here. */ 1116 * of dropping packets here. */
@@ -1195,13 +1205,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[],
1195 uh->dest, inet_iif(skb), udptable); 1205 uh->dest, inet_iif(skb), udptable);
1196 1206
1197 if (sk != NULL) { 1207 if (sk != NULL) {
1198 int ret = 0; 1208 int ret = udp_queue_rcv_skb(sk, skb);
1199 bh_lock_sock(sk);
1200 if (!sock_owned_by_user(sk))
1201 ret = udp_queue_rcv_skb(sk, skb);
1202 else
1203 sk_add_backlog(sk, skb);
1204 bh_unlock_sock(sk);
1205 sock_put(sk); 1209 sock_put(sk);
1206 1210
1207 /* a return value > 0 means to resubmit the input, but 1211 /* a return value > 0 means to resubmit the input, but
@@ -1494,7 +1498,7 @@ struct proto udp_prot = {
1494 .sendmsg = udp_sendmsg, 1498 .sendmsg = udp_sendmsg,
1495 .recvmsg = udp_recvmsg, 1499 .recvmsg = udp_recvmsg,
1496 .sendpage = udp_sendpage, 1500 .sendpage = udp_sendpage,
1497 .backlog_rcv = udp_queue_rcv_skb, 1501 .backlog_rcv = __udp_queue_rcv_skb,
1498 .hash = udp_lib_hash, 1502 .hash = udp_lib_hash,
1499 .unhash = udp_lib_unhash, 1503 .unhash = udp_lib_unhash,
1500 .get_port = udp_v4_get_port, 1504 .get_port = udp_v4_get_port,
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 9634091ee2f0..ec0a0839ce51 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -215,10 +215,9 @@ static void dev_watchdog(unsigned long arg)
215 time_after(jiffies, (dev->trans_start + 215 time_after(jiffies, (dev->trans_start +
216 dev->watchdog_timeo))) { 216 dev->watchdog_timeo))) {
217 char drivername[64]; 217 char drivername[64];
218 printk(KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit timed out\n", 218 WARN_ONCE(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit timed out\n",
219 dev->name, netdev_drivername(dev, drivername, 64)); 219 dev->name, netdev_drivername(dev, drivername, 64));
220 dev->tx_timeout(dev); 220 dev->tx_timeout(dev);
221 WARN_ON_ONCE(1);
222 } 221 }
223 if (!mod_timer(&dev->watchdog_timer, 222 if (!mod_timer(&dev->watchdog_timer,
224 round_jiffies(jiffies + 223 round_jiffies(jiffies +
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 8472b8b349c4..abd51cef2413 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -599,11 +599,12 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
599 /* Check to see if this is a duplicate. */ 599 /* Check to see if this is a duplicate. */
600 peer = sctp_assoc_lookup_paddr(asoc, addr); 600 peer = sctp_assoc_lookup_paddr(asoc, addr);
601 if (peer) { 601 if (peer) {
602 /* An UNKNOWN state is only set on transports added by
603 * user in sctp_connectx() call. Such transports should be
604 * considered CONFIRMED per RFC 4960, Section 5.4.
605 */
602 if (peer->state == SCTP_UNKNOWN) { 606 if (peer->state == SCTP_UNKNOWN) {
603 if (peer_state == SCTP_ACTIVE) 607 peer->state = SCTP_ACTIVE;
604 peer->state = SCTP_ACTIVE;
605 if (peer_state == SCTP_UNCONFIRMED)
606 peer->state = SCTP_UNCONFIRMED;
607 } 608 }
608 return peer; 609 return peer;
609 } 610 }
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 0dc4a7dfb234..225c7123c41f 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -533,7 +533,8 @@ int sctp_packet_transmit(struct sctp_packet *packet)
533 if (!(dst->dev->features & NETIF_F_NO_CSUM)) { 533 if (!(dst->dev->features & NETIF_F_NO_CSUM)) {
534 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len); 534 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len);
535 crc32 = sctp_end_cksum(crc32); 535 crc32 = sctp_end_cksum(crc32);
536 } 536 } else
537 nskb->ip_summed = CHECKSUM_UNNECESSARY;
537 538
538 /* 3) Put the resultant value into the checksum field in the 539 /* 3) Put the resultant value into the checksum field in the
539 * common header, and leave the rest of the bits unchanged. 540 * common header, and leave the rest of the bits unchanged.
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index e8ca4e54981f..b599cbba4fbe 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1886,11 +1886,13 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
1886 /* if the peer reports AUTH, assume that he 1886 /* if the peer reports AUTH, assume that he
1887 * supports AUTH. 1887 * supports AUTH.
1888 */ 1888 */
1889 asoc->peer.auth_capable = 1; 1889 if (sctp_auth_enable)
1890 asoc->peer.auth_capable = 1;
1890 break; 1891 break;
1891 case SCTP_CID_ASCONF: 1892 case SCTP_CID_ASCONF:
1892 case SCTP_CID_ASCONF_ACK: 1893 case SCTP_CID_ASCONF_ACK:
1893 asoc->peer.asconf_capable = 1; 1894 if (sctp_addip_enable)
1895 asoc->peer.asconf_capable = 1;
1894 break; 1896 break;
1895 default: 1897 default:
1896 break; 1898 break;
@@ -2319,12 +2321,10 @@ clean_up:
2319 /* Release the transport structures. */ 2321 /* Release the transport structures. */
2320 list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { 2322 list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) {
2321 transport = list_entry(pos, struct sctp_transport, transports); 2323 transport = list_entry(pos, struct sctp_transport, transports);
2322 list_del_init(pos); 2324 if (transport->state != SCTP_ACTIVE)
2323 sctp_transport_free(transport); 2325 sctp_assoc_rm_peer(asoc, transport);
2324 } 2326 }
2325 2327
2326 asoc->peer.transport_count = 0;
2327
2328nomem: 2328nomem:
2329 return 0; 2329 return 0;
2330} 2330}
@@ -2460,6 +2460,9 @@ do_addr_param:
2460 break; 2460 break;
2461 2461
2462 case SCTP_PARAM_SET_PRIMARY: 2462 case SCTP_PARAM_SET_PRIMARY:
2463 if (!sctp_addip_enable)
2464 goto fall_through;
2465
2463 addr_param = param.v + sizeof(sctp_addip_param_t); 2466 addr_param = param.v + sizeof(sctp_addip_param_t);
2464 2467
2465 af = sctp_get_af_specific(param_type2af(param.p->type)); 2468 af = sctp_get_af_specific(param_type2af(param.p->type));