diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2009-08-27 11:05:47 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2009-08-27 11:06:24 -0400 |
| commit | 4152f93508b184a85a975810b2cc3dc5c597cf57 (patch) | |
| tree | 19dff39aa185f18ed662ab5802d1e873aea5ab44 | |
| parent | 6effcd92454ca5d7021b74f89fcac75209e146f9 (diff) | |
| parent | fa84e9eecfff478df2d00e94deb3fc40fe4634ad (diff) | |
Merge branch 'sched/clock' into x86/cleanups
Reason: The tsc init cleanup depends on sched_clock_init moving past
late_time_init.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
122 files changed, 1146 insertions, 918 deletions
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig index 0a1abb978d7e..af74cc2de8b6 100644 --- a/arch/arm/configs/kirkwood_defconfig +++ b/arch/arm/configs/kirkwood_defconfig | |||
| @@ -629,7 +629,7 @@ CONFIG_SCSI_LOWLEVEL=y | |||
| 629 | CONFIG_ATA=y | 629 | CONFIG_ATA=y |
| 630 | # CONFIG_ATA_NONSTANDARD is not set | 630 | # CONFIG_ATA_NONSTANDARD is not set |
| 631 | CONFIG_SATA_PMP=y | 631 | CONFIG_SATA_PMP=y |
| 632 | # CONFIG_SATA_AHCI is not set | 632 | CONFIG_SATA_AHCI=y |
| 633 | # CONFIG_SATA_SIL24 is not set | 633 | # CONFIG_SATA_SIL24 is not set |
| 634 | CONFIG_ATA_SFF=y | 634 | CONFIG_ATA_SFF=y |
| 635 | # CONFIG_SATA_SVW is not set | 635 | # CONFIG_SATA_SVW is not set |
diff --git a/arch/arm/mach-kirkwood/ts219-setup.c b/arch/arm/mach-kirkwood/ts219-setup.c index 01aa213c0a6f..ec1a64f263d2 100644 --- a/arch/arm/mach-kirkwood/ts219-setup.c +++ b/arch/arm/mach-kirkwood/ts219-setup.c | |||
| @@ -206,6 +206,15 @@ static void __init qnap_ts219_init(void) | |||
| 206 | 206 | ||
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | static int __init ts219_pci_init(void) | ||
| 210 | { | ||
| 211 | if (machine_is_ts219()) | ||
| 212 | kirkwood_pcie_init(); | ||
| 213 | |||
| 214 | return 0; | ||
| 215 | } | ||
| 216 | subsys_initcall(ts219_pci_init); | ||
| 217 | |||
| 209 | MACHINE_START(TS219, "QNAP TS-119/TS-219") | 218 | MACHINE_START(TS219, "QNAP TS-119/TS-219") |
| 210 | /* Maintainer: Martin Michlmayr <tbm@cyrius.com> */ | 219 | /* Maintainer: Martin Michlmayr <tbm@cyrius.com> */ |
| 211 | .phys_io = KIRKWOOD_REGS_PHYS_BASE, | 220 | .phys_io = KIRKWOOD_REGS_PHYS_BASE, |
diff --git a/arch/arm/plat-orion/include/plat/gpio.h b/arch/arm/plat-orion/include/plat/gpio.h index 9646a94ed3d0..07c430fdc9ef 100644 --- a/arch/arm/plat-orion/include/plat/gpio.h +++ b/arch/arm/plat-orion/include/plat/gpio.h | |||
| @@ -11,6 +11,8 @@ | |||
| 11 | #ifndef __PLAT_GPIO_H | 11 | #ifndef __PLAT_GPIO_H |
| 12 | #define __PLAT_GPIO_H | 12 | #define __PLAT_GPIO_H |
| 13 | 13 | ||
| 14 | #include <linux/init.h> | ||
| 15 | |||
| 14 | /* | 16 | /* |
| 15 | * GENERIC_GPIO primitives. | 17 | * GENERIC_GPIO primitives. |
| 16 | */ | 18 | */ |
diff --git a/arch/avr32/boards/favr-32/setup.c b/arch/avr32/boards/favr-32/setup.c index 46c9b0a224cf..75f19f47fb2f 100644 --- a/arch/avr32/boards/favr-32/setup.c +++ b/arch/avr32/boards/favr-32/setup.c | |||
| @@ -72,6 +72,10 @@ static struct ads7846_platform_data ads7843_data = { | |||
| 72 | .debounce_max = 20, | 72 | .debounce_max = 20, |
| 73 | .debounce_rep = 4, | 73 | .debounce_rep = 4, |
| 74 | .debounce_tol = 5, | 74 | .debounce_tol = 5, |
| 75 | |||
| 76 | .keep_vref_on = true, | ||
| 77 | .settle_delay_usecs = 500, | ||
| 78 | .penirq_recheck_delay_usecs = 100, | ||
| 75 | }; | 79 | }; |
| 76 | 80 | ||
| 77 | static struct spi_board_info __initdata spi1_board_info[] = { | 81 | static struct spi_board_info __initdata spi1_board_info[] = { |
diff --git a/arch/avr32/lib/memcpy.S b/arch/avr32/lib/memcpy.S index 0abb26142b64..c2ca49d705af 100644 --- a/arch/avr32/lib/memcpy.S +++ b/arch/avr32/lib/memcpy.S | |||
| @@ -24,8 +24,8 @@ memcpy: | |||
| 24 | brne 1f | 24 | brne 1f |
| 25 | 25 | ||
| 26 | /* At this point, "from" is word-aligned */ | 26 | /* At this point, "from" is word-aligned */ |
| 27 | 2: sub r10, 4 | 27 | 2: mov r9, r12 |
| 28 | mov r9, r12 | 28 | 5: sub r10, 4 |
| 29 | brlt 4f | 29 | brlt 4f |
| 30 | 30 | ||
| 31 | 3: ld.w r8, r11++ | 31 | 3: ld.w r8, r11++ |
| @@ -49,6 +49,7 @@ memcpy: | |||
| 49 | 49 | ||
| 50 | /* Handle unaligned "from" pointer */ | 50 | /* Handle unaligned "from" pointer */ |
| 51 | 1: sub r10, 4 | 51 | 1: sub r10, 4 |
| 52 | movlt r9, r12 | ||
| 52 | brlt 4b | 53 | brlt 4b |
| 53 | add r10, r9 | 54 | add r10, r9 |
| 54 | lsl r9, 2 | 55 | lsl r9, 2 |
| @@ -59,4 +60,13 @@ memcpy: | |||
| 59 | st.b r12++, r8 | 60 | st.b r12++, r8 |
| 60 | ld.ub r8, r11++ | 61 | ld.ub r8, r11++ |
| 61 | st.b r12++, r8 | 62 | st.b r12++, r8 |
| 62 | rjmp 2b | 63 | mov r8, r12 |
| 64 | add pc, pc, r9 | ||
| 65 | sub r8, 1 | ||
| 66 | nop | ||
| 67 | sub r8, 1 | ||
| 68 | nop | ||
| 69 | sub r8, 1 | ||
| 70 | nop | ||
| 71 | mov r9, r8 | ||
| 72 | rjmp 5b | ||
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c index 6e562751ad51..6c74751c7b82 100644 --- a/arch/m68k/amiga/config.c +++ b/arch/m68k/amiga/config.c | |||
| @@ -574,10 +574,11 @@ static int a2000_hwclk(int op, struct rtc_time *t) | |||
| 574 | 574 | ||
| 575 | tod_2000.cntrl1 = TOD2000_CNTRL1_HOLD; | 575 | tod_2000.cntrl1 = TOD2000_CNTRL1_HOLD; |
| 576 | 576 | ||
| 577 | while ((tod_2000.cntrl1 & TOD2000_CNTRL1_BUSY) && cnt--) { | 577 | while ((tod_2000.cntrl1 & TOD2000_CNTRL1_BUSY) && cnt) { |
| 578 | tod_2000.cntrl1 &= ~TOD2000_CNTRL1_HOLD; | 578 | tod_2000.cntrl1 &= ~TOD2000_CNTRL1_HOLD; |
| 579 | udelay(70); | 579 | udelay(70); |
| 580 | tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD; | 580 | tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD; |
| 581 | --cnt; | ||
| 581 | } | 582 | } |
| 582 | 583 | ||
| 583 | if (!cnt) | 584 | if (!cnt) |
| @@ -649,10 +650,11 @@ static int amiga_set_clock_mmss(unsigned long nowtime) | |||
| 649 | 650 | ||
| 650 | tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD; | 651 | tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD; |
| 651 | 652 | ||
| 652 | while ((tod_2000.cntrl1 & TOD2000_CNTRL1_BUSY) && cnt--) { | 653 | while ((tod_2000.cntrl1 & TOD2000_CNTRL1_BUSY) && cnt) { |
| 653 | tod_2000.cntrl1 &= ~TOD2000_CNTRL1_HOLD; | 654 | tod_2000.cntrl1 &= ~TOD2000_CNTRL1_HOLD; |
| 654 | udelay(70); | 655 | udelay(70); |
| 655 | tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD; | 656 | tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD; |
| 657 | --cnt; | ||
| 656 | } | 658 | } |
| 657 | 659 | ||
| 658 | if (!cnt) | 660 | if (!cnt) |
diff --git a/arch/m68k/include/asm/motorola_pgalloc.h b/arch/m68k/include/asm/motorola_pgalloc.h index 15ee4c74a9f0..2f02f264e694 100644 --- a/arch/m68k/include/asm/motorola_pgalloc.h +++ b/arch/m68k/include/asm/motorola_pgalloc.h | |||
| @@ -36,12 +36,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addres | |||
| 36 | return NULL; | 36 | return NULL; |
| 37 | 37 | ||
| 38 | pte = kmap(page); | 38 | pte = kmap(page); |
| 39 | if (pte) { | 39 | __flush_page_to_ram(pte); |
| 40 | __flush_page_to_ram(pte); | 40 | flush_tlb_kernel_page(pte); |
| 41 | flush_tlb_kernel_page(pte); | 41 | nocache_page(pte); |
| 42 | nocache_page(pte); | 42 | kunmap(page); |
| 43 | } | ||
| 44 | kunmap(pte); | ||
| 45 | pgtable_page_ctor(page); | 43 | pgtable_page_ctor(page); |
| 46 | return page; | 44 | return page; |
| 47 | } | 45 | } |
diff --git a/arch/m68k/include/asm/pgtable_mm.h b/arch/m68k/include/asm/pgtable_mm.h index 0b604f0f192d..fe60e1abaee8 100644 --- a/arch/m68k/include/asm/pgtable_mm.h +++ b/arch/m68k/include/asm/pgtable_mm.h | |||
| @@ -135,8 +135,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, | |||
| 135 | #endif | 135 | #endif |
| 136 | 136 | ||
| 137 | #ifndef __ASSEMBLY__ | 137 | #ifndef __ASSEMBLY__ |
| 138 | #include <asm-generic/pgtable.h> | ||
| 139 | |||
| 140 | /* | 138 | /* |
| 141 | * Macro to mark a page protection value as "uncacheable". | 139 | * Macro to mark a page protection value as "uncacheable". |
| 142 | */ | 140 | */ |
| @@ -154,6 +152,7 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, | |||
| 154 | ? (__pgprot((pgprot_val(prot) & _CACHEMASK040) | _PAGE_NOCACHE_S)) \ | 152 | ? (__pgprot((pgprot_val(prot) & _CACHEMASK040) | _PAGE_NOCACHE_S)) \ |
| 155 | : (prot))) | 153 | : (prot))) |
| 156 | 154 | ||
| 155 | #include <asm-generic/pgtable.h> | ||
| 157 | #endif /* !__ASSEMBLY__ */ | 156 | #endif /* !__ASSEMBLY__ */ |
| 158 | 157 | ||
| 159 | /* | 158 | /* |
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index aa29a8640f74..946d8691f2b0 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h | |||
| @@ -334,10 +334,12 @@ | |||
| 334 | #define __NR_inotify_init1 328 | 334 | #define __NR_inotify_init1 328 |
| 335 | #define __NR_preadv 329 | 335 | #define __NR_preadv 329 |
| 336 | #define __NR_pwritev 330 | 336 | #define __NR_pwritev 330 |
| 337 | #define __NR_rt_tgsigqueueinfo 331 | ||
| 338 | #define __NR_perf_counter_open 332 | ||
| 337 | 339 | ||
| 338 | #ifdef __KERNEL__ | 340 | #ifdef __KERNEL__ |
| 339 | 341 | ||
| 340 | #define NR_syscalls 331 | 342 | #define NR_syscalls 333 |
| 341 | 343 | ||
| 342 | #define __ARCH_WANT_IPC_PARSE_VERSION | 344 | #define __ARCH_WANT_IPC_PARSE_VERSION |
| 343 | #define __ARCH_WANT_OLD_READDIR | 345 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S index 8744f60c07a9..c3735cd6207e 100644 --- a/arch/m68k/kernel/entry.S +++ b/arch/m68k/kernel/entry.S | |||
| @@ -755,4 +755,6 @@ sys_call_table: | |||
| 755 | .long sys_inotify_init1 | 755 | .long sys_inotify_init1 |
| 756 | .long sys_preadv | 756 | .long sys_preadv |
| 757 | .long sys_pwritev /* 330 */ | 757 | .long sys_pwritev /* 330 */ |
| 758 | .long sys_rt_tgsigqueueinfo | ||
| 759 | .long sys_perf_counter_open | ||
| 758 | 760 | ||
diff --git a/arch/m68knommu/kernel/syscalltable.S b/arch/m68knommu/kernel/syscalltable.S index c0b8782832fd..0ae123e08985 100644 --- a/arch/m68knommu/kernel/syscalltable.S +++ b/arch/m68knommu/kernel/syscalltable.S | |||
| @@ -349,6 +349,8 @@ ENTRY(sys_call_table) | |||
| 349 | .long sys_inotify_init1 | 349 | .long sys_inotify_init1 |
| 350 | .long sys_preadv | 350 | .long sys_preadv |
| 351 | .long sys_pwritev /* 330 */ | 351 | .long sys_pwritev /* 330 */ |
| 352 | .long sys_rt_tgsigqueueinfo | ||
| 353 | .long sys_perf_counter_open | ||
| 352 | 354 | ||
| 353 | .rept NR_syscalls-(.-sys_call_table)/4 | 355 | .rept NR_syscalls-(.-sys_call_table)/4 |
| 354 | .long sys_ni_syscall | 356 | .long sys_ni_syscall |
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig index e28e65e7a0e1..7de127e4ceef 100644 --- a/arch/powerpc/configs/ps3_defconfig +++ b/arch/powerpc/configs/ps3_defconfig | |||
| @@ -1,13 +1,14 @@ | |||
| 1 | # | 1 | # |
| 2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
| 3 | # Linux kernel version: 2.6.30-rc5 | 3 | # Linux kernel version: 2.6.31-rc7 |
| 4 | # Fri May 15 10:37:00 2009 | 4 | # Mon Aug 24 17:38:50 2009 |
| 5 | # | 5 | # |
| 6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
| 7 | 7 | ||
| 8 | # | 8 | # |
| 9 | # Processor support | 9 | # Processor support |
| 10 | # | 10 | # |
| 11 | CONFIG_PPC_BOOK3S_64=y | ||
| 11 | CONFIG_PPC_BOOK3S=y | 12 | CONFIG_PPC_BOOK3S=y |
| 12 | # CONFIG_POWER4_ONLY is not set | 13 | # CONFIG_POWER4_ONLY is not set |
| 13 | CONFIG_POWER3=y | 14 | CONFIG_POWER3=y |
| @@ -20,6 +21,7 @@ CONFIG_PPC_STD_MMU=y | |||
| 20 | CONFIG_PPC_STD_MMU_64=y | 21 | CONFIG_PPC_STD_MMU_64=y |
| 21 | CONFIG_PPC_MM_SLICES=y | 22 | CONFIG_PPC_MM_SLICES=y |
| 22 | CONFIG_VIRT_CPU_ACCOUNTING=y | 23 | CONFIG_VIRT_CPU_ACCOUNTING=y |
| 24 | CONFIG_PPC_HAVE_PMU_SUPPORT=y | ||
| 23 | CONFIG_SMP=y | 25 | CONFIG_SMP=y |
| 24 | CONFIG_NR_CPUS=2 | 26 | CONFIG_NR_CPUS=2 |
| 25 | CONFIG_64BIT=y | 27 | CONFIG_64BIT=y |
| @@ -31,6 +33,7 @@ CONFIG_GENERIC_TIME=y | |||
| 31 | CONFIG_GENERIC_TIME_VSYSCALL=y | 33 | CONFIG_GENERIC_TIME_VSYSCALL=y |
| 32 | CONFIG_GENERIC_CLOCKEVENTS=y | 34 | CONFIG_GENERIC_CLOCKEVENTS=y |
| 33 | CONFIG_GENERIC_HARDIRQS=y | 35 | CONFIG_GENERIC_HARDIRQS=y |
| 36 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
| 34 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | 37 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y |
| 35 | CONFIG_IRQ_PER_CPU=y | 38 | CONFIG_IRQ_PER_CPU=y |
| 36 | CONFIG_STACKTRACE_SUPPORT=y | 39 | CONFIG_STACKTRACE_SUPPORT=y |
| @@ -41,7 +44,6 @@ CONFIG_RWSEM_XCHGADD_ALGORITHM=y | |||
| 41 | CONFIG_ARCH_HAS_ILOG2_U32=y | 44 | CONFIG_ARCH_HAS_ILOG2_U32=y |
| 42 | CONFIG_ARCH_HAS_ILOG2_U64=y | 45 | CONFIG_ARCH_HAS_ILOG2_U64=y |
| 43 | CONFIG_GENERIC_HWEIGHT=y | 46 | CONFIG_GENERIC_HWEIGHT=y |
| 44 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 45 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 47 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
| 46 | CONFIG_ARCH_NO_VIRT_TO_BUS=y | 48 | CONFIG_ARCH_NO_VIRT_TO_BUS=y |
| 47 | CONFIG_PPC=y | 49 | CONFIG_PPC=y |
| @@ -62,6 +64,7 @@ CONFIG_DTC=y | |||
| 62 | # CONFIG_PPC_DCR_MMIO is not set | 64 | # CONFIG_PPC_DCR_MMIO is not set |
| 63 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y | 65 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y |
| 64 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 66 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
| 67 | CONFIG_CONSTRUCTORS=y | ||
| 65 | 68 | ||
| 66 | # | 69 | # |
| 67 | # General setup | 70 | # General setup |
| @@ -113,7 +116,6 @@ CONFIG_SYSCTL_SYSCALL=y | |||
| 113 | CONFIG_KALLSYMS=y | 116 | CONFIG_KALLSYMS=y |
| 114 | CONFIG_KALLSYMS_ALL=y | 117 | CONFIG_KALLSYMS_ALL=y |
| 115 | CONFIG_KALLSYMS_EXTRA_PASS=y | 118 | CONFIG_KALLSYMS_EXTRA_PASS=y |
| 116 | # CONFIG_STRIP_ASM_SYMS is not set | ||
| 117 | CONFIG_HOTPLUG=y | 119 | CONFIG_HOTPLUG=y |
| 118 | CONFIG_PRINTK=y | 120 | CONFIG_PRINTK=y |
| 119 | CONFIG_BUG=y | 121 | CONFIG_BUG=y |
| @@ -126,7 +128,14 @@ CONFIG_TIMERFD=y | |||
| 126 | CONFIG_EVENTFD=y | 128 | CONFIG_EVENTFD=y |
| 127 | CONFIG_SHMEM=y | 129 | CONFIG_SHMEM=y |
| 128 | CONFIG_AIO=y | 130 | CONFIG_AIO=y |
| 131 | CONFIG_HAVE_PERF_COUNTERS=y | ||
| 132 | |||
| 133 | # | ||
| 134 | # Performance Counters | ||
| 135 | # | ||
| 136 | # CONFIG_PERF_COUNTERS is not set | ||
| 129 | CONFIG_VM_EVENT_COUNTERS=y | 137 | CONFIG_VM_EVENT_COUNTERS=y |
| 138 | # CONFIG_STRIP_ASM_SYMS is not set | ||
| 130 | # CONFIG_COMPAT_BRK is not set | 139 | # CONFIG_COMPAT_BRK is not set |
| 131 | CONFIG_SLAB=y | 140 | CONFIG_SLAB=y |
| 132 | # CONFIG_SLUB is not set | 141 | # CONFIG_SLUB is not set |
| @@ -145,6 +154,11 @@ CONFIG_HAVE_KRETPROBES=y | |||
| 145 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 154 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
| 146 | CONFIG_HAVE_DMA_ATTRS=y | 155 | CONFIG_HAVE_DMA_ATTRS=y |
| 147 | CONFIG_USE_GENERIC_SMP_HELPERS=y | 156 | CONFIG_USE_GENERIC_SMP_HELPERS=y |
| 157 | |||
| 158 | # | ||
| 159 | # GCOV-based kernel profiling | ||
| 160 | # | ||
| 161 | # CONFIG_GCOV_KERNEL is not set | ||
| 148 | # CONFIG_SLOW_WORK is not set | 162 | # CONFIG_SLOW_WORK is not set |
| 149 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 163 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
| 150 | CONFIG_SLABINFO=y | 164 | CONFIG_SLABINFO=y |
| @@ -210,7 +224,7 @@ CONFIG_PPC_CELL=y | |||
| 210 | # | 224 | # |
| 211 | # Cell Broadband Engine options | 225 | # Cell Broadband Engine options |
| 212 | # | 226 | # |
| 213 | CONFIG_SPU_FS=y | 227 | CONFIG_SPU_FS=m |
| 214 | CONFIG_SPU_FS_64K_LS=y | 228 | CONFIG_SPU_FS_64K_LS=y |
| 215 | # CONFIG_SPU_TRACE is not set | 229 | # CONFIG_SPU_TRACE is not set |
| 216 | CONFIG_SPU_BASE=y | 230 | CONFIG_SPU_BASE=y |
| @@ -255,6 +269,7 @@ CONFIG_BINFMT_MISC=y | |||
| 255 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y | 269 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y |
| 256 | # CONFIG_IOMMU_VMERGE is not set | 270 | # CONFIG_IOMMU_VMERGE is not set |
| 257 | CONFIG_IOMMU_HELPER=y | 271 | CONFIG_IOMMU_HELPER=y |
| 272 | # CONFIG_SWIOTLB is not set | ||
| 258 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | 273 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y |
| 259 | CONFIG_ARCH_HAS_WALK_MEMORY=y | 274 | CONFIG_ARCH_HAS_WALK_MEMORY=y |
| 260 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | 275 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y |
| @@ -285,9 +300,9 @@ CONFIG_MIGRATION=y | |||
| 285 | CONFIG_PHYS_ADDR_T_64BIT=y | 300 | CONFIG_PHYS_ADDR_T_64BIT=y |
| 286 | CONFIG_ZONE_DMA_FLAG=1 | 301 | CONFIG_ZONE_DMA_FLAG=1 |
| 287 | CONFIG_BOUNCE=y | 302 | CONFIG_BOUNCE=y |
| 288 | CONFIG_UNEVICTABLE_LRU=y | ||
| 289 | CONFIG_HAVE_MLOCK=y | 303 | CONFIG_HAVE_MLOCK=y |
| 290 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | 304 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y |
| 305 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
| 291 | CONFIG_ARCH_MEMORY_PROBE=y | 306 | CONFIG_ARCH_MEMORY_PROBE=y |
| 292 | CONFIG_PPC_HAS_HASH_64K=y | 307 | CONFIG_PPC_HAS_HASH_64K=y |
| 293 | CONFIG_PPC_4K_PAGES=y | 308 | CONFIG_PPC_4K_PAGES=y |
| @@ -399,6 +414,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y | |||
| 399 | # CONFIG_ECONET is not set | 414 | # CONFIG_ECONET is not set |
| 400 | # CONFIG_WAN_ROUTER is not set | 415 | # CONFIG_WAN_ROUTER is not set |
| 401 | # CONFIG_PHONET is not set | 416 | # CONFIG_PHONET is not set |
| 417 | # CONFIG_IEEE802154 is not set | ||
| 402 | # CONFIG_NET_SCHED is not set | 418 | # CONFIG_NET_SCHED is not set |
| 403 | # CONFIG_DCB is not set | 419 | # CONFIG_DCB is not set |
| 404 | 420 | ||
| @@ -433,11 +449,14 @@ CONFIG_BT_HCIBTUSB=m | |||
| 433 | CONFIG_WIRELESS=y | 449 | CONFIG_WIRELESS=y |
| 434 | CONFIG_CFG80211=m | 450 | CONFIG_CFG80211=m |
| 435 | # CONFIG_CFG80211_REG_DEBUG is not set | 451 | # CONFIG_CFG80211_REG_DEBUG is not set |
| 452 | # CONFIG_CFG80211_DEBUGFS is not set | ||
| 436 | # CONFIG_WIRELESS_OLD_REGULATORY is not set | 453 | # CONFIG_WIRELESS_OLD_REGULATORY is not set |
| 437 | CONFIG_WIRELESS_EXT=y | 454 | CONFIG_WIRELESS_EXT=y |
| 438 | # CONFIG_WIRELESS_EXT_SYSFS is not set | 455 | # CONFIG_WIRELESS_EXT_SYSFS is not set |
| 439 | # CONFIG_LIB80211 is not set | 456 | # CONFIG_LIB80211 is not set |
| 440 | CONFIG_MAC80211=m | 457 | CONFIG_MAC80211=m |
| 458 | CONFIG_MAC80211_DEFAULT_PS=y | ||
| 459 | CONFIG_MAC80211_DEFAULT_PS_VALUE=1 | ||
| 441 | 460 | ||
| 442 | # | 461 | # |
| 443 | # Rate control algorithm selection | 462 | # Rate control algorithm selection |
| @@ -447,7 +466,6 @@ CONFIG_MAC80211_RC_PID=y | |||
| 447 | CONFIG_MAC80211_RC_DEFAULT_PID=y | 466 | CONFIG_MAC80211_RC_DEFAULT_PID=y |
| 448 | # CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set | 467 | # CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set |
| 449 | CONFIG_MAC80211_RC_DEFAULT="pid" | 468 | CONFIG_MAC80211_RC_DEFAULT="pid" |
| 450 | # CONFIG_MAC80211_MESH is not set | ||
| 451 | # CONFIG_MAC80211_LEDS is not set | 469 | # CONFIG_MAC80211_LEDS is not set |
| 452 | # CONFIG_MAC80211_DEBUGFS is not set | 470 | # CONFIG_MAC80211_DEBUGFS is not set |
| 453 | # CONFIG_MAC80211_DEBUG_MENU is not set | 471 | # CONFIG_MAC80211_DEBUG_MENU is not set |
| @@ -472,77 +490,7 @@ CONFIG_EXTRA_FIRMWARE="" | |||
| 472 | # CONFIG_DEBUG_DEVRES is not set | 490 | # CONFIG_DEBUG_DEVRES is not set |
| 473 | # CONFIG_SYS_HYPERVISOR is not set | 491 | # CONFIG_SYS_HYPERVISOR is not set |
| 474 | # CONFIG_CONNECTOR is not set | 492 | # CONFIG_CONNECTOR is not set |
| 475 | CONFIG_MTD=y | 493 | # CONFIG_MTD is not set |
| 476 | CONFIG_MTD_DEBUG=y | ||
| 477 | CONFIG_MTD_DEBUG_VERBOSE=0 | ||
| 478 | # CONFIG_MTD_CONCAT is not set | ||
| 479 | # CONFIG_MTD_PARTITIONS is not set | ||
| 480 | # CONFIG_MTD_TESTS is not set | ||
| 481 | |||
| 482 | # | ||
| 483 | # User Modules And Translation Layers | ||
| 484 | # | ||
| 485 | # CONFIG_MTD_CHAR is not set | ||
| 486 | CONFIG_MTD_BLKDEVS=y | ||
| 487 | CONFIG_MTD_BLOCK=y | ||
| 488 | # CONFIG_FTL is not set | ||
| 489 | # CONFIG_NFTL is not set | ||
| 490 | # CONFIG_INFTL is not set | ||
| 491 | # CONFIG_RFD_FTL is not set | ||
| 492 | # CONFIG_SSFDC is not set | ||
| 493 | # CONFIG_MTD_OOPS is not set | ||
| 494 | |||
| 495 | # | ||
| 496 | # RAM/ROM/Flash chip drivers | ||
| 497 | # | ||
| 498 | # CONFIG_MTD_CFI is not set | ||
| 499 | # CONFIG_MTD_JEDECPROBE is not set | ||
| 500 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
| 501 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
| 502 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
| 503 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
| 504 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
| 505 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
| 506 | CONFIG_MTD_CFI_I1=y | ||
| 507 | CONFIG_MTD_CFI_I2=y | ||
| 508 | # CONFIG_MTD_CFI_I4 is not set | ||
| 509 | # CONFIG_MTD_CFI_I8 is not set | ||
| 510 | # CONFIG_MTD_RAM is not set | ||
| 511 | # CONFIG_MTD_ROM is not set | ||
| 512 | # CONFIG_MTD_ABSENT is not set | ||
| 513 | |||
| 514 | # | ||
| 515 | # Mapping drivers for chip access | ||
| 516 | # | ||
| 517 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
| 518 | # CONFIG_MTD_PLATRAM is not set | ||
| 519 | |||
| 520 | # | ||
| 521 | # Self-contained MTD device drivers | ||
| 522 | # | ||
| 523 | # CONFIG_MTD_SLRAM is not set | ||
| 524 | # CONFIG_MTD_PHRAM is not set | ||
| 525 | # CONFIG_MTD_MTDRAM is not set | ||
| 526 | # CONFIG_MTD_BLOCK2MTD is not set | ||
| 527 | |||
| 528 | # | ||
| 529 | # Disk-On-Chip Device Drivers | ||
| 530 | # | ||
| 531 | # CONFIG_MTD_DOC2000 is not set | ||
| 532 | # CONFIG_MTD_DOC2001 is not set | ||
| 533 | # CONFIG_MTD_DOC2001PLUS is not set | ||
| 534 | # CONFIG_MTD_NAND is not set | ||
| 535 | # CONFIG_MTD_ONENAND is not set | ||
| 536 | |||
| 537 | # | ||
| 538 | # LPDDR flash memory drivers | ||
| 539 | # | ||
| 540 | # CONFIG_MTD_LPDDR is not set | ||
| 541 | |||
| 542 | # | ||
| 543 | # UBI - Unsorted block images | ||
| 544 | # | ||
| 545 | # CONFIG_MTD_UBI is not set | ||
| 546 | CONFIG_OF_DEVICE=y | 494 | CONFIG_OF_DEVICE=y |
| 547 | # CONFIG_PARPORT is not set | 495 | # CONFIG_PARPORT is not set |
| 548 | CONFIG_BLK_DEV=y | 496 | CONFIG_BLK_DEV=y |
| @@ -590,10 +538,6 @@ CONFIG_BLK_DEV_SR=y | |||
| 590 | # CONFIG_BLK_DEV_SR_VENDOR is not set | 538 | # CONFIG_BLK_DEV_SR_VENDOR is not set |
| 591 | CONFIG_CHR_DEV_SG=m | 539 | CONFIG_CHR_DEV_SG=m |
| 592 | # CONFIG_CHR_DEV_SCH is not set | 540 | # CONFIG_CHR_DEV_SCH is not set |
| 593 | |||
| 594 | # | ||
| 595 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
| 596 | # | ||
| 597 | CONFIG_SCSI_MULTI_LUN=y | 541 | CONFIG_SCSI_MULTI_LUN=y |
| 598 | # CONFIG_SCSI_CONSTANTS is not set | 542 | # CONFIG_SCSI_CONSTANTS is not set |
| 599 | # CONFIG_SCSI_LOGGING is not set | 543 | # CONFIG_SCSI_LOGGING is not set |
| @@ -626,7 +570,6 @@ CONFIG_BLK_DEV_DM=m | |||
| 626 | # CONFIG_DM_UEVENT is not set | 570 | # CONFIG_DM_UEVENT is not set |
| 627 | # CONFIG_MACINTOSH_DRIVERS is not set | 571 | # CONFIG_MACINTOSH_DRIVERS is not set |
| 628 | CONFIG_NETDEVICES=y | 572 | CONFIG_NETDEVICES=y |
| 629 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
| 630 | # CONFIG_DUMMY is not set | 573 | # CONFIG_DUMMY is not set |
| 631 | # CONFIG_BONDING is not set | 574 | # CONFIG_BONDING is not set |
| 632 | # CONFIG_MACVLAN is not set | 575 | # CONFIG_MACVLAN is not set |
| @@ -646,10 +589,11 @@ CONFIG_MII=m | |||
| 646 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | 589 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set |
| 647 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | 590 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
| 648 | # CONFIG_B44 is not set | 591 | # CONFIG_B44 is not set |
| 592 | # CONFIG_KS8842 is not set | ||
| 649 | CONFIG_NETDEV_1000=y | 593 | CONFIG_NETDEV_1000=y |
| 650 | CONFIG_GELIC_NET=y | 594 | CONFIG_GELIC_NET=y |
| 651 | CONFIG_GELIC_WIRELESS=y | 595 | CONFIG_GELIC_WIRELESS=y |
| 652 | CONFIG_GELIC_WIRELESS_OLD_PSK_INTERFACE=y | 596 | # CONFIG_GELIC_WIRELESS_OLD_PSK_INTERFACE is not set |
| 653 | # CONFIG_NETDEV_10000 is not set | 597 | # CONFIG_NETDEV_10000 is not set |
| 654 | 598 | ||
| 655 | # | 599 | # |
| @@ -669,8 +613,7 @@ CONFIG_WLAN_80211=y | |||
| 669 | # CONFIG_HOSTAP is not set | 613 | # CONFIG_HOSTAP is not set |
| 670 | # CONFIG_B43 is not set | 614 | # CONFIG_B43 is not set |
| 671 | # CONFIG_B43LEGACY is not set | 615 | # CONFIG_B43LEGACY is not set |
| 672 | CONFIG_ZD1211RW=m | 616 | # CONFIG_ZD1211RW is not set |
| 673 | # CONFIG_ZD1211RW_DEBUG is not set | ||
| 674 | # CONFIG_RT2X00 is not set | 617 | # CONFIG_RT2X00 is not set |
| 675 | 618 | ||
| 676 | # | 619 | # |
| @@ -682,7 +625,7 @@ CONFIG_ZD1211RW=m | |||
| 682 | # | 625 | # |
| 683 | # CONFIG_USB_CATC is not set | 626 | # CONFIG_USB_CATC is not set |
| 684 | # CONFIG_USB_KAWETH is not set | 627 | # CONFIG_USB_KAWETH is not set |
| 685 | CONFIG_USB_PEGASUS=m | 628 | # CONFIG_USB_PEGASUS is not set |
| 686 | # CONFIG_USB_RTL8150 is not set | 629 | # CONFIG_USB_RTL8150 is not set |
| 687 | CONFIG_USB_USBNET=m | 630 | CONFIG_USB_USBNET=m |
| 688 | CONFIG_USB_NET_AX8817X=m | 631 | CONFIG_USB_NET_AX8817X=m |
| @@ -693,10 +636,11 @@ CONFIG_USB_NET_AX8817X=m | |||
| 693 | # CONFIG_USB_NET_GL620A is not set | 636 | # CONFIG_USB_NET_GL620A is not set |
| 694 | # CONFIG_USB_NET_NET1080 is not set | 637 | # CONFIG_USB_NET_NET1080 is not set |
| 695 | # CONFIG_USB_NET_PLUSB is not set | 638 | # CONFIG_USB_NET_PLUSB is not set |
| 696 | CONFIG_USB_NET_MCS7830=m | 639 | # CONFIG_USB_NET_MCS7830 is not set |
| 697 | # CONFIG_USB_NET_RNDIS_HOST is not set | 640 | # CONFIG_USB_NET_RNDIS_HOST is not set |
| 698 | # CONFIG_USB_NET_CDC_SUBSET is not set | 641 | # CONFIG_USB_NET_CDC_SUBSET is not set |
| 699 | # CONFIG_USB_NET_ZAURUS is not set | 642 | # CONFIG_USB_NET_ZAURUS is not set |
| 643 | # CONFIG_USB_NET_INT51X1 is not set | ||
| 700 | # CONFIG_WAN is not set | 644 | # CONFIG_WAN is not set |
| 701 | CONFIG_PPP=m | 645 | CONFIG_PPP=m |
| 702 | CONFIG_PPP_MULTILINK=y | 646 | CONFIG_PPP_MULTILINK=y |
| @@ -771,8 +715,7 @@ CONFIG_DEVKMEM=y | |||
| 771 | # | 715 | # |
| 772 | CONFIG_UNIX98_PTYS=y | 716 | CONFIG_UNIX98_PTYS=y |
| 773 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | 717 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set |
| 774 | CONFIG_LEGACY_PTYS=y | 718 | # CONFIG_LEGACY_PTYS is not set |
| 775 | CONFIG_LEGACY_PTY_COUNT=16 | ||
| 776 | # CONFIG_HVC_UDBG is not set | 719 | # CONFIG_HVC_UDBG is not set |
| 777 | # CONFIG_IPMI_HANDLER is not set | 720 | # CONFIG_IPMI_HANDLER is not set |
| 778 | # CONFIG_HW_RANDOM is not set | 721 | # CONFIG_HW_RANDOM is not set |
| @@ -782,6 +725,11 @@ CONFIG_LEGACY_PTY_COUNT=16 | |||
| 782 | # CONFIG_TCG_TPM is not set | 725 | # CONFIG_TCG_TPM is not set |
| 783 | # CONFIG_I2C is not set | 726 | # CONFIG_I2C is not set |
| 784 | # CONFIG_SPI is not set | 727 | # CONFIG_SPI is not set |
| 728 | |||
| 729 | # | ||
| 730 | # PPS support | ||
| 731 | # | ||
| 732 | # CONFIG_PPS is not set | ||
| 785 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | 733 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y |
| 786 | # CONFIG_GPIOLIB is not set | 734 | # CONFIG_GPIOLIB is not set |
| 787 | # CONFIG_W1 is not set | 735 | # CONFIG_W1 is not set |
| @@ -805,22 +753,7 @@ CONFIG_SSB_POSSIBLE=y | |||
| 805 | # CONFIG_HTC_PASIC3 is not set | 753 | # CONFIG_HTC_PASIC3 is not set |
| 806 | # CONFIG_MFD_TMIO is not set | 754 | # CONFIG_MFD_TMIO is not set |
| 807 | # CONFIG_REGULATOR is not set | 755 | # CONFIG_REGULATOR is not set |
| 808 | 756 | # CONFIG_MEDIA_SUPPORT is not set | |
| 809 | # | ||
| 810 | # Multimedia devices | ||
| 811 | # | ||
| 812 | |||
| 813 | # | ||
| 814 | # Multimedia core support | ||
| 815 | # | ||
| 816 | # CONFIG_VIDEO_DEV is not set | ||
| 817 | # CONFIG_DVB_CORE is not set | ||
| 818 | # CONFIG_VIDEO_MEDIA is not set | ||
| 819 | |||
| 820 | # | ||
| 821 | # Multimedia drivers | ||
| 822 | # | ||
| 823 | # CONFIG_DAB is not set | ||
| 824 | 757 | ||
| 825 | # | 758 | # |
| 826 | # Graphics support | 759 | # Graphics support |
| @@ -898,6 +831,11 @@ CONFIG_SND_SUPPORT_OLD_API=y | |||
| 898 | CONFIG_SND_VERBOSE_PROCFS=y | 831 | CONFIG_SND_VERBOSE_PROCFS=y |
| 899 | # CONFIG_SND_VERBOSE_PRINTK is not set | 832 | # CONFIG_SND_VERBOSE_PRINTK is not set |
| 900 | # CONFIG_SND_DEBUG is not set | 833 | # CONFIG_SND_DEBUG is not set |
| 834 | # CONFIG_SND_RAWMIDI_SEQ is not set | ||
| 835 | # CONFIG_SND_OPL3_LIB_SEQ is not set | ||
| 836 | # CONFIG_SND_OPL4_LIB_SEQ is not set | ||
| 837 | # CONFIG_SND_SBAWE_SEQ is not set | ||
| 838 | # CONFIG_SND_EMU10K1_SEQ is not set | ||
| 901 | # CONFIG_SND_DRIVERS is not set | 839 | # CONFIG_SND_DRIVERS is not set |
| 902 | CONFIG_SND_PPC=y | 840 | CONFIG_SND_PPC=y |
| 903 | CONFIG_SND_PS3=m | 841 | CONFIG_SND_PS3=m |
| @@ -930,29 +868,34 @@ CONFIG_USB_HIDDEV=y | |||
| 930 | # Special HID drivers | 868 | # Special HID drivers |
| 931 | # | 869 | # |
| 932 | # CONFIG_HID_A4TECH is not set | 870 | # CONFIG_HID_A4TECH is not set |
| 933 | # CONFIG_HID_APPLE is not set | 871 | CONFIG_HID_APPLE=m |
| 934 | # CONFIG_HID_BELKIN is not set | 872 | CONFIG_HID_BELKIN=m |
| 935 | # CONFIG_HID_CHERRY is not set | 873 | CONFIG_HID_CHERRY=m |
| 936 | # CONFIG_HID_CHICONY is not set | 874 | # CONFIG_HID_CHICONY is not set |
| 937 | # CONFIG_HID_CYPRESS is not set | 875 | # CONFIG_HID_CYPRESS is not set |
| 938 | # CONFIG_DRAGONRISE_FF is not set | 876 | # CONFIG_HID_DRAGONRISE is not set |
| 939 | # CONFIG_HID_EZKEY is not set | 877 | CONFIG_HID_EZKEY=m |
| 940 | # CONFIG_HID_KYE is not set | 878 | # CONFIG_HID_KYE is not set |
| 941 | # CONFIG_HID_GYRATION is not set | 879 | # CONFIG_HID_GYRATION is not set |
| 942 | # CONFIG_HID_KENSINGTON is not set | 880 | # CONFIG_HID_KENSINGTON is not set |
| 943 | # CONFIG_HID_LOGITECH is not set | 881 | CONFIG_HID_LOGITECH=m |
| 944 | # CONFIG_HID_MICROSOFT is not set | 882 | # CONFIG_LOGITECH_FF is not set |
| 883 | # CONFIG_LOGIRUMBLEPAD2_FF is not set | ||
| 884 | CONFIG_HID_MICROSOFT=m | ||
| 945 | # CONFIG_HID_MONTEREY is not set | 885 | # CONFIG_HID_MONTEREY is not set |
| 946 | # CONFIG_HID_NTRIG is not set | 886 | # CONFIG_HID_NTRIG is not set |
| 947 | # CONFIG_HID_PANTHERLORD is not set | 887 | # CONFIG_HID_PANTHERLORD is not set |
| 948 | # CONFIG_HID_PETALYNX is not set | 888 | # CONFIG_HID_PETALYNX is not set |
| 949 | # CONFIG_HID_SAMSUNG is not set | 889 | # CONFIG_HID_SAMSUNG is not set |
| 950 | CONFIG_HID_SONY=m | 890 | CONFIG_HID_SONY=m |
| 951 | # CONFIG_HID_SUNPLUS is not set | 891 | CONFIG_HID_SUNPLUS=m |
| 952 | # CONFIG_GREENASIA_FF is not set | 892 | # CONFIG_HID_GREENASIA is not set |
| 893 | CONFIG_HID_SMARTJOYPLUS=m | ||
| 894 | # CONFIG_SMARTJOYPLUS_FF is not set | ||
| 953 | # CONFIG_HID_TOPSEED is not set | 895 | # CONFIG_HID_TOPSEED is not set |
| 954 | # CONFIG_THRUSTMASTER_FF is not set | 896 | # CONFIG_HID_THRUSTMASTER is not set |
| 955 | # CONFIG_ZEROPLUS_FF is not set | 897 | # CONFIG_HID_WACOM is not set |
| 898 | # CONFIG_HID_ZEROPLUS is not set | ||
| 956 | CONFIG_USB_SUPPORT=y | 899 | CONFIG_USB_SUPPORT=y |
| 957 | CONFIG_USB_ARCH_HAS_HCD=y | 900 | CONFIG_USB_ARCH_HAS_HCD=y |
| 958 | CONFIG_USB_ARCH_HAS_OHCI=y | 901 | CONFIG_USB_ARCH_HAS_OHCI=y |
| @@ -988,6 +931,8 @@ CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y | |||
| 988 | # CONFIG_USB_ISP116X_HCD is not set | 931 | # CONFIG_USB_ISP116X_HCD is not set |
| 989 | # CONFIG_USB_ISP1760_HCD is not set | 932 | # CONFIG_USB_ISP1760_HCD is not set |
| 990 | CONFIG_USB_OHCI_HCD=m | 933 | CONFIG_USB_OHCI_HCD=m |
| 934 | # CONFIG_USB_OHCI_HCD_PPC_OF_BE is not set | ||
| 935 | # CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set | ||
| 991 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set | 936 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set |
| 992 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | 937 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set |
| 993 | CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y | 938 | CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y |
| @@ -1115,6 +1060,10 @@ CONFIG_RTC_DRV_PS3=m | |||
| 1115 | # CONFIG_DMADEVICES is not set | 1060 | # CONFIG_DMADEVICES is not set |
| 1116 | # CONFIG_AUXDISPLAY is not set | 1061 | # CONFIG_AUXDISPLAY is not set |
| 1117 | # CONFIG_UIO is not set | 1062 | # CONFIG_UIO is not set |
| 1063 | |||
| 1064 | # | ||
| 1065 | # TI VLYNQ | ||
| 1066 | # | ||
| 1118 | # CONFIG_STAGING is not set | 1067 | # CONFIG_STAGING is not set |
| 1119 | 1068 | ||
| 1120 | # | 1069 | # |
| @@ -1141,11 +1090,12 @@ CONFIG_FS_MBCACHE=y | |||
| 1141 | # CONFIG_REISERFS_FS is not set | 1090 | # CONFIG_REISERFS_FS is not set |
| 1142 | # CONFIG_JFS_FS is not set | 1091 | # CONFIG_JFS_FS is not set |
| 1143 | # CONFIG_FS_POSIX_ACL is not set | 1092 | # CONFIG_FS_POSIX_ACL is not set |
| 1144 | CONFIG_FILE_LOCKING=y | ||
| 1145 | # CONFIG_XFS_FS is not set | 1093 | # CONFIG_XFS_FS is not set |
| 1146 | # CONFIG_GFS2_FS is not set | 1094 | # CONFIG_GFS2_FS is not set |
| 1147 | # CONFIG_OCFS2_FS is not set | 1095 | # CONFIG_OCFS2_FS is not set |
| 1148 | # CONFIG_BTRFS_FS is not set | 1096 | # CONFIG_BTRFS_FS is not set |
| 1097 | CONFIG_FILE_LOCKING=y | ||
| 1098 | CONFIG_FSNOTIFY=y | ||
| 1149 | CONFIG_DNOTIFY=y | 1099 | CONFIG_DNOTIFY=y |
| 1150 | CONFIG_INOTIFY=y | 1100 | CONFIG_INOTIFY=y |
| 1151 | CONFIG_INOTIFY_USER=y | 1101 | CONFIG_INOTIFY_USER=y |
| @@ -1205,7 +1155,6 @@ CONFIG_MISC_FILESYSTEMS=y | |||
| 1205 | # CONFIG_BEFS_FS is not set | 1155 | # CONFIG_BEFS_FS is not set |
| 1206 | # CONFIG_BFS_FS is not set | 1156 | # CONFIG_BFS_FS is not set |
| 1207 | # CONFIG_EFS_FS is not set | 1157 | # CONFIG_EFS_FS is not set |
| 1208 | # CONFIG_JFFS2_FS is not set | ||
| 1209 | # CONFIG_CRAMFS is not set | 1158 | # CONFIG_CRAMFS is not set |
| 1210 | # CONFIG_SQUASHFS is not set | 1159 | # CONFIG_SQUASHFS is not set |
| 1211 | # CONFIG_VXFS_FS is not set | 1160 | # CONFIG_VXFS_FS is not set |
| @@ -1222,6 +1171,7 @@ CONFIG_NFS_FS=y | |||
| 1222 | CONFIG_NFS_V3=y | 1171 | CONFIG_NFS_V3=y |
| 1223 | # CONFIG_NFS_V3_ACL is not set | 1172 | # CONFIG_NFS_V3_ACL is not set |
| 1224 | CONFIG_NFS_V4=y | 1173 | CONFIG_NFS_V4=y |
| 1174 | # CONFIG_NFS_V4_1 is not set | ||
| 1225 | CONFIG_ROOT_NFS=y | 1175 | CONFIG_ROOT_NFS=y |
| 1226 | # CONFIG_NFSD is not set | 1176 | # CONFIG_NFSD is not set |
| 1227 | CONFIG_LOCKD=y | 1177 | CONFIG_LOCKD=y |
| @@ -1359,7 +1309,6 @@ CONFIG_DEBUG_MEMORY_INIT=y | |||
| 1359 | CONFIG_DEBUG_LIST=y | 1309 | CONFIG_DEBUG_LIST=y |
| 1360 | # CONFIG_DEBUG_SG is not set | 1310 | # CONFIG_DEBUG_SG is not set |
| 1361 | # CONFIG_DEBUG_NOTIFIERS is not set | 1311 | # CONFIG_DEBUG_NOTIFIERS is not set |
| 1362 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
| 1363 | # CONFIG_RCU_TORTURE_TEST is not set | 1312 | # CONFIG_RCU_TORTURE_TEST is not set |
| 1364 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 1313 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
| 1365 | # CONFIG_BACKTRACE_SELF_TEST is not set | 1314 | # CONFIG_BACKTRACE_SELF_TEST is not set |
| @@ -1374,31 +1323,21 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | |||
| 1374 | CONFIG_HAVE_DYNAMIC_FTRACE=y | 1323 | CONFIG_HAVE_DYNAMIC_FTRACE=y |
| 1375 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | 1324 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y |
| 1376 | CONFIG_RING_BUFFER=y | 1325 | CONFIG_RING_BUFFER=y |
| 1326 | CONFIG_EVENT_TRACING=y | ||
| 1327 | CONFIG_CONTEXT_SWITCH_TRACER=y | ||
| 1377 | CONFIG_TRACING=y | 1328 | CONFIG_TRACING=y |
| 1378 | CONFIG_TRACING_SUPPORT=y | 1329 | CONFIG_TRACING_SUPPORT=y |
| 1379 | 1330 | # CONFIG_FTRACE is not set | |
| 1380 | # | ||
| 1381 | # Tracers | ||
| 1382 | # | ||
| 1383 | # CONFIG_FUNCTION_TRACER is not set | ||
| 1384 | # CONFIG_IRQSOFF_TRACER is not set | ||
| 1385 | # CONFIG_SCHED_TRACER is not set | ||
| 1386 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
| 1387 | # CONFIG_EVENT_TRACER is not set | ||
| 1388 | # CONFIG_BOOT_TRACER is not set | ||
| 1389 | # CONFIG_TRACE_BRANCH_PROFILING is not set | ||
| 1390 | # CONFIG_STACK_TRACER is not set | ||
| 1391 | # CONFIG_KMEMTRACE is not set | ||
| 1392 | # CONFIG_WORKQUEUE_TRACER is not set | ||
| 1393 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
| 1394 | # CONFIG_FTRACE_STARTUP_TEST is not set | ||
| 1395 | # CONFIG_DYNAMIC_DEBUG is not set | 1331 | # CONFIG_DYNAMIC_DEBUG is not set |
| 1396 | # CONFIG_SAMPLES is not set | 1332 | # CONFIG_SAMPLES is not set |
| 1397 | CONFIG_HAVE_ARCH_KGDB=y | 1333 | CONFIG_HAVE_ARCH_KGDB=y |
| 1398 | # CONFIG_KGDB is not set | 1334 | # CONFIG_KGDB is not set |
| 1335 | # CONFIG_PPC_DISABLE_WERROR is not set | ||
| 1336 | CONFIG_PPC_WERROR=y | ||
| 1399 | CONFIG_PRINT_STACK_DEPTH=64 | 1337 | CONFIG_PRINT_STACK_DEPTH=64 |
| 1400 | CONFIG_DEBUG_STACKOVERFLOW=y | 1338 | CONFIG_DEBUG_STACKOVERFLOW=y |
| 1401 | # CONFIG_DEBUG_STACK_USAGE is not set | 1339 | # CONFIG_DEBUG_STACK_USAGE is not set |
| 1340 | # CONFIG_PPC_EMULATED_STATS is not set | ||
| 1402 | # CONFIG_CODE_PATCHING_SELFTEST is not set | 1341 | # CONFIG_CODE_PATCHING_SELFTEST is not set |
| 1403 | # CONFIG_FTR_FIXUP_SELFTEST is not set | 1342 | # CONFIG_FTR_FIXUP_SELFTEST is not set |
| 1404 | # CONFIG_MSI_BITMAP_SELFTEST is not set | 1343 | # CONFIG_MSI_BITMAP_SELFTEST is not set |
diff --git a/arch/powerpc/platforms/ps3/time.c b/arch/powerpc/platforms/ps3/time.c index b178a1e66c91..40b5cb433005 100644 --- a/arch/powerpc/platforms/ps3/time.c +++ b/arch/powerpc/platforms/ps3/time.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
| 22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
| 23 | 23 | ||
| 24 | #include <asm/firmware.h> | ||
| 24 | #include <asm/rtc.h> | 25 | #include <asm/rtc.h> |
| 25 | #include <asm/lv1call.h> | 26 | #include <asm/lv1call.h> |
| 26 | #include <asm/ps3.h> | 27 | #include <asm/ps3.h> |
| @@ -84,6 +85,9 @@ static int __init ps3_rtc_init(void) | |||
| 84 | { | 85 | { |
| 85 | struct platform_device *pdev; | 86 | struct platform_device *pdev; |
| 86 | 87 | ||
| 88 | if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) | ||
| 89 | return -ENODEV; | ||
| 90 | |||
| 87 | pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0); | 91 | pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0); |
| 88 | if (IS_ERR(pdev)) | 92 | if (IS_ERR(pdev)) |
| 89 | return PTR_ERR(pdev); | 93 | return PTR_ERR(pdev); |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 9717717c6fea..cbb897bc50bd 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
| @@ -154,6 +154,20 @@ static int __init condev_setup(char *str) | |||
| 154 | 154 | ||
| 155 | __setup("condev=", condev_setup); | 155 | __setup("condev=", condev_setup); |
| 156 | 156 | ||
| 157 | static void __init set_preferred_console(void) | ||
| 158 | { | ||
| 159 | if (MACHINE_IS_KVM) { | ||
| 160 | add_preferred_console("hvc", 0, NULL); | ||
| 161 | s390_virtio_console_init(); | ||
| 162 | return; | ||
| 163 | } | ||
| 164 | |||
| 165 | if (CONSOLE_IS_3215 || CONSOLE_IS_SCLP) | ||
| 166 | add_preferred_console("ttyS", 0, NULL); | ||
| 167 | if (CONSOLE_IS_3270) | ||
| 168 | add_preferred_console("tty3270", 0, NULL); | ||
| 169 | } | ||
| 170 | |||
| 157 | static int __init conmode_setup(char *str) | 171 | static int __init conmode_setup(char *str) |
| 158 | { | 172 | { |
| 159 | #if defined(CONFIG_SCLP_CONSOLE) || defined(CONFIG_SCLP_VT220_CONSOLE) | 173 | #if defined(CONFIG_SCLP_CONSOLE) || defined(CONFIG_SCLP_VT220_CONSOLE) |
| @@ -168,6 +182,7 @@ static int __init conmode_setup(char *str) | |||
| 168 | if (strncmp(str, "3270", 5) == 0) | 182 | if (strncmp(str, "3270", 5) == 0) |
| 169 | SET_CONSOLE_3270; | 183 | SET_CONSOLE_3270; |
| 170 | #endif | 184 | #endif |
| 185 | set_preferred_console(); | ||
| 171 | return 1; | 186 | return 1; |
| 172 | } | 187 | } |
| 173 | 188 | ||
| @@ -780,9 +795,6 @@ static void __init setup_hwcaps(void) | |||
| 780 | void __init | 795 | void __init |
| 781 | setup_arch(char **cmdline_p) | 796 | setup_arch(char **cmdline_p) |
| 782 | { | 797 | { |
| 783 | /* set up preferred console */ | ||
| 784 | add_preferred_console("ttyS", 0, NULL); | ||
| 785 | |||
| 786 | /* | 798 | /* |
| 787 | * print what head.S has found out about the machine | 799 | * print what head.S has found out about the machine |
| 788 | */ | 800 | */ |
| @@ -802,11 +814,9 @@ setup_arch(char **cmdline_p) | |||
| 802 | if (MACHINE_IS_VM) | 814 | if (MACHINE_IS_VM) |
| 803 | pr_info("Linux is running as a z/VM " | 815 | pr_info("Linux is running as a z/VM " |
| 804 | "guest operating system in 64-bit mode\n"); | 816 | "guest operating system in 64-bit mode\n"); |
| 805 | else if (MACHINE_IS_KVM) { | 817 | else if (MACHINE_IS_KVM) |
| 806 | pr_info("Linux is running under KVM in 64-bit mode\n"); | 818 | pr_info("Linux is running under KVM in 64-bit mode\n"); |
| 807 | add_preferred_console("hvc", 0, NULL); | 819 | else |
| 808 | s390_virtio_console_init(); | ||
| 809 | } else | ||
| 810 | pr_info("Linux is running natively in 64-bit mode\n"); | 820 | pr_info("Linux is running natively in 64-bit mode\n"); |
| 811 | #endif /* CONFIG_64BIT */ | 821 | #endif /* CONFIG_64BIT */ |
| 812 | 822 | ||
| @@ -851,6 +861,7 @@ setup_arch(char **cmdline_p) | |||
| 851 | 861 | ||
| 852 | /* Setup default console */ | 862 | /* Setup default console */ |
| 853 | conmode_default(); | 863 | conmode_default(); |
| 864 | set_preferred_console(); | ||
| 854 | 865 | ||
| 855 | /* Setup zfcpdump support */ | 866 | /* Setup zfcpdump support */ |
| 856 | setup_zfcpdump(console_devno); | 867 | setup_zfcpdump(console_devno); |
diff --git a/arch/sparc/configs/sparc32_defconfig b/arch/sparc/configs/sparc32_defconfig index 8bcd27af724b..a0f62a808edb 100644 --- a/arch/sparc/configs/sparc32_defconfig +++ b/arch/sparc/configs/sparc32_defconfig | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # | 1 | # |
| 2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
| 3 | # Linux kernel version: 2.6.30-rc2 | 3 | # Linux kernel version: 2.6.31-rc1 |
| 4 | # Fri Apr 17 04:04:46 2009 | 4 | # Tue Aug 18 23:45:52 2009 |
| 5 | # | 5 | # |
| 6 | # CONFIG_64BIT is not set | 6 | # CONFIG_64BIT is not set |
| 7 | CONFIG_SPARC=y | 7 | CONFIG_SPARC=y |
| @@ -17,6 +17,7 @@ CONFIG_GENERIC_ISA_DMA=y | |||
| 17 | CONFIG_ARCH_NO_VIRT_TO_BUS=y | 17 | CONFIG_ARCH_NO_VIRT_TO_BUS=y |
| 18 | CONFIG_OF=y | 18 | CONFIG_OF=y |
| 19 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 19 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
| 20 | CONFIG_CONSTRUCTORS=y | ||
| 20 | 21 | ||
| 21 | # | 22 | # |
| 22 | # General setup | 23 | # General setup |
| @@ -74,7 +75,6 @@ CONFIG_SYSCTL_SYSCALL=y | |||
| 74 | CONFIG_KALLSYMS=y | 75 | CONFIG_KALLSYMS=y |
| 75 | # CONFIG_KALLSYMS_ALL is not set | 76 | # CONFIG_KALLSYMS_ALL is not set |
| 76 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 77 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
| 77 | # CONFIG_STRIP_ASM_SYMS is not set | ||
| 78 | CONFIG_HOTPLUG=y | 78 | CONFIG_HOTPLUG=y |
| 79 | CONFIG_PRINTK=y | 79 | CONFIG_PRINTK=y |
| 80 | CONFIG_BUG=y | 80 | CONFIG_BUG=y |
| @@ -87,8 +87,13 @@ CONFIG_TIMERFD=y | |||
| 87 | CONFIG_EVENTFD=y | 87 | CONFIG_EVENTFD=y |
| 88 | CONFIG_SHMEM=y | 88 | CONFIG_SHMEM=y |
| 89 | CONFIG_AIO=y | 89 | CONFIG_AIO=y |
| 90 | |||
| 91 | # | ||
| 92 | # Performance Counters | ||
| 93 | # | ||
| 90 | CONFIG_VM_EVENT_COUNTERS=y | 94 | CONFIG_VM_EVENT_COUNTERS=y |
| 91 | CONFIG_PCI_QUIRKS=y | 95 | CONFIG_PCI_QUIRKS=y |
| 96 | # CONFIG_STRIP_ASM_SYMS is not set | ||
| 92 | CONFIG_COMPAT_BRK=y | 97 | CONFIG_COMPAT_BRK=y |
| 93 | CONFIG_SLAB=y | 98 | CONFIG_SLAB=y |
| 94 | # CONFIG_SLUB is not set | 99 | # CONFIG_SLUB is not set |
| @@ -97,6 +102,10 @@ CONFIG_SLAB=y | |||
| 97 | # CONFIG_MARKERS is not set | 102 | # CONFIG_MARKERS is not set |
| 98 | CONFIG_HAVE_OPROFILE=y | 103 | CONFIG_HAVE_OPROFILE=y |
| 99 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 104 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
| 105 | |||
| 106 | # | ||
| 107 | # GCOV-based kernel profiling | ||
| 108 | # | ||
| 100 | # CONFIG_SLOW_WORK is not set | 109 | # CONFIG_SLOW_WORK is not set |
| 101 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 110 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
| 102 | CONFIG_SLABINFO=y | 111 | CONFIG_SLABINFO=y |
| @@ -109,7 +118,7 @@ CONFIG_MODULE_UNLOAD=y | |||
| 109 | # CONFIG_MODVERSIONS is not set | 118 | # CONFIG_MODVERSIONS is not set |
| 110 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 119 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
| 111 | CONFIG_BLOCK=y | 120 | CONFIG_BLOCK=y |
| 112 | # CONFIG_LBD is not set | 121 | CONFIG_LBDAF=y |
| 113 | # CONFIG_BLK_DEV_BSG is not set | 122 | # CONFIG_BLK_DEV_BSG is not set |
| 114 | # CONFIG_BLK_DEV_INTEGRITY is not set | 123 | # CONFIG_BLK_DEV_INTEGRITY is not set |
| 115 | 124 | ||
| @@ -154,9 +163,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
| 154 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 163 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
| 155 | CONFIG_ZONE_DMA_FLAG=1 | 164 | CONFIG_ZONE_DMA_FLAG=1 |
| 156 | CONFIG_BOUNCE=y | 165 | CONFIG_BOUNCE=y |
| 157 | CONFIG_UNEVICTABLE_LRU=y | ||
| 158 | CONFIG_HAVE_MLOCK=y | 166 | CONFIG_HAVE_MLOCK=y |
| 159 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | 167 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y |
| 168 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
| 160 | CONFIG_SUN_PM=y | 169 | CONFIG_SUN_PM=y |
| 161 | # CONFIG_SPARC_LED is not set | 170 | # CONFIG_SPARC_LED is not set |
| 162 | CONFIG_SERIAL_CONSOLE=y | 171 | CONFIG_SERIAL_CONSOLE=y |
| @@ -264,6 +273,7 @@ CONFIG_IPV6_TUNNEL=m | |||
| 264 | # CONFIG_ECONET is not set | 273 | # CONFIG_ECONET is not set |
| 265 | # CONFIG_WAN_ROUTER is not set | 274 | # CONFIG_WAN_ROUTER is not set |
| 266 | # CONFIG_PHONET is not set | 275 | # CONFIG_PHONET is not set |
| 276 | # CONFIG_IEEE802154 is not set | ||
| 267 | # CONFIG_NET_SCHED is not set | 277 | # CONFIG_NET_SCHED is not set |
| 268 | # CONFIG_DCB is not set | 278 | # CONFIG_DCB is not set |
| 269 | 279 | ||
| @@ -281,7 +291,11 @@ CONFIG_WIRELESS=y | |||
| 281 | CONFIG_WIRELESS_OLD_REGULATORY=y | 291 | CONFIG_WIRELESS_OLD_REGULATORY=y |
| 282 | # CONFIG_WIRELESS_EXT is not set | 292 | # CONFIG_WIRELESS_EXT is not set |
| 283 | # CONFIG_LIB80211 is not set | 293 | # CONFIG_LIB80211 is not set |
| 284 | # CONFIG_MAC80211 is not set | 294 | |
| 295 | # | ||
| 296 | # CFG80211 needs to be enabled for MAC80211 | ||
| 297 | # | ||
| 298 | CONFIG_MAC80211_DEFAULT_PS_VALUE=0 | ||
| 285 | # CONFIG_WIMAX is not set | 299 | # CONFIG_WIMAX is not set |
| 286 | # CONFIG_RFKILL is not set | 300 | # CONFIG_RFKILL is not set |
| 287 | # CONFIG_NET_9P is not set | 301 | # CONFIG_NET_9P is not set |
| @@ -335,6 +349,7 @@ CONFIG_MISC_DEVICES=y | |||
| 335 | # EEPROM support | 349 | # EEPROM support |
| 336 | # | 350 | # |
| 337 | # CONFIG_EEPROM_93CX6 is not set | 351 | # CONFIG_EEPROM_93CX6 is not set |
| 352 | # CONFIG_CB710_CORE is not set | ||
| 338 | CONFIG_HAVE_IDE=y | 353 | CONFIG_HAVE_IDE=y |
| 339 | # CONFIG_IDE is not set | 354 | # CONFIG_IDE is not set |
| 340 | 355 | ||
| @@ -358,10 +373,6 @@ CONFIG_BLK_DEV_SR=m | |||
| 358 | # CONFIG_BLK_DEV_SR_VENDOR is not set | 373 | # CONFIG_BLK_DEV_SR_VENDOR is not set |
| 359 | CONFIG_CHR_DEV_SG=m | 374 | CONFIG_CHR_DEV_SG=m |
| 360 | # CONFIG_CHR_DEV_SCH is not set | 375 | # CONFIG_CHR_DEV_SCH is not set |
| 361 | |||
| 362 | # | ||
| 363 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
| 364 | # | ||
| 365 | # CONFIG_SCSI_MULTI_LUN is not set | 376 | # CONFIG_SCSI_MULTI_LUN is not set |
| 366 | # CONFIG_SCSI_CONSTANTS is not set | 377 | # CONFIG_SCSI_CONSTANTS is not set |
| 367 | # CONFIG_SCSI_LOGGING is not set | 378 | # CONFIG_SCSI_LOGGING is not set |
| @@ -379,6 +390,7 @@ CONFIG_SCSI_SPI_ATTRS=y | |||
| 379 | CONFIG_SCSI_LOWLEVEL=y | 390 | CONFIG_SCSI_LOWLEVEL=y |
| 380 | # CONFIG_ISCSI_TCP is not set | 391 | # CONFIG_ISCSI_TCP is not set |
| 381 | # CONFIG_SCSI_CXGB3_ISCSI is not set | 392 | # CONFIG_SCSI_CXGB3_ISCSI is not set |
| 393 | # CONFIG_SCSI_BNX2_ISCSI is not set | ||
| 382 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | 394 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set |
| 383 | # CONFIG_SCSI_3W_9XXX is not set | 395 | # CONFIG_SCSI_3W_9XXX is not set |
| 384 | # CONFIG_SCSI_ACARD is not set | 396 | # CONFIG_SCSI_ACARD is not set |
| @@ -387,6 +399,7 @@ CONFIG_SCSI_LOWLEVEL=y | |||
| 387 | # CONFIG_SCSI_AIC7XXX_OLD is not set | 399 | # CONFIG_SCSI_AIC7XXX_OLD is not set |
| 388 | # CONFIG_SCSI_AIC79XX is not set | 400 | # CONFIG_SCSI_AIC79XX is not set |
| 389 | # CONFIG_SCSI_AIC94XX is not set | 401 | # CONFIG_SCSI_AIC94XX is not set |
| 402 | # CONFIG_SCSI_MVSAS is not set | ||
| 390 | # CONFIG_SCSI_ARCMSR is not set | 403 | # CONFIG_SCSI_ARCMSR is not set |
| 391 | # CONFIG_MEGARAID_NEWGEN is not set | 404 | # CONFIG_MEGARAID_NEWGEN is not set |
| 392 | # CONFIG_MEGARAID_LEGACY is not set | 405 | # CONFIG_MEGARAID_LEGACY is not set |
| @@ -401,7 +414,6 @@ CONFIG_SCSI_LOWLEVEL=y | |||
| 401 | # CONFIG_SCSI_IPS is not set | 414 | # CONFIG_SCSI_IPS is not set |
| 402 | # CONFIG_SCSI_INITIO is not set | 415 | # CONFIG_SCSI_INITIO is not set |
| 403 | # CONFIG_SCSI_INIA100 is not set | 416 | # CONFIG_SCSI_INIA100 is not set |
| 404 | # CONFIG_SCSI_MVSAS is not set | ||
| 405 | # CONFIG_SCSI_STEX is not set | 417 | # CONFIG_SCSI_STEX is not set |
| 406 | # CONFIG_SCSI_SYM53C8XX_2 is not set | 418 | # CONFIG_SCSI_SYM53C8XX_2 is not set |
| 407 | # CONFIG_SCSI_QLOGIC_1280 is not set | 419 | # CONFIG_SCSI_QLOGIC_1280 is not set |
| @@ -426,13 +438,16 @@ CONFIG_SCSI_SUNESP=y | |||
| 426 | # | 438 | # |
| 427 | 439 | ||
| 428 | # | 440 | # |
| 429 | # Enable only one of the two stacks, unless you know what you are doing | 441 | # You can enable one or both FireWire driver stacks. |
| 442 | # | ||
| 443 | |||
| 444 | # | ||
| 445 | # See the help texts for more information. | ||
| 430 | # | 446 | # |
| 431 | # CONFIG_FIREWIRE is not set | 447 | # CONFIG_FIREWIRE is not set |
| 432 | # CONFIG_IEEE1394 is not set | 448 | # CONFIG_IEEE1394 is not set |
| 433 | # CONFIG_I2O is not set | 449 | # CONFIG_I2O is not set |
| 434 | CONFIG_NETDEVICES=y | 450 | CONFIG_NETDEVICES=y |
| 435 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
| 436 | CONFIG_DUMMY=m | 451 | CONFIG_DUMMY=m |
| 437 | # CONFIG_BONDING is not set | 452 | # CONFIG_BONDING is not set |
| 438 | # CONFIG_MACVLAN is not set | 453 | # CONFIG_MACVLAN is not set |
| @@ -463,6 +478,7 @@ CONFIG_SUNQE=m | |||
| 463 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | 478 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
| 464 | # CONFIG_NET_PCI is not set | 479 | # CONFIG_NET_PCI is not set |
| 465 | # CONFIG_B44 is not set | 480 | # CONFIG_B44 is not set |
| 481 | # CONFIG_KS8842 is not set | ||
| 466 | # CONFIG_ATL2 is not set | 482 | # CONFIG_ATL2 is not set |
| 467 | CONFIG_NETDEV_1000=y | 483 | CONFIG_NETDEV_1000=y |
| 468 | # CONFIG_ACENIC is not set | 484 | # CONFIG_ACENIC is not set |
| @@ -482,6 +498,7 @@ CONFIG_NETDEV_1000=y | |||
| 482 | # CONFIG_VIA_VELOCITY is not set | 498 | # CONFIG_VIA_VELOCITY is not set |
| 483 | # CONFIG_TIGON3 is not set | 499 | # CONFIG_TIGON3 is not set |
| 484 | # CONFIG_BNX2 is not set | 500 | # CONFIG_BNX2 is not set |
| 501 | # CONFIG_CNIC is not set | ||
| 485 | # CONFIG_QLA3XXX is not set | 502 | # CONFIG_QLA3XXX is not set |
| 486 | # CONFIG_ATL1 is not set | 503 | # CONFIG_ATL1 is not set |
| 487 | # CONFIG_ATL1E is not set | 504 | # CONFIG_ATL1E is not set |
| @@ -629,6 +646,11 @@ CONFIG_HW_RANDOM=m | |||
| 629 | CONFIG_DEVPORT=y | 646 | CONFIG_DEVPORT=y |
| 630 | # CONFIG_I2C is not set | 647 | # CONFIG_I2C is not set |
| 631 | # CONFIG_SPI is not set | 648 | # CONFIG_SPI is not set |
| 649 | |||
| 650 | # | ||
| 651 | # PPS support | ||
| 652 | # | ||
| 653 | # CONFIG_PPS is not set | ||
| 632 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | 654 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y |
| 633 | # CONFIG_GPIOLIB is not set | 655 | # CONFIG_GPIOLIB is not set |
| 634 | # CONFIG_W1 is not set | 656 | # CONFIG_W1 is not set |
| @@ -668,22 +690,7 @@ CONFIG_SSB_POSSIBLE=y | |||
| 668 | # CONFIG_HTC_PASIC3 is not set | 690 | # CONFIG_HTC_PASIC3 is not set |
| 669 | # CONFIG_MFD_TMIO is not set | 691 | # CONFIG_MFD_TMIO is not set |
| 670 | # CONFIG_REGULATOR is not set | 692 | # CONFIG_REGULATOR is not set |
| 671 | 693 | # CONFIG_MEDIA_SUPPORT is not set | |
| 672 | # | ||
| 673 | # Multimedia devices | ||
| 674 | # | ||
| 675 | |||
| 676 | # | ||
| 677 | # Multimedia core support | ||
| 678 | # | ||
| 679 | # CONFIG_VIDEO_DEV is not set | ||
| 680 | # CONFIG_DVB_CORE is not set | ||
| 681 | # CONFIG_VIDEO_MEDIA is not set | ||
| 682 | |||
| 683 | # | ||
| 684 | # Multimedia drivers | ||
| 685 | # | ||
| 686 | # CONFIG_DAB is not set | ||
| 687 | 694 | ||
| 688 | # | 695 | # |
| 689 | # Graphics support | 696 | # Graphics support |
| @@ -776,6 +783,10 @@ CONFIG_RTC_DRV_M48T59=y | |||
| 776 | # CONFIG_DMADEVICES is not set | 783 | # CONFIG_DMADEVICES is not set |
| 777 | # CONFIG_AUXDISPLAY is not set | 784 | # CONFIG_AUXDISPLAY is not set |
| 778 | # CONFIG_UIO is not set | 785 | # CONFIG_UIO is not set |
| 786 | |||
| 787 | # | ||
| 788 | # TI VLYNQ | ||
| 789 | # | ||
| 779 | # CONFIG_STAGING is not set | 790 | # CONFIG_STAGING is not set |
| 780 | 791 | ||
| 781 | # | 792 | # |
| @@ -799,10 +810,12 @@ CONFIG_FS_MBCACHE=y | |||
| 799 | # CONFIG_REISERFS_FS is not set | 810 | # CONFIG_REISERFS_FS is not set |
| 800 | # CONFIG_JFS_FS is not set | 811 | # CONFIG_JFS_FS is not set |
| 801 | CONFIG_FS_POSIX_ACL=y | 812 | CONFIG_FS_POSIX_ACL=y |
| 802 | CONFIG_FILE_LOCKING=y | ||
| 803 | # CONFIG_XFS_FS is not set | 813 | # CONFIG_XFS_FS is not set |
| 814 | # CONFIG_GFS2_FS is not set | ||
| 804 | # CONFIG_OCFS2_FS is not set | 815 | # CONFIG_OCFS2_FS is not set |
| 805 | # CONFIG_BTRFS_FS is not set | 816 | # CONFIG_BTRFS_FS is not set |
| 817 | CONFIG_FILE_LOCKING=y | ||
| 818 | CONFIG_FSNOTIFY=y | ||
| 806 | CONFIG_DNOTIFY=y | 819 | CONFIG_DNOTIFY=y |
| 807 | CONFIG_INOTIFY=y | 820 | CONFIG_INOTIFY=y |
| 808 | CONFIG_INOTIFY_USER=y | 821 | CONFIG_INOTIFY_USER=y |
| @@ -985,6 +998,7 @@ CONFIG_KGDB=y | |||
| 985 | CONFIG_KGDB_SERIAL_CONSOLE=y | 998 | CONFIG_KGDB_SERIAL_CONSOLE=y |
| 986 | CONFIG_KGDB_TESTS=y | 999 | CONFIG_KGDB_TESTS=y |
| 987 | # CONFIG_KGDB_TESTS_ON_BOOT is not set | 1000 | # CONFIG_KGDB_TESTS_ON_BOOT is not set |
| 1001 | # CONFIG_KMEMCHECK is not set | ||
| 988 | # CONFIG_DEBUG_STACK_USAGE is not set | 1002 | # CONFIG_DEBUG_STACK_USAGE is not set |
| 989 | # CONFIG_STACK_DEBUG is not set | 1003 | # CONFIG_STACK_DEBUG is not set |
| 990 | 1004 | ||
diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig index 0123a4c596ce..fdddf7a6f725 100644 --- a/arch/sparc/configs/sparc64_defconfig +++ b/arch/sparc/configs/sparc64_defconfig | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # | 1 | # |
| 2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
| 3 | # Linux kernel version: 2.6.30 | 3 | # Linux kernel version: 2.6.31-rc1 |
| 4 | # Tue Jun 16 04:59:36 2009 | 4 | # Tue Aug 18 23:56:02 2009 |
| 5 | # | 5 | # |
| 6 | CONFIG_64BIT=y | 6 | CONFIG_64BIT=y |
| 7 | CONFIG_SPARC=y | 7 | CONFIG_SPARC=y |
| @@ -26,6 +26,7 @@ CONFIG_ARCH_NO_VIRT_TO_BUS=y | |||
| 26 | CONFIG_OF=y | 26 | CONFIG_OF=y |
| 27 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y | 27 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y |
| 28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
| 29 | CONFIG_CONSTRUCTORS=y | ||
| 29 | 30 | ||
| 30 | # | 31 | # |
| 31 | # General setup | 32 | # General setup |
| @@ -119,6 +120,11 @@ CONFIG_HAVE_KPROBES=y | |||
| 119 | CONFIG_HAVE_KRETPROBES=y | 120 | CONFIG_HAVE_KRETPROBES=y |
| 120 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 121 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
| 121 | CONFIG_USE_GENERIC_SMP_HELPERS=y | 122 | CONFIG_USE_GENERIC_SMP_HELPERS=y |
| 123 | |||
| 124 | # | ||
| 125 | # GCOV-based kernel profiling | ||
| 126 | # | ||
| 127 | # CONFIG_GCOV_KERNEL is not set | ||
| 122 | # CONFIG_SLOW_WORK is not set | 128 | # CONFIG_SLOW_WORK is not set |
| 123 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 129 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
| 124 | CONFIG_SLABINFO=y | 130 | CONFIG_SLABINFO=y |
| @@ -204,7 +210,6 @@ CONFIG_MIGRATION=y | |||
| 204 | CONFIG_PHYS_ADDR_T_64BIT=y | 210 | CONFIG_PHYS_ADDR_T_64BIT=y |
| 205 | CONFIG_ZONE_DMA_FLAG=0 | 211 | CONFIG_ZONE_DMA_FLAG=0 |
| 206 | CONFIG_NR_QUICK=1 | 212 | CONFIG_NR_QUICK=1 |
| 207 | CONFIG_UNEVICTABLE_LRU=y | ||
| 208 | CONFIG_HAVE_MLOCK=y | 213 | CONFIG_HAVE_MLOCK=y |
| 209 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | 214 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y |
| 210 | CONFIG_DEFAULT_MMAP_MIN_ADDR=8192 | 215 | CONFIG_DEFAULT_MMAP_MIN_ADDR=8192 |
| @@ -410,6 +415,7 @@ CONFIG_MISC_DEVICES=y | |||
| 410 | # | 415 | # |
| 411 | # CONFIG_EEPROM_AT24 is not set | 416 | # CONFIG_EEPROM_AT24 is not set |
| 412 | # CONFIG_EEPROM_LEGACY is not set | 417 | # CONFIG_EEPROM_LEGACY is not set |
| 418 | # CONFIG_EEPROM_MAX6875 is not set | ||
| 413 | # CONFIG_EEPROM_93CX6 is not set | 419 | # CONFIG_EEPROM_93CX6 is not set |
| 414 | # CONFIG_CB710_CORE is not set | 420 | # CONFIG_CB710_CORE is not set |
| 415 | CONFIG_HAVE_IDE=y | 421 | CONFIG_HAVE_IDE=y |
| @@ -562,6 +568,7 @@ CONFIG_BLK_DEV_DM=m | |||
| 562 | CONFIG_DM_CRYPT=m | 568 | CONFIG_DM_CRYPT=m |
| 563 | CONFIG_DM_SNAPSHOT=m | 569 | CONFIG_DM_SNAPSHOT=m |
| 564 | CONFIG_DM_MIRROR=m | 570 | CONFIG_DM_MIRROR=m |
| 571 | # CONFIG_DM_LOG_USERSPACE is not set | ||
| 565 | CONFIG_DM_ZERO=m | 572 | CONFIG_DM_ZERO=m |
| 566 | # CONFIG_DM_MULTIPATH is not set | 573 | # CONFIG_DM_MULTIPATH is not set |
| 567 | # CONFIG_DM_DELAY is not set | 574 | # CONFIG_DM_DELAY is not set |
| @@ -573,7 +580,11 @@ CONFIG_DM_ZERO=m | |||
| 573 | # | 580 | # |
| 574 | 581 | ||
| 575 | # | 582 | # |
| 576 | # Enable only one of the two stacks, unless you know what you are doing | 583 | # You can enable one or both FireWire driver stacks. |
| 584 | # | ||
| 585 | |||
| 586 | # | ||
| 587 | # See the help texts for more information. | ||
| 577 | # | 588 | # |
| 578 | # CONFIG_FIREWIRE is not set | 589 | # CONFIG_FIREWIRE is not set |
| 579 | # CONFIG_IEEE1394 is not set | 590 | # CONFIG_IEEE1394 is not set |
| @@ -667,6 +678,7 @@ CONFIG_E1000E=m | |||
| 667 | # CONFIG_VIA_VELOCITY is not set | 678 | # CONFIG_VIA_VELOCITY is not set |
| 668 | CONFIG_TIGON3=m | 679 | CONFIG_TIGON3=m |
| 669 | CONFIG_BNX2=m | 680 | CONFIG_BNX2=m |
| 681 | # CONFIG_CNIC is not set | ||
| 670 | # CONFIG_QLA3XXX is not set | 682 | # CONFIG_QLA3XXX is not set |
| 671 | # CONFIG_ATL1 is not set | 683 | # CONFIG_ATL1 is not set |
| 672 | # CONFIG_ATL1E is not set | 684 | # CONFIG_ATL1E is not set |
| @@ -773,6 +785,7 @@ CONFIG_MOUSE_SERIAL=y | |||
| 773 | # CONFIG_MOUSE_APPLETOUCH is not set | 785 | # CONFIG_MOUSE_APPLETOUCH is not set |
| 774 | # CONFIG_MOUSE_BCM5974 is not set | 786 | # CONFIG_MOUSE_BCM5974 is not set |
| 775 | # CONFIG_MOUSE_VSXXXAA is not set | 787 | # CONFIG_MOUSE_VSXXXAA is not set |
| 788 | # CONFIG_MOUSE_SYNAPTICS_I2C is not set | ||
| 776 | # CONFIG_INPUT_JOYSTICK is not set | 789 | # CONFIG_INPUT_JOYSTICK is not set |
| 777 | # CONFIG_INPUT_TABLET is not set | 790 | # CONFIG_INPUT_TABLET is not set |
| 778 | # CONFIG_INPUT_TOUCHSCREEN is not set | 791 | # CONFIG_INPUT_TOUCHSCREEN is not set |
| @@ -870,6 +883,7 @@ CONFIG_I2C_ALGOBIT=y | |||
| 870 | # | 883 | # |
| 871 | # I2C system bus drivers (mostly embedded / system-on-chip) | 884 | # I2C system bus drivers (mostly embedded / system-on-chip) |
| 872 | # | 885 | # |
| 886 | # CONFIG_I2C_DESIGNWARE is not set | ||
| 873 | # CONFIG_I2C_OCORES is not set | 887 | # CONFIG_I2C_OCORES is not set |
| 874 | # CONFIG_I2C_SIMTEC is not set | 888 | # CONFIG_I2C_SIMTEC is not set |
| 875 | 889 | ||
| @@ -898,13 +912,17 @@ CONFIG_I2C_ALGOBIT=y | |||
| 898 | # CONFIG_SENSORS_PCF8574 is not set | 912 | # CONFIG_SENSORS_PCF8574 is not set |
| 899 | # CONFIG_PCF8575 is not set | 913 | # CONFIG_PCF8575 is not set |
| 900 | # CONFIG_SENSORS_PCA9539 is not set | 914 | # CONFIG_SENSORS_PCA9539 is not set |
| 901 | # CONFIG_SENSORS_MAX6875 is not set | ||
| 902 | # CONFIG_SENSORS_TSL2550 is not set | 915 | # CONFIG_SENSORS_TSL2550 is not set |
| 903 | # CONFIG_I2C_DEBUG_CORE is not set | 916 | # CONFIG_I2C_DEBUG_CORE is not set |
| 904 | # CONFIG_I2C_DEBUG_ALGO is not set | 917 | # CONFIG_I2C_DEBUG_ALGO is not set |
| 905 | # CONFIG_I2C_DEBUG_BUS is not set | 918 | # CONFIG_I2C_DEBUG_BUS is not set |
| 906 | # CONFIG_I2C_DEBUG_CHIP is not set | 919 | # CONFIG_I2C_DEBUG_CHIP is not set |
| 907 | # CONFIG_SPI is not set | 920 | # CONFIG_SPI is not set |
| 921 | |||
| 922 | # | ||
| 923 | # PPS support | ||
| 924 | # | ||
| 925 | # CONFIG_PPS is not set | ||
| 908 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | 926 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y |
| 909 | # CONFIG_GPIOLIB is not set | 927 | # CONFIG_GPIOLIB is not set |
| 910 | # CONFIG_W1 is not set | 928 | # CONFIG_W1 is not set |
| @@ -959,6 +977,7 @@ CONFIG_HWMON=y | |||
| 959 | # CONFIG_SENSORS_SMSC47B397 is not set | 977 | # CONFIG_SENSORS_SMSC47B397 is not set |
| 960 | # CONFIG_SENSORS_ADS7828 is not set | 978 | # CONFIG_SENSORS_ADS7828 is not set |
| 961 | # CONFIG_SENSORS_THMC50 is not set | 979 | # CONFIG_SENSORS_THMC50 is not set |
| 980 | # CONFIG_SENSORS_TMP401 is not set | ||
| 962 | # CONFIG_SENSORS_VIA686A is not set | 981 | # CONFIG_SENSORS_VIA686A is not set |
| 963 | # CONFIG_SENSORS_VT1211 is not set | 982 | # CONFIG_SENSORS_VT1211 is not set |
| 964 | # CONFIG_SENSORS_VT8231 is not set | 983 | # CONFIG_SENSORS_VT8231 is not set |
| @@ -994,23 +1013,9 @@ CONFIG_SSB_POSSIBLE=y | |||
| 994 | # CONFIG_MFD_WM8400 is not set | 1013 | # CONFIG_MFD_WM8400 is not set |
| 995 | # CONFIG_MFD_WM8350_I2C is not set | 1014 | # CONFIG_MFD_WM8350_I2C is not set |
| 996 | # CONFIG_MFD_PCF50633 is not set | 1015 | # CONFIG_MFD_PCF50633 is not set |
| 1016 | # CONFIG_AB3100_CORE is not set | ||
| 997 | # CONFIG_REGULATOR is not set | 1017 | # CONFIG_REGULATOR is not set |
| 998 | 1018 | # CONFIG_MEDIA_SUPPORT is not set | |
| 999 | # | ||
| 1000 | # Multimedia devices | ||
| 1001 | # | ||
| 1002 | |||
| 1003 | # | ||
| 1004 | # Multimedia core support | ||
| 1005 | # | ||
| 1006 | # CONFIG_VIDEO_DEV is not set | ||
| 1007 | # CONFIG_DVB_CORE is not set | ||
| 1008 | # CONFIG_VIDEO_MEDIA is not set | ||
| 1009 | |||
| 1010 | # | ||
| 1011 | # Multimedia drivers | ||
| 1012 | # | ||
| 1013 | # CONFIG_DAB is not set | ||
| 1014 | 1019 | ||
| 1015 | # | 1020 | # |
| 1016 | # Graphics support | 1021 | # Graphics support |
| @@ -1284,7 +1289,6 @@ CONFIG_USB=y | |||
| 1284 | # | 1289 | # |
| 1285 | # Miscellaneous USB options | 1290 | # Miscellaneous USB options |
| 1286 | # | 1291 | # |
| 1287 | CONFIG_USB_DEVICEFS=y | ||
| 1288 | # CONFIG_USB_DEVICE_CLASS is not set | 1292 | # CONFIG_USB_DEVICE_CLASS is not set |
| 1289 | # CONFIG_USB_DYNAMIC_MINORS is not set | 1293 | # CONFIG_USB_DYNAMIC_MINORS is not set |
| 1290 | # CONFIG_USB_OTG is not set | 1294 | # CONFIG_USB_OTG is not set |
| @@ -1296,6 +1300,7 @@ CONFIG_USB_DEVICEFS=y | |||
| 1296 | # USB Host Controller Drivers | 1300 | # USB Host Controller Drivers |
| 1297 | # | 1301 | # |
| 1298 | # CONFIG_USB_C67X00_HCD is not set | 1302 | # CONFIG_USB_C67X00_HCD is not set |
| 1303 | # CONFIG_USB_XHCI_HCD is not set | ||
| 1299 | CONFIG_USB_EHCI_HCD=m | 1304 | CONFIG_USB_EHCI_HCD=m |
| 1300 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 1305 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
| 1301 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 1306 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set |
| @@ -1374,7 +1379,6 @@ CONFIG_USB_STORAGE=m | |||
| 1374 | # CONFIG_USB_LD is not set | 1379 | # CONFIG_USB_LD is not set |
| 1375 | # CONFIG_USB_TRANCEVIBRATOR is not set | 1380 | # CONFIG_USB_TRANCEVIBRATOR is not set |
| 1376 | # CONFIG_USB_IOWARRIOR is not set | 1381 | # CONFIG_USB_IOWARRIOR is not set |
| 1377 | # CONFIG_USB_TEST is not set | ||
| 1378 | # CONFIG_USB_ISIGHTFW is not set | 1382 | # CONFIG_USB_ISIGHTFW is not set |
| 1379 | # CONFIG_USB_VST is not set | 1383 | # CONFIG_USB_VST is not set |
| 1380 | # CONFIG_USB_GADGET is not set | 1384 | # CONFIG_USB_GADGET is not set |
| @@ -1420,6 +1424,7 @@ CONFIG_RTC_INTF_DEV=y | |||
| 1420 | # CONFIG_RTC_DRV_S35390A is not set | 1424 | # CONFIG_RTC_DRV_S35390A is not set |
| 1421 | # CONFIG_RTC_DRV_FM3130 is not set | 1425 | # CONFIG_RTC_DRV_FM3130 is not set |
| 1422 | # CONFIG_RTC_DRV_RX8581 is not set | 1426 | # CONFIG_RTC_DRV_RX8581 is not set |
| 1427 | # CONFIG_RTC_DRV_RX8025 is not set | ||
| 1423 | 1428 | ||
| 1424 | # | 1429 | # |
| 1425 | # SPI RTC drivers | 1430 | # SPI RTC drivers |
| @@ -1448,6 +1453,10 @@ CONFIG_RTC_DRV_STARFIRE=y | |||
| 1448 | # CONFIG_DMADEVICES is not set | 1453 | # CONFIG_DMADEVICES is not set |
| 1449 | # CONFIG_AUXDISPLAY is not set | 1454 | # CONFIG_AUXDISPLAY is not set |
| 1450 | # CONFIG_UIO is not set | 1455 | # CONFIG_UIO is not set |
| 1456 | |||
| 1457 | # | ||
| 1458 | # TI VLYNQ | ||
| 1459 | # | ||
| 1451 | # CONFIG_STAGING is not set | 1460 | # CONFIG_STAGING is not set |
| 1452 | 1461 | ||
| 1453 | # | 1462 | # |
| @@ -1480,11 +1489,11 @@ CONFIG_FS_MBCACHE=y | |||
| 1480 | # CONFIG_REISERFS_FS is not set | 1489 | # CONFIG_REISERFS_FS is not set |
| 1481 | # CONFIG_JFS_FS is not set | 1490 | # CONFIG_JFS_FS is not set |
| 1482 | CONFIG_FS_POSIX_ACL=y | 1491 | CONFIG_FS_POSIX_ACL=y |
| 1483 | CONFIG_FILE_LOCKING=y | ||
| 1484 | # CONFIG_XFS_FS is not set | 1492 | # CONFIG_XFS_FS is not set |
| 1485 | # CONFIG_GFS2_FS is not set | 1493 | # CONFIG_GFS2_FS is not set |
| 1486 | # CONFIG_OCFS2_FS is not set | 1494 | # CONFIG_OCFS2_FS is not set |
| 1487 | # CONFIG_BTRFS_FS is not set | 1495 | # CONFIG_BTRFS_FS is not set |
| 1496 | CONFIG_FILE_LOCKING=y | ||
| 1488 | CONFIG_FSNOTIFY=y | 1497 | CONFIG_FSNOTIFY=y |
| 1489 | CONFIG_DNOTIFY=y | 1498 | CONFIG_DNOTIFY=y |
| 1490 | CONFIG_INOTIFY=y | 1499 | CONFIG_INOTIFY=y |
| @@ -1560,7 +1569,7 @@ CONFIG_NETWORK_FILESYSTEMS=y | |||
| 1560 | # CONFIG_PARTITION_ADVANCED is not set | 1569 | # CONFIG_PARTITION_ADVANCED is not set |
| 1561 | CONFIG_MSDOS_PARTITION=y | 1570 | CONFIG_MSDOS_PARTITION=y |
| 1562 | CONFIG_SUN_PARTITION=y | 1571 | CONFIG_SUN_PARTITION=y |
| 1563 | CONFIG_NLS=m | 1572 | CONFIG_NLS=y |
| 1564 | CONFIG_NLS_DEFAULT="iso8859-1" | 1573 | CONFIG_NLS_DEFAULT="iso8859-1" |
| 1565 | # CONFIG_NLS_CODEPAGE_437 is not set | 1574 | # CONFIG_NLS_CODEPAGE_437 is not set |
| 1566 | # CONFIG_NLS_CODEPAGE_737 is not set | 1575 | # CONFIG_NLS_CODEPAGE_737 is not set |
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index b049abf9902f..0ff92fa22064 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h | |||
| @@ -726,11 +726,17 @@ extern unsigned long pte_file(pte_t); | |||
| 726 | extern pte_t pgoff_to_pte(unsigned long); | 726 | extern pte_t pgoff_to_pte(unsigned long); |
| 727 | #define PTE_FILE_MAX_BITS (64UL - PAGE_SHIFT - 1UL) | 727 | #define PTE_FILE_MAX_BITS (64UL - PAGE_SHIFT - 1UL) |
| 728 | 728 | ||
| 729 | extern unsigned long *sparc64_valid_addr_bitmap; | 729 | extern unsigned long sparc64_valid_addr_bitmap[]; |
| 730 | 730 | ||
| 731 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ | 731 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ |
| 732 | #define kern_addr_valid(addr) \ | 732 | static inline bool kern_addr_valid(unsigned long addr) |
| 733 | (test_bit(__pa((unsigned long)(addr))>>22, sparc64_valid_addr_bitmap)) | 733 | { |
| 734 | unsigned long paddr = __pa(addr); | ||
| 735 | |||
| 736 | if ((paddr >> 41UL) != 0UL) | ||
| 737 | return false; | ||
| 738 | return test_bit(paddr >> 22, sparc64_valid_addr_bitmap); | ||
| 739 | } | ||
| 734 | 740 | ||
| 735 | extern int page_in_phys_avail(unsigned long paddr); | 741 | extern int page_in_phys_avail(unsigned long paddr); |
| 736 | 742 | ||
diff --git a/arch/sparc/kernel/ktlb.S b/arch/sparc/kernel/ktlb.S index cef8defcd7a9..3ea6e8cde8c5 100644 --- a/arch/sparc/kernel/ktlb.S +++ b/arch/sparc/kernel/ktlb.S | |||
| @@ -151,12 +151,46 @@ kvmap_dtlb_4v: | |||
| 151 | * Must preserve %g1 and %g6 (TAG). | 151 | * Must preserve %g1 and %g6 (TAG). |
| 152 | */ | 152 | */ |
| 153 | kvmap_dtlb_tsb4m_miss: | 153 | kvmap_dtlb_tsb4m_miss: |
| 154 | sethi %hi(kpte_linear_bitmap), %g2 | 154 | /* Clear the PAGE_OFFSET top virtual bits, shift |
| 155 | or %g2, %lo(kpte_linear_bitmap), %g2 | 155 | * down to get PFN, and make sure PFN is in range. |
| 156 | */ | ||
| 157 | sllx %g4, 21, %g5 | ||
| 156 | 158 | ||
| 157 | /* Clear the PAGE_OFFSET top virtual bits, then shift | 159 | /* Check to see if we know about valid memory at the 4MB |
| 158 | * down to get a 256MB physical address index. | 160 | * chunk this physical address will reside within. |
| 159 | */ | 161 | */ |
| 162 | srlx %g5, 21 + 41, %g2 | ||
| 163 | brnz,pn %g2, kvmap_dtlb_longpath | ||
| 164 | nop | ||
| 165 | |||
| 166 | /* This unconditional branch and delay-slot nop gets patched | ||
| 167 | * by the sethi sequence once the bitmap is properly setup. | ||
| 168 | */ | ||
| 169 | .globl valid_addr_bitmap_insn | ||
| 170 | valid_addr_bitmap_insn: | ||
| 171 | ba,pt %xcc, 2f | ||
| 172 | nop | ||
| 173 | .subsection 2 | ||
| 174 | .globl valid_addr_bitmap_patch | ||
| 175 | valid_addr_bitmap_patch: | ||
| 176 | sethi %hi(sparc64_valid_addr_bitmap), %g7 | ||
| 177 | or %g7, %lo(sparc64_valid_addr_bitmap), %g7 | ||
| 178 | .previous | ||
| 179 | |||
| 180 | srlx %g5, 21 + 22, %g2 | ||
| 181 | srlx %g2, 6, %g5 | ||
| 182 | and %g2, 63, %g2 | ||
| 183 | sllx %g5, 3, %g5 | ||
| 184 | ldx [%g7 + %g5], %g5 | ||
| 185 | mov 1, %g7 | ||
| 186 | sllx %g7, %g2, %g7 | ||
| 187 | andcc %g5, %g7, %g0 | ||
| 188 | be,pn %xcc, kvmap_dtlb_longpath | ||
| 189 | |||
| 190 | 2: sethi %hi(kpte_linear_bitmap), %g2 | ||
| 191 | or %g2, %lo(kpte_linear_bitmap), %g2 | ||
| 192 | |||
| 193 | /* Get the 256MB physical address index. */ | ||
| 160 | sllx %g4, 21, %g5 | 194 | sllx %g4, 21, %g5 |
| 161 | mov 1, %g7 | 195 | mov 1, %g7 |
| 162 | srlx %g5, 21 + 28, %g5 | 196 | srlx %g5, 21 + 28, %g5 |
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index 54fb02468f0d..68791cad7b74 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c | |||
| @@ -162,9 +162,6 @@ extern void cpu_panic(void); | |||
| 162 | */ | 162 | */ |
| 163 | 163 | ||
| 164 | extern struct linux_prom_registers smp_penguin_ctable; | 164 | extern struct linux_prom_registers smp_penguin_ctable; |
| 165 | extern unsigned long trapbase_cpu1[]; | ||
| 166 | extern unsigned long trapbase_cpu2[]; | ||
| 167 | extern unsigned long trapbase_cpu3[]; | ||
| 168 | 165 | ||
| 169 | void __init smp4d_boot_cpus(void) | 166 | void __init smp4d_boot_cpus(void) |
| 170 | { | 167 | { |
| @@ -235,25 +232,6 @@ void __init smp4d_smp_done(void) | |||
| 235 | *prev = first; | 232 | *prev = first; |
| 236 | local_flush_cache_all(); | 233 | local_flush_cache_all(); |
| 237 | 234 | ||
| 238 | /* Free unneeded trap tables */ | ||
| 239 | ClearPageReserved(virt_to_page(trapbase_cpu1)); | ||
| 240 | init_page_count(virt_to_page(trapbase_cpu1)); | ||
| 241 | free_page((unsigned long)trapbase_cpu1); | ||
| 242 | totalram_pages++; | ||
| 243 | num_physpages++; | ||
| 244 | |||
| 245 | ClearPageReserved(virt_to_page(trapbase_cpu2)); | ||
| 246 | init_page_count(virt_to_page(trapbase_cpu2)); | ||
| 247 | free_page((unsigned long)trapbase_cpu2); | ||
| 248 | totalram_pages++; | ||
| 249 | num_physpages++; | ||
| 250 | |||
| 251 | ClearPageReserved(virt_to_page(trapbase_cpu3)); | ||
| 252 | init_page_count(virt_to_page(trapbase_cpu3)); | ||
| 253 | free_page((unsigned long)trapbase_cpu3); | ||
| 254 | totalram_pages++; | ||
| 255 | num_physpages++; | ||
| 256 | |||
| 257 | /* Ok, they are spinning and ready to go. */ | 235 | /* Ok, they are spinning and ready to go. */ |
| 258 | smp_processors_ready = 1; | 236 | smp_processors_ready = 1; |
| 259 | sun4d_distribute_irqs(); | 237 | sun4d_distribute_irqs(); |
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index 960b113d0006..762d6eedd944 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c | |||
| @@ -121,9 +121,6 @@ void __cpuinit smp4m_callin(void) | |||
| 121 | */ | 121 | */ |
| 122 | 122 | ||
| 123 | extern struct linux_prom_registers smp_penguin_ctable; | 123 | extern struct linux_prom_registers smp_penguin_ctable; |
| 124 | extern unsigned long trapbase_cpu1[]; | ||
| 125 | extern unsigned long trapbase_cpu2[]; | ||
| 126 | extern unsigned long trapbase_cpu3[]; | ||
| 127 | 124 | ||
| 128 | void __init smp4m_boot_cpus(void) | 125 | void __init smp4m_boot_cpus(void) |
| 129 | { | 126 | { |
| @@ -193,29 +190,6 @@ void __init smp4m_smp_done(void) | |||
| 193 | *prev = first; | 190 | *prev = first; |
| 194 | local_flush_cache_all(); | 191 | local_flush_cache_all(); |
| 195 | 192 | ||
| 196 | /* Free unneeded trap tables */ | ||
| 197 | if (!cpu_isset(1, cpu_present_map)) { | ||
| 198 | ClearPageReserved(virt_to_page(trapbase_cpu1)); | ||
| 199 | init_page_count(virt_to_page(trapbase_cpu1)); | ||
| 200 | free_page((unsigned long)trapbase_cpu1); | ||
| 201 | totalram_pages++; | ||
| 202 | num_physpages++; | ||
| 203 | } | ||
| 204 | if (!cpu_isset(2, cpu_present_map)) { | ||
| 205 | ClearPageReserved(virt_to_page(trapbase_cpu2)); | ||
| 206 | init_page_count(virt_to_page(trapbase_cpu2)); | ||
| 207 | free_page((unsigned long)trapbase_cpu2); | ||
| 208 | totalram_pages++; | ||
| 209 | num_physpages++; | ||
| 210 | } | ||
| 211 | if (!cpu_isset(3, cpu_present_map)) { | ||
| 212 | ClearPageReserved(virt_to_page(trapbase_cpu3)); | ||
| 213 | init_page_count(virt_to_page(trapbase_cpu3)); | ||
| 214 | free_page((unsigned long)trapbase_cpu3); | ||
| 215 | totalram_pages++; | ||
| 216 | num_physpages++; | ||
| 217 | } | ||
| 218 | |||
| 219 | /* Ok, they are spinning and ready to go. */ | 193 | /* Ok, they are spinning and ready to go. */ |
| 220 | } | 194 | } |
| 221 | 195 | ||
diff --git a/arch/sparc/kernel/sys32.S b/arch/sparc/kernel/sys32.S index f061c4dda9ef..aed94869ad6a 100644 --- a/arch/sparc/kernel/sys32.S +++ b/arch/sparc/kernel/sys32.S | |||
| @@ -134,10 +134,12 @@ SIGN1(sys32_getpeername, sys_getpeername, %o0) | |||
| 134 | SIGN1(sys32_getsockname, sys_getsockname, %o0) | 134 | SIGN1(sys32_getsockname, sys_getsockname, %o0) |
| 135 | SIGN2(sys32_ioprio_get, sys_ioprio_get, %o0, %o1) | 135 | SIGN2(sys32_ioprio_get, sys_ioprio_get, %o0, %o1) |
| 136 | SIGN3(sys32_ioprio_set, sys_ioprio_set, %o0, %o1, %o2) | 136 | SIGN3(sys32_ioprio_set, sys_ioprio_set, %o0, %o1, %o2) |
| 137 | SIGN2(sys32_splice, sys_splice, %o0, %o1) | 137 | SIGN2(sys32_splice, sys_splice, %o0, %o2) |
| 138 | SIGN2(sys32_sync_file_range, compat_sync_file_range, %o0, %o5) | 138 | SIGN2(sys32_sync_file_range, compat_sync_file_range, %o0, %o5) |
| 139 | SIGN2(sys32_tee, sys_tee, %o0, %o1) | 139 | SIGN2(sys32_tee, sys_tee, %o0, %o1) |
| 140 | SIGN1(sys32_vmsplice, compat_sys_vmsplice, %o0) | 140 | SIGN1(sys32_vmsplice, compat_sys_vmsplice, %o0) |
| 141 | SIGN1(sys32_truncate, sys_truncate, %o1) | ||
| 142 | SIGN1(sys32_ftruncate, sys_ftruncate, %o1) | ||
| 141 | 143 | ||
| 142 | .globl sys32_mmap2 | 144 | .globl sys32_mmap2 |
| 143 | sys32_mmap2: | 145 | sys32_mmap2: |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 6b3ee88e253c..2ee7250ba7ae 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
| @@ -43,8 +43,8 @@ sys_call_table32: | |||
| 43 | /*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall | 43 | /*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall |
| 44 | .word sys32_getgroups, compat_sys_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd | 44 | .word sys32_getgroups, compat_sys_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd |
| 45 | /*120*/ .word compat_sys_readv, compat_sys_writev, compat_sys_settimeofday, sys_fchown16, sys_fchmod | 45 | /*120*/ .word compat_sys_readv, compat_sys_writev, compat_sys_settimeofday, sys_fchown16, sys_fchmod |
| 46 | .word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, sys_truncate | 46 | .word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, sys32_truncate |
| 47 | /*130*/ .word sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall | 47 | /*130*/ .word sys32_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall |
| 48 | .word sys_nis_syscall, sys32_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64 | 48 | .word sys_nis_syscall, sys32_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64 |
| 49 | /*140*/ .word sys32_sendfile64, sys_nis_syscall, sys32_futex, sys_gettid, compat_sys_getrlimit | 49 | /*140*/ .word sys32_sendfile64, sys_nis_syscall, sys32_futex, sys_gettid, compat_sys_getrlimit |
| 50 | .word compat_sys_setrlimit, sys_pivot_root, sys32_prctl, sys_pciconfig_read, sys_pciconfig_write | 50 | .word compat_sys_setrlimit, sys_pivot_root, sys32_prctl, sys_pciconfig_read, sys_pciconfig_write |
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c index a5e30c642ee3..b99f81c4906f 100644 --- a/arch/sparc/mm/fault_32.c +++ b/arch/sparc/mm/fault_32.c | |||
| @@ -319,9 +319,10 @@ no_context: | |||
| 319 | */ | 319 | */ |
| 320 | out_of_memory: | 320 | out_of_memory: |
| 321 | up_read(&mm->mmap_sem); | 321 | up_read(&mm->mmap_sem); |
| 322 | printk("VM: killing process %s\n", tsk->comm); | 322 | if (from_user) { |
| 323 | if (from_user) | 323 | pagefault_out_of_memory(); |
| 324 | do_group_exit(SIGKILL); | 324 | return; |
| 325 | } | ||
| 325 | goto no_context; | 326 | goto no_context; |
| 326 | 327 | ||
| 327 | do_sigbus: | 328 | do_sigbus: |
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c index e5620b27c8bf..43b0da96a4fb 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c | |||
| @@ -447,9 +447,10 @@ handle_kernel_fault: | |||
| 447 | out_of_memory: | 447 | out_of_memory: |
| 448 | insn = get_fault_insn(regs, insn); | 448 | insn = get_fault_insn(regs, insn); |
| 449 | up_read(&mm->mmap_sem); | 449 | up_read(&mm->mmap_sem); |
| 450 | printk("VM: killing process %s\n", current->comm); | 450 | if (!(regs->tstate & TSTATE_PRIV)) { |
| 451 | if (!(regs->tstate & TSTATE_PRIV)) | 451 | pagefault_out_of_memory(); |
| 452 | do_group_exit(SIGKILL); | 452 | return; |
| 453 | } | ||
| 453 | goto handle_kernel_fault; | 454 | goto handle_kernel_fault; |
| 454 | 455 | ||
| 455 | intr_or_no_mm: | 456 | intr_or_no_mm: |
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index ed6be6ba2f4e..a70a5e1904d9 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
| @@ -145,7 +145,8 @@ static void __init read_obp_memory(const char *property, | |||
| 145 | cmp_p64, NULL); | 145 | cmp_p64, NULL); |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | unsigned long *sparc64_valid_addr_bitmap __read_mostly; | 148 | unsigned long sparc64_valid_addr_bitmap[VALID_ADDR_BITMAP_BYTES / |
| 149 | sizeof(unsigned long)]; | ||
| 149 | EXPORT_SYMBOL(sparc64_valid_addr_bitmap); | 150 | EXPORT_SYMBOL(sparc64_valid_addr_bitmap); |
| 150 | 151 | ||
| 151 | /* Kernel physical address base and size in bytes. */ | 152 | /* Kernel physical address base and size in bytes. */ |
| @@ -1874,7 +1875,7 @@ static int pavail_rescan_ents __initdata; | |||
| 1874 | * memory list again, and make sure it provides at least as much | 1875 | * memory list again, and make sure it provides at least as much |
| 1875 | * memory as 'pavail' does. | 1876 | * memory as 'pavail' does. |
| 1876 | */ | 1877 | */ |
| 1877 | static void __init setup_valid_addr_bitmap_from_pavail(void) | 1878 | static void __init setup_valid_addr_bitmap_from_pavail(unsigned long *bitmap) |
| 1878 | { | 1879 | { |
| 1879 | int i; | 1880 | int i; |
| 1880 | 1881 | ||
| @@ -1897,8 +1898,7 @@ static void __init setup_valid_addr_bitmap_from_pavail(void) | |||
| 1897 | 1898 | ||
| 1898 | if (new_start <= old_start && | 1899 | if (new_start <= old_start && |
| 1899 | new_end >= (old_start + PAGE_SIZE)) { | 1900 | new_end >= (old_start + PAGE_SIZE)) { |
| 1900 | set_bit(old_start >> 22, | 1901 | set_bit(old_start >> 22, bitmap); |
| 1901 | sparc64_valid_addr_bitmap); | ||
| 1902 | goto do_next_page; | 1902 | goto do_next_page; |
| 1903 | } | 1903 | } |
| 1904 | } | 1904 | } |
| @@ -1919,20 +1919,21 @@ static void __init setup_valid_addr_bitmap_from_pavail(void) | |||
| 1919 | } | 1919 | } |
| 1920 | } | 1920 | } |
| 1921 | 1921 | ||
| 1922 | static void __init patch_tlb_miss_handler_bitmap(void) | ||
| 1923 | { | ||
| 1924 | extern unsigned int valid_addr_bitmap_insn[]; | ||
| 1925 | extern unsigned int valid_addr_bitmap_patch[]; | ||
| 1926 | |||
| 1927 | valid_addr_bitmap_insn[1] = valid_addr_bitmap_patch[1]; | ||
| 1928 | mb(); | ||
| 1929 | valid_addr_bitmap_insn[0] = valid_addr_bitmap_patch[0]; | ||
| 1930 | flushi(&valid_addr_bitmap_insn[0]); | ||
| 1931 | } | ||
| 1932 | |||
| 1922 | void __init mem_init(void) | 1933 | void __init mem_init(void) |
| 1923 | { | 1934 | { |
| 1924 | unsigned long codepages, datapages, initpages; | 1935 | unsigned long codepages, datapages, initpages; |
| 1925 | unsigned long addr, last; | 1936 | unsigned long addr, last; |
| 1926 | int i; | ||
| 1927 | |||
| 1928 | i = last_valid_pfn >> ((22 - PAGE_SHIFT) + 6); | ||
| 1929 | i += 1; | ||
| 1930 | sparc64_valid_addr_bitmap = (unsigned long *) alloc_bootmem(i << 3); | ||
| 1931 | if (sparc64_valid_addr_bitmap == NULL) { | ||
| 1932 | prom_printf("mem_init: Cannot alloc valid_addr_bitmap.\n"); | ||
| 1933 | prom_halt(); | ||
| 1934 | } | ||
| 1935 | memset(sparc64_valid_addr_bitmap, 0, i << 3); | ||
| 1936 | 1937 | ||
| 1937 | addr = PAGE_OFFSET + kern_base; | 1938 | addr = PAGE_OFFSET + kern_base; |
| 1938 | last = PAGE_ALIGN(kern_size) + addr; | 1939 | last = PAGE_ALIGN(kern_size) + addr; |
| @@ -1941,15 +1942,19 @@ void __init mem_init(void) | |||
| 1941 | addr += PAGE_SIZE; | 1942 | addr += PAGE_SIZE; |
| 1942 | } | 1943 | } |
| 1943 | 1944 | ||
| 1944 | setup_valid_addr_bitmap_from_pavail(); | 1945 | setup_valid_addr_bitmap_from_pavail(sparc64_valid_addr_bitmap); |
| 1946 | patch_tlb_miss_handler_bitmap(); | ||
| 1945 | 1947 | ||
| 1946 | high_memory = __va(last_valid_pfn << PAGE_SHIFT); | 1948 | high_memory = __va(last_valid_pfn << PAGE_SHIFT); |
| 1947 | 1949 | ||
| 1948 | #ifdef CONFIG_NEED_MULTIPLE_NODES | 1950 | #ifdef CONFIG_NEED_MULTIPLE_NODES |
| 1949 | for_each_online_node(i) { | 1951 | { |
| 1950 | if (NODE_DATA(i)->node_spanned_pages != 0) { | 1952 | int i; |
| 1951 | totalram_pages += | 1953 | for_each_online_node(i) { |
| 1952 | free_all_bootmem_node(NODE_DATA(i)); | 1954 | if (NODE_DATA(i)->node_spanned_pages != 0) { |
| 1955 | totalram_pages += | ||
| 1956 | free_all_bootmem_node(NODE_DATA(i)); | ||
| 1957 | } | ||
| 1953 | } | 1958 | } |
| 1954 | } | 1959 | } |
| 1955 | #else | 1960 | #else |
diff --git a/arch/sparc/mm/init_64.h b/arch/sparc/mm/init_64.h index 16063870a489..c2f772dbd556 100644 --- a/arch/sparc/mm/init_64.h +++ b/arch/sparc/mm/init_64.h | |||
| @@ -5,10 +5,13 @@ | |||
| 5 | * marked non-static so that assembler code can get at them. | 5 | * marked non-static so that assembler code can get at them. |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #define MAX_PHYS_ADDRESS (1UL << 42UL) | 8 | #define MAX_PHYS_ADDRESS (1UL << 41UL) |
| 9 | #define KPTE_BITMAP_CHUNK_SZ (256UL * 1024UL * 1024UL) | 9 | #define KPTE_BITMAP_CHUNK_SZ (256UL * 1024UL * 1024UL) |
| 10 | #define KPTE_BITMAP_BYTES \ | 10 | #define KPTE_BITMAP_BYTES \ |
| 11 | ((MAX_PHYS_ADDRESS / KPTE_BITMAP_CHUNK_SZ) / 8) | 11 | ((MAX_PHYS_ADDRESS / KPTE_BITMAP_CHUNK_SZ) / 8) |
| 12 | #define VALID_ADDR_BITMAP_CHUNK_SZ (4UL * 1024UL * 1024UL) | ||
| 13 | #define VALID_ADDR_BITMAP_BYTES \ | ||
| 14 | ((MAX_PHYS_ADDRESS / VALID_ADDR_BITMAP_CHUNK_SZ) / 8) | ||
| 12 | 15 | ||
| 13 | extern unsigned long kern_linear_pte_xor[2]; | 16 | extern unsigned long kern_linear_pte_xor[2]; |
| 14 | extern unsigned long kpte_linear_bitmap[KPTE_BITMAP_BYTES / sizeof(unsigned long)]; | 17 | extern unsigned long kpte_linear_bitmap[KPTE_BITMAP_BYTES / sizeof(unsigned long)]; |
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index e2ff504b4ddc..f8ed0658404c 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | # create a compressed vmlinux image from the original vmlinux | 4 | # create a compressed vmlinux image from the original vmlinux |
| 5 | # | 5 | # |
| 6 | 6 | ||
| 7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o | 7 | targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o |
| 8 | 8 | ||
| 9 | KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 | 9 | KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 |
| 10 | KBUILD_CFLAGS += -fno-strict-aliasing -fPIC | 10 | KBUILD_CFLAGS += -fno-strict-aliasing -fPIC |
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 3cc06e3fceb8..16748077559a 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _ASM_X86_PGTABLE_H | 2 | #define _ASM_X86_PGTABLE_H |
| 3 | 3 | ||
| 4 | #include <asm/page.h> | 4 | #include <asm/page.h> |
| 5 | #include <asm/e820.h> | ||
| 5 | 6 | ||
| 6 | #include <asm/pgtable_types.h> | 7 | #include <asm/pgtable_types.h> |
| 7 | 8 | ||
| @@ -269,10 +270,17 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) | |||
| 269 | 270 | ||
| 270 | #define canon_pgprot(p) __pgprot(massage_pgprot(p)) | 271 | #define canon_pgprot(p) __pgprot(massage_pgprot(p)) |
| 271 | 272 | ||
| 272 | static inline int is_new_memtype_allowed(unsigned long flags, | 273 | static inline int is_new_memtype_allowed(u64 paddr, unsigned long size, |
| 273 | unsigned long new_flags) | 274 | unsigned long flags, |
| 275 | unsigned long new_flags) | ||
| 274 | { | 276 | { |
| 275 | /* | 277 | /* |
| 278 | * PAT type is always WB for ISA. So no need to check. | ||
| 279 | */ | ||
| 280 | if (is_ISA_range(paddr, paddr + size - 1)) | ||
| 281 | return 1; | ||
| 282 | |||
| 283 | /* | ||
| 276 | * Certain new memtypes are not allowed with certain | 284 | * Certain new memtypes are not allowed with certain |
| 277 | * requested memtype: | 285 | * requested memtype: |
| 278 | * - request is uncached, return cannot be write-back | 286 | * - request is uncached, return cannot be write-back |
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile index 3efcb2b96a15..c1f253dac155 100644 --- a/arch/x86/kernel/cpu/Makefile +++ b/arch/x86/kernel/cpu/Makefile | |||
| @@ -7,6 +7,10 @@ ifdef CONFIG_FUNCTION_TRACER | |||
| 7 | CFLAGS_REMOVE_common.o = -pg | 7 | CFLAGS_REMOVE_common.o = -pg |
| 8 | endif | 8 | endif |
| 9 | 9 | ||
| 10 | # Make sure load_percpu_segment has no stackprotector | ||
| 11 | nostackp := $(call cc-option, -fno-stack-protector) | ||
| 12 | CFLAGS_common.o := $(nostackp) | ||
| 13 | |||
| 10 | obj-y := intel_cacheinfo.o addon_cpuid_features.o | 14 | obj-y := intel_cacheinfo.o addon_cpuid_features.o |
| 11 | obj-y += proc.o capflags.o powerflags.o common.o | 15 | obj-y += proc.o capflags.o powerflags.o common.o |
| 12 | obj-y += vmware.o hypervisor.o | 16 | obj-y += vmware.o hypervisor.o |
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index 0d98a01cbdb2..cc827ac9e8d3 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
| @@ -261,9 +261,7 @@ page_pde_offset = (__PAGE_OFFSET >> 20); | |||
| 261 | * which will be freed later | 261 | * which will be freed later |
| 262 | */ | 262 | */ |
| 263 | 263 | ||
| 264 | #ifndef CONFIG_HOTPLUG_CPU | 264 | __CPUINIT |
| 265 | .section .init.text,"ax",@progbits | ||
| 266 | #endif | ||
| 267 | 265 | ||
| 268 | #ifdef CONFIG_SMP | 266 | #ifdef CONFIG_SMP |
| 269 | ENTRY(startup_32_smp) | 267 | ENTRY(startup_32_smp) |
| @@ -602,11 +600,7 @@ ignore_int: | |||
| 602 | #endif | 600 | #endif |
| 603 | iret | 601 | iret |
| 604 | 602 | ||
| 605 | #ifndef CONFIG_HOTPLUG_CPU | ||
| 606 | __CPUINITDATA | ||
| 607 | #else | ||
| 608 | __REFDATA | 603 | __REFDATA |
| 609 | #endif | ||
| 610 | .align 4 | 604 | .align 4 |
| 611 | ENTRY(initial_code) | 605 | ENTRY(initial_code) |
| 612 | .long i386_start_kernel | 606 | .long i386_start_kernel |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 994dd6a4a2a0..071166a4ba83 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
| @@ -519,16 +519,12 @@ static void c1e_idle(void) | |||
| 519 | if (!cpumask_test_cpu(cpu, c1e_mask)) { | 519 | if (!cpumask_test_cpu(cpu, c1e_mask)) { |
| 520 | cpumask_set_cpu(cpu, c1e_mask); | 520 | cpumask_set_cpu(cpu, c1e_mask); |
| 521 | /* | 521 | /* |
| 522 | * Force broadcast so ACPI can not interfere. Needs | 522 | * Force broadcast so ACPI can not interfere. |
| 523 | * to run with interrupts enabled as it uses | ||
| 524 | * smp_function_call. | ||
| 525 | */ | 523 | */ |
| 526 | local_irq_enable(); | ||
| 527 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_FORCE, | 524 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_FORCE, |
| 528 | &cpu); | 525 | &cpu); |
| 529 | printk(KERN_INFO "Switch to broadcast mode on CPU%d\n", | 526 | printk(KERN_INFO "Switch to broadcast mode on CPU%d\n", |
| 530 | cpu); | 527 | cpu); |
| 531 | local_irq_disable(); | ||
| 532 | } | 528 | } |
| 533 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu); | 529 | clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu); |
| 534 | 530 | ||
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 78d185d797de..9fc178255c04 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S | |||
| @@ -46,11 +46,10 @@ PHDRS { | |||
| 46 | data PT_LOAD FLAGS(7); /* RWE */ | 46 | data PT_LOAD FLAGS(7); /* RWE */ |
| 47 | #ifdef CONFIG_X86_64 | 47 | #ifdef CONFIG_X86_64 |
| 48 | user PT_LOAD FLAGS(7); /* RWE */ | 48 | user PT_LOAD FLAGS(7); /* RWE */ |
| 49 | data.init PT_LOAD FLAGS(7); /* RWE */ | ||
| 50 | #ifdef CONFIG_SMP | 49 | #ifdef CONFIG_SMP |
| 51 | percpu PT_LOAD FLAGS(7); /* RWE */ | 50 | percpu PT_LOAD FLAGS(7); /* RWE */ |
| 52 | #endif | 51 | #endif |
| 53 | data.init2 PT_LOAD FLAGS(7); /* RWE */ | 52 | init PT_LOAD FLAGS(7); /* RWE */ |
| 54 | #endif | 53 | #endif |
| 55 | note PT_NOTE FLAGS(0); /* ___ */ | 54 | note PT_NOTE FLAGS(0); /* ___ */ |
| 56 | } | 55 | } |
| @@ -103,65 +102,43 @@ SECTIONS | |||
| 103 | __stop___ex_table = .; | 102 | __stop___ex_table = .; |
| 104 | } :text = 0x9090 | 103 | } :text = 0x9090 |
| 105 | 104 | ||
| 106 | RODATA | 105 | RO_DATA(PAGE_SIZE) |
| 107 | 106 | ||
| 108 | /* Data */ | 107 | /* Data */ |
| 109 | . = ALIGN(PAGE_SIZE); | ||
| 110 | .data : AT(ADDR(.data) - LOAD_OFFSET) { | 108 | .data : AT(ADDR(.data) - LOAD_OFFSET) { |
| 111 | /* Start of data section */ | 109 | /* Start of data section */ |
| 112 | _sdata = .; | 110 | _sdata = .; |
| 113 | DATA_DATA | 111 | |
| 114 | CONSTRUCTORS | 112 | /* init_task */ |
| 115 | } :data | 113 | INIT_TASK_DATA(THREAD_SIZE) |
| 116 | 114 | ||
| 117 | #ifdef CONFIG_X86_32 | 115 | #ifdef CONFIG_X86_32 |
| 118 | /* 32 bit has nosave before _edata */ | 116 | /* 32 bit has nosave before _edata */ |
| 119 | . = ALIGN(PAGE_SIZE); | 117 | NOSAVE_DATA |
| 120 | .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { | ||
| 121 | __nosave_begin = .; | ||
| 122 | *(.data.nosave) | ||
| 123 | . = ALIGN(PAGE_SIZE); | ||
| 124 | __nosave_end = .; | ||
| 125 | } | ||
| 126 | #endif | 118 | #endif |
| 127 | 119 | ||
| 128 | . = ALIGN(PAGE_SIZE); | 120 | PAGE_ALIGNED_DATA(PAGE_SIZE) |
| 129 | .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { | ||
| 130 | *(.data.page_aligned) | ||
| 131 | *(.data.idt) | 121 | *(.data.idt) |
| 132 | } | ||
| 133 | 122 | ||
| 134 | #ifdef CONFIG_X86_32 | 123 | CACHELINE_ALIGNED_DATA(CONFIG_X86_L1_CACHE_BYTES) |
| 135 | . = ALIGN(32); | ||
| 136 | #else | ||
| 137 | . = ALIGN(PAGE_SIZE); | ||
| 138 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); | ||
| 139 | #endif | ||
| 140 | .data.cacheline_aligned : | ||
| 141 | AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { | ||
| 142 | *(.data.cacheline_aligned) | ||
| 143 | } | ||
| 144 | 124 | ||
| 145 | /* rarely changed data like cpu maps */ | 125 | DATA_DATA |
| 146 | #ifdef CONFIG_X86_32 | 126 | CONSTRUCTORS |
| 147 | . = ALIGN(32); | 127 | |
| 148 | #else | 128 | /* rarely changed data like cpu maps */ |
| 149 | . = ALIGN(CONFIG_X86_INTERNODE_CACHE_BYTES); | 129 | READ_MOSTLY_DATA(CONFIG_X86_INTERNODE_CACHE_BYTES) |
| 150 | #endif | ||
| 151 | .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { | ||
| 152 | *(.data.read_mostly) | ||
| 153 | 130 | ||
| 154 | /* End of data section */ | 131 | /* End of data section */ |
| 155 | _edata = .; | 132 | _edata = .; |
| 156 | } | 133 | } :data |
| 157 | 134 | ||
| 158 | #ifdef CONFIG_X86_64 | 135 | #ifdef CONFIG_X86_64 |
| 159 | 136 | ||
| 160 | #define VSYSCALL_ADDR (-10*1024*1024) | 137 | #define VSYSCALL_ADDR (-10*1024*1024) |
| 161 | #define VSYSCALL_PHYS_ADDR ((LOADADDR(.data.read_mostly) + \ | 138 | #define VSYSCALL_PHYS_ADDR ((LOADADDR(.data) + SIZEOF(.data) + \ |
| 162 | SIZEOF(.data.read_mostly) + 4095) & ~(4095)) | 139 | PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)) |
| 163 | #define VSYSCALL_VIRT_ADDR ((ADDR(.data.read_mostly) + \ | 140 | #define VSYSCALL_VIRT_ADDR ((ADDR(.data) + SIZEOF(.data) + \ |
| 164 | SIZEOF(.data.read_mostly) + 4095) & ~(4095)) | 141 | PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)) |
| 165 | 142 | ||
| 166 | #define VLOAD_OFFSET (VSYSCALL_ADDR - VSYSCALL_PHYS_ADDR) | 143 | #define VLOAD_OFFSET (VSYSCALL_ADDR - VSYSCALL_PHYS_ADDR) |
| 167 | #define VLOAD(x) (ADDR(x) - VLOAD_OFFSET) | 144 | #define VLOAD(x) (ADDR(x) - VLOAD_OFFSET) |
| @@ -227,35 +204,29 @@ SECTIONS | |||
| 227 | 204 | ||
| 228 | #endif /* CONFIG_X86_64 */ | 205 | #endif /* CONFIG_X86_64 */ |
| 229 | 206 | ||
| 230 | /* init_task */ | 207 | /* Init code and data - will be freed after init */ |
| 231 | . = ALIGN(THREAD_SIZE); | 208 | . = ALIGN(PAGE_SIZE); |
| 232 | .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { | 209 | .init.begin : AT(ADDR(.init.begin) - LOAD_OFFSET) { |
| 233 | *(.data.init_task) | 210 | __init_begin = .; /* paired with __init_end */ |
| 234 | } | 211 | } |
| 235 | #ifdef CONFIG_X86_64 | ||
| 236 | :data.init | ||
| 237 | #endif | ||
| 238 | 212 | ||
| 213 | #if defined(CONFIG_X86_64) && defined(CONFIG_SMP) | ||
| 239 | /* | 214 | /* |
| 240 | * smp_locks might be freed after init | 215 | * percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the |
| 241 | * start/end must be page aligned | 216 | * output PHDR, so the next output section - .init.text - should |
| 217 | * start another segment - init. | ||
| 242 | */ | 218 | */ |
| 243 | . = ALIGN(PAGE_SIZE); | 219 | PERCPU_VADDR(0, :percpu) |
| 244 | .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { | 220 | #endif |
| 245 | __smp_locks = .; | ||
| 246 | *(.smp_locks) | ||
| 247 | __smp_locks_end = .; | ||
| 248 | . = ALIGN(PAGE_SIZE); | ||
| 249 | } | ||
| 250 | 221 | ||
| 251 | /* Init code and data - will be freed after init */ | ||
| 252 | . = ALIGN(PAGE_SIZE); | ||
| 253 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { | 222 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { |
| 254 | __init_begin = .; /* paired with __init_end */ | ||
| 255 | _sinittext = .; | 223 | _sinittext = .; |
| 256 | INIT_TEXT | 224 | INIT_TEXT |
| 257 | _einittext = .; | 225 | _einittext = .; |
| 258 | } | 226 | } |
| 227 | #ifdef CONFIG_X86_64 | ||
| 228 | :init | ||
| 229 | #endif | ||
| 259 | 230 | ||
| 260 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { | 231 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { |
| 261 | INIT_DATA | 232 | INIT_DATA |
| @@ -326,17 +297,7 @@ SECTIONS | |||
| 326 | } | 297 | } |
| 327 | #endif | 298 | #endif |
| 328 | 299 | ||
| 329 | #if defined(CONFIG_X86_64) && defined(CONFIG_SMP) | 300 | #if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP) |
| 330 | /* | ||
| 331 | * percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the | ||
| 332 | * output PHDR, so the next output section - __data_nosave - should | ||
| 333 | * start another section data.init2. Also, pda should be at the head of | ||
| 334 | * percpu area. Preallocate it and define the percpu offset symbol | ||
| 335 | * so that it can be accessed as a percpu variable. | ||
| 336 | */ | ||
| 337 | . = ALIGN(PAGE_SIZE); | ||
| 338 | PERCPU_VADDR(0, :percpu) | ||
| 339 | #else | ||
| 340 | PERCPU(PAGE_SIZE) | 301 | PERCPU(PAGE_SIZE) |
| 341 | #endif | 302 | #endif |
| 342 | 303 | ||
| @@ -347,15 +308,22 @@ SECTIONS | |||
| 347 | __init_end = .; | 308 | __init_end = .; |
| 348 | } | 309 | } |
| 349 | 310 | ||
| 311 | /* | ||
| 312 | * smp_locks might be freed after init | ||
| 313 | * start/end must be page aligned | ||
| 314 | */ | ||
| 315 | . = ALIGN(PAGE_SIZE); | ||
| 316 | .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { | ||
| 317 | __smp_locks = .; | ||
| 318 | *(.smp_locks) | ||
| 319 | __smp_locks_end = .; | ||
| 320 | . = ALIGN(PAGE_SIZE); | ||
| 321 | } | ||
| 322 | |||
| 350 | #ifdef CONFIG_X86_64 | 323 | #ifdef CONFIG_X86_64 |
| 351 | .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { | 324 | .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { |
| 352 | . = ALIGN(PAGE_SIZE); | 325 | NOSAVE_DATA |
| 353 | __nosave_begin = .; | 326 | } |
| 354 | *(.data.nosave) | ||
| 355 | . = ALIGN(PAGE_SIZE); | ||
| 356 | __nosave_end = .; | ||
| 357 | } :data.init2 | ||
| 358 | /* use another section data.init2, see PERCPU_VADDR() above */ | ||
| 359 | #endif | 327 | #endif |
| 360 | 328 | ||
| 361 | /* BSS */ | 329 | /* BSS */ |
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 6176fe8f29e0..ea56b8cbb6a6 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
| @@ -796,7 +796,7 @@ int __init reserve_bootmem_generic(unsigned long phys, unsigned long len, | |||
| 796 | return ret; | 796 | return ret; |
| 797 | 797 | ||
| 798 | #else | 798 | #else |
| 799 | reserve_bootmem(phys, len, BOOTMEM_DEFAULT); | 799 | reserve_bootmem(phys, len, flags); |
| 800 | #endif | 800 | #endif |
| 801 | 801 | ||
| 802 | if (phys+len <= MAX_DMA_PFN*PAGE_SIZE) { | 802 | if (phys+len <= MAX_DMA_PFN*PAGE_SIZE) { |
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index e6718bb28065..352aa9e927e2 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c | |||
| @@ -623,7 +623,8 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot, | |||
| 623 | return ret; | 623 | return ret; |
| 624 | 624 | ||
| 625 | if (flags != want_flags) { | 625 | if (flags != want_flags) { |
| 626 | if (strict_prot || !is_new_memtype_allowed(want_flags, flags)) { | 626 | if (strict_prot || |
| 627 | !is_new_memtype_allowed(paddr, size, want_flags, flags)) { | ||
| 627 | free_memtype(paddr, paddr + size); | 628 | free_memtype(paddr, paddr + size); |
| 628 | printk(KERN_ERR "%s:%d map pfn expected mapping type %s" | 629 | printk(KERN_ERR "%s:%d map pfn expected mapping type %s" |
| 629 | " for %Lx-%Lx, got %s\n", | 630 | " for %Lx-%Lx, got %s\n", |
diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index 172438f86a02..7410640db173 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile | |||
| @@ -5,6 +5,10 @@ CFLAGS_REMOVE_time.o = -pg | |||
| 5 | CFLAGS_REMOVE_irq.o = -pg | 5 | CFLAGS_REMOVE_irq.o = -pg |
| 6 | endif | 6 | endif |
| 7 | 7 | ||
| 8 | # Make sure early boot has no stackprotector | ||
| 9 | nostackp := $(call cc-option, -fno-stack-protector) | ||
| 10 | CFLAGS_enlighten.o := $(nostackp) | ||
| 11 | |||
| 8 | obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ | 12 | obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ |
| 9 | time.o xen-asm.o xen-asm_$(BITS).o \ | 13 | time.o xen-asm.o xen-asm_$(BITS).o \ |
| 10 | grant-table.o suspend.o | 14 | grant-table.o suspend.o |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 0a1700a2be9c..e90540a46a0b 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
| @@ -974,10 +974,6 @@ asmlinkage void __init xen_start_kernel(void) | |||
| 974 | 974 | ||
| 975 | xen_domain_type = XEN_PV_DOMAIN; | 975 | xen_domain_type = XEN_PV_DOMAIN; |
| 976 | 976 | ||
| 977 | BUG_ON(memcmp(xen_start_info->magic, "xen-3", 5) != 0); | ||
| 978 | |||
| 979 | xen_setup_features(); | ||
| 980 | |||
| 981 | /* Install Xen paravirt ops */ | 977 | /* Install Xen paravirt ops */ |
| 982 | pv_info = xen_info; | 978 | pv_info = xen_info; |
| 983 | pv_init_ops = xen_init_ops; | 979 | pv_init_ops = xen_init_ops; |
| @@ -986,8 +982,15 @@ asmlinkage void __init xen_start_kernel(void) | |||
| 986 | pv_apic_ops = xen_apic_ops; | 982 | pv_apic_ops = xen_apic_ops; |
| 987 | pv_mmu_ops = xen_mmu_ops; | 983 | pv_mmu_ops = xen_mmu_ops; |
| 988 | 984 | ||
| 989 | xen_init_irq_ops(); | 985 | #ifdef CONFIG_X86_64 |
| 986 | /* | ||
| 987 | * Setup percpu state. We only need to do this for 64-bit | ||
| 988 | * because 32-bit already has %fs set properly. | ||
| 989 | */ | ||
| 990 | load_percpu_segment(0); | ||
| 991 | #endif | ||
| 990 | 992 | ||
| 993 | xen_init_irq_ops(); | ||
| 991 | xen_init_cpuid_mask(); | 994 | xen_init_cpuid_mask(); |
| 992 | 995 | ||
| 993 | #ifdef CONFIG_X86_LOCAL_APIC | 996 | #ifdef CONFIG_X86_LOCAL_APIC |
| @@ -997,6 +1000,8 @@ asmlinkage void __init xen_start_kernel(void) | |||
| 997 | set_xen_basic_apic_ops(); | 1000 | set_xen_basic_apic_ops(); |
| 998 | #endif | 1001 | #endif |
| 999 | 1002 | ||
| 1003 | xen_setup_features(); | ||
| 1004 | |||
| 1000 | if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) { | 1005 | if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) { |
| 1001 | pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start; | 1006 | pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start; |
| 1002 | pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit; | 1007 | pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit; |
| @@ -1004,13 +1009,6 @@ asmlinkage void __init xen_start_kernel(void) | |||
| 1004 | 1009 | ||
| 1005 | machine_ops = xen_machine_ops; | 1010 | machine_ops = xen_machine_ops; |
| 1006 | 1011 | ||
| 1007 | #ifdef CONFIG_X86_64 | ||
| 1008 | /* | ||
| 1009 | * Setup percpu state. We only need to do this for 64-bit | ||
| 1010 | * because 32-bit already has %fs set properly. | ||
| 1011 | */ | ||
| 1012 | load_percpu_segment(0); | ||
| 1013 | #endif | ||
| 1014 | /* | 1012 | /* |
| 1015 | * The only reliable way to retain the initial address of the | 1013 | * The only reliable way to retain the initial address of the |
| 1016 | * percpu gdt_page is to remember it here, so we can go and | 1014 | * percpu gdt_page is to remember it here, so we can go and |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 84e0f3c07442..2cc4b3033872 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
| @@ -1151,6 +1151,9 @@ static int __init acpi_processor_init(void) | |||
| 1151 | { | 1151 | { |
| 1152 | int result = 0; | 1152 | int result = 0; |
| 1153 | 1153 | ||
| 1154 | if (acpi_disabled) | ||
| 1155 | return 0; | ||
| 1156 | |||
| 1154 | memset(&errata, 0, sizeof(errata)); | 1157 | memset(&errata, 0, sizeof(errata)); |
| 1155 | 1158 | ||
| 1156 | #ifdef CONFIG_SMP | 1159 | #ifdef CONFIG_SMP |
| @@ -1197,6 +1200,9 @@ out_proc: | |||
| 1197 | 1200 | ||
| 1198 | static void __exit acpi_processor_exit(void) | 1201 | static void __exit acpi_processor_exit(void) |
| 1199 | { | 1202 | { |
| 1203 | if (acpi_disabled) | ||
| 1204 | return; | ||
| 1205 | |||
| 1200 | acpi_processor_ppc_exit(); | 1206 | acpi_processor_ppc_exit(); |
| 1201 | 1207 | ||
| 1202 | acpi_thermal_cpufreq_exit(); | 1208 | acpi_thermal_cpufreq_exit(); |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 0efa59e7e3af..66393d5c4c7c 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
| @@ -162,8 +162,9 @@ static void lapic_timer_check_state(int state, struct acpi_processor *pr, | |||
| 162 | pr->power.timer_broadcast_on_state = state; | 162 | pr->power.timer_broadcast_on_state = state; |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | static void lapic_timer_propagate_broadcast(struct acpi_processor *pr) | 165 | static void lapic_timer_propagate_broadcast(void *arg) |
| 166 | { | 166 | { |
| 167 | struct acpi_processor *pr = (struct acpi_processor *) arg; | ||
| 167 | unsigned long reason; | 168 | unsigned long reason; |
| 168 | 169 | ||
| 169 | reason = pr->power.timer_broadcast_on_state < INT_MAX ? | 170 | reason = pr->power.timer_broadcast_on_state < INT_MAX ? |
| @@ -635,7 +636,8 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) | |||
| 635 | working++; | 636 | working++; |
| 636 | } | 637 | } |
| 637 | 638 | ||
| 638 | lapic_timer_propagate_broadcast(pr); | 639 | smp_call_function_single(pr->id, lapic_timer_propagate_broadcast, |
| 640 | pr, 1); | ||
| 639 | 641 | ||
| 640 | return (working); | 642 | return (working); |
| 641 | } | 643 | } |
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c index 39838c666032..31adda1099e0 100644 --- a/drivers/acpi/processor_thermal.c +++ b/drivers/acpi/processor_thermal.c | |||
| @@ -66,7 +66,7 @@ static int acpi_processor_apply_limit(struct acpi_processor *pr) | |||
| 66 | if (pr->limit.thermal.tx > tx) | 66 | if (pr->limit.thermal.tx > tx) |
| 67 | tx = pr->limit.thermal.tx; | 67 | tx = pr->limit.thermal.tx; |
| 68 | 68 | ||
| 69 | result = acpi_processor_set_throttling(pr, tx); | 69 | result = acpi_processor_set_throttling(pr, tx, false); |
| 70 | if (result) | 70 | if (result) |
| 71 | goto end; | 71 | goto end; |
| 72 | } | 72 | } |
| @@ -421,12 +421,12 @@ processor_set_cur_state(struct thermal_cooling_device *cdev, | |||
| 421 | 421 | ||
| 422 | if (state <= max_pstate) { | 422 | if (state <= max_pstate) { |
| 423 | if (pr->flags.throttling && pr->throttling.state) | 423 | if (pr->flags.throttling && pr->throttling.state) |
| 424 | result = acpi_processor_set_throttling(pr, 0); | 424 | result = acpi_processor_set_throttling(pr, 0, false); |
| 425 | cpufreq_set_cur_state(pr->id, state); | 425 | cpufreq_set_cur_state(pr->id, state); |
| 426 | } else { | 426 | } else { |
| 427 | cpufreq_set_cur_state(pr->id, max_pstate); | 427 | cpufreq_set_cur_state(pr->id, max_pstate); |
| 428 | result = acpi_processor_set_throttling(pr, | 428 | result = acpi_processor_set_throttling(pr, |
| 429 | state - max_pstate); | 429 | state - max_pstate, false); |
| 430 | } | 430 | } |
| 431 | return result; | 431 | return result; |
| 432 | } | 432 | } |
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index 227543789ba9..ae39797aab55 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c | |||
| @@ -62,7 +62,8 @@ struct throttling_tstate { | |||
| 62 | #define THROTTLING_POSTCHANGE (2) | 62 | #define THROTTLING_POSTCHANGE (2) |
| 63 | 63 | ||
| 64 | static int acpi_processor_get_throttling(struct acpi_processor *pr); | 64 | static int acpi_processor_get_throttling(struct acpi_processor *pr); |
| 65 | int acpi_processor_set_throttling(struct acpi_processor *pr, int state); | 65 | int acpi_processor_set_throttling(struct acpi_processor *pr, |
| 66 | int state, bool force); | ||
| 66 | 67 | ||
| 67 | static int acpi_processor_update_tsd_coord(void) | 68 | static int acpi_processor_update_tsd_coord(void) |
| 68 | { | 69 | { |
| @@ -361,7 +362,7 @@ int acpi_processor_tstate_has_changed(struct acpi_processor *pr) | |||
| 361 | */ | 362 | */ |
| 362 | target_state = throttling_limit; | 363 | target_state = throttling_limit; |
| 363 | } | 364 | } |
| 364 | return acpi_processor_set_throttling(pr, target_state); | 365 | return acpi_processor_set_throttling(pr, target_state, false); |
| 365 | } | 366 | } |
| 366 | 367 | ||
| 367 | /* | 368 | /* |
| @@ -839,10 +840,10 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr) | |||
| 839 | if (ret >= 0) { | 840 | if (ret >= 0) { |
| 840 | state = acpi_get_throttling_state(pr, value); | 841 | state = acpi_get_throttling_state(pr, value); |
| 841 | if (state == -1) { | 842 | if (state == -1) { |
| 842 | ACPI_WARNING((AE_INFO, | 843 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
| 843 | "Invalid throttling state, reset")); | 844 | "Invalid throttling state, reset\n")); |
| 844 | state = 0; | 845 | state = 0; |
| 845 | ret = acpi_processor_set_throttling(pr, state); | 846 | ret = acpi_processor_set_throttling(pr, state, true); |
| 846 | if (ret) | 847 | if (ret) |
| 847 | return ret; | 848 | return ret; |
| 848 | } | 849 | } |
| @@ -915,7 +916,7 @@ static int acpi_processor_get_fadt_info(struct acpi_processor *pr) | |||
| 915 | } | 916 | } |
| 916 | 917 | ||
| 917 | static int acpi_processor_set_throttling_fadt(struct acpi_processor *pr, | 918 | static int acpi_processor_set_throttling_fadt(struct acpi_processor *pr, |
| 918 | int state) | 919 | int state, bool force) |
| 919 | { | 920 | { |
| 920 | u32 value = 0; | 921 | u32 value = 0; |
| 921 | u32 duty_mask = 0; | 922 | u32 duty_mask = 0; |
| @@ -930,7 +931,7 @@ static int acpi_processor_set_throttling_fadt(struct acpi_processor *pr, | |||
| 930 | if (!pr->flags.throttling) | 931 | if (!pr->flags.throttling) |
| 931 | return -ENODEV; | 932 | return -ENODEV; |
| 932 | 933 | ||
| 933 | if (state == pr->throttling.state) | 934 | if (!force && (state == pr->throttling.state)) |
| 934 | return 0; | 935 | return 0; |
| 935 | 936 | ||
| 936 | if (state < pr->throttling_platform_limit) | 937 | if (state < pr->throttling_platform_limit) |
| @@ -988,7 +989,7 @@ static int acpi_processor_set_throttling_fadt(struct acpi_processor *pr, | |||
| 988 | } | 989 | } |
| 989 | 990 | ||
| 990 | static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr, | 991 | static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr, |
| 991 | int state) | 992 | int state, bool force) |
| 992 | { | 993 | { |
| 993 | int ret; | 994 | int ret; |
| 994 | acpi_integer value; | 995 | acpi_integer value; |
| @@ -1002,7 +1003,7 @@ static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr, | |||
| 1002 | if (!pr->flags.throttling) | 1003 | if (!pr->flags.throttling) |
| 1003 | return -ENODEV; | 1004 | return -ENODEV; |
| 1004 | 1005 | ||
| 1005 | if (state == pr->throttling.state) | 1006 | if (!force && (state == pr->throttling.state)) |
| 1006 | return 0; | 1007 | return 0; |
| 1007 | 1008 | ||
| 1008 | if (state < pr->throttling_platform_limit) | 1009 | if (state < pr->throttling_platform_limit) |
| @@ -1018,7 +1019,8 @@ static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr, | |||
| 1018 | return 0; | 1019 | return 0; |
| 1019 | } | 1020 | } |
| 1020 | 1021 | ||
| 1021 | int acpi_processor_set_throttling(struct acpi_processor *pr, int state) | 1022 | int acpi_processor_set_throttling(struct acpi_processor *pr, |
| 1023 | int state, bool force) | ||
| 1022 | { | 1024 | { |
| 1023 | cpumask_var_t saved_mask; | 1025 | cpumask_var_t saved_mask; |
| 1024 | int ret = 0; | 1026 | int ret = 0; |
| @@ -1070,7 +1072,7 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state) | |||
| 1070 | /* FIXME: use work_on_cpu() */ | 1072 | /* FIXME: use work_on_cpu() */ |
| 1071 | set_cpus_allowed_ptr(current, cpumask_of(pr->id)); | 1073 | set_cpus_allowed_ptr(current, cpumask_of(pr->id)); |
| 1072 | ret = p_throttling->acpi_processor_set_throttling(pr, | 1074 | ret = p_throttling->acpi_processor_set_throttling(pr, |
| 1073 | t_state.target_state); | 1075 | t_state.target_state, force); |
| 1074 | } else { | 1076 | } else { |
| 1075 | /* | 1077 | /* |
| 1076 | * When the T-state coordination is SW_ALL or HW_ALL, | 1078 | * When the T-state coordination is SW_ALL or HW_ALL, |
| @@ -1103,7 +1105,7 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state) | |||
| 1103 | set_cpus_allowed_ptr(current, cpumask_of(i)); | 1105 | set_cpus_allowed_ptr(current, cpumask_of(i)); |
| 1104 | ret = match_pr->throttling. | 1106 | ret = match_pr->throttling. |
| 1105 | acpi_processor_set_throttling( | 1107 | acpi_processor_set_throttling( |
| 1106 | match_pr, t_state.target_state); | 1108 | match_pr, t_state.target_state, force); |
| 1107 | } | 1109 | } |
| 1108 | } | 1110 | } |
| 1109 | /* | 1111 | /* |
| @@ -1201,7 +1203,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr) | |||
| 1201 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 1203 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
| 1202 | "Disabling throttling (was T%d)\n", | 1204 | "Disabling throttling (was T%d)\n", |
| 1203 | pr->throttling.state)); | 1205 | pr->throttling.state)); |
| 1204 | result = acpi_processor_set_throttling(pr, 0); | 1206 | result = acpi_processor_set_throttling(pr, 0, false); |
| 1205 | if (result) | 1207 | if (result) |
| 1206 | goto end; | 1208 | goto end; |
| 1207 | } | 1209 | } |
| @@ -1307,7 +1309,7 @@ static ssize_t acpi_processor_write_throttling(struct file *file, | |||
| 1307 | if (strcmp(tmpbuf, charp) != 0) | 1309 | if (strcmp(tmpbuf, charp) != 0) |
| 1308 | return -EINVAL; | 1310 | return -EINVAL; |
| 1309 | 1311 | ||
| 1310 | result = acpi_processor_set_throttling(pr, state_val); | 1312 | result = acpi_processor_set_throttling(pr, state_val, false); |
| 1311 | if (result) | 1313 | if (result) |
| 1312 | return result; | 1314 | return result; |
| 1313 | 1315 | ||
diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c index 1733d3439ad2..e48af9f79219 100644 --- a/drivers/char/tty_ldisc.c +++ b/drivers/char/tty_ldisc.c | |||
| @@ -508,8 +508,9 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old) | |||
| 508 | * be obtained while the delayed work queue halt ensures that no more | 508 | * be obtained while the delayed work queue halt ensures that no more |
| 509 | * data is fed to the ldisc. | 509 | * data is fed to the ldisc. |
| 510 | * | 510 | * |
| 511 | * In order to wait for any existing references to complete see | 511 | * You need to do a 'flush_scheduled_work()' (outside the ldisc_mutex) |
| 512 | * tty_ldisc_wait_idle. | 512 | * in order to make sure any currently executing ldisc work is also |
| 513 | * flushed. | ||
| 513 | */ | 514 | */ |
| 514 | 515 | ||
| 515 | static int tty_ldisc_halt(struct tty_struct *tty) | 516 | static int tty_ldisc_halt(struct tty_struct *tty) |
| @@ -753,11 +754,14 @@ void tty_ldisc_hangup(struct tty_struct *tty) | |||
| 753 | * N_TTY. | 754 | * N_TTY. |
| 754 | */ | 755 | */ |
| 755 | if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) { | 756 | if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) { |
| 757 | /* Make sure the old ldisc is quiescent */ | ||
| 758 | tty_ldisc_halt(tty); | ||
| 759 | flush_scheduled_work(); | ||
| 760 | |||
| 756 | /* Avoid racing set_ldisc or tty_ldisc_release */ | 761 | /* Avoid racing set_ldisc or tty_ldisc_release */ |
| 757 | mutex_lock(&tty->ldisc_mutex); | 762 | mutex_lock(&tty->ldisc_mutex); |
| 758 | if (tty->ldisc) { /* Not yet closed */ | 763 | if (tty->ldisc) { /* Not yet closed */ |
| 759 | /* Switch back to N_TTY */ | 764 | /* Switch back to N_TTY */ |
| 760 | tty_ldisc_halt(tty); | ||
| 761 | tty_ldisc_reinit(tty); | 765 | tty_ldisc_reinit(tty); |
| 762 | /* At this point we have a closed ldisc and we want to | 766 | /* At this point we have a closed ldisc and we want to |
| 763 | reopen it. We could defer this to the next open but | 767 | reopen it. We could defer this to the next open but |
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index 14c199802920..d880edf254db 100644 --- a/drivers/gpu/drm/radeon/radeon_gem.c +++ b/drivers/gpu/drm/radeon/radeon_gem.c | |||
| @@ -274,12 +274,18 @@ int radeon_gem_busy_ioctl(struct drm_device *dev, void *data, | |||
| 274 | } | 274 | } |
| 275 | robj = gobj->driver_private; | 275 | robj = gobj->driver_private; |
| 276 | r = radeon_object_busy_domain(robj, &cur_placement); | 276 | r = radeon_object_busy_domain(robj, &cur_placement); |
| 277 | if (cur_placement == TTM_PL_VRAM) | 277 | switch (cur_placement) { |
| 278 | case TTM_PL_VRAM: | ||
| 278 | args->domain = RADEON_GEM_DOMAIN_VRAM; | 279 | args->domain = RADEON_GEM_DOMAIN_VRAM; |
| 279 | if (cur_placement == TTM_PL_FLAG_TT) | 280 | break; |
| 281 | case TTM_PL_TT: | ||
| 280 | args->domain = RADEON_GEM_DOMAIN_GTT; | 282 | args->domain = RADEON_GEM_DOMAIN_GTT; |
| 281 | if (cur_placement == TTM_PL_FLAG_SYSTEM) | 283 | break; |
| 284 | case TTM_PL_SYSTEM: | ||
| 282 | args->domain = RADEON_GEM_DOMAIN_CPU; | 285 | args->domain = RADEON_GEM_DOMAIN_CPU; |
| 286 | default: | ||
| 287 | break; | ||
| 288 | } | ||
| 283 | mutex_lock(&dev->struct_mutex); | 289 | mutex_lock(&dev->struct_mutex); |
| 284 | drm_gem_object_unreference(gobj); | 290 | drm_gem_object_unreference(gobj); |
| 285 | mutex_unlock(&dev->struct_mutex); | 291 | mutex_unlock(&dev->struct_mutex); |
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 4cfd084fa897..9a1d55b74d7a 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
| @@ -456,8 +456,11 @@ static int joydev_ioctl_common(struct joydev *joydev, | |||
| 456 | unsigned int cmd, void __user *argp) | 456 | unsigned int cmd, void __user *argp) |
| 457 | { | 457 | { |
| 458 | struct input_dev *dev = joydev->handle.dev; | 458 | struct input_dev *dev = joydev->handle.dev; |
| 459 | size_t len; | ||
| 459 | int i, j; | 460 | int i, j; |
| 461 | const char *name; | ||
| 460 | 462 | ||
| 463 | /* Process fixed-sized commands. */ | ||
| 461 | switch (cmd) { | 464 | switch (cmd) { |
| 462 | 465 | ||
| 463 | case JS_SET_CAL: | 466 | case JS_SET_CAL: |
| @@ -499,9 +502,22 @@ static int joydev_ioctl_common(struct joydev *joydev, | |||
| 499 | return copy_to_user(argp, joydev->corr, | 502 | return copy_to_user(argp, joydev->corr, |
| 500 | sizeof(joydev->corr[0]) * joydev->nabs) ? -EFAULT : 0; | 503 | sizeof(joydev->corr[0]) * joydev->nabs) ? -EFAULT : 0; |
| 501 | 504 | ||
| 502 | case JSIOCSAXMAP: | 505 | } |
| 503 | if (copy_from_user(joydev->abspam, argp, | 506 | |
| 504 | sizeof(__u8) * (ABS_MAX + 1))) | 507 | /* |
| 508 | * Process variable-sized commands (the axis and button map commands | ||
| 509 | * are considered variable-sized to decouple them from the values of | ||
| 510 | * ABS_MAX and KEY_MAX). | ||
| 511 | */ | ||
| 512 | switch (cmd & ~IOCSIZE_MASK) { | ||
| 513 | |||
| 514 | case (JSIOCSAXMAP & ~IOCSIZE_MASK): | ||
| 515 | len = min_t(size_t, _IOC_SIZE(cmd), sizeof(joydev->abspam)); | ||
| 516 | /* | ||
| 517 | * FIXME: we should not copy into our axis map before | ||
| 518 | * validating the data. | ||
| 519 | */ | ||
| 520 | if (copy_from_user(joydev->abspam, argp, len)) | ||
| 505 | return -EFAULT; | 521 | return -EFAULT; |
| 506 | 522 | ||
| 507 | for (i = 0; i < joydev->nabs; i++) { | 523 | for (i = 0; i < joydev->nabs; i++) { |
| @@ -511,13 +527,17 @@ static int joydev_ioctl_common(struct joydev *joydev, | |||
| 511 | } | 527 | } |
| 512 | return 0; | 528 | return 0; |
| 513 | 529 | ||
| 514 | case JSIOCGAXMAP: | 530 | case (JSIOCGAXMAP & ~IOCSIZE_MASK): |
| 515 | return copy_to_user(argp, joydev->abspam, | 531 | len = min_t(size_t, _IOC_SIZE(cmd), sizeof(joydev->abspam)); |
| 516 | sizeof(__u8) * (ABS_MAX + 1)) ? -EFAULT : 0; | 532 | return copy_to_user(argp, joydev->abspam, len) ? -EFAULT : 0; |
| 517 | 533 | ||
| 518 | case JSIOCSBTNMAP: | 534 | case (JSIOCSBTNMAP & ~IOCSIZE_MASK): |
| 519 | if (copy_from_user(joydev->keypam, argp, | 535 | len = min_t(size_t, _IOC_SIZE(cmd), sizeof(joydev->keypam)); |
| 520 | sizeof(__u16) * (KEY_MAX - BTN_MISC + 1))) | 536 | /* |
| 537 | * FIXME: we should not copy into our keymap before | ||
| 538 | * validating the data. | ||
| 539 | */ | ||
| 540 | if (copy_from_user(joydev->keypam, argp, len)) | ||
| 521 | return -EFAULT; | 541 | return -EFAULT; |
| 522 | 542 | ||
| 523 | for (i = 0; i < joydev->nkey; i++) { | 543 | for (i = 0; i < joydev->nkey; i++) { |
| @@ -529,25 +549,19 @@ static int joydev_ioctl_common(struct joydev *joydev, | |||
| 529 | 549 | ||
| 530 | return 0; | 550 | return 0; |
| 531 | 551 | ||
| 532 | case JSIOCGBTNMAP: | 552 | case (JSIOCGBTNMAP & ~IOCSIZE_MASK): |
| 533 | return copy_to_user(argp, joydev->keypam, | 553 | len = min_t(size_t, _IOC_SIZE(cmd), sizeof(joydev->keypam)); |
| 534 | sizeof(__u16) * (KEY_MAX - BTN_MISC + 1)) ? -EFAULT : 0; | 554 | return copy_to_user(argp, joydev->keypam, len) ? -EFAULT : 0; |
| 535 | 555 | ||
| 536 | default: | 556 | case JSIOCGNAME(0): |
| 537 | if ((cmd & ~IOCSIZE_MASK) == JSIOCGNAME(0)) { | 557 | name = dev->name; |
| 538 | int len; | 558 | if (!name) |
| 539 | const char *name = dev->name; | 559 | return 0; |
| 540 | 560 | ||
| 541 | if (!name) | 561 | len = min_t(size_t, _IOC_SIZE(cmd), strlen(name) + 1); |
| 542 | return 0; | 562 | return copy_to_user(argp, name, len) ? -EFAULT : len; |
| 543 | len = strlen(name) + 1; | ||
| 544 | if (len > _IOC_SIZE(cmd)) | ||
| 545 | len = _IOC_SIZE(cmd); | ||
| 546 | if (copy_to_user(argp, name, len)) | ||
| 547 | return -EFAULT; | ||
| 548 | return len; | ||
| 549 | } | ||
| 550 | } | 563 | } |
| 564 | |||
| 551 | return -EINVAL; | 565 | return -EINVAL; |
| 552 | } | 566 | } |
| 553 | 567 | ||
diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c index baabf8302645..f6c688cae334 100644 --- a/drivers/input/joystick/iforce/iforce-main.c +++ b/drivers/input/joystick/iforce/iforce-main.c | |||
| @@ -74,6 +74,7 @@ static struct iforce_device iforce_device[] = { | |||
| 74 | { 0x05ef, 0x8884, "AVB Mag Turbo Force", btn_avb_wheel, abs_wheel, ff_iforce }, | 74 | { 0x05ef, 0x8884, "AVB Mag Turbo Force", btn_avb_wheel, abs_wheel, ff_iforce }, |
| 75 | { 0x05ef, 0x8888, "AVB Top Shot Force Feedback Racing Wheel", btn_avb_tw, abs_wheel, ff_iforce }, //? | 75 | { 0x05ef, 0x8888, "AVB Top Shot Force Feedback Racing Wheel", btn_avb_tw, abs_wheel, ff_iforce }, //? |
| 76 | { 0x061c, 0xc0a4, "ACT LABS Force RS", btn_wheel, abs_wheel, ff_iforce }, //? | 76 | { 0x061c, 0xc0a4, "ACT LABS Force RS", btn_wheel, abs_wheel, ff_iforce }, //? |
| 77 | { 0x061c, 0xc084, "ACT LABS Force RS", btn_wheel, abs_wheel, ff_iforce }, | ||
| 77 | { 0x06f8, 0x0001, "Guillemot Race Leader Force Feedback", btn_wheel, abs_wheel, ff_iforce }, //? | 78 | { 0x06f8, 0x0001, "Guillemot Race Leader Force Feedback", btn_wheel, abs_wheel, ff_iforce }, //? |
| 78 | { 0x06f8, 0x0004, "Guillemot Force Feedback Racing Wheel", btn_wheel, abs_wheel, ff_iforce }, //? | 79 | { 0x06f8, 0x0004, "Guillemot Force Feedback Racing Wheel", btn_wheel, abs_wheel, ff_iforce }, //? |
| 79 | { 0x06f8, 0x0004, "Gullemot Jet Leader 3D", btn_joystick, abs_joystick, ff_iforce }, //? | 80 | { 0x06f8, 0x0004, "Gullemot Jet Leader 3D", btn_joystick, abs_joystick, ff_iforce }, //? |
diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index f83185aeb511..9f289d8f52c6 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c | |||
| @@ -223,6 +223,7 @@ static struct usb_device_id iforce_usb_ids [] = { | |||
| 223 | { USB_DEVICE(0x05ef, 0x8884) }, /* AVB Mag Turbo Force */ | 223 | { USB_DEVICE(0x05ef, 0x8884) }, /* AVB Mag Turbo Force */ |
| 224 | { USB_DEVICE(0x05ef, 0x8888) }, /* AVB Top Shot FFB Racing Wheel */ | 224 | { USB_DEVICE(0x05ef, 0x8888) }, /* AVB Top Shot FFB Racing Wheel */ |
| 225 | { USB_DEVICE(0x061c, 0xc0a4) }, /* ACT LABS Force RS */ | 225 | { USB_DEVICE(0x061c, 0xc0a4) }, /* ACT LABS Force RS */ |
| 226 | { USB_DEVICE(0x061c, 0xc084) }, /* ACT LABS Force RS */ | ||
| 226 | { USB_DEVICE(0x06f8, 0x0001) }, /* Guillemot Race Leader Force Feedback */ | 227 | { USB_DEVICE(0x06f8, 0x0001) }, /* Guillemot Race Leader Force Feedback */ |
| 227 | { USB_DEVICE(0x06f8, 0x0004) }, /* Guillemot Force Feedback Racing Wheel */ | 228 | { USB_DEVICE(0x06f8, 0x0004) }, /* Guillemot Force Feedback Racing Wheel */ |
| 228 | { USB_DEVICE(0x06f8, 0xa302) }, /* Guillemot Jet Leader 3D */ | 229 | { USB_DEVICE(0x06f8, 0xa302) }, /* Guillemot Jet Leader 3D */ |
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index a9d5031b855e..ea30c983a33e 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
| @@ -388,6 +388,32 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi | |||
| 388 | return result; | 388 | return result; |
| 389 | } | 389 | } |
| 390 | 390 | ||
| 391 | static int wacom_query_tablet_data(struct usb_interface *intf) | ||
| 392 | { | ||
| 393 | unsigned char *rep_data; | ||
| 394 | int limit = 0; | ||
| 395 | int error; | ||
| 396 | |||
| 397 | rep_data = kmalloc(2, GFP_KERNEL); | ||
| 398 | if (!rep_data) | ||
| 399 | return -ENOMEM; | ||
| 400 | |||
| 401 | do { | ||
| 402 | rep_data[0] = 2; | ||
| 403 | rep_data[1] = 2; | ||
| 404 | error = usb_set_report(intf, WAC_HID_FEATURE_REPORT, | ||
| 405 | 2, rep_data, 2); | ||
| 406 | if (error >= 0) | ||
| 407 | error = usb_get_report(intf, | ||
| 408 | WAC_HID_FEATURE_REPORT, 2, | ||
| 409 | rep_data, 2); | ||
| 410 | } while ((error < 0 || rep_data[1] != 2) && limit++ < 5); | ||
| 411 | |||
| 412 | kfree(rep_data); | ||
| 413 | |||
| 414 | return error < 0 ? error : 0; | ||
| 415 | } | ||
| 416 | |||
| 391 | static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *id) | 417 | static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *id) |
| 392 | { | 418 | { |
| 393 | struct usb_device *dev = interface_to_usbdev(intf); | 419 | struct usb_device *dev = interface_to_usbdev(intf); |
| @@ -398,7 +424,6 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i | |||
| 398 | struct wacom_features *features; | 424 | struct wacom_features *features; |
| 399 | struct input_dev *input_dev; | 425 | struct input_dev *input_dev; |
| 400 | int error = -ENOMEM; | 426 | int error = -ENOMEM; |
| 401 | char rep_data[2], limit = 0; | ||
| 402 | struct hid_descriptor *hid_desc; | 427 | struct hid_descriptor *hid_desc; |
| 403 | 428 | ||
| 404 | wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL); | 429 | wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL); |
| @@ -489,20 +514,10 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i | |||
| 489 | 514 | ||
| 490 | /* | 515 | /* |
| 491 | * Ask the tablet to report tablet data if it is not a Tablet PC. | 516 | * Ask the tablet to report tablet data if it is not a Tablet PC. |
| 492 | * Repeat until it succeeds | 517 | * Note that if query fails it is not a hard failure. |
| 493 | */ | 518 | */ |
| 494 | if (wacom_wac->features->type != TABLETPC) { | 519 | if (wacom_wac->features->type != TABLETPC) |
| 495 | do { | 520 | wacom_query_tablet_data(intf); |
| 496 | rep_data[0] = 2; | ||
| 497 | rep_data[1] = 2; | ||
| 498 | error = usb_set_report(intf, WAC_HID_FEATURE_REPORT, | ||
| 499 | 2, rep_data, 2); | ||
| 500 | if (error >= 0) | ||
| 501 | error = usb_get_report(intf, | ||
| 502 | WAC_HID_FEATURE_REPORT, 2, | ||
| 503 | rep_data, 2); | ||
| 504 | } while ((error < 0 || rep_data[1] != 2) && limit++ < 5); | ||
| 505 | } | ||
| 506 | 521 | ||
| 507 | usb_set_intfdata(intf, wacom); | 522 | usb_set_intfdata(intf, wacom); |
| 508 | return 0; | 523 | return 0; |
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index 6954f5500108..3a7a58222f83 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c | |||
| @@ -170,11 +170,11 @@ static void ucb1400_handle_pending_irq(struct ucb1400_ts *ucb) | |||
| 170 | ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, isr); | 170 | ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, isr); |
| 171 | ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, 0); | 171 | ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, 0); |
| 172 | 172 | ||
| 173 | if (isr & UCB_IE_TSPX) { | 173 | if (isr & UCB_IE_TSPX) |
| 174 | ucb1400_ts_irq_disable(ucb->ac97); | 174 | ucb1400_ts_irq_disable(ucb->ac97); |
| 175 | enable_irq(ucb->irq); | 175 | else |
| 176 | } else | 176 | dev_dbg(&ucb->ts_idev->dev, "ucb1400: unexpected IE_STATUS = %#x\n", isr); |
| 177 | printk(KERN_ERR "ucb1400: unexpected IE_STATUS = %#x\n", isr); | 177 | enable_irq(ucb->irq); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | static int ucb1400_ts_thread(void *_ucb) | 180 | static int ucb1400_ts_thread(void *_ucb) |
| @@ -345,6 +345,7 @@ static int ucb1400_ts_detect_irq(struct ucb1400_ts *ucb) | |||
| 345 | static int ucb1400_ts_probe(struct platform_device *dev) | 345 | static int ucb1400_ts_probe(struct platform_device *dev) |
| 346 | { | 346 | { |
| 347 | int error, x_res, y_res; | 347 | int error, x_res, y_res; |
| 348 | u16 fcsr; | ||
| 348 | struct ucb1400_ts *ucb = dev->dev.platform_data; | 349 | struct ucb1400_ts *ucb = dev->dev.platform_data; |
| 349 | 350 | ||
| 350 | ucb->ts_idev = input_allocate_device(); | 351 | ucb->ts_idev = input_allocate_device(); |
| @@ -382,6 +383,14 @@ static int ucb1400_ts_probe(struct platform_device *dev) | |||
| 382 | ucb->ts_idev->evbit[0] = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY); | 383 | ucb->ts_idev->evbit[0] = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY); |
| 383 | ucb->ts_idev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); | 384 | ucb->ts_idev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
| 384 | 385 | ||
| 386 | /* | ||
| 387 | * Enable ADC filter to prevent horrible jitter on Colibri. | ||
| 388 | * This also further reduces jitter on boards where ADCSYNC | ||
| 389 | * pin is connected. | ||
| 390 | */ | ||
| 391 | fcsr = ucb1400_reg_read(ucb->ac97, UCB_FCSR); | ||
| 392 | ucb1400_reg_write(ucb->ac97, UCB_FCSR, fcsr | UCB_FCSR_AVE); | ||
| 393 | |||
| 385 | ucb1400_adc_enable(ucb->ac97); | 394 | ucb1400_adc_enable(ucb->ac97); |
| 386 | x_res = ucb1400_ts_read_xres(ucb); | 395 | x_res = ucb1400_ts_read_xres(ucb); |
| 387 | y_res = ucb1400_ts_read_yres(ucb); | 396 | y_res = ucb1400_ts_read_yres(ucb); |
diff --git a/drivers/leds/ledtrig-gpio.c b/drivers/leds/ledtrig-gpio.c index a247ae63374f..1bc5db4ece0d 100644 --- a/drivers/leds/ledtrig-gpio.c +++ b/drivers/leds/ledtrig-gpio.c | |||
| @@ -117,6 +117,9 @@ static ssize_t gpio_trig_inverted_store(struct device *dev, | |||
| 117 | 117 | ||
| 118 | gpio_data->inverted = !!inverted; | 118 | gpio_data->inverted = !!inverted; |
| 119 | 119 | ||
| 120 | /* After inverting, we need to update the LED. */ | ||
| 121 | schedule_work(&gpio_data->work); | ||
| 122 | |||
| 120 | return n; | 123 | return n; |
| 121 | } | 124 | } |
| 122 | static DEVICE_ATTR(inverted, 0644, gpio_trig_inverted_show, | 125 | static DEVICE_ATTR(inverted, 0644, gpio_trig_inverted_show, |
| @@ -146,20 +149,26 @@ static ssize_t gpio_trig_gpio_store(struct device *dev, | |||
| 146 | return -EINVAL; | 149 | return -EINVAL; |
| 147 | } | 150 | } |
| 148 | 151 | ||
| 152 | if (gpio_data->gpio == gpio) | ||
| 153 | return n; | ||
| 154 | |||
| 149 | if (!gpio) { | 155 | if (!gpio) { |
| 150 | free_irq(gpio_to_irq(gpio_data->gpio), led); | 156 | if (gpio_data->gpio != 0) |
| 157 | free_irq(gpio_to_irq(gpio_data->gpio), led); | ||
| 158 | gpio_data->gpio = 0; | ||
| 151 | return n; | 159 | return n; |
| 152 | } | 160 | } |
| 153 | 161 | ||
| 154 | if (gpio_data->gpio > 0 && gpio_data->gpio != gpio) | ||
| 155 | free_irq(gpio_to_irq(gpio_data->gpio), led); | ||
| 156 | |||
| 157 | gpio_data->gpio = gpio; | ||
| 158 | ret = request_irq(gpio_to_irq(gpio), gpio_trig_irq, | 162 | ret = request_irq(gpio_to_irq(gpio), gpio_trig_irq, |
| 159 | IRQF_SHARED | IRQF_TRIGGER_RISING | 163 | IRQF_SHARED | IRQF_TRIGGER_RISING |
| 160 | | IRQF_TRIGGER_FALLING, "ledtrig-gpio", led); | 164 | | IRQF_TRIGGER_FALLING, "ledtrig-gpio", led); |
| 161 | if (ret) | 165 | if (ret) { |
| 162 | dev_err(dev, "request_irq failed with error %d\n", ret); | 166 | dev_err(dev, "request_irq failed with error %d\n", ret); |
| 167 | } else { | ||
| 168 | if (gpio_data->gpio != 0) | ||
| 169 | free_irq(gpio_to_irq(gpio_data->gpio), led); | ||
| 170 | gpio_data->gpio = gpio; | ||
| 171 | } | ||
| 163 | 172 | ||
| 164 | return ret ? ret : n; | 173 | return ret ? ret : n; |
| 165 | } | 174 | } |
| @@ -211,7 +220,8 @@ static void gpio_trig_deactivate(struct led_classdev *led) | |||
| 211 | device_remove_file(led->dev, &dev_attr_inverted); | 220 | device_remove_file(led->dev, &dev_attr_inverted); |
| 212 | device_remove_file(led->dev, &dev_attr_desired_brightness); | 221 | device_remove_file(led->dev, &dev_attr_desired_brightness); |
| 213 | flush_work(&gpio_data->work); | 222 | flush_work(&gpio_data->work); |
| 214 | free_irq(gpio_to_irq(gpio_data->gpio),led); | 223 | if (gpio_data->gpio != 0) |
| 224 | free_irq(gpio_to_irq(gpio_data->gpio), led); | ||
| 215 | kfree(gpio_data); | 225 | kfree(gpio_data); |
| 216 | } | 226 | } |
| 217 | } | 227 | } |
diff --git a/drivers/macintosh/via-maciisi.c b/drivers/macintosh/via-maciisi.c index 4d686c0bdea0..9ab5b0c34f0d 100644 --- a/drivers/macintosh/via-maciisi.c +++ b/drivers/macintosh/via-maciisi.c | |||
| @@ -288,7 +288,7 @@ static void maciisi_sync(struct adb_request *req) | |||
| 288 | } | 288 | } |
| 289 | /* This could be BAD... when the ADB controller doesn't respond | 289 | /* This could be BAD... when the ADB controller doesn't respond |
| 290 | * for this long, it's probably not coming back :-( */ | 290 | * for this long, it's probably not coming back :-( */ |
| 291 | if(count >= 50) /* Hopefully shouldn't happen */ | 291 | if (count > 50) /* Hopefully shouldn't happen */ |
| 292 | printk(KERN_ERR "maciisi_send_request: poll timed out!\n"); | 292 | printk(KERN_ERR "maciisi_send_request: poll timed out!\n"); |
| 293 | } | 293 | } |
| 294 | 294 | ||
diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c index 7ad972229db4..0d9d4bc9c762 100644 --- a/drivers/mtd/nand/orion_nand.c +++ b/drivers/mtd/nand/orion_nand.c | |||
| @@ -61,7 +61,7 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) | |||
| 61 | buf64 = (uint64_t *)buf; | 61 | buf64 = (uint64_t *)buf; |
| 62 | while (i < len/8) { | 62 | while (i < len/8) { |
| 63 | uint64_t x; | 63 | uint64_t x; |
| 64 | asm ("ldrd\t%0, [%1]" : "=r" (x) : "r" (io_base)); | 64 | asm volatile ("ldrd\t%0, [%1]" : "=&r" (x) : "r" (io_base)); |
| 65 | buf64[i++] = x; | 65 | buf64[i++] = x; |
| 66 | } | 66 | } |
| 67 | i *= 8; | 67 | i *= 8; |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 5f6509a5f640..5ce7cbabd7a7 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
| @@ -1727,12 +1727,14 @@ config KS8842 | |||
| 1727 | tristate "Micrel KSZ8842" | 1727 | tristate "Micrel KSZ8842" |
| 1728 | depends on HAS_IOMEM | 1728 | depends on HAS_IOMEM |
| 1729 | help | 1729 | help |
| 1730 | This platform driver is for Micrel KSZ8842 chip. | 1730 | This platform driver is for Micrel KSZ8842 / KS8842 |
| 1731 | 2-port ethernet switch chip (managed, VLAN, QoS). | ||
| 1731 | 1732 | ||
| 1732 | config KS8851 | 1733 | config KS8851 |
| 1733 | tristate "Micrel KS8851 SPI" | 1734 | tristate "Micrel KS8851 SPI" |
| 1734 | depends on SPI | 1735 | depends on SPI |
| 1735 | select MII | 1736 | select MII |
| 1737 | select CRC32 | ||
| 1736 | help | 1738 | help |
| 1737 | SPI driver for Micrel KS8851 SPI attached network chip. | 1739 | SPI driver for Micrel KS8851 SPI attached network chip. |
| 1738 | 1740 | ||
diff --git a/drivers/net/arm/w90p910_ether.c b/drivers/net/arm/w90p910_ether.c index 616fb7985a34..ddd231cb54b7 100644 --- a/drivers/net/arm/w90p910_ether.c +++ b/drivers/net/arm/w90p910_ether.c | |||
| @@ -1080,7 +1080,7 @@ static struct platform_driver w90p910_ether_driver = { | |||
| 1080 | .probe = w90p910_ether_probe, | 1080 | .probe = w90p910_ether_probe, |
| 1081 | .remove = __devexit_p(w90p910_ether_remove), | 1081 | .remove = __devexit_p(w90p910_ether_remove), |
| 1082 | .driver = { | 1082 | .driver = { |
| 1083 | .name = "w90p910-emc", | 1083 | .name = "nuc900-emc", |
| 1084 | .owner = THIS_MODULE, | 1084 | .owner = THIS_MODULE, |
| 1085 | }, | 1085 | }, |
| 1086 | }; | 1086 | }; |
| @@ -1101,5 +1101,5 @@ module_exit(w90p910_ether_exit); | |||
| 1101 | MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>"); | 1101 | MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>"); |
| 1102 | MODULE_DESCRIPTION("w90p910 MAC driver!"); | 1102 | MODULE_DESCRIPTION("w90p910 MAC driver!"); |
| 1103 | MODULE_LICENSE("GPL"); | 1103 | MODULE_LICENSE("GPL"); |
| 1104 | MODULE_ALIAS("platform:w90p910-emc"); | 1104 | MODULE_ALIAS("platform:nuc900-emc"); |
| 1105 | 1105 | ||
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 41b648a67fec..3a6735dc9f6a 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
| @@ -1899,7 +1899,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx, | |||
| 1899 | nic->ru_running = RU_SUSPENDED; | 1899 | nic->ru_running = RU_SUSPENDED; |
| 1900 | pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr, | 1900 | pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr, |
| 1901 | sizeof(struct rfd), | 1901 | sizeof(struct rfd), |
| 1902 | PCI_DMA_BIDIRECTIONAL); | 1902 | PCI_DMA_FROMDEVICE); |
| 1903 | return -ENODATA; | 1903 | return -ENODATA; |
| 1904 | } | 1904 | } |
| 1905 | 1905 | ||
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index cc786333d95c..c40113f58963 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
| @@ -309,6 +309,7 @@ static int mpc52xx_fec_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 309 | { | 309 | { |
| 310 | struct mpc52xx_fec_priv *priv = netdev_priv(dev); | 310 | struct mpc52xx_fec_priv *priv = netdev_priv(dev); |
| 311 | struct bcom_fec_bd *bd; | 311 | struct bcom_fec_bd *bd; |
| 312 | unsigned long flags; | ||
| 312 | 313 | ||
| 313 | if (bcom_queue_full(priv->tx_dmatsk)) { | 314 | if (bcom_queue_full(priv->tx_dmatsk)) { |
| 314 | if (net_ratelimit()) | 315 | if (net_ratelimit()) |
| @@ -316,7 +317,7 @@ static int mpc52xx_fec_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 316 | return NETDEV_TX_BUSY; | 317 | return NETDEV_TX_BUSY; |
| 317 | } | 318 | } |
| 318 | 319 | ||
| 319 | spin_lock_irq(&priv->lock); | 320 | spin_lock_irqsave(&priv->lock, flags); |
| 320 | dev->trans_start = jiffies; | 321 | dev->trans_start = jiffies; |
| 321 | 322 | ||
| 322 | bd = (struct bcom_fec_bd *) | 323 | bd = (struct bcom_fec_bd *) |
| @@ -332,7 +333,7 @@ static int mpc52xx_fec_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 332 | netif_stop_queue(dev); | 333 | netif_stop_queue(dev); |
| 333 | } | 334 | } |
| 334 | 335 | ||
| 335 | spin_unlock_irq(&priv->lock); | 336 | spin_unlock_irqrestore(&priv->lock, flags); |
| 336 | 337 | ||
| 337 | return NETDEV_TX_OK; | 338 | return NETDEV_TX_OK; |
| 338 | } | 339 | } |
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index beb84213b671..f0f890803710 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
| @@ -1305,6 +1305,8 @@ static int emac_close(struct net_device *ndev) | |||
| 1305 | 1305 | ||
| 1306 | free_irq(dev->emac_irq, dev); | 1306 | free_irq(dev->emac_irq, dev); |
| 1307 | 1307 | ||
| 1308 | netif_carrier_off(ndev); | ||
| 1309 | |||
| 1308 | return 0; | 1310 | return 0; |
| 1309 | } | 1311 | } |
| 1310 | 1312 | ||
diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c index c4361d466597..ee1cff5c9b21 100644 --- a/drivers/net/irda/au1k_ir.c +++ b/drivers/net/irda/au1k_ir.c | |||
| @@ -23,7 +23,6 @@ | |||
| 23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
| 24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
| 25 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
| 26 | #include <linux/etherdevice.h> | ||
| 27 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
| 28 | #include <linux/rtnetlink.h> | 27 | #include <linux/rtnetlink.h> |
| 29 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
| @@ -205,9 +204,6 @@ static const struct net_device_ops au1k_irda_netdev_ops = { | |||
| 205 | .ndo_start_xmit = au1k_irda_hard_xmit, | 204 | .ndo_start_xmit = au1k_irda_hard_xmit, |
| 206 | .ndo_tx_timeout = au1k_tx_timeout, | 205 | .ndo_tx_timeout = au1k_tx_timeout, |
| 207 | .ndo_do_ioctl = au1k_irda_ioctl, | 206 | .ndo_do_ioctl = au1k_irda_ioctl, |
| 208 | .ndo_change_mtu = eth_change_mtu, | ||
| 209 | .ndo_validate_addr = eth_validate_addr, | ||
| 210 | .ndo_set_mac_address = eth_mac_addr, | ||
| 211 | }; | 207 | }; |
| 212 | 208 | ||
| 213 | static int au1k_irda_net_init(struct net_device *dev) | 209 | static int au1k_irda_net_init(struct net_device *dev) |
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index 3376a4f39e0a..77d10edefd25 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c | |||
| @@ -803,9 +803,6 @@ static const struct net_device_ops pxa_irda_netdev_ops = { | |||
| 803 | .ndo_stop = pxa_irda_stop, | 803 | .ndo_stop = pxa_irda_stop, |
| 804 | .ndo_start_xmit = pxa_irda_hard_xmit, | 804 | .ndo_start_xmit = pxa_irda_hard_xmit, |
| 805 | .ndo_do_ioctl = pxa_irda_ioctl, | 805 | .ndo_do_ioctl = pxa_irda_ioctl, |
| 806 | .ndo_change_mtu = eth_change_mtu, | ||
| 807 | .ndo_validate_addr = eth_validate_addr, | ||
| 808 | .ndo_set_mac_address = eth_mac_addr, | ||
| 809 | }; | 806 | }; |
| 810 | 807 | ||
| 811 | static int pxa_irda_probe(struct platform_device *pdev) | 808 | static int pxa_irda_probe(struct platform_device *pdev) |
| @@ -830,6 +827,7 @@ static int pxa_irda_probe(struct platform_device *pdev) | |||
| 830 | if (!dev) | 827 | if (!dev) |
| 831 | goto err_mem_3; | 828 | goto err_mem_3; |
| 832 | 829 | ||
| 830 | SET_NETDEV_DEV(dev, &pdev->dev); | ||
| 833 | si = netdev_priv(dev); | 831 | si = netdev_priv(dev); |
| 834 | si->dev = &pdev->dev; | 832 | si->dev = &pdev->dev; |
| 835 | si->pdata = pdev->dev.platform_data; | 833 | si->pdata = pdev->dev.platform_data; |
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c index 2aeb2e6aec1b..b039cb081e94 100644 --- a/drivers/net/irda/sa1100_ir.c +++ b/drivers/net/irda/sa1100_ir.c | |||
| @@ -24,7 +24,6 @@ | |||
| 24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
| 25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
| 26 | #include <linux/netdevice.h> | 26 | #include <linux/netdevice.h> |
| 27 | #include <linux/etherdevice.h> | ||
| 28 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
| 29 | #include <linux/rtnetlink.h> | 28 | #include <linux/rtnetlink.h> |
| 30 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
| @@ -881,9 +880,6 @@ static const struct net_device_ops sa1100_irda_netdev_ops = { | |||
| 881 | .ndo_stop = sa1100_irda_stop, | 880 | .ndo_stop = sa1100_irda_stop, |
| 882 | .ndo_start_xmit = sa1100_irda_hard_xmit, | 881 | .ndo_start_xmit = sa1100_irda_hard_xmit, |
| 883 | .ndo_do_ioctl = sa1100_irda_ioctl, | 882 | .ndo_do_ioctl = sa1100_irda_ioctl, |
| 884 | .ndo_change_mtu = eth_change_mtu, | ||
| 885 | .ndo_validate_addr = eth_validate_addr, | ||
| 886 | .ndo_set_mac_address = eth_mac_addr, | ||
| 887 | }; | 883 | }; |
| 888 | 884 | ||
| 889 | static int sa1100_irda_probe(struct platform_device *pdev) | 885 | static int sa1100_irda_probe(struct platform_device *pdev) |
diff --git a/drivers/net/ixp2000/ixpdev.c b/drivers/net/ixp2000/ixpdev.c index 2a0174b62e96..92fb8235c766 100644 --- a/drivers/net/ixp2000/ixpdev.c +++ b/drivers/net/ixp2000/ixpdev.c | |||
| @@ -41,6 +41,7 @@ static int ixpdev_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 41 | struct ixpdev_priv *ip = netdev_priv(dev); | 41 | struct ixpdev_priv *ip = netdev_priv(dev); |
| 42 | struct ixpdev_tx_desc *desc; | 42 | struct ixpdev_tx_desc *desc; |
| 43 | int entry; | 43 | int entry; |
| 44 | unsigned long flags; | ||
| 44 | 45 | ||
| 45 | if (unlikely(skb->len > PAGE_SIZE)) { | 46 | if (unlikely(skb->len > PAGE_SIZE)) { |
| 46 | /* @@@ Count drops. */ | 47 | /* @@@ Count drops. */ |
| @@ -63,11 +64,11 @@ static int ixpdev_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 63 | 64 | ||
| 64 | dev->trans_start = jiffies; | 65 | dev->trans_start = jiffies; |
| 65 | 66 | ||
| 66 | local_irq_disable(); | 67 | local_irq_save(flags); |
| 67 | ip->tx_queue_entries++; | 68 | ip->tx_queue_entries++; |
| 68 | if (ip->tx_queue_entries == TX_BUF_COUNT_PER_CHAN) | 69 | if (ip->tx_queue_entries == TX_BUF_COUNT_PER_CHAN) |
| 69 | netif_stop_queue(dev); | 70 | netif_stop_queue(dev); |
| 70 | local_irq_enable(); | 71 | local_irq_restore(flags); |
| 71 | 72 | ||
| 72 | return 0; | 73 | return 0; |
| 73 | } | 74 | } |
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 5b5c25368d1e..e3601cf3f931 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c | |||
| @@ -620,6 +620,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 620 | dma_addr_t mapping; | 620 | dma_addr_t mapping; |
| 621 | unsigned int len, entry; | 621 | unsigned int len, entry; |
| 622 | u32 ctrl; | 622 | u32 ctrl; |
| 623 | unsigned long flags; | ||
| 623 | 624 | ||
| 624 | #ifdef DEBUG | 625 | #ifdef DEBUG |
| 625 | int i; | 626 | int i; |
| @@ -635,12 +636,12 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 635 | #endif | 636 | #endif |
| 636 | 637 | ||
| 637 | len = skb->len; | 638 | len = skb->len; |
| 638 | spin_lock_irq(&bp->lock); | 639 | spin_lock_irqsave(&bp->lock, flags); |
| 639 | 640 | ||
| 640 | /* This is a hard error, log it. */ | 641 | /* This is a hard error, log it. */ |
| 641 | if (TX_BUFFS_AVAIL(bp) < 1) { | 642 | if (TX_BUFFS_AVAIL(bp) < 1) { |
| 642 | netif_stop_queue(dev); | 643 | netif_stop_queue(dev); |
| 643 | spin_unlock_irq(&bp->lock); | 644 | spin_unlock_irqrestore(&bp->lock, flags); |
| 644 | dev_err(&bp->pdev->dev, | 645 | dev_err(&bp->pdev->dev, |
| 645 | "BUG! Tx Ring full when queue awake!\n"); | 646 | "BUG! Tx Ring full when queue awake!\n"); |
| 646 | dev_dbg(&bp->pdev->dev, "tx_head = %u, tx_tail = %u\n", | 647 | dev_dbg(&bp->pdev->dev, "tx_head = %u, tx_tail = %u\n", |
| @@ -674,7 +675,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 674 | if (TX_BUFFS_AVAIL(bp) < 1) | 675 | if (TX_BUFFS_AVAIL(bp) < 1) |
| 675 | netif_stop_queue(dev); | 676 | netif_stop_queue(dev); |
| 676 | 677 | ||
| 677 | spin_unlock_irq(&bp->lock); | 678 | spin_unlock_irqrestore(&bp->lock, flags); |
| 678 | 679 | ||
| 679 | dev->trans_start = jiffies; | 680 | dev->trans_start = jiffies; |
| 680 | 681 | ||
diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c index 5a88b3f57693..62208401c4df 100644 --- a/drivers/net/mlx4/en_tx.c +++ b/drivers/net/mlx4/en_tx.c | |||
| @@ -437,6 +437,7 @@ static inline void mlx4_en_xmit_poll(struct mlx4_en_priv *priv, int tx_ind) | |||
| 437 | { | 437 | { |
| 438 | struct mlx4_en_cq *cq = &priv->tx_cq[tx_ind]; | 438 | struct mlx4_en_cq *cq = &priv->tx_cq[tx_ind]; |
| 439 | struct mlx4_en_tx_ring *ring = &priv->tx_ring[tx_ind]; | 439 | struct mlx4_en_tx_ring *ring = &priv->tx_ring[tx_ind]; |
| 440 | unsigned long flags; | ||
| 440 | 441 | ||
| 441 | /* If we don't have a pending timer, set one up to catch our recent | 442 | /* If we don't have a pending timer, set one up to catch our recent |
| 442 | post in case the interface becomes idle */ | 443 | post in case the interface becomes idle */ |
| @@ -445,9 +446,9 @@ static inline void mlx4_en_xmit_poll(struct mlx4_en_priv *priv, int tx_ind) | |||
| 445 | 446 | ||
| 446 | /* Poll the CQ every mlx4_en_TX_MODER_POLL packets */ | 447 | /* Poll the CQ every mlx4_en_TX_MODER_POLL packets */ |
| 447 | if ((++ring->poll_cnt & (MLX4_EN_TX_POLL_MODER - 1)) == 0) | 448 | if ((++ring->poll_cnt & (MLX4_EN_TX_POLL_MODER - 1)) == 0) |
| 448 | if (spin_trylock_irq(&ring->comp_lock)) { | 449 | if (spin_trylock_irqsave(&ring->comp_lock, flags)) { |
| 449 | mlx4_en_process_tx_cq(priv->dev, cq); | 450 | mlx4_en_process_tx_cq(priv->dev, cq); |
| 450 | spin_unlock_irq(&ring->comp_lock); | 451 | spin_unlock_irqrestore(&ring->comp_lock, flags); |
| 451 | } | 452 | } |
| 452 | } | 453 | } |
| 453 | 454 | ||
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index 1c70e999cc50..7567f510eff5 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
| @@ -196,21 +196,23 @@ static void PRINT_PKT(u_char *buf, int length) | |||
| 196 | /* this enables an interrupt in the interrupt mask register */ | 196 | /* this enables an interrupt in the interrupt mask register */ |
| 197 | #define SMC_ENABLE_INT(lp, x) do { \ | 197 | #define SMC_ENABLE_INT(lp, x) do { \ |
| 198 | unsigned char mask; \ | 198 | unsigned char mask; \ |
| 199 | spin_lock_irq(&lp->lock); \ | 199 | unsigned long smc_enable_flags; \ |
| 200 | spin_lock_irqsave(&lp->lock, smc_enable_flags); \ | ||
| 200 | mask = SMC_GET_INT_MASK(lp); \ | 201 | mask = SMC_GET_INT_MASK(lp); \ |
| 201 | mask |= (x); \ | 202 | mask |= (x); \ |
| 202 | SMC_SET_INT_MASK(lp, mask); \ | 203 | SMC_SET_INT_MASK(lp, mask); \ |
| 203 | spin_unlock_irq(&lp->lock); \ | 204 | spin_unlock_irqrestore(&lp->lock, smc_enable_flags); \ |
| 204 | } while (0) | 205 | } while (0) |
| 205 | 206 | ||
| 206 | /* this disables an interrupt from the interrupt mask register */ | 207 | /* this disables an interrupt from the interrupt mask register */ |
| 207 | #define SMC_DISABLE_INT(lp, x) do { \ | 208 | #define SMC_DISABLE_INT(lp, x) do { \ |
| 208 | unsigned char mask; \ | 209 | unsigned char mask; \ |
| 209 | spin_lock_irq(&lp->lock); \ | 210 | unsigned long smc_disable_flags; \ |
| 211 | spin_lock_irqsave(&lp->lock, smc_disable_flags); \ | ||
| 210 | mask = SMC_GET_INT_MASK(lp); \ | 212 | mask = SMC_GET_INT_MASK(lp); \ |
| 211 | mask &= ~(x); \ | 213 | mask &= ~(x); \ |
| 212 | SMC_SET_INT_MASK(lp, mask); \ | 214 | SMC_SET_INT_MASK(lp, mask); \ |
| 213 | spin_unlock_irq(&lp->lock); \ | 215 | spin_unlock_irqrestore(&lp->lock, smc_disable_flags); \ |
| 214 | } while (0) | 216 | } while (0) |
| 215 | 217 | ||
| 216 | /* | 218 | /* |
| @@ -520,21 +522,21 @@ static inline void smc_rcv(struct net_device *dev) | |||
| 520 | * any other concurrent access and C would always interrupt B. But life | 522 | * any other concurrent access and C would always interrupt B. But life |
| 521 | * isn't that easy in a SMP world... | 523 | * isn't that easy in a SMP world... |
| 522 | */ | 524 | */ |
| 523 | #define smc_special_trylock(lock) \ | 525 | #define smc_special_trylock(lock, flags) \ |
| 524 | ({ \ | 526 | ({ \ |
| 525 | int __ret; \ | 527 | int __ret; \ |
| 526 | local_irq_disable(); \ | 528 | local_irq_save(flags); \ |
| 527 | __ret = spin_trylock(lock); \ | 529 | __ret = spin_trylock(lock); \ |
| 528 | if (!__ret) \ | 530 | if (!__ret) \ |
| 529 | local_irq_enable(); \ | 531 | local_irq_restore(flags); \ |
| 530 | __ret; \ | 532 | __ret; \ |
| 531 | }) | 533 | }) |
| 532 | #define smc_special_lock(lock) spin_lock_irq(lock) | 534 | #define smc_special_lock(lock, flags) spin_lock_irqsave(lock, flags) |
| 533 | #define smc_special_unlock(lock) spin_unlock_irq(lock) | 535 | #define smc_special_unlock(lock, flags) spin_unlock_irqrestore(lock, flags) |
| 534 | #else | 536 | #else |
| 535 | #define smc_special_trylock(lock) (1) | 537 | #define smc_special_trylock(lock, flags) (1) |
| 536 | #define smc_special_lock(lock) do { } while (0) | 538 | #define smc_special_lock(lock, flags) do { } while (0) |
| 537 | #define smc_special_unlock(lock) do { } while (0) | 539 | #define smc_special_unlock(lock, flags) do { } while (0) |
| 538 | #endif | 540 | #endif |
| 539 | 541 | ||
| 540 | /* | 542 | /* |
| @@ -548,10 +550,11 @@ static void smc_hardware_send_pkt(unsigned long data) | |||
| 548 | struct sk_buff *skb; | 550 | struct sk_buff *skb; |
| 549 | unsigned int packet_no, len; | 551 | unsigned int packet_no, len; |
| 550 | unsigned char *buf; | 552 | unsigned char *buf; |
| 553 | unsigned long flags; | ||
| 551 | 554 | ||
| 552 | DBG(3, "%s: %s\n", dev->name, __func__); | 555 | DBG(3, "%s: %s\n", dev->name, __func__); |
| 553 | 556 | ||
| 554 | if (!smc_special_trylock(&lp->lock)) { | 557 | if (!smc_special_trylock(&lp->lock, flags)) { |
| 555 | netif_stop_queue(dev); | 558 | netif_stop_queue(dev); |
| 556 | tasklet_schedule(&lp->tx_task); | 559 | tasklet_schedule(&lp->tx_task); |
| 557 | return; | 560 | return; |
| @@ -559,7 +562,7 @@ static void smc_hardware_send_pkt(unsigned long data) | |||
| 559 | 562 | ||
| 560 | skb = lp->pending_tx_skb; | 563 | skb = lp->pending_tx_skb; |
| 561 | if (unlikely(!skb)) { | 564 | if (unlikely(!skb)) { |
| 562 | smc_special_unlock(&lp->lock); | 565 | smc_special_unlock(&lp->lock, flags); |
| 563 | return; | 566 | return; |
| 564 | } | 567 | } |
| 565 | lp->pending_tx_skb = NULL; | 568 | lp->pending_tx_skb = NULL; |
| @@ -569,7 +572,7 @@ static void smc_hardware_send_pkt(unsigned long data) | |||
| 569 | printk("%s: Memory allocation failed.\n", dev->name); | 572 | printk("%s: Memory allocation failed.\n", dev->name); |
| 570 | dev->stats.tx_errors++; | 573 | dev->stats.tx_errors++; |
| 571 | dev->stats.tx_fifo_errors++; | 574 | dev->stats.tx_fifo_errors++; |
| 572 | smc_special_unlock(&lp->lock); | 575 | smc_special_unlock(&lp->lock, flags); |
| 573 | goto done; | 576 | goto done; |
| 574 | } | 577 | } |
| 575 | 578 | ||
| @@ -608,7 +611,7 @@ static void smc_hardware_send_pkt(unsigned long data) | |||
| 608 | 611 | ||
| 609 | /* queue the packet for TX */ | 612 | /* queue the packet for TX */ |
| 610 | SMC_SET_MMU_CMD(lp, MC_ENQUEUE); | 613 | SMC_SET_MMU_CMD(lp, MC_ENQUEUE); |
| 611 | smc_special_unlock(&lp->lock); | 614 | smc_special_unlock(&lp->lock, flags); |
| 612 | 615 | ||
| 613 | dev->trans_start = jiffies; | 616 | dev->trans_start = jiffies; |
| 614 | dev->stats.tx_packets++; | 617 | dev->stats.tx_packets++; |
| @@ -633,6 +636,7 @@ static int smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 633 | struct smc_local *lp = netdev_priv(dev); | 636 | struct smc_local *lp = netdev_priv(dev); |
| 634 | void __iomem *ioaddr = lp->base; | 637 | void __iomem *ioaddr = lp->base; |
| 635 | unsigned int numPages, poll_count, status; | 638 | unsigned int numPages, poll_count, status; |
| 639 | unsigned long flags; | ||
| 636 | 640 | ||
| 637 | DBG(3, "%s: %s\n", dev->name, __func__); | 641 | DBG(3, "%s: %s\n", dev->name, __func__); |
| 638 | 642 | ||
| @@ -658,7 +662,7 @@ static int smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 658 | return 0; | 662 | return 0; |
| 659 | } | 663 | } |
| 660 | 664 | ||
| 661 | smc_special_lock(&lp->lock); | 665 | smc_special_lock(&lp->lock, flags); |
| 662 | 666 | ||
| 663 | /* now, try to allocate the memory */ | 667 | /* now, try to allocate the memory */ |
| 664 | SMC_SET_MMU_CMD(lp, MC_ALLOC | numPages); | 668 | SMC_SET_MMU_CMD(lp, MC_ALLOC | numPages); |
| @@ -676,7 +680,7 @@ static int smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 676 | } | 680 | } |
| 677 | } while (--poll_count); | 681 | } while (--poll_count); |
| 678 | 682 | ||
| 679 | smc_special_unlock(&lp->lock); | 683 | smc_special_unlock(&lp->lock, flags); |
| 680 | 684 | ||
| 681 | lp->pending_tx_skb = skb; | 685 | lp->pending_tx_skb = skb; |
| 682 | if (!poll_count) { | 686 | if (!poll_count) { |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 2a6e81d5b579..bbedf03a2124 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
| @@ -70,6 +70,9 @@ struct virtnet_info | |||
| 70 | struct sk_buff_head recv; | 70 | struct sk_buff_head recv; |
| 71 | struct sk_buff_head send; | 71 | struct sk_buff_head send; |
| 72 | 72 | ||
| 73 | /* Work struct for refilling if we run low on memory. */ | ||
| 74 | struct delayed_work refill; | ||
| 75 | |||
| 73 | /* Chain pages by the private ptr. */ | 76 | /* Chain pages by the private ptr. */ |
| 74 | struct page *pages; | 77 | struct page *pages; |
| 75 | }; | 78 | }; |
| @@ -273,19 +276,22 @@ drop: | |||
| 273 | dev_kfree_skb(skb); | 276 | dev_kfree_skb(skb); |
| 274 | } | 277 | } |
| 275 | 278 | ||
| 276 | static void try_fill_recv_maxbufs(struct virtnet_info *vi) | 279 | static bool try_fill_recv_maxbufs(struct virtnet_info *vi, gfp_t gfp) |
| 277 | { | 280 | { |
| 278 | struct sk_buff *skb; | 281 | struct sk_buff *skb; |
| 279 | struct scatterlist sg[2+MAX_SKB_FRAGS]; | 282 | struct scatterlist sg[2+MAX_SKB_FRAGS]; |
| 280 | int num, err, i; | 283 | int num, err, i; |
| 284 | bool oom = false; | ||
| 281 | 285 | ||
| 282 | sg_init_table(sg, 2+MAX_SKB_FRAGS); | 286 | sg_init_table(sg, 2+MAX_SKB_FRAGS); |
| 283 | for (;;) { | 287 | for (;;) { |
| 284 | struct virtio_net_hdr *hdr; | 288 | struct virtio_net_hdr *hdr; |
| 285 | 289 | ||
| 286 | skb = netdev_alloc_skb(vi->dev, MAX_PACKET_LEN + NET_IP_ALIGN); | 290 | skb = netdev_alloc_skb(vi->dev, MAX_PACKET_LEN + NET_IP_ALIGN); |
| 287 | if (unlikely(!skb)) | 291 | if (unlikely(!skb)) { |
| 292 | oom = true; | ||
| 288 | break; | 293 | break; |
| 294 | } | ||
| 289 | 295 | ||
| 290 | skb_reserve(skb, NET_IP_ALIGN); | 296 | skb_reserve(skb, NET_IP_ALIGN); |
| 291 | skb_put(skb, MAX_PACKET_LEN); | 297 | skb_put(skb, MAX_PACKET_LEN); |
| @@ -296,7 +302,7 @@ static void try_fill_recv_maxbufs(struct virtnet_info *vi) | |||
| 296 | if (vi->big_packets) { | 302 | if (vi->big_packets) { |
| 297 | for (i = 0; i < MAX_SKB_FRAGS; i++) { | 303 | for (i = 0; i < MAX_SKB_FRAGS; i++) { |
| 298 | skb_frag_t *f = &skb_shinfo(skb)->frags[i]; | 304 | skb_frag_t *f = &skb_shinfo(skb)->frags[i]; |
| 299 | f->page = get_a_page(vi, GFP_ATOMIC); | 305 | f->page = get_a_page(vi, gfp); |
| 300 | if (!f->page) | 306 | if (!f->page) |
| 301 | break; | 307 | break; |
| 302 | 308 | ||
| @@ -325,31 +331,35 @@ static void try_fill_recv_maxbufs(struct virtnet_info *vi) | |||
| 325 | if (unlikely(vi->num > vi->max)) | 331 | if (unlikely(vi->num > vi->max)) |
| 326 | vi->max = vi->num; | 332 | vi->max = vi->num; |
| 327 | vi->rvq->vq_ops->kick(vi->rvq); | 333 | vi->rvq->vq_ops->kick(vi->rvq); |
| 334 | return !oom; | ||
| 328 | } | 335 | } |
| 329 | 336 | ||
| 330 | static void try_fill_recv(struct virtnet_info *vi) | 337 | /* Returns false if we couldn't fill entirely (OOM). */ |
| 338 | static bool try_fill_recv(struct virtnet_info *vi, gfp_t gfp) | ||
| 331 | { | 339 | { |
| 332 | struct sk_buff *skb; | 340 | struct sk_buff *skb; |
| 333 | struct scatterlist sg[1]; | 341 | struct scatterlist sg[1]; |
| 334 | int err; | 342 | int err; |
| 343 | bool oom = false; | ||
| 335 | 344 | ||
| 336 | if (!vi->mergeable_rx_bufs) { | 345 | if (!vi->mergeable_rx_bufs) |
| 337 | try_fill_recv_maxbufs(vi); | 346 | return try_fill_recv_maxbufs(vi, gfp); |
| 338 | return; | ||
| 339 | } | ||
| 340 | 347 | ||
| 341 | for (;;) { | 348 | for (;;) { |
| 342 | skb_frag_t *f; | 349 | skb_frag_t *f; |
| 343 | 350 | ||
| 344 | skb = netdev_alloc_skb(vi->dev, GOOD_COPY_LEN + NET_IP_ALIGN); | 351 | skb = netdev_alloc_skb(vi->dev, GOOD_COPY_LEN + NET_IP_ALIGN); |
| 345 | if (unlikely(!skb)) | 352 | if (unlikely(!skb)) { |
| 353 | oom = true; | ||
| 346 | break; | 354 | break; |
| 355 | } | ||
| 347 | 356 | ||
| 348 | skb_reserve(skb, NET_IP_ALIGN); | 357 | skb_reserve(skb, NET_IP_ALIGN); |
| 349 | 358 | ||
| 350 | f = &skb_shinfo(skb)->frags[0]; | 359 | f = &skb_shinfo(skb)->frags[0]; |
| 351 | f->page = get_a_page(vi, GFP_ATOMIC); | 360 | f->page = get_a_page(vi, gfp); |
| 352 | if (!f->page) { | 361 | if (!f->page) { |
| 362 | oom = true; | ||
| 353 | kfree_skb(skb); | 363 | kfree_skb(skb); |
| 354 | break; | 364 | break; |
| 355 | } | 365 | } |
| @@ -373,6 +383,7 @@ static void try_fill_recv(struct virtnet_info *vi) | |||
| 373 | if (unlikely(vi->num > vi->max)) | 383 | if (unlikely(vi->num > vi->max)) |
| 374 | vi->max = vi->num; | 384 | vi->max = vi->num; |
| 375 | vi->rvq->vq_ops->kick(vi->rvq); | 385 | vi->rvq->vq_ops->kick(vi->rvq); |
| 386 | return !oom; | ||
| 376 | } | 387 | } |
| 377 | 388 | ||
| 378 | static void skb_recv_done(struct virtqueue *rvq) | 389 | static void skb_recv_done(struct virtqueue *rvq) |
| @@ -385,6 +396,23 @@ static void skb_recv_done(struct virtqueue *rvq) | |||
| 385 | } | 396 | } |
| 386 | } | 397 | } |
| 387 | 398 | ||
| 399 | static void refill_work(struct work_struct *work) | ||
| 400 | { | ||
| 401 | struct virtnet_info *vi; | ||
| 402 | bool still_empty; | ||
| 403 | |||
| 404 | vi = container_of(work, struct virtnet_info, refill.work); | ||
| 405 | napi_disable(&vi->napi); | ||
| 406 | try_fill_recv(vi, GFP_KERNEL); | ||
| 407 | still_empty = (vi->num == 0); | ||
| 408 | napi_enable(&vi->napi); | ||
| 409 | |||
| 410 | /* In theory, this can happen: if we don't get any buffers in | ||
| 411 | * we will *never* try to fill again. */ | ||
| 412 | if (still_empty) | ||
| 413 | schedule_delayed_work(&vi->refill, HZ/2); | ||
| 414 | } | ||
| 415 | |||
| 388 | static int virtnet_poll(struct napi_struct *napi, int budget) | 416 | static int virtnet_poll(struct napi_struct *napi, int budget) |
| 389 | { | 417 | { |
| 390 | struct virtnet_info *vi = container_of(napi, struct virtnet_info, napi); | 418 | struct virtnet_info *vi = container_of(napi, struct virtnet_info, napi); |
| @@ -400,10 +428,10 @@ again: | |||
| 400 | received++; | 428 | received++; |
| 401 | } | 429 | } |
| 402 | 430 | ||
| 403 | /* FIXME: If we oom and completely run out of inbufs, we need | 431 | if (vi->num < vi->max / 2) { |
| 404 | * to start a timer trying to fill more. */ | 432 | if (!try_fill_recv(vi, GFP_ATOMIC)) |
| 405 | if (vi->num < vi->max / 2) | 433 | schedule_delayed_work(&vi->refill, 0); |
| 406 | try_fill_recv(vi); | 434 | } |
| 407 | 435 | ||
| 408 | /* Out of packets? */ | 436 | /* Out of packets? */ |
| 409 | if (received < budget) { | 437 | if (received < budget) { |
| @@ -893,6 +921,7 @@ static int virtnet_probe(struct virtio_device *vdev) | |||
| 893 | vi->vdev = vdev; | 921 | vi->vdev = vdev; |
| 894 | vdev->priv = vi; | 922 | vdev->priv = vi; |
| 895 | vi->pages = NULL; | 923 | vi->pages = NULL; |
| 924 | INIT_DELAYED_WORK(&vi->refill, refill_work); | ||
| 896 | 925 | ||
| 897 | /* If they give us a callback when all buffers are done, we don't need | 926 | /* If they give us a callback when all buffers are done, we don't need |
| 898 | * the timer. */ | 927 | * the timer. */ |
| @@ -941,7 +970,7 @@ static int virtnet_probe(struct virtio_device *vdev) | |||
| 941 | } | 970 | } |
| 942 | 971 | ||
| 943 | /* Last of all, set up some receive buffers. */ | 972 | /* Last of all, set up some receive buffers. */ |
| 944 | try_fill_recv(vi); | 973 | try_fill_recv(vi, GFP_KERNEL); |
| 945 | 974 | ||
| 946 | /* If we didn't even get one input buffer, we're useless. */ | 975 | /* If we didn't even get one input buffer, we're useless. */ |
| 947 | if (vi->num == 0) { | 976 | if (vi->num == 0) { |
| @@ -958,6 +987,7 @@ static int virtnet_probe(struct virtio_device *vdev) | |||
| 958 | 987 | ||
| 959 | unregister: | 988 | unregister: |
| 960 | unregister_netdev(dev); | 989 | unregister_netdev(dev); |
| 990 | cancel_delayed_work_sync(&vi->refill); | ||
| 961 | free_vqs: | 991 | free_vqs: |
| 962 | vdev->config->del_vqs(vdev); | 992 | vdev->config->del_vqs(vdev); |
| 963 | free: | 993 | free: |
| @@ -986,6 +1016,7 @@ static void virtnet_remove(struct virtio_device *vdev) | |||
| 986 | BUG_ON(vi->num != 0); | 1016 | BUG_ON(vi->num != 0); |
| 987 | 1017 | ||
| 988 | unregister_netdev(vi->dev); | 1018 | unregister_netdev(vi->dev); |
| 1019 | cancel_delayed_work_sync(&vi->refill); | ||
| 989 | 1020 | ||
| 990 | vdev->config->del_vqs(vi->vdev); | 1021 | vdev->config->del_vqs(vi->vdev); |
| 991 | 1022 | ||
diff --git a/drivers/net/wireless/orinoco/hw.c b/drivers/net/wireless/orinoco/hw.c index 632fac86a308..b3946272c72e 100644 --- a/drivers/net/wireless/orinoco/hw.c +++ b/drivers/net/wireless/orinoco/hw.c | |||
| @@ -70,7 +70,7 @@ int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc) | |||
| 70 | int err = 0; | 70 | int err = 0; |
| 71 | u8 tsc_arr[4][IW_ENCODE_SEQ_MAX_SIZE]; | 71 | u8 tsc_arr[4][IW_ENCODE_SEQ_MAX_SIZE]; |
| 72 | 72 | ||
| 73 | if ((key < 0) || (key > 4)) | 73 | if ((key < 0) || (key >= 4)) |
| 74 | return -EINVAL; | 74 | return -EINVAL; |
| 75 | 75 | ||
| 76 | err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CURRENT_TKIP_IV, | 76 | err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CURRENT_TKIP_IV, |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index 294250e294dd..87a95588a8e3 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c | |||
| @@ -869,6 +869,9 @@ static int rtl8187b_init_hw(struct ieee80211_hw *dev) | |||
| 869 | priv->aifsn[3] = 3; /* AIFSN[AC_BE] */ | 869 | priv->aifsn[3] = 3; /* AIFSN[AC_BE] */ |
| 870 | rtl818x_iowrite8(priv, &priv->map->ACM_CONTROL, 0); | 870 | rtl818x_iowrite8(priv, &priv->map->ACM_CONTROL, 0); |
| 871 | 871 | ||
| 872 | /* ENEDCA flag must always be set, transmit issues? */ | ||
| 873 | rtl818x_iowrite8(priv, &priv->map->MSR, RTL818X_MSR_ENEDCA); | ||
| 874 | |||
| 872 | return 0; | 875 | return 0; |
| 873 | } | 876 | } |
| 874 | 877 | ||
| @@ -1173,13 +1176,16 @@ static void rtl8187_bss_info_changed(struct ieee80211_hw *dev, | |||
| 1173 | rtl818x_iowrite8(priv, &priv->map->BSSID[i], | 1176 | rtl818x_iowrite8(priv, &priv->map->BSSID[i], |
| 1174 | info->bssid[i]); | 1177 | info->bssid[i]); |
| 1175 | 1178 | ||
| 1179 | if (priv->is_rtl8187b) | ||
| 1180 | reg = RTL818X_MSR_ENEDCA; | ||
| 1181 | else | ||
| 1182 | reg = 0; | ||
| 1183 | |||
| 1176 | if (is_valid_ether_addr(info->bssid)) { | 1184 | if (is_valid_ether_addr(info->bssid)) { |
| 1177 | reg = RTL818X_MSR_INFRA; | 1185 | reg |= RTL818X_MSR_INFRA; |
| 1178 | if (priv->is_rtl8187b) | ||
| 1179 | reg |= RTL818X_MSR_ENEDCA; | ||
| 1180 | rtl818x_iowrite8(priv, &priv->map->MSR, reg); | 1186 | rtl818x_iowrite8(priv, &priv->map->MSR, reg); |
| 1181 | } else { | 1187 | } else { |
| 1182 | reg = RTL818X_MSR_NO_LINK; | 1188 | reg |= RTL818X_MSR_NO_LINK; |
| 1183 | rtl818x_iowrite8(priv, &priv->map->MSR, reg); | 1189 | rtl818x_iowrite8(priv, &priv->map->MSR, reg); |
| 1184 | } | 1190 | } |
| 1185 | 1191 | ||
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c index a07580138e81..c2fd6187773f 100644 --- a/drivers/net/yellowfin.c +++ b/drivers/net/yellowfin.c | |||
| @@ -346,7 +346,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); | |||
| 346 | static int yellowfin_open(struct net_device *dev); | 346 | static int yellowfin_open(struct net_device *dev); |
| 347 | static void yellowfin_timer(unsigned long data); | 347 | static void yellowfin_timer(unsigned long data); |
| 348 | static void yellowfin_tx_timeout(struct net_device *dev); | 348 | static void yellowfin_tx_timeout(struct net_device *dev); |
| 349 | static void yellowfin_init_ring(struct net_device *dev); | 349 | static int yellowfin_init_ring(struct net_device *dev); |
| 350 | static int yellowfin_start_xmit(struct sk_buff *skb, struct net_device *dev); | 350 | static int yellowfin_start_xmit(struct sk_buff *skb, struct net_device *dev); |
| 351 | static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance); | 351 | static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance); |
| 352 | static int yellowfin_rx(struct net_device *dev); | 352 | static int yellowfin_rx(struct net_device *dev); |
| @@ -573,19 +573,24 @@ static int yellowfin_open(struct net_device *dev) | |||
| 573 | { | 573 | { |
| 574 | struct yellowfin_private *yp = netdev_priv(dev); | 574 | struct yellowfin_private *yp = netdev_priv(dev); |
| 575 | void __iomem *ioaddr = yp->base; | 575 | void __iomem *ioaddr = yp->base; |
| 576 | int i; | 576 | int i, ret; |
| 577 | 577 | ||
| 578 | /* Reset the chip. */ | 578 | /* Reset the chip. */ |
| 579 | iowrite32(0x80000000, ioaddr + DMACtrl); | 579 | iowrite32(0x80000000, ioaddr + DMACtrl); |
| 580 | 580 | ||
| 581 | i = request_irq(dev->irq, &yellowfin_interrupt, IRQF_SHARED, dev->name, dev); | 581 | ret = request_irq(dev->irq, &yellowfin_interrupt, IRQF_SHARED, dev->name, dev); |
| 582 | if (i) return i; | 582 | if (ret) |
| 583 | return ret; | ||
| 583 | 584 | ||
| 584 | if (yellowfin_debug > 1) | 585 | if (yellowfin_debug > 1) |
| 585 | printk(KERN_DEBUG "%s: yellowfin_open() irq %d.\n", | 586 | printk(KERN_DEBUG "%s: yellowfin_open() irq %d.\n", |
| 586 | dev->name, dev->irq); | 587 | dev->name, dev->irq); |
| 587 | 588 | ||
| 588 | yellowfin_init_ring(dev); | 589 | ret = yellowfin_init_ring(dev); |
| 590 | if (ret) { | ||
| 591 | free_irq(dev->irq, dev); | ||
| 592 | return ret; | ||
| 593 | } | ||
| 589 | 594 | ||
| 590 | iowrite32(yp->rx_ring_dma, ioaddr + RxPtr); | 595 | iowrite32(yp->rx_ring_dma, ioaddr + RxPtr); |
| 591 | iowrite32(yp->tx_ring_dma, ioaddr + TxPtr); | 596 | iowrite32(yp->tx_ring_dma, ioaddr + TxPtr); |
| @@ -725,10 +730,10 @@ static void yellowfin_tx_timeout(struct net_device *dev) | |||
| 725 | } | 730 | } |
| 726 | 731 | ||
| 727 | /* Initialize the Rx and Tx rings, along with various 'dev' bits. */ | 732 | /* Initialize the Rx and Tx rings, along with various 'dev' bits. */ |
| 728 | static void yellowfin_init_ring(struct net_device *dev) | 733 | static int yellowfin_init_ring(struct net_device *dev) |
| 729 | { | 734 | { |
| 730 | struct yellowfin_private *yp = netdev_priv(dev); | 735 | struct yellowfin_private *yp = netdev_priv(dev); |
| 731 | int i; | 736 | int i, j; |
| 732 | 737 | ||
| 733 | yp->tx_full = 0; | 738 | yp->tx_full = 0; |
| 734 | yp->cur_rx = yp->cur_tx = 0; | 739 | yp->cur_rx = yp->cur_tx = 0; |
| @@ -753,6 +758,11 @@ static void yellowfin_init_ring(struct net_device *dev) | |||
| 753 | yp->rx_ring[i].addr = cpu_to_le32(pci_map_single(yp->pci_dev, | 758 | yp->rx_ring[i].addr = cpu_to_le32(pci_map_single(yp->pci_dev, |
| 754 | skb->data, yp->rx_buf_sz, PCI_DMA_FROMDEVICE)); | 759 | skb->data, yp->rx_buf_sz, PCI_DMA_FROMDEVICE)); |
| 755 | } | 760 | } |
| 761 | if (i != RX_RING_SIZE) { | ||
| 762 | for (j = 0; j < i; j++) | ||
| 763 | dev_kfree_skb(yp->rx_skbuff[j]); | ||
| 764 | return -ENOMEM; | ||
| 765 | } | ||
| 756 | yp->rx_ring[i-1].dbdma_cmd = cpu_to_le32(CMD_STOP); | 766 | yp->rx_ring[i-1].dbdma_cmd = cpu_to_le32(CMD_STOP); |
| 757 | yp->dirty_rx = (unsigned int)(i - RX_RING_SIZE); | 767 | yp->dirty_rx = (unsigned int)(i - RX_RING_SIZE); |
| 758 | 768 | ||
| @@ -769,8 +779,6 @@ static void yellowfin_init_ring(struct net_device *dev) | |||
| 769 | yp->tx_ring[--i].dbdma_cmd = cpu_to_le32(CMD_STOP | BRANCH_ALWAYS); | 779 | yp->tx_ring[--i].dbdma_cmd = cpu_to_le32(CMD_STOP | BRANCH_ALWAYS); |
| 770 | #else | 780 | #else |
| 771 | { | 781 | { |
| 772 | int j; | ||
| 773 | |||
| 774 | /* Tx ring needs a pair of descriptors, the second for the status. */ | 782 | /* Tx ring needs a pair of descriptors, the second for the status. */ |
| 775 | for (i = 0; i < TX_RING_SIZE; i++) { | 783 | for (i = 0; i < TX_RING_SIZE; i++) { |
| 776 | j = 2*i; | 784 | j = 2*i; |
| @@ -805,7 +813,7 @@ static void yellowfin_init_ring(struct net_device *dev) | |||
| 805 | } | 813 | } |
| 806 | #endif | 814 | #endif |
| 807 | yp->tx_tail_desc = &yp->tx_status[0]; | 815 | yp->tx_tail_desc = &yp->tx_status[0]; |
| 808 | return; | 816 | return 0; |
| 809 | } | 817 | } |
| 810 | 818 | ||
| 811 | static int yellowfin_start_xmit(struct sk_buff *skb, struct net_device *dev) | 819 | static int yellowfin_start_xmit(struct sk_buff *skb, struct net_device *dev) |
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index d76c4c85367e..f99bc7f089f1 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
| @@ -508,7 +508,7 @@ static int pci_restore_standard_config(struct pci_dev *pci_dev) | |||
| 508 | return error; | 508 | return error; |
| 509 | } | 509 | } |
| 510 | 510 | ||
| 511 | return pci_dev->state_saved ? pci_restore_state(pci_dev) : 0; | 511 | return pci_restore_state(pci_dev); |
| 512 | } | 512 | } |
| 513 | 513 | ||
| 514 | static void pci_pm_default_resume_noirq(struct pci_dev *pci_dev) | 514 | static void pci_pm_default_resume_noirq(struct pci_dev *pci_dev) |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index dbd0f947f497..7b70312181d7 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
| @@ -846,6 +846,8 @@ pci_restore_state(struct pci_dev *dev) | |||
| 846 | int i; | 846 | int i; |
| 847 | u32 val; | 847 | u32 val; |
| 848 | 848 | ||
| 849 | if (!dev->state_saved) | ||
| 850 | return 0; | ||
| 849 | /* PCI Express register must be restored first */ | 851 | /* PCI Express register must be restored first */ |
| 850 | pci_restore_pcie_state(dev); | 852 | pci_restore_pcie_state(dev); |
| 851 | 853 | ||
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 043b208d971d..f215a5919192 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c | |||
| @@ -270,7 +270,7 @@ u32 method_id, const struct acpi_buffer *in, struct acpi_buffer *out) | |||
| 270 | acpi_status status; | 270 | acpi_status status; |
| 271 | struct acpi_object_list input; | 271 | struct acpi_object_list input; |
| 272 | union acpi_object params[3]; | 272 | union acpi_object params[3]; |
| 273 | char method[4] = "WM"; | 273 | char method[5] = "WM"; |
| 274 | 274 | ||
| 275 | if (!find_guid(guid_string, &wblock)) | 275 | if (!find_guid(guid_string, &wblock)) |
| 276 | return AE_ERROR; | 276 | return AE_ERROR; |
| @@ -328,8 +328,8 @@ struct acpi_buffer *out) | |||
| 328 | acpi_status status, wc_status = AE_ERROR; | 328 | acpi_status status, wc_status = AE_ERROR; |
| 329 | struct acpi_object_list input, wc_input; | 329 | struct acpi_object_list input, wc_input; |
| 330 | union acpi_object wc_params[1], wq_params[1]; | 330 | union acpi_object wc_params[1], wq_params[1]; |
| 331 | char method[4]; | 331 | char method[5]; |
| 332 | char wc_method[4] = "WC"; | 332 | char wc_method[5] = "WC"; |
| 333 | 333 | ||
| 334 | if (!guid_string || !out) | 334 | if (!guid_string || !out) |
| 335 | return AE_BAD_PARAMETER; | 335 | return AE_BAD_PARAMETER; |
| @@ -410,7 +410,7 @@ const struct acpi_buffer *in) | |||
| 410 | acpi_handle handle; | 410 | acpi_handle handle; |
| 411 | struct acpi_object_list input; | 411 | struct acpi_object_list input; |
| 412 | union acpi_object params[2]; | 412 | union acpi_object params[2]; |
| 413 | char method[4] = "WS"; | 413 | char method[5] = "WS"; |
| 414 | 414 | ||
| 415 | if (!guid_string || !in) | 415 | if (!guid_string || !in) |
| 416 | return AE_BAD_DATA; | 416 | return AE_BAD_DATA; |
diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c index ac8cc8cea1e3..fea17e7805e9 100644 --- a/drivers/pps/pps.c +++ b/drivers/pps/pps.c | |||
| @@ -244,7 +244,7 @@ int pps_register_cdev(struct pps_device *pps) | |||
| 244 | } | 244 | } |
| 245 | pps->dev = device_create(pps_class, pps->info.dev, pps->devno, NULL, | 245 | pps->dev = device_create(pps_class, pps->info.dev, pps->devno, NULL, |
| 246 | "pps%d", pps->id); | 246 | "pps%d", pps->id); |
| 247 | if (err) | 247 | if (IS_ERR(pps->dev)) |
| 248 | goto del_cdev; | 248 | goto del_cdev; |
| 249 | dev_set_drvdata(pps->dev, pps); | 249 | dev_set_drvdata(pps->dev, pps); |
| 250 | 250 | ||
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 749836668655..3f62dd50bbbe 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
| @@ -2135,9 +2135,9 @@ static int dasd_getgeo(struct block_device *bdev, struct hd_geometry *geo) | |||
| 2135 | struct dasd_device *base; | 2135 | struct dasd_device *base; |
| 2136 | 2136 | ||
| 2137 | block = bdev->bd_disk->private_data; | 2137 | block = bdev->bd_disk->private_data; |
| 2138 | base = block->base; | ||
| 2139 | if (!block) | 2138 | if (!block) |
| 2140 | return -ENODEV; | 2139 | return -ENODEV; |
| 2140 | base = block->base; | ||
| 2141 | 2141 | ||
| 2142 | if (!base->discipline || | 2142 | if (!base->discipline || |
| 2143 | !base->discipline->fill_geometry) | 2143 | !base->discipline->fill_geometry) |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 3c57c1a18bb8..d593bc76afe3 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
| @@ -772,10 +772,8 @@ static struct ccw_device * io_subchannel_create_ccwdev(struct subchannel *sch) | |||
| 772 | cdev = io_subchannel_allocate_dev(sch); | 772 | cdev = io_subchannel_allocate_dev(sch); |
| 773 | if (!IS_ERR(cdev)) { | 773 | if (!IS_ERR(cdev)) { |
| 774 | ret = io_subchannel_initialize_dev(sch, cdev); | 774 | ret = io_subchannel_initialize_dev(sch, cdev); |
| 775 | if (ret) { | 775 | if (ret) |
| 776 | kfree(cdev); | ||
| 777 | cdev = ERR_PTR(ret); | 776 | cdev = ERR_PTR(ret); |
| 778 | } | ||
| 779 | } | 777 | } |
| 780 | return cdev; | 778 | return cdev; |
| 781 | } | 779 | } |
diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c index 15dab96d05e3..7c815d3327f7 100644 --- a/drivers/sbus/char/bbc_envctrl.c +++ b/drivers/sbus/char/bbc_envctrl.c | |||
| @@ -537,8 +537,12 @@ int bbc_envctrl_init(struct bbc_i2c_bus *bp) | |||
| 537 | } | 537 | } |
| 538 | if (temp_index != 0 && fan_index != 0) { | 538 | if (temp_index != 0 && fan_index != 0) { |
| 539 | kenvctrld_task = kthread_run(kenvctrld, NULL, "kenvctrld"); | 539 | kenvctrld_task = kthread_run(kenvctrld, NULL, "kenvctrld"); |
| 540 | if (IS_ERR(kenvctrld_task)) | 540 | if (IS_ERR(kenvctrld_task)) { |
| 541 | return PTR_ERR(kenvctrld_task); | 541 | int err = PTR_ERR(kenvctrld_task); |
| 542 | |||
| 543 | kenvctrld_task = NULL; | ||
| 544 | return err; | ||
| 545 | } | ||
| 542 | } | 546 | } |
| 543 | 547 | ||
| 544 | return 0; | 548 | return 0; |
| @@ -561,7 +565,8 @@ void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp) | |||
| 561 | struct bbc_cpu_temperature *tp, *tpos; | 565 | struct bbc_cpu_temperature *tp, *tpos; |
| 562 | struct bbc_fan_control *fp, *fpos; | 566 | struct bbc_fan_control *fp, *fpos; |
| 563 | 567 | ||
| 564 | kthread_stop(kenvctrld_task); | 568 | if (kenvctrld_task) |
| 569 | kthread_stop(kenvctrld_task); | ||
| 565 | 570 | ||
| 566 | list_for_each_entry_safe(tp, tpos, &bp->temps, bp_list) { | 571 | list_for_each_entry_safe(tp, tpos, &bp->temps, bp_list) { |
| 567 | list_del(&tp->bp_list); | 572 | list_del(&tp->bp_list); |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index f3da592f7bcc..35a13867495e 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | |||
| @@ -119,6 +119,64 @@ _base_fault_reset_work(struct work_struct *work) | |||
| 119 | spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); | 119 | spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | /** | ||
| 123 | * mpt2sas_base_start_watchdog - start the fault_reset_work_q | ||
| 124 | * @ioc: pointer to scsi command object | ||
| 125 | * Context: sleep. | ||
| 126 | * | ||
| 127 | * Return nothing. | ||
| 128 | */ | ||
| 129 | void | ||
| 130 | mpt2sas_base_start_watchdog(struct MPT2SAS_ADAPTER *ioc) | ||
| 131 | { | ||
| 132 | unsigned long flags; | ||
| 133 | |||
| 134 | if (ioc->fault_reset_work_q) | ||
| 135 | return; | ||
| 136 | |||
| 137 | /* initialize fault polling */ | ||
| 138 | INIT_DELAYED_WORK(&ioc->fault_reset_work, _base_fault_reset_work); | ||
| 139 | snprintf(ioc->fault_reset_work_q_name, | ||
| 140 | sizeof(ioc->fault_reset_work_q_name), "poll_%d_status", ioc->id); | ||
| 141 | ioc->fault_reset_work_q = | ||
| 142 | create_singlethread_workqueue(ioc->fault_reset_work_q_name); | ||
| 143 | if (!ioc->fault_reset_work_q) { | ||
| 144 | printk(MPT2SAS_ERR_FMT "%s: failed (line=%d)\n", | ||
| 145 | ioc->name, __func__, __LINE__); | ||
| 146 | return; | ||
| 147 | } | ||
| 148 | spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); | ||
| 149 | if (ioc->fault_reset_work_q) | ||
| 150 | queue_delayed_work(ioc->fault_reset_work_q, | ||
| 151 | &ioc->fault_reset_work, | ||
| 152 | msecs_to_jiffies(FAULT_POLLING_INTERVAL)); | ||
| 153 | spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); | ||
| 154 | } | ||
| 155 | |||
| 156 | /** | ||
| 157 | * mpt2sas_base_stop_watchdog - stop the fault_reset_work_q | ||
| 158 | * @ioc: pointer to scsi command object | ||
| 159 | * Context: sleep. | ||
| 160 | * | ||
| 161 | * Return nothing. | ||
| 162 | */ | ||
| 163 | void | ||
| 164 | mpt2sas_base_stop_watchdog(struct MPT2SAS_ADAPTER *ioc) | ||
| 165 | { | ||
| 166 | unsigned long flags; | ||
| 167 | struct workqueue_struct *wq; | ||
| 168 | |||
| 169 | spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); | ||
| 170 | wq = ioc->fault_reset_work_q; | ||
| 171 | ioc->fault_reset_work_q = NULL; | ||
| 172 | spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); | ||
| 173 | if (wq) { | ||
| 174 | if (!cancel_delayed_work(&ioc->fault_reset_work)) | ||
| 175 | flush_workqueue(wq); | ||
| 176 | destroy_workqueue(wq); | ||
| 177 | } | ||
| 178 | } | ||
| 179 | |||
| 122 | #ifdef CONFIG_SCSI_MPT2SAS_LOGGING | 180 | #ifdef CONFIG_SCSI_MPT2SAS_LOGGING |
| 123 | /** | 181 | /** |
| 124 | * _base_sas_ioc_info - verbose translation of the ioc status | 182 | * _base_sas_ioc_info - verbose translation of the ioc status |
| @@ -440,6 +498,10 @@ _base_sas_log_info(struct MPT2SAS_ADAPTER *ioc , u32 log_info) | |||
| 440 | if (sas_loginfo.dw.bus_type != 3 /*SAS*/) | 498 | if (sas_loginfo.dw.bus_type != 3 /*SAS*/) |
| 441 | return; | 499 | return; |
| 442 | 500 | ||
| 501 | /* each nexus loss loginfo */ | ||
| 502 | if (log_info == 0x31170000) | ||
| 503 | return; | ||
| 504 | |||
| 443 | /* eat the loginfos associated with task aborts */ | 505 | /* eat the loginfos associated with task aborts */ |
| 444 | if (ioc->ignore_loginfos && (log_info == 30050000 || log_info == | 506 | if (ioc->ignore_loginfos && (log_info == 30050000 || log_info == |
| 445 | 0x31140000 || log_info == 0x31130000)) | 507 | 0x31140000 || log_info == 0x31130000)) |
| @@ -1109,7 +1171,6 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc) | |||
| 1109 | } | 1171 | } |
| 1110 | } | 1172 | } |
| 1111 | 1173 | ||
| 1112 | pci_set_drvdata(pdev, ioc->shost); | ||
| 1113 | _base_mask_interrupts(ioc); | 1174 | _base_mask_interrupts(ioc); |
| 1114 | r = _base_enable_msix(ioc); | 1175 | r = _base_enable_msix(ioc); |
| 1115 | if (r) | 1176 | if (r) |
| @@ -1132,7 +1193,6 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc) | |||
| 1132 | ioc->pci_irq = -1; | 1193 | ioc->pci_irq = -1; |
| 1133 | pci_release_selected_regions(ioc->pdev, ioc->bars); | 1194 | pci_release_selected_regions(ioc->pdev, ioc->bars); |
| 1134 | pci_disable_device(pdev); | 1195 | pci_disable_device(pdev); |
| 1135 | pci_set_drvdata(pdev, NULL); | ||
| 1136 | return r; | 1196 | return r; |
| 1137 | } | 1197 | } |
| 1138 | 1198 | ||
| @@ -3191,7 +3251,6 @@ mpt2sas_base_free_resources(struct MPT2SAS_ADAPTER *ioc) | |||
| 3191 | ioc->chip_phys = 0; | 3251 | ioc->chip_phys = 0; |
| 3192 | pci_release_selected_regions(ioc->pdev, ioc->bars); | 3252 | pci_release_selected_regions(ioc->pdev, ioc->bars); |
| 3193 | pci_disable_device(pdev); | 3253 | pci_disable_device(pdev); |
| 3194 | pci_set_drvdata(pdev, NULL); | ||
| 3195 | return; | 3254 | return; |
| 3196 | } | 3255 | } |
| 3197 | 3256 | ||
| @@ -3205,7 +3264,6 @@ int | |||
| 3205 | mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc) | 3264 | mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc) |
| 3206 | { | 3265 | { |
| 3207 | int r, i; | 3266 | int r, i; |
| 3208 | unsigned long flags; | ||
| 3209 | 3267 | ||
| 3210 | dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name, | 3268 | dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name, |
| 3211 | __func__)); | 3269 | __func__)); |
| @@ -3214,6 +3272,7 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc) | |||
| 3214 | if (r) | 3272 | if (r) |
| 3215 | return r; | 3273 | return r; |
| 3216 | 3274 | ||
| 3275 | pci_set_drvdata(ioc->pdev, ioc->shost); | ||
| 3217 | r = _base_make_ioc_ready(ioc, CAN_SLEEP, SOFT_RESET); | 3276 | r = _base_make_ioc_ready(ioc, CAN_SLEEP, SOFT_RESET); |
| 3218 | if (r) | 3277 | if (r) |
| 3219 | goto out_free_resources; | 3278 | goto out_free_resources; |
| @@ -3288,23 +3347,7 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc) | |||
| 3288 | if (r) | 3347 | if (r) |
| 3289 | goto out_free_resources; | 3348 | goto out_free_resources; |
| 3290 | 3349 | ||
| 3291 | /* initialize fault polling */ | 3350 | mpt2sas_base_start_watchdog(ioc); |
| 3292 | INIT_DELAYED_WORK(&ioc->fault_reset_work, _base_fault_reset_work); | ||
| 3293 | snprintf(ioc->fault_reset_work_q_name, | ||
| 3294 | sizeof(ioc->fault_reset_work_q_name), "poll_%d_status", ioc->id); | ||
| 3295 | ioc->fault_reset_work_q = | ||
| 3296 | create_singlethread_workqueue(ioc->fault_reset_work_q_name); | ||
| 3297 | if (!ioc->fault_reset_work_q) { | ||
| 3298 | printk(MPT2SAS_ERR_FMT "%s: failed (line=%d)\n", | ||
| 3299 | ioc->name, __func__, __LINE__); | ||
| 3300 | goto out_free_resources; | ||
| 3301 | } | ||
| 3302 | spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); | ||
| 3303 | if (ioc->fault_reset_work_q) | ||
| 3304 | queue_delayed_work(ioc->fault_reset_work_q, | ||
| 3305 | &ioc->fault_reset_work, | ||
| 3306 | msecs_to_jiffies(FAULT_POLLING_INTERVAL)); | ||
| 3307 | spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); | ||
| 3308 | return 0; | 3351 | return 0; |
| 3309 | 3352 | ||
| 3310 | out_free_resources: | 3353 | out_free_resources: |
| @@ -3312,6 +3355,7 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc) | |||
| 3312 | ioc->remove_host = 1; | 3355 | ioc->remove_host = 1; |
| 3313 | mpt2sas_base_free_resources(ioc); | 3356 | mpt2sas_base_free_resources(ioc); |
| 3314 | _base_release_memory_pools(ioc); | 3357 | _base_release_memory_pools(ioc); |
| 3358 | pci_set_drvdata(ioc->pdev, NULL); | ||
| 3315 | kfree(ioc->tm_cmds.reply); | 3359 | kfree(ioc->tm_cmds.reply); |
| 3316 | kfree(ioc->transport_cmds.reply); | 3360 | kfree(ioc->transport_cmds.reply); |
| 3317 | kfree(ioc->config_cmds.reply); | 3361 | kfree(ioc->config_cmds.reply); |
| @@ -3337,22 +3381,14 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc) | |||
| 3337 | void | 3381 | void |
| 3338 | mpt2sas_base_detach(struct MPT2SAS_ADAPTER *ioc) | 3382 | mpt2sas_base_detach(struct MPT2SAS_ADAPTER *ioc) |
| 3339 | { | 3383 | { |
| 3340 | unsigned long flags; | ||
| 3341 | struct workqueue_struct *wq; | ||
| 3342 | 3384 | ||
| 3343 | dexitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name, | 3385 | dexitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name, |
| 3344 | __func__)); | 3386 | __func__)); |
| 3345 | 3387 | ||
| 3346 | spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags); | 3388 | mpt2sas_base_stop_watchdog(ioc); |
| 3347 | wq = ioc->fault_reset_work_q; | ||
| 3348 | ioc->fault_reset_work_q = NULL; | ||
| 3349 | spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags); | ||
| 3350 | if (!cancel_delayed_work(&ioc->fault_reset_work)) | ||
| 3351 | flush_workqueue(wq); | ||
| 3352 | destroy_workqueue(wq); | ||
| 3353 | |||
| 3354 | mpt2sas_base_free_resources(ioc); | 3389 | mpt2sas_base_free_resources(ioc); |
| 3355 | _base_release_memory_pools(ioc); | 3390 | _base_release_memory_pools(ioc); |
| 3391 | pci_set_drvdata(ioc->pdev, NULL); | ||
| 3356 | kfree(ioc->pfacts); | 3392 | kfree(ioc->pfacts); |
| 3357 | kfree(ioc->ctl_cmds.reply); | 3393 | kfree(ioc->ctl_cmds.reply); |
| 3358 | kfree(ioc->base_cmds.reply); | 3394 | kfree(ioc->base_cmds.reply); |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.h b/drivers/scsi/mpt2sas/mpt2sas_base.h index 286c185fa9e4..acdcff150a35 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.h +++ b/drivers/scsi/mpt2sas/mpt2sas_base.h | |||
| @@ -69,10 +69,10 @@ | |||
| 69 | #define MPT2SAS_DRIVER_NAME "mpt2sas" | 69 | #define MPT2SAS_DRIVER_NAME "mpt2sas" |
| 70 | #define MPT2SAS_AUTHOR "LSI Corporation <DL-MPTFusionLinux@lsi.com>" | 70 | #define MPT2SAS_AUTHOR "LSI Corporation <DL-MPTFusionLinux@lsi.com>" |
| 71 | #define MPT2SAS_DESCRIPTION "LSI MPT Fusion SAS 2.0 Device Driver" | 71 | #define MPT2SAS_DESCRIPTION "LSI MPT Fusion SAS 2.0 Device Driver" |
| 72 | #define MPT2SAS_DRIVER_VERSION "01.100.03.00" | 72 | #define MPT2SAS_DRIVER_VERSION "01.100.04.00" |
| 73 | #define MPT2SAS_MAJOR_VERSION 01 | 73 | #define MPT2SAS_MAJOR_VERSION 01 |
| 74 | #define MPT2SAS_MINOR_VERSION 100 | 74 | #define MPT2SAS_MINOR_VERSION 100 |
| 75 | #define MPT2SAS_BUILD_VERSION 03 | 75 | #define MPT2SAS_BUILD_VERSION 04 |
| 76 | #define MPT2SAS_RELEASE_VERSION 00 | 76 | #define MPT2SAS_RELEASE_VERSION 00 |
| 77 | 77 | ||
| 78 | /* | 78 | /* |
| @@ -673,6 +673,8 @@ typedef void (*MPT_CALLBACK)(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 VF_ID, | |||
| 673 | 673 | ||
| 674 | /* base shared API */ | 674 | /* base shared API */ |
| 675 | extern struct list_head mpt2sas_ioc_list; | 675 | extern struct list_head mpt2sas_ioc_list; |
| 676 | void mpt2sas_base_start_watchdog(struct MPT2SAS_ADAPTER *ioc); | ||
| 677 | void mpt2sas_base_stop_watchdog(struct MPT2SAS_ADAPTER *ioc); | ||
| 676 | 678 | ||
| 677 | int mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc); | 679 | int mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc); |
| 678 | void mpt2sas_base_detach(struct MPT2SAS_ADAPTER *ioc); | 680 | void mpt2sas_base_detach(struct MPT2SAS_ADAPTER *ioc); |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_config.c b/drivers/scsi/mpt2sas/mpt2sas_config.c index 58cfb97846f7..6ddee161beb3 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_config.c +++ b/drivers/scsi/mpt2sas/mpt2sas_config.c | |||
| @@ -236,17 +236,25 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t | |||
| 236 | Mpi2ConfigRequest_t *config_request; | 236 | Mpi2ConfigRequest_t *config_request; |
| 237 | int r; | 237 | int r; |
| 238 | u8 retry_count; | 238 | u8 retry_count; |
| 239 | u8 issue_reset; | 239 | u8 issue_host_reset = 0; |
| 240 | u16 wait_state_count; | 240 | u16 wait_state_count; |
| 241 | 241 | ||
| 242 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 242 | if (ioc->config_cmds.status != MPT2_CMD_NOT_USED) { | 243 | if (ioc->config_cmds.status != MPT2_CMD_NOT_USED) { |
| 243 | printk(MPT2SAS_ERR_FMT "%s: config_cmd in use\n", | 244 | printk(MPT2SAS_ERR_FMT "%s: config_cmd in use\n", |
| 244 | ioc->name, __func__); | 245 | ioc->name, __func__); |
| 246 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 245 | return -EAGAIN; | 247 | return -EAGAIN; |
| 246 | } | 248 | } |
| 247 | retry_count = 0; | 249 | retry_count = 0; |
| 248 | 250 | ||
| 249 | retry_config: | 251 | retry_config: |
| 252 | if (retry_count) { | ||
| 253 | if (retry_count > 2) /* attempt only 2 retries */ | ||
| 254 | return -EFAULT; | ||
| 255 | printk(MPT2SAS_INFO_FMT "%s: attempting retry (%d)\n", | ||
| 256 | ioc->name, __func__, retry_count); | ||
| 257 | } | ||
| 250 | wait_state_count = 0; | 258 | wait_state_count = 0; |
| 251 | ioc_state = mpt2sas_base_get_iocstate(ioc, 1); | 259 | ioc_state = mpt2sas_base_get_iocstate(ioc, 1); |
| 252 | while (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { | 260 | while (ioc_state != MPI2_IOC_STATE_OPERATIONAL) { |
| @@ -254,8 +262,8 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t | |||
| 254 | printk(MPT2SAS_ERR_FMT | 262 | printk(MPT2SAS_ERR_FMT |
| 255 | "%s: failed due to ioc not operational\n", | 263 | "%s: failed due to ioc not operational\n", |
| 256 | ioc->name, __func__); | 264 | ioc->name, __func__); |
| 257 | ioc->config_cmds.status = MPT2_CMD_NOT_USED; | 265 | r = -EFAULT; |
| 258 | return -EFAULT; | 266 | goto out; |
| 259 | } | 267 | } |
| 260 | ssleep(1); | 268 | ssleep(1); |
| 261 | ioc_state = mpt2sas_base_get_iocstate(ioc, 1); | 269 | ioc_state = mpt2sas_base_get_iocstate(ioc, 1); |
| @@ -271,8 +279,8 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t | |||
| 271 | if (!smid) { | 279 | if (!smid) { |
| 272 | printk(MPT2SAS_ERR_FMT "%s: failed obtaining a smid\n", | 280 | printk(MPT2SAS_ERR_FMT "%s: failed obtaining a smid\n", |
| 273 | ioc->name, __func__); | 281 | ioc->name, __func__); |
| 274 | ioc->config_cmds.status = MPT2_CMD_NOT_USED; | 282 | r = -EAGAIN; |
| 275 | return -EAGAIN; | 283 | goto out; |
| 276 | } | 284 | } |
| 277 | 285 | ||
| 278 | r = 0; | 286 | r = 0; |
| @@ -292,9 +300,15 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t | |||
| 292 | ioc->name, __func__); | 300 | ioc->name, __func__); |
| 293 | _debug_dump_mf(mpi_request, | 301 | _debug_dump_mf(mpi_request, |
| 294 | sizeof(Mpi2ConfigRequest_t)/4); | 302 | sizeof(Mpi2ConfigRequest_t)/4); |
| 295 | if (!(ioc->config_cmds.status & MPT2_CMD_RESET)) | 303 | retry_count++; |
| 296 | issue_reset = 1; | 304 | if (ioc->config_cmds.smid == smid) |
| 297 | goto issue_host_reset; | 305 | mpt2sas_base_free_smid(ioc, smid); |
| 306 | if ((ioc->shost_recovery) || | ||
| 307 | (ioc->config_cmds.status & MPT2_CMD_RESET)) | ||
| 308 | goto retry_config; | ||
| 309 | issue_host_reset = 1; | ||
| 310 | r = -EFAULT; | ||
| 311 | goto out; | ||
| 298 | } | 312 | } |
| 299 | if (ioc->config_cmds.status & MPT2_CMD_REPLY_VALID) | 313 | if (ioc->config_cmds.status & MPT2_CMD_REPLY_VALID) |
| 300 | memcpy(mpi_reply, ioc->config_cmds.reply, | 314 | memcpy(mpi_reply, ioc->config_cmds.reply, |
| @@ -302,21 +316,13 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t | |||
| 302 | if (retry_count) | 316 | if (retry_count) |
| 303 | printk(MPT2SAS_INFO_FMT "%s: retry completed!!\n", | 317 | printk(MPT2SAS_INFO_FMT "%s: retry completed!!\n", |
| 304 | ioc->name, __func__); | 318 | ioc->name, __func__); |
| 319 | out: | ||
| 305 | ioc->config_cmds.status = MPT2_CMD_NOT_USED; | 320 | ioc->config_cmds.status = MPT2_CMD_NOT_USED; |
| 306 | return r; | 321 | mutex_unlock(&ioc->config_cmds.mutex); |
| 307 | 322 | if (issue_host_reset) | |
| 308 | issue_host_reset: | ||
| 309 | if (issue_reset) | ||
| 310 | mpt2sas_base_hard_reset_handler(ioc, CAN_SLEEP, | 323 | mpt2sas_base_hard_reset_handler(ioc, CAN_SLEEP, |
| 311 | FORCE_BIG_HAMMER); | 324 | FORCE_BIG_HAMMER); |
| 312 | ioc->config_cmds.status = MPT2_CMD_NOT_USED; | 325 | return r; |
| 313 | if (!retry_count) { | ||
| 314 | printk(MPT2SAS_INFO_FMT "%s: attempting retry\n", | ||
| 315 | ioc->name, __func__); | ||
| 316 | retry_count++; | ||
| 317 | goto retry_config; | ||
| 318 | } | ||
| 319 | return -EFAULT; | ||
| 320 | } | 326 | } |
| 321 | 327 | ||
| 322 | /** | 328 | /** |
| @@ -375,7 +381,6 @@ mpt2sas_config_get_manufacturing_pg0(struct MPT2SAS_ADAPTER *ioc, | |||
| 375 | int r; | 381 | int r; |
| 376 | struct config_request mem; | 382 | struct config_request mem; |
| 377 | 383 | ||
| 378 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 379 | memset(config_page, 0, sizeof(Mpi2ManufacturingPage0_t)); | 384 | memset(config_page, 0, sizeof(Mpi2ManufacturingPage0_t)); |
| 380 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 385 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 381 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 386 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -417,7 +422,6 @@ mpt2sas_config_get_manufacturing_pg0(struct MPT2SAS_ADAPTER *ioc, | |||
| 417 | _config_free_config_dma_memory(ioc, &mem); | 422 | _config_free_config_dma_memory(ioc, &mem); |
| 418 | 423 | ||
| 419 | out: | 424 | out: |
| 420 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 421 | return r; | 425 | return r; |
| 422 | } | 426 | } |
| 423 | 427 | ||
| @@ -438,7 +442,6 @@ mpt2sas_config_get_bios_pg2(struct MPT2SAS_ADAPTER *ioc, | |||
| 438 | int r; | 442 | int r; |
| 439 | struct config_request mem; | 443 | struct config_request mem; |
| 440 | 444 | ||
| 441 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 442 | memset(config_page, 0, sizeof(Mpi2BiosPage2_t)); | 445 | memset(config_page, 0, sizeof(Mpi2BiosPage2_t)); |
| 443 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 446 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 444 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 447 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -480,7 +483,6 @@ mpt2sas_config_get_bios_pg2(struct MPT2SAS_ADAPTER *ioc, | |||
| 480 | _config_free_config_dma_memory(ioc, &mem); | 483 | _config_free_config_dma_memory(ioc, &mem); |
| 481 | 484 | ||
| 482 | out: | 485 | out: |
| 483 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 484 | return r; | 486 | return r; |
| 485 | } | 487 | } |
| 486 | 488 | ||
| @@ -501,7 +503,6 @@ mpt2sas_config_get_bios_pg3(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 501 | int r; | 503 | int r; |
| 502 | struct config_request mem; | 504 | struct config_request mem; |
| 503 | 505 | ||
| 504 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 505 | memset(config_page, 0, sizeof(Mpi2BiosPage3_t)); | 506 | memset(config_page, 0, sizeof(Mpi2BiosPage3_t)); |
| 506 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 507 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 507 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 508 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -543,7 +544,6 @@ mpt2sas_config_get_bios_pg3(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 543 | _config_free_config_dma_memory(ioc, &mem); | 544 | _config_free_config_dma_memory(ioc, &mem); |
| 544 | 545 | ||
| 545 | out: | 546 | out: |
| 546 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 547 | return r; | 547 | return r; |
| 548 | } | 548 | } |
| 549 | 549 | ||
| @@ -564,7 +564,6 @@ mpt2sas_config_get_iounit_pg0(struct MPT2SAS_ADAPTER *ioc, | |||
| 564 | int r; | 564 | int r; |
| 565 | struct config_request mem; | 565 | struct config_request mem; |
| 566 | 566 | ||
| 567 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 568 | memset(config_page, 0, sizeof(Mpi2IOUnitPage0_t)); | 567 | memset(config_page, 0, sizeof(Mpi2IOUnitPage0_t)); |
| 569 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 568 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 570 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 569 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -606,7 +605,6 @@ mpt2sas_config_get_iounit_pg0(struct MPT2SAS_ADAPTER *ioc, | |||
| 606 | _config_free_config_dma_memory(ioc, &mem); | 605 | _config_free_config_dma_memory(ioc, &mem); |
| 607 | 606 | ||
| 608 | out: | 607 | out: |
| 609 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 610 | return r; | 608 | return r; |
| 611 | } | 609 | } |
| 612 | 610 | ||
| @@ -627,7 +625,6 @@ mpt2sas_config_get_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, | |||
| 627 | int r; | 625 | int r; |
| 628 | struct config_request mem; | 626 | struct config_request mem; |
| 629 | 627 | ||
| 630 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 631 | memset(config_page, 0, sizeof(Mpi2IOUnitPage1_t)); | 628 | memset(config_page, 0, sizeof(Mpi2IOUnitPage1_t)); |
| 632 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 629 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 633 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 630 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -669,7 +666,6 @@ mpt2sas_config_get_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, | |||
| 669 | _config_free_config_dma_memory(ioc, &mem); | 666 | _config_free_config_dma_memory(ioc, &mem); |
| 670 | 667 | ||
| 671 | out: | 668 | out: |
| 672 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 673 | return r; | 669 | return r; |
| 674 | } | 670 | } |
| 675 | 671 | ||
| @@ -690,7 +686,6 @@ mpt2sas_config_set_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, | |||
| 690 | int r; | 686 | int r; |
| 691 | struct config_request mem; | 687 | struct config_request mem; |
| 692 | 688 | ||
| 693 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 694 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 689 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 695 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 690 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| 696 | mpi_request.Action = MPI2_CONFIG_ACTION_PAGE_HEADER; | 691 | mpi_request.Action = MPI2_CONFIG_ACTION_PAGE_HEADER; |
| @@ -732,7 +727,6 @@ mpt2sas_config_set_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, | |||
| 732 | _config_free_config_dma_memory(ioc, &mem); | 727 | _config_free_config_dma_memory(ioc, &mem); |
| 733 | 728 | ||
| 734 | out: | 729 | out: |
| 735 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 736 | return r; | 730 | return r; |
| 737 | } | 731 | } |
| 738 | 732 | ||
| @@ -753,7 +747,6 @@ mpt2sas_config_get_ioc_pg8(struct MPT2SAS_ADAPTER *ioc, | |||
| 753 | int r; | 747 | int r; |
| 754 | struct config_request mem; | 748 | struct config_request mem; |
| 755 | 749 | ||
| 756 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 757 | memset(config_page, 0, sizeof(Mpi2IOCPage8_t)); | 750 | memset(config_page, 0, sizeof(Mpi2IOCPage8_t)); |
| 758 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 751 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 759 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 752 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -795,7 +788,6 @@ mpt2sas_config_get_ioc_pg8(struct MPT2SAS_ADAPTER *ioc, | |||
| 795 | _config_free_config_dma_memory(ioc, &mem); | 788 | _config_free_config_dma_memory(ioc, &mem); |
| 796 | 789 | ||
| 797 | out: | 790 | out: |
| 798 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 799 | return r; | 791 | return r; |
| 800 | } | 792 | } |
| 801 | 793 | ||
| @@ -818,7 +810,6 @@ mpt2sas_config_get_sas_device_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 818 | int r; | 810 | int r; |
| 819 | struct config_request mem; | 811 | struct config_request mem; |
| 820 | 812 | ||
| 821 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 822 | memset(config_page, 0, sizeof(Mpi2SasDevicePage0_t)); | 813 | memset(config_page, 0, sizeof(Mpi2SasDevicePage0_t)); |
| 823 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 814 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 824 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 815 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -863,7 +854,6 @@ mpt2sas_config_get_sas_device_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 863 | _config_free_config_dma_memory(ioc, &mem); | 854 | _config_free_config_dma_memory(ioc, &mem); |
| 864 | 855 | ||
| 865 | out: | 856 | out: |
| 866 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 867 | return r; | 857 | return r; |
| 868 | } | 858 | } |
| 869 | 859 | ||
| @@ -886,7 +876,6 @@ mpt2sas_config_get_sas_device_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 886 | int r; | 876 | int r; |
| 887 | struct config_request mem; | 877 | struct config_request mem; |
| 888 | 878 | ||
| 889 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 890 | memset(config_page, 0, sizeof(Mpi2SasDevicePage1_t)); | 879 | memset(config_page, 0, sizeof(Mpi2SasDevicePage1_t)); |
| 891 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 880 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 892 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 881 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -931,7 +920,6 @@ mpt2sas_config_get_sas_device_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 931 | _config_free_config_dma_memory(ioc, &mem); | 920 | _config_free_config_dma_memory(ioc, &mem); |
| 932 | 921 | ||
| 933 | out: | 922 | out: |
| 934 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 935 | return r; | 923 | return r; |
| 936 | } | 924 | } |
| 937 | 925 | ||
| @@ -953,7 +941,6 @@ mpt2sas_config_get_number_hba_phys(struct MPT2SAS_ADAPTER *ioc, u8 *num_phys) | |||
| 953 | Mpi2ConfigReply_t mpi_reply; | 941 | Mpi2ConfigReply_t mpi_reply; |
| 954 | Mpi2SasIOUnitPage0_t config_page; | 942 | Mpi2SasIOUnitPage0_t config_page; |
| 955 | 943 | ||
| 956 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 957 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 944 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 958 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 945 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| 959 | mpi_request.Action = MPI2_CONFIG_ACTION_PAGE_HEADER; | 946 | mpi_request.Action = MPI2_CONFIG_ACTION_PAGE_HEADER; |
| @@ -1002,7 +989,6 @@ mpt2sas_config_get_number_hba_phys(struct MPT2SAS_ADAPTER *ioc, u8 *num_phys) | |||
| 1002 | _config_free_config_dma_memory(ioc, &mem); | 989 | _config_free_config_dma_memory(ioc, &mem); |
| 1003 | 990 | ||
| 1004 | out: | 991 | out: |
| 1005 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 1006 | return r; | 992 | return r; |
| 1007 | } | 993 | } |
| 1008 | 994 | ||
| @@ -1026,8 +1012,6 @@ mpt2sas_config_get_sas_iounit_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1026 | Mpi2ConfigRequest_t mpi_request; | 1012 | Mpi2ConfigRequest_t mpi_request; |
| 1027 | int r; | 1013 | int r; |
| 1028 | struct config_request mem; | 1014 | struct config_request mem; |
| 1029 | |||
| 1030 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 1031 | memset(config_page, 0, sz); | 1015 | memset(config_page, 0, sz); |
| 1032 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 1016 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 1033 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 1017 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -1070,7 +1054,6 @@ mpt2sas_config_get_sas_iounit_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1070 | _config_free_config_dma_memory(ioc, &mem); | 1054 | _config_free_config_dma_memory(ioc, &mem); |
| 1071 | 1055 | ||
| 1072 | out: | 1056 | out: |
| 1073 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 1074 | return r; | 1057 | return r; |
| 1075 | } | 1058 | } |
| 1076 | 1059 | ||
| @@ -1095,7 +1078,6 @@ mpt2sas_config_get_sas_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1095 | int r; | 1078 | int r; |
| 1096 | struct config_request mem; | 1079 | struct config_request mem; |
| 1097 | 1080 | ||
| 1098 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 1099 | memset(config_page, 0, sz); | 1081 | memset(config_page, 0, sz); |
| 1100 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 1082 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 1101 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 1083 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -1138,7 +1120,6 @@ mpt2sas_config_get_sas_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1138 | _config_free_config_dma_memory(ioc, &mem); | 1120 | _config_free_config_dma_memory(ioc, &mem); |
| 1139 | 1121 | ||
| 1140 | out: | 1122 | out: |
| 1141 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 1142 | return r; | 1123 | return r; |
| 1143 | } | 1124 | } |
| 1144 | 1125 | ||
| @@ -1161,7 +1142,6 @@ mpt2sas_config_get_expander_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1161 | int r; | 1142 | int r; |
| 1162 | struct config_request mem; | 1143 | struct config_request mem; |
| 1163 | 1144 | ||
| 1164 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 1165 | memset(config_page, 0, sizeof(Mpi2ExpanderPage0_t)); | 1145 | memset(config_page, 0, sizeof(Mpi2ExpanderPage0_t)); |
| 1166 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 1146 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 1167 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 1147 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -1206,7 +1186,6 @@ mpt2sas_config_get_expander_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1206 | _config_free_config_dma_memory(ioc, &mem); | 1186 | _config_free_config_dma_memory(ioc, &mem); |
| 1207 | 1187 | ||
| 1208 | out: | 1188 | out: |
| 1209 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 1210 | return r; | 1189 | return r; |
| 1211 | } | 1190 | } |
| 1212 | 1191 | ||
| @@ -1230,7 +1209,6 @@ mpt2sas_config_get_expander_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1230 | int r; | 1209 | int r; |
| 1231 | struct config_request mem; | 1210 | struct config_request mem; |
| 1232 | 1211 | ||
| 1233 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 1234 | memset(config_page, 0, sizeof(Mpi2ExpanderPage1_t)); | 1212 | memset(config_page, 0, sizeof(Mpi2ExpanderPage1_t)); |
| 1235 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 1213 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 1236 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 1214 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -1277,7 +1255,6 @@ mpt2sas_config_get_expander_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1277 | _config_free_config_dma_memory(ioc, &mem); | 1255 | _config_free_config_dma_memory(ioc, &mem); |
| 1278 | 1256 | ||
| 1279 | out: | 1257 | out: |
| 1280 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 1281 | return r; | 1258 | return r; |
| 1282 | } | 1259 | } |
| 1283 | 1260 | ||
| @@ -1300,7 +1277,6 @@ mpt2sas_config_get_enclosure_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1300 | int r; | 1277 | int r; |
| 1301 | struct config_request mem; | 1278 | struct config_request mem; |
| 1302 | 1279 | ||
| 1303 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 1304 | memset(config_page, 0, sizeof(Mpi2SasEnclosurePage0_t)); | 1280 | memset(config_page, 0, sizeof(Mpi2SasEnclosurePage0_t)); |
| 1305 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 1281 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 1306 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 1282 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -1345,7 +1321,6 @@ mpt2sas_config_get_enclosure_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1345 | _config_free_config_dma_memory(ioc, &mem); | 1321 | _config_free_config_dma_memory(ioc, &mem); |
| 1346 | 1322 | ||
| 1347 | out: | 1323 | out: |
| 1348 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 1349 | return r; | 1324 | return r; |
| 1350 | } | 1325 | } |
| 1351 | 1326 | ||
| @@ -1367,7 +1342,6 @@ mpt2sas_config_get_phy_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1367 | int r; | 1342 | int r; |
| 1368 | struct config_request mem; | 1343 | struct config_request mem; |
| 1369 | 1344 | ||
| 1370 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 1371 | memset(config_page, 0, sizeof(Mpi2SasPhyPage0_t)); | 1345 | memset(config_page, 0, sizeof(Mpi2SasPhyPage0_t)); |
| 1372 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 1346 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 1373 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 1347 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -1413,7 +1387,6 @@ mpt2sas_config_get_phy_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1413 | _config_free_config_dma_memory(ioc, &mem); | 1387 | _config_free_config_dma_memory(ioc, &mem); |
| 1414 | 1388 | ||
| 1415 | out: | 1389 | out: |
| 1416 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 1417 | return r; | 1390 | return r; |
| 1418 | } | 1391 | } |
| 1419 | 1392 | ||
| @@ -1435,7 +1408,6 @@ mpt2sas_config_get_phy_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1435 | int r; | 1408 | int r; |
| 1436 | struct config_request mem; | 1409 | struct config_request mem; |
| 1437 | 1410 | ||
| 1438 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 1439 | memset(config_page, 0, sizeof(Mpi2SasPhyPage1_t)); | 1411 | memset(config_page, 0, sizeof(Mpi2SasPhyPage1_t)); |
| 1440 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 1412 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 1441 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 1413 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -1481,7 +1453,6 @@ mpt2sas_config_get_phy_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1481 | _config_free_config_dma_memory(ioc, &mem); | 1453 | _config_free_config_dma_memory(ioc, &mem); |
| 1482 | 1454 | ||
| 1483 | out: | 1455 | out: |
| 1484 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 1485 | return r; | 1456 | return r; |
| 1486 | } | 1457 | } |
| 1487 | 1458 | ||
| @@ -1505,7 +1476,6 @@ mpt2sas_config_get_raid_volume_pg1(struct MPT2SAS_ADAPTER *ioc, | |||
| 1505 | int r; | 1476 | int r; |
| 1506 | struct config_request mem; | 1477 | struct config_request mem; |
| 1507 | 1478 | ||
| 1508 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 1509 | memset(config_page, 0, sizeof(Mpi2RaidVolPage1_t)); | 1479 | memset(config_page, 0, sizeof(Mpi2RaidVolPage1_t)); |
| 1510 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 1480 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 1511 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 1481 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -1548,7 +1518,6 @@ mpt2sas_config_get_raid_volume_pg1(struct MPT2SAS_ADAPTER *ioc, | |||
| 1548 | _config_free_config_dma_memory(ioc, &mem); | 1518 | _config_free_config_dma_memory(ioc, &mem); |
| 1549 | 1519 | ||
| 1550 | out: | 1520 | out: |
| 1551 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 1552 | return r; | 1521 | return r; |
| 1553 | } | 1522 | } |
| 1554 | 1523 | ||
| @@ -1572,7 +1541,6 @@ mpt2sas_config_get_number_pds(struct MPT2SAS_ADAPTER *ioc, u16 handle, | |||
| 1572 | struct config_request mem; | 1541 | struct config_request mem; |
| 1573 | u16 ioc_status; | 1542 | u16 ioc_status; |
| 1574 | 1543 | ||
| 1575 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 1576 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 1544 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 1577 | *num_pds = 0; | 1545 | *num_pds = 0; |
| 1578 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 1546 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -1620,7 +1588,6 @@ mpt2sas_config_get_number_pds(struct MPT2SAS_ADAPTER *ioc, u16 handle, | |||
| 1620 | _config_free_config_dma_memory(ioc, &mem); | 1588 | _config_free_config_dma_memory(ioc, &mem); |
| 1621 | 1589 | ||
| 1622 | out: | 1590 | out: |
| 1623 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 1624 | return r; | 1591 | return r; |
| 1625 | } | 1592 | } |
| 1626 | 1593 | ||
| @@ -1645,7 +1612,6 @@ mpt2sas_config_get_raid_volume_pg0(struct MPT2SAS_ADAPTER *ioc, | |||
| 1645 | int r; | 1612 | int r; |
| 1646 | struct config_request mem; | 1613 | struct config_request mem; |
| 1647 | 1614 | ||
| 1648 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 1649 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 1615 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 1650 | memset(config_page, 0, sz); | 1616 | memset(config_page, 0, sz); |
| 1651 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 1617 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -1687,7 +1653,6 @@ mpt2sas_config_get_raid_volume_pg0(struct MPT2SAS_ADAPTER *ioc, | |||
| 1687 | _config_free_config_dma_memory(ioc, &mem); | 1653 | _config_free_config_dma_memory(ioc, &mem); |
| 1688 | 1654 | ||
| 1689 | out: | 1655 | out: |
| 1690 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 1691 | return r; | 1656 | return r; |
| 1692 | } | 1657 | } |
| 1693 | 1658 | ||
| @@ -1711,7 +1676,6 @@ mpt2sas_config_get_phys_disk_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1711 | int r; | 1676 | int r; |
| 1712 | struct config_request mem; | 1677 | struct config_request mem; |
| 1713 | 1678 | ||
| 1714 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 1715 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 1679 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 1716 | memset(config_page, 0, sizeof(Mpi2RaidPhysDiskPage0_t)); | 1680 | memset(config_page, 0, sizeof(Mpi2RaidPhysDiskPage0_t)); |
| 1717 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 1681 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -1754,7 +1718,6 @@ mpt2sas_config_get_phys_disk_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | |||
| 1754 | _config_free_config_dma_memory(ioc, &mem); | 1718 | _config_free_config_dma_memory(ioc, &mem); |
| 1755 | 1719 | ||
| 1756 | out: | 1720 | out: |
| 1757 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 1758 | return r; | 1721 | return r; |
| 1759 | } | 1722 | } |
| 1760 | 1723 | ||
| @@ -1778,7 +1741,6 @@ mpt2sas_config_get_volume_handle(struct MPT2SAS_ADAPTER *ioc, u16 pd_handle, | |||
| 1778 | struct config_request mem; | 1741 | struct config_request mem; |
| 1779 | u16 ioc_status; | 1742 | u16 ioc_status; |
| 1780 | 1743 | ||
| 1781 | mutex_lock(&ioc->config_cmds.mutex); | ||
| 1782 | *volume_handle = 0; | 1744 | *volume_handle = 0; |
| 1783 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); | 1745 | memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t)); |
| 1784 | mpi_request.Function = MPI2_FUNCTION_CONFIG; | 1746 | mpi_request.Function = MPI2_FUNCTION_CONFIG; |
| @@ -1842,7 +1804,6 @@ mpt2sas_config_get_volume_handle(struct MPT2SAS_ADAPTER *ioc, u16 pd_handle, | |||
| 1842 | _config_free_config_dma_memory(ioc, &mem); | 1804 | _config_free_config_dma_memory(ioc, &mem); |
| 1843 | 1805 | ||
| 1844 | out: | 1806 | out: |
| 1845 | mutex_unlock(&ioc->config_cmds.mutex); | ||
| 1846 | return r; | 1807 | return r; |
| 1847 | } | 1808 | } |
| 1848 | 1809 | ||
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index 2a01a5f2a84d..2e9a4445596f 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c | |||
| @@ -2767,6 +2767,10 @@ _scsih_scsi_ioc_info(struct MPT2SAS_ADAPTER *ioc, struct scsi_cmnd *scmd, | |||
| 2767 | char *desc_ioc_state = NULL; | 2767 | char *desc_ioc_state = NULL; |
| 2768 | char *desc_scsi_status = NULL; | 2768 | char *desc_scsi_status = NULL; |
| 2769 | char *desc_scsi_state = ioc->tmp_string; | 2769 | char *desc_scsi_state = ioc->tmp_string; |
| 2770 | u32 log_info = le32_to_cpu(mpi_reply->IOCLogInfo); | ||
| 2771 | |||
| 2772 | if (log_info == 0x31170000) | ||
| 2773 | return; | ||
| 2770 | 2774 | ||
| 2771 | switch (ioc_status) { | 2775 | switch (ioc_status) { |
| 2772 | case MPI2_IOCSTATUS_SUCCESS: | 2776 | case MPI2_IOCSTATUS_SUCCESS: |
| @@ -3426,7 +3430,7 @@ _scsih_expander_add(struct MPT2SAS_ADAPTER *ioc, u16 handle) | |||
| 3426 | __le64 sas_address; | 3430 | __le64 sas_address; |
| 3427 | int i; | 3431 | int i; |
| 3428 | unsigned long flags; | 3432 | unsigned long flags; |
| 3429 | struct _sas_port *mpt2sas_port; | 3433 | struct _sas_port *mpt2sas_port = NULL; |
| 3430 | int rc = 0; | 3434 | int rc = 0; |
| 3431 | 3435 | ||
| 3432 | if (!handle) | 3436 | if (!handle) |
| @@ -3518,12 +3522,20 @@ _scsih_expander_add(struct MPT2SAS_ADAPTER *ioc, u16 handle) | |||
| 3518 | &expander_pg1, i, handle))) { | 3522 | &expander_pg1, i, handle))) { |
| 3519 | printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n", | 3523 | printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n", |
| 3520 | ioc->name, __FILE__, __LINE__, __func__); | 3524 | ioc->name, __FILE__, __LINE__, __func__); |
| 3521 | continue; | 3525 | rc = -1; |
| 3526 | goto out_fail; | ||
| 3522 | } | 3527 | } |
| 3523 | sas_expander->phy[i].handle = handle; | 3528 | sas_expander->phy[i].handle = handle; |
| 3524 | sas_expander->phy[i].phy_id = i; | 3529 | sas_expander->phy[i].phy_id = i; |
| 3525 | mpt2sas_transport_add_expander_phy(ioc, &sas_expander->phy[i], | 3530 | |
| 3526 | expander_pg1, sas_expander->parent_dev); | 3531 | if ((mpt2sas_transport_add_expander_phy(ioc, |
| 3532 | &sas_expander->phy[i], expander_pg1, | ||
| 3533 | sas_expander->parent_dev))) { | ||
| 3534 | printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n", | ||
| 3535 | ioc->name, __FILE__, __LINE__, __func__); | ||
| 3536 | rc = -1; | ||
| 3537 | goto out_fail; | ||
| 3538 | } | ||
| 3527 | } | 3539 | } |
| 3528 | 3540 | ||
| 3529 | if (sas_expander->enclosure_handle) { | 3541 | if (sas_expander->enclosure_handle) { |
| @@ -3540,8 +3552,9 @@ _scsih_expander_add(struct MPT2SAS_ADAPTER *ioc, u16 handle) | |||
| 3540 | 3552 | ||
| 3541 | out_fail: | 3553 | out_fail: |
| 3542 | 3554 | ||
| 3543 | if (sas_expander) | 3555 | if (mpt2sas_port) |
| 3544 | kfree(sas_expander->phy); | 3556 | mpt2sas_transport_port_remove(ioc, sas_expander->sas_address, |
| 3557 | sas_expander->parent_handle); | ||
| 3545 | kfree(sas_expander); | 3558 | kfree(sas_expander); |
| 3546 | return rc; | 3559 | return rc; |
| 3547 | } | 3560 | } |
| @@ -3663,12 +3676,11 @@ _scsih_add_device(struct MPT2SAS_ADAPTER *ioc, u16 handle, u8 phy_num, u8 is_pd) | |||
| 3663 | sas_device->hidden_raid_component = is_pd; | 3676 | sas_device->hidden_raid_component = is_pd; |
| 3664 | 3677 | ||
| 3665 | /* get enclosure_logical_id */ | 3678 | /* get enclosure_logical_id */ |
| 3666 | if (!(mpt2sas_config_get_enclosure_pg0(ioc, &mpi_reply, &enclosure_pg0, | 3679 | if (sas_device->enclosure_handle && !(mpt2sas_config_get_enclosure_pg0( |
| 3667 | MPI2_SAS_ENCLOS_PGAD_FORM_HANDLE, | 3680 | ioc, &mpi_reply, &enclosure_pg0, MPI2_SAS_ENCLOS_PGAD_FORM_HANDLE, |
| 3668 | sas_device->enclosure_handle))) { | 3681 | sas_device->enclosure_handle))) |
| 3669 | sas_device->enclosure_logical_id = | 3682 | sas_device->enclosure_logical_id = |
| 3670 | le64_to_cpu(enclosure_pg0.EnclosureLogicalID); | 3683 | le64_to_cpu(enclosure_pg0.EnclosureLogicalID); |
| 3671 | } | ||
| 3672 | 3684 | ||
| 3673 | /* get device name */ | 3685 | /* get device name */ |
| 3674 | sas_device->device_name = le64_to_cpu(sas_device_pg0.DeviceName); | 3686 | sas_device->device_name = le64_to_cpu(sas_device_pg0.DeviceName); |
| @@ -4250,12 +4262,6 @@ _scsih_sas_volume_add(struct MPT2SAS_ADAPTER *ioc, | |||
| 4250 | u16 handle = le16_to_cpu(element->VolDevHandle); | 4262 | u16 handle = le16_to_cpu(element->VolDevHandle); |
| 4251 | int rc; | 4263 | int rc; |
| 4252 | 4264 | ||
| 4253 | #if 0 /* RAID_HACKS */ | ||
| 4254 | if (le32_to_cpu(event_data->Flags) & | ||
| 4255 | MPI2_EVENT_IR_CHANGE_FLAGS_FOREIGN_CONFIG) | ||
| 4256 | return; | ||
| 4257 | #endif | ||
| 4258 | |||
| 4259 | mpt2sas_config_get_volume_wwid(ioc, handle, &wwid); | 4265 | mpt2sas_config_get_volume_wwid(ioc, handle, &wwid); |
| 4260 | if (!wwid) { | 4266 | if (!wwid) { |
| 4261 | printk(MPT2SAS_ERR_FMT | 4267 | printk(MPT2SAS_ERR_FMT |
| @@ -4310,12 +4316,6 @@ _scsih_sas_volume_delete(struct MPT2SAS_ADAPTER *ioc, | |||
| 4310 | unsigned long flags; | 4316 | unsigned long flags; |
| 4311 | struct MPT2SAS_TARGET *sas_target_priv_data; | 4317 | struct MPT2SAS_TARGET *sas_target_priv_data; |
| 4312 | 4318 | ||
| 4313 | #if 0 /* RAID_HACKS */ | ||
| 4314 | if (le32_to_cpu(event_data->Flags) & | ||
| 4315 | MPI2_EVENT_IR_CHANGE_FLAGS_FOREIGN_CONFIG) | ||
| 4316 | return; | ||
| 4317 | #endif | ||
| 4318 | |||
| 4319 | spin_lock_irqsave(&ioc->raid_device_lock, flags); | 4319 | spin_lock_irqsave(&ioc->raid_device_lock, flags); |
| 4320 | raid_device = _scsih_raid_device_find_by_handle(ioc, handle); | 4320 | raid_device = _scsih_raid_device_find_by_handle(ioc, handle); |
| 4321 | spin_unlock_irqrestore(&ioc->raid_device_lock, flags); | 4321 | spin_unlock_irqrestore(&ioc->raid_device_lock, flags); |
| @@ -4428,14 +4428,38 @@ _scsih_sas_pd_add(struct MPT2SAS_ADAPTER *ioc, | |||
| 4428 | struct _sas_device *sas_device; | 4428 | struct _sas_device *sas_device; |
| 4429 | unsigned long flags; | 4429 | unsigned long flags; |
| 4430 | u16 handle = le16_to_cpu(element->PhysDiskDevHandle); | 4430 | u16 handle = le16_to_cpu(element->PhysDiskDevHandle); |
| 4431 | Mpi2ConfigReply_t mpi_reply; | ||
| 4432 | Mpi2SasDevicePage0_t sas_device_pg0; | ||
| 4433 | u32 ioc_status; | ||
| 4431 | 4434 | ||
| 4432 | spin_lock_irqsave(&ioc->sas_device_lock, flags); | 4435 | spin_lock_irqsave(&ioc->sas_device_lock, flags); |
| 4433 | sas_device = _scsih_sas_device_find_by_handle(ioc, handle); | 4436 | sas_device = _scsih_sas_device_find_by_handle(ioc, handle); |
| 4434 | spin_unlock_irqrestore(&ioc->sas_device_lock, flags); | 4437 | spin_unlock_irqrestore(&ioc->sas_device_lock, flags); |
| 4435 | if (sas_device) | 4438 | if (sas_device) { |
| 4436 | sas_device->hidden_raid_component = 1; | 4439 | sas_device->hidden_raid_component = 1; |
| 4437 | else | 4440 | return; |
| 4438 | _scsih_add_device(ioc, handle, 0, 1); | 4441 | } |
| 4442 | |||
| 4443 | if ((mpt2sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0, | ||
| 4444 | MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) { | ||
| 4445 | printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n", | ||
| 4446 | ioc->name, __FILE__, __LINE__, __func__); | ||
| 4447 | return; | ||
| 4448 | } | ||
| 4449 | |||
| 4450 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & | ||
| 4451 | MPI2_IOCSTATUS_MASK; | ||
| 4452 | if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { | ||
| 4453 | printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n", | ||
| 4454 | ioc->name, __FILE__, __LINE__, __func__); | ||
| 4455 | return; | ||
| 4456 | } | ||
| 4457 | |||
| 4458 | _scsih_link_change(ioc, | ||
| 4459 | le16_to_cpu(sas_device_pg0.ParentDevHandle), | ||
| 4460 | handle, sas_device_pg0.PhyNum, MPI2_SAS_NEG_LINK_RATE_1_5); | ||
| 4461 | |||
| 4462 | _scsih_add_device(ioc, handle, 0, 1); | ||
| 4439 | } | 4463 | } |
| 4440 | 4464 | ||
| 4441 | #ifdef CONFIG_SCSI_MPT2SAS_LOGGING | 4465 | #ifdef CONFIG_SCSI_MPT2SAS_LOGGING |
| @@ -4535,12 +4559,15 @@ _scsih_sas_ir_config_change_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID, | |||
| 4535 | { | 4559 | { |
| 4536 | Mpi2EventIrConfigElement_t *element; | 4560 | Mpi2EventIrConfigElement_t *element; |
| 4537 | int i; | 4561 | int i; |
| 4562 | u8 foreign_config; | ||
| 4538 | 4563 | ||
| 4539 | #ifdef CONFIG_SCSI_MPT2SAS_LOGGING | 4564 | #ifdef CONFIG_SCSI_MPT2SAS_LOGGING |
| 4540 | if (ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK) | 4565 | if (ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK) |
| 4541 | _scsih_sas_ir_config_change_event_debug(ioc, event_data); | 4566 | _scsih_sas_ir_config_change_event_debug(ioc, event_data); |
| 4542 | 4567 | ||
| 4543 | #endif | 4568 | #endif |
| 4569 | foreign_config = (le32_to_cpu(event_data->Flags) & | ||
| 4570 | MPI2_EVENT_IR_CHANGE_FLAGS_FOREIGN_CONFIG) ? 1 : 0; | ||
| 4544 | 4571 | ||
| 4545 | element = (Mpi2EventIrConfigElement_t *)&event_data->ConfigElement[0]; | 4572 | element = (Mpi2EventIrConfigElement_t *)&event_data->ConfigElement[0]; |
| 4546 | for (i = 0; i < event_data->NumElements; i++, element++) { | 4573 | for (i = 0; i < event_data->NumElements; i++, element++) { |
| @@ -4548,11 +4575,13 @@ _scsih_sas_ir_config_change_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID, | |||
| 4548 | switch (element->ReasonCode) { | 4575 | switch (element->ReasonCode) { |
| 4549 | case MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED: | 4576 | case MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED: |
| 4550 | case MPI2_EVENT_IR_CHANGE_RC_ADDED: | 4577 | case MPI2_EVENT_IR_CHANGE_RC_ADDED: |
| 4551 | _scsih_sas_volume_add(ioc, element); | 4578 | if (!foreign_config) |
| 4579 | _scsih_sas_volume_add(ioc, element); | ||
| 4552 | break; | 4580 | break; |
| 4553 | case MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED: | 4581 | case MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED: |
| 4554 | case MPI2_EVENT_IR_CHANGE_RC_REMOVED: | 4582 | case MPI2_EVENT_IR_CHANGE_RC_REMOVED: |
| 4555 | _scsih_sas_volume_delete(ioc, element); | 4583 | if (!foreign_config) |
| 4584 | _scsih_sas_volume_delete(ioc, element); | ||
| 4556 | break; | 4585 | break; |
| 4557 | case MPI2_EVENT_IR_CHANGE_RC_PD_CREATED: | 4586 | case MPI2_EVENT_IR_CHANGE_RC_PD_CREATED: |
| 4558 | _scsih_sas_pd_hide(ioc, element); | 4587 | _scsih_sas_pd_hide(ioc, element); |
| @@ -4671,6 +4700,9 @@ _scsih_sas_ir_physical_disk_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID, | |||
| 4671 | u32 state; | 4700 | u32 state; |
| 4672 | struct _sas_device *sas_device; | 4701 | struct _sas_device *sas_device; |
| 4673 | unsigned long flags; | 4702 | unsigned long flags; |
| 4703 | Mpi2ConfigReply_t mpi_reply; | ||
| 4704 | Mpi2SasDevicePage0_t sas_device_pg0; | ||
| 4705 | u32 ioc_status; | ||
| 4674 | 4706 | ||
| 4675 | if (event_data->ReasonCode != MPI2_EVENT_IR_PHYSDISK_RC_STATE_CHANGED) | 4707 | if (event_data->ReasonCode != MPI2_EVENT_IR_PHYSDISK_RC_STATE_CHANGED) |
| 4676 | return; | 4708 | return; |
| @@ -4687,22 +4719,40 @@ _scsih_sas_ir_physical_disk_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID, | |||
| 4687 | spin_unlock_irqrestore(&ioc->sas_device_lock, flags); | 4719 | spin_unlock_irqrestore(&ioc->sas_device_lock, flags); |
| 4688 | 4720 | ||
| 4689 | switch (state) { | 4721 | switch (state) { |
| 4690 | #if 0 | ||
| 4691 | case MPI2_RAID_PD_STATE_OFFLINE: | ||
| 4692 | if (sas_device) | ||
| 4693 | _scsih_remove_device(ioc, handle); | ||
| 4694 | break; | ||
| 4695 | #endif | ||
| 4696 | case MPI2_RAID_PD_STATE_ONLINE: | 4722 | case MPI2_RAID_PD_STATE_ONLINE: |
| 4697 | case MPI2_RAID_PD_STATE_DEGRADED: | 4723 | case MPI2_RAID_PD_STATE_DEGRADED: |
| 4698 | case MPI2_RAID_PD_STATE_REBUILDING: | 4724 | case MPI2_RAID_PD_STATE_REBUILDING: |
| 4699 | case MPI2_RAID_PD_STATE_OPTIMAL: | 4725 | case MPI2_RAID_PD_STATE_OPTIMAL: |
| 4700 | if (sas_device) | 4726 | if (sas_device) { |
| 4701 | sas_device->hidden_raid_component = 1; | 4727 | sas_device->hidden_raid_component = 1; |
| 4702 | else | 4728 | return; |
| 4703 | _scsih_add_device(ioc, handle, 0, 1); | 4729 | } |
| 4730 | |||
| 4731 | if ((mpt2sas_config_get_sas_device_pg0(ioc, &mpi_reply, | ||
| 4732 | &sas_device_pg0, MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, | ||
| 4733 | handle))) { | ||
| 4734 | printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n", | ||
| 4735 | ioc->name, __FILE__, __LINE__, __func__); | ||
| 4736 | return; | ||
| 4737 | } | ||
| 4738 | |||
| 4739 | ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & | ||
| 4740 | MPI2_IOCSTATUS_MASK; | ||
| 4741 | if (ioc_status != MPI2_IOCSTATUS_SUCCESS) { | ||
| 4742 | printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n", | ||
| 4743 | ioc->name, __FILE__, __LINE__, __func__); | ||
| 4744 | return; | ||
| 4745 | } | ||
| 4746 | |||
| 4747 | _scsih_link_change(ioc, | ||
| 4748 | le16_to_cpu(sas_device_pg0.ParentDevHandle), | ||
| 4749 | handle, sas_device_pg0.PhyNum, MPI2_SAS_NEG_LINK_RATE_1_5); | ||
| 4750 | |||
| 4751 | _scsih_add_device(ioc, handle, 0, 1); | ||
| 4752 | |||
| 4704 | break; | 4753 | break; |
| 4705 | 4754 | ||
| 4755 | case MPI2_RAID_PD_STATE_OFFLINE: | ||
| 4706 | case MPI2_RAID_PD_STATE_NOT_CONFIGURED: | 4756 | case MPI2_RAID_PD_STATE_NOT_CONFIGURED: |
| 4707 | case MPI2_RAID_PD_STATE_NOT_COMPATIBLE: | 4757 | case MPI2_RAID_PD_STATE_NOT_COMPATIBLE: |
| 4708 | case MPI2_RAID_PD_STATE_HOT_SPARE: | 4758 | case MPI2_RAID_PD_STATE_HOT_SPARE: |
| @@ -5774,6 +5824,7 @@ _scsih_suspend(struct pci_dev *pdev, pm_message_t state) | |||
| 5774 | struct MPT2SAS_ADAPTER *ioc = shost_priv(shost); | 5824 | struct MPT2SAS_ADAPTER *ioc = shost_priv(shost); |
| 5775 | u32 device_state; | 5825 | u32 device_state; |
| 5776 | 5826 | ||
| 5827 | mpt2sas_base_stop_watchdog(ioc); | ||
| 5777 | flush_scheduled_work(); | 5828 | flush_scheduled_work(); |
| 5778 | scsi_block_requests(shost); | 5829 | scsi_block_requests(shost); |
| 5779 | device_state = pci_choose_state(pdev, state); | 5830 | device_state = pci_choose_state(pdev, state); |
| @@ -5816,6 +5867,7 @@ _scsih_resume(struct pci_dev *pdev) | |||
| 5816 | 5867 | ||
| 5817 | mpt2sas_base_hard_reset_handler(ioc, CAN_SLEEP, SOFT_RESET); | 5868 | mpt2sas_base_hard_reset_handler(ioc, CAN_SLEEP, SOFT_RESET); |
| 5818 | scsi_unblock_requests(shost); | 5869 | scsi_unblock_requests(shost); |
| 5870 | mpt2sas_base_start_watchdog(ioc); | ||
| 5819 | return 0; | 5871 | return 0; |
| 5820 | } | 5872 | } |
| 5821 | #endif /* CONFIG_PM */ | 5873 | #endif /* CONFIG_PM */ |
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 0a69672097a8..4e83c297ec9e 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c | |||
| @@ -953,7 +953,12 @@ void thermal_zone_device_update(struct thermal_zone_device *tz) | |||
| 953 | 953 | ||
| 954 | mutex_lock(&tz->lock); | 954 | mutex_lock(&tz->lock); |
| 955 | 955 | ||
| 956 | tz->ops->get_temp(tz, &temp); | 956 | if (tz->ops->get_temp(tz, &temp)) { |
| 957 | /* get_temp failed - retry it later */ | ||
| 958 | printk(KERN_WARNING PREFIX "failed to read out thermal zone " | ||
| 959 | "%d\n", tz->id); | ||
| 960 | goto leave; | ||
| 961 | } | ||
| 957 | 962 | ||
| 958 | for (count = 0; count < tz->trips; count++) { | 963 | for (count = 0; count < tz->trips; count++) { |
| 959 | tz->ops->get_trip_type(tz, count, &trip_type); | 964 | tz->ops->get_trip_type(tz, count, &trip_type); |
| @@ -1005,6 +1010,8 @@ void thermal_zone_device_update(struct thermal_zone_device *tz) | |||
| 1005 | THERMAL_TRIPS_NONE); | 1010 | THERMAL_TRIPS_NONE); |
| 1006 | 1011 | ||
| 1007 | tz->last_temperature = temp; | 1012 | tz->last_temperature = temp; |
| 1013 | |||
| 1014 | leave: | ||
| 1008 | if (tz->passive) | 1015 | if (tz->passive) |
| 1009 | thermal_zone_device_set_polling(tz, tz->passive_delay); | 1016 | thermal_zone_device_set_polling(tz, tz->passive_delay); |
| 1010 | else if (tz->polling_delay) | 1017 | else if (tz->polling_delay) |
diff --git a/drivers/watchdog/ar7_wdt.c b/drivers/watchdog/ar7_wdt.c index 3fe9742c23ca..2f8643efe92c 100644 --- a/drivers/watchdog/ar7_wdt.c +++ b/drivers/watchdog/ar7_wdt.c | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | #include <linux/uaccess.h> | 37 | #include <linux/uaccess.h> |
| 38 | 38 | ||
| 39 | #include <asm/addrspace.h> | 39 | #include <asm/addrspace.h> |
| 40 | #include <asm/ar7/ar7.h> | 40 | #include <asm/mach-ar7/ar7.h> |
| 41 | 41 | ||
| 42 | #define DRVNAME "ar7_wdt" | 42 | #define DRVNAME "ar7_wdt" |
| 43 | #define LONGNAME "TI AR7 Watchdog Timer" | 43 | #define LONGNAME "TI AR7 Watchdog Timer" |
| @@ -678,8 +678,8 @@ exit: | |||
| 678 | } | 678 | } |
| 679 | EXPORT_SYMBOL(open_exec); | 679 | EXPORT_SYMBOL(open_exec); |
| 680 | 680 | ||
| 681 | int kernel_read(struct file *file, unsigned long offset, | 681 | int kernel_read(struct file *file, loff_t offset, |
| 682 | char *addr, unsigned long count) | 682 | char *addr, unsigned long count) |
| 683 | { | 683 | { |
| 684 | mm_segment_t old_fs; | 684 | mm_segment_t old_fs; |
| 685 | loff_t pos = offset; | 685 | loff_t pos = offset; |
diff --git a/fs/ext3/Kconfig b/fs/ext3/Kconfig index fb3c1a21b135..522b15498f45 100644 --- a/fs/ext3/Kconfig +++ b/fs/ext3/Kconfig | |||
| @@ -29,23 +29,25 @@ config EXT3_FS | |||
| 29 | module will be called ext3. | 29 | module will be called ext3. |
| 30 | 30 | ||
| 31 | config EXT3_DEFAULTS_TO_ORDERED | 31 | config EXT3_DEFAULTS_TO_ORDERED |
| 32 | bool "Default to 'data=ordered' in ext3 (legacy option)" | 32 | bool "Default to 'data=ordered' in ext3" |
| 33 | depends on EXT3_FS | 33 | depends on EXT3_FS |
| 34 | help | 34 | help |
| 35 | If a filesystem does not explicitly specify a data ordering | 35 | The journal mode options for ext3 have different tradeoffs |
| 36 | mode, and the journal capability allowed it, ext3 used to | 36 | between when data is guaranteed to be on disk and |
| 37 | historically default to 'data=ordered'. | 37 | performance. The use of "data=writeback" can cause |
| 38 | 38 | unwritten data to appear in files after an system crash or | |
| 39 | That was a rather unfortunate choice, because it leads to all | 39 | power failure, which can be a security issue. However, |
| 40 | kinds of latency problems, and the 'data=writeback' mode is more | 40 | "data=ordered" mode can also result in major performance |
| 41 | appropriate these days. | 41 | problems, including seconds-long delays before an fsync() |
| 42 | 42 | call returns. For details, see: | |
| 43 | You should probably always answer 'n' here, and if you really | 43 | |
| 44 | want to use 'data=ordered' mode, set it in the filesystem itself | 44 | http://ext4.wiki.kernel.org/index.php/Ext3_data_mode_tradeoffs |
| 45 | with 'tune2fs -o journal_data_ordered'. | 45 | |
| 46 | 46 | If you have been historically happy with ext3's performance, | |
| 47 | But if you really want to enable the legacy default, you can do | 47 | data=ordered mode will be a safe choice and you should |
| 48 | so by answering 'y' to this question. | 48 | answer 'y' here. If you understand the reliability and data |
| 49 | privacy issues of data=writeback and are willing to make | ||
| 50 | that trade off, answer 'n'. | ||
| 49 | 51 | ||
| 50 | config EXT3_FS_XATTR | 52 | config EXT3_FS_XATTR |
| 51 | bool "Ext3 extended attributes" | 53 | bool "Ext3 extended attributes" |
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 524b349c6299..a8d80a7f1105 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
| @@ -543,6 +543,19 @@ static inline void ext3_show_quota_options(struct seq_file *seq, struct super_bl | |||
| 543 | #endif | 543 | #endif |
| 544 | } | 544 | } |
| 545 | 545 | ||
| 546 | static char *data_mode_string(unsigned long mode) | ||
| 547 | { | ||
| 548 | switch (mode) { | ||
| 549 | case EXT3_MOUNT_JOURNAL_DATA: | ||
| 550 | return "journal"; | ||
| 551 | case EXT3_MOUNT_ORDERED_DATA: | ||
| 552 | return "ordered"; | ||
| 553 | case EXT3_MOUNT_WRITEBACK_DATA: | ||
| 554 | return "writeback"; | ||
| 555 | } | ||
| 556 | return "unknown"; | ||
| 557 | } | ||
| 558 | |||
| 546 | /* | 559 | /* |
| 547 | * Show an option if | 560 | * Show an option if |
| 548 | * - it's set to a non-default value OR | 561 | * - it's set to a non-default value OR |
| @@ -616,13 +629,8 @@ static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
| 616 | if (test_opt(sb, NOBH)) | 629 | if (test_opt(sb, NOBH)) |
| 617 | seq_puts(seq, ",nobh"); | 630 | seq_puts(seq, ",nobh"); |
| 618 | 631 | ||
| 619 | if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA) | 632 | seq_printf(seq, ",data=%s", data_mode_string(sbi->s_mount_opt & |
| 620 | seq_puts(seq, ",data=journal"); | 633 | EXT3_MOUNT_DATA_FLAGS)); |
| 621 | else if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA) | ||
| 622 | seq_puts(seq, ",data=ordered"); | ||
| 623 | else if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_WRITEBACK_DATA) | ||
| 624 | seq_puts(seq, ",data=writeback"); | ||
| 625 | |||
| 626 | if (test_opt(sb, DATA_ERR_ABORT)) | 634 | if (test_opt(sb, DATA_ERR_ABORT)) |
| 627 | seq_puts(seq, ",data_err=abort"); | 635 | seq_puts(seq, ",data_err=abort"); |
| 628 | 636 | ||
| @@ -1024,12 +1032,18 @@ static int parse_options (char *options, struct super_block *sb, | |||
| 1024 | datacheck: | 1032 | datacheck: |
| 1025 | if (is_remount) { | 1033 | if (is_remount) { |
| 1026 | if ((sbi->s_mount_opt & EXT3_MOUNT_DATA_FLAGS) | 1034 | if ((sbi->s_mount_opt & EXT3_MOUNT_DATA_FLAGS) |
| 1027 | != data_opt) { | 1035 | == data_opt) |
| 1028 | printk(KERN_ERR | 1036 | break; |
| 1029 | "EXT3-fs: cannot change data " | 1037 | printk(KERN_ERR |
| 1030 | "mode on remount\n"); | 1038 | "EXT3-fs (device %s): Cannot change " |
| 1031 | return 0; | 1039 | "data mode on remount. The filesystem " |
| 1032 | } | 1040 | "is mounted in data=%s mode and you " |
| 1041 | "try to remount it in data=%s mode.\n", | ||
| 1042 | sb->s_id, | ||
| 1043 | data_mode_string(sbi->s_mount_opt & | ||
| 1044 | EXT3_MOUNT_DATA_FLAGS), | ||
| 1045 | data_mode_string(data_opt)); | ||
| 1046 | return 0; | ||
| 1033 | } else { | 1047 | } else { |
| 1034 | sbi->s_mount_opt &= ~EXT3_MOUNT_DATA_FLAGS; | 1048 | sbi->s_mount_opt &= ~EXT3_MOUNT_DATA_FLAGS; |
| 1035 | sbi->s_mount_opt |= data_opt; | 1049 | sbi->s_mount_opt |= data_opt; |
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 941c8425c10b..cb88dac8ccaa 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
| @@ -935,26 +935,28 @@ static int can_do_hugetlb_shm(void) | |||
| 935 | return capable(CAP_IPC_LOCK) || in_group_p(sysctl_hugetlb_shm_group); | 935 | return capable(CAP_IPC_LOCK) || in_group_p(sysctl_hugetlb_shm_group); |
| 936 | } | 936 | } |
| 937 | 937 | ||
| 938 | struct file *hugetlb_file_setup(const char *name, size_t size, int acctflag) | 938 | struct file *hugetlb_file_setup(const char *name, size_t size, int acctflag, |
| 939 | struct user_struct **user) | ||
| 939 | { | 940 | { |
| 940 | int error = -ENOMEM; | 941 | int error = -ENOMEM; |
| 941 | int unlock_shm = 0; | ||
| 942 | struct file *file; | 942 | struct file *file; |
| 943 | struct inode *inode; | 943 | struct inode *inode; |
| 944 | struct dentry *dentry, *root; | 944 | struct dentry *dentry, *root; |
| 945 | struct qstr quick_string; | 945 | struct qstr quick_string; |
| 946 | struct user_struct *user = current_user(); | ||
| 947 | 946 | ||
| 947 | *user = NULL; | ||
| 948 | if (!hugetlbfs_vfsmount) | 948 | if (!hugetlbfs_vfsmount) |
| 949 | return ERR_PTR(-ENOENT); | 949 | return ERR_PTR(-ENOENT); |
| 950 | 950 | ||
| 951 | if (!can_do_hugetlb_shm()) { | 951 | if (!can_do_hugetlb_shm()) { |
| 952 | if (user_shm_lock(size, user)) { | 952 | *user = current_user(); |
| 953 | unlock_shm = 1; | 953 | if (user_shm_lock(size, *user)) { |
| 954 | WARN_ONCE(1, | 954 | WARN_ONCE(1, |
| 955 | "Using mlock ulimits for SHM_HUGETLB deprecated\n"); | 955 | "Using mlock ulimits for SHM_HUGETLB deprecated\n"); |
| 956 | } else | 956 | } else { |
| 957 | *user = NULL; | ||
| 957 | return ERR_PTR(-EPERM); | 958 | return ERR_PTR(-EPERM); |
| 959 | } | ||
| 958 | } | 960 | } |
| 959 | 961 | ||
| 960 | root = hugetlbfs_vfsmount->mnt_root; | 962 | root = hugetlbfs_vfsmount->mnt_root; |
| @@ -996,8 +998,10 @@ out_inode: | |||
| 996 | out_dentry: | 998 | out_dentry: |
| 997 | dput(dentry); | 999 | dput(dentry); |
| 998 | out_shm_unlock: | 1000 | out_shm_unlock: |
| 999 | if (unlock_shm) | 1001 | if (*user) { |
| 1000 | user_shm_unlock(size, user); | 1002 | user_shm_unlock(size, *user); |
| 1003 | *user = NULL; | ||
| 1004 | } | ||
| 1001 | return ERR_PTR(error); | 1005 | return ERR_PTR(error); |
| 1002 | } | 1006 | } |
| 1003 | 1007 | ||
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 65ca8c18476f..1434080aefeb 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
| @@ -1250,8 +1250,8 @@ static void nfs4_state_manager(struct nfs_client *clp) | |||
| 1250 | continue; | 1250 | continue; |
| 1251 | } | 1251 | } |
| 1252 | /* Initialize or reset the session */ | 1252 | /* Initialize or reset the session */ |
| 1253 | if (nfs4_has_session(clp) && | 1253 | if (test_and_clear_bit(NFS4CLNT_SESSION_SETUP, &clp->cl_state) |
| 1254 | test_and_clear_bit(NFS4CLNT_SESSION_SETUP, &clp->cl_state)) { | 1254 | && nfs4_has_session(clp)) { |
| 1255 | if (clp->cl_cons_state == NFS_CS_SESSION_INITING) | 1255 | if (clp->cl_cons_state == NFS_CS_SESSION_INITING) |
| 1256 | status = nfs4_initialize_session(clp); | 1256 | status = nfs4_initialize_session(clp); |
| 1257 | else | 1257 | else |
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index f9a3e8942669..ab513ddaeff2 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
| @@ -6851,7 +6851,7 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb, | |||
| 6851 | } | 6851 | } |
| 6852 | status = 0; | 6852 | status = 0; |
| 6853 | bail: | 6853 | bail: |
| 6854 | 6854 | brelse(last_eb_bh); | |
| 6855 | mlog_exit(status); | 6855 | mlog_exit(status); |
| 6856 | return status; | 6856 | return status; |
| 6857 | } | 6857 | } |
diff --git a/fs/ocfs2/dlm/dlmunlock.c b/fs/ocfs2/dlm/dlmunlock.c index fcf879ed6930..756f5b0998e0 100644 --- a/fs/ocfs2/dlm/dlmunlock.c +++ b/fs/ocfs2/dlm/dlmunlock.c | |||
| @@ -122,7 +122,7 @@ static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm, | |||
| 122 | * that still has AST's pending... */ | 122 | * that still has AST's pending... */ |
| 123 | in_use = !list_empty(&lock->ast_list); | 123 | in_use = !list_empty(&lock->ast_list); |
| 124 | spin_unlock(&dlm->ast_lock); | 124 | spin_unlock(&dlm->ast_lock); |
| 125 | if (in_use) { | 125 | if (in_use && !(flags & LKM_CANCEL)) { |
| 126 | mlog(ML_ERROR, "lockres %.*s: Someone is calling dlmunlock " | 126 | mlog(ML_ERROR, "lockres %.*s: Someone is calling dlmunlock " |
| 127 | "while waiting for an ast!", res->lockname.len, | 127 | "while waiting for an ast!", res->lockname.len, |
| 128 | res->lockname.name); | 128 | res->lockname.name); |
| @@ -131,7 +131,7 @@ static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm, | |||
| 131 | 131 | ||
| 132 | spin_lock(&res->spinlock); | 132 | spin_lock(&res->spinlock); |
| 133 | if (res->state & DLM_LOCK_RES_IN_PROGRESS) { | 133 | if (res->state & DLM_LOCK_RES_IN_PROGRESS) { |
| 134 | if (master_node) { | 134 | if (master_node && !(flags & LKM_CANCEL)) { |
| 135 | mlog(ML_ERROR, "lockres in progress!\n"); | 135 | mlog(ML_ERROR, "lockres in progress!\n"); |
| 136 | spin_unlock(&res->spinlock); | 136 | spin_unlock(&res->spinlock); |
| 137 | return DLM_FORWARD; | 137 | return DLM_FORWARD; |
diff --git a/fs/ocfs2/ocfs2_lockid.h b/fs/ocfs2/ocfs2_lockid.h index fcdba091af3d..c212cf5a2bdf 100644 --- a/fs/ocfs2/ocfs2_lockid.h +++ b/fs/ocfs2/ocfs2_lockid.h | |||
| @@ -108,6 +108,7 @@ static char *ocfs2_lock_type_strings[] = { | |||
| 108 | [OCFS2_LOCK_TYPE_OPEN] = "Open", | 108 | [OCFS2_LOCK_TYPE_OPEN] = "Open", |
| 109 | [OCFS2_LOCK_TYPE_FLOCK] = "Flock", | 109 | [OCFS2_LOCK_TYPE_FLOCK] = "Flock", |
| 110 | [OCFS2_LOCK_TYPE_QINFO] = "Quota", | 110 | [OCFS2_LOCK_TYPE_QINFO] = "Quota", |
| 111 | [OCFS2_LOCK_TYPE_NFS_SYNC] = "NFSSync", | ||
| 111 | [OCFS2_LOCK_TYPE_ORPHAN_SCAN] = "OrphanScan", | 112 | [OCFS2_LOCK_TYPE_ORPHAN_SCAN] = "OrphanScan", |
| 112 | }; | 113 | }; |
| 113 | 114 | ||
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index bf7742d0ee3b..44f2a5e1d042 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include "sysfile.h" | 23 | #include "sysfile.h" |
| 24 | #include "dlmglue.h" | 24 | #include "dlmglue.h" |
| 25 | #include "uptodate.h" | 25 | #include "uptodate.h" |
| 26 | #include "super.h" | ||
| 26 | #include "quota.h" | 27 | #include "quota.h" |
| 27 | 28 | ||
| 28 | static struct workqueue_struct *ocfs2_quota_wq = NULL; | 29 | static struct workqueue_struct *ocfs2_quota_wq = NULL; |
| @@ -114,6 +115,15 @@ int ocfs2_read_quota_block(struct inode *inode, u64 v_block, | |||
| 114 | int rc = 0; | 115 | int rc = 0; |
| 115 | struct buffer_head *tmp = *bh; | 116 | struct buffer_head *tmp = *bh; |
| 116 | 117 | ||
| 118 | if (i_size_read(inode) >> inode->i_sb->s_blocksize_bits <= v_block) { | ||
| 119 | ocfs2_error(inode->i_sb, | ||
| 120 | "Quota file %llu is probably corrupted! Requested " | ||
| 121 | "to read block %Lu but file has size only %Lu\n", | ||
| 122 | (unsigned long long)OCFS2_I(inode)->ip_blkno, | ||
| 123 | (unsigned long long)v_block, | ||
| 124 | (unsigned long long)i_size_read(inode)); | ||
| 125 | return -EIO; | ||
| 126 | } | ||
| 117 | rc = ocfs2_read_virt_blocks(inode, v_block, 1, &tmp, 0, | 127 | rc = ocfs2_read_virt_blocks(inode, v_block, 1, &tmp, 0, |
| 118 | ocfs2_validate_quota_block); | 128 | ocfs2_validate_quota_block); |
| 119 | if (rc) | 129 | if (rc) |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index b0ee0fdf799a..a3f8871d21fd 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
| @@ -1218,13 +1218,17 @@ static void ocfs2_kill_sb(struct super_block *sb) | |||
| 1218 | { | 1218 | { |
| 1219 | struct ocfs2_super *osb = OCFS2_SB(sb); | 1219 | struct ocfs2_super *osb = OCFS2_SB(sb); |
| 1220 | 1220 | ||
| 1221 | /* Failed mount? */ | ||
| 1222 | if (!osb || atomic_read(&osb->vol_state) == VOLUME_DISABLED) | ||
| 1223 | goto out; | ||
| 1224 | |||
| 1221 | /* Prevent further queueing of inode drop events */ | 1225 | /* Prevent further queueing of inode drop events */ |
| 1222 | spin_lock(&dentry_list_lock); | 1226 | spin_lock(&dentry_list_lock); |
| 1223 | ocfs2_set_osb_flag(osb, OCFS2_OSB_DROP_DENTRY_LOCK_IMMED); | 1227 | ocfs2_set_osb_flag(osb, OCFS2_OSB_DROP_DENTRY_LOCK_IMMED); |
| 1224 | spin_unlock(&dentry_list_lock); | 1228 | spin_unlock(&dentry_list_lock); |
| 1225 | /* Wait for work to finish and/or remove it */ | 1229 | /* Wait for work to finish and/or remove it */ |
| 1226 | cancel_work_sync(&osb->dentry_lock_work); | 1230 | cancel_work_sync(&osb->dentry_lock_work); |
| 1227 | 1231 | out: | |
| 1228 | kill_block_super(sb); | 1232 | kill_block_super(sb); |
| 1229 | } | 1233 | } |
| 1230 | 1234 | ||
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index baf1e0a9a7ee..740ac3ad8fd0 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
| @@ -174,7 +174,7 @@ struct acpi_processor_throttling { | |||
| 174 | cpumask_var_t shared_cpu_map; | 174 | cpumask_var_t shared_cpu_map; |
| 175 | int (*acpi_processor_get_throttling) (struct acpi_processor * pr); | 175 | int (*acpi_processor_get_throttling) (struct acpi_processor * pr); |
| 176 | int (*acpi_processor_set_throttling) (struct acpi_processor * pr, | 176 | int (*acpi_processor_set_throttling) (struct acpi_processor * pr, |
| 177 | int state); | 177 | int state, bool force); |
| 178 | 178 | ||
| 179 | u32 address; | 179 | u32 address; |
| 180 | u8 duty_offset; | 180 | u8 duty_offset; |
| @@ -321,7 +321,8 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) | |||
| 321 | /* in processor_throttling.c */ | 321 | /* in processor_throttling.c */ |
| 322 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr); | 322 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr); |
| 323 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); | 323 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); |
| 324 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); | 324 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, |
| 325 | int state, bool force); | ||
| 325 | extern const struct file_operations acpi_processor_throttling_fops; | 326 | extern const struct file_operations acpi_processor_throttling_fops; |
| 326 | extern void acpi_processor_throttling_init(void); | 327 | extern void acpi_processor_throttling_init(void); |
| 327 | /* in processor_idle.c */ | 328 | /* in processor_idle.c */ |
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h index 23c1ec79a31b..45ff18491514 100644 --- a/include/linux/flex_array.h +++ b/include/linux/flex_array.h | |||
| @@ -21,7 +21,7 @@ struct flex_array { | |||
| 21 | struct { | 21 | struct { |
| 22 | int element_size; | 22 | int element_size; |
| 23 | int total_nr_elements; | 23 | int total_nr_elements; |
| 24 | struct flex_array_part *parts[0]; | 24 | struct flex_array_part *parts[]; |
| 25 | }; | 25 | }; |
| 26 | /* | 26 | /* |
| 27 | * This little trick makes sure that | 27 | * This little trick makes sure that |
| @@ -36,12 +36,14 @@ struct flex_array { | |||
| 36 | .total_nr_elements = (total), \ | 36 | .total_nr_elements = (total), \ |
| 37 | } } } | 37 | } } } |
| 38 | 38 | ||
| 39 | struct flex_array *flex_array_alloc(int element_size, int total, gfp_t flags); | 39 | struct flex_array *flex_array_alloc(int element_size, unsigned int total, |
| 40 | int flex_array_prealloc(struct flex_array *fa, int start, int end, gfp_t flags); | 40 | gfp_t flags); |
| 41 | int flex_array_prealloc(struct flex_array *fa, unsigned int start, | ||
| 42 | unsigned int end, gfp_t flags); | ||
| 41 | void flex_array_free(struct flex_array *fa); | 43 | void flex_array_free(struct flex_array *fa); |
| 42 | void flex_array_free_parts(struct flex_array *fa); | 44 | void flex_array_free_parts(struct flex_array *fa); |
| 43 | int flex_array_put(struct flex_array *fa, int element_nr, void *src, | 45 | int flex_array_put(struct flex_array *fa, unsigned int element_nr, void *src, |
| 44 | gfp_t flags); | 46 | gfp_t flags); |
| 45 | void *flex_array_get(struct flex_array *fa, int element_nr); | 47 | void *flex_array_get(struct flex_array *fa, unsigned int element_nr); |
| 46 | 48 | ||
| 47 | #endif /* _FLEX_ARRAY_H */ | 49 | #endif /* _FLEX_ARRAY_H */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 67888a9e0655..73e9b643e455 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -2123,7 +2123,7 @@ extern struct file *do_filp_open(int dfd, const char *pathname, | |||
| 2123 | int open_flag, int mode, int acc_mode); | 2123 | int open_flag, int mode, int acc_mode); |
| 2124 | extern int may_open(struct path *, int, int); | 2124 | extern int may_open(struct path *, int, int); |
| 2125 | 2125 | ||
| 2126 | extern int kernel_read(struct file *, unsigned long, char *, unsigned long); | 2126 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); |
| 2127 | extern struct file * open_exec(const char *); | 2127 | extern struct file * open_exec(const char *); |
| 2128 | 2128 | ||
| 2129 | /* fs/dcache.c -- generic fs support functions */ | 2129 | /* fs/dcache.c -- generic fs support functions */ |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 2723513a5651..5cbc620bdfe0 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <asm/tlbflush.h> | 10 | #include <asm/tlbflush.h> |
| 11 | 11 | ||
| 12 | struct ctl_table; | 12 | struct ctl_table; |
| 13 | struct user_struct; | ||
| 13 | 14 | ||
| 14 | int PageHuge(struct page *page); | 15 | int PageHuge(struct page *page); |
| 15 | 16 | ||
| @@ -146,7 +147,8 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | |||
| 146 | 147 | ||
| 147 | extern const struct file_operations hugetlbfs_file_operations; | 148 | extern const struct file_operations hugetlbfs_file_operations; |
| 148 | extern struct vm_operations_struct hugetlb_vm_ops; | 149 | extern struct vm_operations_struct hugetlb_vm_ops; |
| 149 | struct file *hugetlb_file_setup(const char *name, size_t, int); | 150 | struct file *hugetlb_file_setup(const char *name, size_t size, int acct, |
| 151 | struct user_struct **user); | ||
| 150 | int hugetlb_get_quota(struct address_space *mapping, long delta); | 152 | int hugetlb_get_quota(struct address_space *mapping, long delta); |
| 151 | void hugetlb_put_quota(struct address_space *mapping, long delta); | 153 | void hugetlb_put_quota(struct address_space *mapping, long delta); |
| 152 | 154 | ||
| @@ -168,7 +170,7 @@ static inline void set_file_hugepages(struct file *file) | |||
| 168 | 170 | ||
| 169 | #define is_file_hugepages(file) 0 | 171 | #define is_file_hugepages(file) 0 |
| 170 | #define set_file_hugepages(file) BUG() | 172 | #define set_file_hugepages(file) BUG() |
| 171 | #define hugetlb_file_setup(name,size,acctflag) ERR_PTR(-ENOSYS) | 173 | #define hugetlb_file_setup(name,size,acct,user) ERR_PTR(-ENOSYS) |
| 172 | 174 | ||
| 173 | #endif /* !CONFIG_HUGETLBFS */ | 175 | #endif /* !CONFIG_HUGETLBFS */ |
| 174 | 176 | ||
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h index ed889f4168f3..ae779bb8cc0f 100644 --- a/include/linux/ucb1400.h +++ b/include/linux/ucb1400.h | |||
| @@ -73,6 +73,10 @@ | |||
| 73 | 73 | ||
| 74 | #define UCB_ADC_DATA 0x68 | 74 | #define UCB_ADC_DATA 0x68 |
| 75 | #define UCB_ADC_DAT_VALID (1 << 15) | 75 | #define UCB_ADC_DAT_VALID (1 << 15) |
| 76 | |||
| 77 | #define UCB_FCSR 0x6c | ||
| 78 | #define UCB_FCSR_AVE (1 << 12) | ||
| 79 | |||
| 76 | #define UCB_ADC_DAT_MASK 0x3ff | 80 | #define UCB_ADC_DAT_MASK 0x3ff |
| 77 | 81 | ||
| 78 | #define UCB_ID 0x7e | 82 | #define UCB_ID 0x7e |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 82a3191375f5..7eafb8d54470 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
| @@ -61,8 +61,8 @@ psched_tdiff_bounded(psched_time_t tv1, psched_time_t tv2, psched_time_t bound) | |||
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | struct qdisc_watchdog { | 63 | struct qdisc_watchdog { |
| 64 | struct hrtimer timer; | 64 | struct tasklet_hrtimer timer; |
| 65 | struct Qdisc *qdisc; | 65 | struct Qdisc *qdisc; |
| 66 | }; | 66 | }; |
| 67 | 67 | ||
| 68 | extern void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc); | 68 | extern void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc); |
diff --git a/init/main.c b/init/main.c index 2d9d6bdfe7c9..0ec75ce771ac 100644 --- a/init/main.c +++ b/init/main.c | |||
| @@ -631,7 +631,6 @@ asmlinkage void __init start_kernel(void) | |||
| 631 | softirq_init(); | 631 | softirq_init(); |
| 632 | timekeeping_init(); | 632 | timekeeping_init(); |
| 633 | time_init(); | 633 | time_init(); |
| 634 | sched_clock_init(); | ||
| 635 | profile_init(); | 634 | profile_init(); |
| 636 | if (!irqs_disabled()) | 635 | if (!irqs_disabled()) |
| 637 | printk(KERN_CRIT "start_kernel(): bug: interrupts were " | 636 | printk(KERN_CRIT "start_kernel(): bug: interrupts were " |
| @@ -682,6 +681,7 @@ asmlinkage void __init start_kernel(void) | |||
| 682 | numa_policy_init(); | 681 | numa_policy_init(); |
| 683 | if (late_time_init) | 682 | if (late_time_init) |
| 684 | late_time_init(); | 683 | late_time_init(); |
| 684 | sched_clock_init(); | ||
| 685 | calibrate_delay(); | 685 | calibrate_delay(); |
| 686 | pidmap_init(); | 686 | pidmap_init(); |
| 687 | anon_vma_init(); | 687 | anon_vma_init(); |
| @@ -733,13 +733,14 @@ static void __init do_ctors(void) | |||
| 733 | int initcall_debug; | 733 | int initcall_debug; |
| 734 | core_param(initcall_debug, initcall_debug, bool, 0644); | 734 | core_param(initcall_debug, initcall_debug, bool, 0644); |
| 735 | 735 | ||
| 736 | static char msgbuf[64]; | ||
| 737 | static struct boot_trace_call call; | ||
| 738 | static struct boot_trace_ret ret; | ||
| 739 | |||
| 736 | int do_one_initcall(initcall_t fn) | 740 | int do_one_initcall(initcall_t fn) |
| 737 | { | 741 | { |
| 738 | int count = preempt_count(); | 742 | int count = preempt_count(); |
| 739 | ktime_t calltime, delta, rettime; | 743 | ktime_t calltime, delta, rettime; |
| 740 | char msgbuf[64]; | ||
| 741 | struct boot_trace_call call; | ||
| 742 | struct boot_trace_ret ret; | ||
| 743 | 744 | ||
| 744 | if (initcall_debug) { | 745 | if (initcall_debug) { |
| 745 | call.caller = task_pid_nr(current); | 746 | call.caller = task_pid_nr(current); |
| @@ -174,7 +174,7 @@ static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp) | |||
| 174 | shm_unlock(shp); | 174 | shm_unlock(shp); |
| 175 | if (!is_file_hugepages(shp->shm_file)) | 175 | if (!is_file_hugepages(shp->shm_file)) |
| 176 | shmem_lock(shp->shm_file, 0, shp->mlock_user); | 176 | shmem_lock(shp->shm_file, 0, shp->mlock_user); |
| 177 | else | 177 | else if (shp->mlock_user) |
| 178 | user_shm_unlock(shp->shm_file->f_path.dentry->d_inode->i_size, | 178 | user_shm_unlock(shp->shm_file->f_path.dentry->d_inode->i_size, |
| 179 | shp->mlock_user); | 179 | shp->mlock_user); |
| 180 | fput (shp->shm_file); | 180 | fput (shp->shm_file); |
| @@ -369,8 +369,8 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) | |||
| 369 | /* hugetlb_file_setup applies strict accounting */ | 369 | /* hugetlb_file_setup applies strict accounting */ |
| 370 | if (shmflg & SHM_NORESERVE) | 370 | if (shmflg & SHM_NORESERVE) |
| 371 | acctflag = VM_NORESERVE; | 371 | acctflag = VM_NORESERVE; |
| 372 | file = hugetlb_file_setup(name, size, acctflag); | 372 | file = hugetlb_file_setup(name, size, acctflag, |
| 373 | shp->mlock_user = current_user(); | 373 | &shp->mlock_user); |
| 374 | } else { | 374 | } else { |
| 375 | /* | 375 | /* |
| 376 | * Do not allow no accounting for OVERCOMMIT_NEVER, even | 376 | * Do not allow no accounting for OVERCOMMIT_NEVER, even |
| @@ -410,6 +410,8 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) | |||
| 410 | return error; | 410 | return error; |
| 411 | 411 | ||
| 412 | no_id: | 412 | no_id: |
| 413 | if (shp->mlock_user) /* shmflg & SHM_HUGETLB case */ | ||
| 414 | user_shm_unlock(size, shp->mlock_user); | ||
| 413 | fput(file); | 415 | fput(file); |
| 414 | no_file: | 416 | no_file: |
| 415 | security_shm_free(shp); | 417 | security_shm_free(shp); |
diff --git a/kernel/fork.c b/kernel/fork.c index 144326b7af50..e6c04d462ab2 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
| @@ -815,11 +815,8 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) | |||
| 815 | { | 815 | { |
| 816 | struct signal_struct *sig; | 816 | struct signal_struct *sig; |
| 817 | 817 | ||
| 818 | if (clone_flags & CLONE_THREAD) { | 818 | if (clone_flags & CLONE_THREAD) |
| 819 | atomic_inc(¤t->signal->count); | ||
| 820 | atomic_inc(¤t->signal->live); | ||
| 821 | return 0; | 819 | return 0; |
| 822 | } | ||
| 823 | 820 | ||
| 824 | sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL); | 821 | sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL); |
| 825 | tsk->signal = sig; | 822 | tsk->signal = sig; |
| @@ -877,16 +874,6 @@ void __cleanup_signal(struct signal_struct *sig) | |||
| 877 | kmem_cache_free(signal_cachep, sig); | 874 | kmem_cache_free(signal_cachep, sig); |
| 878 | } | 875 | } |
| 879 | 876 | ||
| 880 | static void cleanup_signal(struct task_struct *tsk) | ||
| 881 | { | ||
| 882 | struct signal_struct *sig = tsk->signal; | ||
| 883 | |||
| 884 | atomic_dec(&sig->live); | ||
| 885 | |||
| 886 | if (atomic_dec_and_test(&sig->count)) | ||
| 887 | __cleanup_signal(sig); | ||
| 888 | } | ||
| 889 | |||
| 890 | static void copy_flags(unsigned long clone_flags, struct task_struct *p) | 877 | static void copy_flags(unsigned long clone_flags, struct task_struct *p) |
| 891 | { | 878 | { |
| 892 | unsigned long new_flags = p->flags; | 879 | unsigned long new_flags = p->flags; |
| @@ -1239,6 +1226,8 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
| 1239 | } | 1226 | } |
| 1240 | 1227 | ||
| 1241 | if (clone_flags & CLONE_THREAD) { | 1228 | if (clone_flags & CLONE_THREAD) { |
| 1229 | atomic_inc(¤t->signal->count); | ||
| 1230 | atomic_inc(¤t->signal->live); | ||
| 1242 | p->group_leader = current->group_leader; | 1231 | p->group_leader = current->group_leader; |
| 1243 | list_add_tail_rcu(&p->thread_group, &p->group_leader->thread_group); | 1232 | list_add_tail_rcu(&p->thread_group, &p->group_leader->thread_group); |
| 1244 | } | 1233 | } |
| @@ -1282,7 +1271,8 @@ bad_fork_cleanup_mm: | |||
| 1282 | if (p->mm) | 1271 | if (p->mm) |
| 1283 | mmput(p->mm); | 1272 | mmput(p->mm); |
| 1284 | bad_fork_cleanup_signal: | 1273 | bad_fork_cleanup_signal: |
| 1285 | cleanup_signal(p); | 1274 | if (!(clone_flags & CLONE_THREAD)) |
| 1275 | __cleanup_signal(p->signal); | ||
| 1286 | bad_fork_cleanup_sighand: | 1276 | bad_fork_cleanup_sighand: |
| 1287 | __cleanup_sighand(p->sighand); | 1277 | __cleanup_sighand(p->sighand); |
| 1288 | bad_fork_cleanup_fs: | 1278 | bad_fork_cleanup_fs: |
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c index 36f65e2b8b57..f274e1959885 100644 --- a/kernel/perf_counter.c +++ b/kernel/perf_counter.c | |||
| @@ -1791,7 +1791,7 @@ static int perf_counter_read_group(struct perf_counter *counter, | |||
| 1791 | size += err; | 1791 | size += err; |
| 1792 | 1792 | ||
| 1793 | list_for_each_entry(sub, &leader->sibling_list, list_entry) { | 1793 | list_for_each_entry(sub, &leader->sibling_list, list_entry) { |
| 1794 | err = perf_counter_read_entry(counter, read_format, | 1794 | err = perf_counter_read_entry(sub, read_format, |
| 1795 | buf + size); | 1795 | buf + size); |
| 1796 | if (err < 0) | 1796 | if (err < 0) |
| 1797 | return err; | 1797 | return err; |
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index a6dcd67b041d..620b58abdc32 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c | |||
| @@ -137,11 +137,12 @@ int clockevents_program_event(struct clock_event_device *dev, ktime_t expires, | |||
| 137 | */ | 137 | */ |
| 138 | int clockevents_register_notifier(struct notifier_block *nb) | 138 | int clockevents_register_notifier(struct notifier_block *nb) |
| 139 | { | 139 | { |
| 140 | unsigned long flags; | ||
| 140 | int ret; | 141 | int ret; |
| 141 | 142 | ||
| 142 | spin_lock(&clockevents_lock); | 143 | spin_lock_irqsave(&clockevents_lock, flags); |
| 143 | ret = raw_notifier_chain_register(&clockevents_chain, nb); | 144 | ret = raw_notifier_chain_register(&clockevents_chain, nb); |
| 144 | spin_unlock(&clockevents_lock); | 145 | spin_unlock_irqrestore(&clockevents_lock, flags); |
| 145 | 146 | ||
| 146 | return ret; | 147 | return ret; |
| 147 | } | 148 | } |
| @@ -178,16 +179,18 @@ static void clockevents_notify_released(void) | |||
| 178 | */ | 179 | */ |
| 179 | void clockevents_register_device(struct clock_event_device *dev) | 180 | void clockevents_register_device(struct clock_event_device *dev) |
| 180 | { | 181 | { |
| 182 | unsigned long flags; | ||
| 183 | |||
| 181 | BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED); | 184 | BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED); |
| 182 | BUG_ON(!dev->cpumask); | 185 | BUG_ON(!dev->cpumask); |
| 183 | 186 | ||
| 184 | spin_lock(&clockevents_lock); | 187 | spin_lock_irqsave(&clockevents_lock, flags); |
| 185 | 188 | ||
| 186 | list_add(&dev->list, &clockevent_devices); | 189 | list_add(&dev->list, &clockevent_devices); |
| 187 | clockevents_do_notify(CLOCK_EVT_NOTIFY_ADD, dev); | 190 | clockevents_do_notify(CLOCK_EVT_NOTIFY_ADD, dev); |
| 188 | clockevents_notify_released(); | 191 | clockevents_notify_released(); |
| 189 | 192 | ||
| 190 | spin_unlock(&clockevents_lock); | 193 | spin_unlock_irqrestore(&clockevents_lock, flags); |
| 191 | } | 194 | } |
| 192 | EXPORT_SYMBOL_GPL(clockevents_register_device); | 195 | EXPORT_SYMBOL_GPL(clockevents_register_device); |
| 193 | 196 | ||
| @@ -235,8 +238,9 @@ void clockevents_exchange_device(struct clock_event_device *old, | |||
| 235 | void clockevents_notify(unsigned long reason, void *arg) | 238 | void clockevents_notify(unsigned long reason, void *arg) |
| 236 | { | 239 | { |
| 237 | struct list_head *node, *tmp; | 240 | struct list_head *node, *tmp; |
| 241 | unsigned long flags; | ||
| 238 | 242 | ||
| 239 | spin_lock(&clockevents_lock); | 243 | spin_lock_irqsave(&clockevents_lock, flags); |
| 240 | clockevents_do_notify(reason, arg); | 244 | clockevents_do_notify(reason, arg); |
| 241 | 245 | ||
| 242 | switch (reason) { | 246 | switch (reason) { |
| @@ -251,7 +255,7 @@ void clockevents_notify(unsigned long reason, void *arg) | |||
| 251 | default: | 255 | default: |
| 252 | break; | 256 | break; |
| 253 | } | 257 | } |
| 254 | spin_unlock(&clockevents_lock); | 258 | spin_unlock_irqrestore(&clockevents_lock, flags); |
| 255 | } | 259 | } |
| 256 | EXPORT_SYMBOL_GPL(clockevents_notify); | 260 | EXPORT_SYMBOL_GPL(clockevents_notify); |
| 257 | #endif | 261 | #endif |
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index 877dbedc3118..c2ec25087a35 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
| @@ -205,11 +205,11 @@ static void tick_handle_periodic_broadcast(struct clock_event_device *dev) | |||
| 205 | * Powerstate information: The system enters/leaves a state, where | 205 | * Powerstate information: The system enters/leaves a state, where |
| 206 | * affected devices might stop | 206 | * affected devices might stop |
| 207 | */ | 207 | */ |
| 208 | static void tick_do_broadcast_on_off(void *why) | 208 | static void tick_do_broadcast_on_off(unsigned long *reason) |
| 209 | { | 209 | { |
| 210 | struct clock_event_device *bc, *dev; | 210 | struct clock_event_device *bc, *dev; |
| 211 | struct tick_device *td; | 211 | struct tick_device *td; |
| 212 | unsigned long flags, *reason = why; | 212 | unsigned long flags; |
| 213 | int cpu, bc_stopped; | 213 | int cpu, bc_stopped; |
| 214 | 214 | ||
| 215 | spin_lock_irqsave(&tick_broadcast_lock, flags); | 215 | spin_lock_irqsave(&tick_broadcast_lock, flags); |
| @@ -276,8 +276,7 @@ void tick_broadcast_on_off(unsigned long reason, int *oncpu) | |||
| 276 | printk(KERN_ERR "tick-broadcast: ignoring broadcast for " | 276 | printk(KERN_ERR "tick-broadcast: ignoring broadcast for " |
| 277 | "offline CPU #%d\n", *oncpu); | 277 | "offline CPU #%d\n", *oncpu); |
| 278 | else | 278 | else |
| 279 | smp_call_function_single(*oncpu, tick_do_broadcast_on_off, | 279 | tick_do_broadcast_on_off(&reason); |
| 280 | &reason, 1); | ||
| 281 | } | 280 | } |
| 282 | 281 | ||
| 283 | /* | 282 | /* |
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index a999b92a1277..fddd69d16e03 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c | |||
| @@ -286,7 +286,7 @@ static int __init init_timer_list_procfs(void) | |||
| 286 | { | 286 | { |
| 287 | struct proc_dir_entry *pe; | 287 | struct proc_dir_entry *pe; |
| 288 | 288 | ||
| 289 | pe = proc_create("timer_list", 0644, NULL, &timer_list_fops); | 289 | pe = proc_create("timer_list", 0444, NULL, &timer_list_fops); |
| 290 | if (!pe) | 290 | if (!pe) |
| 291 | return -ENOMEM; | 291 | return -ENOMEM; |
| 292 | return 0; | 292 | return 0; |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 1e1d23c26308..25edd5cc5935 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
| @@ -2278,7 +2278,11 @@ ftrace_regex_write(struct file *file, const char __user *ubuf, | |||
| 2278 | read++; | 2278 | read++; |
| 2279 | cnt--; | 2279 | cnt--; |
| 2280 | 2280 | ||
| 2281 | if (!(iter->flags & ~FTRACE_ITER_CONT)) { | 2281 | /* |
| 2282 | * If the parser haven't finished with the last write, | ||
| 2283 | * continue reading the user input without skipping spaces. | ||
| 2284 | */ | ||
| 2285 | if (!(iter->flags & FTRACE_ITER_CONT)) { | ||
| 2282 | /* skip white space */ | 2286 | /* skip white space */ |
| 2283 | while (cnt && isspace(ch)) { | 2287 | while (cnt && isspace(ch)) { |
| 2284 | ret = get_user(ch, ubuf++); | 2288 | ret = get_user(ch, ubuf++); |
| @@ -2288,8 +2292,9 @@ ftrace_regex_write(struct file *file, const char __user *ubuf, | |||
| 2288 | cnt--; | 2292 | cnt--; |
| 2289 | } | 2293 | } |
| 2290 | 2294 | ||
| 2295 | /* only spaces were written */ | ||
| 2291 | if (isspace(ch)) { | 2296 | if (isspace(ch)) { |
| 2292 | file->f_pos += read; | 2297 | *ppos += read; |
| 2293 | ret = read; | 2298 | ret = read; |
| 2294 | goto out; | 2299 | goto out; |
| 2295 | } | 2300 | } |
| @@ -2319,12 +2324,12 @@ ftrace_regex_write(struct file *file, const char __user *ubuf, | |||
| 2319 | if (ret) | 2324 | if (ret) |
| 2320 | goto out; | 2325 | goto out; |
| 2321 | iter->buffer_idx = 0; | 2326 | iter->buffer_idx = 0; |
| 2322 | } else | 2327 | } else { |
| 2323 | iter->flags |= FTRACE_ITER_CONT; | 2328 | iter->flags |= FTRACE_ITER_CONT; |
| 2329 | iter->buffer[iter->buffer_idx++] = ch; | ||
| 2330 | } | ||
| 2324 | 2331 | ||
| 2325 | 2332 | *ppos += read; | |
| 2326 | file->f_pos += read; | ||
| 2327 | |||
| 2328 | ret = read; | 2333 | ret = read; |
| 2329 | out: | 2334 | out: |
| 2330 | mutex_unlock(&ftrace_regex_lock); | 2335 | mutex_unlock(&ftrace_regex_lock); |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index c22b40f8f576..8c358395d338 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
| @@ -3896,17 +3896,9 @@ trace_options_core_write(struct file *filp, const char __user *ubuf, size_t cnt, | |||
| 3896 | if (ret < 0) | 3896 | if (ret < 0) |
| 3897 | return ret; | 3897 | return ret; |
| 3898 | 3898 | ||
| 3899 | switch (val) { | 3899 | if (val != 0 && val != 1) |
| 3900 | case 0: | ||
| 3901 | trace_flags &= ~(1 << index); | ||
| 3902 | break; | ||
| 3903 | case 1: | ||
| 3904 | trace_flags |= 1 << index; | ||
| 3905 | break; | ||
| 3906 | |||
| 3907 | default: | ||
| 3908 | return -EINVAL; | 3900 | return -EINVAL; |
| 3909 | } | 3901 | set_tracer_flags(1 << index, val); |
| 3910 | 3902 | ||
| 3911 | *ppos += cnt; | 3903 | *ppos += cnt; |
| 3912 | 3904 | ||
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 65b0d99b6d0a..58a9f9fc609a 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c | |||
| @@ -156,9 +156,13 @@ static bool driver_filter(struct device *dev) | |||
| 156 | return true; | 156 | return true; |
| 157 | 157 | ||
| 158 | /* driver filter on and initialized */ | 158 | /* driver filter on and initialized */ |
| 159 | if (current_driver && dev->driver == current_driver) | 159 | if (current_driver && dev && dev->driver == current_driver) |
| 160 | return true; | 160 | return true; |
| 161 | 161 | ||
| 162 | /* driver filter on, but we can't filter on a NULL device... */ | ||
| 163 | if (!dev) | ||
| 164 | return false; | ||
| 165 | |||
| 162 | if (current_driver || !current_driver_name[0]) | 166 | if (current_driver || !current_driver_name[0]) |
| 163 | return false; | 167 | return false; |
| 164 | 168 | ||
| @@ -183,17 +187,17 @@ static bool driver_filter(struct device *dev) | |||
| 183 | return ret; | 187 | return ret; |
| 184 | } | 188 | } |
| 185 | 189 | ||
| 186 | #define err_printk(dev, entry, format, arg...) do { \ | 190 | #define err_printk(dev, entry, format, arg...) do { \ |
| 187 | error_count += 1; \ | 191 | error_count += 1; \ |
| 188 | if (driver_filter(dev) && \ | 192 | if (driver_filter(dev) && \ |
| 189 | (show_all_errors || show_num_errors > 0)) { \ | 193 | (show_all_errors || show_num_errors > 0)) { \ |
| 190 | WARN(1, "%s %s: " format, \ | 194 | WARN(1, "%s %s: " format, \ |
| 191 | dev_driver_string(dev), \ | 195 | dev ? dev_driver_string(dev) : "NULL", \ |
| 192 | dev_name(dev) , ## arg); \ | 196 | dev ? dev_name(dev) : "NULL", ## arg); \ |
| 193 | dump_entry_trace(entry); \ | 197 | dump_entry_trace(entry); \ |
| 194 | } \ | 198 | } \ |
| 195 | if (!show_all_errors && show_num_errors > 0) \ | 199 | if (!show_all_errors && show_num_errors > 0) \ |
| 196 | show_num_errors -= 1; \ | 200 | show_num_errors -= 1; \ |
| 197 | } while (0); | 201 | } while (0); |
| 198 | 202 | ||
| 199 | /* | 203 | /* |
diff --git a/lib/flex_array.c b/lib/flex_array.c index 08f1636d296a..7baed2fc3bc8 100644 --- a/lib/flex_array.c +++ b/lib/flex_array.c | |||
| @@ -99,7 +99,8 @@ static inline int elements_fit_in_base(struct flex_array *fa) | |||
| 99 | * capacity in the base structure. Also note that no effort is made | 99 | * capacity in the base structure. Also note that no effort is made |
| 100 | * to efficiently pack objects across page boundaries. | 100 | * to efficiently pack objects across page boundaries. |
| 101 | */ | 101 | */ |
| 102 | struct flex_array *flex_array_alloc(int element_size, int total, gfp_t flags) | 102 | struct flex_array *flex_array_alloc(int element_size, unsigned int total, |
| 103 | gfp_t flags) | ||
| 103 | { | 104 | { |
| 104 | struct flex_array *ret; | 105 | struct flex_array *ret; |
| 105 | int max_size = nr_base_part_ptrs() * __elements_per_part(element_size); | 106 | int max_size = nr_base_part_ptrs() * __elements_per_part(element_size); |
| @@ -115,16 +116,14 @@ struct flex_array *flex_array_alloc(int element_size, int total, gfp_t flags) | |||
| 115 | return ret; | 116 | return ret; |
| 116 | } | 117 | } |
| 117 | 118 | ||
| 118 | static int fa_element_to_part_nr(struct flex_array *fa, int element_nr) | 119 | static int fa_element_to_part_nr(struct flex_array *fa, |
| 120 | unsigned int element_nr) | ||
| 119 | { | 121 | { |
| 120 | return element_nr / __elements_per_part(fa->element_size); | 122 | return element_nr / __elements_per_part(fa->element_size); |
| 121 | } | 123 | } |
| 122 | 124 | ||
| 123 | /** | 125 | /** |
| 124 | * flex_array_free_parts - just free the second-level pages | 126 | * flex_array_free_parts - just free the second-level pages |
| 125 | * @src: address of data to copy into the array | ||
| 126 | * @element_nr: index of the position in which to insert | ||
| 127 | * the new element. | ||
| 128 | * | 127 | * |
| 129 | * This is to be used in cases where the base 'struct flex_array' | 128 | * This is to be used in cases where the base 'struct flex_array' |
| 130 | * has been statically allocated and should not be free. | 129 | * has been statically allocated and should not be free. |
| @@ -146,14 +145,12 @@ void flex_array_free(struct flex_array *fa) | |||
| 146 | kfree(fa); | 145 | kfree(fa); |
| 147 | } | 146 | } |
| 148 | 147 | ||
| 149 | static int fa_index_inside_part(struct flex_array *fa, int element_nr) | 148 | static unsigned int index_inside_part(struct flex_array *fa, |
| 149 | unsigned int element_nr) | ||
| 150 | { | 150 | { |
| 151 | return element_nr % __elements_per_part(fa->element_size); | 151 | unsigned int part_offset; |
| 152 | } | ||
| 153 | 152 | ||
| 154 | static int index_inside_part(struct flex_array *fa, int element_nr) | 153 | part_offset = element_nr % __elements_per_part(fa->element_size); |
| 155 | { | ||
| 156 | int part_offset = fa_index_inside_part(fa, element_nr); | ||
| 157 | return part_offset * fa->element_size; | 154 | return part_offset * fa->element_size; |
| 158 | } | 155 | } |
| 159 | 156 | ||
| @@ -188,7 +185,8 @@ __fa_get_part(struct flex_array *fa, int part_nr, gfp_t flags) | |||
| 188 | * | 185 | * |
| 189 | * Locking must be provided by the caller. | 186 | * Locking must be provided by the caller. |
| 190 | */ | 187 | */ |
| 191 | int flex_array_put(struct flex_array *fa, int element_nr, void *src, gfp_t flags) | 188 | int flex_array_put(struct flex_array *fa, unsigned int element_nr, void *src, |
| 189 | gfp_t flags) | ||
| 192 | { | 190 | { |
| 193 | int part_nr = fa_element_to_part_nr(fa, element_nr); | 191 | int part_nr = fa_element_to_part_nr(fa, element_nr); |
| 194 | struct flex_array_part *part; | 192 | struct flex_array_part *part; |
| @@ -198,10 +196,11 @@ int flex_array_put(struct flex_array *fa, int element_nr, void *src, gfp_t flags | |||
| 198 | return -ENOSPC; | 196 | return -ENOSPC; |
| 199 | if (elements_fit_in_base(fa)) | 197 | if (elements_fit_in_base(fa)) |
| 200 | part = (struct flex_array_part *)&fa->parts[0]; | 198 | part = (struct flex_array_part *)&fa->parts[0]; |
| 201 | else | 199 | else { |
| 202 | part = __fa_get_part(fa, part_nr, flags); | 200 | part = __fa_get_part(fa, part_nr, flags); |
| 203 | if (!part) | 201 | if (!part) |
| 204 | return -ENOMEM; | 202 | return -ENOMEM; |
| 203 | } | ||
| 205 | dst = &part->elements[index_inside_part(fa, element_nr)]; | 204 | dst = &part->elements[index_inside_part(fa, element_nr)]; |
| 206 | memcpy(dst, src, fa->element_size); | 205 | memcpy(dst, src, fa->element_size); |
| 207 | return 0; | 206 | return 0; |
| @@ -219,7 +218,8 @@ int flex_array_put(struct flex_array *fa, int element_nr, void *src, gfp_t flags | |||
| 219 | * | 218 | * |
| 220 | * Locking must be provided by the caller. | 219 | * Locking must be provided by the caller. |
| 221 | */ | 220 | */ |
| 222 | int flex_array_prealloc(struct flex_array *fa, int start, int end, gfp_t flags) | 221 | int flex_array_prealloc(struct flex_array *fa, unsigned int start, |
| 222 | unsigned int end, gfp_t flags) | ||
| 223 | { | 223 | { |
| 224 | int start_part; | 224 | int start_part; |
| 225 | int end_part; | 225 | int end_part; |
| @@ -250,18 +250,19 @@ int flex_array_prealloc(struct flex_array *fa, int start, int end, gfp_t flags) | |||
| 250 | * | 250 | * |
| 251 | * Locking must be provided by the caller. | 251 | * Locking must be provided by the caller. |
| 252 | */ | 252 | */ |
| 253 | void *flex_array_get(struct flex_array *fa, int element_nr) | 253 | void *flex_array_get(struct flex_array *fa, unsigned int element_nr) |
| 254 | { | 254 | { |
| 255 | int part_nr = fa_element_to_part_nr(fa, element_nr); | 255 | int part_nr = fa_element_to_part_nr(fa, element_nr); |
| 256 | struct flex_array_part *part; | 256 | struct flex_array_part *part; |
| 257 | 257 | ||
| 258 | if (element_nr >= fa->total_nr_elements) | 258 | if (element_nr >= fa->total_nr_elements) |
| 259 | return NULL; | 259 | return NULL; |
| 260 | if (!fa->parts[part_nr]) | ||
| 261 | return NULL; | ||
| 262 | if (elements_fit_in_base(fa)) | 260 | if (elements_fit_in_base(fa)) |
| 263 | part = (struct flex_array_part *)&fa->parts[0]; | 261 | part = (struct flex_array_part *)&fa->parts[0]; |
| 264 | else | 262 | else { |
| 265 | part = fa->parts[part_nr]; | 263 | part = fa->parts[part_nr]; |
| 264 | if (!part) | ||
| 265 | return NULL; | ||
| 266 | } | ||
| 266 | return &part->elements[index_inside_part(fa, element_nr)]; | 267 | return &part->elements[index_inside_part(fa, element_nr)]; |
| 267 | } | 268 | } |
| @@ -358,6 +358,7 @@ static int page_referenced_one(struct page *page, | |||
| 358 | */ | 358 | */ |
| 359 | if (vma->vm_flags & VM_LOCKED) { | 359 | if (vma->vm_flags & VM_LOCKED) { |
| 360 | *mapcount = 1; /* break early from loop */ | 360 | *mapcount = 1; /* break early from loop */ |
| 361 | *vm_flags |= VM_LOCKED; | ||
| 361 | goto out_unmap; | 362 | goto out_unmap; |
| 362 | } | 363 | } |
| 363 | 364 | ||
diff --git a/mm/vmscan.c b/mm/vmscan.c index dea7abd31098..94e86dd6954c 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
| @@ -630,9 +630,14 @@ static unsigned long shrink_page_list(struct list_head *page_list, | |||
| 630 | 630 | ||
| 631 | referenced = page_referenced(page, 1, | 631 | referenced = page_referenced(page, 1, |
| 632 | sc->mem_cgroup, &vm_flags); | 632 | sc->mem_cgroup, &vm_flags); |
| 633 | /* In active use or really unfreeable? Activate it. */ | 633 | /* |
| 634 | * In active use or really unfreeable? Activate it. | ||
| 635 | * If page which have PG_mlocked lost isoltation race, | ||
| 636 | * try_to_unmap moves it to unevictable list | ||
| 637 | */ | ||
| 634 | if (sc->order <= PAGE_ALLOC_COSTLY_ORDER && | 638 | if (sc->order <= PAGE_ALLOC_COSTLY_ORDER && |
| 635 | referenced && page_mapping_inuse(page)) | 639 | referenced && page_mapping_inuse(page) |
| 640 | && !(vm_flags & VM_LOCKED)) | ||
| 636 | goto activate_locked; | 641 | goto activate_locked; |
| 637 | 642 | ||
| 638 | /* | 643 | /* |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index df30feb2fc72..1b76eb11deb4 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
| @@ -319,6 +319,11 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) | |||
| 319 | 319 | ||
| 320 | udelay(USEC_PER_POLL); | 320 | udelay(USEC_PER_POLL); |
| 321 | } | 321 | } |
| 322 | |||
| 323 | WARN_ONCE(!irqs_disabled(), | ||
| 324 | "netpoll_send_skb(): %s enabled interrupts in poll (%pF)\n", | ||
| 325 | dev->name, ops->ndo_start_xmit); | ||
| 326 | |||
| 322 | local_irq_restore(flags); | 327 | local_irq_restore(flags); |
| 323 | } | 328 | } |
| 324 | 329 | ||
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index caa0278d30a9..45f9a2a42d56 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
| @@ -306,8 +306,10 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
| 306 | v4addr != htonl(INADDR_ANY) && | 306 | v4addr != htonl(INADDR_ANY) && |
| 307 | chk_addr_ret != RTN_LOCAL && | 307 | chk_addr_ret != RTN_LOCAL && |
| 308 | chk_addr_ret != RTN_MULTICAST && | 308 | chk_addr_ret != RTN_MULTICAST && |
| 309 | chk_addr_ret != RTN_BROADCAST) | 309 | chk_addr_ret != RTN_BROADCAST) { |
| 310 | err = -EADDRNOTAVAIL; | ||
| 310 | goto out; | 311 | goto out; |
| 312 | } | ||
| 311 | } else { | 313 | } else { |
| 312 | if (addr_type != IPV6_ADDR_ANY) { | 314 | if (addr_type != IPV6_ADDR_ANY) { |
| 313 | struct net_device *dev = NULL; | 315 | struct net_device *dev = NULL; |
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 9208cf5f2bd5..c45eee1c0e8d 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c | |||
| @@ -914,6 +914,7 @@ static int llc_ui_getname(struct socket *sock, struct sockaddr *uaddr, | |||
| 914 | struct llc_sock *llc = llc_sk(sk); | 914 | struct llc_sock *llc = llc_sk(sk); |
| 915 | int rc = 0; | 915 | int rc = 0; |
| 916 | 916 | ||
| 917 | memset(&sllc, 0, sizeof(sllc)); | ||
| 917 | lock_sock(sk); | 918 | lock_sock(sk); |
| 918 | if (sock_flag(sk, SOCK_ZAPPED)) | 919 | if (sock_flag(sk, SOCK_ZAPPED)) |
| 919 | goto out; | 920 | goto out; |
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index ce267565e180..659a42d529e3 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
| @@ -67,6 +67,8 @@ static DECLARE_WORK(todo_work, key_todo); | |||
| 67 | * | 67 | * |
| 68 | * @key: key to add to do item for | 68 | * @key: key to add to do item for |
| 69 | * @flag: todo flag(s) | 69 | * @flag: todo flag(s) |
| 70 | * | ||
| 71 | * Must be called with IRQs or softirqs disabled. | ||
| 70 | */ | 72 | */ |
| 71 | static void add_todo(struct ieee80211_key *key, u32 flag) | 73 | static void add_todo(struct ieee80211_key *key, u32 flag) |
| 72 | { | 74 | { |
| @@ -140,9 +142,9 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key) | |||
| 140 | ret = drv_set_key(key->local, SET_KEY, &sdata->vif, sta, &key->conf); | 142 | ret = drv_set_key(key->local, SET_KEY, &sdata->vif, sta, &key->conf); |
| 141 | 143 | ||
| 142 | if (!ret) { | 144 | if (!ret) { |
| 143 | spin_lock(&todo_lock); | 145 | spin_lock_bh(&todo_lock); |
| 144 | key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE; | 146 | key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE; |
| 145 | spin_unlock(&todo_lock); | 147 | spin_unlock_bh(&todo_lock); |
| 146 | } | 148 | } |
| 147 | 149 | ||
| 148 | if (ret && ret != -ENOSPC && ret != -EOPNOTSUPP) | 150 | if (ret && ret != -ENOSPC && ret != -EOPNOTSUPP) |
| @@ -164,12 +166,12 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key) | |||
| 164 | if (!key || !key->local->ops->set_key) | 166 | if (!key || !key->local->ops->set_key) |
| 165 | return; | 167 | return; |
| 166 | 168 | ||
| 167 | spin_lock(&todo_lock); | 169 | spin_lock_bh(&todo_lock); |
| 168 | if (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)) { | 170 | if (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)) { |
| 169 | spin_unlock(&todo_lock); | 171 | spin_unlock_bh(&todo_lock); |
| 170 | return; | 172 | return; |
| 171 | } | 173 | } |
| 172 | spin_unlock(&todo_lock); | 174 | spin_unlock_bh(&todo_lock); |
| 173 | 175 | ||
| 174 | sta = get_sta_for_key(key); | 176 | sta = get_sta_for_key(key); |
| 175 | sdata = key->sdata; | 177 | sdata = key->sdata; |
| @@ -188,9 +190,9 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key) | |||
| 188 | wiphy_name(key->local->hw.wiphy), | 190 | wiphy_name(key->local->hw.wiphy), |
| 189 | key->conf.keyidx, sta ? sta->addr : bcast_addr, ret); | 191 | key->conf.keyidx, sta ? sta->addr : bcast_addr, ret); |
| 190 | 192 | ||
| 191 | spin_lock(&todo_lock); | 193 | spin_lock_bh(&todo_lock); |
| 192 | key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; | 194 | key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; |
| 193 | spin_unlock(&todo_lock); | 195 | spin_unlock_bh(&todo_lock); |
| 194 | } | 196 | } |
| 195 | 197 | ||
| 196 | static void __ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata, | 198 | static void __ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata, |
| @@ -437,14 +439,14 @@ void ieee80211_key_link(struct ieee80211_key *key, | |||
| 437 | 439 | ||
| 438 | __ieee80211_key_replace(sdata, sta, old_key, key); | 440 | __ieee80211_key_replace(sdata, sta, old_key, key); |
| 439 | 441 | ||
| 440 | spin_unlock_irqrestore(&sdata->local->key_lock, flags); | ||
| 441 | |||
| 442 | /* free old key later */ | 442 | /* free old key later */ |
| 443 | add_todo(old_key, KEY_FLAG_TODO_DELETE); | 443 | add_todo(old_key, KEY_FLAG_TODO_DELETE); |
| 444 | 444 | ||
| 445 | add_todo(key, KEY_FLAG_TODO_ADD_DEBUGFS); | 445 | add_todo(key, KEY_FLAG_TODO_ADD_DEBUGFS); |
| 446 | if (netif_running(sdata->dev)) | 446 | if (netif_running(sdata->dev)) |
| 447 | add_todo(key, KEY_FLAG_TODO_HWACCEL_ADD); | 447 | add_todo(key, KEY_FLAG_TODO_HWACCEL_ADD); |
| 448 | |||
| 449 | spin_unlock_irqrestore(&sdata->local->key_lock, flags); | ||
| 448 | } | 450 | } |
| 449 | 451 | ||
| 450 | static void __ieee80211_key_free(struct ieee80211_key *key) | 452 | static void __ieee80211_key_free(struct ieee80211_key *key) |
| @@ -547,7 +549,7 @@ static void __ieee80211_key_todo(void) | |||
| 547 | */ | 549 | */ |
| 548 | synchronize_rcu(); | 550 | synchronize_rcu(); |
| 549 | 551 | ||
| 550 | spin_lock(&todo_lock); | 552 | spin_lock_bh(&todo_lock); |
| 551 | while (!list_empty(&todo_list)) { | 553 | while (!list_empty(&todo_list)) { |
| 552 | key = list_first_entry(&todo_list, struct ieee80211_key, todo); | 554 | key = list_first_entry(&todo_list, struct ieee80211_key, todo); |
| 553 | list_del_init(&key->todo); | 555 | list_del_init(&key->todo); |
| @@ -558,7 +560,7 @@ static void __ieee80211_key_todo(void) | |||
| 558 | KEY_FLAG_TODO_HWACCEL_REMOVE | | 560 | KEY_FLAG_TODO_HWACCEL_REMOVE | |
| 559 | KEY_FLAG_TODO_DELETE); | 561 | KEY_FLAG_TODO_DELETE); |
| 560 | key->flags &= ~todoflags; | 562 | key->flags &= ~todoflags; |
| 561 | spin_unlock(&todo_lock); | 563 | spin_unlock_bh(&todo_lock); |
| 562 | 564 | ||
| 563 | work_done = false; | 565 | work_done = false; |
| 564 | 566 | ||
| @@ -591,9 +593,9 @@ static void __ieee80211_key_todo(void) | |||
| 591 | 593 | ||
| 592 | WARN_ON(!work_done); | 594 | WARN_ON(!work_done); |
| 593 | 595 | ||
| 594 | spin_lock(&todo_lock); | 596 | spin_lock_bh(&todo_lock); |
| 595 | } | 597 | } |
| 596 | spin_unlock(&todo_lock); | 598 | spin_unlock_bh(&todo_lock); |
| 597 | } | 599 | } |
| 598 | 600 | ||
| 599 | void ieee80211_key_todo(void) | 601 | void ieee80211_key_todo(void) |
diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c index 98fc190e8f0e..390b7d09fe51 100644 --- a/net/netfilter/xt_quota.c +++ b/net/netfilter/xt_quota.c | |||
| @@ -52,7 +52,7 @@ static bool quota_mt_check(const struct xt_mtchk_param *par) | |||
| 52 | 52 | ||
| 53 | q->master = kmalloc(sizeof(*q->master), GFP_KERNEL); | 53 | q->master = kmalloc(sizeof(*q->master), GFP_KERNEL); |
| 54 | if (q->master == NULL) | 54 | if (q->master == NULL) |
| 55 | return -ENOMEM; | 55 | return false; |
| 56 | 56 | ||
| 57 | q->master->quota = q->quota; | 57 | q->master->quota = q->quota; |
| 58 | return true; | 58 | return true; |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 24d17ce9c294..92e6f3a52c13 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
| @@ -458,7 +458,7 @@ EXPORT_SYMBOL(qdisc_warn_nonwc); | |||
| 458 | static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer) | 458 | static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer) |
| 459 | { | 459 | { |
| 460 | struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog, | 460 | struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog, |
| 461 | timer); | 461 | timer.timer); |
| 462 | 462 | ||
| 463 | wd->qdisc->flags &= ~TCQ_F_THROTTLED; | 463 | wd->qdisc->flags &= ~TCQ_F_THROTTLED; |
| 464 | __netif_schedule(qdisc_root(wd->qdisc)); | 464 | __netif_schedule(qdisc_root(wd->qdisc)); |
| @@ -468,8 +468,8 @@ static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer) | |||
| 468 | 468 | ||
| 469 | void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc) | 469 | void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc) |
| 470 | { | 470 | { |
| 471 | hrtimer_init(&wd->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); | 471 | tasklet_hrtimer_init(&wd->timer, qdisc_watchdog, |
| 472 | wd->timer.function = qdisc_watchdog; | 472 | CLOCK_MONOTONIC, HRTIMER_MODE_ABS); |
| 473 | wd->qdisc = qdisc; | 473 | wd->qdisc = qdisc; |
| 474 | } | 474 | } |
| 475 | EXPORT_SYMBOL(qdisc_watchdog_init); | 475 | EXPORT_SYMBOL(qdisc_watchdog_init); |
| @@ -485,13 +485,13 @@ void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, psched_time_t expires) | |||
| 485 | wd->qdisc->flags |= TCQ_F_THROTTLED; | 485 | wd->qdisc->flags |= TCQ_F_THROTTLED; |
| 486 | time = ktime_set(0, 0); | 486 | time = ktime_set(0, 0); |
| 487 | time = ktime_add_ns(time, PSCHED_TICKS2NS(expires)); | 487 | time = ktime_add_ns(time, PSCHED_TICKS2NS(expires)); |
| 488 | hrtimer_start(&wd->timer, time, HRTIMER_MODE_ABS); | 488 | tasklet_hrtimer_start(&wd->timer, time, HRTIMER_MODE_ABS); |
| 489 | } | 489 | } |
| 490 | EXPORT_SYMBOL(qdisc_watchdog_schedule); | 490 | EXPORT_SYMBOL(qdisc_watchdog_schedule); |
| 491 | 491 | ||
| 492 | void qdisc_watchdog_cancel(struct qdisc_watchdog *wd) | 492 | void qdisc_watchdog_cancel(struct qdisc_watchdog *wd) |
| 493 | { | 493 | { |
| 494 | hrtimer_cancel(&wd->timer); | 494 | tasklet_hrtimer_cancel(&wd->timer); |
| 495 | wd->qdisc->flags &= ~TCQ_F_THROTTLED; | 495 | wd->qdisc->flags &= ~TCQ_F_THROTTLED; |
| 496 | } | 496 | } |
| 497 | EXPORT_SYMBOL(qdisc_watchdog_cancel); | 497 | EXPORT_SYMBOL(qdisc_watchdog_cancel); |
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index d5798e17a832..149b0405c5ec 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
| @@ -163,7 +163,7 @@ struct cbq_sched_data | |||
| 163 | psched_time_t now_rt; /* Cached real time */ | 163 | psched_time_t now_rt; /* Cached real time */ |
| 164 | unsigned pmask; | 164 | unsigned pmask; |
| 165 | 165 | ||
| 166 | struct hrtimer delay_timer; | 166 | struct tasklet_hrtimer delay_timer; |
| 167 | struct qdisc_watchdog watchdog; /* Watchdog timer, | 167 | struct qdisc_watchdog watchdog; /* Watchdog timer, |
| 168 | started when CBQ has | 168 | started when CBQ has |
| 169 | backlog, but cannot | 169 | backlog, but cannot |
| @@ -503,6 +503,8 @@ static void cbq_ovl_delay(struct cbq_class *cl) | |||
| 503 | cl->undertime = q->now + delay; | 503 | cl->undertime = q->now + delay; |
| 504 | 504 | ||
| 505 | if (delay > 0) { | 505 | if (delay > 0) { |
| 506 | struct hrtimer *ht; | ||
| 507 | |||
| 506 | sched += delay + cl->penalty; | 508 | sched += delay + cl->penalty; |
| 507 | cl->penalized = sched; | 509 | cl->penalized = sched; |
| 508 | cl->cpriority = TC_CBQ_MAXPRIO; | 510 | cl->cpriority = TC_CBQ_MAXPRIO; |
| @@ -510,12 +512,12 @@ static void cbq_ovl_delay(struct cbq_class *cl) | |||
| 510 | 512 | ||
| 511 | expires = ktime_set(0, 0); | 513 | expires = ktime_set(0, 0); |
| 512 | expires = ktime_add_ns(expires, PSCHED_TICKS2NS(sched)); | 514 | expires = ktime_add_ns(expires, PSCHED_TICKS2NS(sched)); |
| 513 | if (hrtimer_try_to_cancel(&q->delay_timer) && | 515 | ht = &q->delay_timer.timer; |
| 514 | ktime_to_ns(ktime_sub( | 516 | if (hrtimer_try_to_cancel(ht) && |
| 515 | hrtimer_get_expires(&q->delay_timer), | 517 | ktime_to_ns(ktime_sub(hrtimer_get_expires(ht), |
| 516 | expires)) > 0) | 518 | expires)) > 0) |
| 517 | hrtimer_set_expires(&q->delay_timer, expires); | 519 | hrtimer_set_expires(ht, expires); |
| 518 | hrtimer_restart(&q->delay_timer); | 520 | hrtimer_restart(ht); |
| 519 | cl->delayed = 1; | 521 | cl->delayed = 1; |
| 520 | cl->xstats.overactions++; | 522 | cl->xstats.overactions++; |
| 521 | return; | 523 | return; |
| @@ -591,7 +593,7 @@ static psched_tdiff_t cbq_undelay_prio(struct cbq_sched_data *q, int prio, | |||
| 591 | static enum hrtimer_restart cbq_undelay(struct hrtimer *timer) | 593 | static enum hrtimer_restart cbq_undelay(struct hrtimer *timer) |
| 592 | { | 594 | { |
| 593 | struct cbq_sched_data *q = container_of(timer, struct cbq_sched_data, | 595 | struct cbq_sched_data *q = container_of(timer, struct cbq_sched_data, |
| 594 | delay_timer); | 596 | delay_timer.timer); |
| 595 | struct Qdisc *sch = q->watchdog.qdisc; | 597 | struct Qdisc *sch = q->watchdog.qdisc; |
| 596 | psched_time_t now; | 598 | psched_time_t now; |
| 597 | psched_tdiff_t delay = 0; | 599 | psched_tdiff_t delay = 0; |
| @@ -621,7 +623,7 @@ static enum hrtimer_restart cbq_undelay(struct hrtimer *timer) | |||
| 621 | 623 | ||
| 622 | time = ktime_set(0, 0); | 624 | time = ktime_set(0, 0); |
| 623 | time = ktime_add_ns(time, PSCHED_TICKS2NS(now + delay)); | 625 | time = ktime_add_ns(time, PSCHED_TICKS2NS(now + delay)); |
| 624 | hrtimer_start(&q->delay_timer, time, HRTIMER_MODE_ABS); | 626 | tasklet_hrtimer_start(&q->delay_timer, time, HRTIMER_MODE_ABS); |
| 625 | } | 627 | } |
| 626 | 628 | ||
| 627 | sch->flags &= ~TCQ_F_THROTTLED; | 629 | sch->flags &= ~TCQ_F_THROTTLED; |
| @@ -1214,7 +1216,7 @@ cbq_reset(struct Qdisc* sch) | |||
| 1214 | q->tx_class = NULL; | 1216 | q->tx_class = NULL; |
| 1215 | q->tx_borrowed = NULL; | 1217 | q->tx_borrowed = NULL; |
| 1216 | qdisc_watchdog_cancel(&q->watchdog); | 1218 | qdisc_watchdog_cancel(&q->watchdog); |
| 1217 | hrtimer_cancel(&q->delay_timer); | 1219 | tasklet_hrtimer_cancel(&q->delay_timer); |
| 1218 | q->toplevel = TC_CBQ_MAXLEVEL; | 1220 | q->toplevel = TC_CBQ_MAXLEVEL; |
| 1219 | q->now = psched_get_time(); | 1221 | q->now = psched_get_time(); |
| 1220 | q->now_rt = q->now; | 1222 | q->now_rt = q->now; |
| @@ -1397,7 +1399,8 @@ static int cbq_init(struct Qdisc *sch, struct nlattr *opt) | |||
| 1397 | q->link.minidle = -0x7FFFFFFF; | 1399 | q->link.minidle = -0x7FFFFFFF; |
| 1398 | 1400 | ||
| 1399 | qdisc_watchdog_init(&q->watchdog, sch); | 1401 | qdisc_watchdog_init(&q->watchdog, sch); |
| 1400 | hrtimer_init(&q->delay_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); | 1402 | tasklet_hrtimer_init(&q->delay_timer, cbq_undelay, |
| 1403 | CLOCK_MONOTONIC, HRTIMER_MODE_ABS); | ||
| 1401 | q->delay_timer.function = cbq_undelay; | 1404 | q->delay_timer.function = cbq_undelay; |
| 1402 | q->toplevel = TC_CBQ_MAXLEVEL; | 1405 | q->toplevel = TC_CBQ_MAXLEVEL; |
| 1403 | q->now = psched_get_time(); | 1406 | q->now = psched_get_time(); |
diff --git a/security/integrity/ima/ima_crypto.c b/security/integrity/ima/ima_crypto.c index 63003a63aaee..46642a19bc78 100644 --- a/security/integrity/ima/ima_crypto.c +++ b/security/integrity/ima/ima_crypto.c | |||
| @@ -45,9 +45,9 @@ int ima_calc_hash(struct file *file, char *digest) | |||
| 45 | { | 45 | { |
| 46 | struct hash_desc desc; | 46 | struct hash_desc desc; |
| 47 | struct scatterlist sg[1]; | 47 | struct scatterlist sg[1]; |
| 48 | loff_t i_size; | 48 | loff_t i_size, offset = 0; |
| 49 | char *rbuf; | 49 | char *rbuf; |
| 50 | int rc, offset = 0; | 50 | int rc; |
| 51 | 51 | ||
| 52 | rc = init_desc(&desc); | 52 | rc = init_desc(&desc); |
| 53 | if (rc != 0) | 53 | if (rc != 0) |
| @@ -67,6 +67,8 @@ int ima_calc_hash(struct file *file, char *digest) | |||
| 67 | rc = rbuf_len; | 67 | rc = rbuf_len; |
| 68 | break; | 68 | break; |
| 69 | } | 69 | } |
| 70 | if (rbuf_len == 0) | ||
| 71 | break; | ||
| 70 | offset += rbuf_len; | 72 | offset += rbuf_len; |
| 71 | sg_init_one(sg, rbuf, rbuf_len); | 73 | sg_init_one(sg, rbuf, rbuf_len); |
| 72 | 74 | ||
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 101c512564ec..4732f5e5d127 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c | |||
| @@ -262,6 +262,8 @@ void ima_counts_put(struct path *path, int mask) | |||
| 262 | else if (mask & (MAY_READ | MAY_EXEC)) | 262 | else if (mask & (MAY_READ | MAY_EXEC)) |
| 263 | iint->readcount--; | 263 | iint->readcount--; |
| 264 | mutex_unlock(&iint->mutex); | 264 | mutex_unlock(&iint->mutex); |
| 265 | |||
| 266 | kref_put(&iint->refcount, iint_free); | ||
| 265 | } | 267 | } |
| 266 | 268 | ||
| 267 | /* | 269 | /* |
| @@ -291,6 +293,8 @@ void ima_counts_get(struct file *file) | |||
| 291 | if (file->f_mode & FMODE_WRITE) | 293 | if (file->f_mode & FMODE_WRITE) |
| 292 | iint->writecount++; | 294 | iint->writecount++; |
| 293 | mutex_unlock(&iint->mutex); | 295 | mutex_unlock(&iint->mutex); |
| 296 | |||
| 297 | kref_put(&iint->refcount, iint_free); | ||
| 294 | } | 298 | } |
| 295 | EXPORT_SYMBOL_GPL(ima_counts_get); | 299 | EXPORT_SYMBOL_GPL(ima_counts_get); |
| 296 | 300 | ||
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 72cfd47af6b8..9db60d831bb2 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
| @@ -943,47 +943,24 @@ static int snd_interval_ratden(struct snd_interval *i, | |||
| 943 | int snd_interval_list(struct snd_interval *i, unsigned int count, unsigned int *list, unsigned int mask) | 943 | int snd_interval_list(struct snd_interval *i, unsigned int count, unsigned int *list, unsigned int mask) |
| 944 | { | 944 | { |
| 945 | unsigned int k; | 945 | unsigned int k; |
| 946 | int changed = 0; | 946 | struct snd_interval list_range; |
| 947 | 947 | ||
| 948 | if (!count) { | 948 | if (!count) { |
| 949 | i->empty = 1; | 949 | i->empty = 1; |
| 950 | return -EINVAL; | 950 | return -EINVAL; |
| 951 | } | 951 | } |
| 952 | snd_interval_any(&list_range); | ||
| 953 | list_range.min = UINT_MAX; | ||
| 954 | list_range.max = 0; | ||
| 952 | for (k = 0; k < count; k++) { | 955 | for (k = 0; k < count; k++) { |
| 953 | if (mask && !(mask & (1 << k))) | 956 | if (mask && !(mask & (1 << k))) |
| 954 | continue; | 957 | continue; |
| 955 | if (i->min == list[k] && !i->openmin) | 958 | if (!snd_interval_test(i, list[k])) |
| 956 | goto _l1; | ||
| 957 | if (i->min < list[k]) { | ||
| 958 | i->min = list[k]; | ||
| 959 | i->openmin = 0; | ||
| 960 | changed = 1; | ||
| 961 | goto _l1; | ||
| 962 | } | ||
| 963 | } | ||
| 964 | i->empty = 1; | ||
| 965 | return -EINVAL; | ||
| 966 | _l1: | ||
| 967 | for (k = count; k-- > 0;) { | ||
| 968 | if (mask && !(mask & (1 << k))) | ||
| 969 | continue; | 959 | continue; |
| 970 | if (i->max == list[k] && !i->openmax) | 960 | list_range.min = min(list_range.min, list[k]); |
| 971 | goto _l2; | 961 | list_range.max = max(list_range.max, list[k]); |
| 972 | if (i->max > list[k]) { | ||
| 973 | i->max = list[k]; | ||
| 974 | i->openmax = 0; | ||
| 975 | changed = 1; | ||
| 976 | goto _l2; | ||
| 977 | } | ||
| 978 | } | 962 | } |
| 979 | i->empty = 1; | 963 | return snd_interval_refine(i, &list_range); |
| 980 | return -EINVAL; | ||
| 981 | _l2: | ||
| 982 | if (snd_interval_checkempty(i)) { | ||
| 983 | i->empty = 1; | ||
| 984 | return -EINVAL; | ||
| 985 | } | ||
| 986 | return changed; | ||
| 987 | } | 964 | } |
| 988 | 965 | ||
| 989 | EXPORT_SYMBOL(snd_interval_list); | 966 | EXPORT_SYMBOL(snd_interval_list); |
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index c551006e2920..76d76c08339b 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c | |||
| @@ -310,12 +310,16 @@ static int snd_ali_codec_ready(struct snd_ali *codec, | |||
| 310 | unsigned int res; | 310 | unsigned int res; |
| 311 | 311 | ||
| 312 | end_time = jiffies + msecs_to_jiffies(250); | 312 | end_time = jiffies + msecs_to_jiffies(250); |
| 313 | do { | 313 | |
| 314 | for (;;) { | ||
| 314 | res = snd_ali_5451_peek(codec,port); | 315 | res = snd_ali_5451_peek(codec,port); |
| 315 | if (!(res & 0x8000)) | 316 | if (!(res & 0x8000)) |
| 316 | return 0; | 317 | return 0; |
| 318 | if (!time_after_eq(end_time, jiffies)) | ||
| 319 | break; | ||
| 317 | schedule_timeout_uninterruptible(1); | 320 | schedule_timeout_uninterruptible(1); |
| 318 | } while (time_after_eq(end_time, jiffies)); | 321 | } |
| 322 | |||
| 319 | snd_ali_5451_poke(codec, port, res & ~0x8000); | 323 | snd_ali_5451_poke(codec, port, res & ~0x8000); |
| 320 | snd_printdd("ali_codec_ready: codec is not ready.\n "); | 324 | snd_printdd("ali_codec_ready: codec is not ready.\n "); |
| 321 | return -EIO; | 325 | return -EIO; |
| @@ -327,15 +331,17 @@ static int snd_ali_stimer_ready(struct snd_ali *codec) | |||
| 327 | unsigned long dwChk1,dwChk2; | 331 | unsigned long dwChk1,dwChk2; |
| 328 | 332 | ||
| 329 | dwChk1 = snd_ali_5451_peek(codec, ALI_STIMER); | 333 | dwChk1 = snd_ali_5451_peek(codec, ALI_STIMER); |
| 330 | dwChk2 = snd_ali_5451_peek(codec, ALI_STIMER); | ||
| 331 | |||
| 332 | end_time = jiffies + msecs_to_jiffies(250); | 334 | end_time = jiffies + msecs_to_jiffies(250); |
| 333 | do { | 335 | |
| 336 | for (;;) { | ||
| 334 | dwChk2 = snd_ali_5451_peek(codec, ALI_STIMER); | 337 | dwChk2 = snd_ali_5451_peek(codec, ALI_STIMER); |
| 335 | if (dwChk2 != dwChk1) | 338 | if (dwChk2 != dwChk1) |
| 336 | return 0; | 339 | return 0; |
| 340 | if (!time_after_eq(end_time, jiffies)) | ||
| 341 | break; | ||
| 337 | schedule_timeout_uninterruptible(1); | 342 | schedule_timeout_uninterruptible(1); |
| 338 | } while (time_after_eq(end_time, jiffies)); | 343 | } |
| 344 | |||
| 339 | snd_printk(KERN_ERR "ali_stimer_read: stimer is not ready.\n"); | 345 | snd_printk(KERN_ERR "ali_stimer_read: stimer is not ready.\n"); |
| 340 | return -EIO; | 346 | return -EIO; |
| 341 | } | 347 | } |
diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c index 6416d3f0c7be..a69e774d0b13 100644 --- a/sound/pci/vx222/vx222_ops.c +++ b/sound/pci/vx222/vx222_ops.c | |||
| @@ -885,10 +885,10 @@ static int vx_input_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem | |||
| 885 | struct vx_core *_chip = snd_kcontrol_chip(kcontrol); | 885 | struct vx_core *_chip = snd_kcontrol_chip(kcontrol); |
| 886 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 886 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
| 887 | if (ucontrol->value.integer.value[0] < 0 || | 887 | if (ucontrol->value.integer.value[0] < 0 || |
| 888 | ucontrol->value.integer.value[0] < MIC_LEVEL_MAX) | 888 | ucontrol->value.integer.value[0] > MIC_LEVEL_MAX) |
| 889 | return -EINVAL; | 889 | return -EINVAL; |
| 890 | if (ucontrol->value.integer.value[1] < 0 || | 890 | if (ucontrol->value.integer.value[1] < 0 || |
| 891 | ucontrol->value.integer.value[1] < MIC_LEVEL_MAX) | 891 | ucontrol->value.integer.value[1] > MIC_LEVEL_MAX) |
| 892 | return -EINVAL; | 892 | return -EINVAL; |
| 893 | mutex_lock(&_chip->mixer_mutex); | 893 | mutex_lock(&_chip->mixer_mutex); |
| 894 | if (chip->input_level[0] != ucontrol->value.integer.value[0] || | 894 | if (chip->input_level[0] != ucontrol->value.integer.value[0] || |
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 343e7b14bf01..5e17de984dc8 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
| @@ -31,6 +31,7 @@ static char *vmlinux = "vmlinux"; | |||
| 31 | static char default_sort_order[] = "comm,symbol"; | 31 | static char default_sort_order[] = "comm,symbol"; |
| 32 | static char *sort_order = default_sort_order; | 32 | static char *sort_order = default_sort_order; |
| 33 | 33 | ||
| 34 | static int force; | ||
| 34 | static int input; | 35 | static int input; |
| 35 | static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV; | 36 | static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV; |
| 36 | 37 | ||
| @@ -1334,6 +1335,11 @@ static int __cmd_annotate(void) | |||
| 1334 | exit(-1); | 1335 | exit(-1); |
| 1335 | } | 1336 | } |
| 1336 | 1337 | ||
| 1338 | if (!force && (stat.st_uid != geteuid())) { | ||
| 1339 | fprintf(stderr, "file: %s not owned by current user\n", input_name); | ||
| 1340 | exit(-1); | ||
| 1341 | } | ||
| 1342 | |||
| 1337 | if (!stat.st_size) { | 1343 | if (!stat.st_size) { |
| 1338 | fprintf(stderr, "zero-sized file, nothing to do!\n"); | 1344 | fprintf(stderr, "zero-sized file, nothing to do!\n"); |
| 1339 | exit(0); | 1345 | exit(0); |
| @@ -1439,6 +1445,7 @@ static const struct option options[] = { | |||
| 1439 | "input file name"), | 1445 | "input file name"), |
| 1440 | OPT_STRING('s', "symbol", &sym_hist_filter, "symbol", | 1446 | OPT_STRING('s', "symbol", &sym_hist_filter, "symbol", |
| 1441 | "symbol to annotate"), | 1447 | "symbol to annotate"), |
| 1448 | OPT_BOOLEAN('f', "force", &force, "don't complain, do it"), | ||
| 1442 | OPT_BOOLEAN('v', "verbose", &verbose, | 1449 | OPT_BOOLEAN('v', "verbose", &verbose, |
| 1443 | "be more verbose (show symbol address, etc)"), | 1450 | "be more verbose (show symbol address, etc)"), |
| 1444 | OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace, | 1451 | OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace, |
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index b53a60fc12de..8b2ec882e6e0 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
| @@ -38,6 +38,7 @@ static char *dso_list_str, *comm_list_str, *sym_list_str, | |||
| 38 | static struct strlist *dso_list, *comm_list, *sym_list; | 38 | static struct strlist *dso_list, *comm_list, *sym_list; |
| 39 | static char *field_sep; | 39 | static char *field_sep; |
| 40 | 40 | ||
| 41 | static int force; | ||
| 41 | static int input; | 42 | static int input; |
| 42 | static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV; | 43 | static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV; |
| 43 | 44 | ||
| @@ -1856,6 +1857,11 @@ static int __cmd_report(void) | |||
| 1856 | exit(-1); | 1857 | exit(-1); |
| 1857 | } | 1858 | } |
| 1858 | 1859 | ||
| 1860 | if (!force && (stat.st_uid != geteuid())) { | ||
| 1861 | fprintf(stderr, "file: %s not owned by current user\n", input_name); | ||
| 1862 | exit(-1); | ||
| 1863 | } | ||
| 1864 | |||
| 1859 | if (!stat.st_size) { | 1865 | if (!stat.st_size) { |
| 1860 | fprintf(stderr, "zero-sized file, nothing to do!\n"); | 1866 | fprintf(stderr, "zero-sized file, nothing to do!\n"); |
| 1861 | exit(0); | 1867 | exit(0); |
| @@ -2064,6 +2070,7 @@ static const struct option options[] = { | |||
| 2064 | OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace, | 2070 | OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace, |
| 2065 | "dump raw trace in ASCII"), | 2071 | "dump raw trace in ASCII"), |
| 2066 | OPT_STRING('k', "vmlinux", &vmlinux, "file", "vmlinux pathname"), | 2072 | OPT_STRING('k', "vmlinux", &vmlinux, "file", "vmlinux pathname"), |
| 2073 | OPT_BOOLEAN('f', "force", &force, "don't complain, do it"), | ||
| 2067 | OPT_BOOLEAN('m', "modules", &modules, | 2074 | OPT_BOOLEAN('m', "modules", &modules, |
| 2068 | "load module symbols - WARNING: use only with -k and LIVE kernel"), | 2075 | "load module symbols - WARNING: use only with -k and LIVE kernel"), |
| 2069 | OPT_BOOLEAN('n', "show-nr-samples", &show_nr_samples, | 2076 | OPT_BOOLEAN('n', "show-nr-samples", &show_nr_samples, |
