Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge commit 'v2.6.35' into perf/core

Conflicts:
tools/perf/Makefile
tools/perf/util/hist.c

Merge reason: Resolve the conflicts and update to latest upstream.

Signed-off-by: Ingo Molnar <mingo@elte.hu>

+1509 -649
+3
Documentation/credentials.txt
··· 417 417 This does all the RCU magic inside of it. The caller must call put_cred() on 418 418 the credentials so obtained when they're finished with. 419 419 420 + [*] Note: The result of __task_cred() should not be passed directly to 421 + get_cred() as this may race with commit_cred(). 422 + 420 423 There are a couple of convenience functions to access bits of another task's 421 424 credentials, hiding the RCU magic from the caller: 422 425
+7
Documentation/feature-removal-schedule.txt
··· 647 647 648 648 ---------------------------- 649 649 650 + What: The acpi_sleep=s4_nonvs command line option 651 + When: 2.6.37 652 + Files: arch/x86/kernel/acpi/sleep.c 653 + Why: superseded by acpi_sleep=nonvs 654 + Who: Rafael J. Wysocki <rjw@sisk.pl> 655 + 656 + ----------------------------
+2 -2
Documentation/kernel-parameters.txt
··· 254 254 control method, with respect to putting devices into 255 255 low power states, to be enforced (the ACPI 2.0 ordering 256 256 of _PTS is used by default). 257 - s4_nonvs prevents the kernel from saving/restoring the 258 - ACPI NVS memory during hibernation. 257 + nonvs prevents the kernel from saving/restoring the 258 + ACPI NVS memory during suspend/hibernation and resume. 259 259 sci_force_enable causes the kernel to set SCI_EN directly 260 260 on resume from S1/S3 (which is against the ACPI spec, 261 261 but some broken systems don't work without it).
+2
MAINTAINERS
··· 6236 6236 6237 6237 WATCHDOG DEVICE DRIVERS 6238 6238 M: Wim Van Sebroeck <wim@iguana.be> 6239 + L: linux-watchdog@vger.kernel.org 6240 + W: http://www.linux-watchdog.org/ 6239 6241 T: git git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git 6240 6242 S: Maintained 6241 6243 F: Documentation/watchdog/
+1 -1
Makefile
··· 1 1 VERSION = 2 2 2 PATCHLEVEL = 6 3 3 SUBLEVEL = 35 4 - EXTRAVERSION = -rc5 4 + EXTRAVERSION = 5 5 NAME = Sheep on Meth 6 6 7 7 # *DOCUMENTATION*
+3
arch/arm/boot/compressed/Makefile
··· 71 71 piggy.$(suffix_y) piggy.$(suffix_y).o \ 72 72 font.o font.c head.o misc.o $(OBJS) 73 73 74 + # Make sure files are removed during clean 75 + extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S 76 + 74 77 ifeq ($(CONFIG_FUNCTION_TRACER),y) 75 78 ORIG_CFLAGS := $(KBUILD_CFLAGS) 76 79 KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
+2 -3
arch/arm/common/sa1111.c
··· 1028 1028 struct sa1111 *sachip = platform_get_drvdata(pdev); 1029 1029 1030 1030 if (sachip) { 1031 - __sa1111_remove(sachip); 1032 - platform_set_drvdata(pdev, NULL); 1033 - 1034 1031 #ifdef CONFIG_PM 1035 1032 kfree(sachip->saved_state); 1036 1033 sachip->saved_state = NULL; 1037 1034 #endif 1035 + __sa1111_remove(sachip); 1036 + platform_set_drvdata(pdev, NULL); 1038 1037 } 1039 1038 1040 1039 return 0;
+32 -18
arch/arm/include/asm/io.h
··· 26 26 #include <linux/types.h> 27 27 #include <asm/byteorder.h> 28 28 #include <asm/memory.h> 29 + #include <asm/system.h> 29 30 30 31 /* 31 32 * ISA I/O bus memory addresses are 1:1 with the physical address. ··· 180 179 * IO port primitives for more information. 181 180 */ 182 181 #ifdef __mem_pci 183 - #define readb(c) ({ __u8 __v = __raw_readb(__mem_pci(c)); __v; }) 184 - #define readw(c) ({ __u16 __v = le16_to_cpu((__force __le16) \ 182 + #define readb_relaxed(c) ({ u8 __v = __raw_readb(__mem_pci(c)); __v; }) 183 + #define readw_relaxed(c) ({ u16 __v = le16_to_cpu((__force __le16) \ 185 184 __raw_readw(__mem_pci(c))); __v; }) 186 - #define readl(c) ({ __u32 __v = le32_to_cpu((__force __le32) \ 185 + #define readl_relaxed(c) ({ u32 __v = le32_to_cpu((__force __le32) \ 187 186 __raw_readl(__mem_pci(c))); __v; }) 188 - #define readb_relaxed(addr) readb(addr) 189 - #define readw_relaxed(addr) readw(addr) 190 - #define readl_relaxed(addr) readl(addr) 187 + 188 + #define writeb_relaxed(v,c) ((void)__raw_writeb(v,__mem_pci(c))) 189 + #define writew_relaxed(v,c) ((void)__raw_writew((__force u16) \ 190 + cpu_to_le16(v),__mem_pci(c))) 191 + #define writel_relaxed(v,c) ((void)__raw_writel((__force u32) \ 192 + cpu_to_le32(v),__mem_pci(c))) 193 + 194 + #ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE 195 + #define __iormb() rmb() 196 + #define __iowmb() wmb() 197 + #else 198 + #define __iormb() do { } while (0) 199 + #define __iowmb() do { } while (0) 200 + #endif 201 + 202 + #define readb(c) ({ u8 __v = readb_relaxed(c); __iormb(); __v; }) 203 + #define readw(c) ({ u16 __v = readw_relaxed(c); __iormb(); __v; }) 204 + #define readl(c) ({ u32 __v = readl_relaxed(c); __iormb(); __v; }) 205 + 206 + #define writeb(v,c) ({ __iowmb(); writeb_relaxed(v,c); }) 207 + #define writew(v,c) ({ __iowmb(); writew_relaxed(v,c); }) 208 + #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); }) 191 209 192 210 #define readsb(p,d,l) __raw_readsb(__mem_pci(p),d,l) 193 211 #define readsw(p,d,l) __raw_readsw(__mem_pci(p),d,l) 194 212 #define readsl(p,d,l) __raw_readsl(__mem_pci(p),d,l) 195 - 196 - #define writeb(v,c) __raw_writeb(v,__mem_pci(c)) 197 - #define writew(v,c) __raw_writew((__force __u16) \ 198 - cpu_to_le16(v),__mem_pci(c)) 199 - #define writel(v,c) __raw_writel((__force __u32) \ 200 - cpu_to_le32(v),__mem_pci(c)) 201 213 202 214 #define writesb(p,d,l) __raw_writesb(__mem_pci(p),d,l) 203 215 #define writesw(p,d,l) __raw_writesw(__mem_pci(p),d,l) ··· 258 244 * io{read,write}{8,16,32} macros 259 245 */ 260 246 #ifndef ioread8 261 - #define ioread8(p) ({ unsigned int __v = __raw_readb(p); __v; }) 262 - #define ioread16(p) ({ unsigned int __v = le16_to_cpu((__force __le16)__raw_readw(p)); __v; }) 263 - #define ioread32(p) ({ unsigned int __v = le32_to_cpu((__force __le32)__raw_readl(p)); __v; }) 247 + #define ioread8(p) ({ unsigned int __v = __raw_readb(p); __iormb(); __v; }) 248 + #define ioread16(p) ({ unsigned int __v = le16_to_cpu((__force __le16)__raw_readw(p)); __iormb(); __v; }) 249 + #define ioread32(p) ({ unsigned int __v = le32_to_cpu((__force __le32)__raw_readl(p)); __iormb(); __v; }) 264 250 265 - #define iowrite8(v,p) __raw_writeb(v, p) 266 - #define iowrite16(v,p) __raw_writew((__force __u16)cpu_to_le16(v), p) 267 - #define iowrite32(v,p) __raw_writel((__force __u32)cpu_to_le32(v), p) 251 + #define iowrite8(v,p) ({ __iowmb(); (void)__raw_writeb(v, p); }) 252 + #define iowrite16(v,p) ({ __iowmb(); (void)__raw_writew((__force __u16)cpu_to_le16(v), p); }) 253 + #define iowrite32(v,p) ({ __iowmb(); (void)__raw_writel((__force __u32)cpu_to_le32(v), p); }) 268 254 269 255 #define ioread8_rep(p,d,c) __raw_readsb(p,d,c) 270 256 #define ioread16_rep(p,d,c) __raw_readsw(p,d,c)
+1 -1
arch/arm/lib/csumpartialcopyuser.S
··· 71 71 .pushsection .fixup,"ax" 72 72 .align 4 73 73 9001: mov r4, #-EFAULT 74 - ldr r5, [fp, #4] @ *err_ptr 74 + ldr r5, [sp, #8*4] @ *err_ptr 75 75 str r4, [r5] 76 76 ldmia sp, {r1, r2} @ retrieve dst, len 77 77 add r2, r2, r1
+1
arch/arm/mach-clps711x/include/mach/debug-macro.S
··· 11 11 * 12 12 */ 13 13 14 + #include <mach/hardware.h> 14 15 #include <asm/hardware/clps7111.h> 15 16 16 17 .macro addruart, rx, tmp
+8
arch/arm/mach-davinci/board-da850-evm.c
··· 25 25 #include <linux/mtd/partitions.h> 26 26 #include <linux/mtd/physmap.h> 27 27 #include <linux/regulator/machine.h> 28 + #include <linux/regulator/tps6507x.h> 28 29 #include <linux/mfd/tps6507x.h> 29 30 #include <linux/input/tps6507x-ts.h> 30 31 ··· 470 469 }, 471 470 }; 472 471 472 + /* We take advantage of the fact that both defdcdc{2,3} are tied high */ 473 + static struct tps6507x_reg_platform_data tps6507x_platform_data = { 474 + .defdcdc_default = true, 475 + }; 476 + 473 477 struct regulator_init_data tps65070_regulator_data[] = { 474 478 /* dcdc1 */ 475 479 { ··· 500 494 }, 501 495 .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc2_consumers), 502 496 .consumer_supplies = tps65070_dcdc2_consumers, 497 + .driver_data = &tps6507x_platform_data, 503 498 }, 504 499 505 500 /* dcdc3 */ ··· 514 507 }, 515 508 .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc3_consumers), 516 509 .consumer_supplies = tps65070_dcdc3_consumers, 510 + .driver_data = &tps6507x_platform_data, 517 511 }, 518 512 519 513 /* ldo1 */
+1 -1
arch/arm/mach-footbridge/common.c
··· 232 232 233 233 unsigned long __pfn_to_bus(unsigned long pfn) 234 234 { 235 - return __pfn_to_phys(pfn) + (fb_bus_sdram_offset() - PHYS_OFFSET)); 235 + return __pfn_to_phys(pfn) + (fb_bus_sdram_offset() - PHYS_OFFSET); 236 236 } 237 237 EXPORT_SYMBOL(__pfn_to_bus); 238 238
+4 -2
arch/arm/mach-h720x/include/mach/debug-macro.S
··· 11 11 * 12 12 */ 13 13 14 - .equ io_virt, IO_BASE 15 - .equ io_phys, IO_START 14 + #include <mach/hardware.h> 15 + 16 + .equ io_virt, IO_VIRT 17 + .equ io_phys, IO_PHYS 16 18 17 19 .macro addruart, rx, tmp 18 20 mrc p15, 0, \rx, c1, c0
+1 -1
arch/arm/mach-kirkwood/tsx1x-common.c
··· 77 77 }, 78 78 }; 79 79 80 - void qnap_tsx1x_register_flash(void) 80 + void __init qnap_tsx1x_register_flash(void) 81 81 { 82 82 spi_register_board_info(qnap_tsx1x_spi_slave_info, 83 83 ARRAY_SIZE(qnap_tsx1x_spi_slave_info));
+1 -1
arch/arm/mach-kirkwood/tsx1x-common.h
··· 1 1 #ifndef __ARCH_KIRKWOOD_TSX1X_COMMON_H 2 2 #define __ARCH_KIRKWOOD_TSX1X_COMMON_H 3 3 4 - extern void qnap_tsx1x_register_flash(void); 4 + extern void __init qnap_tsx1x_register_flash(void); 5 5 extern void qnap_tsx1x_power_off(void); 6 6 7 7 #endif
+1
arch/arm/mach-ns9xxx/include/mach/debug-macro.S
··· 8 8 * the Free Software Foundation. 9 9 */ 10 10 #include <mach/hardware.h> 11 + #include <asm/memory.h> 11 12 12 13 #include <mach/regs-board-a9m9750dev.h> 13 14
+15 -15
arch/arm/mach-ns9xxx/include/mach/uncompress.h
··· 20 20 /* nothing */ 21 21 } 22 22 23 + static int timeout; 24 + 23 25 static void putc_ns9360(char c, void __iomem *base) 24 26 { 25 - static int t = 0x10000; 26 27 do { 27 - if (t) 28 - --t; 28 + if (timeout) 29 + --timeout; 29 30 30 31 if (__raw_readl(base + 8) & (1 << 3)) { 31 32 __raw_writeb(c, base + 16); 32 - t = 0x10000; 33 + timeout = 0x10000; 33 34 break; 34 35 } 35 - } while (t); 36 + } while (timeout); 36 37 } 37 38 38 39 static void putc_a9m9750dev(char c, void __iomem *base) 39 40 { 40 - static int t = 0x10000; 41 41 do { 42 - if (t) 43 - --t; 42 + if (timeout) 43 + --timeout; 44 44 45 45 if (__raw_readb(base + 5) & (1 << 5)) { 46 46 __raw_writeb(c, base); 47 - t = 0x10000; 47 + timeout = 0x10000; 48 48 break; 49 49 } 50 - } while (t); 50 + } while (timeout); 51 51 52 52 } 53 53 54 54 static void putc_ns921x(char c, void __iomem *base) 55 55 { 56 - static int t = 0x10000; 57 56 do { 58 - if (t) 59 - --t; 57 + if (timeout) 58 + --timeout; 60 59 61 60 if (!(__raw_readl(base) & (1 << 11))) { 62 61 __raw_writeb(c, base + 0x0028); 63 - t = 0x10000; 62 + timeout = 0x10000; 64 63 break; 65 64 } 66 - } while (t); 65 + } while (timeout); 67 66 } 68 67 69 68 #define MSCS __REG(0xA0900184) ··· 88 89 89 90 static void autodetect(void (**putc)(char, void __iomem *), void __iomem **base) 90 91 { 92 + timeout = 0x10000; 91 93 if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x00) { 92 94 /* ns9360 or ns9750 */ 93 95 if (NS9360_UART_ENABLED(NS9360_UARTA)) {
+14 -3
arch/arm/mach-omap2/board-rx51-peripherals.c
··· 175 175 #endif /* CONFIG_KEYBOARD_GPIO || CONFIG_KEYBOARD_GPIO_MODULE */ 176 176 177 177 static int board_keymap[] = { 178 + /* 179 + * Note that KEY(x, 8, KEY_XXX) entries represent "entrire row 180 + * connected to the ground" matrix state. 181 + */ 178 182 KEY(0, 0, KEY_Q), 179 183 KEY(0, 1, KEY_O), 180 184 KEY(0, 2, KEY_P), ··· 186 182 KEY(0, 4, KEY_BACKSPACE), 187 183 KEY(0, 6, KEY_A), 188 184 KEY(0, 7, KEY_S), 185 + 189 186 KEY(1, 0, KEY_W), 190 187 KEY(1, 1, KEY_D), 191 188 KEY(1, 2, KEY_F), ··· 195 190 KEY(1, 5, KEY_J), 196 191 KEY(1, 6, KEY_K), 197 192 KEY(1, 7, KEY_L), 193 + 198 194 KEY(2, 0, KEY_E), 199 195 KEY(2, 1, KEY_DOT), 200 196 KEY(2, 2, KEY_UP), ··· 203 197 KEY(2, 5, KEY_Z), 204 198 KEY(2, 6, KEY_X), 205 199 KEY(2, 7, KEY_C), 200 + KEY(2, 8, KEY_F9), 201 + 206 202 KEY(3, 0, KEY_R), 207 203 KEY(3, 1, KEY_V), 208 204 KEY(3, 2, KEY_B), ··· 213 205 KEY(3, 5, KEY_SPACE), 214 206 KEY(3, 6, KEY_SPACE), 215 207 KEY(3, 7, KEY_LEFT), 208 + 216 209 KEY(4, 0, KEY_T), 217 210 KEY(4, 1, KEY_DOWN), 218 211 KEY(4, 2, KEY_RIGHT), 219 212 KEY(4, 4, KEY_LEFTCTRL), 220 213 KEY(4, 5, KEY_RIGHTALT), 221 214 KEY(4, 6, KEY_LEFTSHIFT), 215 + KEY(4, 8, KEY_F10), 216 + 222 217 KEY(5, 0, KEY_Y), 218 + KEY(5, 8, KEY_F11), 219 + 223 220 KEY(6, 0, KEY_U), 221 + 224 222 KEY(7, 0, KEY_I), 225 223 KEY(7, 1, KEY_F7), 226 224 KEY(7, 2, KEY_F8), 227 - KEY(0xff, 2, KEY_F9), 228 - KEY(0xff, 4, KEY_F10), 229 - KEY(0xff, 5, KEY_F11), 230 225 }; 231 226 232 227 static struct matrix_keymap_data board_map_data = {
+2 -1
arch/arm/mach-pxa/colibri-pxa300.c
··· 26 26 #include <mach/colibri.h> 27 27 #include <mach/ohci.h> 28 28 #include <mach/pxafb.h> 29 + #include <mach/audio.h> 29 30 30 31 #include "generic.h" 31 32 #include "devices.h" ··· 146 145 static inline void colibri_pxa300_init_lcd(void) {} 147 146 #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */ 148 147 149 - #if defined(SND_AC97_CODEC) || defined(SND_AC97_CODEC_MODULE) 148 + #if defined(CONFIG_SND_AC97_CODEC) || defined(CONFIG_SND_AC97_CODEC_MODULE) 150 149 static mfp_cfg_t colibri_pxa310_ac97_pin_config[] __initdata = { 151 150 GPIO24_AC97_SYSCLK, 152 151 GPIO23_AC97_nACRESET,
+1 -1
arch/arm/mach-pxa/corgi.c
··· 446 446 static struct pxamci_platform_data corgi_mci_platform_data = { 447 447 .detect_delay_ms = 250, 448 448 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 449 - .gpio_card_detect = -1, 449 + .gpio_card_detect = CORGI_GPIO_nSD_DETECT, 450 450 .gpio_card_ro = CORGI_GPIO_nSD_WP, 451 451 .gpio_power = CORGI_GPIO_SD_PWR, 452 452 };
+2 -6
arch/arm/mach-pxa/cpufreq-pxa2xx.c
··· 256 256 257 257 static u32 mdrefr_dri(unsigned int freq) 258 258 { 259 - u32 dri = 0; 259 + u32 interval = freq * SDRAM_TREF / sdram_rows; 260 260 261 - if (cpu_is_pxa25x()) 262 - dri = ((freq * SDRAM_TREF) / (sdram_rows * 32)); 263 - if (cpu_is_pxa27x()) 264 - dri = ((freq * SDRAM_TREF) / (sdram_rows - 31)) / 32; 265 - return dri; 261 + return (interval - (cpu_is_pxa27x() ? 31 : 0)) / 32; 266 262 } 267 263 268 264 /* find a valid frequency point */
+3 -3
arch/arm/mach-pxa/pxa27x.c
··· 41 41 EXPORT_SYMBOL(pxa27x_clear_otgph); 42 42 43 43 static unsigned long ac97_reset_config[] = { 44 - GPIO95_AC97_nRESET, 45 - GPIO95_GPIO, 46 - GPIO113_AC97_nRESET, 47 44 GPIO113_GPIO, 45 + GPIO113_AC97_nRESET, 46 + GPIO95_GPIO, 47 + GPIO95_AC97_nRESET, 48 48 }; 49 49 50 50 void pxa27x_assert_ac97reset(int reset_gpio, int on)
+1 -1
arch/arm/mach-realview/core.c
··· 237 237 else 238 238 mask = 2; 239 239 240 - return !(readl(REALVIEW_SYSMCI) & mask); 240 + return readl(REALVIEW_SYSMCI) & mask; 241 241 } 242 242 243 243 struct mmci_platform_data realview_mmc0_plat_data = {
+3
arch/arm/mach-shark/include/mach/debug-macro.S
··· 20 20 strb \rd, [\rx] 21 21 .endm 22 22 23 + .macro waituart,rd,rx 24 + .endm 25 + 23 26 .macro busyuart,rd,rx 24 27 mov \rd, #0 25 28 1001: add \rd, \rd, #1
+5 -5
arch/arm/mach-ux500/include/mach/uncompress.h
··· 30 30 static void putc(const char c) 31 31 { 32 32 /* Do nothing if the UART is not enabled. */ 33 - if (!(readb(U8500_UART_CR) & 0x1)) 33 + if (!(__raw_readb(U8500_UART_CR) & 0x1)) 34 34 return; 35 35 36 36 if (c == '\n') 37 37 putc('\r'); 38 38 39 - while (readb(U8500_UART_FR) & (1 << 5)) 39 + while (__raw_readb(U8500_UART_FR) & (1 << 5)) 40 40 barrier(); 41 - writeb(c, U8500_UART_DR); 41 + __raw_writeb(c, U8500_UART_DR); 42 42 } 43 43 44 44 static void flush(void) 45 45 { 46 - if (!(readb(U8500_UART_CR) & 0x1)) 46 + if (!(__raw_readb(U8500_UART_CR) & 0x1)) 47 47 return; 48 - while (readb(U8500_UART_FR) & (1 << 3)) 48 + while (__raw_readb(U8500_UART_FR) & (1 << 3)) 49 49 barrier(); 50 50 } 51 51
+1 -1
arch/arm/mach-vexpress/v2m.c
··· 241 241 242 242 static unsigned int v2m_mmci_status(struct device *dev) 243 243 { 244 - return !(readl(MMIO_P2V(V2M_SYS_MCI)) & (1 << 0)); 244 + return readl(MMIO_P2V(V2M_SYS_MCI)) & (1 << 0); 245 245 } 246 246 247 247 static struct mmci_platform_data v2m_mmci_data = {
+1 -1
arch/arm/mach-w90x900/cpu.c
··· 93 93 DEF_CLKLOOK(&clk_kpi, "nuc900-kpi", NULL), 94 94 DEF_CLKLOOK(&clk_wdt, "nuc900-wdt", NULL), 95 95 DEF_CLKLOOK(&clk_gdma, "nuc900-gdma", NULL), 96 - DEF_CLKLOOK(&clk_adc, "nuc900-adc", NULL), 96 + DEF_CLKLOOK(&clk_adc, "nuc900-ts", NULL), 97 97 DEF_CLKLOOK(&clk_usi, "nuc900-spi", NULL), 98 98 DEF_CLKLOOK(&clk_ext, NULL, "ext"), 99 99 DEF_CLKLOOK(&clk_timer0, NULL, "timer0"),
+13 -13
arch/arm/mm/cache-l2x0.c
··· 32 32 static inline void cache_wait(void __iomem *reg, unsigned long mask) 33 33 { 34 34 /* wait for the operation to complete */ 35 - while (readl(reg) & mask) 35 + while (readl_relaxed(reg) & mask) 36 36 ; 37 37 } 38 38 39 39 static inline void cache_sync(void) 40 40 { 41 41 void __iomem *base = l2x0_base; 42 - writel(0, base + L2X0_CACHE_SYNC); 42 + writel_relaxed(0, base + L2X0_CACHE_SYNC); 43 43 cache_wait(base + L2X0_CACHE_SYNC, 1); 44 44 } 45 45 ··· 47 47 { 48 48 void __iomem *base = l2x0_base; 49 49 cache_wait(base + L2X0_CLEAN_LINE_PA, 1); 50 - writel(addr, base + L2X0_CLEAN_LINE_PA); 50 + writel_relaxed(addr, base + L2X0_CLEAN_LINE_PA); 51 51 } 52 52 53 53 static inline void l2x0_inv_line(unsigned long addr) 54 54 { 55 55 void __iomem *base = l2x0_base; 56 56 cache_wait(base + L2X0_INV_LINE_PA, 1); 57 - writel(addr, base + L2X0_INV_LINE_PA); 57 + writel_relaxed(addr, base + L2X0_INV_LINE_PA); 58 58 } 59 59 60 60 #ifdef CONFIG_PL310_ERRATA_588369 ··· 75 75 76 76 /* Clean by PA followed by Invalidate by PA */ 77 77 cache_wait(base + L2X0_CLEAN_LINE_PA, 1); 78 - writel(addr, base + L2X0_CLEAN_LINE_PA); 78 + writel_relaxed(addr, base + L2X0_CLEAN_LINE_PA); 79 79 cache_wait(base + L2X0_INV_LINE_PA, 1); 80 - writel(addr, base + L2X0_INV_LINE_PA); 80 + writel_relaxed(addr, base + L2X0_INV_LINE_PA); 81 81 } 82 82 #else 83 83 ··· 90 90 { 91 91 void __iomem *base = l2x0_base; 92 92 cache_wait(base + L2X0_CLEAN_INV_LINE_PA, 1); 93 - writel(addr, base + L2X0_CLEAN_INV_LINE_PA); 93 + writel_relaxed(addr, base + L2X0_CLEAN_INV_LINE_PA); 94 94 } 95 95 #endif 96 96 ··· 109 109 110 110 /* invalidate all ways */ 111 111 spin_lock_irqsave(&l2x0_lock, flags); 112 - writel(l2x0_way_mask, l2x0_base + L2X0_INV_WAY); 112 + writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_INV_WAY); 113 113 cache_wait(l2x0_base + L2X0_INV_WAY, l2x0_way_mask); 114 114 cache_sync(); 115 115 spin_unlock_irqrestore(&l2x0_lock, flags); ··· 215 215 216 216 l2x0_base = base; 217 217 218 - cache_id = readl(l2x0_base + L2X0_CACHE_ID); 219 - aux = readl(l2x0_base + L2X0_AUX_CTRL); 218 + cache_id = readl_relaxed(l2x0_base + L2X0_CACHE_ID); 219 + aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); 220 220 221 221 aux &= aux_mask; 222 222 aux |= aux_val; ··· 248 248 * If you are booting from non-secure mode 249 249 * accessing the below registers will fault. 250 250 */ 251 - if (!(readl(l2x0_base + L2X0_CTRL) & 1)) { 251 + if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { 252 252 253 253 /* l2x0 controller is disabled */ 254 - writel(aux, l2x0_base + L2X0_AUX_CTRL); 254 + writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL); 255 255 256 256 l2x0_inv_all(); 257 257 258 258 /* enable L2X0 */ 259 - writel(1, l2x0_base + L2X0_CTRL); 259 + writel_relaxed(1, l2x0_base + L2X0_CTRL); 260 260 } 261 261 262 262 outer_cache.inv_range = l2x0_inv_range;
+8 -5
arch/arm/mm/highmem.c
··· 163 163 164 164 void *kmap_high_l1_vipt(struct page *page, pte_t *saved_pte) 165 165 { 166 - unsigned int idx, cpu = smp_processor_id(); 167 - int *depth = &per_cpu(kmap_high_l1_vipt_depth, cpu); 166 + unsigned int idx, cpu; 167 + int *depth; 168 168 unsigned long vaddr, flags; 169 169 pte_t pte, *ptep; 170 + 171 + if (!in_interrupt()) 172 + preempt_disable(); 173 + 174 + cpu = smp_processor_id(); 175 + depth = &per_cpu(kmap_high_l1_vipt_depth, cpu); 170 176 171 177 idx = KM_L1_CACHE + KM_TYPE_NR * cpu; 172 178 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 173 179 ptep = TOP_PTE(vaddr); 174 180 pte = mk_pte(page, kmap_prot); 175 - 176 - if (!in_interrupt()) 177 - preempt_disable(); 178 181 179 182 raw_local_irq_save(flags); 180 183 (*depth)++;
+2 -2
arch/arm/plat-spear/include/plat/debug-macro.S
··· 17 17 .macro addruart, rx 18 18 mrc p15, 0, \rx, c1, c0 19 19 tst \rx, #1 @ MMU enabled? 20 - moveq \rx, =SPEAR_DBG_UART_BASE @ Physical base 21 - movne \rx, =VA_SPEAR_DBG_UART_BASE @ Virtual base 20 + moveq \rx, #SPEAR_DBG_UART_BASE @ Physical base 21 + movne \rx, #VA_SPEAR_DBG_UART_BASE @ Virtual base 22 22 .endm 23 23 24 24 .macro senduart, rd, rx
+3
arch/avr32/include/asm/ioctls.h
··· 54 54 #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ 55 55 #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ 56 56 57 + #define TIOCGRS485 0x542E 58 + #define TIOCSRS485 0x542F 59 + 57 60 #define FIONCLEX 0x5450 58 61 #define FIOCLEX 0x5451 59 62 #define FIOASYNC 0x5452
+2
arch/avr32/mach-at32ap/include/mach/board.h
··· 5 5 #define __ASM_ARCH_BOARD_H 6 6 7 7 #include <linux/types.h> 8 + #include <linux/serial.h> 8 9 9 10 #define GPIO_PIN_NONE (-1) 10 11 ··· 36 35 short use_dma_tx; /* use transmit DMA? */ 37 36 short use_dma_rx; /* use receive DMA? */ 38 37 void __iomem *regs; /* virtual base address, if any */ 38 + struct serial_rs485 rs485; /* rs485 settings */ 39 39 }; 40 40 void at32_map_usart(unsigned int hw_id, unsigned int line, int flags); 41 41 struct platform_device *at32_add_device_usart(unsigned int id);
+5 -4
arch/mips/alchemy/common/platform.c
··· 435 435 static int __init au1xxx_platform_init(void) 436 436 { 437 437 unsigned int uartclk = get_au1x00_uart_baud_base() * 16; 438 - int i; 438 + int err, i; 439 439 440 440 /* Fill up uartclk. */ 441 441 for (i = 0; au1x00_uart_data[i].flags; i++) 442 442 au1x00_uart_data[i].uartclk = uartclk; 443 443 444 + err = platform_add_devices(au1xxx_platform_devices, 445 + ARRAY_SIZE(au1xxx_platform_devices)); 444 446 #ifndef CONFIG_SOC_AU1100 445 447 /* Register second MAC if enabled in pinfunc */ 446 - if (!(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2)) 448 + if (!err && !(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2)) 447 449 platform_device_register(&au1xxx_eth1_device); 448 450 #endif 449 451 450 - return platform_add_devices(au1xxx_platform_devices, 451 - ARRAY_SIZE(au1xxx_platform_devices)); 452 + return err; 452 453 } 453 454 454 455 arch_initcall(au1xxx_platform_init);
+3 -5
arch/mips/alchemy/mtx-1/board_setup.c
··· 67 67 68 68 void __init board_setup(void) 69 69 { 70 - alchemy_gpio2_enable(); 71 - 72 70 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) 73 71 /* Enable USB power switch */ 74 72 alchemy_gpio_direction_output(204, 0); ··· 115 117 116 118 if (assert && devsel != 0) 117 119 /* Suppress signal to Cardbus */ 118 - gpio_set_value(1, 0); /* set EXT_IO3 OFF */ 120 + alchemy_gpio_set_value(1, 0); /* set EXT_IO3 OFF */ 119 121 else 120 - gpio_set_value(1, 1); /* set EXT_IO3 ON */ 122 + alchemy_gpio_set_value(1, 1); /* set EXT_IO3 ON */ 121 123 122 - au_sync_udelay(1); 124 + udelay(1); 123 125 return 1; 124 126 } 125 127
+3
arch/mips/bcm63xx/dev-enet.c
··· 104 104 if (unit > 1) 105 105 return -ENODEV; 106 106 107 + if (unit == 1 && BCMCPU_IS_6338()) 108 + return -ENODEV; 109 + 107 110 if (!shared_device_registered) { 108 111 shared_res[0].start = bcm63xx_regset_address(RSET_ENETDMA); 109 112 shared_res[0].end = shared_res[0].start;
+12 -12
arch/mips/include/asm/atomic.h
··· 434 434 __asm__ __volatile__( 435 435 " .set mips3 \n" 436 436 "1: lld %0, %1 # atomic64_add \n" 437 - " addu %0, %2 \n" 437 + " daddu %0, %2 \n" 438 438 " scd %0, %1 \n" 439 439 " beqzl %0, 1b \n" 440 440 " .set mips0 \n" ··· 446 446 __asm__ __volatile__( 447 447 " .set mips3 \n" 448 448 "1: lld %0, %1 # atomic64_add \n" 449 - " addu %0, %2 \n" 449 + " daddu %0, %2 \n" 450 450 " scd %0, %1 \n" 451 451 " beqz %0, 2f \n" 452 452 " .subsection 2 \n" ··· 479 479 __asm__ __volatile__( 480 480 " .set mips3 \n" 481 481 "1: lld %0, %1 # atomic64_sub \n" 482 - " subu %0, %2 \n" 482 + " dsubu %0, %2 \n" 483 483 " scd %0, %1 \n" 484 484 " beqzl %0, 1b \n" 485 485 " .set mips0 \n" ··· 491 491 __asm__ __volatile__( 492 492 " .set mips3 \n" 493 493 "1: lld %0, %1 # atomic64_sub \n" 494 - " subu %0, %2 \n" 494 + " dsubu %0, %2 \n" 495 495 " scd %0, %1 \n" 496 496 " beqz %0, 2f \n" 497 497 " .subsection 2 \n" ··· 524 524 __asm__ __volatile__( 525 525 " .set mips3 \n" 526 526 "1: lld %1, %2 # atomic64_add_return \n" 527 - " addu %0, %1, %3 \n" 527 + " daddu %0, %1, %3 \n" 528 528 " scd %0, %2 \n" 529 529 " beqzl %0, 1b \n" 530 - " addu %0, %1, %3 \n" 530 + " daddu %0, %1, %3 \n" 531 531 " .set mips0 \n" 532 532 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 533 533 : "Ir" (i), "m" (v->counter) ··· 538 538 __asm__ __volatile__( 539 539 " .set mips3 \n" 540 540 "1: lld %1, %2 # atomic64_add_return \n" 541 - " addu %0, %1, %3 \n" 541 + " daddu %0, %1, %3 \n" 542 542 " scd %0, %2 \n" 543 543 " beqz %0, 2f \n" 544 - " addu %0, %1, %3 \n" 544 + " daddu %0, %1, %3 \n" 545 545 " .subsection 2 \n" 546 546 "2: b 1b \n" 547 547 " .previous \n" ··· 576 576 __asm__ __volatile__( 577 577 " .set mips3 \n" 578 578 "1: lld %1, %2 # atomic64_sub_return \n" 579 - " subu %0, %1, %3 \n" 579 + " dsubu %0, %1, %3 \n" 580 580 " scd %0, %2 \n" 581 581 " beqzl %0, 1b \n" 582 - " subu %0, %1, %3 \n" 582 + " dsubu %0, %1, %3 \n" 583 583 " .set mips0 \n" 584 584 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 585 585 : "Ir" (i), "m" (v->counter) ··· 590 590 __asm__ __volatile__( 591 591 " .set mips3 \n" 592 592 "1: lld %1, %2 # atomic64_sub_return \n" 593 - " subu %0, %1, %3 \n" 593 + " dsubu %0, %1, %3 \n" 594 594 " scd %0, %2 \n" 595 595 " beqz %0, 2f \n" 596 - " subu %0, %1, %3 \n" 596 + " dsubu %0, %1, %3 \n" 597 597 " .subsection 2 \n" 598 598 "2: b 1b \n" 599 599 " .previous \n"
+3 -2
arch/mips/include/asm/unistd.h
··· 984 984 #define __NR_perf_event_open (__NR_Linux + 296) 985 985 #define __NR_accept4 (__NR_Linux + 297) 986 986 #define __NR_recvmmsg (__NR_Linux + 298) 987 + #define __NR_getdents64 (__NR_Linux + 299) 987 988 988 989 /* 989 990 * Offset of the last N32 flavoured syscall 990 991 */ 991 - #define __NR_Linux_syscalls 298 992 + #define __NR_Linux_syscalls 299 992 993 993 994 #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ 994 995 995 996 #define __NR_N32_Linux 6000 996 - #define __NR_N32_Linux_syscalls 298 997 + #define __NR_N32_Linux_syscalls 299 997 998 998 999 #ifdef __KERNEL__ 999 1000
+1
arch/mips/kernel/scall64-n32.S
··· 419 419 PTR sys_perf_event_open 420 420 PTR sys_accept4 421 421 PTR compat_sys_recvmmsg 422 + PTR sys_getdents 422 423 .size sysn32_call_table,.-sysn32_call_table
+1 -3
arch/mips/kernel/vdso.c
··· 61 61 62 62 vunmap(vdso); 63 63 64 - pr_notice("init_vdso successfull\n"); 65 - 66 64 return 0; 67 65 } 68 - device_initcall(init_vdso); 66 + subsys_initcall(init_vdso); 69 67 70 68 static unsigned long vdso_addr(unsigned long start) 71 69 {
+2
arch/mips/mti-malta/malta-pci.c
··· 247 247 iomem_resource.end &= 0xfffffffffULL; /* 64 GB */ 248 248 ioport_resource.end = controller->io_resource->end; 249 249 250 + controller->io_map_base = mips_io_port_base; 251 + 250 252 register_pci_controller(controller); 251 253 } 252 254
+1
arch/mips/nxp/pnx8550/common/pci.c
··· 44 44 45 45 static struct pci_controller pnx8550_controller = { 46 46 .pci_ops = &pnx8550_pci_ops, 47 + .io_map_base = PNX8550_PORT_BASE, 47 48 .io_resource = &pci_io_resource, 48 49 .mem_resource = &pci_mem_resource, 49 50 };
+1 -1
arch/mips/nxp/pnx8550/common/setup.c
··· 113 113 PNX8550_GLB2_ENAB_INTA_O = 0; 114 114 115 115 /* IO/MEM resources. */ 116 - set_io_port_base(KSEG1); 116 + set_io_port_base(PNX8550_PORT_BASE); 117 117 ioport_resource.start = 0; 118 118 ioport_resource.end = ~0; 119 119 iomem_resource.start = 0;
+1
arch/mips/pci/ops-pmcmsp.c
··· 944 944 .pci_ops = &msp_pci_ops, 945 945 .mem_resource = &pci_mem_resource, 946 946 .mem_offset = 0, 947 + .io_map_base = MSP_PCI_IOSPACE_BASE, 947 948 .io_resource = &pci_io_resource, 948 949 .io_offset = 0 949 950 };
+1
arch/mips/pci/pci-yosemite.c
··· 54 54 panic(ioremap_failed); 55 55 56 56 set_io_port_base(io_v_base); 57 + py_controller.io_map_base = io_v_base; 57 58 TITAN_WRITE(RM9000x2_OCD_LKM7, TITAN_READ(RM9000x2_OCD_LKM7) | 1); 58 59 59 60 ioport_resource.end = TITAN_IO_SIZE - 1;
+3 -2
arch/mips/powertv/asic/asic_devices.c
··· 472 472 * it*/ 473 473 platform_features = FFS_CAPABLE | DISPLAY_CAPABLE; 474 474 475 + /* Cronus and Cronus Lite have the same register map */ 476 + set_register_map(CRONUS_IO_BASE, &cronus_register_map); 477 + 475 478 /* ASIC version will determine if this is a real CronusLite or 476 479 * Castrati(Cronus) */ 477 480 chipversion = asic_read(chipver3) << 24; ··· 487 484 else 488 485 asic = ASIC_CRONUSLITE; 489 486 490 - /* Cronus and Cronus Lite have the same register map */ 491 - set_register_map(CRONUS_IO_BASE, &cronus_register_map); 492 487 gp_resources = non_dvr_cronuslite_resources; 493 488 pr_info("Platform: 4600 - %s, NON_DVR_CAPABLE, " 494 489 "chipversion=0x%08X\n",
+3 -3
arch/powerpc/include/asm/kexec.h
··· 8 8 * On FSL-BookE we setup a 1:1 mapping which covers the first 2GiB of memory 9 9 * and therefore we can only deal with memory within this range 10 10 */ 11 - #define KEXEC_SOURCE_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL) 12 - #define KEXEC_DESTINATION_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL) 13 - #define KEXEC_CONTROL_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL) 11 + #define KEXEC_SOURCE_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL - 1) 12 + #define KEXEC_DESTINATION_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL - 1) 13 + #define KEXEC_CONTROL_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL - 1) 14 14 15 15 #else 16 16
+3 -1
arch/powerpc/include/asm/mmu-hash64.h
··· 250 250 int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid, 251 251 pte_t *ptep, unsigned long trap, int local, int ssize, 252 252 unsigned int shift, unsigned int mmu_psize); 253 - 253 + extern void hash_failure_debug(unsigned long ea, unsigned long access, 254 + unsigned long vsid, unsigned long trap, 255 + int ssize, int psize, unsigned long pte); 254 256 extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, 255 257 unsigned long pstart, unsigned long prot, 256 258 int psize, int ssize);
+3 -3
arch/powerpc/kernel/perf_event_fsl_emb.c
··· 566 566 * Finally record data if requested. 567 567 */ 568 568 if (record) { 569 - struct perf_sample_data data = { 570 - .period = event->hw.last_period, 571 - }; 569 + struct perf_sample_data data; 570 + 571 + perf_sample_data_init(&data, 0); 572 572 573 573 if (perf_event_overflow(event, nmi, &data, regs)) { 574 574 /*
+1 -1
arch/powerpc/kernel/prom.c
··· 414 414 u64 base, size, memblock_size; 415 415 unsigned int is_kexec_kdump = 0, rngs; 416 416 417 - ls = of_get_flat_dt_prop(node, "ibm,memblock-size", &l); 417 + ls = of_get_flat_dt_prop(node, "ibm,lmb-size", &l); 418 418 if (ls == NULL || l < dt_root_size_cells * sizeof(__be32)) 419 419 return 0; 420 420 memblock_size = dt_mem_next_cell(dt_root_size_cells, &ls);
-9
arch/powerpc/mm/hash_low_64.S
··· 68 68 std r8,STK_PARM(r8)(r1) 69 69 std r9,STK_PARM(r9)(r1) 70 70 71 - /* Add _PAGE_PRESENT to access */ 72 - ori r4,r4,_PAGE_PRESENT 73 - 74 71 /* Save non-volatile registers. 75 72 * r31 will hold "old PTE" 76 73 * r30 is "new PTE" ··· 343 346 std r6,STK_PARM(r6)(r1) 344 347 std r8,STK_PARM(r8)(r1) 345 348 std r9,STK_PARM(r9)(r1) 346 - 347 - /* Add _PAGE_PRESENT to access */ 348 - ori r4,r4,_PAGE_PRESENT 349 349 350 350 /* Save non-volatile registers. 351 351 * r31 will hold "old PTE" ··· 680 686 std r6,STK_PARM(r6)(r1) 681 687 std r8,STK_PARM(r8)(r1) 682 688 std r9,STK_PARM(r9)(r1) 683 - 684 - /* Add _PAGE_PRESENT to access */ 685 - ori r4,r4,_PAGE_PRESENT 686 689 687 690 /* Save non-volatile registers. 688 691 * r31 will hold "old PTE"
+40 -13
arch/powerpc/mm/hash_utils_64.c
··· 871 871 } 872 872 #endif 873 873 874 + void hash_failure_debug(unsigned long ea, unsigned long access, 875 + unsigned long vsid, unsigned long trap, 876 + int ssize, int psize, unsigned long pte) 877 + { 878 + if (!printk_ratelimit()) 879 + return; 880 + pr_info("mm: Hashing failure ! EA=0x%lx access=0x%lx current=%s\n", 881 + ea, access, current->comm); 882 + pr_info(" trap=0x%lx vsid=0x%lx ssize=%d psize=%d pte=0x%lx\n", 883 + trap, vsid, ssize, psize, pte); 884 + } 885 + 874 886 /* Result code is: 875 887 * 0 - handled 876 888 * 1 - normal page fault ··· 967 955 return 1; 968 956 } 969 957 958 + /* Add _PAGE_PRESENT to the required access perm */ 959 + access |= _PAGE_PRESENT; 960 + 961 + /* Pre-check access permissions (will be re-checked atomically 962 + * in __hash_page_XX but this pre-check is a fast path 963 + */ 964 + if (access & ~pte_val(*ptep)) { 965 + DBG_LOW(" no access !\n"); 966 + return 1; 967 + } 968 + 970 969 #ifdef CONFIG_HUGETLB_PAGE 971 970 if (hugeshift) 972 971 return __hash_page_huge(ea, access, vsid, ptep, trap, local, ··· 990 967 DBG_LOW(" i-pte: %016lx %016lx\n", pte_val(*ptep), 991 968 pte_val(*(ptep + PTRS_PER_PTE))); 992 969 #endif 993 - /* Pre-check access permissions (will be re-checked atomically 994 - * in __hash_page_XX but this pre-check is a fast path 995 - */ 996 - if (access & ~pte_val(*ptep)) { 997 - DBG_LOW(" no access !\n"); 998 - return 1; 999 - } 1000 - 1001 970 /* Do actual hashing */ 1002 971 #ifdef CONFIG_PPC_64K_PAGES 1003 972 /* If _PAGE_4K_PFN is set, make sure this is a 4k segment */ ··· 1048 1033 local, ssize, spp); 1049 1034 } 1050 1035 1036 + /* Dump some info in case of hash insertion failure, they should 1037 + * never happen so it is really useful to know if/when they do 1038 + */ 1039 + if (rc == -1) 1040 + hash_failure_debug(ea, access, vsid, trap, ssize, psize, 1041 + pte_val(*ptep)); 1051 1042 #ifndef CONFIG_PPC_64K_PAGES 1052 1043 DBG_LOW(" o-pte: %016lx\n", pte_val(*ptep)); 1053 1044 #else ··· 1072 1051 void *pgdir; 1073 1052 pte_t *ptep; 1074 1053 unsigned long flags; 1075 - int local = 0; 1076 - int ssize; 1054 + int rc, ssize, local = 0; 1077 1055 1078 1056 BUG_ON(REGION_ID(ea) != USER_REGION_ID); 1079 1057 ··· 1118 1098 /* Hash it in */ 1119 1099 #ifdef CONFIG_PPC_HAS_HASH_64K 1120 1100 if (mm->context.user_psize == MMU_PAGE_64K) 1121 - __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize); 1101 + rc = __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize); 1122 1102 else 1123 1103 #endif /* CONFIG_PPC_HAS_HASH_64K */ 1124 - __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize, 1125 - subpage_protection(pgdir, ea)); 1104 + rc = __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize, 1105 + subpage_protection(pgdir, ea)); 1106 + 1107 + /* Dump some info in case of hash insertion failure, they should 1108 + * never happen so it is really useful to know if/when they do 1109 + */ 1110 + if (rc == -1) 1111 + hash_failure_debug(ea, access, vsid, trap, ssize, 1112 + mm->context.user_psize, pte_val(*ptep)); 1126 1113 1127 1114 local_irq_restore(flags); 1128 1115 }
+22 -18
arch/powerpc/mm/hugetlbpage-hash64.c
··· 21 21 unsigned long old_pte, new_pte; 22 22 unsigned long va, rflags, pa, sz; 23 23 long slot; 24 - int err = 1; 25 24 26 25 BUG_ON(shift != mmu_psize_defs[mmu_psize].shift); 27 26 28 27 /* Search the Linux page table for a match with va */ 29 28 va = hpt_va(ea, vsid, ssize); 30 29 31 - /* 32 - * Check the user's access rights to the page. If access should be 33 - * prevented then send the problem up to do_page_fault. 34 - */ 35 - if (unlikely(access & ~pte_val(*ptep))) 36 - goto out; 37 - /* 38 - * At this point, we have a pte (old_pte) which can be used to build 30 + /* At this point, we have a pte (old_pte) which can be used to build 39 31 * or update an HPTE. There are 2 cases: 40 32 * 41 33 * 1. There is a valid (present) pte with no associated HPTE (this is ··· 41 49 42 50 do { 43 51 old_pte = pte_val(*ptep); 44 - if (old_pte & _PAGE_BUSY) 45 - goto out; 52 + /* If PTE busy, retry the access */ 53 + if (unlikely(old_pte & _PAGE_BUSY)) 54 + return 0; 55 + /* If PTE permissions don't match, take page fault */ 56 + if (unlikely(access & ~old_pte)) 57 + return 1; 58 + /* Try to lock the PTE, add ACCESSED and DIRTY if it was 59 + * a write access */ 46 60 new_pte = old_pte | _PAGE_BUSY | _PAGE_ACCESSED; 61 + if (access & _PAGE_RW) 62 + new_pte |= _PAGE_DIRTY; 47 63 } while(old_pte != __cmpxchg_u64((unsigned long *)ptep, 48 64 old_pte, new_pte)); 49 65 ··· 121 121 } 122 122 } 123 123 124 - if (unlikely(slot == -2)) 125 - panic("hash_huge_page: pte_insert failed\n"); 124 + /* 125 + * Hypervisor failure. Restore old pte and return -1 126 + * similar to __hash_page_* 127 + */ 128 + if (unlikely(slot == -2)) { 129 + *ptep = __pte(old_pte); 130 + hash_failure_debug(ea, access, vsid, trap, ssize, 131 + mmu_psize, old_pte); 132 + return -1; 133 + } 126 134 127 135 new_pte |= (slot << 12) & (_PAGE_F_SECOND | _PAGE_F_GIX); 128 136 } ··· 139 131 * No need to use ldarx/stdcx here 140 132 */ 141 133 *ptep = __pte(new_pte & ~_PAGE_BUSY); 142 - 143 - err = 0; 144 - 145 - out: 146 - return err; 134 + return 0; 147 135 }
+12 -12
arch/powerpc/mm/numa.c
··· 398 398 } 399 399 400 400 /* 401 - * Retreive and validate the ibm,memblock-size property for drconf memory 401 + * Retreive and validate the ibm,lmb-size property for drconf memory 402 402 * from the device tree. 403 403 */ 404 - static u64 of_get_memblock_size(struct device_node *memory) 404 + static u64 of_get_lmb_size(struct device_node *memory) 405 405 { 406 406 const u32 *prop; 407 407 u32 len; 408 408 409 - prop = of_get_property(memory, "ibm,memblock-size", &len); 409 + prop = of_get_property(memory, "ibm,lmb-size", &len); 410 410 if (!prop || len < sizeof(unsigned int)) 411 411 return 0; 412 412 ··· 562 562 static inline int __init read_usm_ranges(const u32 **usm) 563 563 { 564 564 /* 565 - * For each memblock in ibm,dynamic-memory a corresponding 565 + * For each lmb in ibm,dynamic-memory a corresponding 566 566 * entry in linux,drconf-usable-memory property contains 567 567 * a counter followed by that many (base, size) duple. 568 568 * read the counter from linux,drconf-usable-memory ··· 578 578 { 579 579 const u32 *dm, *usm; 580 580 unsigned int n, rc, ranges, is_kexec_kdump = 0; 581 - unsigned long memblock_size, base, size, sz; 581 + unsigned long lmb_size, base, size, sz; 582 582 int nid; 583 583 struct assoc_arrays aa; 584 584 ··· 586 586 if (!n) 587 587 return; 588 588 589 - memblock_size = of_get_memblock_size(memory); 590 - if (!memblock_size) 589 + lmb_size = of_get_lmb_size(memory); 590 + if (!lmb_size) 591 591 return; 592 592 593 593 rc = of_get_assoc_arrays(memory, &aa); ··· 611 611 continue; 612 612 613 613 base = drmem.base_addr; 614 - size = memblock_size; 614 + size = lmb_size; 615 615 ranges = 1; 616 616 617 617 if (is_kexec_kdump) { ··· 1072 1072 { 1073 1073 const u32 *dm; 1074 1074 unsigned int drconf_cell_cnt, rc; 1075 - unsigned long memblock_size; 1075 + unsigned long lmb_size; 1076 1076 struct assoc_arrays aa; 1077 1077 int nid = -1; 1078 1078 ··· 1080 1080 if (!drconf_cell_cnt) 1081 1081 return -1; 1082 1082 1083 - memblock_size = of_get_memblock_size(memory); 1084 - if (!memblock_size) 1083 + lmb_size = of_get_lmb_size(memory); 1084 + if (!lmb_size) 1085 1085 return -1; 1086 1086 1087 1087 rc = of_get_assoc_arrays(memory, &aa); ··· 1100 1100 continue; 1101 1101 1102 1102 if ((scn_addr < drmem.base_addr) 1103 - || (scn_addr >= (drmem.base_addr + memblock_size))) 1103 + || (scn_addr >= (drmem.base_addr + lmb_size))) 1104 1104 continue; 1105 1105 1106 1106 nid = of_drconf_to_nid_single(&drmem, &aa);
+11 -11
arch/powerpc/platforms/pseries/hotplug-memory.c
··· 69 69 const char *type; 70 70 const unsigned int *regs; 71 71 unsigned long base; 72 - unsigned int memblock_size; 72 + unsigned int lmb_size; 73 73 int ret = -EINVAL; 74 74 75 75 /* ··· 87 87 return ret; 88 88 89 89 base = *(unsigned long *)regs; 90 - memblock_size = regs[3]; 90 + lmb_size = regs[3]; 91 91 92 - ret = pseries_remove_memblock(base, memblock_size); 92 + ret = pseries_remove_memblock(base, lmb_size); 93 93 return ret; 94 94 } 95 95 ··· 98 98 const char *type; 99 99 const unsigned int *regs; 100 100 unsigned long base; 101 - unsigned int memblock_size; 101 + unsigned int lmb_size; 102 102 int ret = -EINVAL; 103 103 104 104 /* ··· 116 116 return ret; 117 117 118 118 base = *(unsigned long *)regs; 119 - memblock_size = regs[3]; 119 + lmb_size = regs[3]; 120 120 121 121 /* 122 122 * Update memory region to represent the memory add 123 123 */ 124 - ret = memblock_add(base, memblock_size); 124 + ret = memblock_add(base, lmb_size); 125 125 return (ret < 0) ? -EINVAL : 0; 126 126 } 127 127 128 128 static int pseries_drconf_memory(unsigned long *base, unsigned int action) 129 129 { 130 130 struct device_node *np; 131 - const unsigned long *memblock_size; 131 + const unsigned long *lmb_size; 132 132 int rc; 133 133 134 134 np = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); 135 135 if (!np) 136 136 return -EINVAL; 137 137 138 - memblock_size = of_get_property(np, "ibm,memblock-size", NULL); 139 - if (!memblock_size) { 138 + lmb_size = of_get_property(np, "ibm,lmb-size", NULL); 139 + if (!lmb_size) { 140 140 of_node_put(np); 141 141 return -EINVAL; 142 142 } 143 143 144 144 if (action == PSERIES_DRCONF_MEM_ADD) { 145 - rc = memblock_add(*base, *memblock_size); 145 + rc = memblock_add(*base, *lmb_size); 146 146 rc = (rc < 0) ? -EINVAL : 0; 147 147 } else if (action == PSERIES_DRCONF_MEM_REMOVE) { 148 - rc = pseries_remove_memblock(*base, *memblock_size); 148 + rc = pseries_remove_memblock(*base, *lmb_size); 149 149 } else { 150 150 rc = -EINVAL; 151 151 }
+10 -2
arch/s390/kernel/entry.S
··· 535 535 l %r3,__LC_PGM_ILC # load program interruption code 536 536 la %r8,0x7f 537 537 nr %r8,%r3 # clear per-event-bit and ilc 538 - be BASED(pgm_exit) # only per or per+check ? 539 - b BASED(pgm_do_call) 538 + be BASED(pgm_exit2) # only per or per+check ? 539 + l %r7,BASED(.Ljump_table) 540 + sll %r8,2 541 + l %r7,0(%r8,%r7) # load address of handler routine 542 + la %r2,SP_PTREGS(%r15) # address of register-save area 543 + basr %r14,%r7 # branch to interrupt-handler 544 + pgm_exit2: 545 + TRACE_IRQS_ON 546 + stosm __SF_EMPTY(%r15),0x03 # reenable interrupts 547 + b BASED(sysc_return) 540 548 541 549 # 542 550 # it was a single stepped SVC that is causing all the trouble
+10 -2
arch/s390/kernel/entry64.S
··· 544 544 lgf %r3,__LC_PGM_ILC # load program interruption code 545 545 lghi %r8,0x7f 546 546 ngr %r8,%r3 # clear per-event-bit and ilc 547 - je pgm_exit 548 - j pgm_do_call 547 + je pgm_exit2 548 + sll %r8,3 549 + larl %r1,pgm_check_table 550 + lg %r1,0(%r8,%r1) # load address of handler routine 551 + la %r2,SP_PTREGS(%r15) # address of register-save area 552 + basr %r14,%r1 # branch to interrupt-handler 553 + pgm_exit2: 554 + TRACE_IRQS_ON 555 + stosm __SF_EMPTY(%r15),0x03 # reenable interrupts 556 + j sysc_return 549 557 550 558 # 551 559 # it was a single stepped SVC that is causing all the trouble
+12 -6
arch/s390/kernel/time.c
··· 524 524 if (!etr_eacr.sl) 525 525 return; 526 526 disable_sync_clock(NULL); 527 - set_bit(ETR_EVENT_SWITCH_LOCAL, &etr_events); 528 - queue_work(time_sync_wq, &etr_work); 527 + if (!test_and_set_bit(ETR_EVENT_SWITCH_LOCAL, &etr_events)) { 528 + etr_eacr.es = etr_eacr.sl = 0; 529 + etr_setr(&etr_eacr); 530 + queue_work(time_sync_wq, &etr_work); 531 + } 529 532 } 530 533 531 534 /* ··· 542 539 if (!etr_eacr.es) 543 540 return; 544 541 disable_sync_clock(NULL); 545 - set_bit(ETR_EVENT_SYNC_CHECK, &etr_events); 546 - queue_work(time_sync_wq, &etr_work); 542 + if (!test_and_set_bit(ETR_EVENT_SYNC_CHECK, &etr_events)) { 543 + etr_eacr.es = 0; 544 + etr_setr(&etr_eacr); 545 + queue_work(time_sync_wq, &etr_work); 546 + } 547 547 } 548 548 549 549 /* ··· 908 902 * Do not try to get the alternate port aib if the clock 909 903 * is not in sync yet. 910 904 */ 911 - if (!check_sync_clock()) 905 + if (!eacr.es || !check_sync_clock()) 912 906 return eacr; 913 907 914 908 /* ··· 1070 1064 * If the clock is in sync just update the eacr and return. 1071 1065 * If there is no valid sync port wait for a port update. 1072 1066 */ 1073 - if (check_sync_clock() || sync_port < 0) { 1067 + if ((eacr.es && check_sync_clock()) || sync_port < 0) { 1074 1068 etr_update_eacr(eacr); 1075 1069 etr_set_tolec_timeout(now); 1076 1070 goto out_unlock;
+9
arch/x86/kernel/acpi/cstate.c
··· 145 145 percpu_entry->states[cx->index].eax = cx->address; 146 146 percpu_entry->states[cx->index].ecx = MWAIT_ECX_INTERRUPT_BREAK; 147 147 } 148 + 149 + /* 150 + * For _CST FFH on Intel, if GAS.access_size bit 1 is cleared, 151 + * then we should skip checking BM_STS for this C-state. 152 + * ref: "Intel Processor Vendor-Specific ACPI Interface Specification" 153 + */ 154 + if ((c->x86_vendor == X86_VENDOR_INTEL) && !(reg->access_size & 0x2)) 155 + cx->bm_sts_skip = 1; 156 + 148 157 return retval; 149 158 } 150 159 EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_probe);
+7 -2
arch/x86/kernel/acpi/sleep.c
··· 157 157 #ifdef CONFIG_HIBERNATION 158 158 if (strncmp(str, "s4_nohwsig", 10) == 0) 159 159 acpi_no_s4_hw_signature(); 160 - if (strncmp(str, "s4_nonvs", 8) == 0) 161 - acpi_s4_no_nvs(); 160 + if (strncmp(str, "s4_nonvs", 8) == 0) { 161 + pr_warning("ACPI: acpi_sleep=s4_nonvs is deprecated, " 162 + "please use acpi_sleep=nonvs instead"); 163 + acpi_nvs_nosave(); 164 + } 162 165 #endif 166 + if (strncmp(str, "nonvs", 5) == 0) 167 + acpi_nvs_nosave(); 163 168 if (strncmp(str, "old_ordering", 12) == 0) 164 169 acpi_old_suspend_ordering(); 165 170 str = strchr(str, ',');
+20 -21
arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
··· 368 368 return -ENODEV; 369 369 370 370 out_obj = output.pointer; 371 - if (out_obj->type != ACPI_TYPE_BUFFER) { 372 - ret = -ENODEV; 373 - goto out_free; 374 - } 371 + if (out_obj->type != ACPI_TYPE_BUFFER) 372 + return -ENODEV; 375 373 376 374 errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0); 377 - if (errors) { 378 - ret = -ENODEV; 379 - goto out_free; 380 - } 375 + if (errors) 376 + return -ENODEV; 381 377 382 378 supported = *((u32 *)(out_obj->buffer.pointer + 4)); 383 - if (!(supported & 0x1)) { 384 - ret = -ENODEV; 385 - goto out_free; 386 - } 379 + if (!(supported & 0x1)) 380 + return -ENODEV; 387 381 388 382 out_free: 389 383 kfree(output.pointer); ··· 391 397 struct pcc_memory_resource *mem_resource; 392 398 struct pcc_register_resource *reg_resource; 393 399 union acpi_object *out_obj, *member; 394 - acpi_handle handle, osc_handle; 400 + acpi_handle handle, osc_handle, pcch_handle; 395 401 int ret = 0; 396 402 397 403 status = acpi_get_handle(NULL, "\\_SB", &handle); 404 + if (ACPI_FAILURE(status)) 405 + return -ENODEV; 406 + 407 + status = acpi_get_handle(handle, "PCCH", &pcch_handle); 398 408 if (ACPI_FAILURE(status)) 399 409 return -ENODEV; 400 410 ··· 541 543 542 544 if (!pcch_virt_addr) { 543 545 result = -1; 544 - goto pcch_null; 546 + goto out; 545 547 } 546 548 547 549 result = pcc_get_offset(cpu); 548 550 if (result) { 549 551 dprintk("init: PCCP evaluation failed\n"); 550 - goto free; 552 + goto out; 551 553 } 552 554 553 555 policy->max = policy->cpuinfo.max_freq = ··· 556 558 ioread32(&pcch_hdr->minimum_frequency) * 1000; 557 559 policy->cur = pcc_get_freq(cpu); 558 560 561 + if (!policy->cur) { 562 + dprintk("init: Unable to get current CPU frequency\n"); 563 + result = -EINVAL; 564 + goto out; 565 + } 566 + 559 567 dprintk("init: policy->max is %d, policy->min is %d\n", 560 568 policy->max, policy->min); 561 - 562 - return 0; 563 - free: 564 - pcc_clear_mapping(); 565 - free_percpu(pcc_cpu_info); 566 - pcch_null: 569 + out: 567 570 return result; 568 571 } 569 572
+5 -6
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
··· 1023 1023 } 1024 1024 if (max_latency == 0) { 1025 1025 /* 1026 - * Fam 11h always returns 0 as transition latency. 1027 - * This is intended and means "very fast". While cpufreq core 1028 - * and governors currently can handle that gracefully, better 1029 - * set it to 1 to avoid problems in the future. 1030 - * For all others it's a BIOS bug. 1026 + * Fam 11h and later may return 0 as transition latency. This 1027 + * is intended and means "very fast". While cpufreq core and 1028 + * governors currently can handle that gracefully, better set it 1029 + * to 1 to avoid problems in the future. 1031 1030 */ 1032 - if (boot_cpu_data.x86 != 0x11) 1031 + if (boot_cpu_data.x86 < 0x11) 1033 1032 printk(KERN_ERR FW_WARN PFX "Invalid zero transition " 1034 1033 "latency\n"); 1035 1034 max_latency = 1;
+2 -2
arch/x86/kernel/entry_64.S
··· 571 571 * masked off. 572 572 */ 573 573 sysret_audit: 574 - movq %rax,%rsi /* second arg, syscall return value */ 575 - cmpq $0,%rax /* is it < 0? */ 574 + movq RAX-ARGOFFSET(%rsp),%rsi /* second arg, syscall return value */ 575 + cmpq $0,%rsi /* is it < 0? */ 576 576 setl %al /* 1 if so, 0 if not */ 577 577 movzbl %al,%edi /* zero-extend that into %edi */ 578 578 inc %edi /* first arg, 0->1(AUDITSC_SUCCESS), 1->2(AUDITSC_FAILURE) */
+1 -1
arch/x86/kernel/hpet.c
··· 964 964 965 965 void hpet_disable(void) 966 966 { 967 - if (is_hpet_capable()) { 967 + if (is_hpet_capable() && hpet_virt_address) { 968 968 unsigned int cfg = hpet_readl(HPET_CFG); 969 969 970 970 if (hpet_legacy_int_enabled) {
+15 -10
arch/x86/kernel/i8259.c
··· 276 276 .cls = &i8259_sysdev_class, 277 277 }; 278 278 279 - static int __init i8259A_init_sysfs(void) 280 - { 281 - int error = sysdev_class_register(&i8259_sysdev_class); 282 - if (!error) 283 - error = sysdev_register(&device_i8259A); 284 - return error; 285 - } 286 - 287 - device_initcall(i8259A_init_sysfs); 288 - 289 279 static void mask_8259A(void) 290 280 { 291 281 unsigned long flags; ··· 397 407 }; 398 408 399 409 struct legacy_pic *legacy_pic = &default_legacy_pic; 410 + 411 + static int __init i8259A_init_sysfs(void) 412 + { 413 + int error; 414 + 415 + if (legacy_pic != &default_legacy_pic) 416 + return 0; 417 + 418 + error = sysdev_class_register(&i8259_sysdev_class); 419 + if (!error) 420 + error = sysdev_register(&device_i8259A); 421 + return error; 422 + } 423 + 424 + device_initcall(i8259A_init_sysfs);
+7 -2
arch/x86/kernel/kgdb.c
··· 572 572 return NOTIFY_STOP; 573 573 } 574 574 575 - #ifdef CONFIG_KGDB_LOW_LEVEL_TRAP 576 575 int kgdb_ll_trap(int cmd, const char *str, 577 576 struct pt_regs *regs, long err, int trap, int sig) 578 577 { ··· 589 590 590 591 return __kgdb_notify(&args, cmd); 591 592 } 592 - #endif /* CONFIG_KGDB_LOW_LEVEL_TRAP */ 593 593 594 594 static int 595 595 kgdb_notify(struct notifier_block *self, unsigned long cmd, void *ptr) ··· 623 625 return register_die_notifier(&kgdb_notifier); 624 626 } 625 627 628 + static void kgdb_hw_overflow_handler(struct perf_event *event, int nmi, 629 + struct perf_sample_data *data, struct pt_regs *regs) 630 + { 631 + kgdb_ll_trap(DIE_DEBUG, "debug", regs, 0, 0, SIGTRAP); 632 + } 633 + 626 634 void kgdb_arch_late(void) 627 635 { 628 636 int i, cpu; ··· 659 655 for_each_online_cpu(cpu) { 660 656 pevent = per_cpu_ptr(breakinfo[i].pev, cpu); 661 657 pevent[0]->hw.sample_period = 1; 658 + pevent[0]->overflow_handler = kgdb_hw_overflow_handler; 662 659 if (pevent[0]->destroy != NULL) { 663 660 pevent[0]->destroy = NULL; 664 661 release_bp_slot(*pevent);
+1
arch/x86/kvm/paging_tmpl.h
··· 342 342 /* advance table_gfn when emulating 1gb pages with 4k */ 343 343 if (delta == 0) 344 344 table_gfn += PT_INDEX(addr, level); 345 + access &= gw->pte_access; 345 346 } else { 346 347 direct = 0; 347 348 table_gfn = gw->table_gfn[level - 2];
+2 -2
arch/x86/kvm/x86.c
··· 1562 1562 1563 1563 r = -ENOMEM; 1564 1564 size = sizeof(struct kvm_msr_entry) * msrs.nmsrs; 1565 - entries = vmalloc(size); 1565 + entries = kmalloc(size, GFP_KERNEL); 1566 1566 if (!entries) 1567 1567 goto out; 1568 1568 ··· 1581 1581 r = n; 1582 1582 1583 1583 out_free: 1584 - vfree(entries); 1584 + kfree(entries); 1585 1585 out: 1586 1586 return r; 1587 1587 }
+11 -8
drivers/acpi/acpica/evxfevnt.c
··· 70 70 acpi_status acpi_enable(void) 71 71 { 72 72 acpi_status status; 73 + int retry; 73 74 74 75 ACPI_FUNCTION_TRACE(acpi_enable); 75 76 ··· 99 98 100 99 /* Sanity check that transition succeeded */ 101 100 102 - if (acpi_hw_get_mode() != ACPI_SYS_MODE_ACPI) { 103 - ACPI_ERROR((AE_INFO, 104 - "Hardware did not enter ACPI mode")); 105 - return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); 101 + for (retry = 0; retry < 30000; ++retry) { 102 + if (acpi_hw_get_mode() == ACPI_SYS_MODE_ACPI) { 103 + if (retry != 0) 104 + ACPI_WARNING((AE_INFO, 105 + "Platform took > %d00 usec to enter ACPI mode", retry)); 106 + return_ACPI_STATUS(AE_OK); 107 + } 108 + acpi_os_stall(100); /* 100 usec */ 106 109 } 107 110 108 - ACPI_DEBUG_PRINT((ACPI_DB_INIT, 109 - "Transition to ACPI mode successful\n")); 110 - 111 - return_ACPI_STATUS(AE_OK); 111 + ACPI_ERROR((AE_INFO, "Hardware did not enter ACPI mode")); 112 + return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); 112 113 } 113 114 114 115 ACPI_EXPORT_SYMBOL(acpi_enable)
+7 -1
drivers/acpi/battery.c
··· 868 868 static void acpi_battery_notify(struct acpi_device *device, u32 event) 869 869 { 870 870 struct acpi_battery *battery = acpi_driver_data(device); 871 + #ifdef CONFIG_ACPI_SYSFS_POWER 872 + struct device *old; 873 + #endif 871 874 872 875 if (!battery) 873 876 return; 877 + #ifdef CONFIG_ACPI_SYSFS_POWER 878 + old = battery->bat.dev; 879 + #endif 874 880 acpi_battery_update(battery); 875 881 acpi_bus_generate_proc_event(device, event, 876 882 acpi_battery_present(battery)); ··· 885 879 acpi_battery_present(battery)); 886 880 #ifdef CONFIG_ACPI_SYSFS_POWER 887 881 /* acpi_battery_update could remove power_supply object */ 888 - if (battery->bat.dev) 882 + if (old && battery->bat.dev) 889 883 power_supply_changed(&battery->bat); 890 884 #endif 891 885 }
+1 -1
drivers/acpi/blacklist.c
··· 214 214 .ident = "Sony VGN-SR290J", 215 215 .matches = { 216 216 DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), 217 - DMI_MATCH(DMI_PRODUCT_NAME, "Sony VGN-SR290J"), 217 + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SR290J"), 218 218 }, 219 219 }, 220 220 {
+1 -1
drivers/acpi/processor_core.c
··· 223 223 type = (acpi_type == ACPI_TYPE_DEVICE) ? 1 : 0; 224 224 cpuid = acpi_get_cpuid(handle, type, acpi_id); 225 225 226 - if (cpuid == -1) 226 + if ((cpuid == -1) && (num_possible_cpus() > 1)) 227 227 return false; 228 228 229 229 return true;
+9 -1
drivers/acpi/processor_idle.c
··· 76 76 module_param(max_cstate, uint, 0000); 77 77 static unsigned int nocst __read_mostly; 78 78 module_param(nocst, uint, 0000); 79 + static int bm_check_disable __read_mostly; 80 + module_param(bm_check_disable, uint, 0000); 79 81 80 82 static unsigned int latency_factor __read_mostly = 2; 81 83 module_param(latency_factor, uint, 0644); 82 84 85 + #ifdef CONFIG_ACPI_PROCFS 83 86 static u64 us_to_pm_timer_ticks(s64 t) 84 87 { 85 88 return div64_u64(t * PM_TIMER_FREQUENCY, 1000000); 86 89 } 90 + #endif 91 + 87 92 /* 88 93 * IBM ThinkPad R40e crashes mysteriously when going into C2 or C3. 89 94 * For now disable this. Probably a bug somewhere else. ··· 768 763 { 769 764 u32 bm_status = 0; 770 765 766 + if (bm_check_disable) 767 + return 0; 768 + 771 769 acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status); 772 770 if (bm_status) 773 771 acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, 1); ··· 955 947 if (acpi_idle_suspend) 956 948 return(acpi_idle_enter_c1(dev, state)); 957 949 958 - if (acpi_idle_bm_check()) { 950 + if (!cx->bm_sts_skip && acpi_idle_bm_check()) { 959 951 if (dev->safe_state) { 960 952 dev->last_state = dev->safe_state; 961 953 return dev->safe_state->enter(dev, dev->safe_state);
+17 -18
drivers/acpi/sleep.c
··· 82 82 static u32 acpi_target_sleep_state = ACPI_STATE_S0; 83 83 84 84 /* 85 + * The ACPI specification wants us to save NVS memory regions during hibernation 86 + * and to restore them during the subsequent resume. Windows does that also for 87 + * suspend to RAM. However, it is known that this mechanism does not work on 88 + * all machines, so we allow the user to disable it with the help of the 89 + * 'acpi_sleep=nonvs' kernel command line option. 90 + */ 91 + static bool nvs_nosave; 92 + 93 + void __init acpi_nvs_nosave(void) 94 + { 95 + nvs_nosave = true; 96 + } 97 + 98 + /* 85 99 * ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the 86 100 * user to request that behavior by using the 'acpi_old_suspend_ordering' 87 101 * kernel command line option that causes the following variable to be set. ··· 211 197 u32 acpi_state = acpi_suspend_states[pm_state]; 212 198 int error = 0; 213 199 214 - error = suspend_nvs_alloc(); 215 - 200 + error = nvs_nosave ? 0 : suspend_nvs_alloc(); 216 201 if (error) 217 202 return error; 218 203 ··· 401 388 #endif /* CONFIG_SUSPEND */ 402 389 403 390 #ifdef CONFIG_HIBERNATION 404 - /* 405 - * The ACPI specification wants us to save NVS memory regions during hibernation 406 - * and to restore them during the subsequent resume. However, it is not certain 407 - * if this mechanism is going to work on all machines, so we allow the user to 408 - * disable this mechanism using the 'acpi_sleep=s4_nonvs' kernel command line 409 - * option. 410 - */ 411 - static bool s4_no_nvs; 412 - 413 - void __init acpi_s4_no_nvs(void) 414 - { 415 - s4_no_nvs = true; 416 - } 417 - 418 391 static unsigned long s4_hardware_signature; 419 392 static struct acpi_table_facs *facs; 420 393 static bool nosigcheck; ··· 414 415 { 415 416 int error; 416 417 417 - error = s4_no_nvs ? 0 : suspend_nvs_alloc(); 418 + error = nvs_nosave ? 0 : suspend_nvs_alloc(); 418 419 if (!error) { 419 420 acpi_target_sleep_state = ACPI_STATE_S4; 420 421 acpi_sleep_tts_switch(acpi_target_sleep_state); ··· 509 510 error = acpi_sleep_prepare(ACPI_STATE_S4); 510 511 511 512 if (!error) { 512 - if (!s4_no_nvs) 513 + if (!nvs_nosave) 513 514 error = suspend_nvs_alloc(); 514 515 if (!error) 515 516 acpi_target_sleep_state = ACPI_STATE_S4;
+1 -1
drivers/base/core.c
··· 673 673 */ 674 674 if (parent == NULL) 675 675 parent_kobj = virtual_device_parent(dev); 676 - else if (parent->class) 676 + else if (parent->class && !dev->class->ns_type) 677 677 return &parent->kobj; 678 678 else 679 679 parent_kobj = &parent->kobj;
+8 -5
drivers/char/agp/intel-gtt.c
··· 1216 1216 1217 1217 /* G33's GTT size defined in gmch_ctrl */ 1218 1218 pci_read_config_word(agp_bridge->dev, I830_GMCH_CTRL, &gmch_ctrl); 1219 - switch (gmch_ctrl & G33_PGETBL_SIZE_MASK) { 1220 - case G33_PGETBL_SIZE_1M: 1219 + switch (gmch_ctrl & I830_GMCH_GMS_MASK) { 1220 + case I830_GMCH_GMS_STOLEN_512: 1221 + size = 512; 1222 + break; 1223 + case I830_GMCH_GMS_STOLEN_1024: 1221 1224 size = 1024; 1222 1225 break; 1223 - case G33_PGETBL_SIZE_2M: 1224 - size = 2048; 1226 + case I830_GMCH_GMS_STOLEN_8192: 1227 + size = 8*1024; 1225 1228 break; 1226 1229 default: 1227 1230 dev_info(&agp_bridge->dev->dev, 1228 1231 "unknown page table size 0x%x, assuming 512KB\n", 1229 - (gmch_ctrl & G33_PGETBL_SIZE_MASK)); 1232 + (gmch_ctrl & I830_GMCH_GMS_MASK)); 1230 1233 size = 512; 1231 1234 } 1232 1235 } else {
+1 -1
drivers/char/sysrq.c
··· 493 493 sysrq_key_table[i] = op_p; 494 494 } 495 495 496 - static void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) 496 + void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) 497 497 { 498 498 struct sysrq_key_op *op_p; 499 499 int orig_log_level;
+8 -1
drivers/char/tpm/tpm_tis.c
··· 623 623 624 624 static int tpm_tis_pnp_resume(struct pnp_dev *dev) 625 625 { 626 - return tpm_pm_resume(&dev->dev); 626 + struct tpm_chip *chip = pnp_get_drvdata(dev); 627 + int ret; 628 + 629 + ret = tpm_pm_resume(&dev->dev); 630 + if (!ret) 631 + tpm_continue_selftest(chip); 632 + 633 + return ret; 627 634 } 628 635 629 636 static struct pnp_device_id tpm_pnp_tbl[] __devinitdata = {
+2 -10
drivers/cpufreq/cpufreq.c
··· 1080 1080 1081 1081 err_unlock_policy: 1082 1082 unlock_policy_rwsem_write(cpu); 1083 + free_cpumask_var(policy->related_cpus); 1083 1084 err_free_cpumask: 1084 1085 free_cpumask_var(policy->cpus); 1085 1086 err_free_policy: ··· 1766 1765 dprintk("governor switch\n"); 1767 1766 1768 1767 /* end old governor */ 1769 - if (data->governor) { 1770 - /* 1771 - * Need to release the rwsem around governor 1772 - * stop due to lock dependency between 1773 - * cancel_delayed_work_sync and the read lock 1774 - * taken in the delayed work handler. 1775 - */ 1776 - unlock_policy_rwsem_write(data->cpu); 1768 + if (data->governor) 1777 1769 __cpufreq_governor(data, CPUFREQ_GOV_STOP); 1778 - lock_policy_rwsem_write(data->cpu); 1779 - } 1780 1770 1781 1771 /* start new governor */ 1782 1772 data->governor = policy->governor;
+5 -1
drivers/crypto/talitos.c
··· 1183 1183 /* Copy part of this segment */ 1184 1184 ignore = skip - offset; 1185 1185 len = miter.length - ignore; 1186 + if (boffset + len > buflen) 1187 + len = buflen - boffset; 1186 1188 memcpy(buf + boffset, miter.addr + ignore, len); 1187 1189 } else { 1188 - /* Copy all of this segment */ 1190 + /* Copy all of this segment (up to buflen) */ 1189 1191 len = miter.length; 1192 + if (boffset + len > buflen) 1193 + len = buflen - boffset; 1190 1194 memcpy(buf + boffset, miter.addr, len); 1191 1195 } 1192 1196 boffset += len;
+1 -1
drivers/edac/i7core_edac.c
··· 1300 1300 if (devno == 0) 1301 1301 return -ENODEV; 1302 1302 1303 - i7core_printk(KERN_ERR, 1303 + i7core_printk(KERN_INFO, 1304 1304 "Device not found: dev %02x.%d PCI ID %04x:%04x\n", 1305 1305 dev_descr->dev, dev_descr->func, 1306 1306 PCI_VENDOR_ID_INTEL, dev_descr->dev_id);
+3
drivers/edac/mpc85xx_edac.c
··· 336 336 }, 337 337 {}, 338 338 }; 339 + MODULE_DEVICE_TABLE(of, mpc85xx_pci_err_of_match); 339 340 340 341 static struct of_platform_driver mpc85xx_pci_err_driver = { 341 342 .probe = mpc85xx_pci_err_probe, ··· 651 650 { .compatible = "fsl,p2020-l2-cache-controller", }, 652 651 {}, 653 652 }; 653 + MODULE_DEVICE_TABLE(of, mpc85xx_l2_err_of_match); 654 654 655 655 static struct of_platform_driver mpc85xx_l2_err_driver = { 656 656 .probe = mpc85xx_l2_err_probe, ··· 1128 1126 { .compatible = "fsl,p2020-memory-controller", }, 1129 1127 {}, 1130 1128 }; 1129 + MODULE_DEVICE_TABLE(of, mpc85xx_mc_err_of_match); 1131 1130 1132 1131 static struct of_platform_driver mpc85xx_mc_err_driver = { 1133 1132 .probe = mpc85xx_mc_err_probe,
+4 -3
drivers/gpio/gpiolib.c
··· 893 893 void gpio_unexport(unsigned gpio) 894 894 { 895 895 struct gpio_desc *desc; 896 - int status = -EINVAL; 896 + int status = 0; 897 897 898 - if (!gpio_is_valid(gpio)) 898 + if (!gpio_is_valid(gpio)) { 899 + status = -EINVAL; 899 900 goto done; 901 + } 900 902 901 903 mutex_lock(&sysfs_lock); 902 904 ··· 913 911 clear_bit(FLAG_EXPORT, &desc->flags); 914 912 put_device(dev); 915 913 device_unregister(dev); 916 - status = 0; 917 914 } else 918 915 status = -ENODEV; 919 916 }
+2 -2
drivers/gpu/drm/drm_edid.c
··· 864 864 mode = drm_cvt_mode(dev, 1366, 768, vrefresh_rate, 0, 0, 865 865 false); 866 866 mode->hdisplay = 1366; 867 - mode->vsync_start = mode->vsync_start - 1; 868 - mode->vsync_end = mode->vsync_end - 1; 867 + mode->hsync_start = mode->hsync_start - 1; 868 + mode->hsync_end = mode->hsync_end - 1; 869 869 return mode; 870 870 } 871 871
+3
drivers/gpu/drm/i915/i915_debugfs.c
··· 605 605 case FBC_NOT_TILED: 606 606 seq_printf(m, "scanout buffer not tiled"); 607 607 break; 608 + case FBC_MULTIPLE_PIPES: 609 + seq_printf(m, "multiple pipes are enabled"); 610 + break; 608 611 default: 609 612 seq_printf(m, "unknown reason"); 610 613 }
+1 -1
drivers/gpu/drm/i915/i915_dma.c
··· 1300 1300 struct drm_i915_private *dev_priv = dev->dev_private; 1301 1301 1302 1302 drm_mm_put_block(dev_priv->compressed_fb); 1303 - if (!IS_GM45(dev)) 1303 + if (dev_priv->compressed_llb) 1304 1304 drm_mm_put_block(dev_priv->compressed_llb); 1305 1305 } 1306 1306
+5
drivers/gpu/drm/i915/i915_drv.h
··· 215 215 FBC_MODE_TOO_LARGE, /* mode too large for compression */ 216 216 FBC_BAD_PLANE, /* fbc not supported on plane */ 217 217 FBC_NOT_TILED, /* buffer not tiled */ 218 + FBC_MULTIPLE_PIPES, /* more than one pipe active */ 218 219 }; 219 220 220 221 enum intel_pch { 221 222 PCH_IBX, /* Ibexpeak PCH */ 222 223 PCH_CPT, /* Cougarpoint PCH */ 223 224 }; 225 + 226 + #define QUIRK_PIPEA_FORCE (1<<0) 224 227 225 228 struct intel_fbdev; 226 229 ··· 339 336 340 337 /* PCH chipset type */ 341 338 enum intel_pch pch_type; 339 + 340 + unsigned long quirks; 342 341 343 342 /* Register state */ 344 343 bool modeset_on_lid;
+2 -1
drivers/gpu/drm/i915/i915_gem.c
··· 3647 3647 return ret; 3648 3648 } 3649 3649 3650 + 3650 3651 int 3651 3652 i915_gem_do_execbuffer(struct drm_device *dev, void *data, 3652 3653 struct drm_file *file_priv, ··· 3795 3794 unsigned long long total_size = 0; 3796 3795 int num_fences = 0; 3797 3796 for (i = 0; i < args->buffer_count; i++) { 3798 - obj_priv = object_list[i]->driver_private; 3797 + obj_priv = to_intel_bo(object_list[i]); 3799 3798 3800 3799 total_size += object_list[i]->size; 3801 3800 num_fences +=
+1
drivers/gpu/drm/i915/i915_reg.h
··· 2869 2869 2870 2870 #define PCH_PP_STATUS 0xc7200 2871 2871 #define PCH_PP_CONTROL 0xc7204 2872 + #define PANEL_UNLOCK_REGS (0xabcd << 16) 2872 2873 #define EDP_FORCE_VDD (1 << 3) 2873 2874 #define EDP_BLC_ENABLE (1 << 2) 2874 2875 #define PANEL_POWER_RESET (1 << 1)
+98 -11
drivers/gpu/drm/i915/intel_display.c
··· 862 862 intel_clock_t clock; 863 863 int max_n; 864 864 bool found; 865 - /* approximately equals target * 0.00488 */ 866 - int err_most = (target >> 8) + (target >> 10); 865 + /* approximately equals target * 0.00585 */ 866 + int err_most = (target >> 8) + (target >> 9); 867 867 found = false; 868 868 869 869 if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) { ··· 1180 1180 struct drm_framebuffer *fb = crtc->fb; 1181 1181 struct intel_framebuffer *intel_fb; 1182 1182 struct drm_i915_gem_object *obj_priv; 1183 + struct drm_crtc *tmp_crtc; 1183 1184 struct intel_crtc *intel_crtc = to_intel_crtc(crtc); 1184 1185 int plane = intel_crtc->plane; 1186 + int crtcs_enabled = 0; 1187 + 1188 + DRM_DEBUG_KMS("\n"); 1185 1189 1186 1190 if (!i915_powersave) 1187 1191 return; ··· 1203 1199 * If FBC is already on, we just have to verify that we can 1204 1200 * keep it that way... 1205 1201 * Need to disable if: 1202 + * - more than one pipe is active 1206 1203 * - changing FBC params (stride, fence, mode) 1207 1204 * - new fb is too large to fit in compressed buffer 1208 1205 * - going to an unsupported config (interlace, pixel multiply, etc.) 1209 1206 */ 1207 + list_for_each_entry(tmp_crtc, &dev->mode_config.crtc_list, head) { 1208 + if (tmp_crtc->enabled) 1209 + crtcs_enabled++; 1210 + } 1211 + DRM_DEBUG_KMS("%d pipes active\n", crtcs_enabled); 1212 + if (crtcs_enabled > 1) { 1213 + DRM_DEBUG_KMS("more than one pipe active, disabling compression\n"); 1214 + dev_priv->no_fbc_reason = FBC_MULTIPLE_PIPES; 1215 + goto out_disable; 1216 + } 1210 1217 if (intel_fb->obj->size > dev_priv->cfb_size) { 1211 1218 DRM_DEBUG_KMS("framebuffer too large, disabling " 1212 1219 "compression\n"); ··· 1270 1255 } 1271 1256 } 1272 1257 1273 - static int 1258 + int 1274 1259 intel_pin_and_fence_fb_obj(struct drm_device *dev, struct drm_gem_object *obj) 1275 1260 { 1276 1261 struct drm_i915_gem_object *obj_priv = to_intel_bo(obj); ··· 2270 2255 intel_wait_for_vblank(dev); 2271 2256 } 2272 2257 2258 + /* Don't disable pipe A or pipe A PLLs if needed */ 2259 + if (pipeconf_reg == PIPEACONF && 2260 + (dev_priv->quirks & QUIRK_PIPEA_FORCE)) 2261 + goto skip_pipe_off; 2262 + 2273 2263 /* Next, disable display pipes */ 2274 2264 temp = I915_READ(pipeconf_reg); 2275 2265 if ((temp & PIPEACONF_ENABLE) != 0) { ··· 2290 2270 I915_WRITE(dpll_reg, temp & ~DPLL_VCO_ENABLE); 2291 2271 I915_READ(dpll_reg); 2292 2272 } 2293 - 2273 + skip_pipe_off: 2294 2274 /* Wait for the clocks to turn off. */ 2295 2275 udelay(150); 2296 2276 break; ··· 2376 2356 if (mode->clock * 3 > 27000 * 4) 2377 2357 return MODE_CLOCK_HIGH; 2378 2358 } 2379 - 2380 - drm_mode_set_crtcinfo(adjusted_mode, 0); 2381 2359 return true; 2382 2360 } 2383 2361 ··· 3754 3736 if (dev_priv->lvds_dither) { 3755 3737 if (HAS_PCH_SPLIT(dev)) { 3756 3738 pipeconf |= PIPE_ENABLE_DITHER; 3739 + pipeconf &= ~PIPE_DITHER_TYPE_MASK; 3757 3740 pipeconf |= PIPE_DITHER_TYPE_ST01; 3758 3741 } else 3759 3742 lvds |= LVDS_ENABLE_DITHER; ··· 4431 4412 DRM_DEBUG_DRIVER("upclocking LVDS\n"); 4432 4413 4433 4414 /* Unlock panel regs */ 4434 - I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) | (0xabcd << 16)); 4415 + I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) | 4416 + PANEL_UNLOCK_REGS); 4435 4417 4436 4418 dpll &= ~DISPLAY_RATE_SELECT_FPA1; 4437 4419 I915_WRITE(dpll_reg, dpll); ··· 4475 4455 DRM_DEBUG_DRIVER("downclocking LVDS\n"); 4476 4456 4477 4457 /* Unlock panel regs */ 4478 - I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) | (0xabcd << 16)); 4458 + I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) | 4459 + PANEL_UNLOCK_REGS); 4479 4460 4480 4461 dpll |= DISPLAY_RATE_SELECT_FPA1; 4481 4462 I915_WRITE(dpll_reg, dpll); ··· 4716 4695 struct drm_gem_object *obj; 4717 4696 struct intel_crtc *intel_crtc = to_intel_crtc(crtc); 4718 4697 struct intel_unpin_work *work; 4719 - unsigned long flags; 4698 + unsigned long flags, offset; 4720 4699 int pipesrc_reg = (intel_crtc->pipe == 0) ? PIPEASRC : PIPEBSRC; 4721 4700 int ret, pipesrc; 4722 4701 u32 flip_mask; ··· 4783 4762 while (I915_READ(ISR) & flip_mask) 4784 4763 ; 4785 4764 4765 + /* Offset into the new buffer for cases of shared fbs between CRTCs */ 4766 + offset = obj_priv->gtt_offset; 4767 + offset += (crtc->y * fb->pitch) + (crtc->x * (fb->bits_per_pixel) / 8); 4768 + 4786 4769 BEGIN_LP_RING(4); 4787 4770 if (IS_I965G(dev)) { 4788 4771 OUT_RING(MI_DISPLAY_FLIP | 4789 4772 MI_DISPLAY_FLIP_PLANE(intel_crtc->plane)); 4790 4773 OUT_RING(fb->pitch); 4791 - OUT_RING(obj_priv->gtt_offset | obj_priv->tiling_mode); 4774 + OUT_RING(offset | obj_priv->tiling_mode); 4792 4775 pipesrc = I915_READ(pipesrc_reg); 4793 4776 OUT_RING(pipesrc & 0x0fff0fff); 4794 4777 } else { 4795 4778 OUT_RING(MI_DISPLAY_FLIP_I915 | 4796 4779 MI_DISPLAY_FLIP_PLANE(intel_crtc->plane)); 4797 4780 OUT_RING(fb->pitch); 4798 - OUT_RING(obj_priv->gtt_offset); 4781 + OUT_RING(offset); 4799 4782 OUT_RING(MI_NOOP); 4800 4783 } 4801 4784 ADVANCE_LP_RING(); ··· 5531 5506 } 5532 5507 } 5533 5508 5509 + /* 5510 + * Some BIOSes insist on assuming the GPU's pipe A is enabled at suspend, 5511 + * resume, or other times. This quirk makes sure that's the case for 5512 + * affected systems. 5513 + */ 5514 + static void quirk_pipea_force (struct drm_device *dev) 5515 + { 5516 + struct drm_i915_private *dev_priv = dev->dev_private; 5517 + 5518 + dev_priv->quirks |= QUIRK_PIPEA_FORCE; 5519 + DRM_DEBUG_DRIVER("applying pipe a force quirk\n"); 5520 + } 5521 + 5522 + struct intel_quirk { 5523 + int device; 5524 + int subsystem_vendor; 5525 + int subsystem_device; 5526 + void (*hook)(struct drm_device *dev); 5527 + }; 5528 + 5529 + struct intel_quirk intel_quirks[] = { 5530 + /* HP Compaq 2730p needs pipe A force quirk (LP: #291555) */ 5531 + { 0x2a42, 0x103c, 0x30eb, quirk_pipea_force }, 5532 + /* HP Mini needs pipe A force quirk (LP: #322104) */ 5533 + { 0x27ae,0x103c, 0x361a, quirk_pipea_force }, 5534 + 5535 + /* Thinkpad R31 needs pipe A force quirk */ 5536 + { 0x3577, 0x1014, 0x0505, quirk_pipea_force }, 5537 + /* Toshiba Protege R-205, S-209 needs pipe A force quirk */ 5538 + { 0x2592, 0x1179, 0x0001, quirk_pipea_force }, 5539 + 5540 + /* ThinkPad X30 needs pipe A force quirk (LP: #304614) */ 5541 + { 0x3577, 0x1014, 0x0513, quirk_pipea_force }, 5542 + /* ThinkPad X40 needs pipe A force quirk */ 5543 + 5544 + /* ThinkPad T60 needs pipe A force quirk (bug #16494) */ 5545 + { 0x2782, 0x17aa, 0x201a, quirk_pipea_force }, 5546 + 5547 + /* 855 & before need to leave pipe A & dpll A up */ 5548 + { 0x3582, PCI_ANY_ID, PCI_ANY_ID, quirk_pipea_force }, 5549 + { 0x2562, PCI_ANY_ID, PCI_ANY_ID, quirk_pipea_force }, 5550 + }; 5551 + 5552 + static void intel_init_quirks(struct drm_device *dev) 5553 + { 5554 + struct pci_dev *d = dev->pdev; 5555 + int i; 5556 + 5557 + for (i = 0; i < ARRAY_SIZE(intel_quirks); i++) { 5558 + struct intel_quirk *q = &intel_quirks[i]; 5559 + 5560 + if (d->device == q->device && 5561 + (d->subsystem_vendor == q->subsystem_vendor || 5562 + q->subsystem_vendor == PCI_ANY_ID) && 5563 + (d->subsystem_device == q->subsystem_device || 5564 + q->subsystem_device == PCI_ANY_ID)) 5565 + q->hook(dev); 5566 + } 5567 + } 5568 + 5534 5569 void intel_modeset_init(struct drm_device *dev) 5535 5570 { 5536 5571 struct drm_i915_private *dev_priv = dev->dev_private; ··· 5602 5517 dev->mode_config.min_height = 0; 5603 5518 5604 5519 dev->mode_config.funcs = (void *)&intel_mode_funcs; 5520 + 5521 + intel_init_quirks(dev); 5605 5522 5606 5523 intel_init_display(dev); 5607 5524
+51 -2
drivers/gpu/drm/i915/intel_dp.c
··· 717 717 } 718 718 } 719 719 720 + static void ironlake_edp_panel_on (struct drm_device *dev) 721 + { 722 + struct drm_i915_private *dev_priv = dev->dev_private; 723 + unsigned long timeout = jiffies + msecs_to_jiffies(5000); 724 + u32 pp, pp_status; 725 + 726 + pp_status = I915_READ(PCH_PP_STATUS); 727 + if (pp_status & PP_ON) 728 + return; 729 + 730 + pp = I915_READ(PCH_PP_CONTROL); 731 + pp |= PANEL_UNLOCK_REGS | POWER_TARGET_ON; 732 + I915_WRITE(PCH_PP_CONTROL, pp); 733 + do { 734 + pp_status = I915_READ(PCH_PP_STATUS); 735 + } while (((pp_status & PP_ON) == 0) && !time_after(jiffies, timeout)); 736 + 737 + if (time_after(jiffies, timeout)) 738 + DRM_DEBUG_KMS("panel on wait timed out: 0x%08x\n", pp_status); 739 + 740 + pp &= ~(PANEL_UNLOCK_REGS | EDP_FORCE_VDD); 741 + I915_WRITE(PCH_PP_CONTROL, pp); 742 + } 743 + 744 + static void ironlake_edp_panel_off (struct drm_device *dev) 745 + { 746 + struct drm_i915_private *dev_priv = dev->dev_private; 747 + unsigned long timeout = jiffies + msecs_to_jiffies(5000); 748 + u32 pp, pp_status; 749 + 750 + pp = I915_READ(PCH_PP_CONTROL); 751 + pp &= ~POWER_TARGET_ON; 752 + I915_WRITE(PCH_PP_CONTROL, pp); 753 + do { 754 + pp_status = I915_READ(PCH_PP_STATUS); 755 + } while ((pp_status & PP_ON) && !time_after(jiffies, timeout)); 756 + 757 + if (time_after(jiffies, timeout)) 758 + DRM_DEBUG_KMS("panel off wait timed out\n"); 759 + 760 + /* Make sure VDD is enabled so DP AUX will work */ 761 + pp |= EDP_FORCE_VDD; 762 + I915_WRITE(PCH_PP_CONTROL, pp); 763 + } 764 + 720 765 static void ironlake_edp_backlight_on (struct drm_device *dev) 721 766 { 722 767 struct drm_i915_private *dev_priv = dev->dev_private; ··· 796 751 if (mode != DRM_MODE_DPMS_ON) { 797 752 if (dp_reg & DP_PORT_EN) { 798 753 intel_dp_link_down(intel_encoder, dp_priv->DP); 799 - if (IS_eDP(intel_encoder)) 754 + if (IS_eDP(intel_encoder)) { 800 755 ironlake_edp_backlight_off(dev); 756 + ironlake_edp_panel_off(dev); 757 + } 801 758 } 802 759 } else { 803 760 if (!(dp_reg & DP_PORT_EN)) { 804 761 intel_dp_link_train(intel_encoder, dp_priv->DP, dp_priv->link_configuration); 805 - if (IS_eDP(intel_encoder)) 762 + if (IS_eDP(intel_encoder)) { 763 + ironlake_edp_panel_on(dev); 806 764 ironlake_edp_backlight_on(dev); 765 + } 807 766 } 808 767 } 809 768 dp_priv->dpms_mode = mode;
+3
drivers/gpu/drm/i915/intel_drv.h
··· 215 215 extern void ironlake_enable_drps(struct drm_device *dev); 216 216 extern void ironlake_disable_drps(struct drm_device *dev); 217 217 218 + extern int intel_pin_and_fence_fb_obj(struct drm_device *dev, 219 + struct drm_gem_object *obj); 220 + 218 221 extern int intel_framebuffer_init(struct drm_device *dev, 219 222 struct intel_framebuffer *ifb, 220 223 struct drm_mode_fb_cmd *mode_cmd,
+2 -2
drivers/gpu/drm/i915/intel_fb.c
··· 98 98 99 99 mutex_lock(&dev->struct_mutex); 100 100 101 - ret = i915_gem_object_pin(fbo, 64*1024); 101 + ret = intel_pin_and_fence_fb_obj(dev, fbo); 102 102 if (ret) { 103 103 DRM_ERROR("failed to pin fb: %d\n", ret); 104 104 goto out_unref; ··· 236 236 237 237 drm_framebuffer_cleanup(&ifb->base); 238 238 if (ifb->obj) 239 - drm_gem_object_unreference_unlocked(ifb->obj); 239 + drm_gem_object_unreference(ifb->obj); 240 240 241 241 return 0; 242 242 }
+23
drivers/gpu/drm/i915/intel_lvds.c
··· 599 599 return 0; 600 600 } 601 601 602 + static int intel_no_modeset_on_lid_dmi_callback(const struct dmi_system_id *id) 603 + { 604 + DRM_DEBUG_KMS("Skipping forced modeset for %s\n", id->ident); 605 + return 1; 606 + } 607 + 608 + /* The GPU hangs up on these systems if modeset is performed on LID open */ 609 + static const struct dmi_system_id intel_no_modeset_on_lid[] = { 610 + { 611 + .callback = intel_no_modeset_on_lid_dmi_callback, 612 + .ident = "Toshiba Tecra A11", 613 + .matches = { 614 + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), 615 + DMI_MATCH(DMI_PRODUCT_NAME, "TECRA A11"), 616 + }, 617 + }, 618 + 619 + { } /* terminating entry */ 620 + }; 621 + 602 622 /* 603 623 * Lid events. Note the use of 'modeset_on_lid': 604 624 * - we set it on lid close, and reset it on open ··· 642 622 */ 643 623 if (connector) 644 624 connector->status = connector->funcs->detect(connector); 625 + /* Don't force modeset on machines where it causes a GPU lockup */ 626 + if (dmi_check_system(intel_no_modeset_on_lid)) 627 + return NOTIFY_OK; 645 628 if (!acpi_lid_open()) { 646 629 dev_priv->modeset_on_lid = 1; 647 630 return NOTIFY_OK;
-2
drivers/gpu/drm/radeon/evergreen_cs.c
··· 333 333 header = radeon_get_ib_value(p, h_idx); 334 334 crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1); 335 335 reg = CP_PACKET0_GET_REG(header); 336 - mutex_lock(&p->rdev->ddev->mode_config.mutex); 337 336 obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); 338 337 if (!obj) { 339 338 DRM_ERROR("cannot find crtc %d\n", crtc_id); ··· 367 368 } 368 369 } 369 370 out: 370 - mutex_unlock(&p->rdev->ddev->mode_config.mutex); 371 371 return r; 372 372 } 373 373
-2
drivers/gpu/drm/radeon/r100.c
··· 1230 1230 header = radeon_get_ib_value(p, h_idx); 1231 1231 crtc_id = radeon_get_ib_value(p, h_idx + 5); 1232 1232 reg = CP_PACKET0_GET_REG(header); 1233 - mutex_lock(&p->rdev->ddev->mode_config.mutex); 1234 1233 obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); 1235 1234 if (!obj) { 1236 1235 DRM_ERROR("cannot find crtc %d\n", crtc_id); ··· 1263 1264 ib[h_idx + 3] |= RADEON_ENG_DISPLAY_SELECT_CRTC1; 1264 1265 } 1265 1266 out: 1266 - mutex_unlock(&p->rdev->ddev->mode_config.mutex); 1267 1267 return r; 1268 1268 } 1269 1269
+1 -2
drivers/gpu/drm/radeon/r600_cs.c
··· 585 585 header = radeon_get_ib_value(p, h_idx); 586 586 crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1); 587 587 reg = CP_PACKET0_GET_REG(header); 588 - mutex_lock(&p->rdev->ddev->mode_config.mutex); 588 + 589 589 obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); 590 590 if (!obj) { 591 591 DRM_ERROR("cannot find crtc %d\n", crtc_id); ··· 620 620 ib[h_idx + 4] = AVIVO_D2MODE_VLINE_STATUS >> 2; 621 621 } 622 622 out: 623 - mutex_unlock(&p->rdev->ddev->mode_config.mutex); 624 623 return r; 625 624 } 626 625
+8
drivers/gpu/drm/radeon/radeon_combios.c
··· 3050 3050 rdev->pdev->subsystem_device == 0x308b) 3051 3051 return; 3052 3052 3053 + /* quirk for rs4xx HP dv5000 laptop to make it resume 3054 + * - it hangs on resume inside the dynclk 1 table. 3055 + */ 3056 + if (rdev->family == CHIP_RS480 && 3057 + rdev->pdev->subsystem_vendor == 0x103c && 3058 + rdev->pdev->subsystem_device == 0x30a4) 3059 + return; 3060 + 3053 3061 /* DYN CLK 1 */ 3054 3062 table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE); 3055 3063 if (table)
+2 -1
drivers/gpu/drm/radeon/radeon_kms.c
··· 128 128 for (i = 0, found = 0; i < rdev->num_crtc; i++) { 129 129 crtc = (struct drm_crtc *)minfo->crtcs[i]; 130 130 if (crtc && crtc->base.id == value) { 131 - value = i; 131 + struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); 132 + value = radeon_crtc->crtc_id; 132 133 found = 1; 133 134 break; 134 135 }
+1
drivers/gpu/drm/radeon/radeon_legacy_encoders.c
··· 108 108 udelay(panel_pwr_delay * 1000); 109 109 WREG32(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); 110 110 WREG32_PLL(RADEON_PIXCLKS_CNTL, pixclks_cntl); 111 + udelay(panel_pwr_delay * 1000); 111 112 break; 112 113 } 113 114
+1
drivers/gpu/drm/radeon/radeon_pm.c
··· 333 333 return snprintf(buf, PAGE_SIZE, "%s\n", 334 334 (cp == PM_PROFILE_AUTO) ? "auto" : 335 335 (cp == PM_PROFILE_LOW) ? "low" : 336 + (cp == PM_PROFILE_MID) ? "mid" : 336 337 (cp == PM_PROFILE_HIGH) ? "high" : "default"); 337 338 } 338 339
+3 -3
drivers/gpu/drm/ttm/ttm_page_alloc.c
··· 40 40 #include <linux/slab.h> 41 41 42 42 #include <asm/atomic.h> 43 - #ifdef TTM_HAS_AGP 44 - #include <asm/agp.h> 45 - #endif 46 43 47 44 #include "ttm/ttm_bo_driver.h" 48 45 #include "ttm/ttm_page_alloc.h" 49 46 47 + #ifdef TTM_HAS_AGP 48 + #include <asm/agp.h> 49 + #endif 50 50 51 51 #define NUM_PAGES_TO_ALLOC (PAGE_SIZE/sizeof(struct page *)) 52 52 #define SMALL_ALLOCATION 16
+2 -3
drivers/input/joystick/gamecon.c
··· 89 89 struct gc { 90 90 struct pardevice *pd; 91 91 struct gc_pad pads[GC_MAX_DEVICES]; 92 - struct input_dev *dev[GC_MAX_DEVICES]; 93 92 struct timer_list timer; 94 93 int pad_count[GC_MAX]; 95 94 int used; ··· 386 387 for (i = 0; i < GC_MAX_DEVICES; i++) { 387 388 388 389 pad = &gc->pads[i]; 389 - dev = gc->dev[i]; 390 + dev = pad->dev; 390 391 s = gc_status_bit[i]; 391 392 392 393 switch (pad->type) { ··· 578 579 read = parport_read_status(port) ^ 0x80; 579 580 580 581 for (j = 0; j < GC_MAX_DEVICES; j++) { 581 - struct gc_pad *pad = &gc->pads[i]; 582 + struct gc_pad *pad = &gc->pads[j]; 582 583 583 584 if (pad->type == GC_PSX || pad->type == GC_DDR) 584 585 data[j] |= (read & gc_status_bit[j]) ? (1 << i) : 0;
+1 -1
drivers/input/keyboard/Kconfig
··· 124 124 right-hand column will be interpreted as the key shown in the 125 125 left-hand column. 126 126 127 - config QT2160 127 + config KEYBOARD_QT2160 128 128 tristate "Atmel AT42QT2160 Touch Sensor Chip" 129 129 depends on I2C && EXPERIMENTAL 130 130 help
+11 -6
drivers/input/keyboard/twl4030_keypad.c
··· 51 51 */ 52 52 #define TWL4030_MAX_ROWS 8 /* TWL4030 hard limit */ 53 53 #define TWL4030_MAX_COLS 8 54 - #define TWL4030_ROW_SHIFT 3 55 - #define TWL4030_KEYMAP_SIZE (TWL4030_MAX_ROWS * TWL4030_MAX_COLS) 54 + /* 55 + * Note that we add space for an extra column so that we can handle 56 + * row lines connected to the gnd (see twl4030_col_xlate()). 57 + */ 58 + #define TWL4030_ROW_SHIFT 4 59 + #define TWL4030_KEYMAP_SIZE (TWL4030_MAX_ROWS << TWL4030_ROW_SHIFT) 56 60 57 61 struct twl4030_keypad { 58 62 unsigned short keymap[TWL4030_KEYMAP_SIZE]; ··· 186 182 return ret; 187 183 } 188 184 189 - static int twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state) 185 + static bool twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state) 190 186 { 191 187 int i; 192 188 u16 check = 0; ··· 195 191 u16 col = key_state[i]; 196 192 197 193 if ((col & check) && hweight16(col) > 1) 198 - return 1; 194 + return true; 199 195 200 196 check |= col; 201 197 } 202 198 203 - return 0; 199 + return false; 204 200 } 205 201 206 202 static void twl4030_kp_scan(struct twl4030_keypad *kp, bool release_all) ··· 229 225 if (!changed) 230 226 continue; 231 227 232 - for (col = 0; col < kp->n_cols; col++) { 228 + /* Extra column handles "all gnd" rows */ 229 + for (col = 0; col < kp->n_cols + 1; col++) { 233 230 int code; 234 231 235 232 if (!(changed & (1 << col)))
+1 -1
drivers/input/keyboard/w90p910_keypad.c
··· 258 258 .probe = w90p910_keypad_probe, 259 259 .remove = __devexit_p(w90p910_keypad_remove), 260 260 .driver = { 261 - .name = "nuc900-keypad", 261 + .name = "nuc900-kpi", 262 262 .owner = THIS_MODULE, 263 263 }, 264 264 };
+6 -1
drivers/input/mouse/synaptics.c
··· 141 141 priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2]; 142 142 priv->ext_cap = priv->ext_cap_0c = 0; 143 143 144 - if (!SYN_CAP_VALID(priv->capabilities)) 144 + /* 145 + * Older firmwares had submodel ID fixed to 0x47 146 + */ 147 + if (SYN_ID_FULL(priv->identity) < 0x705 && 148 + SYN_CAP_SUBMODEL_ID(priv->capabilities) != 0x47) { 145 149 return -1; 150 + } 146 151 147 152 /* 148 153 * Unless capExtended is set the rest of the flags should be ignored
+2 -1
drivers/input/mouse/synaptics.h
··· 47 47 #define SYN_CAP_FOUR_BUTTON(c) ((c) & (1 << 3)) 48 48 #define SYN_CAP_MULTIFINGER(c) ((c) & (1 << 1)) 49 49 #define SYN_CAP_PALMDETECT(c) ((c) & (1 << 0)) 50 - #define SYN_CAP_VALID(c) ((((c) & 0x00ff00) >> 8) == 0x47) 50 + #define SYN_CAP_SUBMODEL_ID(c) (((c) & 0x00ff00) >> 8) 51 51 #define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20) 52 52 #define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12) 53 53 #define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16) ··· 66 66 #define SYN_ID_MODEL(i) (((i) >> 4) & 0x0f) 67 67 #define SYN_ID_MAJOR(i) ((i) & 0x0f) 68 68 #define SYN_ID_MINOR(i) (((i) >> 16) & 0xff) 69 + #define SYN_ID_FULL(i) ((SYN_ID_MAJOR(i) << 8) | SYN_ID_MINOR(i)) 69 70 #define SYN_ID_IS_SYNAPTICS(i) ((((i) >> 8) & 0xff) == 0x47) 70 71 71 72 /* synaptics special commands */
+7
drivers/input/serio/i8042-x86ia64io.h
··· 170 170 }, 171 171 }, 172 172 { 173 + /* Gigabyte Spring Peak - defines wrong chassis type */ 174 + .matches = { 175 + DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), 176 + DMI_MATCH(DMI_PRODUCT_NAME, "Spring Peak"), 177 + }, 178 + }, 179 + { 173 180 .matches = { 174 181 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), 175 182 DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"),
+6 -2
drivers/mmc/host/mmci.c
··· 539 539 if (host->gpio_cd == -ENOSYS) 540 540 status = host->plat->status(mmc_dev(host->mmc)); 541 541 else 542 - status = gpio_get_value(host->gpio_cd); 542 + status = !gpio_get_value(host->gpio_cd); 543 543 544 - return !status; 544 + /* 545 + * Use positive logic throughout - status is zero for no card, 546 + * non-zero for card inserted. 547 + */ 548 + return status; 545 549 } 546 550 547 551 static const struct mmc_host_ops mmci_ops = {
+4
drivers/net/bnx2x.h
··· 1062 1062 1063 1063 /* used to synchronize stats collecting */ 1064 1064 int stats_state; 1065 + 1066 + /* used for synchronization of concurrent threads statistics handling */ 1067 + spinlock_t stats_lock; 1068 + 1065 1069 /* used by dmae command loader */ 1066 1070 struct dmae_command stats_dmae; 1067 1071 int executer_idx;
+27 -15
drivers/net/bnx2x_main.c
··· 57 57 #include "bnx2x_init_ops.h" 58 58 #include "bnx2x_dump.h" 59 59 60 - #define DRV_MODULE_VERSION "1.52.53-1" 61 - #define DRV_MODULE_RELDATE "2010/18/04" 60 + #define DRV_MODULE_VERSION "1.52.53-2" 61 + #define DRV_MODULE_RELDATE "2010/21/07" 62 62 #define BNX2X_BC_VER 0x040200 63 63 64 64 #include <linux/firmware.h> ··· 3789 3789 struct eth_query_ramrod_data ramrod_data = {0}; 3790 3790 int i, rc; 3791 3791 3792 + spin_lock_bh(&bp->stats_lock); 3793 + 3792 3794 ramrod_data.drv_counter = bp->stats_counter++; 3793 3795 ramrod_data.collect_port = bp->port.pmf ? 1 : 0; 3794 3796 for_each_queue(bp, i) ··· 3804 3802 bp->spq_left++; 3805 3803 bp->stats_pending = 1; 3806 3804 } 3805 + 3806 + spin_unlock_bh(&bp->stats_lock); 3807 3807 } 3808 3808 } 3809 3809 ··· 4371 4367 struct host_func_stats *fstats = bnx2x_sp(bp, func_stats); 4372 4368 struct bnx2x_eth_stats *estats = &bp->eth_stats; 4373 4369 int i; 4370 + u16 cur_stats_counter; 4371 + 4372 + /* Make sure we use the value of the counter 4373 + * used for sending the last stats ramrod. 4374 + */ 4375 + spin_lock_bh(&bp->stats_lock); 4376 + cur_stats_counter = bp->stats_counter - 1; 4377 + spin_unlock_bh(&bp->stats_lock); 4374 4378 4375 4379 memcpy(&(fstats->total_bytes_received_hi), 4376 4380 &(bnx2x_sp(bp, func_stats_base)->total_bytes_received_hi), ··· 4406 4394 u32 diff; 4407 4395 4408 4396 /* are storm stats valid? */ 4409 - if ((u16)(le16_to_cpu(xclient->stats_counter) + 1) != 4410 - bp->stats_counter) { 4397 + if (le16_to_cpu(xclient->stats_counter) != cur_stats_counter) { 4411 4398 DP(BNX2X_MSG_STATS, "[%d] stats not updated by xstorm" 4412 4399 " xstorm counter (0x%x) != stats_counter (0x%x)\n", 4413 - i, xclient->stats_counter, bp->stats_counter); 4400 + i, xclient->stats_counter, cur_stats_counter + 1); 4414 4401 return -1; 4415 4402 } 4416 - if ((u16)(le16_to_cpu(tclient->stats_counter) + 1) != 4417 - bp->stats_counter) { 4403 + if (le16_to_cpu(tclient->stats_counter) != cur_stats_counter) { 4418 4404 DP(BNX2X_MSG_STATS, "[%d] stats not updated by tstorm" 4419 4405 " tstorm counter (0x%x) != stats_counter (0x%x)\n", 4420 - i, tclient->stats_counter, bp->stats_counter); 4406 + i, tclient->stats_counter, cur_stats_counter + 1); 4421 4407 return -2; 4422 4408 } 4423 - if ((u16)(le16_to_cpu(uclient->stats_counter) + 1) != 4424 - bp->stats_counter) { 4409 + if (le16_to_cpu(uclient->stats_counter) != cur_stats_counter) { 4425 4410 DP(BNX2X_MSG_STATS, "[%d] stats not updated by ustorm" 4426 4411 " ustorm counter (0x%x) != stats_counter (0x%x)\n", 4427 - i, uclient->stats_counter, bp->stats_counter); 4412 + i, uclient->stats_counter, cur_stats_counter + 1); 4428 4413 return -4; 4429 4414 } 4430 4415 ··· 4858 4849 4859 4850 static void bnx2x_stats_handle(struct bnx2x *bp, enum bnx2x_stats_event event) 4860 4851 { 4861 - enum bnx2x_stats_state state = bp->stats_state; 4852 + enum bnx2x_stats_state state; 4862 4853 4863 4854 if (unlikely(bp->panic)) 4864 4855 return; 4865 4856 4866 - bnx2x_stats_stm[state][event].action(bp); 4857 + /* Protect a state change flow */ 4858 + spin_lock_bh(&bp->stats_lock); 4859 + state = bp->stats_state; 4867 4860 bp->stats_state = bnx2x_stats_stm[state][event].next_state; 4861 + spin_unlock_bh(&bp->stats_lock); 4868 4862 4869 - /* Make sure the state has been "changed" */ 4870 - smp_wmb(); 4863 + bnx2x_stats_stm[state][event].action(bp); 4871 4864 4872 4865 if ((event != STATS_EVENT_UPDATE) || netif_msg_timer(bp)) 4873 4866 DP(BNX2X_MSG_STATS, "state %d -> event %d -> state %d\n", ··· 9919 9908 9920 9909 mutex_init(&bp->port.phy_mutex); 9921 9910 mutex_init(&bp->fw_mb_mutex); 9911 + spin_lock_init(&bp->stats_lock); 9922 9912 #ifdef BCM_CNIC 9923 9913 mutex_init(&bp->cnic_mutex); 9924 9914 #endif
+1 -1
drivers/net/bonding/bond_alb.c
··· 822 822 823 823 /*initialize packet type*/ 824 824 pk_type->type = cpu_to_be16(ETH_P_ARP); 825 - pk_type->dev = NULL; 825 + pk_type->dev = bond->dev; 826 826 pk_type->func = rlb_arp_recv; 827 827 828 828 /* register to receive ARPs */
+3 -3
drivers/net/declance.c
··· 1022 1022 .ndo_set_mac_address = eth_mac_addr, 1023 1023 }; 1024 1024 1025 - static int __init dec_lance_probe(struct device *bdev, const int type) 1025 + static int __devinit dec_lance_probe(struct device *bdev, const int type) 1026 1026 { 1027 1027 static unsigned version_printed; 1028 1028 static const char fmt[] = "declance%d"; ··· 1326 1326 } 1327 1327 1328 1328 #ifdef CONFIG_TC 1329 - static int __init dec_lance_tc_probe(struct device *dev); 1329 + static int __devinit dec_lance_tc_probe(struct device *dev); 1330 1330 static int __exit dec_lance_tc_remove(struct device *dev); 1331 1331 1332 1332 static const struct tc_device_id dec_lance_tc_table[] = { ··· 1345 1345 }, 1346 1346 }; 1347 1347 1348 - static int __init dec_lance_tc_probe(struct device *dev) 1348 + static int __devinit dec_lance_tc_probe(struct device *dev) 1349 1349 { 1350 1350 int status = dec_lance_probe(dev, PMAD_LANCE); 1351 1351 if (!status)
+9
drivers/net/igb/igb_main.c
··· 1722 1722 u16 eeprom_apme_mask = IGB_EEPROM_APME; 1723 1723 u32 part_num; 1724 1724 1725 + /* Catch broken hardware that put the wrong VF device ID in 1726 + * the PCIe SR-IOV capability. 1727 + */ 1728 + if (pdev->is_virtfn) { 1729 + WARN(1, KERN_ERR "%s (%hx:%hx) should not be a VF!\n", 1730 + pci_name(pdev), pdev->vendor, pdev->device); 1731 + return -EINVAL; 1732 + } 1733 + 1725 1734 err = pci_enable_device_mem(pdev); 1726 1735 if (err) 1727 1736 return err;
+9
drivers/net/ixgbe/ixgbe_main.c
··· 6492 6492 #endif 6493 6493 u32 part_num, eec; 6494 6494 6495 + /* Catch broken hardware that put the wrong VF device ID in 6496 + * the PCIe SR-IOV capability. 6497 + */ 6498 + if (pdev->is_virtfn) { 6499 + WARN(1, KERN_ERR "%s (%hx:%hx) should not be a VF!\n", 6500 + pci_name(pdev), pdev->vendor, pdev->device); 6501 + return -EINVAL; 6502 + } 6503 + 6495 6504 err = pci_enable_device_mem(pdev); 6496 6505 if (err) 6497 6506 return err;
+8 -2
drivers/net/macvlan.c
··· 499 499 .ndo_validate_addr = eth_validate_addr, 500 500 }; 501 501 502 - static void macvlan_setup(struct net_device *dev) 502 + void macvlan_common_setup(struct net_device *dev) 503 503 { 504 504 ether_setup(dev); 505 505 ··· 508 508 dev->destructor = free_netdev; 509 509 dev->header_ops = &macvlan_hard_header_ops, 510 510 dev->ethtool_ops = &macvlan_ethtool_ops; 511 + } 512 + EXPORT_SYMBOL_GPL(macvlan_common_setup); 513 + 514 + static void macvlan_setup(struct net_device *dev) 515 + { 516 + macvlan_common_setup(dev); 511 517 dev->tx_queue_len = 0; 512 518 } 513 519 ··· 711 705 /* common fields */ 712 706 ops->priv_size = sizeof(struct macvlan_dev); 713 707 ops->get_tx_queues = macvlan_get_tx_queues; 714 - ops->setup = macvlan_setup; 715 708 ops->validate = macvlan_validate; 716 709 ops->maxtype = IFLA_MACVLAN_MAX; 717 710 ops->policy = macvlan_policy; ··· 724 719 725 720 static struct rtnl_link_ops macvlan_link_ops = { 726 721 .kind = "macvlan", 722 + .setup = macvlan_setup, 727 723 .newlink = macvlan_newlink, 728 724 .dellink = macvlan_dellink, 729 725 };
+16 -2
drivers/net/macvtap.c
··· 180 180 { 181 181 struct macvtap_queue *q = macvtap_get_queue(dev, skb); 182 182 if (!q) 183 - return -ENOLINK; 183 + goto drop; 184 + 185 + if (skb_queue_len(&q->sk.sk_receive_queue) >= dev->tx_queue_len) 186 + goto drop; 184 187 185 188 skb_queue_tail(&q->sk.sk_receive_queue, skb); 186 189 wake_up_interruptible_poll(sk_sleep(&q->sk), POLLIN | POLLRDNORM | POLLRDBAND); 187 - return 0; 190 + return NET_RX_SUCCESS; 191 + 192 + drop: 193 + kfree_skb(skb); 194 + return NET_RX_DROP; 188 195 } 189 196 190 197 /* ··· 242 235 macvlan_dellink(dev, head); 243 236 } 244 237 238 + static void macvtap_setup(struct net_device *dev) 239 + { 240 + macvlan_common_setup(dev); 241 + dev->tx_queue_len = TUN_READQ_SIZE; 242 + } 243 + 245 244 static struct rtnl_link_ops macvtap_link_ops __read_mostly = { 246 245 .kind = "macvtap", 246 + .setup = macvtap_setup, 247 247 .newlink = macvtap_newlink, 248 248 .dellink = macvtap_dellink, 249 249 };
+1 -1
drivers/net/s2io.h
··· 65 65 66 66 /* DEBUG message print. */ 67 67 #define DBG_PRINT(dbg_level, fmt, args...) do { \ 68 - if (dbg_level >= debug_level) \ 68 + if (dbg_level <= debug_level) \ 69 69 pr_info(fmt, ##args); \ 70 70 } while (0) 71 71
+12 -2
drivers/net/tun.c
··· 736 736 gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV6; 737 737 else if (sinfo->gso_type & SKB_GSO_UDP) 738 738 gso.gso_type = VIRTIO_NET_HDR_GSO_UDP; 739 - else 740 - BUG(); 739 + else { 740 + printk(KERN_ERR "tun: unexpected GSO type: " 741 + "0x%x, gso_size %d, hdr_len %d\n", 742 + sinfo->gso_type, gso.gso_size, 743 + gso.hdr_len); 744 + print_hex_dump(KERN_ERR, "tun: ", 745 + DUMP_PREFIX_NONE, 746 + 16, 1, skb->head, 747 + min((int)gso.hdr_len, 64), true); 748 + WARN_ON_ONCE(1); 749 + return -EINVAL; 750 + } 741 751 if (sinfo->gso_type & SKB_GSO_TCP_ECN) 742 752 gso.gso_type |= VIRTIO_NET_HDR_GSO_ECN; 743 753 } else
+1
drivers/net/wimax/i2400m/i2400m-usb.h
··· 152 152 /* Device IDs */ 153 153 USB_DEVICE_ID_I6050 = 0x0186, 154 154 USB_DEVICE_ID_I6050_2 = 0x0188, 155 + USB_DEVICE_ID_I6250 = 0x0187, 155 156 }; 156 157 157 158
+2
drivers/net/wimax/i2400m/usb.c
··· 491 491 switch (id->idProduct) { 492 492 case USB_DEVICE_ID_I6050: 493 493 case USB_DEVICE_ID_I6050_2: 494 + case USB_DEVICE_ID_I6250: 494 495 i2400mu->i6050 = 1; 495 496 break; 496 497 default: ··· 740 739 struct usb_device_id i2400mu_id_table[] = { 741 740 { USB_DEVICE(0x8086, USB_DEVICE_ID_I6050) }, 742 741 { USB_DEVICE(0x8086, USB_DEVICE_ID_I6050_2) }, 742 + { USB_DEVICE(0x8086, USB_DEVICE_ID_I6250) }, 743 743 { USB_DEVICE(0x8086, 0x0181) }, 744 744 { USB_DEVICE(0x8086, 0x1403) }, 745 745 { USB_DEVICE(0x8086, 0x1405) },
+2 -2
drivers/net/wireless/ath/ath9k/recv.c
··· 844 844 int dma_type; 845 845 846 846 if (edma) 847 - dma_type = DMA_FROM_DEVICE; 848 - else 849 847 dma_type = DMA_BIDIRECTIONAL; 848 + else 849 + dma_type = DMA_FROM_DEVICE; 850 850 851 851 qtype = hp ? ATH9K_RX_QUEUE_HP : ATH9K_RX_QUEUE_LP; 852 852 spin_lock_bh(&sc->rx.rxbuflock);
+2 -3
drivers/pcmcia/pxa2xx_base.c
··· 178 178 unsigned long val, 179 179 struct cpufreq_freqs *freqs) 180 180 { 181 - #warning "it's not clear if this is right since the core CPU (N) clock has no effect on the memory (L) clock" 182 181 switch (val) { 183 182 case CPUFREQ_PRECHANGE: 184 183 if (freqs->new > freqs->old) { ··· 185 186 "pre-updating\n", 186 187 freqs->new / 1000, (freqs->new / 100) % 10, 187 188 freqs->old / 1000, (freqs->old / 100) % 10); 188 - pxa2xx_pcmcia_set_mcxx(skt, freqs->new); 189 + pxa2xx_pcmcia_set_timing(skt); 189 190 } 190 191 break; 191 192 ··· 195 196 "post-updating\n", 196 197 freqs->new / 1000, (freqs->new / 100) % 10, 197 198 freqs->old / 1000, (freqs->old / 100) % 10); 198 - pxa2xx_pcmcia_set_mcxx(skt, freqs->new); 199 + pxa2xx_pcmcia_set_timing(skt); 199 200 } 200 201 break; 201 202 }
+14 -15
drivers/power/ds2782_battery.c
··· 43 43 struct ds278x_info; 44 44 45 45 struct ds278x_battery_ops { 46 - int (*get_current)(struct ds278x_info *info, int *current_uA); 47 - int (*get_voltage)(struct ds278x_info *info, int *voltage_uA); 48 - int (*get_capacity)(struct ds278x_info *info, int *capacity_uA); 49 - 46 + int (*get_battery_current)(struct ds278x_info *info, int *current_uA); 47 + int (*get_battery_voltage)(struct ds278x_info *info, int *voltage_uA); 48 + int (*get_battery_capacity)(struct ds278x_info *info, int *capacity_uA); 50 49 }; 51 50 52 51 #define to_ds278x_info(x) container_of(x, struct ds278x_info, battery) ··· 212 213 int current_uA; 213 214 int capacity; 214 215 215 - err = info->ops->get_current(info, &current_uA); 216 + err = info->ops->get_battery_current(info, &current_uA); 216 217 if (err) 217 218 return err; 218 219 219 - err = info->ops->get_capacity(info, &capacity); 220 + err = info->ops->get_battery_capacity(info, &capacity); 220 221 if (err) 221 222 return err; 222 223 ··· 245 246 break; 246 247 247 248 case POWER_SUPPLY_PROP_CAPACITY: 248 - ret = info->ops->get_capacity(info, &val->intval); 249 + ret = info->ops->get_battery_capacity(info, &val->intval); 249 250 break; 250 251 251 252 case POWER_SUPPLY_PROP_VOLTAGE_NOW: 252 - ret = info->ops->get_voltage(info, &val->intval); 253 + ret = info->ops->get_battery_voltage(info, &val->intval); 253 254 break; 254 255 255 256 case POWER_SUPPLY_PROP_CURRENT_NOW: 256 - ret = info->ops->get_current(info, &val->intval); 257 + ret = info->ops->get_battery_current(info, &val->intval); 257 258 break; 258 259 259 260 case POWER_SUPPLY_PROP_TEMP: ··· 306 307 307 308 static struct ds278x_battery_ops ds278x_ops[] = { 308 309 [DS2782] = { 309 - .get_current = ds2782_get_current, 310 - .get_voltage = ds2782_get_voltage, 311 - .get_capacity = ds2782_get_capacity, 310 + .get_battery_current = ds2782_get_current, 311 + .get_battery_voltage = ds2782_get_voltage, 312 + .get_battery_capacity = ds2782_get_capacity, 312 313 }, 313 314 [DS2786] = { 314 - .get_current = ds2786_get_current, 315 - .get_voltage = ds2786_get_voltage, 316 - .get_capacity = ds2786_get_capacity, 315 + .get_battery_current = ds2786_get_current, 316 + .get_battery_voltage = ds2786_get_voltage, 317 + .get_battery_capacity = ds2786_get_capacity, 317 318 } 318 319 }; 319 320
+2 -2
drivers/regulator/ab3100.c
··· 286 286 { 287 287 struct ab3100_regulator *abreg = reg->reg_data; 288 288 289 - if (selector > abreg->voltages_len) 289 + if (selector >= abreg->voltages_len) 290 290 return -EINVAL; 291 291 return abreg->typ_voltages[selector]; 292 292 } ··· 318 318 regval &= 0xE0; 319 319 regval >>= 5; 320 320 321 - if (regval > abreg->voltages_len) { 321 + if (regval >= abreg->voltages_len) { 322 322 dev_err(&reg->dev, 323 323 "regulator register %02x contains an illegal voltage setting\n", 324 324 abreg->regreg);
+29 -7
drivers/regulator/tps6507x-regulator.c
··· 22 22 #include <linux/platform_device.h> 23 23 #include <linux/regulator/driver.h> 24 24 #include <linux/regulator/machine.h> 25 + #include <linux/regulator/tps6507x.h> 25 26 #include <linux/delay.h> 26 27 #include <linux/slab.h> 27 28 #include <linux/mfd/tps6507x.h> ··· 102 101 unsigned max_uV; 103 102 u8 table_len; 104 103 const u16 *table; 104 + 105 + /* Does DCDC high or the low register defines output voltage? */ 106 + bool defdcdc_default; 105 107 }; 106 108 107 - static const struct tps_info tps6507x_pmic_regs[] = { 109 + static struct tps_info tps6507x_pmic_regs[] = { 108 110 { 109 111 .name = "VDCDC1", 110 112 .min_uV = 725000, ··· 149 145 struct regulator_desc desc[TPS6507X_NUM_REGULATOR]; 150 146 struct tps6507x_dev *mfd; 151 147 struct regulator_dev *rdev[TPS6507X_NUM_REGULATOR]; 152 - const struct tps_info *info[TPS6507X_NUM_REGULATOR]; 148 + struct tps_info *info[TPS6507X_NUM_REGULATOR]; 153 149 struct mutex io_lock; 154 150 }; 155 151 static inline int tps6507x_pmic_read(struct tps6507x_pmic *tps, u8 reg) ··· 345 341 reg = TPS6507X_REG_DEFDCDC1; 346 342 break; 347 343 case TPS6507X_DCDC_2: 348 - reg = TPS6507X_REG_DEFDCDC2_LOW; 344 + if (tps->info[dcdc]->defdcdc_default) 345 + reg = TPS6507X_REG_DEFDCDC2_HIGH; 346 + else 347 + reg = TPS6507X_REG_DEFDCDC2_LOW; 349 348 break; 350 349 case TPS6507X_DCDC_3: 351 - reg = TPS6507X_REG_DEFDCDC3_LOW; 350 + if (tps->info[dcdc]->defdcdc_default) 351 + reg = TPS6507X_REG_DEFDCDC3_HIGH; 352 + else 353 + reg = TPS6507X_REG_DEFDCDC3_LOW; 352 354 break; 353 355 default: 354 356 return -EINVAL; ··· 380 370 reg = TPS6507X_REG_DEFDCDC1; 381 371 break; 382 372 case TPS6507X_DCDC_2: 383 - reg = TPS6507X_REG_DEFDCDC2_LOW; 373 + if (tps->info[dcdc]->defdcdc_default) 374 + reg = TPS6507X_REG_DEFDCDC2_HIGH; 375 + else 376 + reg = TPS6507X_REG_DEFDCDC2_LOW; 384 377 break; 385 378 case TPS6507X_DCDC_3: 386 - reg = TPS6507X_REG_DEFDCDC3_LOW; 379 + if (tps->info[dcdc]->defdcdc_default) 380 + reg = TPS6507X_REG_DEFDCDC3_HIGH; 381 + else 382 + reg = TPS6507X_REG_DEFDCDC3_LOW; 387 383 break; 388 384 default: 389 385 return -EINVAL; ··· 548 532 { 549 533 struct tps6507x_dev *tps6507x_dev = dev_get_drvdata(pdev->dev.parent); 550 534 static int desc_id; 551 - const struct tps_info *info = &tps6507x_pmic_regs[0]; 535 + struct tps_info *info = &tps6507x_pmic_regs[0]; 552 536 struct regulator_init_data *init_data; 553 537 struct regulator_dev *rdev; 554 538 struct tps6507x_pmic *tps; ··· 585 569 for (i = 0; i < TPS6507X_NUM_REGULATOR; i++, info++, init_data++) { 586 570 /* Register the regulators */ 587 571 tps->info[i] = info; 572 + if (init_data->driver_data) { 573 + struct tps6507x_reg_platform_data *data = 574 + init_data->driver_data; 575 + tps->info[i]->defdcdc_default = data->defdcdc_default; 576 + } 577 + 588 578 tps->desc[i].name = info->name; 589 579 tps->desc[i].id = desc_id++; 590 580 tps->desc[i].n_voltages = num_voltages[i];
+1 -1
drivers/regulator/wm8350-regulator.c
··· 1495 1495 if (ret != 0) { 1496 1496 dev_err(wm8350->dev, "Failed to register regulator %d: %d\n", 1497 1497 reg, ret); 1498 - platform_device_del(pdev); 1498 + platform_device_put(pdev); 1499 1499 wm8350->pmic.pdev[reg] = NULL; 1500 1500 } 1501 1501
+17 -3
drivers/rtc/rtc-rx8581.c
··· 168 168 return -EIO; 169 169 } 170 170 171 - err = i2c_smbus_write_byte_data(client, RX8581_REG_FLAG, 171 + err = i2c_smbus_write_byte_data(client, RX8581_REG_CTRL, 172 172 (data | RX8581_CTRL_STOP)); 173 173 if (err < 0) { 174 174 dev_err(&client->dev, "Unable to write control register\n"); ··· 182 182 return -EIO; 183 183 } 184 184 185 + /* get VLF and clear it */ 186 + data = i2c_smbus_read_byte_data(client, RX8581_REG_FLAG); 187 + if (data < 0) { 188 + dev_err(&client->dev, "Unable to read flag register\n"); 189 + return -EIO; 190 + } 191 + 192 + err = i2c_smbus_write_byte_data(client, RX8581_REG_FLAG, 193 + (data & ~(RX8581_FLAG_VLF))); 194 + if (err != 0) { 195 + dev_err(&client->dev, "Unable to write flag register\n"); 196 + return -EIO; 197 + } 198 + 185 199 /* Restart the clock */ 186 200 data = i2c_smbus_read_byte_data(client, RX8581_REG_CTRL); 187 201 if (data < 0) { ··· 203 189 return -EIO; 204 190 } 205 191 206 - err = i2c_smbus_write_byte_data(client, RX8581_REG_FLAG, 207 - (data | ~(RX8581_CTRL_STOP))); 192 + err = i2c_smbus_write_byte_data(client, RX8581_REG_CTRL, 193 + (data & ~(RX8581_CTRL_STOP))); 208 194 if (err != 0) { 209 195 dev_err(&client->dev, "Unable to write control register\n"); 210 196 return -EIO;
+8
drivers/s390/scsi/zfcp_erp.c
··· 714 714 if (zfcp_erp_adapter_strategy_open_fsf_xport(act) == ZFCP_ERP_FAILED) 715 715 return ZFCP_ERP_FAILED; 716 716 717 + if (mempool_resize(act->adapter->pool.status_read_data, 718 + act->adapter->stat_read_buf_num, GFP_KERNEL)) 719 + return ZFCP_ERP_FAILED; 720 + 721 + if (mempool_resize(act->adapter->pool.status_read_req, 722 + act->adapter->stat_read_buf_num, GFP_KERNEL)) 723 + return ZFCP_ERP_FAILED; 724 + 717 725 atomic_set(&act->adapter->stat_miss, act->adapter->stat_read_buf_num); 718 726 if (zfcp_status_read_refill(act->adapter)) 719 727 return ZFCP_ERP_FAILED;
+3 -7
drivers/s390/scsi/zfcp_fsf.c
··· 496 496 497 497 adapter->hydra_version = bottom->adapter_type; 498 498 adapter->timer_ticks = bottom->timer_interval; 499 - adapter->stat_read_buf_num = max(bottom->status_read_buf_num, (u16)16); 499 + adapter->stat_read_buf_num = max(bottom->status_read_buf_num, 500 + (u16)FSF_STATUS_READS_RECOM); 500 501 501 502 if (fc_host_permanent_port_name(shost) == -1) 502 503 fc_host_permanent_port_name(shost) = fc_host_port_name(shost); ··· 719 718 720 719 zfcp_qdio_req_init(adapter->qdio, &req->qdio_req, req->req_id, sbtype, 721 720 req->qtcb, sizeof(struct fsf_qtcb)); 722 - 723 - if (!(atomic_read(&adapter->status) & ZFCP_STATUS_ADAPTER_QDIOUP)) { 724 - zfcp_fsf_req_free(req); 725 - return ERR_PTR(-EIO); 726 - } 727 721 728 722 return req; 729 723 } ··· 977 981 } 978 982 979 983 /* use single, unchained SBAL if it can hold the request */ 980 - if (zfcp_qdio_sg_one_sbale(sg_req) || zfcp_qdio_sg_one_sbale(sg_resp)) { 984 + if (zfcp_qdio_sg_one_sbale(sg_req) && zfcp_qdio_sg_one_sbale(sg_resp)) { 981 985 zfcp_fsf_setup_ct_els_unchained(adapter->qdio, &req->qdio_req, 982 986 sg_req, sg_resp); 983 987 return 0;
+9 -1
drivers/s390/scsi/zfcp_qdio.c
··· 251 251 struct zfcp_qdio_queue *req_q = &qdio->req_q; 252 252 253 253 spin_lock_bh(&qdio->req_q_lock); 254 - if (atomic_read(&req_q->count)) 254 + if (atomic_read(&req_q->count) || 255 + !(atomic_read(&qdio->adapter->status) & ZFCP_STATUS_ADAPTER_QDIOUP)) 255 256 return 1; 256 257 spin_unlock_bh(&qdio->req_q_lock); 257 258 return 0; ··· 275 274 spin_unlock_bh(&qdio->req_q_lock); 276 275 ret = wait_event_interruptible_timeout(qdio->req_q_wq, 277 276 zfcp_qdio_sbal_check(qdio), 5 * HZ); 277 + 278 + if (!(atomic_read(&qdio->adapter->status) & ZFCP_STATUS_ADAPTER_QDIOUP)) 279 + return -EIO; 280 + 278 281 if (ret > 0) 279 282 return 0; 283 + 280 284 if (!ret) { 281 285 atomic_inc(&qdio->req_q_full); 282 286 /* assume hanging outbound queue, try queue recovery */ ··· 380 374 spin_lock_bh(&qdio->req_q_lock); 381 375 atomic_clear_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &qdio->adapter->status); 382 376 spin_unlock_bh(&qdio->req_q_lock); 377 + 378 + wake_up(&qdio->req_q_wq); 383 379 384 380 qdio_shutdown(qdio->adapter->ccw_device, 385 381 QDIO_FLAG_CLEANUP_USING_CLEAR);
+7 -6
drivers/scsi/ibmvscsi/rpa_vscsi.c
··· 277 277 goto reg_crq_failed; 278 278 } 279 279 280 + queue->cur = 0; 281 + spin_lock_init(&queue->lock); 282 + 283 + tasklet_init(&hostdata->srp_task, (void *)rpavscsi_task, 284 + (unsigned long)hostdata); 285 + 280 286 if (request_irq(vdev->irq, 281 287 rpavscsi_handle_event, 282 288 0, "ibmvscsi", (void *)hostdata) != 0) { ··· 297 291 goto req_irq_failed; 298 292 } 299 293 300 - queue->cur = 0; 301 - spin_lock_init(&queue->lock); 302 - 303 - tasklet_init(&hostdata->srp_task, (void *)rpavscsi_task, 304 - (unsigned long)hostdata); 305 - 306 294 return retrc; 307 295 308 296 req_irq_failed: 297 + tasklet_kill(&hostdata->srp_task); 309 298 do { 310 299 rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address); 311 300 } while ((rc == H_BUSY) || (H_IS_LONG_BUSY(rc)));
+33 -18
drivers/scsi/ipr.c
··· 1129 1129 } 1130 1130 1131 1131 /** 1132 - * ipr_format_resource_path - Format the resource path for printing. 1132 + * ipr_format_res_path - Format the resource path for printing. 1133 1133 * @res_path: resource path 1134 1134 * @buf: buffer 1135 1135 * 1136 1136 * Return value: 1137 1137 * pointer to buffer 1138 1138 **/ 1139 - static char *ipr_format_resource_path(u8 *res_path, char *buffer) 1139 + static char *ipr_format_res_path(u8 *res_path, char *buffer, int len) 1140 1140 { 1141 1141 int i; 1142 + char *p = buffer; 1142 1143 1143 - sprintf(buffer, "%02X", res_path[0]); 1144 - for (i=1; res_path[i] != 0xff; i++) 1145 - sprintf(buffer, "%s-%02X", buffer, res_path[i]); 1144 + res_path[0] = '\0'; 1145 + p += snprintf(p, buffer + len - p, "%02X", res_path[0]); 1146 + for (i = 1; res_path[i] != 0xff && ((i * 3) < len); i++) 1147 + p += snprintf(p, buffer + len - p, "-%02X", res_path[i]); 1146 1148 1147 1149 return buffer; 1148 1150 } ··· 1189 1187 1190 1188 if (res->sdev && new_path) 1191 1189 sdev_printk(KERN_INFO, res->sdev, "Resource path: %s\n", 1192 - ipr_format_resource_path(&res->res_path[0], &buffer[0])); 1190 + ipr_format_res_path(res->res_path, buffer, 1191 + sizeof(buffer))); 1193 1192 } else { 1194 1193 res->flags = cfgtew->u.cfgte->flags; 1195 1194 if (res->flags & IPR_IS_IOA_RESOURCE) ··· 1576 1573 ipr_err_separator; 1577 1574 1578 1575 ipr_err("Device %d : %s", i + 1, 1579 - ipr_format_resource_path(&dev_entry->res_path[0], &buffer[0])); 1576 + ipr_format_res_path(dev_entry->res_path, buffer, 1577 + sizeof(buffer))); 1580 1578 ipr_log_ext_vpd(&dev_entry->vpd); 1581 1579 1582 1580 ipr_err("-----New Device Information-----\n"); ··· 1923 1919 1924 1920 ipr_hcam_err(hostrcb, "%s %s: Resource Path=%s\n", 1925 1921 path_active_desc[i].desc, path_state_desc[j].desc, 1926 - ipr_format_resource_path(&fabric->res_path[0], &buffer[0])); 1922 + ipr_format_res_path(fabric->res_path, buffer, 1923 + sizeof(buffer))); 1927 1924 return; 1928 1925 } 1929 1926 } 1930 1927 1931 1928 ipr_err("Path state=%02X Resource Path=%s\n", path_state, 1932 - ipr_format_resource_path(&fabric->res_path[0], &buffer[0])); 1929 + ipr_format_res_path(fabric->res_path, buffer, sizeof(buffer))); 1933 1930 } 1934 1931 1935 1932 static const struct { ··· 2071 2066 2072 2067 ipr_hcam_err(hostrcb, "%s %s: Resource Path=%s, Link rate=%s, WWN=%08X%08X\n", 2073 2068 path_status_desc[j].desc, path_type_desc[i].desc, 2074 - ipr_format_resource_path(&cfg->res_path[0], &buffer[0]), 2069 + ipr_format_res_path(cfg->res_path, buffer, 2070 + sizeof(buffer)), 2075 2071 link_rate[cfg->link_rate & IPR_PHY_LINK_RATE_MASK], 2076 2072 be32_to_cpu(cfg->wwid[0]), be32_to_cpu(cfg->wwid[1])); 2077 2073 return; ··· 2080 2074 } 2081 2075 ipr_hcam_err(hostrcb, "Path element=%02X: Resource Path=%s, Link rate=%s " 2082 2076 "WWN=%08X%08X\n", cfg->type_status, 2083 - ipr_format_resource_path(&cfg->res_path[0], &buffer[0]), 2077 + ipr_format_res_path(cfg->res_path, buffer, sizeof(buffer)), 2084 2078 link_rate[cfg->link_rate & IPR_PHY_LINK_RATE_MASK], 2085 2079 be32_to_cpu(cfg->wwid[0]), be32_to_cpu(cfg->wwid[1])); 2086 2080 } ··· 2145 2139 2146 2140 ipr_err("RAID %s Array Configuration: %s\n", 2147 2141 error->protection_level, 2148 - ipr_format_resource_path(&error->last_res_path[0], &buffer[0])); 2142 + ipr_format_res_path(error->last_res_path, buffer, sizeof(buffer))); 2149 2143 2150 2144 ipr_err_separator; 2151 2145 ··· 2166 2160 ipr_err("Array Member %d:\n", i); 2167 2161 ipr_log_ext_vpd(&array_entry->vpd); 2168 2162 ipr_err("Current Location: %s", 2169 - ipr_format_resource_path(&array_entry->res_path[0], &buffer[0])); 2163 + ipr_format_res_path(array_entry->res_path, buffer, 2164 + sizeof(buffer))); 2170 2165 ipr_err("Expected Location: %s", 2171 - ipr_format_resource_path(&array_entry->expected_res_path[0], &buffer[0])); 2166 + ipr_format_res_path(array_entry->expected_res_path, 2167 + buffer, sizeof(buffer))); 2172 2168 2173 2169 ipr_err_separator; 2174 2170 } ··· 4087 4079 }; 4088 4080 4089 4081 /** 4090 - * ipr_show_resource_path - Show the resource path for this device. 4082 + * ipr_show_resource_path - Show the resource path or the resource address for 4083 + * this device. 4091 4084 * @dev: device struct 4092 4085 * @buf: buffer 4093 4086 * ··· 4106 4097 4107 4098 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); 4108 4099 res = (struct ipr_resource_entry *)sdev->hostdata; 4109 - if (res) 4100 + if (res && ioa_cfg->sis64) 4110 4101 len = snprintf(buf, PAGE_SIZE, "%s\n", 4111 - ipr_format_resource_path(&res->res_path[0], &buffer[0])); 4102 + ipr_format_res_path(res->res_path, buffer, 4103 + sizeof(buffer))); 4104 + else if (res) 4105 + len = snprintf(buf, PAGE_SIZE, "%d:%d:%d:%d\n", ioa_cfg->host->host_no, 4106 + res->bus, res->target, res->lun); 4107 + 4112 4108 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); 4113 4109 return len; 4114 4110 } ··· 4365 4351 scsi_adjust_queue_depth(sdev, 0, sdev->host->cmd_per_lun); 4366 4352 if (ioa_cfg->sis64) 4367 4353 sdev_printk(KERN_INFO, sdev, "Resource path: %s\n", 4368 - ipr_format_resource_path(&res->res_path[0], &buffer[0])); 4354 + ipr_format_res_path(res->res_path, buffer, 4355 + sizeof(buffer))); 4369 4356 return 0; 4370 4357 } 4371 4358 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
+3 -2
drivers/scsi/ipr.h
··· 1684 1684 if (ipr_is_device(hostrcb)) { \ 1685 1685 if ((hostrcb)->ioa_cfg->sis64) { \ 1686 1686 printk(KERN_ERR IPR_NAME ": %s: " fmt, \ 1687 - ipr_format_resource_path(&hostrcb->hcam.u.error64.fd_res_path[0], \ 1688 - &hostrcb->rp_buffer[0]), \ 1687 + ipr_format_res_path(hostrcb->hcam.u.error64.fd_res_path, \ 1688 + hostrcb->rp_buffer, \ 1689 + sizeof(hostrcb->rp_buffer)), \ 1689 1690 __VA_ARGS__); \ 1690 1691 } else { \ 1691 1692 ipr_ra_err((hostrcb)->ioa_cfg, \
+1
drivers/serial/atmel_serial.c
··· 41 41 #include <linux/uaccess.h> 42 42 43 43 #include <asm/io.h> 44 + #include <asm/ioctls.h> 44 45 45 46 #include <asm/mach/serial_at91.h> 46 47 #include <mach/board.h>
+1
drivers/usb/class/cdc-acm.c
··· 1596 1596 { NOKIA_PCSUITE_ACM_INFO(0x00e9), }, /* Nokia 5320 XpressMusic */ 1597 1597 { NOKIA_PCSUITE_ACM_INFO(0x0108), }, /* Nokia 5320 XpressMusic 2G */ 1598 1598 { NOKIA_PCSUITE_ACM_INFO(0x01f5), }, /* Nokia N97, RM-505 */ 1599 + { NOKIA_PCSUITE_ACM_INFO(0x02e3), }, /* Nokia 5230, RM-588 */ 1599 1600 1600 1601 /* NOTE: non-Nokia COMM/ACM/0xff is likely MSFT RNDIS... NOT a modem! */ 1601 1602
+2
drivers/usb/core/hub.c
··· 1982 1982 (portstatus & USB_PORT_STAT_ENABLE)) { 1983 1983 if (hub_is_wusb(hub)) 1984 1984 udev->speed = USB_SPEED_WIRELESS; 1985 + else if (portstatus & USB_PORT_STAT_SUPER_SPEED) 1986 + udev->speed = USB_SPEED_SUPER; 1985 1987 else if (portstatus & USB_PORT_STAT_HIGH_SPEED) 1986 1988 udev->speed = USB_SPEED_HIGH; 1987 1989 else if (portstatus & USB_PORT_STAT_LOW_SPEED)
+7
drivers/usb/core/quirks.c
··· 41 41 /* Philips PSC805 audio device */ 42 42 { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME }, 43 43 44 + /* Artisman Watchdog Dongle */ 45 + { USB_DEVICE(0x04b4, 0x0526), .driver_info = 46 + USB_QUIRK_CONFIG_INTF_STRINGS }, 47 + 44 48 /* Roland SC-8820 */ 45 49 { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME }, 46 50 ··· 67 63 68 64 /* X-Rite/Gretag-Macbeth Eye-One Pro display colorimeter */ 69 65 { USB_DEVICE(0x0971, 0x2000), .driver_info = USB_QUIRK_NO_SET_INTF }, 66 + 67 + /* Broadcom BCM92035DGROM BT dongle */ 68 + { USB_DEVICE(0x0a5c, 0x2021), .driver_info = USB_QUIRK_RESET_RESUME }, 70 69 71 70 /* Action Semiconductor flash disk */ 72 71 { USB_DEVICE(0x10d6, 0x2200), .driver_info =
+1 -1
drivers/usb/gadget/pxa27x_udc.c
··· 2561 2561 udc_disable(udc); 2562 2562 } 2563 2563 2564 - #ifdef CONFIG_CPU_PXA27x 2564 + #ifdef CONFIG_PXA27x 2565 2565 extern void pxa27x_clear_otgph(void); 2566 2566 #else 2567 2567 #define pxa27x_clear_otgph() do {} while (0)
+4
drivers/usb/gadget/s3c2410_udc.c
··· 735 735 else 736 736 dev->ep0state = EP0_OUT_DATA_PHASE; 737 737 738 + if (!dev->driver) 739 + return; 740 + 741 + /* deliver the request to the gadget driver */ 738 742 ret = dev->driver->setup(&dev->gadget, crq); 739 743 if (ret < 0) { 740 744 if (dev->req_config) {
+1 -1
drivers/usb/host/ohci-pxa27x.c
··· 203 203 __raw_writel(uhchr & ~UHCHR_FHR, ohci->mmio_base + UHCHR); 204 204 } 205 205 206 - #ifdef CONFIG_CPU_PXA27x 206 + #ifdef CONFIG_PXA27x 207 207 extern void pxa27x_clear_otgph(void); 208 208 #else 209 209 #define pxa27x_clear_otgph() do {} while (0)
+24 -2
drivers/usb/host/xhci-mem.c
··· 835 835 return 0; 836 836 } 837 837 838 + void xhci_copy_ep0_dequeue_into_input_ctx(struct xhci_hcd *xhci, 839 + struct usb_device *udev) 840 + { 841 + struct xhci_virt_device *virt_dev; 842 + struct xhci_ep_ctx *ep0_ctx; 843 + struct xhci_ring *ep_ring; 844 + 845 + virt_dev = xhci->devs[udev->slot_id]; 846 + ep0_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, 0); 847 + ep_ring = virt_dev->eps[0].ring; 848 + /* 849 + * FIXME we don't keep track of the dequeue pointer very well after a 850 + * Set TR dequeue pointer, so we're setting the dequeue pointer of the 851 + * host to our enqueue pointer. This should only be called after a 852 + * configured device has reset, so all control transfers should have 853 + * been completed or cancelled before the reset. 854 + */ 855 + ep0_ctx->deq = xhci_trb_virt_to_dma(ep_ring->enq_seg, ep_ring->enqueue); 856 + ep0_ctx->deq |= ep_ring->cycle_state; 857 + } 858 + 838 859 /* Setup an xHCI virtual device for a Set Address command */ 839 860 int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udev) 840 861 { ··· 1023 1002 return EP_INTERVAL(interval); 1024 1003 } 1025 1004 1026 - /* The "Mult" field in the endpoint context is only set for SuperSpeed devices. 1005 + /* The "Mult" field in the endpoint context is only set for SuperSpeed isoc eps. 1027 1006 * High speed endpoint descriptors can define "the number of additional 1028 1007 * transaction opportunities per microframe", but that goes in the Max Burst 1029 1008 * endpoint context field. ··· 1031 1010 static inline u32 xhci_get_endpoint_mult(struct usb_device *udev, 1032 1011 struct usb_host_endpoint *ep) 1033 1012 { 1034 - if (udev->speed != USB_SPEED_SUPER) 1013 + if (udev->speed != USB_SPEED_SUPER || 1014 + !usb_endpoint_xfer_isoc(&ep->desc)) 1035 1015 return 0; 1036 1016 return ep->ss_ep_comp.bmAttributes; 1037 1017 }
+7 -4
drivers/usb/host/xhci-ring.c
··· 2380 2380 u32 field3, u32 field4, bool command_must_succeed) 2381 2381 { 2382 2382 int reserved_trbs = xhci->cmd_ring_reserved_trbs; 2383 + int ret; 2384 + 2383 2385 if (!command_must_succeed) 2384 2386 reserved_trbs++; 2385 2387 2386 - if (!room_on_ring(xhci, xhci->cmd_ring, reserved_trbs)) { 2387 - if (!in_interrupt()) 2388 - xhci_err(xhci, "ERR: No room for command on command ring\n"); 2388 + ret = prepare_ring(xhci, xhci->cmd_ring, EP_STATE_RUNNING, 2389 + reserved_trbs, GFP_ATOMIC); 2390 + if (ret < 0) { 2391 + xhci_err(xhci, "ERR: No room for command on command ring\n"); 2389 2392 if (command_must_succeed) 2390 2393 xhci_err(xhci, "ERR: Reserved TRB counting for " 2391 2394 "unfailable commands failed.\n"); 2392 - return -ENOMEM; 2395 + return ret; 2393 2396 } 2394 2397 queue_trb(xhci, xhci->cmd_ring, false, false, field1, field2, field3, 2395 2398 field4 | xhci->cmd_ring->cycle_state);
+2
drivers/usb/host/xhci.c
··· 2134 2134 /* If this is a Set Address to an unconfigured device, setup ep 0 */ 2135 2135 if (!udev->config) 2136 2136 xhci_setup_addressable_virt_dev(xhci, udev); 2137 + else 2138 + xhci_copy_ep0_dequeue_into_input_ctx(xhci, udev); 2137 2139 /* Otherwise, assume the core has the device configured how it wants */ 2138 2140 xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id); 2139 2141 xhci_dbg_ctx(xhci, virt_dev->in_ctx, 2);
+2
drivers/usb/host/xhci.h
··· 1292 1292 void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id); 1293 1293 int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id, struct usb_device *udev, gfp_t flags); 1294 1294 int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udev); 1295 + void xhci_copy_ep0_dequeue_into_input_ctx(struct xhci_hcd *xhci, 1296 + struct usb_device *udev); 1295 1297 unsigned int xhci_get_endpoint_index(struct usb_endpoint_descriptor *desc); 1296 1298 unsigned int xhci_get_endpoint_flag(struct usb_endpoint_descriptor *desc); 1297 1299 unsigned int xhci_get_endpoint_flag_from_index(unsigned int ep_index);
+3 -2
drivers/usb/misc/sisusbvga/sisusb.c
··· 2436 2436 } 2437 2437 2438 2438 if (!sisusb->devinit) { 2439 - if (sisusb->sisusb_dev->speed == USB_SPEED_HIGH) { 2439 + if (sisusb->sisusb_dev->speed == USB_SPEED_HIGH || 2440 + sisusb->sisusb_dev->speed == USB_SPEED_SUPER) { 2440 2441 if (sisusb_init_gfxdevice(sisusb, 0)) { 2441 2442 mutex_unlock(&sisusb->lock); 2442 2443 dev_err(&sisusb->sisusb_dev->dev, "Failed to initialize device\n"); ··· 3167 3166 3168 3167 sisusb->present = 1; 3169 3168 3170 - if (dev->speed == USB_SPEED_HIGH) { 3169 + if (dev->speed == USB_SPEED_HIGH || dev->speed == USB_SPEED_SUPER) { 3171 3170 int initscreen = 1; 3172 3171 #ifdef INCL_SISUSB_CON 3173 3172 if (sisusb_first_vc > 0 &&
-13
drivers/usb/musb/tusb6010.c
··· 29 29 #define TUSB_REV_MAJOR(reg_val) ((reg_val >> 4) & 0xf) 30 30 #define TUSB_REV_MINOR(reg_val) (reg_val & 0xf) 31 31 32 - #ifdef CONFIG_PM 33 - /* REVISIT: These should be only needed if somebody implements off idle */ 34 - void musb_platform_save_context(struct musb *musb, 35 - struct musb_context_registers *musb_context) 36 - { 37 - } 38 - 39 - void musb_platform_restore_context(struct musb *musb, 40 - struct musb_context_registers *musb_context) 41 - { 42 - } 43 - #endif 44 - 45 32 /* 46 33 * Checks the revision. We need to use the DMA register as 3.0 does not 47 34 * have correct versions for TUSB_PRCM_REV or TUSB_INT_CTRL_REV.
+9
drivers/usb/serial/ftdi_sio.c
··· 691 691 { USB_DEVICE(FTDI_VID, FTDI_NDI_AURORA_SCU_PID), 692 692 .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, 693 693 { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, 694 + { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_SERIAL_VX7_PID) }, 694 695 { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, 695 696 { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) }, 696 697 { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, ··· 738 737 { USB_DEVICE(FTDI_VID, MJSG_SR_RADIO_PID) }, 739 738 { USB_DEVICE(FTDI_VID, MJSG_HD_RADIO_PID) }, 740 739 { USB_DEVICE(FTDI_VID, MJSG_XM_RADIO_PID) }, 740 + { USB_DEVICE(FTDI_VID, XVERVE_SIGNALYZER_ST_PID), 741 + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 742 + { USB_DEVICE(FTDI_VID, XVERVE_SIGNALYZER_SLITE_PID), 743 + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 744 + { USB_DEVICE(FTDI_VID, XVERVE_SIGNALYZER_SH2_PID), 745 + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 746 + { USB_DEVICE(FTDI_VID, XVERVE_SIGNALYZER_SH4_PID), 747 + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 741 748 { }, /* Optional parameter entry */ 742 749 { } /* Terminating entry */ 743 750 };
+15
drivers/usb/serial/ftdi_sio_ids.h
··· 696 696 #define TELLDUS_TELLSTICK_PID 0x0C30 /* RF control dongle 433 MHz using FT232RL */ 697 697 698 698 /* 699 + * RT Systems programming cables for various ham radios 700 + */ 701 + #define RTSYSTEMS_VID 0x2100 /* Vendor ID */ 702 + #define RTSYSTEMS_SERIAL_VX7_PID 0x9e52 /* Serial converter for VX-7 Radios using FT232RL */ 703 + 704 + /* 699 705 * Bayer Ascensia Contour blood glucose meter USB-converter cable. 700 706 * http://winglucofacts.com/cables/ 701 707 */ ··· 1023 1017 #define MJSG_SR_RADIO_PID 0x9379 1024 1018 #define MJSG_XM_RADIO_PID 0x937A 1025 1019 #define MJSG_HD_RADIO_PID 0x937C 1020 + 1021 + /* 1022 + * Xverve Signalyzer tools (http://www.signalyzer.com/) 1023 + */ 1024 + #define XVERVE_SIGNALYZER_ST_PID 0xBCA0 1025 + #define XVERVE_SIGNALYZER_SLITE_PID 0xBCA1 1026 + #define XVERVE_SIGNALYZER_SH2_PID 0xBCA2 1027 + #define XVERVE_SIGNALYZER_SH4_PID 0xBCA4 1028 +
+4
drivers/usb/serial/option.c
··· 206 206 #define AMOI_PRODUCT_H01 0x0800 207 207 #define AMOI_PRODUCT_H01A 0x7002 208 208 #define AMOI_PRODUCT_H02 0x0802 209 + #define AMOI_PRODUCT_SKYPEPHONE_S2 0x0407 209 210 210 211 #define DELL_VENDOR_ID 0x413C 211 212 ··· 303 302 #define QISDA_PRODUCT_H21_4512 0x4512 304 303 #define QISDA_PRODUCT_H21_4523 0x4523 305 304 #define QISDA_PRODUCT_H20_4515 0x4515 305 + #define QISDA_PRODUCT_H20_4518 0x4518 306 306 #define QISDA_PRODUCT_H20_4519 0x4519 307 307 308 308 /* TLAYTECH PRODUCTS */ ··· 518 516 { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) }, 519 517 { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) }, 520 518 { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H02) }, 519 + { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_SKYPEPHONE_S2) }, 521 520 522 521 { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5700_MINICARD) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */ 523 522 { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5500_MINICARD) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ ··· 855 852 { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) }, 856 853 { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) }, 857 854 { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) }, 855 + { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4518) }, 858 856 { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4519) }, 859 857 { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_G450) }, 860 858 { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */
+2
drivers/usb/serial/qcserial.c
··· 51 51 {USB_DEVICE(0x1f45, 0x0001)}, /* Unknown Gobi QDL device */ 52 52 {USB_DEVICE(0x413c, 0x8185)}, /* Dell Gobi 2000 QDL device (N0218, VU936) */ 53 53 {USB_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */ 54 + {USB_DEVICE(0x05c6, 0x9208)}, /* Generic Gobi 2000 QDL device */ 55 + {USB_DEVICE(0x05c6, 0x920b)}, /* Generic Gobi 2000 Modem device */ 54 56 {USB_DEVICE(0x05c6, 0x9224)}, /* Sony Gobi 2000 QDL device (N0279, VU730) */ 55 57 {USB_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */ 56 58 {USB_DEVICE(0x05c6, 0x9244)}, /* Samsung Gobi 2000 QDL device (VL176) */
+1
drivers/usb/serial/sierra.c
··· 245 245 { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ 246 246 { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */ 247 247 { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U */ 248 + { USB_DEVICE(0x1199, 0x0301) }, /* Sierra Wireless USB Dongle 250U */ 248 249 /* Sierra Wireless C597 */ 249 250 { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x0023, 0xFF, 0xFF, 0xFF) }, 250 251 /* Sierra Wireless T598 */
+1 -3
drivers/usb/storage/transport.c
··· 139 139 140 140 /* fill the common fields in the URB */ 141 141 us->current_urb->context = &urb_done; 142 - us->current_urb->actual_length = 0; 143 - us->current_urb->error_count = 0; 144 - us->current_urb->status = 0; 142 + us->current_urb->transfer_flags = 0; 145 143 146 144 /* we assume that if transfer_buffer isn't us->iobuf then it 147 145 * hasn't been mapped for DMA. Yes, this is clunky, but it's
+3 -3
drivers/video/au1100fb.c
··· 95 95 { { 8, 4, 0 }, { 4, 4, 0 }, { 0, 4, 0 }, { 0, 0, 0 } }, 96 96 }; 97 97 98 - static struct fb_fix_screeninfo au1100fb_fix __initdata = { 98 + static struct fb_fix_screeninfo au1100fb_fix __devinitdata = { 99 99 .id = "AU1100 FB", 100 100 .xpanstep = 1, 101 101 .ypanstep = 1, ··· 103 103 .accel = FB_ACCEL_NONE, 104 104 }; 105 105 106 - static struct fb_var_screeninfo au1100fb_var __initdata = { 106 + static struct fb_var_screeninfo au1100fb_var __devinitdata = { 107 107 .activate = FB_ACTIVATE_NOW, 108 108 .height = -1, 109 109 .width = -1, ··· 458 458 459 459 /* AU1100 LCD controller device driver */ 460 460 461 - static int __init au1100fb_drv_probe(struct platform_device *dev) 461 + static int __devinit au1100fb_drv_probe(struct platform_device *dev) 462 462 { 463 463 struct au1100fb_device *fbdev = NULL; 464 464 struct resource *regs_res;
+3
drivers/video/cyber2000fb.c
··· 388 388 pseudo_val |= convert_bitfield(red, &var->red); 389 389 pseudo_val |= convert_bitfield(green, &var->green); 390 390 pseudo_val |= convert_bitfield(blue, &var->blue); 391 + ret = 0; 391 392 break; 392 393 } 393 394 ··· 437 436 cyber2000fb_writeb(i | 4, 0x3cf, cfb); 438 437 cyber2000fb_writeb(val, 0x3c6, cfb); 439 438 cyber2000fb_writeb(i, 0x3cf, cfb); 439 + /* prevent card lock-up observed on x86 with CyberPro 2000 */ 440 + cyber2000fb_readb(0x3cf, cfb); 440 441 } 441 442 442 443 static void cyber2000fb_set_timing(struct cfb_info *cfb, struct par_info *hw)
+8 -8
drivers/video/gbefb.c
··· 91 91 static uint32_t gbe_cmap[256]; 92 92 static int gbe_turned_on; /* 0 turned off, 1 turned on */ 93 93 94 - static char *mode_option __initdata = NULL; 94 + static char *mode_option __devinitdata = NULL; 95 95 96 96 /* default CRT mode */ 97 - static struct fb_var_screeninfo default_var_CRT __initdata = { 97 + static struct fb_var_screeninfo default_var_CRT __devinitdata = { 98 98 /* 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock) */ 99 99 .xres = 640, 100 100 .yres = 480, ··· 125 125 }; 126 126 127 127 /* default LCD mode */ 128 - static struct fb_var_screeninfo default_var_LCD __initdata = { 128 + static struct fb_var_screeninfo default_var_LCD __devinitdata = { 129 129 /* 1600x1024, 8 bpp */ 130 130 .xres = 1600, 131 131 .yres = 1024, ··· 157 157 158 158 /* default modedb mode */ 159 159 /* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */ 160 - static struct fb_videomode default_mode_CRT __initdata = { 160 + static struct fb_videomode default_mode_CRT __devinitdata = { 161 161 .refresh = 60, 162 162 .xres = 640, 163 163 .yres = 480, ··· 172 172 .vmode = FB_VMODE_NONINTERLACED, 173 173 }; 174 174 /* 1600x1024 SGI flatpanel 1600sw */ 175 - static struct fb_videomode default_mode_LCD __initdata = { 175 + static struct fb_videomode default_mode_LCD __devinitdata = { 176 176 /* 1600x1024, 8 bpp */ 177 177 .xres = 1600, 178 178 .yres = 1024, ··· 186 186 .vmode = FB_VMODE_NONINTERLACED, 187 187 }; 188 188 189 - static struct fb_videomode *default_mode __initdata = &default_mode_CRT; 190 - static struct fb_var_screeninfo *default_var __initdata = &default_var_CRT; 189 + static struct fb_videomode *default_mode __devinitdata = &default_mode_CRT; 190 + static struct fb_var_screeninfo *default_var __devinitdata = &default_var_CRT; 191 191 192 192 static int flat_panel_enabled = 0; 193 193 ··· 1098 1098 * Initialization 1099 1099 */ 1100 1100 1101 - static int __init gbefb_setup(char *options) 1101 + static int __devinit gbefb_setup(char *options) 1102 1102 { 1103 1103 char *this_opt; 1104 1104
+3 -3
drivers/video/pmag-ba-fb.c
··· 44 44 }; 45 45 46 46 47 - static struct fb_var_screeninfo pmagbafb_defined __initdata = { 47 + static struct fb_var_screeninfo pmagbafb_defined __devinitdata = { 48 48 .xres = 1024, 49 49 .yres = 864, 50 50 .xres_virtual = 1024, ··· 68 68 .vmode = FB_VMODE_NONINTERLACED, 69 69 }; 70 70 71 - static struct fb_fix_screeninfo pmagbafb_fix __initdata = { 71 + static struct fb_fix_screeninfo pmagbafb_fix __devinitdata = { 72 72 .id = "PMAG-BA", 73 73 .smem_len = (1024 * 1024), 74 74 .type = FB_TYPE_PACKED_PIXELS, ··· 142 142 } 143 143 144 144 145 - static int __init pmagbafb_probe(struct device *dev) 145 + static int __devinit pmagbafb_probe(struct device *dev) 146 146 { 147 147 struct tc_dev *tdev = to_tc_dev(dev); 148 148 resource_size_t start, len;
+6 -6
drivers/video/pmagb-b-fb.c
··· 45 45 }; 46 46 47 47 48 - static struct fb_var_screeninfo pmagbbfb_defined __initdata = { 48 + static struct fb_var_screeninfo pmagbbfb_defined __devinitdata = { 49 49 .bits_per_pixel = 8, 50 50 .red.length = 8, 51 51 .green.length = 8, ··· 58 58 .vmode = FB_VMODE_NONINTERLACED, 59 59 }; 60 60 61 - static struct fb_fix_screeninfo pmagbbfb_fix __initdata = { 61 + static struct fb_fix_screeninfo pmagbbfb_fix __devinitdata = { 62 62 .id = "PMAGB-BA", 63 63 .smem_len = (2048 * 1024), 64 64 .type = FB_TYPE_PACKED_PIXELS, ··· 148 148 /* 149 149 * Set up screen parameters. 150 150 */ 151 - static void __init pmagbbfb_screen_setup(struct fb_info *info) 151 + static void __devinit pmagbbfb_screen_setup(struct fb_info *info) 152 152 { 153 153 struct pmagbbfb_par *par = info->par; 154 154 ··· 180 180 /* 181 181 * Determine oscillator configuration. 182 182 */ 183 - static void __init pmagbbfb_osc_setup(struct fb_info *info) 183 + static void __devinit pmagbbfb_osc_setup(struct fb_info *info) 184 184 { 185 - static unsigned int pmagbbfb_freqs[] __initdata = { 185 + static unsigned int pmagbbfb_freqs[] __devinitdata = { 186 186 130808, 119843, 104000, 92980, 74370, 72800, 187 187 69197, 66000, 65000, 50350, 36000, 32000, 25175 188 188 }; ··· 247 247 }; 248 248 249 249 250 - static int __init pmagbbfb_probe(struct device *dev) 250 + static int __devinit pmagbbfb_probe(struct device *dev) 251 251 { 252 252 struct tc_dev *tdev = to_tc_dev(dev); 253 253 resource_size_t start, len;
+3 -2
drivers/virtio/virtio_ring.c
··· 164 164 gfp_t gfp) 165 165 { 166 166 struct vring_virtqueue *vq = to_vvq(_vq); 167 - unsigned int i, avail, head, uninitialized_var(prev); 167 + unsigned int i, avail, uninitialized_var(prev); 168 + int head; 168 169 169 170 START_USE(vq); 170 171 ··· 175 174 * buffers, then go indirect. FIXME: tune this threshold */ 176 175 if (vq->indirect && (out + in) > 1 && vq->num_free) { 177 176 head = vring_add_indirect(vq, sg, out, in, gfp); 178 - if (head != vq->vring.num) 177 + if (likely(head >= 0)) 179 178 goto add_head; 180 179 } 181 180
+1 -1
fs/9p/vfs_dir.c
··· 146 146 while (rdir->head < rdir->tail) { 147 147 p9stat_init(&st); 148 148 err = p9stat_read(rdir->buf + rdir->head, 149 - buflen - rdir->head, &st, 149 + rdir->tail - rdir->head, &st, 150 150 fid->clnt->proto_version); 151 151 if (err) { 152 152 P9_DPRINTK(P9_DEBUG_VFS, "returned %d\n", err);
+1 -1
fs/ceph/Kconfig
··· 2 2 tristate "Ceph distributed file system (EXPERIMENTAL)" 3 3 depends on INET && EXPERIMENTAL 4 4 select LIBCRC32C 5 - select CONFIG_CRYPTO_AES 5 + select CRYPTO_AES 6 6 help 7 7 Choose Y or M here to include support for mounting the 8 8 experimental Ceph distributed file system. Ceph is an extremely
+8 -7
fs/ceph/caps.c
··· 627 627 if (fmode >= 0) 628 628 __ceph_get_fmode(ci, fmode); 629 629 spin_unlock(&inode->i_lock); 630 - wake_up(&ci->i_cap_wq); 630 + wake_up_all(&ci->i_cap_wq); 631 631 return 0; 632 632 } 633 633 ··· 1181 1181 } 1182 1182 1183 1183 if (wake) 1184 - wake_up(&ci->i_cap_wq); 1184 + wake_up_all(&ci->i_cap_wq); 1185 1185 1186 1186 return delayed; 1187 1187 } ··· 2153 2153 else if (flushsnaps) 2154 2154 ceph_flush_snaps(ci); 2155 2155 if (wake) 2156 - wake_up(&ci->i_cap_wq); 2156 + wake_up_all(&ci->i_cap_wq); 2157 2157 if (put) 2158 2158 iput(inode); 2159 2159 } ··· 2229 2229 iput(inode); 2230 2230 } else if (complete_capsnap) { 2231 2231 ceph_flush_snaps(ci); 2232 - wake_up(&ci->i_cap_wq); 2232 + wake_up_all(&ci->i_cap_wq); 2233 2233 } 2234 2234 if (drop_capsnap) 2235 2235 iput(inode); ··· 2405 2405 if (queue_invalidate) 2406 2406 ceph_queue_invalidate(inode); 2407 2407 if (wake) 2408 - wake_up(&ci->i_cap_wq); 2408 + wake_up_all(&ci->i_cap_wq); 2409 2409 2410 2410 if (check_caps == 1) 2411 2411 ceph_check_caps(ci, CHECK_CAPS_NODELAY|CHECK_CAPS_AUTHONLY, ··· 2460 2460 struct ceph_inode_info, 2461 2461 i_flushing_item)->vfs_inode); 2462 2462 mdsc->num_cap_flushing--; 2463 - wake_up(&mdsc->cap_flushing_wq); 2463 + wake_up_all(&mdsc->cap_flushing_wq); 2464 2464 dout(" inode %p now !flushing\n", inode); 2465 2465 2466 2466 if (ci->i_dirty_caps == 0) { ··· 2472 2472 } 2473 2473 } 2474 2474 spin_unlock(&mdsc->cap_dirty_lock); 2475 - wake_up(&ci->i_cap_wq); 2475 + wake_up_all(&ci->i_cap_wq); 2476 2476 2477 2477 out: 2478 2478 spin_unlock(&inode->i_lock); ··· 2984 2984 memcpy(*p, dentry->d_name.name, dentry->d_name.len); 2985 2985 *p += dentry->d_name.len; 2986 2986 rel->dname_seq = cpu_to_le32(di->lease_seq); 2987 + __ceph_mdsc_drop_dentry_lease(dentry); 2987 2988 } 2988 2989 spin_unlock(&dentry->d_lock); 2989 2990 return ret;
+10 -3
fs/ceph/dir.c
··· 266 266 spin_lock(&inode->i_lock); 267 267 if ((filp->f_pos == 2 || fi->dentry) && 268 268 !ceph_test_opt(client, NOASYNCREADDIR) && 269 + ceph_snap(inode) != CEPH_SNAPDIR && 269 270 (ci->i_ceph_flags & CEPH_I_COMPLETE) && 270 271 __ceph_caps_issued_mask(ci, CEPH_CAP_FILE_SHARED, 1)) { 271 272 err = __dcache_readdir(filp, dirent, filldir); ··· 1014 1013 1015 1014 /* 1016 1015 * When a dentry is released, clear the dir I_COMPLETE if it was part 1017 - * of the current dir gen. 1016 + * of the current dir gen or if this is in the snapshot namespace. 1018 1017 */ 1019 1018 static void ceph_dentry_release(struct dentry *dentry) 1020 1019 { 1021 1020 struct ceph_dentry_info *di = ceph_dentry(dentry); 1022 1021 struct inode *parent_inode = dentry->d_parent->d_inode; 1022 + u64 snapid = ceph_snap(parent_inode); 1023 1023 1024 - if (parent_inode) { 1024 + dout("dentry_release %p parent %p\n", dentry, parent_inode); 1025 + 1026 + if (parent_inode && snapid != CEPH_SNAPDIR) { 1025 1027 struct ceph_inode_info *ci = ceph_inode(parent_inode); 1026 1028 1027 1029 spin_lock(&parent_inode->i_lock); 1028 - if (ci->i_shared_gen == di->lease_shared_gen) { 1030 + if (ci->i_shared_gen == di->lease_shared_gen || 1031 + snapid <= CEPH_MAXSNAP) { 1029 1032 dout(" clearing %p complete (d_release)\n", 1030 1033 parent_inode); 1031 1034 ci->i_ceph_flags &= ~CEPH_I_COMPLETE; ··· 1246 1241 1247 1242 struct dentry_operations ceph_snapdir_dentry_ops = { 1248 1243 .d_revalidate = ceph_snapdir_d_revalidate, 1244 + .d_release = ceph_dentry_release, 1249 1245 }; 1250 1246 1251 1247 struct dentry_operations ceph_snap_dentry_ops = { 1248 + .d_release = ceph_dentry_release, 1252 1249 };
+1 -1
fs/ceph/file.c
··· 265 265 kmem_cache_free(ceph_file_cachep, cf); 266 266 267 267 /* wake up anyone waiting for caps on this inode */ 268 - wake_up(&ci->i_cap_wq); 268 + wake_up_all(&ci->i_cap_wq); 269 269 return 0; 270 270 } 271 271
+4 -2
fs/ceph/inode.c
··· 1199 1199 goto out; 1200 1200 } 1201 1201 err = ceph_init_dentry(dn); 1202 - if (err < 0) 1202 + if (err < 0) { 1203 + dput(dn); 1203 1204 goto out; 1205 + } 1204 1206 } else if (dn->d_inode && 1205 1207 (ceph_ino(dn->d_inode) != vino.ino || 1206 1208 ceph_snap(dn->d_inode) != vino.snap)) { ··· 1501 1499 if (wrbuffer_refs == 0) 1502 1500 ceph_check_caps(ci, CHECK_CAPS_AUTHONLY, NULL); 1503 1501 if (wake) 1504 - wake_up(&ci->i_cap_wq); 1502 + wake_up_all(&ci->i_cap_wq); 1505 1503 } 1506 1504 1507 1505
+5 -5
fs/ceph/mds_client.c
··· 868 868 { 869 869 struct ceph_inode_info *ci = ceph_inode(inode); 870 870 871 - wake_up(&ci->i_cap_wq); 871 + wake_up_all(&ci->i_cap_wq); 872 872 if (arg) { 873 873 spin_lock(&inode->i_lock); 874 874 ci->i_wanted_max_size = 0; ··· 1564 1564 if (req->r_callback) 1565 1565 req->r_callback(mdsc, req); 1566 1566 else 1567 - complete(&req->r_completion); 1567 + complete_all(&req->r_completion); 1568 1568 } 1569 1569 1570 1570 /* ··· 1932 1932 if (head->safe) { 1933 1933 req->r_got_safe = true; 1934 1934 __unregister_request(mdsc, req); 1935 - complete(&req->r_safe_completion); 1935 + complete_all(&req->r_safe_completion); 1936 1936 1937 1937 if (req->r_got_unsafe) { 1938 1938 /* ··· 1947 1947 1948 1948 /* last unsafe request during umount? */ 1949 1949 if (mdsc->stopping && !__get_oldest_req(mdsc)) 1950 - complete(&mdsc->safe_umount_waiters); 1950 + complete_all(&mdsc->safe_umount_waiters); 1951 1951 mutex_unlock(&mdsc->mutex); 1952 1952 goto out; 1953 1953 } ··· 2126 2126 pr_info("mds%d reconnect denied\n", session->s_mds); 2127 2127 remove_session_caps(session); 2128 2128 wake = 1; /* for good measure */ 2129 - complete(&mdsc->session_close_waiters); 2129 + complete_all(&mdsc->session_close_waiters); 2130 2130 kick_requests(mdsc, mds); 2131 2131 break; 2132 2132
+3 -3
fs/ceph/mon_client.c
··· 345 345 346 346 out: 347 347 mutex_unlock(&monc->mutex); 348 - wake_up(&client->auth_wq); 348 + wake_up_all(&client->auth_wq); 349 349 } 350 350 351 351 /* ··· 462 462 } 463 463 mutex_unlock(&monc->mutex); 464 464 if (req) { 465 - complete(&req->completion); 465 + complete_all(&req->completion); 466 466 put_generic_request(req); 467 467 } 468 468 return; ··· 718 718 monc->m_auth->front_max); 719 719 if (ret < 0) { 720 720 monc->client->auth_err = ret; 721 - wake_up(&monc->client->auth_wq); 721 + wake_up_all(&monc->client->auth_wq); 722 722 } else if (ret > 0) { 723 723 __send_prepared_auth_request(monc, ret); 724 724 } else if (!was_auth && monc->auth->ops->is_authenticated(monc->auth)) {
+3 -3
fs/ceph/osd_client.c
··· 862 862 if (req->r_callback) 863 863 req->r_callback(req, msg); 864 864 else 865 - complete(&req->r_completion); 865 + complete_all(&req->r_completion); 866 866 867 867 if (flags & CEPH_OSD_FLAG_ONDISK) { 868 868 if (req->r_safe_callback) 869 869 req->r_safe_callback(req, msg); 870 - complete(&req->r_safe_completion); /* fsync waiter */ 870 + complete_all(&req->r_safe_completion); /* fsync waiter */ 871 871 } 872 872 873 873 done: ··· 1083 1083 if (newmap) 1084 1084 kick_requests(osdc, NULL); 1085 1085 up_read(&osdc->map_sem); 1086 - wake_up(&osdc->client->auth_wq); 1086 + wake_up_all(&osdc->client->auth_wq); 1087 1087 return; 1088 1088 1089 1089 bad:
+15 -11
fs/ceph/osdmap.c
··· 831 831 /* remove any? */ 832 832 while (rbp && pgid_cmp(rb_entry(rbp, struct ceph_pg_mapping, 833 833 node)->pgid, pgid) <= 0) { 834 - struct rb_node *cur = rbp; 834 + struct ceph_pg_mapping *cur = 835 + rb_entry(rbp, struct ceph_pg_mapping, node); 836 + 835 837 rbp = rb_next(rbp); 836 - dout(" removed pg_temp %llx\n", 837 - *(u64 *)&rb_entry(cur, struct ceph_pg_mapping, 838 - node)->pgid); 839 - rb_erase(cur, &map->pg_temp); 838 + dout(" removed pg_temp %llx\n", *(u64 *)&cur->pgid); 839 + rb_erase(&cur->node, &map->pg_temp); 840 + kfree(cur); 840 841 } 841 842 842 843 if (pglen) { ··· 853 852 for (j = 0; j < pglen; j++) 854 853 pg->osds[j] = ceph_decode_32(p); 855 854 err = __insert_pg_mapping(pg, &map->pg_temp); 856 - if (err) 855 + if (err) { 856 + kfree(pg); 857 857 goto bad; 858 + } 858 859 dout(" added pg_temp %llx len %d\n", *(u64 *)&pgid, 859 860 pglen); 860 861 } 861 862 } 862 863 while (rbp) { 863 - struct rb_node *cur = rbp; 864 + struct ceph_pg_mapping *cur = 865 + rb_entry(rbp, struct ceph_pg_mapping, node); 866 + 864 867 rbp = rb_next(rbp); 865 - dout(" removed pg_temp %llx\n", 866 - *(u64 *)&rb_entry(cur, struct ceph_pg_mapping, 867 - node)->pgid); 868 - rb_erase(cur, &map->pg_temp); 868 + dout(" removed pg_temp %llx\n", *(u64 *)&cur->pgid); 869 + rb_erase(&cur->node, &map->pg_temp); 870 + kfree(cur); 869 871 } 870 872 871 873 /* ignore the rest */
+3 -3
fs/cifs/cifsfs.c
··· 923 923 goto out_unregister_filesystem; 924 924 #endif 925 925 #ifdef CONFIG_CIFS_DFS_UPCALL 926 - rc = register_key_type(&key_type_dns_resolver); 926 + rc = cifs_init_dns_resolver(); 927 927 if (rc) 928 928 goto out_unregister_key_type; 929 929 #endif ··· 935 935 936 936 out_unregister_resolver_key: 937 937 #ifdef CONFIG_CIFS_DFS_UPCALL 938 - unregister_key_type(&key_type_dns_resolver); 938 + cifs_exit_dns_resolver(); 939 939 out_unregister_key_type: 940 940 #endif 941 941 #ifdef CONFIG_CIFS_UPCALL ··· 961 961 cifs_proc_clean(); 962 962 #ifdef CONFIG_CIFS_DFS_UPCALL 963 963 cifs_dfs_release_automount_timer(); 964 - unregister_key_type(&key_type_dns_resolver); 964 + cifs_exit_dns_resolver(); 965 965 #endif 966 966 #ifdef CONFIG_CIFS_UPCALL 967 967 unregister_key_type(&cifs_spnego_key_type);
+69
fs/cifs/dns_resolve.c
··· 24 24 */ 25 25 26 26 #include <linux/slab.h> 27 + #include <linux/keyctl.h> 28 + #include <linux/key-type.h> 27 29 #include <keys/user-type.h> 28 30 #include "dns_resolve.h" 29 31 #include "cifsglob.h" 30 32 #include "cifsproto.h" 31 33 #include "cifs_debug.h" 34 + 35 + static const struct cred *dns_resolver_cache; 32 36 33 37 /* Checks if supplied name is IP address 34 38 * returns: ··· 98 94 int 99 95 dns_resolve_server_name_to_ip(const char *unc, char **ip_addr) 100 96 { 97 + const struct cred *saved_cred; 101 98 int rc = -EAGAIN; 102 99 struct key *rkey = ERR_PTR(-EAGAIN); 103 100 char *name; ··· 138 133 goto skip_upcall; 139 134 } 140 135 136 + saved_cred = override_creds(dns_resolver_cache); 141 137 rkey = request_key(&key_type_dns_resolver, name, ""); 138 + revert_creds(saved_cred); 142 139 if (!IS_ERR(rkey)) { 140 + if (!(rkey->perm & KEY_USR_VIEW)) { 141 + down_read(&rkey->sem); 142 + rkey->perm |= KEY_USR_VIEW; 143 + up_read(&rkey->sem); 144 + } 143 145 len = rkey->type_data.x[0]; 144 146 data = rkey->payload.data; 145 147 } else { ··· 177 165 return rc; 178 166 } 179 167 168 + int __init cifs_init_dns_resolver(void) 169 + { 170 + struct cred *cred; 171 + struct key *keyring; 172 + int ret; 180 173 174 + printk(KERN_NOTICE "Registering the %s key type\n", 175 + key_type_dns_resolver.name); 176 + 177 + /* create an override credential set with a special thread keyring in 178 + * which DNS requests are cached 179 + * 180 + * this is used to prevent malicious redirections from being installed 181 + * with add_key(). 182 + */ 183 + cred = prepare_kernel_cred(NULL); 184 + if (!cred) 185 + return -ENOMEM; 186 + 187 + keyring = key_alloc(&key_type_keyring, ".dns_resolver", 0, 0, cred, 188 + (KEY_POS_ALL & ~KEY_POS_SETATTR) | 189 + KEY_USR_VIEW | KEY_USR_READ, 190 + KEY_ALLOC_NOT_IN_QUOTA); 191 + if (IS_ERR(keyring)) { 192 + ret = PTR_ERR(keyring); 193 + goto failed_put_cred; 194 + } 195 + 196 + ret = key_instantiate_and_link(keyring, NULL, 0, NULL, NULL); 197 + if (ret < 0) 198 + goto failed_put_key; 199 + 200 + ret = register_key_type(&key_type_dns_resolver); 201 + if (ret < 0) 202 + goto failed_put_key; 203 + 204 + /* instruct request_key() to use this special keyring as a cache for 205 + * the results it looks up */ 206 + cred->thread_keyring = keyring; 207 + cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING; 208 + dns_resolver_cache = cred; 209 + return 0; 210 + 211 + failed_put_key: 212 + key_put(keyring); 213 + failed_put_cred: 214 + put_cred(cred); 215 + return ret; 216 + } 217 + 218 + void cifs_exit_dns_resolver(void) 219 + { 220 + key_revoke(dns_resolver_cache->thread_keyring); 221 + unregister_key_type(&key_type_dns_resolver); 222 + put_cred(dns_resolver_cache); 223 + printk(KERN_NOTICE "Unregistered %s key type\n", 224 + key_type_dns_resolver.name); 225 + }
+2 -2
fs/cifs/dns_resolve.h
··· 24 24 #define _DNS_RESOLVE_H 25 25 26 26 #ifdef __KERNEL__ 27 - #include <linux/key-type.h> 28 - extern struct key_type key_type_dns_resolver; 27 + extern int __init cifs_init_dns_resolver(void); 28 + extern void cifs_exit_dns_resolver(void); 29 29 extern int dns_resolve_server_name_to_ip(const char *unc, char **ip_addr); 30 30 #endif /* KERNEL */ 31 31
+9 -8
fs/ecryptfs/messaging.c
··· 31 31 32 32 static struct hlist_head *ecryptfs_daemon_hash; 33 33 struct mutex ecryptfs_daemon_hash_mux; 34 - static int ecryptfs_hash_buckets; 34 + static int ecryptfs_hash_bits; 35 35 #define ecryptfs_uid_hash(uid) \ 36 - hash_long((unsigned long)uid, ecryptfs_hash_buckets) 36 + hash_long((unsigned long)uid, ecryptfs_hash_bits) 37 37 38 38 static u32 ecryptfs_msg_counter; 39 39 static struct ecryptfs_msg_ctx *ecryptfs_msg_ctx_arr; ··· 486 486 } 487 487 mutex_init(&ecryptfs_daemon_hash_mux); 488 488 mutex_lock(&ecryptfs_daemon_hash_mux); 489 - ecryptfs_hash_buckets = 1; 490 - while (ecryptfs_number_of_users >> ecryptfs_hash_buckets) 491 - ecryptfs_hash_buckets++; 489 + ecryptfs_hash_bits = 1; 490 + while (ecryptfs_number_of_users >> ecryptfs_hash_bits) 491 + ecryptfs_hash_bits++; 492 492 ecryptfs_daemon_hash = kmalloc((sizeof(struct hlist_head) 493 - * ecryptfs_hash_buckets), GFP_KERNEL); 493 + * (1 << ecryptfs_hash_bits)), 494 + GFP_KERNEL); 494 495 if (!ecryptfs_daemon_hash) { 495 496 rc = -ENOMEM; 496 497 printk(KERN_ERR "%s: Failed to allocate memory\n", __func__); 497 498 mutex_unlock(&ecryptfs_daemon_hash_mux); 498 499 goto out; 499 500 } 500 - for (i = 0; i < ecryptfs_hash_buckets; i++) 501 + for (i = 0; i < (1 << ecryptfs_hash_bits); i++) 501 502 INIT_HLIST_HEAD(&ecryptfs_daemon_hash[i]); 502 503 mutex_unlock(&ecryptfs_daemon_hash_mux); 503 504 ecryptfs_msg_ctx_arr = kmalloc((sizeof(struct ecryptfs_msg_ctx) ··· 555 554 int i; 556 555 557 556 mutex_lock(&ecryptfs_daemon_hash_mux); 558 - for (i = 0; i < ecryptfs_hash_buckets; i++) { 557 + for (i = 0; i < (1 << ecryptfs_hash_bits); i++) { 559 558 int rc; 560 559 561 560 hlist_for_each_entry(daemon, elem,
+25 -6
fs/gfs2/dir.c
··· 1231 1231 return 0; 1232 1232 } 1233 1233 1234 + static void *gfs2_alloc_sort_buffer(unsigned size) 1235 + { 1236 + void *ptr = NULL; 1237 + 1238 + if (size < KMALLOC_MAX_SIZE) 1239 + ptr = kmalloc(size, GFP_NOFS | __GFP_NOWARN); 1240 + if (!ptr) 1241 + ptr = __vmalloc(size, GFP_NOFS, PAGE_KERNEL); 1242 + return ptr; 1243 + } 1244 + 1245 + static void gfs2_free_sort_buffer(void *ptr) 1246 + { 1247 + if (is_vmalloc_addr(ptr)) 1248 + vfree(ptr); 1249 + else 1250 + kfree(ptr); 1251 + } 1252 + 1234 1253 static int gfs2_dir_read_leaf(struct inode *inode, u64 *offset, void *opaque, 1235 1254 filldir_t filldir, int *copied, unsigned *depth, 1236 1255 u64 leaf_no) ··· 1290 1271 * 99 is the maximum number of entries that can fit in a single 1291 1272 * leaf block. 1292 1273 */ 1293 - larr = vmalloc((leaves + entries + 99) * sizeof(void *)); 1274 + larr = gfs2_alloc_sort_buffer((leaves + entries + 99) * sizeof(void *)); 1294 1275 if (!larr) 1295 1276 goto out; 1296 1277 darr = (const struct gfs2_dirent **)(larr + leaves); ··· 1301 1282 do { 1302 1283 error = get_leaf(ip, lfn, &bh); 1303 1284 if (error) 1304 - goto out_kfree; 1285 + goto out_free; 1305 1286 lf = (struct gfs2_leaf *)bh->b_data; 1306 1287 lfn = be64_to_cpu(lf->lf_next); 1307 1288 if (lf->lf_entries) { ··· 1310 1291 gfs2_dirent_gather, NULL, &g); 1311 1292 error = PTR_ERR(dent); 1312 1293 if (IS_ERR(dent)) 1313 - goto out_kfree; 1294 + goto out_free; 1314 1295 if (entries2 != g.offset) { 1315 1296 fs_warn(sdp, "Number of entries corrupt in dir " 1316 1297 "leaf %llu, entries2 (%u) != " ··· 1319 1300 entries2, g.offset); 1320 1301 1321 1302 error = -EIO; 1322 - goto out_kfree; 1303 + goto out_free; 1323 1304 } 1324 1305 error = 0; 1325 1306 larr[leaf++] = bh; ··· 1331 1312 BUG_ON(entries2 != entries); 1332 1313 error = do_filldir_main(ip, offset, opaque, filldir, darr, 1333 1314 entries, copied); 1334 - out_kfree: 1315 + out_free: 1335 1316 for(i = 0; i < leaf; i++) 1336 1317 brelse(larr[i]); 1337 - vfree(larr); 1318 + gfs2_free_sort_buffer(larr); 1338 1319 out: 1339 1320 return error; 1340 1321 }
+11 -2
fs/nfs/file.c
··· 27 27 #include <linux/pagemap.h> 28 28 #include <linux/aio.h> 29 29 #include <linux/gfp.h> 30 + #include <linux/swap.h> 30 31 31 32 #include <asm/uaccess.h> 32 33 #include <asm/system.h> ··· 494 493 */ 495 494 static int nfs_release_page(struct page *page, gfp_t gfp) 496 495 { 496 + struct address_space *mapping = page->mapping; 497 + 497 498 dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page); 498 499 499 500 /* Only do I/O if gfp is a superset of GFP_KERNEL */ 500 - if ((gfp & GFP_KERNEL) == GFP_KERNEL) 501 - nfs_wb_page(page->mapping->host, page); 501 + if (mapping && (gfp & GFP_KERNEL) == GFP_KERNEL) { 502 + int how = FLUSH_SYNC; 503 + 504 + /* Don't let kswapd deadlock waiting for OOM RPC calls */ 505 + if (current_is_kswapd()) 506 + how = 0; 507 + nfs_commit_inode(mapping->host, how); 508 + } 502 509 /* If PagePrivate() is set, then the page is not freeable */ 503 510 if (PagePrivate(page)) 504 511 return 0;
+1 -1
fs/nfs/nfsroot.c
··· 105 105 static __be32 servaddr __initdata = 0; 106 106 107 107 /* Name of directory to mount */ 108 - static char nfs_export_path[NFS_MAXPATHLEN] __initdata = { 0, }; 108 + static char nfs_export_path[NFS_MAXPATHLEN + 1] __initdata = { 0, }; 109 109 110 110 /* NFS-related data */ 111 111 static struct nfs_mount_data nfs_data __initdata = { 0, };/* NFS mount info */
+18 -12
fs/nfs/write.c
··· 222 222 clear_bdi_congested(&nfss->backing_dev_info, BLK_RW_ASYNC); 223 223 } 224 224 225 - static struct nfs_page *nfs_find_and_lock_request(struct page *page) 225 + static struct nfs_page *nfs_find_and_lock_request(struct page *page, bool nonblock) 226 226 { 227 227 struct inode *inode = page->mapping->host; 228 228 struct nfs_page *req; ··· 241 241 * request as dirty (in which case we don't care). 242 242 */ 243 243 spin_unlock(&inode->i_lock); 244 - ret = nfs_wait_on_request(req); 244 + if (!nonblock) 245 + ret = nfs_wait_on_request(req); 246 + else 247 + ret = -EAGAIN; 245 248 nfs_release_request(req); 246 249 if (ret != 0) 247 250 return ERR_PTR(ret); ··· 259 256 * May return an error if the user signalled nfs_wait_on_request(). 260 257 */ 261 258 static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio, 262 - struct page *page) 259 + struct page *page, bool nonblock) 263 260 { 264 261 struct nfs_page *req; 265 262 int ret = 0; 266 263 267 - req = nfs_find_and_lock_request(page); 264 + req = nfs_find_and_lock_request(page, nonblock); 268 265 if (!req) 269 266 goto out; 270 267 ret = PTR_ERR(req); ··· 286 283 static int nfs_do_writepage(struct page *page, struct writeback_control *wbc, struct nfs_pageio_descriptor *pgio) 287 284 { 288 285 struct inode *inode = page->mapping->host; 286 + int ret; 289 287 290 288 nfs_inc_stats(inode, NFSIOS_VFSWRITEPAGE); 291 289 nfs_add_stats(inode, NFSIOS_WRITEPAGES, 1); 292 290 293 291 nfs_pageio_cond_complete(pgio, page->index); 294 - return nfs_page_async_flush(pgio, page); 292 + ret = nfs_page_async_flush(pgio, page, 293 + wbc->sync_mode == WB_SYNC_NONE || 294 + wbc->nonblocking != 0); 295 + if (ret == -EAGAIN) { 296 + redirty_page_for_writepage(wbc, page); 297 + ret = 0; 298 + } 299 + return ret; 295 300 } 296 301 297 302 /* ··· 1390 1379 .rpc_release = nfs_commit_release, 1391 1380 }; 1392 1381 1393 - static int nfs_commit_inode(struct inode *inode, int how) 1382 + int nfs_commit_inode(struct inode *inode, int how) 1394 1383 { 1395 1384 LIST_HEAD(head); 1396 1385 int may_wait = how & FLUSH_SYNC; ··· 1454 1443 return ret; 1455 1444 } 1456 1445 #else 1457 - static int nfs_commit_inode(struct inode *inode, int how) 1458 - { 1459 - return 0; 1460 - } 1461 - 1462 1446 static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_control *wbc) 1463 1447 { 1464 1448 return 0; ··· 1552 1546 1553 1547 nfs_fscache_release_page(page, GFP_KERNEL); 1554 1548 1555 - req = nfs_find_and_lock_request(page); 1549 + req = nfs_find_and_lock_request(page, false); 1556 1550 ret = PTR_ERR(req); 1557 1551 if (IS_ERR(req)) 1558 1552 goto out;
+1 -1
fs/proc/array.c
··· 176 176 if (tracer) 177 177 tpid = task_pid_nr_ns(tracer, ns); 178 178 } 179 - cred = get_cred((struct cred *) __task_cred(p)); 179 + cred = get_task_cred(p); 180 180 seq_printf(m, 181 181 "State:\t%s\n" 182 182 "Tgid:\t%d\n"
+20 -6
fs/sysfs/symlink.c
··· 28 28 struct sysfs_dirent *target_sd = NULL; 29 29 struct sysfs_dirent *sd = NULL; 30 30 struct sysfs_addrm_cxt acxt; 31 + enum kobj_ns_type ns_type; 31 32 int error; 32 33 33 34 BUG_ON(!name); ··· 59 58 if (!sd) 60 59 goto out_put; 61 60 62 - if (sysfs_ns_type(parent_sd)) 61 + ns_type = sysfs_ns_type(parent_sd); 62 + if (ns_type) 63 63 sd->s_ns = target->ktype->namespace(target); 64 64 sd->s_symlink.target_sd = target_sd; 65 65 target_sd = NULL; /* reference is now owned by the symlink */ 66 66 67 67 sysfs_addrm_start(&acxt, parent_sd); 68 - if (warn) 69 - error = sysfs_add_one(&acxt, sd); 70 - else 71 - error = __sysfs_add_one(&acxt, sd); 68 + /* Symlinks must be between directories with the same ns_type */ 69 + if (!ns_type || 70 + (ns_type == sysfs_ns_type(sd->s_symlink.target_sd->s_parent))) { 71 + if (warn) 72 + error = sysfs_add_one(&acxt, sd); 73 + else 74 + error = __sysfs_add_one(&acxt, sd); 75 + } else { 76 + error = -EINVAL; 77 + WARN(1, KERN_WARNING 78 + "sysfs: symlink across ns_types %s/%s -> %s/%s\n", 79 + parent_sd->s_name, 80 + sd->s_name, 81 + sd->s_symlink.target_sd->s_parent->s_name, 82 + sd->s_symlink.target_sd->s_name); 83 + } 72 84 sysfs_addrm_finish(&acxt); 73 85 74 86 if (error) ··· 136 122 { 137 123 const void *ns = NULL; 138 124 spin_lock(&sysfs_assoc_lock); 139 - if (targ->sd) 125 + if (targ->sd && sysfs_ns_type(kobj->sd)) 140 126 ns = targ->sd->s_ns; 141 127 spin_unlock(&sysfs_assoc_lock); 142 128 sysfs_hash_and_remove(kobj->sd, ns, name);
+2 -1
include/acpi/processor.h
··· 48 48 u8 space_id; 49 49 u8 bit_width; 50 50 u8 bit_offset; 51 - u8 reserved; 51 + u8 access_size; 52 52 u64 address; 53 53 } __attribute__ ((packed)); 54 54 ··· 63 63 u32 power; 64 64 u32 usage; 65 65 u64 time; 66 + u8 bm_sts_skip; 66 67 char desc[ACPI_CX_DESC_LEN]; 67 68 }; 68 69
+11 -1
include/asm-generic/vmlinux.lds.h
··· 63 63 /* Align . to a 8 byte boundary equals to maximum function alignment. */ 64 64 #define ALIGN_FUNCTION() . = ALIGN(8) 65 65 66 + /* 67 + * Align to a 32 byte boundary equal to the 68 + * alignment gcc 4.5 uses for a struct 69 + */ 70 + #define STRUCT_ALIGN() . = ALIGN(32) 71 + 66 72 /* The actual configuration determine if the init/exit sections 67 73 * are handled as text/data or they can be discarded (which 68 74 * often happens at runtime) ··· 168 162 LIKELY_PROFILE() \ 169 163 BRANCH_PROFILE() \ 170 164 TRACE_PRINTKS() \ 165 + \ 166 + STRUCT_ALIGN(); \ 171 167 FTRACE_EVENTS() \ 168 + \ 169 + STRUCT_ALIGN(); \ 172 170 TRACE_SYSCALLS() 173 171 174 172 /* ··· 441 431 */ 442 432 #define INIT_TASK_DATA_SECTION(align) \ 443 433 . = ALIGN(align); \ 444 - .data..init_task : { \ 434 + .data..init_task : AT(ADDR(.data..init_task) - LOAD_OFFSET) { \ 445 435 INIT_TASK_DATA(align) \ 446 436 } 447 437
+1 -1
include/linux/acpi.h
··· 253 253 #ifdef CONFIG_PM_SLEEP 254 254 void __init acpi_no_s4_hw_signature(void); 255 255 void __init acpi_old_suspend_ordering(void); 256 - void __init acpi_s4_no_nvs(void); 256 + void __init acpi_nvs_nosave(void); 257 257 #endif /* CONFIG_PM_SLEEP */ 258 258 259 259 struct acpi_osc_context {
+11 -25
include/linux/cred.h
··· 153 153 extern void __put_cred(struct cred *); 154 154 extern void exit_creds(struct task_struct *); 155 155 extern int copy_creds(struct task_struct *, unsigned long); 156 + extern const struct cred *get_task_cred(struct task_struct *); 156 157 extern struct cred *cred_alloc_blank(void); 157 158 extern struct cred *prepare_creds(void); 158 159 extern struct cred *prepare_exec_creds(void); ··· 274 273 * @task: The task to query 275 274 * 276 275 * Access the objective credentials of a task. The caller must hold the RCU 277 - * readlock. 276 + * readlock or the task must be dead and unable to change its own credentials. 278 277 * 279 - * The caller must make sure task doesn't go away, either by holding a ref on 280 - * task or by holding tasklist_lock to prevent it from being unlinked. 278 + * The result of this function should not be passed directly to get_cred(); 279 + * rather get_task_cred() should be used instead. 281 280 */ 282 - #define __task_cred(task) \ 283 - ((const struct cred *)(rcu_dereference_check((task)->real_cred, rcu_read_lock_held() || lockdep_tasklist_lock_is_held()))) 284 - 285 - /** 286 - * get_task_cred - Get another task's objective credentials 287 - * @task: The task to query 288 - * 289 - * Get the objective credentials of a task, pinning them so that they can't go 290 - * away. Accessing a task's credentials directly is not permitted. 291 - * 292 - * The caller must make sure task doesn't go away, either by holding a ref on 293 - * task or by holding tasklist_lock to prevent it from being unlinked. 294 - */ 295 - #define get_task_cred(task) \ 296 - ({ \ 297 - struct cred *__cred; \ 298 - rcu_read_lock(); \ 299 - __cred = (struct cred *) __task_cred((task)); \ 300 - get_cred(__cred); \ 301 - rcu_read_unlock(); \ 302 - __cred; \ 303 - }) 281 + #define __task_cred(task) \ 282 + ({ \ 283 + const struct task_struct *__t = (task); \ 284 + rcu_dereference_check(__t->real_cred, \ 285 + rcu_read_lock_held() || \ 286 + task_is_dead(__t)); \ 287 + }) 304 288 305 289 /** 306 290 * get_current_cred - Get the current task's subjective credentials
+2
include/linux/if_macvlan.h
··· 67 67 } 68 68 } 69 69 70 + extern void macvlan_common_setup(struct net_device *dev); 71 + 70 72 extern int macvlan_common_newlink(struct net *src_net, struct net_device *dev, 71 73 struct nlattr *tb[], struct nlattr *data[], 72 74 int (*receive)(struct sk_buff *skb),
+7
include/linux/nfs_fs.h
··· 493 493 extern int nfs_wb_page(struct inode *inode, struct page* page); 494 494 extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); 495 495 #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) 496 + extern int nfs_commit_inode(struct inode *, int); 496 497 extern struct nfs_write_data *nfs_commitdata_alloc(void); 497 498 extern void nfs_commit_free(struct nfs_write_data *wdata); 499 + #else 500 + static inline int 501 + nfs_commit_inode(struct inode *inode, int how) 502 + { 503 + return 0; 504 + } 498 505 #endif 499 506 500 507 static inline int
+32
include/linux/regulator/tps6507x.h
··· 1 + /* 2 + * tps6507x.h -- Voltage regulation for the Texas Instruments TPS6507X 3 + * 4 + * Copyright (C) 2010 Texas Instruments, Inc. 5 + * 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License version 2 as 8 + * published by the Free Software Foundation 9 + * 10 + * This program is distributed in the hope that it will be useful, 11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 + * GNU General Public License for more details. 14 + * 15 + * You should have received a copy of the GNU General Public License 16 + * along with this program; if not, write to the Free Software 17 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 + */ 19 + 20 + #ifndef REGULATOR_TPS6507X 21 + #define REGULATOR_TPS6507X 22 + 23 + /** 24 + * tps6507x_reg_platform_data - platform data for tps6507x 25 + * @defdcdc_default: Defines whether DCDC high or the low register controls 26 + * output voltage by default. Valid for DCDC2 and DCDC3 outputs only. 27 + */ 28 + struct tps6507x_reg_platform_data { 29 + bool defdcdc_default; 30 + }; 31 + 32 + #endif
+1
include/linux/sched.h
··· 214 214 215 215 #define task_is_traced(task) ((task->state & __TASK_TRACED) != 0) 216 216 #define task_is_stopped(task) ((task->state & __TASK_STOPPED) != 0) 217 + #define task_is_dead(task) ((task)->exit_state != 0) 217 218 #define task_is_stopped_or_traced(task) \ 218 219 ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) 219 220 #define task_contributes_to_load(task) \
+1
include/linux/sysrq.h
··· 45 45 */ 46 46 47 47 void handle_sysrq(int key, struct tty_struct *tty); 48 + void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); 48 49 int register_sysrq_key(int key, struct sysrq_key_op *op); 49 50 int unregister_sysrq_key(int key, struct sysrq_key_op *op); 50 51 struct sysrq_key_op *__sysrq_get_key_op(int key);
+1
include/net/tc_act/tc_mirred.h
··· 9 9 int tcfm_ifindex; 10 10 int tcfm_ok_push; 11 11 struct net_device *tcfm_dev; 12 + struct list_head tcfm_list; 12 13 }; 13 14 #define to_mirred(pc) \ 14 15 container_of(pc, struct tcf_mirred, common)
+25
kernel/cred.c
··· 209 209 } 210 210 } 211 211 212 + /** 213 + * get_task_cred - Get another task's objective credentials 214 + * @task: The task to query 215 + * 216 + * Get the objective credentials of a task, pinning them so that they can't go 217 + * away. Accessing a task's credentials directly is not permitted. 218 + * 219 + * The caller must also make sure task doesn't get deleted, either by holding a 220 + * ref on task or by holding tasklist_lock to prevent it from being unlinked. 221 + */ 222 + const struct cred *get_task_cred(struct task_struct *task) 223 + { 224 + const struct cred *cred; 225 + 226 + rcu_read_lock(); 227 + 228 + do { 229 + cred = __task_cred((task)); 230 + BUG_ON(!cred); 231 + } while (!atomic_inc_not_zero(&((struct cred *)cred)->usage)); 232 + 233 + rcu_read_unlock(); 234 + return cred; 235 + } 236 + 212 237 /* 213 238 * Allocate blank credentials, such that the credentials can be filled in at a 214 239 * later date without risk of ENOMEM.
+1 -1
kernel/debug/debug_core.c
··· 605 605 if (dbg_kdb_mode) { 606 606 kgdb_connected = 1; 607 607 error = kdb_stub(ks); 608 + kgdb_connected = 0; 608 609 } else { 609 610 error = gdb_serial_stub(ks); 610 611 } 611 612 612 613 if (error == DBG_PASS_EVENT) { 613 614 dbg_kdb_mode = !dbg_kdb_mode; 614 - kgdb_connected = 0; 615 615 } else if (error == DBG_SWITCH_CPU_EVENT) { 616 616 dbg_cpu_switch(cpu, dbg_switch_cpu); 617 617 goto cpu_loop;
+3 -6
kernel/debug/gdbstub.c
··· 621 621 switch (remcom_in_buffer[1]) { 622 622 case 's': 623 623 case 'f': 624 - if (memcmp(remcom_in_buffer + 2, "ThreadInfo", 10)) { 625 - error_packet(remcom_out_buffer, -EINVAL); 624 + if (memcmp(remcom_in_buffer + 2, "ThreadInfo", 10)) 626 625 break; 627 - } 628 626 629 627 i = 0; 630 628 remcom_out_buffer[0] = 'm'; ··· 663 665 pack_threadid(remcom_out_buffer + 2, thref); 664 666 break; 665 667 case 'T': 666 - if (memcmp(remcom_in_buffer + 1, "ThreadExtraInfo,", 16)) { 667 - error_packet(remcom_out_buffer, -EINVAL); 668 + if (memcmp(remcom_in_buffer + 1, "ThreadExtraInfo,", 16)) 668 669 break; 669 - } 670 + 670 671 ks->threadid = 0; 671 672 ptr = remcom_in_buffer + 17; 672 673 kgdb_hex2long(&ptr, &ks->threadid);
+5 -2
kernel/debug/kdb/kdb_main.c
··· 1820 1820 { 1821 1821 if (argc != 1) 1822 1822 return KDB_ARGCOUNT; 1823 - sysrq_toggle_support(1); 1824 1823 kdb_trap_printk++; 1825 - handle_sysrq(*argv[1], NULL); 1824 + __handle_sysrq(*argv[1], NULL, 0); 1826 1825 kdb_trap_printk--; 1827 1826 1828 1827 return 0; ··· 1882 1883 kdb_printf(" (Loading)"); 1883 1884 else 1884 1885 kdb_printf(" (Live)"); 1886 + kdb_printf(" 0x%p", mod->module_core); 1885 1887 1886 1888 #ifdef CONFIG_MODULE_UNLOAD 1887 1889 { ··· 2290 2290 2291 2291 while (va) { 2292 2292 char buf[80]; 2293 + 2294 + if (KDB_FLAG(CMD_INTERRUPT)) 2295 + return 0; 2293 2296 2294 2297 sprintf(buf, "%s " kdb_machreg_fmt "\n", command, va); 2295 2298 diag = kdb_parse(buf);
+3 -1
kernel/module.c
··· 787 787 788 788 /* Store the name of the last unloaded module for diagnostic purposes */ 789 789 strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module)); 790 - ddebug_remove_module(mod->name); 791 790 792 791 free_module(mod); 793 792 return 0; ··· 1548 1549 remove_notes_attrs(mod); 1549 1550 remove_sect_attrs(mod); 1550 1551 mod_kobject_remove(mod); 1552 + 1553 + /* Remove dynamic debug info */ 1554 + ddebug_remove_module(mod->name); 1551 1555 1552 1556 /* Arch-specific cleanup. */ 1553 1557 module_arch_cleanup(mod);
+13 -3
mm/memory.c
··· 1394 1394 return i ? : -EFAULT; 1395 1395 } 1396 1396 if (pages) { 1397 - struct page *page = vm_normal_page(gate_vma, start, *pte); 1397 + struct page *page; 1398 + 1399 + page = vm_normal_page(gate_vma, start, *pte); 1400 + if (!page) { 1401 + if (!(gup_flags & FOLL_DUMP) && 1402 + is_zero_pfn(pte_pfn(*pte))) 1403 + page = pte_page(*pte); 1404 + else { 1405 + pte_unmap(pte); 1406 + return i ? : -EFAULT; 1407 + } 1408 + } 1398 1409 pages[i] = page; 1399 - if (page) 1400 - get_page(page); 1410 + get_page(page); 1401 1411 } 1402 1412 pte_unmap(pte); 1403 1413 if (vmas)
+1
net/core/dev.c
··· 1488 1488 int dev_forward_skb(struct net_device *dev, struct sk_buff *skb) 1489 1489 { 1490 1490 skb_orphan(skb); 1491 + nf_reset(skb); 1491 1492 1492 1493 if (!(dev->flags & IFF_UP) || 1493 1494 (skb->len > (dev->mtu + dev->hard_header_len))) {
+5 -2
net/core/skbuff.c
··· 843 843 skb->network_header += off; 844 844 if (skb_mac_header_was_set(skb)) 845 845 skb->mac_header += off; 846 - skb->csum_start += nhead; 846 + /* Only adjust this if it actually is csum_start rather than csum */ 847 + if (skb->ip_summed == CHECKSUM_PARTIAL) 848 + skb->csum_start += nhead; 847 849 skb->cloned = 0; 848 850 skb->hdr_len = 0; 849 851 skb->nohdr = 0; ··· 932 930 copy_skb_header(n, skb); 933 931 934 932 off = newheadroom - oldheadroom; 935 - n->csum_start += off; 933 + if (n->ip_summed == CHECKSUM_PARTIAL) 934 + n->csum_start += off; 936 935 #ifdef NET_SKBUFF_DATA_USES_OFFSET 937 936 n->transport_header += off; 938 937 n->network_header += off;
+9 -5
net/ipv6/addrconf.c
··· 1760 1760 1761 1761 idev = ipv6_find_idev(dev); 1762 1762 if (!idev) 1763 - return NULL; 1763 + return ERR_PTR(-ENOBUFS); 1764 + 1765 + if (idev->cnf.disable_ipv6) 1766 + return ERR_PTR(-EACCES); 1764 1767 1765 1768 /* Add default multicast route */ 1766 1769 addrconf_add_mroute(dev); ··· 2132 2129 if (!dev) 2133 2130 return -ENODEV; 2134 2131 2135 - if ((idev = addrconf_add_dev(dev)) == NULL) 2136 - return -ENOBUFS; 2132 + idev = addrconf_add_dev(dev); 2133 + if (IS_ERR(idev)) 2134 + return PTR_ERR(idev); 2137 2135 2138 2136 scope = ipv6_addr_scope(pfx); 2139 2137 ··· 2381 2377 } 2382 2378 2383 2379 idev = addrconf_add_dev(dev); 2384 - if (idev == NULL) 2380 + if (IS_ERR(idev)) 2385 2381 return; 2386 2382 2387 2383 memset(&addr, 0, sizeof(struct in6_addr)); ··· 2472 2468 ASSERT_RTNL(); 2473 2469 2474 2470 idev = addrconf_add_dev(dev); 2475 - if (!idev) { 2471 + if (IS_ERR(idev)) { 2476 2472 printk(KERN_DEBUG "init ip6-ip6: add_dev failed\n"); 2477 2473 return; 2478 2474 }
+1 -1
net/mac80211/cfg.c
··· 632 632 skb->dev = sta->sdata->dev; 633 633 skb->protocol = eth_type_trans(skb, sta->sdata->dev); 634 634 memset(skb->cb, 0, sizeof(skb->cb)); 635 - netif_rx(skb); 635 + netif_rx_ni(skb); 636 636 } 637 637 638 638 static void sta_apply_parameters(struct ieee80211_local *local,
+40 -3
net/sched/act_mirred.c
··· 33 33 static struct tcf_common *tcf_mirred_ht[MIRRED_TAB_MASK + 1]; 34 34 static u32 mirred_idx_gen; 35 35 static DEFINE_RWLOCK(mirred_lock); 36 + static LIST_HEAD(mirred_list); 36 37 37 38 static struct tcf_hashinfo mirred_hash_info = { 38 39 .htab = tcf_mirred_ht, ··· 48 47 m->tcf_bindcnt--; 49 48 m->tcf_refcnt--; 50 49 if(!m->tcf_bindcnt && m->tcf_refcnt <= 0) { 51 - dev_put(m->tcfm_dev); 50 + list_del(&m->tcfm_list); 51 + if (m->tcfm_dev) 52 + dev_put(m->tcfm_dev); 52 53 tcf_hash_destroy(&m->common, &mirred_hash_info); 53 54 return 1; 54 55 } ··· 137 134 m->tcfm_ok_push = ok_push; 138 135 } 139 136 spin_unlock_bh(&m->tcf_lock); 140 - if (ret == ACT_P_CREATED) 137 + if (ret == ACT_P_CREATED) { 138 + list_add(&m->tcfm_list, &mirred_list); 141 139 tcf_hash_insert(pc, &mirred_hash_info); 140 + } 142 141 143 142 return ret; 144 143 } ··· 167 162 m->tcf_tm.lastuse = jiffies; 168 163 169 164 dev = m->tcfm_dev; 165 + if (!dev) { 166 + printk_once(KERN_NOTICE "tc mirred: target device is gone\n"); 167 + goto out; 168 + } 169 + 170 170 if (!(dev->flags & IFF_UP)) { 171 171 if (net_ratelimit()) 172 - pr_notice("tc mirred to Houston: device %s is gone!\n", 172 + pr_notice("tc mirred to Houston: device %s is down\n", 173 173 dev->name); 174 174 goto out; 175 175 } ··· 242 232 return -1; 243 233 } 244 234 235 + static int mirred_device_event(struct notifier_block *unused, 236 + unsigned long event, void *ptr) 237 + { 238 + struct net_device *dev = ptr; 239 + struct tcf_mirred *m; 240 + 241 + if (event == NETDEV_UNREGISTER) 242 + list_for_each_entry(m, &mirred_list, tcfm_list) { 243 + if (m->tcfm_dev == dev) { 244 + dev_put(dev); 245 + m->tcfm_dev = NULL; 246 + } 247 + } 248 + 249 + return NOTIFY_DONE; 250 + } 251 + 252 + static struct notifier_block mirred_device_notifier = { 253 + .notifier_call = mirred_device_event, 254 + }; 255 + 256 + 245 257 static struct tc_action_ops act_mirred_ops = { 246 258 .kind = "mirred", 247 259 .hinfo = &mirred_hash_info, ··· 284 252 285 253 static int __init mirred_init_module(void) 286 254 { 255 + int err = register_netdevice_notifier(&mirred_device_notifier); 256 + if (err) 257 + return err; 258 + 287 259 pr_info("Mirror/redirect action on\n"); 288 260 return tcf_register_action(&act_mirred_ops); 289 261 } 290 262 291 263 static void __exit mirred_cleanup_module(void) 292 264 { 265 + unregister_netdevice_notifier(&mirred_device_notifier); 293 266 tcf_unregister_action(&act_mirred_ops); 294 267 } 295 268
+1 -1
scripts/kconfig/nconf.gui.c
··· 226 226 int len = get_line_length(line); 227 227 strncpy(tmp, line, min(len, x)); 228 228 tmp[len] = '\0'; 229 - mvwprintw(win, i, 0, tmp); 229 + mvwprintw(win, i, 0, "%s", tmp); 230 230 } 231 231 } 232 232
+1 -1
scripts/package/Makefile
··· 44 44 fi 45 45 $(MAKE) clean 46 46 $(PREV) ln -sf $(srctree) $(KERNELPATH) 47 - $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --scm-only > $(objtree)/.scmversion 47 + $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --save-scmversion 48 48 $(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/. 49 49 $(PREV) rm $(KERNELPATH) 50 50 rm -f $(objtree)/.scmversion
+10 -6
scripts/setlocalversion
··· 10 10 # 11 11 12 12 usage() { 13 - echo "Usage: $0 [--scm-only] [srctree]" >&2 13 + echo "Usage: $0 [--save-scmversion] [srctree]" >&2 14 14 exit 1 15 15 } 16 16 17 17 scm_only=false 18 18 srctree=. 19 - if test "$1" = "--scm-only"; then 19 + if test "$1" = "--save-scmversion"; then 20 20 scm_only=true 21 21 shift 22 22 fi ··· 30 30 31 31 scm_version() 32 32 { 33 - local short=false 33 + local short 34 + short=false 34 35 35 36 cd "$srctree" 36 37 if test -e .scmversion; then 37 - cat "$_" 38 + cat .scmversion 38 39 return 39 40 fi 40 41 if test "$1" = "--short"; then ··· 132 131 } 133 132 134 133 if $scm_only; then 135 - scm_version 134 + if test ! -e .scmversion; then 135 + res=$(scm_version) 136 + echo "$res" >.scmversion 137 + fi 136 138 exit 137 139 fi 138 140 139 141 if test -e include/config/auto.conf; then 140 - source "$_" 142 + . include/config/auto.conf 141 143 else 142 144 echo "Error: kernelrelease not valid - run 'make prepare' to update it" 143 145 exit 1
+13
sound/pci/hda/patch_hdmi.c
··· 52 52 */ 53 53 struct hda_multi_out multiout; 54 54 unsigned int codec_type; 55 + 56 + /* misc flags */ 57 + /* PD bit indicates only the update, not the current state */ 58 + unsigned int old_pin_detect:1; 55 59 }; 56 60 57 61 ··· 620 616 * Unsolicited events 621 617 */ 622 618 619 + static void hdmi_present_sense(struct hda_codec *codec, hda_nid_t pin_nid, 620 + struct hdmi_eld *eld); 621 + 623 622 static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res) 624 623 { 625 624 struct hdmi_spec *spec = codec->spec; ··· 638 631 index = hda_node_index(spec->pin, tag); 639 632 if (index < 0) 640 633 return; 634 + 635 + if (spec->old_pin_detect) { 636 + if (pind) 637 + hdmi_present_sense(codec, tag, &spec->sink_eld[index]); 638 + pind = spec->sink_eld[index].monitor_present; 639 + } 641 640 642 641 spec->sink_eld[index].monitor_present = pind; 643 642 spec->sink_eld[index].eld_valid = eldv;
+3
sound/pci/hda/patch_nvhdmi.c
··· 478 478 479 479 codec->spec = spec; 480 480 spec->codec_type = HDA_CODEC_NVIDIA_MCP89; 481 + spec->old_pin_detect = 1; 481 482 482 483 if (hdmi_parse_codec(codec) < 0) { 483 484 codec->spec = NULL; ··· 509 508 spec->multiout.max_channels = 8; 510 509 spec->multiout.dig_out_nid = nvhdmi_master_con_nid_7x; 511 510 spec->codec_type = HDA_CODEC_NVIDIA_MCP7X; 511 + spec->old_pin_detect = 1; 512 512 513 513 codec->patch_ops = nvhdmi_patch_ops_8ch_7x; 514 514 ··· 530 528 spec->multiout.max_channels = 2; 531 529 spec->multiout.dig_out_nid = nvhdmi_master_con_nid_7x; 532 530 spec->codec_type = HDA_CODEC_NVIDIA_MCP7X; 531 + spec->old_pin_detect = 1; 533 532 534 533 codec->patch_ops = nvhdmi_patch_ops_2ch; 535 534
+42 -20
sound/pci/hda/patch_realtek.c
··· 1267 1267 unsigned nid = 0; 1268 1268 struct alc_spec *spec = codec->spec; 1269 1269 1270 + spec->cdefine.enable_pcbeep = 1; /* assume always enabled */ 1271 + 1270 1272 ass = codec->subsystem_id & 0xffff; 1271 - if (ass != codec->bus->pci->subsystem_device && (ass & 1)) { 1272 - spec->cdefine.enable_pcbeep = 1; /* assume always enabled */ 1273 + if (ass != codec->bus->pci->subsystem_device && (ass & 1)) 1273 1274 goto do_sku; 1274 - } 1275 1275 1276 1276 nid = 0x1d; 1277 1277 if (codec->vendor_id == 0x10ec0260) ··· 5180 5180 #ifdef CONFIG_SND_HDA_INPUT_BEEP 5181 5181 #define set_beep_amp(spec, nid, idx, dir) \ 5182 5182 ((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir)) 5183 + 5184 + static struct snd_pci_quirk beep_white_list[] = { 5185 + SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1), 5186 + {} 5187 + }; 5188 + 5189 + static inline int has_cdefine_beep(struct hda_codec *codec) 5190 + { 5191 + struct alc_spec *spec = codec->spec; 5192 + const struct snd_pci_quirk *q; 5193 + q = snd_pci_quirk_lookup(codec->bus->pci, beep_white_list); 5194 + if (q) 5195 + return q->value; 5196 + return spec->cdefine.enable_pcbeep; 5197 + } 5183 5198 #else 5184 5199 #define set_beep_amp(spec, nid, idx, dir) /* NOP */ 5200 + #define has_cdefine_beep(codec) 0 5185 5201 #endif 5186 5202 5187 5203 /* ··· 10582 10566 } 10583 10567 } 10584 10568 10585 - err = snd_hda_attach_beep_device(codec, 0x1); 10586 - if (err < 0) { 10587 - alc_free(codec); 10588 - return err; 10569 + if (has_cdefine_beep(codec)) { 10570 + err = snd_hda_attach_beep_device(codec, 0x1); 10571 + if (err < 0) { 10572 + alc_free(codec); 10573 + return err; 10574 + } 10589 10575 } 10590 10576 10591 10577 if (board_config != ALC882_AUTO) ··· 10637 10619 10638 10620 set_capture_mixer(codec); 10639 10621 10640 - if (spec->cdefine.enable_pcbeep) 10622 + if (has_cdefine_beep(codec)) 10641 10623 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 10642 10624 10643 10625 if (board_config == ALC882_AUTO) ··· 12453 12435 } 12454 12436 } 12455 12437 12456 - if (!spec->no_analog) { 12438 + if (!spec->no_analog && has_cdefine_beep(codec)) { 12457 12439 err = snd_hda_attach_beep_device(codec, 0x1); 12458 12440 if (err < 0) { 12459 12441 alc_free(codec); ··· 12504 12486 } 12505 12487 if (!spec->cap_mixer && !spec->no_analog) 12506 12488 set_capture_mixer(codec); 12507 - if (!spec->no_analog && spec->cdefine.enable_pcbeep) 12489 + if (!spec->no_analog && has_cdefine_beep(codec)) 12508 12490 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 12509 12491 12510 12492 spec->vmaster_nid = 0x0c; ··· 14476 14458 } 14477 14459 } 14478 14460 14479 - err = snd_hda_attach_beep_device(codec, 0x1); 14480 - if (err < 0) { 14481 - alc_free(codec); 14482 - return err; 14461 + if (has_cdefine_beep(codec)) { 14462 + err = snd_hda_attach_beep_device(codec, 0x1); 14463 + if (err < 0) { 14464 + alc_free(codec); 14465 + return err; 14466 + } 14483 14467 } 14484 14468 14485 14469 if (board_config != ALC269_AUTO) ··· 14514 14494 14515 14495 if (!spec->cap_mixer) 14516 14496 set_capture_mixer(codec); 14517 - if (spec->cdefine.enable_pcbeep) 14497 + if (has_cdefine_beep(codec)) 14518 14498 set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); 14519 14499 14520 14500 if (board_config == ALC269_AUTO) ··· 18711 18691 } 18712 18692 } 18713 18693 18714 - err = snd_hda_attach_beep_device(codec, 0x1); 18715 - if (err < 0) { 18716 - alc_free(codec); 18717 - return err; 18694 + if (has_cdefine_beep(codec)) { 18695 + err = snd_hda_attach_beep_device(codec, 0x1); 18696 + if (err < 0) { 18697 + alc_free(codec); 18698 + return err; 18699 + } 18718 18700 } 18719 18701 18720 18702 if (board_config != ALC662_AUTO) ··· 18738 18716 if (!spec->cap_mixer) 18739 18717 set_capture_mixer(codec); 18740 18718 18741 - if (spec->cdefine.enable_pcbeep) { 18719 + if (has_cdefine_beep(codec)) { 18742 18720 switch (codec->vendor_id) { 18743 18721 case 0x10ec0662: 18744 18722 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
+1 -1
sound/soc/au1x/psc-i2s.c
··· 300 300 }; 301 301 EXPORT_SYMBOL(au1xpsc_i2s_dai); 302 302 303 - static int __init au1xpsc_i2s_drvprobe(struct platform_device *pdev) 303 + static int __devinit au1xpsc_i2s_drvprobe(struct platform_device *pdev) 304 304 { 305 305 struct resource *r; 306 306 unsigned long sel;
+6 -2
tools/perf/util/hist.c
··· 1050 1050 * Parse hexa addresses followed by ':' 1051 1051 */ 1052 1052 line_ip = strtoull(tmp, &tmp2, 16); 1053 - if (*tmp2 != ':' || tmp == tmp2) 1053 + if (*tmp2 != ':' || tmp == tmp2 || tmp2[1] == '\0') 1054 1054 line_ip = -1; 1055 1055 } 1056 1056 1057 1057 if (line_ip != -1) { 1058 - u64 start = map__rip_2objdump(self->ms.map, sym->start); 1058 + u64 start = map__rip_2objdump(self->ms.map, sym->start), 1059 + end = map__rip_2objdump(self->ms.map, sym->end); 1060 + 1059 1061 offset = line_ip - start; 1062 + if (offset < 0 || (u64)line_ip > end) 1063 + offset = -1; 1060 1064 } 1061 1065 1062 1066 objdump_line = objdump_line__new(offset, line);
+10 -7
tools/perf/util/symbol.c
··· 1525 1525 { 1526 1526 struct dirent *dent; 1527 1527 DIR *dir = opendir(dir_name); 1528 + int ret = 0; 1528 1529 1529 1530 if (!dir) { 1530 1531 pr_debug("%s: cannot open %s dir\n", __func__, dir_name); ··· 1548 1547 1549 1548 snprintf(path, sizeof(path), "%s/%s", 1550 1549 dir_name, dent->d_name); 1551 - if (map_groups__set_modules_path_dir(self, path) < 0) 1552 - goto failure; 1550 + ret = map_groups__set_modules_path_dir(self, path); 1551 + if (ret < 0) 1552 + goto out; 1553 1553 } else { 1554 1554 char *dot = strrchr(dent->d_name, '.'), 1555 1555 dso_name[PATH_MAX]; ··· 1571 1569 dir_name, dent->d_name); 1572 1570 1573 1571 long_name = strdup(path); 1574 - if (long_name == NULL) 1575 - goto failure; 1572 + if (long_name == NULL) { 1573 + ret = -1; 1574 + goto out; 1575 + } 1576 1576 dso__set_long_name(map->dso, long_name); 1577 1577 map->dso->lname_alloc = 1; 1578 1578 dso__kernel_module_get_build_id(map->dso, ""); 1579 1579 } 1580 1580 } 1581 1581 1582 - return 0; 1583 - failure: 1582 + out: 1584 1583 closedir(dir); 1585 - return -1; 1584 + return ret; 1586 1585 } 1587 1586 1588 1587 static char *get_kernel_version(const char *root_dir)