diff options
33 files changed, 643 insertions, 220 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 7177c4aa6342..242dd0775343 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -915,6 +915,14 @@ void __init kirkwood_init(void) | |||
915 | kirkwood_uart0_data[0].uartclk = kirkwood_tclk; | 915 | kirkwood_uart0_data[0].uartclk = kirkwood_tclk; |
916 | kirkwood_uart1_data[0].uartclk = kirkwood_tclk; | 916 | kirkwood_uart1_data[0].uartclk = kirkwood_tclk; |
917 | 917 | ||
918 | /* | ||
919 | * Disable propagation of mbus errors to the CPU local bus, | ||
920 | * as this causes mbus errors (which can occur for example | ||
921 | * for PCI aborts) to throw CPU aborts, which we're not set | ||
922 | * up to deal with. | ||
923 | */ | ||
924 | writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG); | ||
925 | |||
918 | kirkwood_setup_cpu_mbus(); | 926 | kirkwood_setup_cpu_mbus(); |
919 | 927 | ||
920 | #ifdef CONFIG_CACHE_FEROCEON_L2 | 928 | #ifdef CONFIG_CACHE_FEROCEON_L2 |
diff --git a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h index 9e80d9232c83..418f5017c50e 100644 --- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h +++ b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h | |||
@@ -13,6 +13,9 @@ | |||
13 | 13 | ||
14 | #include <mach/kirkwood.h> | 14 | #include <mach/kirkwood.h> |
15 | 15 | ||
16 | #define CPU_CONFIG (BRIDGE_VIRT_BASE | 0x0100) | ||
17 | #define CPU_CONFIG_ERROR_PROP 0x00000004 | ||
18 | |||
16 | #define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104) | 19 | #define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104) |
17 | #define CPU_RESET 0x00000002 | 20 | #define CPU_RESET 0x00000002 |
18 | 21 | ||
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index be60d6deee8b..653e25be3dd8 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c | |||
@@ -408,7 +408,7 @@ static struct platform_device keypad_device = { | |||
408 | }; | 408 | }; |
409 | 409 | ||
410 | static struct platform_device rtc_device = { | 410 | static struct platform_device rtc_device = { |
411 | .name = "rtc0", | 411 | .name = "rtc-coh901331", |
412 | .id = -1, | 412 | .id = -1, |
413 | .num_resources = ARRAY_SIZE(rtc_resources), | 413 | .num_resources = ARRAY_SIZE(rtc_resources), |
414 | .resource = rtc_resources, | 414 | .resource = rtc_resources, |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 03bd56a2fb6e..1aad0d9f5074 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config MIPS | 1 | config MIPS |
2 | bool | 2 | bool |
3 | default y | 3 | default y |
4 | select HAVE_GENERIC_DMA_COHERENT | ||
4 | select HAVE_IDE | 5 | select HAVE_IDE |
5 | select HAVE_OPROFILE | 6 | select HAVE_OPROFILE |
6 | select HAVE_ARCH_KGDB | 7 | select HAVE_ARCH_KGDB |
diff --git a/arch/mips/bcm47xx/prom.c b/arch/mips/bcm47xx/prom.c index 079e33d52783..fb284c3b2cff 100644 --- a/arch/mips/bcm47xx/prom.c +++ b/arch/mips/bcm47xx/prom.c | |||
@@ -100,7 +100,7 @@ static __init void prom_init_console(void) | |||
100 | 100 | ||
101 | static __init void prom_init_cmdline(void) | 101 | static __init void prom_init_cmdline(void) |
102 | { | 102 | { |
103 | char buf[CL_SIZE]; | 103 | static char buf[CL_SIZE] __initdata; |
104 | 104 | ||
105 | /* Get the kernel command line from CFE */ | 105 | /* Get the kernel command line from CFE */ |
106 | if (cfe_getenv("LINUX_CMDLINE", buf, CL_SIZE) >= 0) { | 106 | if (cfe_getenv("LINUX_CMDLINE", buf, CL_SIZE) >= 0) { |
diff --git a/arch/mips/configs/rbtx49xx_defconfig b/arch/mips/configs/rbtx49xx_defconfig index c69813b8488c..6c6a19aebe1f 100644 --- a/arch/mips/configs/rbtx49xx_defconfig +++ b/arch/mips/configs/rbtx49xx_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.29-rc7 | 3 | # Linux kernel version: 2.6.32-rc6 |
4 | # Wed Mar 4 23:08:06 2009 | 4 | # Sun Nov 8 22:59:47 2009 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | 7 | ||
@@ -9,16 +9,18 @@ CONFIG_MIPS=y | |||
9 | # Machine selection | 9 | # Machine selection |
10 | # | 10 | # |
11 | # CONFIG_MACH_ALCHEMY is not set | 11 | # CONFIG_MACH_ALCHEMY is not set |
12 | # CONFIG_AR7 is not set | ||
12 | # CONFIG_BASLER_EXCITE is not set | 13 | # CONFIG_BASLER_EXCITE is not set |
13 | # CONFIG_BCM47XX is not set | 14 | # CONFIG_BCM47XX is not set |
15 | # CONFIG_BCM63XX is not set | ||
14 | # CONFIG_MIPS_COBALT is not set | 16 | # CONFIG_MIPS_COBALT is not set |
15 | # CONFIG_MACH_DECSTATION is not set | 17 | # CONFIG_MACH_DECSTATION is not set |
16 | # CONFIG_MACH_JAZZ is not set | 18 | # CONFIG_MACH_JAZZ is not set |
17 | # CONFIG_LASAT is not set | 19 | # CONFIG_LASAT is not set |
18 | # CONFIG_LEMOTE_FULONG is not set | 20 | # CONFIG_MACH_LOONGSON is not set |
19 | # CONFIG_MIPS_MALTA is not set | 21 | # CONFIG_MIPS_MALTA is not set |
20 | # CONFIG_MIPS_SIM is not set | 22 | # CONFIG_MIPS_SIM is not set |
21 | # CONFIG_MACH_EMMA is not set | 23 | # CONFIG_NEC_MARKEINS is not set |
22 | # CONFIG_MACH_VR41XX is not set | 24 | # CONFIG_MACH_VR41XX is not set |
23 | # CONFIG_NXP_STB220 is not set | 25 | # CONFIG_NXP_STB220 is not set |
24 | # CONFIG_NXP_STB225 is not set | 26 | # CONFIG_NXP_STB225 is not set |
@@ -45,6 +47,7 @@ CONFIG_MACH_TX49XX=y | |||
45 | # CONFIG_WR_PPMC is not set | 47 | # CONFIG_WR_PPMC is not set |
46 | # CONFIG_CAVIUM_OCTEON_SIMULATOR is not set | 48 | # CONFIG_CAVIUM_OCTEON_SIMULATOR is not set |
47 | # CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set | 49 | # CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set |
50 | # CONFIG_ALCHEMY_GPIO_INDIRECT is not set | ||
48 | CONFIG_MACH_TXX9=y | 51 | CONFIG_MACH_TXX9=y |
49 | CONFIG_TOSHIBA_RBTX4927=y | 52 | CONFIG_TOSHIBA_RBTX4927=y |
50 | CONFIG_TOSHIBA_RBTX4938=y | 53 | CONFIG_TOSHIBA_RBTX4938=y |
@@ -86,7 +89,6 @@ CONFIG_DMA_NONCOHERENT=y | |||
86 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | 89 | CONFIG_DMA_NEED_PCI_MAP_STATE=y |
87 | CONFIG_EARLY_PRINTK=y | 90 | CONFIG_EARLY_PRINTK=y |
88 | CONFIG_SYS_HAS_EARLY_PRINTK=y | 91 | CONFIG_SYS_HAS_EARLY_PRINTK=y |
89 | # CONFIG_HOTPLUG_CPU is not set | ||
90 | # CONFIG_NO_IOPORT is not set | 92 | # CONFIG_NO_IOPORT is not set |
91 | CONFIG_GENERIC_GPIO=y | 93 | CONFIG_GENERIC_GPIO=y |
92 | CONFIG_CPU_BIG_ENDIAN=y | 94 | CONFIG_CPU_BIG_ENDIAN=y |
@@ -101,7 +103,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5 | |||
101 | # | 103 | # |
102 | # CPU selection | 104 | # CPU selection |
103 | # | 105 | # |
104 | # CONFIG_CPU_LOONGSON2 is not set | 106 | # CONFIG_CPU_LOONGSON2E is not set |
105 | # CONFIG_CPU_MIPS32_R1 is not set | 107 | # CONFIG_CPU_MIPS32_R1 is not set |
106 | # CONFIG_CPU_MIPS32_R2 is not set | 108 | # CONFIG_CPU_MIPS32_R2 is not set |
107 | # CONFIG_CPU_MIPS64_R1 is not set | 109 | # CONFIG_CPU_MIPS64_R1 is not set |
@@ -137,6 +139,7 @@ CONFIG_32BIT=y | |||
137 | CONFIG_PAGE_SIZE_4KB=y | 139 | CONFIG_PAGE_SIZE_4KB=y |
138 | # CONFIG_PAGE_SIZE_8KB is not set | 140 | # CONFIG_PAGE_SIZE_8KB is not set |
139 | # CONFIG_PAGE_SIZE_16KB is not set | 141 | # CONFIG_PAGE_SIZE_16KB is not set |
142 | # CONFIG_PAGE_SIZE_32KB is not set | ||
140 | # CONFIG_PAGE_SIZE_64KB is not set | 143 | # CONFIG_PAGE_SIZE_64KB is not set |
141 | CONFIG_CPU_HAS_PREFETCH=y | 144 | CONFIG_CPU_HAS_PREFETCH=y |
142 | CONFIG_MIPS_MT_DISABLED=y | 145 | CONFIG_MIPS_MT_DISABLED=y |
@@ -154,7 +157,10 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
154 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 157 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
155 | CONFIG_ZONE_DMA_FLAG=0 | 158 | CONFIG_ZONE_DMA_FLAG=0 |
156 | CONFIG_VIRT_TO_BUS=y | 159 | CONFIG_VIRT_TO_BUS=y |
157 | CONFIG_UNEVICTABLE_LRU=y | 160 | CONFIG_HAVE_MLOCK=y |
161 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | ||
162 | # CONFIG_KSM is not set | ||
163 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
158 | CONFIG_TICK_ONESHOT=y | 164 | CONFIG_TICK_ONESHOT=y |
159 | CONFIG_NO_HZ=y | 165 | CONFIG_NO_HZ=y |
160 | CONFIG_HIGH_RES_TIMERS=y | 166 | CONFIG_HIGH_RES_TIMERS=y |
@@ -175,6 +181,7 @@ CONFIG_PREEMPT_NONE=y | |||
175 | CONFIG_LOCKDEP_SUPPORT=y | 181 | CONFIG_LOCKDEP_SUPPORT=y |
176 | CONFIG_STACKTRACE_SUPPORT=y | 182 | CONFIG_STACKTRACE_SUPPORT=y |
177 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 183 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
184 | CONFIG_CONSTRUCTORS=y | ||
178 | 185 | ||
179 | # | 186 | # |
180 | # General setup | 187 | # General setup |
@@ -194,11 +201,12 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
194 | # | 201 | # |
195 | # RCU Subsystem | 202 | # RCU Subsystem |
196 | # | 203 | # |
197 | CONFIG_CLASSIC_RCU=y | 204 | CONFIG_TREE_RCU=y |
198 | # CONFIG_TREE_RCU is not set | 205 | # CONFIG_TREE_PREEMPT_RCU is not set |
199 | # CONFIG_PREEMPT_RCU is not set | 206 | # CONFIG_RCU_TRACE is not set |
207 | CONFIG_RCU_FANOUT=32 | ||
208 | # CONFIG_RCU_FANOUT_EXACT is not set | ||
200 | # CONFIG_TREE_RCU_TRACE is not set | 209 | # CONFIG_TREE_RCU_TRACE is not set |
201 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
202 | CONFIG_IKCONFIG=y | 210 | CONFIG_IKCONFIG=y |
203 | CONFIG_IKCONFIG_PROC=y | 211 | CONFIG_IKCONFIG_PROC=y |
204 | CONFIG_LOG_BUF_SHIFT=14 | 212 | CONFIG_LOG_BUF_SHIFT=14 |
@@ -209,8 +217,12 @@ CONFIG_SYSFS_DEPRECATED_V2=y | |||
209 | # CONFIG_NAMESPACES is not set | 217 | # CONFIG_NAMESPACES is not set |
210 | CONFIG_BLK_DEV_INITRD=y | 218 | CONFIG_BLK_DEV_INITRD=y |
211 | CONFIG_INITRAMFS_SOURCE="" | 219 | CONFIG_INITRAMFS_SOURCE="" |
220 | CONFIG_RD_GZIP=y | ||
221 | # CONFIG_RD_BZIP2 is not set | ||
222 | # CONFIG_RD_LZMA is not set | ||
212 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 223 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
213 | CONFIG_SYSCTL=y | 224 | CONFIG_SYSCTL=y |
225 | CONFIG_ANON_INODES=y | ||
214 | CONFIG_EMBEDDED=y | 226 | CONFIG_EMBEDDED=y |
215 | CONFIG_SYSCTL_SYSCALL=y | 227 | CONFIG_SYSCTL_SYSCALL=y |
216 | CONFIG_KALLSYMS=y | 228 | CONFIG_KALLSYMS=y |
@@ -220,25 +232,35 @@ CONFIG_PRINTK=y | |||
220 | CONFIG_BUG=y | 232 | CONFIG_BUG=y |
221 | CONFIG_ELF_CORE=y | 233 | CONFIG_ELF_CORE=y |
222 | # CONFIG_PCSPKR_PLATFORM is not set | 234 | # CONFIG_PCSPKR_PLATFORM is not set |
223 | CONFIG_COMPAT_BRK=y | ||
224 | CONFIG_BASE_FULL=y | 235 | CONFIG_BASE_FULL=y |
225 | # CONFIG_FUTEX is not set | 236 | CONFIG_FUTEX=y |
226 | CONFIG_ANON_INODES=y | ||
227 | # CONFIG_EPOLL is not set | 237 | # CONFIG_EPOLL is not set |
228 | CONFIG_SIGNALFD=y | 238 | CONFIG_SIGNALFD=y |
229 | CONFIG_TIMERFD=y | 239 | CONFIG_TIMERFD=y |
230 | CONFIG_EVENTFD=y | 240 | CONFIG_EVENTFD=y |
231 | CONFIG_SHMEM=y | 241 | CONFIG_SHMEM=y |
232 | CONFIG_AIO=y | 242 | CONFIG_AIO=y |
243 | |||
244 | # | ||
245 | # Kernel Performance Events And Counters | ||
246 | # | ||
233 | CONFIG_VM_EVENT_COUNTERS=y | 247 | CONFIG_VM_EVENT_COUNTERS=y |
234 | CONFIG_PCI_QUIRKS=y | 248 | CONFIG_PCI_QUIRKS=y |
249 | CONFIG_COMPAT_BRK=y | ||
235 | CONFIG_SLAB=y | 250 | CONFIG_SLAB=y |
236 | # CONFIG_SLUB is not set | 251 | # CONFIG_SLUB is not set |
237 | # CONFIG_SLOB is not set | 252 | # CONFIG_SLOB is not set |
238 | # CONFIG_PROFILING is not set | 253 | # CONFIG_PROFILING is not set |
239 | CONFIG_HAVE_OPROFILE=y | 254 | CONFIG_HAVE_OPROFILE=y |
240 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 255 | |
256 | # | ||
257 | # GCOV-based kernel profiling | ||
258 | # | ||
259 | # CONFIG_GCOV_KERNEL is not set | ||
260 | # CONFIG_SLOW_WORK is not set | ||
261 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
241 | CONFIG_SLABINFO=y | 262 | CONFIG_SLABINFO=y |
263 | CONFIG_RT_MUTEXES=y | ||
242 | CONFIG_BASE_SMALL=0 | 264 | CONFIG_BASE_SMALL=0 |
243 | CONFIG_MODULES=y | 265 | CONFIG_MODULES=y |
244 | # CONFIG_MODULE_FORCE_LOAD is not set | 266 | # CONFIG_MODULE_FORCE_LOAD is not set |
@@ -246,8 +268,8 @@ CONFIG_MODULE_UNLOAD=y | |||
246 | # CONFIG_MODVERSIONS is not set | 268 | # CONFIG_MODVERSIONS is not set |
247 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 269 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
248 | CONFIG_BLOCK=y | 270 | CONFIG_BLOCK=y |
249 | # CONFIG_LBD is not set | 271 | # CONFIG_LBDAF is not set |
250 | # CONFIG_BLK_DEV_IO_TRACE is not set | 272 | # CONFIG_BLK_DEV_BSG is not set |
251 | # CONFIG_BLK_DEV_INTEGRITY is not set | 273 | # CONFIG_BLK_DEV_INTEGRITY is not set |
252 | 274 | ||
253 | # | 275 | # |
@@ -274,6 +296,7 @@ CONFIG_PCI_DOMAINS=y | |||
274 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 296 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
275 | # CONFIG_PCI_LEGACY is not set | 297 | # CONFIG_PCI_LEGACY is not set |
276 | # CONFIG_PCI_STUB is not set | 298 | # CONFIG_PCI_STUB is not set |
299 | # CONFIG_PCI_IOV is not set | ||
277 | CONFIG_MMU=y | 300 | CONFIG_MMU=y |
278 | 301 | ||
279 | # | 302 | # |
@@ -288,6 +311,7 @@ CONFIG_TRAD_SIGNALS=y | |||
288 | # | 311 | # |
289 | # Power management options | 312 | # Power management options |
290 | # | 313 | # |
314 | CONFIG_ARCH_HIBERNATION_POSSIBLE=y | ||
291 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | 315 | CONFIG_ARCH_SUSPEND_POSSIBLE=y |
292 | # CONFIG_PM is not set | 316 | # CONFIG_PM is not set |
293 | CONFIG_NET=y | 317 | CONFIG_NET=y |
@@ -295,7 +319,6 @@ CONFIG_NET=y | |||
295 | # | 319 | # |
296 | # Networking options | 320 | # Networking options |
297 | # | 321 | # |
298 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
299 | CONFIG_PACKET=y | 322 | CONFIG_PACKET=y |
300 | # CONFIG_PACKET_MMAP is not set | 323 | # CONFIG_PACKET_MMAP is not set |
301 | CONFIG_UNIX=y | 324 | CONFIG_UNIX=y |
@@ -311,6 +334,7 @@ CONFIG_IP_PNP=y | |||
311 | # CONFIG_NET_IPIP is not set | 334 | # CONFIG_NET_IPIP is not set |
312 | # CONFIG_NET_IPGRE is not set | 335 | # CONFIG_NET_IPGRE is not set |
313 | # CONFIG_IP_MROUTE is not set | 336 | # CONFIG_IP_MROUTE is not set |
337 | # CONFIG_ARPD is not set | ||
314 | # CONFIG_SYN_COOKIES is not set | 338 | # CONFIG_SYN_COOKIES is not set |
315 | # CONFIG_INET_AH is not set | 339 | # CONFIG_INET_AH is not set |
316 | # CONFIG_INET_ESP is not set | 340 | # CONFIG_INET_ESP is not set |
@@ -336,6 +360,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
336 | # CONFIG_LLC2 is not set | 360 | # CONFIG_LLC2 is not set |
337 | # CONFIG_IPX is not set | 361 | # CONFIG_IPX is not set |
338 | # CONFIG_ATALK is not set | 362 | # CONFIG_ATALK is not set |
363 | # CONFIG_PHONET is not set | ||
339 | # CONFIG_NET_SCHED is not set | 364 | # CONFIG_NET_SCHED is not set |
340 | # CONFIG_DCB is not set | 365 | # CONFIG_DCB is not set |
341 | 366 | ||
@@ -347,7 +372,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
347 | # CONFIG_CAN is not set | 372 | # CONFIG_CAN is not set |
348 | # CONFIG_IRDA is not set | 373 | # CONFIG_IRDA is not set |
349 | # CONFIG_BT is not set | 374 | # CONFIG_BT is not set |
350 | # CONFIG_PHONET is not set | ||
351 | # CONFIG_WIRELESS is not set | 375 | # CONFIG_WIRELESS is not set |
352 | # CONFIG_WIMAX is not set | 376 | # CONFIG_WIMAX is not set |
353 | # CONFIG_RFKILL is not set | 377 | # CONFIG_RFKILL is not set |
@@ -365,9 +389,9 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
365 | # CONFIG_CONNECTOR is not set | 389 | # CONFIG_CONNECTOR is not set |
366 | CONFIG_MTD=y | 390 | CONFIG_MTD=y |
367 | # CONFIG_MTD_DEBUG is not set | 391 | # CONFIG_MTD_DEBUG is not set |
392 | # CONFIG_MTD_TESTS is not set | ||
368 | # CONFIG_MTD_CONCAT is not set | 393 | # CONFIG_MTD_CONCAT is not set |
369 | CONFIG_MTD_PARTITIONS=y | 394 | CONFIG_MTD_PARTITIONS=y |
370 | # CONFIG_MTD_TESTS is not set | ||
371 | # CONFIG_MTD_REDBOOT_PARTS is not set | 395 | # CONFIG_MTD_REDBOOT_PARTS is not set |
372 | CONFIG_MTD_CMDLINE_PARTS=y | 396 | CONFIG_MTD_CMDLINE_PARTS=y |
373 | # CONFIG_MTD_AR7_PARTS is not set | 397 | # CONFIG_MTD_AR7_PARTS is not set |
@@ -376,9 +400,9 @@ CONFIG_MTD_CMDLINE_PARTS=y | |||
376 | # User Modules And Translation Layers | 400 | # User Modules And Translation Layers |
377 | # | 401 | # |
378 | CONFIG_MTD_CHAR=y | 402 | CONFIG_MTD_CHAR=y |
379 | # CONFIG_MTD_BLKDEVS is not set | 403 | CONFIG_MTD_BLKDEVS=m |
380 | # CONFIG_MTD_BLOCK is not set | 404 | CONFIG_MTD_BLOCK=m |
381 | # CONFIG_MTD_BLOCK_RO is not set | 405 | CONFIG_MTD_BLOCK_RO=m |
382 | # CONFIG_FTL is not set | 406 | # CONFIG_FTL is not set |
383 | # CONFIG_NFTL is not set | 407 | # CONFIG_NFTL is not set |
384 | # CONFIG_INFTL is not set | 408 | # CONFIG_INFTL is not set |
@@ -414,16 +438,20 @@ CONFIG_MTD_CFI_UTIL=y | |||
414 | # | 438 | # |
415 | # Mapping drivers for chip access | 439 | # Mapping drivers for chip access |
416 | # | 440 | # |
417 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | 441 | CONFIG_MTD_COMPLEX_MAPPINGS=y |
418 | CONFIG_MTD_PHYSMAP=y | 442 | CONFIG_MTD_PHYSMAP=y |
419 | # CONFIG_MTD_PHYSMAP_COMPAT is not set | 443 | # CONFIG_MTD_PHYSMAP_COMPAT is not set |
444 | # CONFIG_MTD_PCI is not set | ||
445 | # CONFIG_MTD_GPIO_ADDR is not set | ||
420 | # CONFIG_MTD_INTEL_VR_NOR is not set | 446 | # CONFIG_MTD_INTEL_VR_NOR is not set |
447 | CONFIG_MTD_RBTX4939=y | ||
421 | # CONFIG_MTD_PLATRAM is not set | 448 | # CONFIG_MTD_PLATRAM is not set |
422 | 449 | ||
423 | # | 450 | # |
424 | # Self-contained MTD device drivers | 451 | # Self-contained MTD device drivers |
425 | # | 452 | # |
426 | # CONFIG_MTD_PMC551 is not set | 453 | # CONFIG_MTD_PMC551 is not set |
454 | # CONFIG_MTD_SST25L is not set | ||
427 | # CONFIG_MTD_SLRAM is not set | 455 | # CONFIG_MTD_SLRAM is not set |
428 | # CONFIG_MTD_PHRAM is not set | 456 | # CONFIG_MTD_PHRAM is not set |
429 | # CONFIG_MTD_MTDRAM is not set | 457 | # CONFIG_MTD_MTDRAM is not set |
@@ -435,7 +463,15 @@ CONFIG_MTD_PHYSMAP=y | |||
435 | # CONFIG_MTD_DOC2000 is not set | 463 | # CONFIG_MTD_DOC2000 is not set |
436 | # CONFIG_MTD_DOC2001 is not set | 464 | # CONFIG_MTD_DOC2001 is not set |
437 | # CONFIG_MTD_DOC2001PLUS is not set | 465 | # CONFIG_MTD_DOC2001PLUS is not set |
438 | # CONFIG_MTD_NAND is not set | 466 | CONFIG_MTD_NAND=m |
467 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set | ||
468 | # CONFIG_MTD_NAND_ECC_SMC is not set | ||
469 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set | ||
470 | CONFIG_MTD_NAND_IDS=m | ||
471 | # CONFIG_MTD_NAND_CAFE is not set | ||
472 | # CONFIG_MTD_NAND_NANDSIM is not set | ||
473 | # CONFIG_MTD_NAND_PLATFORM is not set | ||
474 | CONFIG_MTD_NAND_TXX9NDFMC=m | ||
439 | # CONFIG_MTD_ONENAND is not set | 475 | # CONFIG_MTD_ONENAND is not set |
440 | 476 | ||
441 | # | 477 | # |
@@ -471,6 +507,7 @@ CONFIG_IDE=y | |||
471 | # | 507 | # |
472 | # Please see Documentation/ide/ide.txt for help/info on IDE drives | 508 | # Please see Documentation/ide/ide.txt for help/info on IDE drives |
473 | # | 509 | # |
510 | CONFIG_IDE_XFER_MODE=y | ||
474 | CONFIG_IDE_TIMINGS=y | 511 | CONFIG_IDE_TIMINGS=y |
475 | # CONFIG_BLK_DEV_IDE_SATA is not set | 512 | # CONFIG_BLK_DEV_IDE_SATA is not set |
476 | CONFIG_IDE_GD=y | 513 | CONFIG_IDE_GD=y |
@@ -534,8 +571,13 @@ CONFIG_BLK_DEV_IDEDMA=y | |||
534 | # | 571 | # |
535 | 572 | ||
536 | # | 573 | # |
537 | # A new alternative FireWire stack is available with EXPERIMENTAL=y | 574 | # You can enable one or both FireWire driver stacks. |
538 | # | 575 | # |
576 | |||
577 | # | ||
578 | # See the help texts for more information. | ||
579 | # | ||
580 | # CONFIG_FIREWIRE is not set | ||
539 | # CONFIG_IEEE1394 is not set | 581 | # CONFIG_IEEE1394 is not set |
540 | # CONFIG_I2O is not set | 582 | # CONFIG_I2O is not set |
541 | CONFIG_NETDEVICES=y | 583 | CONFIG_NETDEVICES=y |
@@ -574,6 +616,8 @@ CONFIG_MII=y | |||
574 | # CONFIG_NET_VENDOR_3COM is not set | 616 | # CONFIG_NET_VENDOR_3COM is not set |
575 | CONFIG_SMC91X=y | 617 | CONFIG_SMC91X=y |
576 | # CONFIG_DM9000 is not set | 618 | # CONFIG_DM9000 is not set |
619 | # CONFIG_ETHOC is not set | ||
620 | # CONFIG_DNET is not set | ||
577 | # CONFIG_NET_TULIP is not set | 621 | # CONFIG_NET_TULIP is not set |
578 | # CONFIG_HP100 is not set | 622 | # CONFIG_HP100 is not set |
579 | CONFIG_NE2000=y | 623 | CONFIG_NE2000=y |
@@ -602,18 +646,15 @@ CONFIG_TC35815=y | |||
602 | # CONFIG_SMSC9420 is not set | 646 | # CONFIG_SMSC9420 is not set |
603 | # CONFIG_SUNDANCE is not set | 647 | # CONFIG_SUNDANCE is not set |
604 | # CONFIG_TLAN is not set | 648 | # CONFIG_TLAN is not set |
649 | # CONFIG_KS8842 is not set | ||
650 | # CONFIG_KS8851 is not set | ||
651 | # CONFIG_KS8851_MLL is not set | ||
605 | # CONFIG_VIA_RHINE is not set | 652 | # CONFIG_VIA_RHINE is not set |
606 | # CONFIG_ATL2 is not set | 653 | # CONFIG_ATL2 is not set |
607 | # CONFIG_NETDEV_1000 is not set | 654 | # CONFIG_NETDEV_1000 is not set |
608 | # CONFIG_NETDEV_10000 is not set | 655 | # CONFIG_NETDEV_10000 is not set |
609 | # CONFIG_TR is not set | 656 | # CONFIG_TR is not set |
610 | 657 | # CONFIG_WLAN is not set | |
611 | # | ||
612 | # Wireless LAN | ||
613 | # | ||
614 | # CONFIG_WLAN_PRE80211 is not set | ||
615 | # CONFIG_WLAN_80211 is not set | ||
616 | # CONFIG_IWLWIFI_LEDS is not set | ||
617 | 658 | ||
618 | # | 659 | # |
619 | # Enable WiMAX (Networking options) to see the WiMAX drivers | 660 | # Enable WiMAX (Networking options) to see the WiMAX drivers |
@@ -653,6 +694,7 @@ CONFIG_DEVKMEM=y | |||
653 | # | 694 | # |
654 | # Non-8250 serial port support | 695 | # Non-8250 serial port support |
655 | # | 696 | # |
697 | # CONFIG_SERIAL_MAX3100 is not set | ||
656 | CONFIG_SERIAL_CORE=y | 698 | CONFIG_SERIAL_CORE=y |
657 | CONFIG_SERIAL_CORE_CONSOLE=y | 699 | CONFIG_SERIAL_CORE_CONSOLE=y |
658 | CONFIG_SERIAL_TXX9=y | 700 | CONFIG_SERIAL_TXX9=y |
@@ -666,7 +708,9 @@ CONFIG_UNIX98_PTYS=y | |||
666 | CONFIG_LEGACY_PTYS=y | 708 | CONFIG_LEGACY_PTYS=y |
667 | CONFIG_LEGACY_PTY_COUNT=256 | 709 | CONFIG_LEGACY_PTY_COUNT=256 |
668 | # CONFIG_IPMI_HANDLER is not set | 710 | # CONFIG_IPMI_HANDLER is not set |
669 | # CONFIG_HW_RANDOM is not set | 711 | CONFIG_HW_RANDOM=m |
712 | # CONFIG_HW_RANDOM_TIMERIOMEM is not set | ||
713 | CONFIG_HW_RANDOM_TX4939=m | ||
670 | # CONFIG_R3964 is not set | 714 | # CONFIG_R3964 is not set |
671 | # CONFIG_APPLICOM is not set | 715 | # CONFIG_APPLICOM is not set |
672 | # CONFIG_RAW_DRIVER is not set | 716 | # CONFIG_RAW_DRIVER is not set |
@@ -686,6 +730,10 @@ CONFIG_SPI_TXX9=y | |||
686 | # SPI Protocol Masters | 730 | # SPI Protocol Masters |
687 | # | 731 | # |
688 | # CONFIG_SPI_TLE62X0 is not set | 732 | # CONFIG_SPI_TLE62X0 is not set |
733 | |||
734 | # | ||
735 | # PPS support | ||
736 | # | ||
689 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | 737 | CONFIG_ARCH_REQUIRE_GPIOLIB=y |
690 | CONFIG_GPIOLIB=y | 738 | CONFIG_GPIOLIB=y |
691 | 739 | ||
@@ -701,17 +749,22 @@ CONFIG_GPIOLIB=y | |||
701 | # PCI GPIO expanders: | 749 | # PCI GPIO expanders: |
702 | # | 750 | # |
703 | # CONFIG_GPIO_BT8XX is not set | 751 | # CONFIG_GPIO_BT8XX is not set |
752 | # CONFIG_GPIO_LANGWELL is not set | ||
704 | 753 | ||
705 | # | 754 | # |
706 | # SPI GPIO expanders: | 755 | # SPI GPIO expanders: |
707 | # | 756 | # |
708 | # CONFIG_GPIO_MAX7301 is not set | 757 | # CONFIG_GPIO_MAX7301 is not set |
709 | # CONFIG_GPIO_MCP23S08 is not set | 758 | # CONFIG_GPIO_MCP23S08 is not set |
759 | # CONFIG_GPIO_MC33880 is not set | ||
760 | |||
761 | # | ||
762 | # AC97 GPIO expanders: | ||
763 | # | ||
710 | # CONFIG_W1 is not set | 764 | # CONFIG_W1 is not set |
711 | # CONFIG_POWER_SUPPLY is not set | 765 | # CONFIG_POWER_SUPPLY is not set |
712 | # CONFIG_HWMON is not set | 766 | # CONFIG_HWMON is not set |
713 | # CONFIG_THERMAL is not set | 767 | # CONFIG_THERMAL is not set |
714 | # CONFIG_THERMAL_HWMON is not set | ||
715 | CONFIG_WATCHDOG=y | 768 | CONFIG_WATCHDOG=y |
716 | # CONFIG_WATCHDOG_NOWAYOUT is not set | 769 | # CONFIG_WATCHDOG_NOWAYOUT is not set |
717 | 770 | ||
@@ -740,28 +793,17 @@ CONFIG_SSB_POSSIBLE=y | |||
740 | # CONFIG_MFD_CORE is not set | 793 | # CONFIG_MFD_CORE is not set |
741 | # CONFIG_MFD_SM501 is not set | 794 | # CONFIG_MFD_SM501 is not set |
742 | # CONFIG_HTC_PASIC3 is not set | 795 | # CONFIG_HTC_PASIC3 is not set |
796 | # CONFIG_UCB1400_CORE is not set | ||
743 | # CONFIG_MFD_TMIO is not set | 797 | # CONFIG_MFD_TMIO is not set |
798 | # CONFIG_MFD_MC13783 is not set | ||
799 | # CONFIG_EZX_PCAP is not set | ||
744 | # CONFIG_REGULATOR is not set | 800 | # CONFIG_REGULATOR is not set |
745 | 801 | # CONFIG_MEDIA_SUPPORT is not set | |
746 | # | ||
747 | # Multimedia devices | ||
748 | # | ||
749 | |||
750 | # | ||
751 | # Multimedia core support | ||
752 | # | ||
753 | # CONFIG_VIDEO_DEV is not set | ||
754 | # CONFIG_DVB_CORE is not set | ||
755 | # CONFIG_VIDEO_MEDIA is not set | ||
756 | |||
757 | # | ||
758 | # Multimedia drivers | ||
759 | # | ||
760 | # CONFIG_DAB is not set | ||
761 | 802 | ||
762 | # | 803 | # |
763 | # Graphics support | 804 | # Graphics support |
764 | # | 805 | # |
806 | # CONFIG_VGA_ARB is not set | ||
765 | # CONFIG_DRM is not set | 807 | # CONFIG_DRM is not set |
766 | # CONFIG_VGASTATE is not set | 808 | # CONFIG_VGASTATE is not set |
767 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | 809 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set |
@@ -772,7 +814,42 @@ CONFIG_SSB_POSSIBLE=y | |||
772 | # Display device support | 814 | # Display device support |
773 | # | 815 | # |
774 | # CONFIG_DISPLAY_SUPPORT is not set | 816 | # CONFIG_DISPLAY_SUPPORT is not set |
775 | # CONFIG_SOUND is not set | 817 | CONFIG_SOUND=m |
818 | # CONFIG_SOUND_OSS_CORE is not set | ||
819 | CONFIG_SND=m | ||
820 | CONFIG_SND_TIMER=m | ||
821 | CONFIG_SND_PCM=m | ||
822 | # CONFIG_SND_SEQUENCER is not set | ||
823 | # CONFIG_SND_MIXER_OSS is not set | ||
824 | # CONFIG_SND_PCM_OSS is not set | ||
825 | # CONFIG_SND_HRTIMER is not set | ||
826 | # CONFIG_SND_DYNAMIC_MINORS is not set | ||
827 | # CONFIG_SND_SUPPORT_OLD_API is not set | ||
828 | # CONFIG_SND_VERBOSE_PROCFS is not set | ||
829 | # CONFIG_SND_VERBOSE_PRINTK is not set | ||
830 | # CONFIG_SND_DEBUG is not set | ||
831 | CONFIG_SND_VMASTER=y | ||
832 | # CONFIG_SND_RAWMIDI_SEQ is not set | ||
833 | # CONFIG_SND_OPL3_LIB_SEQ is not set | ||
834 | # CONFIG_SND_OPL4_LIB_SEQ is not set | ||
835 | # CONFIG_SND_SBAWE_SEQ is not set | ||
836 | # CONFIG_SND_EMU10K1_SEQ is not set | ||
837 | CONFIG_SND_AC97_CODEC=m | ||
838 | # CONFIG_SND_DRIVERS is not set | ||
839 | # CONFIG_SND_PCI is not set | ||
840 | # CONFIG_SND_SPI is not set | ||
841 | # CONFIG_SND_MIPS is not set | ||
842 | CONFIG_SND_SOC=m | ||
843 | CONFIG_SND_SOC_AC97_BUS=y | ||
844 | CONFIG_SND_SOC_TXX9ACLC=m | ||
845 | CONFIG_HAS_TXX9_ACLC=y | ||
846 | CONFIG_SND_SOC_TXX9ACLC_AC97=m | ||
847 | CONFIG_SND_SOC_TXX9ACLC_GENERIC=m | ||
848 | CONFIG_SND_SOC_I2C_AND_SPI=m | ||
849 | # CONFIG_SND_SOC_ALL_CODECS is not set | ||
850 | CONFIG_SND_SOC_AC97_CODEC=m | ||
851 | # CONFIG_SOUND_PRIME is not set | ||
852 | CONFIG_AC97_BUS=m | ||
776 | # CONFIG_USB_SUPPORT is not set | 853 | # CONFIG_USB_SUPPORT is not set |
777 | # CONFIG_MMC is not set | 854 | # CONFIG_MMC is not set |
778 | # CONFIG_MEMSTICK is not set | 855 | # CONFIG_MEMSTICK is not set |
@@ -783,6 +860,8 @@ CONFIG_LEDS_CLASS=y | |||
783 | # LED drivers | 860 | # LED drivers |
784 | # | 861 | # |
785 | CONFIG_LEDS_GPIO=y | 862 | CONFIG_LEDS_GPIO=y |
863 | CONFIG_LEDS_GPIO_PLATFORM=y | ||
864 | # CONFIG_LEDS_DAC124S085 is not set | ||
786 | 865 | ||
787 | # | 866 | # |
788 | # LED Triggers | 867 | # LED Triggers |
@@ -792,7 +871,12 @@ CONFIG_LEDS_TRIGGERS=y | |||
792 | CONFIG_LEDS_TRIGGER_IDE_DISK=y | 871 | CONFIG_LEDS_TRIGGER_IDE_DISK=y |
793 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | 872 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y |
794 | # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set | 873 | # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set |
874 | # CONFIG_LEDS_TRIGGER_GPIO is not set | ||
795 | # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set | 875 | # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set |
876 | |||
877 | # | ||
878 | # iptables trigger is under Netfilter config (LED target) | ||
879 | # | ||
796 | # CONFIG_ACCESSIBILITY is not set | 880 | # CONFIG_ACCESSIBILITY is not set |
797 | # CONFIG_INFINIBAND is not set | 881 | # CONFIG_INFINIBAND is not set |
798 | CONFIG_RTC_LIB=y | 882 | CONFIG_RTC_LIB=y |
@@ -820,6 +904,7 @@ CONFIG_RTC_INTF_DEV_UIE_EMUL=y | |||
820 | # CONFIG_RTC_DRV_R9701 is not set | 904 | # CONFIG_RTC_DRV_R9701 is not set |
821 | CONFIG_RTC_DRV_RS5C348=y | 905 | CONFIG_RTC_DRV_RS5C348=y |
822 | # CONFIG_RTC_DRV_DS3234 is not set | 906 | # CONFIG_RTC_DRV_DS3234 is not set |
907 | # CONFIG_RTC_DRV_PCF2123 is not set | ||
823 | 908 | ||
824 | # | 909 | # |
825 | # Platform RTC drivers | 910 | # Platform RTC drivers |
@@ -840,8 +925,26 @@ CONFIG_RTC_DRV_DS1742=y | |||
840 | # on-CPU RTC drivers | 925 | # on-CPU RTC drivers |
841 | # | 926 | # |
842 | CONFIG_RTC_DRV_TX4939=y | 927 | CONFIG_RTC_DRV_TX4939=y |
843 | # CONFIG_DMADEVICES is not set | 928 | CONFIG_DMADEVICES=y |
929 | |||
930 | # | ||
931 | # DMA Devices | ||
932 | # | ||
933 | CONFIG_TXX9_DMAC=m | ||
934 | CONFIG_DMA_ENGINE=y | ||
935 | |||
936 | # | ||
937 | # DMA Clients | ||
938 | # | ||
939 | # CONFIG_NET_DMA is not set | ||
940 | # CONFIG_ASYNC_TX_DMA is not set | ||
941 | # CONFIG_DMATEST is not set | ||
942 | # CONFIG_AUXDISPLAY is not set | ||
844 | # CONFIG_UIO is not set | 943 | # CONFIG_UIO is not set |
944 | |||
945 | # | ||
946 | # TI VLYNQ | ||
947 | # | ||
845 | # CONFIG_STAGING is not set | 948 | # CONFIG_STAGING is not set |
846 | 949 | ||
847 | # | 950 | # |
@@ -853,9 +956,10 @@ CONFIG_RTC_DRV_TX4939=y | |||
853 | # CONFIG_REISERFS_FS is not set | 956 | # CONFIG_REISERFS_FS is not set |
854 | # CONFIG_JFS_FS is not set | 957 | # CONFIG_JFS_FS is not set |
855 | CONFIG_FS_POSIX_ACL=y | 958 | CONFIG_FS_POSIX_ACL=y |
856 | CONFIG_FILE_LOCKING=y | ||
857 | # CONFIG_XFS_FS is not set | 959 | # CONFIG_XFS_FS is not set |
858 | # CONFIG_OCFS2_FS is not set | 960 | # CONFIG_OCFS2_FS is not set |
961 | CONFIG_FILE_LOCKING=y | ||
962 | CONFIG_FSNOTIFY=y | ||
859 | # CONFIG_DNOTIFY is not set | 963 | # CONFIG_DNOTIFY is not set |
860 | CONFIG_INOTIFY=y | 964 | CONFIG_INOTIFY=y |
861 | CONFIG_INOTIFY_USER=y | 965 | CONFIG_INOTIFY_USER=y |
@@ -866,6 +970,10 @@ CONFIG_INOTIFY_USER=y | |||
866 | CONFIG_GENERIC_ACL=y | 970 | CONFIG_GENERIC_ACL=y |
867 | 971 | ||
868 | # | 972 | # |
973 | # Caches | ||
974 | # | ||
975 | |||
976 | # | ||
869 | # CD-ROM/DVD Filesystems | 977 | # CD-ROM/DVD Filesystems |
870 | # | 978 | # |
871 | # CONFIG_ISO9660_FS is not set | 979 | # CONFIG_ISO9660_FS is not set |
@@ -890,7 +998,27 @@ CONFIG_TMPFS=y | |||
890 | CONFIG_TMPFS_POSIX_ACL=y | 998 | CONFIG_TMPFS_POSIX_ACL=y |
891 | # CONFIG_HUGETLB_PAGE is not set | 999 | # CONFIG_HUGETLB_PAGE is not set |
892 | # CONFIG_CONFIGFS_FS is not set | 1000 | # CONFIG_CONFIGFS_FS is not set |
893 | # CONFIG_MISC_FILESYSTEMS is not set | 1001 | CONFIG_MISC_FILESYSTEMS=y |
1002 | # CONFIG_HFSPLUS_FS is not set | ||
1003 | CONFIG_JFFS2_FS=m | ||
1004 | CONFIG_JFFS2_FS_DEBUG=0 | ||
1005 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
1006 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
1007 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
1008 | CONFIG_JFFS2_ZLIB=y | ||
1009 | # CONFIG_JFFS2_LZO is not set | ||
1010 | CONFIG_JFFS2_RTIME=y | ||
1011 | # CONFIG_JFFS2_RUBIN is not set | ||
1012 | # CONFIG_CRAMFS is not set | ||
1013 | # CONFIG_SQUASHFS is not set | ||
1014 | # CONFIG_VXFS_FS is not set | ||
1015 | # CONFIG_MINIX_FS is not set | ||
1016 | # CONFIG_OMFS_FS is not set | ||
1017 | # CONFIG_HPFS_FS is not set | ||
1018 | # CONFIG_QNX4FS_FS is not set | ||
1019 | # CONFIG_ROMFS_FS is not set | ||
1020 | # CONFIG_SYSV_FS is not set | ||
1021 | # CONFIG_UFS_FS is not set | ||
894 | CONFIG_NETWORK_FILESYSTEMS=y | 1022 | CONFIG_NETWORK_FILESYSTEMS=y |
895 | CONFIG_NFS_FS=y | 1023 | CONFIG_NFS_FS=y |
896 | CONFIG_NFS_V3=y | 1024 | CONFIG_NFS_V3=y |
@@ -922,6 +1050,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y | |||
922 | CONFIG_ENABLE_MUST_CHECK=y | 1050 | CONFIG_ENABLE_MUST_CHECK=y |
923 | CONFIG_FRAME_WARN=1024 | 1051 | CONFIG_FRAME_WARN=1024 |
924 | # CONFIG_MAGIC_SYSRQ is not set | 1052 | # CONFIG_MAGIC_SYSRQ is not set |
1053 | CONFIG_STRIP_ASM_SYMS=y | ||
925 | # CONFIG_UNUSED_SYMBOLS is not set | 1054 | # CONFIG_UNUSED_SYMBOLS is not set |
926 | CONFIG_DEBUG_FS=y | 1055 | CONFIG_DEBUG_FS=y |
927 | # CONFIG_HEADERS_CHECK is not set | 1056 | # CONFIG_HEADERS_CHECK is not set |
@@ -929,11 +1058,9 @@ CONFIG_DEBUG_FS=y | |||
929 | # CONFIG_DEBUG_MEMORY_INIT is not set | 1058 | # CONFIG_DEBUG_MEMORY_INIT is not set |
930 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 1059 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
931 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 1060 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
932 | 1061 | CONFIG_TRACING_SUPPORT=y | |
933 | # | 1062 | # CONFIG_FTRACE is not set |
934 | # Tracers | 1063 | # CONFIG_DYNAMIC_DEBUG is not set |
935 | # | ||
936 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||
937 | # CONFIG_SAMPLES is not set | 1064 | # CONFIG_SAMPLES is not set |
938 | CONFIG_HAVE_ARCH_KGDB=y | 1065 | CONFIG_HAVE_ARCH_KGDB=y |
939 | CONFIG_CMDLINE="" | 1066 | CONFIG_CMDLINE="" |
@@ -946,6 +1073,7 @@ CONFIG_CMDLINE="" | |||
946 | # CONFIG_SECURITYFS is not set | 1073 | # CONFIG_SECURITYFS is not set |
947 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1074 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
948 | # CONFIG_CRYPTO is not set | 1075 | # CONFIG_CRYPTO is not set |
1076 | # CONFIG_BINARY_PRINTF is not set | ||
949 | 1077 | ||
950 | # | 1078 | # |
951 | # Library routines | 1079 | # Library routines |
@@ -959,6 +1087,10 @@ CONFIG_GENERIC_FIND_LAST_BIT=y | |||
959 | CONFIG_CRC32=y | 1087 | CONFIG_CRC32=y |
960 | # CONFIG_CRC7 is not set | 1088 | # CONFIG_CRC7 is not set |
961 | # CONFIG_LIBCRC32C is not set | 1089 | # CONFIG_LIBCRC32C is not set |
1090 | CONFIG_ZLIB_INFLATE=y | ||
1091 | CONFIG_ZLIB_DEFLATE=m | ||
1092 | CONFIG_DECOMPRESS_GZIP=y | ||
962 | CONFIG_HAS_IOMEM=y | 1093 | CONFIG_HAS_IOMEM=y |
963 | CONFIG_HAS_IOPORT=y | 1094 | CONFIG_HAS_IOPORT=y |
964 | CONFIG_HAS_DMA=y | 1095 | CONFIG_HAS_DMA=y |
1096 | CONFIG_NLATTR=y | ||
diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h index d16afddb09a9..664ba53dc32a 100644 --- a/arch/mips/include/asm/dma-mapping.h +++ b/arch/mips/include/asm/dma-mapping.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <asm/scatterlist.h> | 4 | #include <asm/scatterlist.h> |
5 | #include <asm/cache.h> | 5 | #include <asm/cache.h> |
6 | #include <asm-generic/dma-coherent.h> | ||
6 | 7 | ||
7 | void *dma_alloc_noncoherent(struct device *dev, size_t size, | 8 | void *dma_alloc_noncoherent(struct device *dev, size_t size, |
8 | dma_addr_t *dma_handle, gfp_t flag); | 9 | dma_addr_t *dma_handle, gfp_t flag); |
@@ -73,14 +74,4 @@ extern int dma_is_consistent(struct device *dev, dma_addr_t dma_addr); | |||
73 | extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 74 | extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
74 | enum dma_data_direction direction); | 75 | enum dma_data_direction direction); |
75 | 76 | ||
76 | #if 0 | ||
77 | #define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY | ||
78 | |||
79 | extern int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | ||
80 | dma_addr_t device_addr, size_t size, int flags); | ||
81 | extern void dma_release_declared_memory(struct device *dev); | ||
82 | extern void * dma_mark_declared_memory_occupied(struct device *dev, | ||
83 | dma_addr_t device_addr, size_t size); | ||
84 | #endif | ||
85 | |||
86 | #endif /* _ASM_DMA_MAPPING_H */ | 77 | #endif /* _ASM_DMA_MAPPING_H */ |
diff --git a/arch/mips/kernel/cevt-smtc.c b/arch/mips/kernel/cevt-smtc.c index 98bd7de75778..b102e4f1630e 100644 --- a/arch/mips/kernel/cevt-smtc.c +++ b/arch/mips/kernel/cevt-smtc.c | |||
@@ -173,11 +173,12 @@ void smtc_distribute_timer(int vpe) | |||
173 | unsigned int mtflags; | 173 | unsigned int mtflags; |
174 | int cpu; | 174 | int cpu; |
175 | struct clock_event_device *cd; | 175 | struct clock_event_device *cd; |
176 | unsigned long nextstamp = 0L; | 176 | unsigned long nextstamp; |
177 | unsigned long reference; | 177 | unsigned long reference; |
178 | 178 | ||
179 | 179 | ||
180 | repeat: | 180 | repeat: |
181 | nextstamp = 0L; | ||
181 | for_each_online_cpu(cpu) { | 182 | for_each_online_cpu(cpu) { |
182 | /* | 183 | /* |
183 | * Find virtual CPUs within the current VPE who have | 184 | * Find virtual CPUs within the current VPE who have |
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c index 890f77927d62..454b53924490 100644 --- a/arch/mips/math-emu/cp1emu.c +++ b/arch/mips/math-emu/cp1emu.c | |||
@@ -163,33 +163,34 @@ static int isBranchInstr(mips_instruction * i) | |||
163 | 163 | ||
164 | /* | 164 | /* |
165 | * In the Linux kernel, we support selection of FPR format on the | 165 | * In the Linux kernel, we support selection of FPR format on the |
166 | * basis of the Status.FR bit. This does imply that, if a full 32 | 166 | * basis of the Status.FR bit. If an FPU is not present, the FR bit |
167 | * FPRs are desired, there needs to be a flip-flop that can be written | 167 | * is hardwired to zero, which would imply a 32-bit FPU even for |
168 | * to one at that bit position. In any case, O32 MIPS ABI uses | 168 | * 64-bit CPUs. For 64-bit kernels with no FPU we use TIF_32BIT_REGS |
169 | * only the even FPRs (Status.FR = 0). | 169 | * as a proxy for the FR bit so that a 64-bit FPU is emulated. In any |
170 | * case, for a 32-bit kernel which uses the O32 MIPS ABI, only the | ||
171 | * even FPRs are used (Status.FR = 0). | ||
170 | */ | 172 | */ |
171 | 173 | static inline int cop1_64bit(struct pt_regs *xcp) | |
172 | #define CP0_STATUS_FR_SUPPORT | 174 | { |
173 | 175 | if (cpu_has_fpu) | |
174 | #ifdef CP0_STATUS_FR_SUPPORT | 176 | return xcp->cp0_status & ST0_FR; |
175 | #define FR_BIT ST0_FR | 177 | #ifdef CONFIG_64BIT |
178 | return !test_thread_flag(TIF_32BIT_REGS); | ||
176 | #else | 179 | #else |
177 | #define FR_BIT 0 | 180 | return 0; |
178 | #endif | 181 | #endif |
182 | } | ||
183 | |||
184 | #define SIFROMREG(si, x) ((si) = cop1_64bit(xcp) || !(x & 1) ? \ | ||
185 | (int)ctx->fpr[x] : (int)(ctx->fpr[x & ~1] >> 32)) | ||
179 | 186 | ||
180 | #define SIFROMREG(si, x) ((si) = \ | 187 | #define SITOREG(si, x) (ctx->fpr[x & ~(cop1_64bit(xcp) == 0)] = \ |
181 | (xcp->cp0_status & FR_BIT) || !(x & 1) ? \ | 188 | cop1_64bit(xcp) || !(x & 1) ? \ |
182 | (int)ctx->fpr[x] : \ | ||
183 | (int)(ctx->fpr[x & ~1] >> 32 )) | ||
184 | #define SITOREG(si, x) (ctx->fpr[x & ~((xcp->cp0_status & FR_BIT) == 0)] = \ | ||
185 | (xcp->cp0_status & FR_BIT) || !(x & 1) ? \ | ||
186 | ctx->fpr[x & ~1] >> 32 << 32 | (u32)(si) : \ | 189 | ctx->fpr[x & ~1] >> 32 << 32 | (u32)(si) : \ |
187 | ctx->fpr[x & ~1] << 32 >> 32 | (u64)(si) << 32) | 190 | ctx->fpr[x & ~1] << 32 >> 32 | (u64)(si) << 32) |
188 | 191 | ||
189 | #define DIFROMREG(di, x) ((di) = \ | 192 | #define DIFROMREG(di, x) ((di) = ctx->fpr[x & ~(cop1_64bit(xcp) == 0)]) |
190 | ctx->fpr[x & ~((xcp->cp0_status & FR_BIT) == 0)]) | 193 | #define DITOREG(di, x) (ctx->fpr[x & ~(cop1_64bit(xcp) == 0)] = (di)) |
191 | #define DITOREG(di, x) (ctx->fpr[x & ~((xcp->cp0_status & FR_BIT) == 0)] \ | ||
192 | = (di)) | ||
193 | 194 | ||
194 | #define SPFROMREG(sp, x) SIFROMREG((sp).bits, x) | 195 | #define SPFROMREG(sp, x) SIFROMREG((sp).bits, x) |
195 | #define SPTOREG(sp, x) SITOREG((sp).bits, x) | 196 | #define SPTOREG(sp, x) SITOREG((sp).bits, x) |
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index 7e48e76148aa..9367e33fbd18 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
@@ -90,6 +90,9 @@ void *dma_alloc_coherent(struct device *dev, size_t size, | |||
90 | { | 90 | { |
91 | void *ret; | 91 | void *ret; |
92 | 92 | ||
93 | if (dma_alloc_from_coherent(dev, size, dma_handle, &ret)) | ||
94 | return ret; | ||
95 | |||
93 | gfp = massage_gfp_flags(dev, gfp); | 96 | gfp = massage_gfp_flags(dev, gfp); |
94 | 97 | ||
95 | ret = (void *) __get_free_pages(gfp, get_order(size)); | 98 | ret = (void *) __get_free_pages(gfp, get_order(size)); |
@@ -122,6 +125,10 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr, | |||
122 | dma_addr_t dma_handle) | 125 | dma_addr_t dma_handle) |
123 | { | 126 | { |
124 | unsigned long addr = (unsigned long) vaddr; | 127 | unsigned long addr = (unsigned long) vaddr; |
128 | int order = get_order(size); | ||
129 | |||
130 | if (dma_release_from_coherent(dev, order, vaddr)) | ||
131 | return; | ||
125 | 132 | ||
126 | plat_unmap_dma_mem(dev, dma_handle, size, DMA_BIDIRECTIONAL); | 133 | plat_unmap_dma_mem(dev, dma_handle, size, DMA_BIDIRECTIONAL); |
127 | 134 | ||
diff --git a/arch/mips/mti-malta/malta-memory.c b/arch/mips/mti-malta/malta-memory.c index 61888ff72c87..9035c64bc5ed 100644 --- a/arch/mips/mti-malta/malta-memory.c +++ b/arch/mips/mti-malta/malta-memory.c | |||
@@ -54,7 +54,8 @@ static struct prom_pmemblock * __init prom_getmdesc(void) | |||
54 | { | 54 | { |
55 | char *memsize_str; | 55 | char *memsize_str; |
56 | unsigned int memsize; | 56 | unsigned int memsize; |
57 | char cmdline[CL_SIZE], *ptr; | 57 | char *ptr; |
58 | static char cmdline[CL_SIZE] __initdata; | ||
58 | 59 | ||
59 | /* otherwise look in the environment */ | 60 | /* otherwise look in the environment */ |
60 | memsize_str = prom_getenv("memsize"); | 61 | memsize_str = prom_getenv("memsize"); |
diff --git a/arch/mips/rb532/prom.c b/arch/mips/rb532/prom.c index 46ca24dbcc2d..ad5bd1097974 100644 --- a/arch/mips/rb532/prom.c +++ b/arch/mips/rb532/prom.c | |||
@@ -69,7 +69,7 @@ static inline unsigned long tag2ul(char *arg, const char *tag) | |||
69 | 69 | ||
70 | void __init prom_setup_cmdline(void) | 70 | void __init prom_setup_cmdline(void) |
71 | { | 71 | { |
72 | char cmd_line[CL_SIZE]; | 72 | static char cmd_line[CL_SIZE] __initdata; |
73 | char *cp, *board; | 73 | char *cp, *board; |
74 | int prom_argc; | 74 | int prom_argc; |
75 | char **prom_argv, **prom_envp; | 75 | char **prom_argv, **prom_envp; |
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index e10184c1b3e1..d66802edebb2 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c | |||
@@ -160,7 +160,7 @@ static void __init prom_init_cmdline(void) | |||
160 | int argc; | 160 | int argc; |
161 | int *argv32; | 161 | int *argv32; |
162 | int i; /* Always ignore the "-c" at argv[0] */ | 162 | int i; /* Always ignore the "-c" at argv[0] */ |
163 | char builtin[CL_SIZE]; | 163 | static char builtin[CL_SIZE] __initdata; |
164 | 164 | ||
165 | if (fw_arg0 >= CKSEG0 || fw_arg1 < CKSEG0) { | 165 | if (fw_arg0 >= CKSEG0 || fw_arg1 < CKSEG0) { |
166 | /* | 166 | /* |
@@ -315,7 +315,7 @@ static inline void txx9_cache_fixup(void) | |||
315 | 315 | ||
316 | static void __init preprocess_cmdline(void) | 316 | static void __init preprocess_cmdline(void) |
317 | { | 317 | { |
318 | char cmdline[CL_SIZE]; | 318 | static char cmdline[CL_SIZE] __initdata; |
319 | char *s; | 319 | char *s; |
320 | 320 | ||
321 | strcpy(cmdline, arcs_cmdline); | 321 | strcpy(cmdline, arcs_cmdline); |
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index bf8b4ae7ff2d..e49e9e0c69fd 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -55,6 +55,7 @@ static void __init reset_tod_clock(void) | |||
55 | disabled_wait(0); | 55 | disabled_wait(0); |
56 | 56 | ||
57 | sched_clock_base_cc = TOD_UNIX_EPOCH; | 57 | sched_clock_base_cc = TOD_UNIX_EPOCH; |
58 | S390_lowcore.last_update_clock = sched_clock_base_cc; | ||
58 | } | 59 | } |
59 | 60 | ||
60 | #ifdef CONFIG_SHARED_KERNEL | 61 | #ifdef CONFIG_SHARED_KERNEL |
@@ -167,6 +168,14 @@ static noinline __init void create_kernel_nss(void) | |||
167 | return; | 168 | return; |
168 | } | 169 | } |
169 | 170 | ||
171 | /* re-initialize cputime accounting. */ | ||
172 | sched_clock_base_cc = get_clock(); | ||
173 | S390_lowcore.last_update_clock = sched_clock_base_cc; | ||
174 | S390_lowcore.last_update_timer = 0x7fffffffffffffffULL; | ||
175 | S390_lowcore.user_timer = 0; | ||
176 | S390_lowcore.system_timer = 0; | ||
177 | asm volatile("SPT 0(%0)" : : "a" (&S390_lowcore.last_update_timer)); | ||
178 | |||
170 | /* re-setup boot command line with new ipl vm parms */ | 179 | /* re-setup boot command line with new ipl vm parms */ |
171 | ipl_update_parameters(); | 180 | ipl_update_parameters(); |
172 | setup_boot_command_line(); | 181 | setup_boot_command_line(); |
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index f43d2ee54464..48215d15762b 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -565,10 +565,10 @@ pgm_svcper: | |||
565 | lh %r7,0x8a # get svc number from lowcore | 565 | lh %r7,0x8a # get svc number from lowcore |
566 | l %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 566 | l %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
567 | TRACE_IRQS_OFF | 567 | TRACE_IRQS_OFF |
568 | l %r1,__TI_task(%r9) | 568 | l %r8,__TI_task(%r9) |
569 | mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID | 569 | mvc __THREAD_per+__PER_atmid(2,%r8),__LC_PER_ATMID |
570 | mvc __THREAD_per+__PER_address(4,%r1),__LC_PER_ADDRESS | 570 | mvc __THREAD_per+__PER_address(4,%r8),__LC_PER_ADDRESS |
571 | mvc __THREAD_per+__PER_access_id(1,%r1),__LC_PER_ACCESS_ID | 571 | mvc __THREAD_per+__PER_access_id(1,%r8),__LC_PER_ACCESS_ID |
572 | oi __TI_flags+3(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP | 572 | oi __TI_flags+3(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP |
573 | TRACE_IRQS_ON | 573 | TRACE_IRQS_ON |
574 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | 574 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index a6f7b20df616..9aff1d449b6e 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -543,10 +543,10 @@ pgm_svcper: | |||
543 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER | 543 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER |
544 | llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore | 544 | llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore |
545 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 545 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
546 | lg %r1,__TI_task(%r9) | 546 | lg %r8,__TI_task(%r9) |
547 | mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID | 547 | mvc __THREAD_per+__PER_atmid(2,%r8),__LC_PER_ATMID |
548 | mvc __THREAD_per+__PER_address(8,%r1),__LC_PER_ADDRESS | 548 | mvc __THREAD_per+__PER_address(8,%r8),__LC_PER_ADDRESS |
549 | mvc __THREAD_per+__PER_access_id(1,%r1),__LC_PER_ACCESS_ID | 549 | mvc __THREAD_per+__PER_access_id(1,%r8),__LC_PER_ACCESS_ID |
550 | oi __TI_flags+7(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP | 550 | oi __TI_flags+7(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP |
551 | TRACE_IRQS_ON | 551 | TRACE_IRQS_ON |
552 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | 552 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts |
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 2fb38027f3bb..44bc8bbabf54 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -600,11 +600,13 @@ static int btusb_close(struct hci_dev *hdev) | |||
600 | btusb_stop_traffic(data); | 600 | btusb_stop_traffic(data); |
601 | err = usb_autopm_get_interface(data->intf); | 601 | err = usb_autopm_get_interface(data->intf); |
602 | if (err < 0) | 602 | if (err < 0) |
603 | return 0; | 603 | goto failed; |
604 | 604 | ||
605 | data->intf->needs_remote_wakeup = 0; | 605 | data->intf->needs_remote_wakeup = 0; |
606 | usb_autopm_put_interface(data->intf); | 606 | usb_autopm_put_interface(data->intf); |
607 | 607 | ||
608 | failed: | ||
609 | usb_scuttle_anchored_urbs(&data->deferred); | ||
608 | return 0; | 610 | return 0; |
609 | } | 611 | } |
610 | 612 | ||
diff --git a/drivers/input/ff-core.c b/drivers/input/ff-core.c index 72c63e5dd630..38df81fcdc3a 100644 --- a/drivers/input/ff-core.c +++ b/drivers/input/ff-core.c | |||
@@ -337,16 +337,16 @@ int input_ff_create(struct input_dev *dev, int max_effects) | |||
337 | dev->ff = ff; | 337 | dev->ff = ff; |
338 | dev->flush = flush_effects; | 338 | dev->flush = flush_effects; |
339 | dev->event = input_ff_event; | 339 | dev->event = input_ff_event; |
340 | set_bit(EV_FF, dev->evbit); | 340 | __set_bit(EV_FF, dev->evbit); |
341 | 341 | ||
342 | /* Copy "true" bits into ff device bitmap */ | 342 | /* Copy "true" bits into ff device bitmap */ |
343 | for (i = 0; i <= FF_MAX; i++) | 343 | for (i = 0; i <= FF_MAX; i++) |
344 | if (test_bit(i, dev->ffbit)) | 344 | if (test_bit(i, dev->ffbit)) |
345 | set_bit(i, ff->ffbit); | 345 | __set_bit(i, ff->ffbit); |
346 | 346 | ||
347 | /* we can emulate RUMBLE with periodic effects */ | 347 | /* we can emulate RUMBLE with periodic effects */ |
348 | if (test_bit(FF_PERIODIC, ff->ffbit)) | 348 | if (test_bit(FF_PERIODIC, ff->ffbit)) |
349 | set_bit(FF_RUMBLE, dev->ffbit); | 349 | __set_bit(FF_RUMBLE, dev->ffbit); |
350 | 350 | ||
351 | return 0; | 351 | return 0; |
352 | } | 352 | } |
@@ -362,12 +362,14 @@ EXPORT_SYMBOL_GPL(input_ff_create); | |||
362 | */ | 362 | */ |
363 | void input_ff_destroy(struct input_dev *dev) | 363 | void input_ff_destroy(struct input_dev *dev) |
364 | { | 364 | { |
365 | clear_bit(EV_FF, dev->evbit); | 365 | struct ff_device *ff = dev->ff; |
366 | if (dev->ff) { | 366 | |
367 | if (dev->ff->destroy) | 367 | __clear_bit(EV_FF, dev->evbit); |
368 | dev->ff->destroy(dev->ff); | 368 | if (ff) { |
369 | kfree(dev->ff->private); | 369 | if (ff->destroy) |
370 | kfree(dev->ff); | 370 | ff->destroy(ff); |
371 | kfree(ff->private); | ||
372 | kfree(ff); | ||
371 | dev->ff = NULL; | 373 | dev->ff = NULL; |
372 | } | 374 | } |
373 | } | 375 | } |
diff --git a/drivers/input/ff-memless.c b/drivers/input/ff-memless.c index 2d1415e16834..b483b2995fa9 100644 --- a/drivers/input/ff-memless.c +++ b/drivers/input/ff-memless.c | |||
@@ -61,7 +61,6 @@ struct ml_device { | |||
61 | struct ml_effect_state states[FF_MEMLESS_EFFECTS]; | 61 | struct ml_effect_state states[FF_MEMLESS_EFFECTS]; |
62 | int gain; | 62 | int gain; |
63 | struct timer_list timer; | 63 | struct timer_list timer; |
64 | spinlock_t timer_lock; | ||
65 | struct input_dev *dev; | 64 | struct input_dev *dev; |
66 | 65 | ||
67 | int (*play_effect)(struct input_dev *dev, void *data, | 66 | int (*play_effect)(struct input_dev *dev, void *data, |
@@ -368,38 +367,38 @@ static void ml_effect_timer(unsigned long timer_data) | |||
368 | { | 367 | { |
369 | struct input_dev *dev = (struct input_dev *)timer_data; | 368 | struct input_dev *dev = (struct input_dev *)timer_data; |
370 | struct ml_device *ml = dev->ff->private; | 369 | struct ml_device *ml = dev->ff->private; |
370 | unsigned long flags; | ||
371 | 371 | ||
372 | debug("timer: updating effects"); | 372 | debug("timer: updating effects"); |
373 | 373 | ||
374 | spin_lock(&ml->timer_lock); | 374 | spin_lock_irqsave(&dev->event_lock, flags); |
375 | ml_play_effects(ml); | 375 | ml_play_effects(ml); |
376 | spin_unlock(&ml->timer_lock); | 376 | spin_unlock_irqrestore(&dev->event_lock, flags); |
377 | } | 377 | } |
378 | 378 | ||
379 | /* | ||
380 | * Sets requested gain for FF effects. Called with dev->event_lock held. | ||
381 | */ | ||
379 | static void ml_ff_set_gain(struct input_dev *dev, u16 gain) | 382 | static void ml_ff_set_gain(struct input_dev *dev, u16 gain) |
380 | { | 383 | { |
381 | struct ml_device *ml = dev->ff->private; | 384 | struct ml_device *ml = dev->ff->private; |
382 | int i; | 385 | int i; |
383 | 386 | ||
384 | spin_lock_bh(&ml->timer_lock); | ||
385 | |||
386 | ml->gain = gain; | 387 | ml->gain = gain; |
387 | 388 | ||
388 | for (i = 0; i < FF_MEMLESS_EFFECTS; i++) | 389 | for (i = 0; i < FF_MEMLESS_EFFECTS; i++) |
389 | __clear_bit(FF_EFFECT_PLAYING, &ml->states[i].flags); | 390 | __clear_bit(FF_EFFECT_PLAYING, &ml->states[i].flags); |
390 | 391 | ||
391 | ml_play_effects(ml); | 392 | ml_play_effects(ml); |
392 | |||
393 | spin_unlock_bh(&ml->timer_lock); | ||
394 | } | 393 | } |
395 | 394 | ||
395 | /* | ||
396 | * Start/stop specified FF effect. Called with dev->event_lock held. | ||
397 | */ | ||
396 | static int ml_ff_playback(struct input_dev *dev, int effect_id, int value) | 398 | static int ml_ff_playback(struct input_dev *dev, int effect_id, int value) |
397 | { | 399 | { |
398 | struct ml_device *ml = dev->ff->private; | 400 | struct ml_device *ml = dev->ff->private; |
399 | struct ml_effect_state *state = &ml->states[effect_id]; | 401 | struct ml_effect_state *state = &ml->states[effect_id]; |
400 | unsigned long flags; | ||
401 | |||
402 | spin_lock_irqsave(&ml->timer_lock, flags); | ||
403 | 402 | ||
404 | if (value > 0) { | 403 | if (value > 0) { |
405 | debug("initiated play"); | 404 | debug("initiated play"); |
@@ -425,8 +424,6 @@ static int ml_ff_playback(struct input_dev *dev, int effect_id, int value) | |||
425 | ml_play_effects(ml); | 424 | ml_play_effects(ml); |
426 | } | 425 | } |
427 | 426 | ||
428 | spin_unlock_irqrestore(&ml->timer_lock, flags); | ||
429 | |||
430 | return 0; | 427 | return 0; |
431 | } | 428 | } |
432 | 429 | ||
@@ -436,7 +433,7 @@ static int ml_ff_upload(struct input_dev *dev, | |||
436 | struct ml_device *ml = dev->ff->private; | 433 | struct ml_device *ml = dev->ff->private; |
437 | struct ml_effect_state *state = &ml->states[effect->id]; | 434 | struct ml_effect_state *state = &ml->states[effect->id]; |
438 | 435 | ||
439 | spin_lock_bh(&ml->timer_lock); | 436 | spin_lock_irq(&dev->event_lock); |
440 | 437 | ||
441 | if (test_bit(FF_EFFECT_STARTED, &state->flags)) { | 438 | if (test_bit(FF_EFFECT_STARTED, &state->flags)) { |
442 | __clear_bit(FF_EFFECT_PLAYING, &state->flags); | 439 | __clear_bit(FF_EFFECT_PLAYING, &state->flags); |
@@ -448,7 +445,7 @@ static int ml_ff_upload(struct input_dev *dev, | |||
448 | ml_schedule_timer(ml); | 445 | ml_schedule_timer(ml); |
449 | } | 446 | } |
450 | 447 | ||
451 | spin_unlock_bh(&ml->timer_lock); | 448 | spin_unlock_irq(&dev->event_lock); |
452 | 449 | ||
453 | return 0; | 450 | return 0; |
454 | } | 451 | } |
@@ -482,7 +479,6 @@ int input_ff_create_memless(struct input_dev *dev, void *data, | |||
482 | ml->private = data; | 479 | ml->private = data; |
483 | ml->play_effect = play_effect; | 480 | ml->play_effect = play_effect; |
484 | ml->gain = 0xffff; | 481 | ml->gain = 0xffff; |
485 | spin_lock_init(&ml->timer_lock); | ||
486 | setup_timer(&ml->timer, ml_effect_timer, (unsigned long)dev); | 482 | setup_timer(&ml->timer, ml_effect_timer, (unsigned long)dev); |
487 | 483 | ||
488 | set_bit(FF_GAIN, dev->ffbit); | 484 | set_bit(FF_GAIN, dev->ffbit); |
diff --git a/drivers/input/input.c b/drivers/input/input.c index cc763c96fada..2266ecbfbc01 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -1292,17 +1292,24 @@ static int input_dev_uevent(struct device *device, struct kobj_uevent_env *env) | |||
1292 | return 0; | 1292 | return 0; |
1293 | } | 1293 | } |
1294 | 1294 | ||
1295 | #define INPUT_DO_TOGGLE(dev, type, bits, on) \ | 1295 | #define INPUT_DO_TOGGLE(dev, type, bits, on) \ |
1296 | do { \ | 1296 | do { \ |
1297 | int i; \ | 1297 | int i; \ |
1298 | if (!test_bit(EV_##type, dev->evbit)) \ | 1298 | bool active; \ |
1299 | break; \ | 1299 | \ |
1300 | for (i = 0; i < type##_MAX; i++) { \ | 1300 | if (!test_bit(EV_##type, dev->evbit)) \ |
1301 | if (!test_bit(i, dev->bits##bit) || \ | 1301 | break; \ |
1302 | !test_bit(i, dev->bits)) \ | 1302 | \ |
1303 | continue; \ | 1303 | for (i = 0; i < type##_MAX; i++) { \ |
1304 | dev->event(dev, EV_##type, i, on); \ | 1304 | if (!test_bit(i, dev->bits##bit)) \ |
1305 | } \ | 1305 | continue; \ |
1306 | \ | ||
1307 | active = test_bit(i, dev->bits); \ | ||
1308 | if (!active && !on) \ | ||
1309 | continue; \ | ||
1310 | \ | ||
1311 | dev->event(dev, EV_##type, i, on ? active : 0); \ | ||
1312 | } \ | ||
1306 | } while (0) | 1313 | } while (0) |
1307 | 1314 | ||
1308 | #ifdef CONFIG_PM | 1315 | #ifdef CONFIG_PM |
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 4452eabbee6d..28e6110d1ff8 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -1174,6 +1174,18 @@ static int atkbd_reconnect(struct serio *serio) | |||
1174 | return -1; | 1174 | return -1; |
1175 | 1175 | ||
1176 | atkbd_activate(atkbd); | 1176 | atkbd_activate(atkbd); |
1177 | |||
1178 | /* | ||
1179 | * Restore LED state and repeat rate. While input core | ||
1180 | * will do this for us at resume time reconnect may happen | ||
1181 | * because user requested it via sysfs or simply because | ||
1182 | * keyboard was unplugged and plugged in again so we need | ||
1183 | * to do it ourselves here. | ||
1184 | */ | ||
1185 | atkbd_set_leds(atkbd); | ||
1186 | if (!atkbd->softrepeat) | ||
1187 | atkbd_set_repeat_rate(atkbd); | ||
1188 | |||
1177 | } | 1189 | } |
1178 | 1190 | ||
1179 | atkbd_enable(atkbd); | 1191 | atkbd_enable(atkbd); |
@@ -1422,6 +1434,7 @@ static ssize_t atkbd_set_set(struct atkbd *atkbd, const char *buf, size_t count) | |||
1422 | 1434 | ||
1423 | atkbd->dev = new_dev; | 1435 | atkbd->dev = new_dev; |
1424 | atkbd->set = atkbd_select_set(atkbd, value, atkbd->extra); | 1436 | atkbd->set = atkbd_select_set(atkbd, value, atkbd->extra); |
1437 | atkbd_reset_state(atkbd); | ||
1425 | atkbd_activate(atkbd); | 1438 | atkbd_activate(atkbd); |
1426 | atkbd_set_keycode_table(atkbd); | 1439 | atkbd_set_keycode_table(atkbd); |
1427 | atkbd_set_device_attrs(atkbd); | 1440 | atkbd_set_device_attrs(atkbd); |
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index 690aed905436..5bd64841bf1c 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -1673,7 +1673,7 @@ static int psmouse_get_maxproto(char *buffer, struct kernel_param *kp) | |||
1673 | { | 1673 | { |
1674 | int type = *((unsigned int *)kp->arg); | 1674 | int type = *((unsigned int *)kp->arg); |
1675 | 1675 | ||
1676 | return sprintf(buffer, "%s\n", psmouse_protocol_by_type(type)->name); | 1676 | return sprintf(buffer, "%s", psmouse_protocol_by_type(type)->name); |
1677 | } | 1677 | } |
1678 | 1678 | ||
1679 | static int __init psmouse_init(void) | 1679 | static int __init psmouse_init(void) |
diff --git a/drivers/md/md.c b/drivers/md/md.c index e64c971038d1..b182f86a19dd 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -944,6 +944,14 @@ static int super_90_validate(mddev_t *mddev, mdk_rdev_t *rdev) | |||
944 | desc->raid_disk < mddev->raid_disks */) { | 944 | desc->raid_disk < mddev->raid_disks */) { |
945 | set_bit(In_sync, &rdev->flags); | 945 | set_bit(In_sync, &rdev->flags); |
946 | rdev->raid_disk = desc->raid_disk; | 946 | rdev->raid_disk = desc->raid_disk; |
947 | } else if (desc->state & (1<<MD_DISK_ACTIVE)) { | ||
948 | /* active but not in sync implies recovery up to | ||
949 | * reshape position. We don't know exactly where | ||
950 | * that is, so set to zero for now */ | ||
951 | if (mddev->minor_version >= 91) { | ||
952 | rdev->recovery_offset = 0; | ||
953 | rdev->raid_disk = desc->raid_disk; | ||
954 | } | ||
947 | } | 955 | } |
948 | if (desc->state & (1<<MD_DISK_WRITEMOSTLY)) | 956 | if (desc->state & (1<<MD_DISK_WRITEMOSTLY)) |
949 | set_bit(WriteMostly, &rdev->flags); | 957 | set_bit(WriteMostly, &rdev->flags); |
@@ -1032,8 +1040,19 @@ static void super_90_sync(mddev_t *mddev, mdk_rdev_t *rdev) | |||
1032 | list_for_each_entry(rdev2, &mddev->disks, same_set) { | 1040 | list_for_each_entry(rdev2, &mddev->disks, same_set) { |
1033 | mdp_disk_t *d; | 1041 | mdp_disk_t *d; |
1034 | int desc_nr; | 1042 | int desc_nr; |
1035 | if (rdev2->raid_disk >= 0 && test_bit(In_sync, &rdev2->flags) | 1043 | int is_active = test_bit(In_sync, &rdev2->flags); |
1036 | && !test_bit(Faulty, &rdev2->flags)) | 1044 | |
1045 | if (rdev2->raid_disk >= 0 && | ||
1046 | sb->minor_version >= 91) | ||
1047 | /* we have nowhere to store the recovery_offset, | ||
1048 | * but if it is not below the reshape_position, | ||
1049 | * we can piggy-back on that. | ||
1050 | */ | ||
1051 | is_active = 1; | ||
1052 | if (rdev2->raid_disk < 0 || | ||
1053 | test_bit(Faulty, &rdev2->flags)) | ||
1054 | is_active = 0; | ||
1055 | if (is_active) | ||
1037 | desc_nr = rdev2->raid_disk; | 1056 | desc_nr = rdev2->raid_disk; |
1038 | else | 1057 | else |
1039 | desc_nr = next_spare++; | 1058 | desc_nr = next_spare++; |
@@ -1043,16 +1062,16 @@ static void super_90_sync(mddev_t *mddev, mdk_rdev_t *rdev) | |||
1043 | d->number = rdev2->desc_nr; | 1062 | d->number = rdev2->desc_nr; |
1044 | d->major = MAJOR(rdev2->bdev->bd_dev); | 1063 | d->major = MAJOR(rdev2->bdev->bd_dev); |
1045 | d->minor = MINOR(rdev2->bdev->bd_dev); | 1064 | d->minor = MINOR(rdev2->bdev->bd_dev); |
1046 | if (rdev2->raid_disk >= 0 && test_bit(In_sync, &rdev2->flags) | 1065 | if (is_active) |
1047 | && !test_bit(Faulty, &rdev2->flags)) | ||
1048 | d->raid_disk = rdev2->raid_disk; | 1066 | d->raid_disk = rdev2->raid_disk; |
1049 | else | 1067 | else |
1050 | d->raid_disk = rdev2->desc_nr; /* compatibility */ | 1068 | d->raid_disk = rdev2->desc_nr; /* compatibility */ |
1051 | if (test_bit(Faulty, &rdev2->flags)) | 1069 | if (test_bit(Faulty, &rdev2->flags)) |
1052 | d->state = (1<<MD_DISK_FAULTY); | 1070 | d->state = (1<<MD_DISK_FAULTY); |
1053 | else if (test_bit(In_sync, &rdev2->flags)) { | 1071 | else if (is_active) { |
1054 | d->state = (1<<MD_DISK_ACTIVE); | 1072 | d->state = (1<<MD_DISK_ACTIVE); |
1055 | d->state |= (1<<MD_DISK_SYNC); | 1073 | if (test_bit(In_sync, &rdev2->flags)) |
1074 | d->state |= (1<<MD_DISK_SYNC); | ||
1056 | active++; | 1075 | active++; |
1057 | working++; | 1076 | working++; |
1058 | } else { | 1077 | } else { |
@@ -1382,8 +1401,6 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev) | |||
1382 | 1401 | ||
1383 | if (rdev->raid_disk >= 0 && | 1402 | if (rdev->raid_disk >= 0 && |
1384 | !test_bit(In_sync, &rdev->flags)) { | 1403 | !test_bit(In_sync, &rdev->flags)) { |
1385 | if (mddev->curr_resync_completed > rdev->recovery_offset) | ||
1386 | rdev->recovery_offset = mddev->curr_resync_completed; | ||
1387 | if (rdev->recovery_offset > 0) { | 1404 | if (rdev->recovery_offset > 0) { |
1388 | sb->feature_map |= | 1405 | sb->feature_map |= |
1389 | cpu_to_le32(MD_FEATURE_RECOVERY_OFFSET); | 1406 | cpu_to_le32(MD_FEATURE_RECOVERY_OFFSET); |
@@ -1917,6 +1934,14 @@ static void sync_sbs(mddev_t * mddev, int nospares) | |||
1917 | */ | 1934 | */ |
1918 | mdk_rdev_t *rdev; | 1935 | mdk_rdev_t *rdev; |
1919 | 1936 | ||
1937 | /* First make sure individual recovery_offsets are correct */ | ||
1938 | list_for_each_entry(rdev, &mddev->disks, same_set) { | ||
1939 | if (rdev->raid_disk >= 0 && | ||
1940 | !test_bit(In_sync, &rdev->flags) && | ||
1941 | mddev->curr_resync_completed > rdev->recovery_offset) | ||
1942 | rdev->recovery_offset = mddev->curr_resync_completed; | ||
1943 | |||
1944 | } | ||
1920 | list_for_each_entry(rdev, &mddev->disks, same_set) { | 1945 | list_for_each_entry(rdev, &mddev->disks, same_set) { |
1921 | if (rdev->sb_events == mddev->events || | 1946 | if (rdev->sb_events == mddev->events || |
1922 | (nospares && | 1947 | (nospares && |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index dcce204b6c73..d29215d966da 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -4823,11 +4823,40 @@ static raid5_conf_t *setup_conf(mddev_t *mddev) | |||
4823 | return ERR_PTR(-ENOMEM); | 4823 | return ERR_PTR(-ENOMEM); |
4824 | } | 4824 | } |
4825 | 4825 | ||
4826 | |||
4827 | static int only_parity(int raid_disk, int algo, int raid_disks, int max_degraded) | ||
4828 | { | ||
4829 | switch (algo) { | ||
4830 | case ALGORITHM_PARITY_0: | ||
4831 | if (raid_disk < max_degraded) | ||
4832 | return 1; | ||
4833 | break; | ||
4834 | case ALGORITHM_PARITY_N: | ||
4835 | if (raid_disk >= raid_disks - max_degraded) | ||
4836 | return 1; | ||
4837 | break; | ||
4838 | case ALGORITHM_PARITY_0_6: | ||
4839 | if (raid_disk == 0 || | ||
4840 | raid_disk == raid_disks - 1) | ||
4841 | return 1; | ||
4842 | break; | ||
4843 | case ALGORITHM_LEFT_ASYMMETRIC_6: | ||
4844 | case ALGORITHM_RIGHT_ASYMMETRIC_6: | ||
4845 | case ALGORITHM_LEFT_SYMMETRIC_6: | ||
4846 | case ALGORITHM_RIGHT_SYMMETRIC_6: | ||
4847 | if (raid_disk == raid_disks - 1) | ||
4848 | return 1; | ||
4849 | } | ||
4850 | return 0; | ||
4851 | } | ||
4852 | |||
4826 | static int run(mddev_t *mddev) | 4853 | static int run(mddev_t *mddev) |
4827 | { | 4854 | { |
4828 | raid5_conf_t *conf; | 4855 | raid5_conf_t *conf; |
4829 | int working_disks = 0, chunk_size; | 4856 | int working_disks = 0, chunk_size; |
4857 | int dirty_parity_disks = 0; | ||
4830 | mdk_rdev_t *rdev; | 4858 | mdk_rdev_t *rdev; |
4859 | sector_t reshape_offset = 0; | ||
4831 | 4860 | ||
4832 | if (mddev->recovery_cp != MaxSector) | 4861 | if (mddev->recovery_cp != MaxSector) |
4833 | printk(KERN_NOTICE "raid5: %s is not clean" | 4862 | printk(KERN_NOTICE "raid5: %s is not clean" |
@@ -4861,6 +4890,7 @@ static int run(mddev_t *mddev) | |||
4861 | "on a stripe boundary\n"); | 4890 | "on a stripe boundary\n"); |
4862 | return -EINVAL; | 4891 | return -EINVAL; |
4863 | } | 4892 | } |
4893 | reshape_offset = here_new * mddev->new_chunk_sectors; | ||
4864 | /* here_new is the stripe we will write to */ | 4894 | /* here_new is the stripe we will write to */ |
4865 | here_old = mddev->reshape_position; | 4895 | here_old = mddev->reshape_position; |
4866 | sector_div(here_old, mddev->chunk_sectors * | 4896 | sector_div(here_old, mddev->chunk_sectors * |
@@ -4916,10 +4946,51 @@ static int run(mddev_t *mddev) | |||
4916 | /* | 4946 | /* |
4917 | * 0 for a fully functional array, 1 or 2 for a degraded array. | 4947 | * 0 for a fully functional array, 1 or 2 for a degraded array. |
4918 | */ | 4948 | */ |
4919 | list_for_each_entry(rdev, &mddev->disks, same_set) | 4949 | list_for_each_entry(rdev, &mddev->disks, same_set) { |
4920 | if (rdev->raid_disk >= 0 && | 4950 | if (rdev->raid_disk < 0) |
4921 | test_bit(In_sync, &rdev->flags)) | 4951 | continue; |
4952 | if (test_bit(In_sync, &rdev->flags)) | ||
4922 | working_disks++; | 4953 | working_disks++; |
4954 | /* This disc is not fully in-sync. However if it | ||
4955 | * just stored parity (beyond the recovery_offset), | ||
4956 | * when we don't need to be concerned about the | ||
4957 | * array being dirty. | ||
4958 | * When reshape goes 'backwards', we never have | ||
4959 | * partially completed devices, so we only need | ||
4960 | * to worry about reshape going forwards. | ||
4961 | */ | ||
4962 | /* Hack because v0.91 doesn't store recovery_offset properly. */ | ||
4963 | if (mddev->major_version == 0 && | ||
4964 | mddev->minor_version > 90) | ||
4965 | rdev->recovery_offset = reshape_offset; | ||
4966 | |||
4967 | printk("%d: w=%d pa=%d pr=%d m=%d a=%d r=%d op1=%d op2=%d\n", | ||
4968 | rdev->raid_disk, working_disks, conf->prev_algo, | ||
4969 | conf->previous_raid_disks, conf->max_degraded, | ||
4970 | conf->algorithm, conf->raid_disks, | ||
4971 | only_parity(rdev->raid_disk, | ||
4972 | conf->prev_algo, | ||
4973 | conf->previous_raid_disks, | ||
4974 | conf->max_degraded), | ||
4975 | only_parity(rdev->raid_disk, | ||
4976 | conf->algorithm, | ||
4977 | conf->raid_disks, | ||
4978 | conf->max_degraded)); | ||
4979 | if (rdev->recovery_offset < reshape_offset) { | ||
4980 | /* We need to check old and new layout */ | ||
4981 | if (!only_parity(rdev->raid_disk, | ||
4982 | conf->algorithm, | ||
4983 | conf->raid_disks, | ||
4984 | conf->max_degraded)) | ||
4985 | continue; | ||
4986 | } | ||
4987 | if (!only_parity(rdev->raid_disk, | ||
4988 | conf->prev_algo, | ||
4989 | conf->previous_raid_disks, | ||
4990 | conf->max_degraded)) | ||
4991 | continue; | ||
4992 | dirty_parity_disks++; | ||
4993 | } | ||
4923 | 4994 | ||
4924 | mddev->degraded = (max(conf->raid_disks, conf->previous_raid_disks) | 4995 | mddev->degraded = (max(conf->raid_disks, conf->previous_raid_disks) |
4925 | - working_disks); | 4996 | - working_disks); |
@@ -4935,7 +5006,7 @@ static int run(mddev_t *mddev) | |||
4935 | mddev->dev_sectors &= ~(mddev->chunk_sectors - 1); | 5006 | mddev->dev_sectors &= ~(mddev->chunk_sectors - 1); |
4936 | mddev->resync_max_sectors = mddev->dev_sectors; | 5007 | mddev->resync_max_sectors = mddev->dev_sectors; |
4937 | 5008 | ||
4938 | if (mddev->degraded > 0 && | 5009 | if (mddev->degraded > dirty_parity_disks && |
4939 | mddev->recovery_cp != MaxSector) { | 5010 | mddev->recovery_cp != MaxSector) { |
4940 | if (mddev->ok_start_degraded) | 5011 | if (mddev->ok_start_degraded) |
4941 | printk(KERN_WARNING | 5012 | printk(KERN_WARNING |
@@ -5361,9 +5432,11 @@ static int raid5_start_reshape(mddev_t *mddev) | |||
5361 | !test_bit(Faulty, &rdev->flags)) { | 5432 | !test_bit(Faulty, &rdev->flags)) { |
5362 | if (raid5_add_disk(mddev, rdev) == 0) { | 5433 | if (raid5_add_disk(mddev, rdev) == 0) { |
5363 | char nm[20]; | 5434 | char nm[20]; |
5364 | set_bit(In_sync, &rdev->flags); | 5435 | if (rdev->raid_disk >= conf->previous_raid_disks) |
5436 | set_bit(In_sync, &rdev->flags); | ||
5437 | else | ||
5438 | rdev->recovery_offset = 0; | ||
5365 | added_devices++; | 5439 | added_devices++; |
5366 | rdev->recovery_offset = 0; | ||
5367 | sprintf(nm, "rd%d", rdev->raid_disk); | 5440 | sprintf(nm, "rd%d", rdev->raid_disk); |
5368 | if (sysfs_create_link(&mddev->kobj, | 5441 | if (sysfs_create_link(&mddev->kobj, |
5369 | &rdev->kobj, nm)) | 5442 | &rdev->kobj, nm)) |
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c index fdb97f3d30e9..d7a47574d21e 100644 --- a/drivers/mtd/maps/sa1100-flash.c +++ b/drivers/mtd/maps/sa1100-flash.c | |||
@@ -209,8 +209,8 @@ static int sa1100_probe_subdev(struct sa_subdev_info *subdev, struct resource *r | |||
209 | } | 209 | } |
210 | subdev->mtd->owner = THIS_MODULE; | 210 | subdev->mtd->owner = THIS_MODULE; |
211 | 211 | ||
212 | printk(KERN_INFO "SA1100 flash: CFI device at 0x%08lx, %dMiB, " | 212 | printk(KERN_INFO "SA1100 flash: CFI device at 0x%08lx, %uMiB, %d-bit\n", |
213 | "%d-bit\n", phys, subdev->mtd->size >> 20, | 213 | phys, (unsigned)(subdev->mtd->size >> 20), |
214 | subdev->map.bankwidth * 8); | 214 | subdev->map.bankwidth * 8); |
215 | 215 | ||
216 | return 0; | 216 | return 0; |
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index 22b02c6df854..e5f8fc164fd3 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c | |||
@@ -175,15 +175,6 @@ dmar_parse_one_drhd(struct acpi_dmar_header *header) | |||
175 | int ret = 0; | 175 | int ret = 0; |
176 | 176 | ||
177 | drhd = (struct acpi_dmar_hardware_unit *)header; | 177 | drhd = (struct acpi_dmar_hardware_unit *)header; |
178 | if (!drhd->address) { | ||
179 | /* Promote an attitude of violence to a BIOS engineer today */ | ||
180 | WARN(1, "Your BIOS is broken; DMAR reported at address zero!\n" | ||
181 | "BIOS vendor: %s; Ver: %s; Product Version: %s\n", | ||
182 | dmi_get_system_info(DMI_BIOS_VENDOR), | ||
183 | dmi_get_system_info(DMI_BIOS_VERSION), | ||
184 | dmi_get_system_info(DMI_PRODUCT_VERSION)); | ||
185 | return -ENODEV; | ||
186 | } | ||
187 | dmaru = kzalloc(sizeof(*dmaru), GFP_KERNEL); | 178 | dmaru = kzalloc(sizeof(*dmaru), GFP_KERNEL); |
188 | if (!dmaru) | 179 | if (!dmaru) |
189 | return -ENOMEM; | 180 | return -ENOMEM; |
@@ -591,12 +582,50 @@ int __init dmar_table_init(void) | |||
591 | return 0; | 582 | return 0; |
592 | } | 583 | } |
593 | 584 | ||
585 | int __init check_zero_address(void) | ||
586 | { | ||
587 | struct acpi_table_dmar *dmar; | ||
588 | struct acpi_dmar_header *entry_header; | ||
589 | struct acpi_dmar_hardware_unit *drhd; | ||
590 | |||
591 | dmar = (struct acpi_table_dmar *)dmar_tbl; | ||
592 | entry_header = (struct acpi_dmar_header *)(dmar + 1); | ||
593 | |||
594 | while (((unsigned long)entry_header) < | ||
595 | (((unsigned long)dmar) + dmar_tbl->length)) { | ||
596 | /* Avoid looping forever on bad ACPI tables */ | ||
597 | if (entry_header->length == 0) { | ||
598 | printk(KERN_WARNING PREFIX | ||
599 | "Invalid 0-length structure\n"); | ||
600 | return 0; | ||
601 | } | ||
602 | |||
603 | if (entry_header->type == ACPI_DMAR_TYPE_HARDWARE_UNIT) { | ||
604 | drhd = (void *)entry_header; | ||
605 | if (!drhd->address) { | ||
606 | /* Promote an attitude of violence to a BIOS engineer today */ | ||
607 | WARN(1, "Your BIOS is broken; DMAR reported at address zero!\n" | ||
608 | "BIOS vendor: %s; Ver: %s; Product Version: %s\n", | ||
609 | dmi_get_system_info(DMI_BIOS_VENDOR), | ||
610 | dmi_get_system_info(DMI_BIOS_VERSION), | ||
611 | dmi_get_system_info(DMI_PRODUCT_VERSION)); | ||
612 | return 0; | ||
613 | } | ||
614 | break; | ||
615 | } | ||
616 | |||
617 | entry_header = ((void *)entry_header + entry_header->length); | ||
618 | } | ||
619 | return 1; | ||
620 | } | ||
621 | |||
594 | void __init detect_intel_iommu(void) | 622 | void __init detect_intel_iommu(void) |
595 | { | 623 | { |
596 | int ret; | 624 | int ret; |
597 | 625 | ||
598 | ret = dmar_table_detect(); | 626 | ret = dmar_table_detect(); |
599 | 627 | if (ret) | |
628 | ret = check_zero_address(); | ||
600 | { | 629 | { |
601 | #ifdef CONFIG_INTR_REMAP | 630 | #ifdef CONFIG_INTR_REMAP |
602 | struct acpi_table_dmar *dmar; | 631 | struct acpi_table_dmar *dmar; |
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index b1e97e682500..1840a0578a42 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -2767,7 +2767,15 @@ static void *intel_alloc_coherent(struct device *hwdev, size_t size, | |||
2767 | 2767 | ||
2768 | size = PAGE_ALIGN(size); | 2768 | size = PAGE_ALIGN(size); |
2769 | order = get_order(size); | 2769 | order = get_order(size); |
2770 | flags &= ~(GFP_DMA | GFP_DMA32); | 2770 | |
2771 | if (!iommu_no_mapping(hwdev)) | ||
2772 | flags &= ~(GFP_DMA | GFP_DMA32); | ||
2773 | else if (hwdev->coherent_dma_mask < dma_get_required_mask(hwdev)) { | ||
2774 | if (hwdev->coherent_dma_mask < DMA_BIT_MASK(32)) | ||
2775 | flags |= GFP_DMA; | ||
2776 | else | ||
2777 | flags |= GFP_DMA32; | ||
2778 | } | ||
2771 | 2779 | ||
2772 | vaddr = (void *)__get_free_pages(flags, order); | 2780 | vaddr = (void *)__get_free_pages(flags, order); |
2773 | if (!vaddr) | 2781 | if (!vaddr) |
@@ -3207,6 +3215,33 @@ static int __init init_iommu_sysfs(void) | |||
3207 | } | 3215 | } |
3208 | #endif /* CONFIG_PM */ | 3216 | #endif /* CONFIG_PM */ |
3209 | 3217 | ||
3218 | /* | ||
3219 | * Here we only respond to action of unbound device from driver. | ||
3220 | * | ||
3221 | * Added device is not attached to its DMAR domain here yet. That will happen | ||
3222 | * when mapping the device to iova. | ||
3223 | */ | ||
3224 | static int device_notifier(struct notifier_block *nb, | ||
3225 | unsigned long action, void *data) | ||
3226 | { | ||
3227 | struct device *dev = data; | ||
3228 | struct pci_dev *pdev = to_pci_dev(dev); | ||
3229 | struct dmar_domain *domain; | ||
3230 | |||
3231 | domain = find_domain(pdev); | ||
3232 | if (!domain) | ||
3233 | return 0; | ||
3234 | |||
3235 | if (action == BUS_NOTIFY_UNBOUND_DRIVER && !iommu_pass_through) | ||
3236 | domain_remove_one_dev_info(domain, pdev); | ||
3237 | |||
3238 | return 0; | ||
3239 | } | ||
3240 | |||
3241 | static struct notifier_block device_nb = { | ||
3242 | .notifier_call = device_notifier, | ||
3243 | }; | ||
3244 | |||
3210 | int __init intel_iommu_init(void) | 3245 | int __init intel_iommu_init(void) |
3211 | { | 3246 | { |
3212 | int ret = 0; | 3247 | int ret = 0; |
@@ -3259,6 +3294,8 @@ int __init intel_iommu_init(void) | |||
3259 | 3294 | ||
3260 | register_iommu(&intel_iommu_ops); | 3295 | register_iommu(&intel_iommu_ops); |
3261 | 3296 | ||
3297 | bus_register_notifier(&pci_bus_type, &device_nb); | ||
3298 | |||
3262 | return 0; | 3299 | return 0; |
3263 | } | 3300 | } |
3264 | 3301 | ||
diff --git a/drivers/rtc/rtc-coh901331.c b/drivers/rtc/rtc-coh901331.c index 7fe1fa26c52c..03ea530981d1 100644 --- a/drivers/rtc/rtc-coh901331.c +++ b/drivers/rtc/rtc-coh901331.c | |||
@@ -58,7 +58,16 @@ static irqreturn_t coh901331_interrupt(int irq, void *data) | |||
58 | clk_enable(rtap->clk); | 58 | clk_enable(rtap->clk); |
59 | /* Ack IRQ */ | 59 | /* Ack IRQ */ |
60 | writel(1, rtap->virtbase + COH901331_IRQ_EVENT); | 60 | writel(1, rtap->virtbase + COH901331_IRQ_EVENT); |
61 | /* | ||
62 | * Disable the interrupt. This is necessary because | ||
63 | * the RTC lives on a lower-clocked line and will | ||
64 | * not release the IRQ line until after a few (slower) | ||
65 | * clock cycles. The interrupt will be re-enabled when | ||
66 | * a new alarm is set anyway. | ||
67 | */ | ||
68 | writel(0, rtap->virtbase + COH901331_IRQ_MASK); | ||
61 | clk_disable(rtap->clk); | 69 | clk_disable(rtap->clk); |
70 | |||
62 | /* Set alarm flag */ | 71 | /* Set alarm flag */ |
63 | rtc_update_irq(rtap->rtc, 1, RTC_AF); | 72 | rtc_update_irq(rtap->rtc, 1, RTC_AF); |
64 | 73 | ||
@@ -128,6 +137,8 @@ static int coh901331_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
128 | else | 137 | else |
129 | writel(0, rtap->virtbase + COH901331_IRQ_MASK); | 138 | writel(0, rtap->virtbase + COH901331_IRQ_MASK); |
130 | clk_disable(rtap->clk); | 139 | clk_disable(rtap->clk); |
140 | |||
141 | return 0; | ||
131 | } | 142 | } |
132 | 143 | ||
133 | static struct rtc_class_ops coh901331_ops = { | 144 | static struct rtc_class_ops coh901331_ops = { |
diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c index 89ece1c235aa..66e21dd23154 100644 --- a/drivers/s390/char/monreader.c +++ b/drivers/s390/char/monreader.c | |||
@@ -357,6 +357,7 @@ static int mon_close(struct inode *inode, struct file *filp) | |||
357 | atomic_set(&monpriv->msglim_count, 0); | 357 | atomic_set(&monpriv->msglim_count, 0); |
358 | monpriv->write_index = 0; | 358 | monpriv->write_index = 0; |
359 | monpriv->read_index = 0; | 359 | monpriv->read_index = 0; |
360 | dev_set_drvdata(monreader_device, NULL); | ||
360 | 361 | ||
361 | for (i = 0; i < MON_MSGLIM; i++) | 362 | for (i = 0; i < MON_MSGLIM; i++) |
362 | kfree(monpriv->msg_array[i]); | 363 | kfree(monpriv->msg_array[i]); |
diff --git a/drivers/s390/char/sclp_quiesce.c b/drivers/s390/char/sclp_quiesce.c index 84c191c1cd62..05909a7df8b3 100644 --- a/drivers/s390/char/sclp_quiesce.c +++ b/drivers/s390/char/sclp_quiesce.c | |||
@@ -20,9 +20,12 @@ | |||
20 | 20 | ||
21 | #include "sclp.h" | 21 | #include "sclp.h" |
22 | 22 | ||
23 | static void (*old_machine_restart)(char *); | ||
24 | static void (*old_machine_halt)(void); | ||
25 | static void (*old_machine_power_off)(void); | ||
26 | |||
23 | /* Shutdown handler. Signal completion of shutdown by loading special PSW. */ | 27 | /* Shutdown handler. Signal completion of shutdown by loading special PSW. */ |
24 | static void | 28 | static void do_machine_quiesce(void) |
25 | do_machine_quiesce(void) | ||
26 | { | 29 | { |
27 | psw_t quiesce_psw; | 30 | psw_t quiesce_psw; |
28 | 31 | ||
@@ -33,23 +36,48 @@ do_machine_quiesce(void) | |||
33 | } | 36 | } |
34 | 37 | ||
35 | /* Handler for quiesce event. Start shutdown procedure. */ | 38 | /* Handler for quiesce event. Start shutdown procedure. */ |
36 | static void | 39 | static void sclp_quiesce_handler(struct evbuf_header *evbuf) |
37 | sclp_quiesce_handler(struct evbuf_header *evbuf) | ||
38 | { | 40 | { |
39 | _machine_restart = (void *) do_machine_quiesce; | 41 | if (_machine_restart != (void *) do_machine_quiesce) { |
40 | _machine_halt = do_machine_quiesce; | 42 | old_machine_restart = _machine_restart; |
41 | _machine_power_off = do_machine_quiesce; | 43 | old_machine_halt = _machine_halt; |
44 | old_machine_power_off = _machine_power_off; | ||
45 | _machine_restart = (void *) do_machine_quiesce; | ||
46 | _machine_halt = do_machine_quiesce; | ||
47 | _machine_power_off = do_machine_quiesce; | ||
48 | } | ||
42 | ctrl_alt_del(); | 49 | ctrl_alt_del(); |
43 | } | 50 | } |
44 | 51 | ||
52 | /* Undo machine restart/halt/power_off modification on resume */ | ||
53 | static void sclp_quiesce_pm_event(struct sclp_register *reg, | ||
54 | enum sclp_pm_event sclp_pm_event) | ||
55 | { | ||
56 | switch (sclp_pm_event) { | ||
57 | case SCLP_PM_EVENT_RESTORE: | ||
58 | if (old_machine_restart) { | ||
59 | _machine_restart = old_machine_restart; | ||
60 | _machine_halt = old_machine_halt; | ||
61 | _machine_power_off = old_machine_power_off; | ||
62 | old_machine_restart = NULL; | ||
63 | old_machine_halt = NULL; | ||
64 | old_machine_power_off = NULL; | ||
65 | } | ||
66 | break; | ||
67 | case SCLP_PM_EVENT_FREEZE: | ||
68 | case SCLP_PM_EVENT_THAW: | ||
69 | break; | ||
70 | } | ||
71 | } | ||
72 | |||
45 | static struct sclp_register sclp_quiesce_event = { | 73 | static struct sclp_register sclp_quiesce_event = { |
46 | .receive_mask = EVTYP_SIGQUIESCE_MASK, | 74 | .receive_mask = EVTYP_SIGQUIESCE_MASK, |
47 | .receiver_fn = sclp_quiesce_handler | 75 | .receiver_fn = sclp_quiesce_handler, |
76 | .pm_event_fn = sclp_quiesce_pm_event | ||
48 | }; | 77 | }; |
49 | 78 | ||
50 | /* Initialize quiesce driver. */ | 79 | /* Initialize quiesce driver. */ |
51 | static int __init | 80 | static int __init sclp_quiesce_init(void) |
52 | sclp_quiesce_init(void) | ||
53 | { | 81 | { |
54 | return sclp_register(&sclp_quiesce_event); | 82 | return sclp_register(&sclp_quiesce_event); |
55 | } | 83 | } |
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c index edf926e1062f..d0a2ce1b4324 100644 --- a/fs/nfsd/nfs3xdr.c +++ b/fs/nfsd/nfs3xdr.c | |||
@@ -958,7 +958,7 @@ encode_entry(struct readdir_cd *ccd, const char *name, int namlen, | |||
958 | p1 = encode_entry_baggage(cd, p1, name, namlen, ino); | 958 | p1 = encode_entry_baggage(cd, p1, name, namlen, ino); |
959 | 959 | ||
960 | if (plus) | 960 | if (plus) |
961 | p = encode_entryplus_baggage(cd, p1, name, namlen); | 961 | p1 = encode_entryplus_baggage(cd, p1, name, namlen); |
962 | 962 | ||
963 | /* determine entry word length and lengths to go in pages */ | 963 | /* determine entry word length and lengths to go in pages */ |
964 | num_entry_words = p1 - tmp; | 964 | num_entry_words = p1 - tmp; |
diff --git a/include/linux/input.h b/include/linux/input.h index 0ccfc30cd40f..c2b1a7d244d9 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -1377,6 +1377,10 @@ extern struct class input_class; | |||
1377 | * methods; erase() is optional. set_gain() and set_autocenter() need | 1377 | * methods; erase() is optional. set_gain() and set_autocenter() need |
1378 | * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER | 1378 | * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER |
1379 | * bits. | 1379 | * bits. |
1380 | * | ||
1381 | * Note that playback(), set_gain() and set_autocenter() are called with | ||
1382 | * dev->event_lock spinlock held and interrupts off and thus may not | ||
1383 | * sleep. | ||
1380 | */ | 1384 | */ |
1381 | struct ff_device { | 1385 | struct ff_device { |
1382 | int (*upload)(struct input_dev *dev, struct ff_effect *effect, | 1386 | int (*upload)(struct input_dev *dev, struct ff_effect *effect, |
diff --git a/mm/percpu.c b/mm/percpu.c index d90797160c2a..5adfc268b408 100644 --- a/mm/percpu.c +++ b/mm/percpu.c | |||
@@ -355,62 +355,86 @@ static struct pcpu_chunk *pcpu_chunk_addr_search(void *addr) | |||
355 | } | 355 | } |
356 | 356 | ||
357 | /** | 357 | /** |
358 | * pcpu_extend_area_map - extend area map for allocation | 358 | * pcpu_need_to_extend - determine whether chunk area map needs to be extended |
359 | * @chunk: target chunk | 359 | * @chunk: chunk of interest |
360 | * | 360 | * |
361 | * Extend area map of @chunk so that it can accomodate an allocation. | 361 | * Determine whether area map of @chunk needs to be extended to |
362 | * A single allocation can split an area into three areas, so this | 362 | * accomodate a new allocation. |
363 | * function makes sure that @chunk->map has at least two extra slots. | ||
364 | * | 363 | * |
365 | * CONTEXT: | 364 | * CONTEXT: |
366 | * pcpu_alloc_mutex, pcpu_lock. pcpu_lock is released and reacquired | 365 | * pcpu_lock. |
367 | * if area map is extended. | ||
368 | * | 366 | * |
369 | * RETURNS: | 367 | * RETURNS: |
370 | * 0 if noop, 1 if successfully extended, -errno on failure. | 368 | * New target map allocation length if extension is necessary, 0 |
369 | * otherwise. | ||
371 | */ | 370 | */ |
372 | static int pcpu_extend_area_map(struct pcpu_chunk *chunk, unsigned long *flags) | 371 | static int pcpu_need_to_extend(struct pcpu_chunk *chunk) |
373 | { | 372 | { |
374 | int new_alloc; | 373 | int new_alloc; |
375 | int *new; | ||
376 | size_t size; | ||
377 | 374 | ||
378 | /* has enough? */ | ||
379 | if (chunk->map_alloc >= chunk->map_used + 2) | 375 | if (chunk->map_alloc >= chunk->map_used + 2) |
380 | return 0; | 376 | return 0; |
381 | 377 | ||
382 | spin_unlock_irqrestore(&pcpu_lock, *flags); | ||
383 | |||
384 | new_alloc = PCPU_DFL_MAP_ALLOC; | 378 | new_alloc = PCPU_DFL_MAP_ALLOC; |
385 | while (new_alloc < chunk->map_used + 2) | 379 | while (new_alloc < chunk->map_used + 2) |
386 | new_alloc *= 2; | 380 | new_alloc *= 2; |
387 | 381 | ||
388 | new = pcpu_mem_alloc(new_alloc * sizeof(new[0])); | 382 | return new_alloc; |
389 | if (!new) { | 383 | } |
390 | spin_lock_irqsave(&pcpu_lock, *flags); | 384 | |
385 | /** | ||
386 | * pcpu_extend_area_map - extend area map of a chunk | ||
387 | * @chunk: chunk of interest | ||
388 | * @new_alloc: new target allocation length of the area map | ||
389 | * | ||
390 | * Extend area map of @chunk to have @new_alloc entries. | ||
391 | * | ||
392 | * CONTEXT: | ||
393 | * Does GFP_KERNEL allocation. Grabs and releases pcpu_lock. | ||
394 | * | ||
395 | * RETURNS: | ||
396 | * 0 on success, -errno on failure. | ||
397 | */ | ||
398 | static int pcpu_extend_area_map(struct pcpu_chunk *chunk, int new_alloc) | ||
399 | { | ||
400 | int *old = NULL, *new = NULL; | ||
401 | size_t old_size = 0, new_size = new_alloc * sizeof(new[0]); | ||
402 | unsigned long flags; | ||
403 | |||
404 | new = pcpu_mem_alloc(new_size); | ||
405 | if (!new) | ||
391 | return -ENOMEM; | 406 | return -ENOMEM; |
392 | } | ||
393 | 407 | ||
394 | /* | 408 | /* acquire pcpu_lock and switch to new area map */ |
395 | * Acquire pcpu_lock and switch to new area map. Only free | 409 | spin_lock_irqsave(&pcpu_lock, flags); |
396 | * could have happened inbetween, so map_used couldn't have | 410 | |
397 | * grown. | 411 | if (new_alloc <= chunk->map_alloc) |
398 | */ | 412 | goto out_unlock; |
399 | spin_lock_irqsave(&pcpu_lock, *flags); | ||
400 | BUG_ON(new_alloc < chunk->map_used + 2); | ||
401 | 413 | ||
402 | size = chunk->map_alloc * sizeof(chunk->map[0]); | 414 | old_size = chunk->map_alloc * sizeof(chunk->map[0]); |
403 | memcpy(new, chunk->map, size); | 415 | memcpy(new, chunk->map, old_size); |
404 | 416 | ||
405 | /* | 417 | /* |
406 | * map_alloc < PCPU_DFL_MAP_ALLOC indicates that the chunk is | 418 | * map_alloc < PCPU_DFL_MAP_ALLOC indicates that the chunk is |
407 | * one of the first chunks and still using static map. | 419 | * one of the first chunks and still using static map. |
408 | */ | 420 | */ |
409 | if (chunk->map_alloc >= PCPU_DFL_MAP_ALLOC) | 421 | if (chunk->map_alloc >= PCPU_DFL_MAP_ALLOC) |
410 | pcpu_mem_free(chunk->map, size); | 422 | old = chunk->map; |
411 | 423 | ||
412 | chunk->map_alloc = new_alloc; | 424 | chunk->map_alloc = new_alloc; |
413 | chunk->map = new; | 425 | chunk->map = new; |
426 | new = NULL; | ||
427 | |||
428 | out_unlock: | ||
429 | spin_unlock_irqrestore(&pcpu_lock, flags); | ||
430 | |||
431 | /* | ||
432 | * pcpu_mem_free() might end up calling vfree() which uses | ||
433 | * IRQ-unsafe lock and thus can't be called under pcpu_lock. | ||
434 | */ | ||
435 | pcpu_mem_free(old, old_size); | ||
436 | pcpu_mem_free(new, new_size); | ||
437 | |||
414 | return 0; | 438 | return 0; |
415 | } | 439 | } |
416 | 440 | ||
@@ -1049,7 +1073,7 @@ static void *pcpu_alloc(size_t size, size_t align, bool reserved) | |||
1049 | static int warn_limit = 10; | 1073 | static int warn_limit = 10; |
1050 | struct pcpu_chunk *chunk; | 1074 | struct pcpu_chunk *chunk; |
1051 | const char *err; | 1075 | const char *err; |
1052 | int slot, off; | 1076 | int slot, off, new_alloc; |
1053 | unsigned long flags; | 1077 | unsigned long flags; |
1054 | 1078 | ||
1055 | if (unlikely(!size || size > PCPU_MIN_UNIT_SIZE || align > PAGE_SIZE)) { | 1079 | if (unlikely(!size || size > PCPU_MIN_UNIT_SIZE || align > PAGE_SIZE)) { |
@@ -1064,14 +1088,25 @@ static void *pcpu_alloc(size_t size, size_t align, bool reserved) | |||
1064 | /* serve reserved allocations from the reserved chunk if available */ | 1088 | /* serve reserved allocations from the reserved chunk if available */ |
1065 | if (reserved && pcpu_reserved_chunk) { | 1089 | if (reserved && pcpu_reserved_chunk) { |
1066 | chunk = pcpu_reserved_chunk; | 1090 | chunk = pcpu_reserved_chunk; |
1067 | if (size > chunk->contig_hint || | 1091 | |
1068 | pcpu_extend_area_map(chunk, &flags) < 0) { | 1092 | if (size > chunk->contig_hint) { |
1069 | err = "failed to extend area map of reserved chunk"; | 1093 | err = "alloc from reserved chunk failed"; |
1070 | goto fail_unlock; | 1094 | goto fail_unlock; |
1071 | } | 1095 | } |
1096 | |||
1097 | while ((new_alloc = pcpu_need_to_extend(chunk))) { | ||
1098 | spin_unlock_irqrestore(&pcpu_lock, flags); | ||
1099 | if (pcpu_extend_area_map(chunk, new_alloc) < 0) { | ||
1100 | err = "failed to extend area map of reserved chunk"; | ||
1101 | goto fail_unlock_mutex; | ||
1102 | } | ||
1103 | spin_lock_irqsave(&pcpu_lock, flags); | ||
1104 | } | ||
1105 | |||
1072 | off = pcpu_alloc_area(chunk, size, align); | 1106 | off = pcpu_alloc_area(chunk, size, align); |
1073 | if (off >= 0) | 1107 | if (off >= 0) |
1074 | goto area_found; | 1108 | goto area_found; |
1109 | |||
1075 | err = "alloc from reserved chunk failed"; | 1110 | err = "alloc from reserved chunk failed"; |
1076 | goto fail_unlock; | 1111 | goto fail_unlock; |
1077 | } | 1112 | } |
@@ -1083,14 +1118,20 @@ restart: | |||
1083 | if (size > chunk->contig_hint) | 1118 | if (size > chunk->contig_hint) |
1084 | continue; | 1119 | continue; |
1085 | 1120 | ||
1086 | switch (pcpu_extend_area_map(chunk, &flags)) { | 1121 | new_alloc = pcpu_need_to_extend(chunk); |
1087 | case 0: | 1122 | if (new_alloc) { |
1088 | break; | 1123 | spin_unlock_irqrestore(&pcpu_lock, flags); |
1089 | case 1: | 1124 | if (pcpu_extend_area_map(chunk, |
1090 | goto restart; /* pcpu_lock dropped, restart */ | 1125 | new_alloc) < 0) { |
1091 | default: | 1126 | err = "failed to extend area map"; |
1092 | err = "failed to extend area map"; | 1127 | goto fail_unlock_mutex; |
1093 | goto fail_unlock; | 1128 | } |
1129 | spin_lock_irqsave(&pcpu_lock, flags); | ||
1130 | /* | ||
1131 | * pcpu_lock has been dropped, need to | ||
1132 | * restart cpu_slot list walking. | ||
1133 | */ | ||
1134 | goto restart; | ||
1094 | } | 1135 | } |
1095 | 1136 | ||
1096 | off = pcpu_alloc_area(chunk, size, align); | 1137 | off = pcpu_alloc_area(chunk, size, align); |