diff options
236 files changed, 1791 insertions, 1387 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index ed511af0f79a..05df0b7514b6 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -589,3 +589,26 @@ Why: Useful in 2003, implementation is a hack. | |||
589 | Generally invoked by accident today. | 589 | Generally invoked by accident today. |
590 | Seen as doing more harm than good. | 590 | Seen as doing more harm than good. |
591 | Who: Len Brown <len.brown@intel.com> | 591 | Who: Len Brown <len.brown@intel.com> |
592 | |||
593 | ---------------------------- | ||
594 | |||
595 | What: video4linux /dev/vtx teletext API support | ||
596 | When: 2.6.35 | ||
597 | Files: drivers/media/video/saa5246a.c drivers/media/video/saa5249.c | ||
598 | include/linux/videotext.h | ||
599 | Why: The vtx device nodes have been superseded by vbi device nodes | ||
600 | for many years. No applications exist that use the vtx support. | ||
601 | Of the two i2c drivers that actually support this API the saa5249 | ||
602 | has been impossible to use for a year now and no known hardware | ||
603 | that supports this device exists. The saa5246a is theoretically | ||
604 | supported by the old mxb boards, but it never actually worked. | ||
605 | |||
606 | In summary: there is no hardware that can use this API and there | ||
607 | are no applications actually implementing this API. | ||
608 | |||
609 | The vtx support still reserves minors 192-223 and we would really | ||
610 | like to reuse those for upcoming new functionality. In the unlikely | ||
611 | event that new hardware appears that wants to use the functionality | ||
612 | provided by the vtx API, then that functionality should be build | ||
613 | around the sliced VBI API instead. | ||
614 | Who: Hans Verkuil <hverkuil@xs4all.nl> | ||
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index a4f30faa4f1f..1e359b62c40a 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -316,7 +316,7 @@ address perms offset dev inode pathname | |||
316 | 08049000-0804a000 rw-p 00001000 03:00 8312 /opt/test | 316 | 08049000-0804a000 rw-p 00001000 03:00 8312 /opt/test |
317 | 0804a000-0806b000 rw-p 00000000 00:00 0 [heap] | 317 | 0804a000-0806b000 rw-p 00000000 00:00 0 [heap] |
318 | a7cb1000-a7cb2000 ---p 00000000 00:00 0 | 318 | a7cb1000-a7cb2000 ---p 00000000 00:00 0 |
319 | a7cb2000-a7eb2000 rw-p 00000000 00:00 0 [threadstack:001ff4b4] | 319 | a7cb2000-a7eb2000 rw-p 00000000 00:00 0 |
320 | a7eb2000-a7eb3000 ---p 00000000 00:00 0 | 320 | a7eb2000-a7eb3000 ---p 00000000 00:00 0 |
321 | a7eb3000-a7ed5000 rw-p 00000000 00:00 0 | 321 | a7eb3000-a7ed5000 rw-p 00000000 00:00 0 |
322 | a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6 | 322 | a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6 |
@@ -352,7 +352,6 @@ is not associated with a file: | |||
352 | [stack] = the stack of the main process | 352 | [stack] = the stack of the main process |
353 | [vdso] = the "virtual dynamic shared object", | 353 | [vdso] = the "virtual dynamic shared object", |
354 | the kernel system call handler | 354 | the kernel system call handler |
355 | [threadstack:xxxxxxxx] = the stack of the thread, xxxxxxxx is the stack size | ||
356 | 355 | ||
357 | or if empty, the mapping is anonymous. | 356 | or if empty, the mapping is anonymous. |
358 | 357 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index d5b0b1b6dc52..d329b053a718 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -5492,7 +5492,7 @@ S: Maintained | |||
5492 | F: drivers/mmc/host/tmio_mmc.* | 5492 | F: drivers/mmc/host/tmio_mmc.* |
5493 | 5493 | ||
5494 | TMPFS (SHMEM FILESYSTEM) | 5494 | TMPFS (SHMEM FILESYSTEM) |
5495 | M: Hugh Dickins <hugh.dickins@tiscali.co.uk> | 5495 | M: Hugh Dickins <hughd@google.com> |
5496 | L: linux-mm@kvack.org | 5496 | L: linux-mm@kvack.org |
5497 | S: Maintained | 5497 | S: Maintained |
5498 | F: include/linux/shmem_fs.h | 5498 | F: include/linux/shmem_fs.h |
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 34 | 3 | SUBLEVEL = 34 |
4 | EXTRAVERSION = -rc6 | 4 | EXTRAVERSION = -rc7 |
5 | NAME = Sheep on Meth | 5 | NAME = Sheep on Meth |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 6ab6b337a913..c5191b1532e8 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -685,8 +685,8 @@ proc_types: | |||
685 | W(b) __armv4_mmu_cache_off | 685 | W(b) __armv4_mmu_cache_off |
686 | W(b) __armv4_mmu_cache_flush | 686 | W(b) __armv4_mmu_cache_flush |
687 | 687 | ||
688 | .word 0x56056930 | 688 | .word 0x56056900 |
689 | .word 0xff0ffff0 @ PXA935 | 689 | .word 0xffffff00 @ PXA9xx |
690 | W(b) __armv4_mmu_cache_on | 690 | W(b) __armv4_mmu_cache_on |
691 | W(b) __armv4_mmu_cache_off | 691 | W(b) __armv4_mmu_cache_off |
692 | W(b) __armv4_mmu_cache_flush | 692 | W(b) __armv4_mmu_cache_flush |
@@ -697,12 +697,6 @@ proc_types: | |||
697 | W(b) __armv4_mmu_cache_off | 697 | W(b) __armv4_mmu_cache_off |
698 | W(b) __armv5tej_mmu_cache_flush | 698 | W(b) __armv5tej_mmu_cache_flush |
699 | 699 | ||
700 | .word 0x56056930 | ||
701 | .word 0xff0ffff0 @ PXA935 | ||
702 | W(b) __armv4_mmu_cache_on | ||
703 | W(b) __armv4_mmu_cache_off | ||
704 | W(b) __armv4_mmu_cache_flush | ||
705 | |||
706 | .word 0x56050000 @ Feroceon | 700 | .word 0x56050000 @ Feroceon |
707 | .word 0xff0f0000 | 701 | .word 0xff0f0000 |
708 | W(b) __armv4_mmu_cache_on | 702 | W(b) __armv4_mmu_cache_on |
diff --git a/arch/arm/configs/imote2_defconfig b/arch/arm/configs/imote2_defconfig index 95d2becfc664..21f2bff8a363 100644 --- a/arch/arm/configs/imote2_defconfig +++ b/arch/arm/configs/imote2_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.33-rc8 | 3 | # Linux kernel version: 2.6.34-rc2 |
4 | # Sat Feb 13 21:48:53 2010 | 4 | # Thu Apr 8 14:49:08 2010 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | 7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y |
8 | CONFIG_GENERIC_GPIO=y | 8 | CONFIG_GENERIC_GPIO=y |
9 | CONFIG_GENERIC_TIME=y | 9 | CONFIG_GENERIC_TIME=y |
10 | CONFIG_GENERIC_CLOCKEVENTS=y | 10 | CONFIG_GENERIC_CLOCKEVENTS=y |
11 | CONFIG_HAVE_PROC_CPU=y | ||
11 | CONFIG_GENERIC_HARDIRQS=y | 12 | CONFIG_GENERIC_HARDIRQS=y |
12 | CONFIG_STACKTRACE_SUPPORT=y | 13 | CONFIG_STACKTRACE_SUPPORT=y |
13 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | 14 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y |
@@ -19,6 +20,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
19 | CONFIG_ARCH_HAS_CPUFREQ=y | 20 | CONFIG_ARCH_HAS_CPUFREQ=y |
20 | CONFIG_GENERIC_HWEIGHT=y | 21 | CONFIG_GENERIC_HWEIGHT=y |
21 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 22 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
23 | CONFIG_NEED_DMA_MAP_STATE=y | ||
22 | CONFIG_ARCH_MTD_XIP=y | 24 | CONFIG_ARCH_MTD_XIP=y |
23 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | 25 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y |
24 | CONFIG_VECTORS_BASE=0xffff0000 | 26 | CONFIG_VECTORS_BASE=0xffff0000 |
@@ -60,11 +62,6 @@ CONFIG_RCU_FANOUT=32 | |||
60 | # CONFIG_TREE_RCU_TRACE is not set | 62 | # CONFIG_TREE_RCU_TRACE is not set |
61 | # CONFIG_IKCONFIG is not set | 63 | # CONFIG_IKCONFIG is not set |
62 | CONFIG_LOG_BUF_SHIFT=14 | 64 | CONFIG_LOG_BUF_SHIFT=14 |
63 | CONFIG_GROUP_SCHED=y | ||
64 | CONFIG_FAIR_GROUP_SCHED=y | ||
65 | # CONFIG_RT_GROUP_SCHED is not set | ||
66 | CONFIG_USER_SCHED=y | ||
67 | # CONFIG_CGROUP_SCHED is not set | ||
68 | # CONFIG_CGROUPS is not set | 65 | # CONFIG_CGROUPS is not set |
69 | CONFIG_SYSFS_DEPRECATED=y | 66 | CONFIG_SYSFS_DEPRECATED=y |
70 | CONFIG_SYSFS_DEPRECATED_V2=y | 67 | CONFIG_SYSFS_DEPRECATED_V2=y |
@@ -97,10 +94,14 @@ CONFIG_TIMERFD=y | |||
97 | CONFIG_EVENTFD=y | 94 | CONFIG_EVENTFD=y |
98 | CONFIG_SHMEM=y | 95 | CONFIG_SHMEM=y |
99 | CONFIG_AIO=y | 96 | CONFIG_AIO=y |
97 | CONFIG_HAVE_PERF_EVENTS=y | ||
98 | CONFIG_PERF_USE_VMALLOC=y | ||
100 | 99 | ||
101 | # | 100 | # |
102 | # Kernel Performance Events And Counters | 101 | # Kernel Performance Events And Counters |
103 | # | 102 | # |
103 | # CONFIG_PERF_EVENTS is not set | ||
104 | # CONFIG_PERF_COUNTERS is not set | ||
104 | CONFIG_VM_EVENT_COUNTERS=y | 105 | CONFIG_VM_EVENT_COUNTERS=y |
105 | # CONFIG_COMPAT_BRK is not set | 106 | # CONFIG_COMPAT_BRK is not set |
106 | CONFIG_SLAB=y | 107 | CONFIG_SLAB=y |
@@ -184,6 +185,7 @@ CONFIG_MMU=y | |||
184 | # CONFIG_ARCH_REALVIEW is not set | 185 | # CONFIG_ARCH_REALVIEW is not set |
185 | # CONFIG_ARCH_VERSATILE is not set | 186 | # CONFIG_ARCH_VERSATILE is not set |
186 | # CONFIG_ARCH_AT91 is not set | 187 | # CONFIG_ARCH_AT91 is not set |
188 | # CONFIG_ARCH_BCMRING is not set | ||
187 | # CONFIG_ARCH_CLPS711X is not set | 189 | # CONFIG_ARCH_CLPS711X is not set |
188 | # CONFIG_ARCH_GEMINI is not set | 190 | # CONFIG_ARCH_GEMINI is not set |
189 | # CONFIG_ARCH_EBSA110 is not set | 191 | # CONFIG_ARCH_EBSA110 is not set |
@@ -193,7 +195,6 @@ CONFIG_MMU=y | |||
193 | # CONFIG_ARCH_STMP3XXX is not set | 195 | # CONFIG_ARCH_STMP3XXX is not set |
194 | # CONFIG_ARCH_NETX is not set | 196 | # CONFIG_ARCH_NETX is not set |
195 | # CONFIG_ARCH_H720X is not set | 197 | # CONFIG_ARCH_H720X is not set |
196 | # CONFIG_ARCH_NOMADIK is not set | ||
197 | # CONFIG_ARCH_IOP13XX is not set | 198 | # CONFIG_ARCH_IOP13XX is not set |
198 | # CONFIG_ARCH_IOP32X is not set | 199 | # CONFIG_ARCH_IOP32X is not set |
199 | # CONFIG_ARCH_IOP33X is not set | 200 | # CONFIG_ARCH_IOP33X is not set |
@@ -210,21 +211,26 @@ CONFIG_MMU=y | |||
210 | # CONFIG_ARCH_KS8695 is not set | 211 | # CONFIG_ARCH_KS8695 is not set |
211 | # CONFIG_ARCH_NS9XXX is not set | 212 | # CONFIG_ARCH_NS9XXX is not set |
212 | # CONFIG_ARCH_W90X900 is not set | 213 | # CONFIG_ARCH_W90X900 is not set |
214 | # CONFIG_ARCH_NUC93X is not set | ||
213 | # CONFIG_ARCH_PNX4008 is not set | 215 | # CONFIG_ARCH_PNX4008 is not set |
214 | CONFIG_ARCH_PXA=y | 216 | CONFIG_ARCH_PXA=y |
215 | # CONFIG_ARCH_MSM is not set | 217 | # CONFIG_ARCH_MSM is not set |
218 | # CONFIG_ARCH_SHMOBILE is not set | ||
216 | # CONFIG_ARCH_RPC is not set | 219 | # CONFIG_ARCH_RPC is not set |
217 | # CONFIG_ARCH_SA1100 is not set | 220 | # CONFIG_ARCH_SA1100 is not set |
218 | # CONFIG_ARCH_S3C2410 is not set | 221 | # CONFIG_ARCH_S3C2410 is not set |
219 | # CONFIG_ARCH_S3C64XX is not set | 222 | # CONFIG_ARCH_S3C64XX is not set |
223 | # CONFIG_ARCH_S5P6440 is not set | ||
224 | # CONFIG_ARCH_S5P6442 is not set | ||
220 | # CONFIG_ARCH_S5PC1XX is not set | 225 | # CONFIG_ARCH_S5PC1XX is not set |
226 | # CONFIG_ARCH_S5PV210 is not set | ||
221 | # CONFIG_ARCH_SHARK is not set | 227 | # CONFIG_ARCH_SHARK is not set |
222 | # CONFIG_ARCH_LH7A40X is not set | 228 | # CONFIG_ARCH_LH7A40X is not set |
223 | # CONFIG_ARCH_U300 is not set | 229 | # CONFIG_ARCH_U300 is not set |
230 | # CONFIG_ARCH_U8500 is not set | ||
231 | # CONFIG_ARCH_NOMADIK is not set | ||
224 | # CONFIG_ARCH_DAVINCI is not set | 232 | # CONFIG_ARCH_DAVINCI is not set |
225 | # CONFIG_ARCH_OMAP is not set | 233 | # CONFIG_ARCH_OMAP is not set |
226 | # CONFIG_ARCH_BCMRING is not set | ||
227 | # CONFIG_ARCH_U8500 is not set | ||
228 | 234 | ||
229 | # | 235 | # |
230 | # Intel PXA2xx/PXA3xx Implementations | 236 | # Intel PXA2xx/PXA3xx Implementations |
@@ -253,6 +259,7 @@ CONFIG_ARCH_PXA=y | |||
253 | # CONFIG_MACH_EM_X270 is not set | 259 | # CONFIG_MACH_EM_X270 is not set |
254 | # CONFIG_MACH_EXEDA is not set | 260 | # CONFIG_MACH_EXEDA is not set |
255 | # CONFIG_MACH_CM_X300 is not set | 261 | # CONFIG_MACH_CM_X300 is not set |
262 | # CONFIG_MACH_CAPC7117 is not set | ||
256 | # CONFIG_ARCH_GUMSTIX is not set | 263 | # CONFIG_ARCH_GUMSTIX is not set |
257 | CONFIG_MACH_INTELMOTE2=y | 264 | CONFIG_MACH_INTELMOTE2=y |
258 | # CONFIG_MACH_STARGATE2 is not set | 265 | # CONFIG_MACH_STARGATE2 is not set |
@@ -275,7 +282,11 @@ CONFIG_MACH_INTELMOTE2=y | |||
275 | # CONFIG_PXA_EZX is not set | 282 | # CONFIG_PXA_EZX is not set |
276 | # CONFIG_MACH_MP900C is not set | 283 | # CONFIG_MACH_MP900C is not set |
277 | # CONFIG_ARCH_PXA_PALM is not set | 284 | # CONFIG_ARCH_PXA_PALM is not set |
285 | # CONFIG_MACH_RAUMFELD_RC is not set | ||
286 | # CONFIG_MACH_RAUMFELD_CONNECTOR is not set | ||
287 | # CONFIG_MACH_RAUMFELD_SPEAKER is not set | ||
278 | # CONFIG_PXA_SHARPSL is not set | 288 | # CONFIG_PXA_SHARPSL is not set |
289 | # CONFIG_MACH_ICONTROL is not set | ||
279 | # CONFIG_ARCH_PXA_ESERIES is not set | 290 | # CONFIG_ARCH_PXA_ESERIES is not set |
280 | CONFIG_PXA27x=y | 291 | CONFIG_PXA27x=y |
281 | CONFIG_PXA_SSP=y | 292 | CONFIG_PXA_SSP=y |
@@ -302,6 +313,7 @@ CONFIG_ARM_THUMB=y | |||
302 | CONFIG_ARM_L1_CACHE_SHIFT=5 | 313 | CONFIG_ARM_L1_CACHE_SHIFT=5 |
303 | CONFIG_IWMMXT=y | 314 | CONFIG_IWMMXT=y |
304 | CONFIG_XSCALE_PMU=y | 315 | CONFIG_XSCALE_PMU=y |
316 | CONFIG_CPU_HAS_PMU=y | ||
305 | CONFIG_COMMON_CLKDEV=y | 317 | CONFIG_COMMON_CLKDEV=y |
306 | 318 | ||
307 | # | 319 | # |
@@ -352,7 +364,7 @@ CONFIG_ALIGNMENT_TRAP=y | |||
352 | # | 364 | # |
353 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 365 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
354 | CONFIG_ZBOOT_ROM_BSS=0x0 | 366 | CONFIG_ZBOOT_ROM_BSS=0x0 |
355 | CONFIG_CMDLINE="console=tty1 root=/dev/mmcblk0p2 rootfstype=ext2 rootdelay=3 ip=192.168.0.202:192.168.0.200:192.168.0.200:255.255.255.0 debug" | 367 | CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS2,115200 mem=32M" |
356 | # CONFIG_XIP_KERNEL is not set | 368 | # CONFIG_XIP_KERNEL is not set |
357 | CONFIG_KEXEC=y | 369 | CONFIG_KEXEC=y |
358 | CONFIG_ATAGS_PROC=y | 370 | CONFIG_ATAGS_PROC=y |
@@ -360,24 +372,8 @@ CONFIG_ATAGS_PROC=y | |||
360 | # | 372 | # |
361 | # CPU Power Management | 373 | # CPU Power Management |
362 | # | 374 | # |
363 | CONFIG_CPU_FREQ=y | 375 | # CONFIG_CPU_FREQ is not set |
364 | CONFIG_CPU_FREQ_TABLE=y | 376 | # CONFIG_CPU_IDLE is not set |
365 | CONFIG_CPU_FREQ_DEBUG=y | ||
366 | CONFIG_CPU_FREQ_STAT=y | ||
367 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set | ||
368 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | ||
369 | # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set | ||
370 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | ||
371 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set | ||
372 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set | ||
373 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y | ||
374 | CONFIG_CPU_FREQ_GOV_POWERSAVE=m | ||
375 | CONFIG_CPU_FREQ_GOV_USERSPACE=m | ||
376 | CONFIG_CPU_FREQ_GOV_ONDEMAND=m | ||
377 | CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m | ||
378 | CONFIG_CPU_IDLE=y | ||
379 | CONFIG_CPU_IDLE_GOV_LADDER=y | ||
380 | CONFIG_CPU_IDLE_GOV_MENU=y | ||
381 | 377 | ||
382 | # | 378 | # |
383 | # Floating point emulation | 379 | # Floating point emulation |
@@ -409,6 +405,7 @@ CONFIG_SUSPEND=y | |||
409 | CONFIG_SUSPEND_FREEZER=y | 405 | CONFIG_SUSPEND_FREEZER=y |
410 | CONFIG_APM_EMULATION=y | 406 | CONFIG_APM_EMULATION=y |
411 | CONFIG_PM_RUNTIME=y | 407 | CONFIG_PM_RUNTIME=y |
408 | CONFIG_PM_OPS=y | ||
412 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | 409 | CONFIG_ARCH_SUSPEND_POSSIBLE=y |
413 | CONFIG_NET=y | 410 | CONFIG_NET=y |
414 | 411 | ||
@@ -416,7 +413,6 @@ CONFIG_NET=y | |||
416 | # Networking options | 413 | # Networking options |
417 | # | 414 | # |
418 | CONFIG_PACKET=y | 415 | CONFIG_PACKET=y |
419 | CONFIG_PACKET_MMAP=y | ||
420 | CONFIG_UNIX=y | 416 | CONFIG_UNIX=y |
421 | CONFIG_XFRM=y | 417 | CONFIG_XFRM=y |
422 | # CONFIG_XFRM_USER is not set | 418 | # CONFIG_XFRM_USER is not set |
@@ -506,6 +502,7 @@ CONFIG_NF_CT_NETLINK=m | |||
506 | CONFIG_NETFILTER_XTABLES=m | 502 | CONFIG_NETFILTER_XTABLES=m |
507 | CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m | 503 | CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m |
508 | # CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set | 504 | # CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set |
505 | # CONFIG_NETFILTER_XT_TARGET_CT is not set | ||
509 | # CONFIG_NETFILTER_XT_TARGET_DSCP is not set | 506 | # CONFIG_NETFILTER_XT_TARGET_DSCP is not set |
510 | CONFIG_NETFILTER_XT_TARGET_HL=m | 507 | CONFIG_NETFILTER_XT_TARGET_HL=m |
511 | CONFIG_NETFILTER_XT_TARGET_LED=m | 508 | CONFIG_NETFILTER_XT_TARGET_LED=m |
@@ -622,6 +619,7 @@ CONFIG_IP6_NF_RAW=m | |||
622 | # CONFIG_ATM is not set | 619 | # CONFIG_ATM is not set |
623 | CONFIG_STP=m | 620 | CONFIG_STP=m |
624 | CONFIG_BRIDGE=m | 621 | CONFIG_BRIDGE=m |
622 | # CONFIG_BRIDGE_IGMP_SNOOPING is not set | ||
625 | # CONFIG_NET_DSA is not set | 623 | # CONFIG_NET_DSA is not set |
626 | # CONFIG_VLAN_8021Q is not set | 624 | # CONFIG_VLAN_8021Q is not set |
627 | # CONFIG_DECNET is not set | 625 | # CONFIG_DECNET is not set |
@@ -646,32 +644,7 @@ CONFIG_NET_CLS_ROUTE=y | |||
646 | # CONFIG_HAMRADIO is not set | 644 | # CONFIG_HAMRADIO is not set |
647 | # CONFIG_CAN is not set | 645 | # CONFIG_CAN is not set |
648 | # CONFIG_IRDA is not set | 646 | # CONFIG_IRDA is not set |
649 | CONFIG_BT=y | 647 | # CONFIG_BT is not set |
650 | CONFIG_BT_L2CAP=y | ||
651 | CONFIG_BT_SCO=y | ||
652 | CONFIG_BT_RFCOMM=y | ||
653 | CONFIG_BT_RFCOMM_TTY=y | ||
654 | CONFIG_BT_BNEP=y | ||
655 | CONFIG_BT_BNEP_MC_FILTER=y | ||
656 | CONFIG_BT_BNEP_PROTO_FILTER=y | ||
657 | CONFIG_BT_HIDP=y | ||
658 | |||
659 | # | ||
660 | # Bluetooth device drivers | ||
661 | # | ||
662 | CONFIG_BT_HCIBTUSB=m | ||
663 | CONFIG_BT_HCIBTSDIO=m | ||
664 | CONFIG_BT_HCIUART=y | ||
665 | CONFIG_BT_HCIUART_H4=y | ||
666 | # CONFIG_BT_HCIUART_BCSP is not set | ||
667 | # CONFIG_BT_HCIUART_LL is not set | ||
668 | CONFIG_BT_HCIBCM203X=m | ||
669 | CONFIG_BT_HCIBPA10X=m | ||
670 | CONFIG_BT_HCIBFUSB=m | ||
671 | CONFIG_BT_HCIVHCI=m | ||
672 | CONFIG_BT_MRVL=m | ||
673 | CONFIG_BT_MRVL_SDIO=m | ||
674 | # CONFIG_BT_ATH3K is not set | ||
675 | # CONFIG_AF_RXRPC is not set | 648 | # CONFIG_AF_RXRPC is not set |
676 | CONFIG_FIB_RULES=y | 649 | CONFIG_FIB_RULES=y |
677 | # CONFIG_WIRELESS is not set | 650 | # CONFIG_WIRELESS is not set |
@@ -687,7 +660,8 @@ CONFIG_FIB_RULES=y | |||
687 | # Generic Driver Options | 660 | # Generic Driver Options |
688 | # | 661 | # |
689 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 662 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
690 | # CONFIG_DEVTMPFS is not set | 663 | CONFIG_DEVTMPFS=y |
664 | CONFIG_DEVTMPFS_MOUNT=y | ||
691 | CONFIG_STANDALONE=y | 665 | CONFIG_STANDALONE=y |
692 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 666 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
693 | CONFIG_FW_LOADER=m | 667 | CONFIG_FW_LOADER=m |
@@ -703,9 +677,9 @@ CONFIG_MTD=y | |||
703 | # CONFIG_MTD_CONCAT is not set | 677 | # CONFIG_MTD_CONCAT is not set |
704 | CONFIG_MTD_PARTITIONS=y | 678 | CONFIG_MTD_PARTITIONS=y |
705 | # CONFIG_MTD_REDBOOT_PARTS is not set | 679 | # CONFIG_MTD_REDBOOT_PARTS is not set |
706 | # CONFIG_MTD_CMDLINE_PARTS is not set | 680 | CONFIG_MTD_CMDLINE_PARTS=y |
707 | # CONFIG_MTD_AFS_PARTS is not set | 681 | CONFIG_MTD_AFS_PARTS=y |
708 | # CONFIG_MTD_AR7_PARTS is not set | 682 | CONFIG_MTD_AR7_PARTS=y |
709 | 683 | ||
710 | # | 684 | # |
711 | # User Modules And Translation Layers | 685 | # User Modules And Translation Layers |
@@ -812,6 +786,7 @@ CONFIG_HAVE_IDE=y | |||
812 | # | 786 | # |
813 | # SCSI device support | 787 | # SCSI device support |
814 | # | 788 | # |
789 | CONFIG_SCSI_MOD=y | ||
815 | # CONFIG_RAID_ATTRS is not set | 790 | # CONFIG_RAID_ATTRS is not set |
816 | # CONFIG_SCSI is not set | 791 | # CONFIG_SCSI is not set |
817 | # CONFIG_SCSI_DMA is not set | 792 | # CONFIG_SCSI_DMA is not set |
@@ -965,6 +940,7 @@ CONFIG_SERIAL_PXA=y | |||
965 | CONFIG_SERIAL_PXA_CONSOLE=y | 940 | CONFIG_SERIAL_PXA_CONSOLE=y |
966 | CONFIG_SERIAL_CORE=y | 941 | CONFIG_SERIAL_CORE=y |
967 | CONFIG_SERIAL_CORE_CONSOLE=y | 942 | CONFIG_SERIAL_CORE_CONSOLE=y |
943 | # CONFIG_SERIAL_TIMBERDALE is not set | ||
968 | CONFIG_UNIX98_PTYS=y | 944 | CONFIG_UNIX98_PTYS=y |
969 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | 945 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set |
970 | CONFIG_LEGACY_PTYS=y | 946 | CONFIG_LEGACY_PTYS=y |
@@ -993,6 +969,7 @@ CONFIG_I2C_HELPER_AUTO=y | |||
993 | CONFIG_I2C_PXA=y | 969 | CONFIG_I2C_PXA=y |
994 | # CONFIG_I2C_PXA_SLAVE is not set | 970 | # CONFIG_I2C_PXA_SLAVE is not set |
995 | # CONFIG_I2C_SIMTEC is not set | 971 | # CONFIG_I2C_SIMTEC is not set |
972 | # CONFIG_I2C_XILINX is not set | ||
996 | 973 | ||
997 | # | 974 | # |
998 | # External I2C/SMBus adapter drivers | 975 | # External I2C/SMBus adapter drivers |
@@ -1006,15 +983,9 @@ CONFIG_I2C_PXA=y | |||
1006 | # | 983 | # |
1007 | # CONFIG_I2C_PCA_PLATFORM is not set | 984 | # CONFIG_I2C_PCA_PLATFORM is not set |
1008 | # CONFIG_I2C_STUB is not set | 985 | # CONFIG_I2C_STUB is not set |
1009 | |||
1010 | # | ||
1011 | # Miscellaneous I2C Chip support | ||
1012 | # | ||
1013 | # CONFIG_SENSORS_TSL2550 is not set | ||
1014 | # CONFIG_I2C_DEBUG_CORE is not set | 986 | # CONFIG_I2C_DEBUG_CORE is not set |
1015 | # CONFIG_I2C_DEBUG_ALGO is not set | 987 | # CONFIG_I2C_DEBUG_ALGO is not set |
1016 | # CONFIG_I2C_DEBUG_BUS is not set | 988 | # CONFIG_I2C_DEBUG_BUS is not set |
1017 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
1018 | CONFIG_SPI=y | 989 | CONFIG_SPI=y |
1019 | # CONFIG_SPI_DEBUG is not set | 990 | # CONFIG_SPI_DEBUG is not set |
1020 | CONFIG_SPI_MASTER=y | 991 | CONFIG_SPI_MASTER=y |
@@ -1046,10 +1017,12 @@ CONFIG_GPIO_SYSFS=y | |||
1046 | # | 1017 | # |
1047 | # Memory mapped GPIO expanders: | 1018 | # Memory mapped GPIO expanders: |
1048 | # | 1019 | # |
1020 | # CONFIG_GPIO_IT8761E is not set | ||
1049 | 1021 | ||
1050 | # | 1022 | # |
1051 | # I2C GPIO expanders: | 1023 | # I2C GPIO expanders: |
1052 | # | 1024 | # |
1025 | # CONFIG_GPIO_MAX7300 is not set | ||
1053 | # CONFIG_GPIO_MAX732X is not set | 1026 | # CONFIG_GPIO_MAX732X is not set |
1054 | # CONFIG_GPIO_PCA953X is not set | 1027 | # CONFIG_GPIO_PCA953X is not set |
1055 | # CONFIG_GPIO_PCF857X is not set | 1028 | # CONFIG_GPIO_PCF857X is not set |
@@ -1093,10 +1066,12 @@ CONFIG_SSB_POSSIBLE=y | |||
1093 | # Multifunction device drivers | 1066 | # Multifunction device drivers |
1094 | # | 1067 | # |
1095 | # CONFIG_MFD_CORE is not set | 1068 | # CONFIG_MFD_CORE is not set |
1069 | # CONFIG_MFD_88PM860X is not set | ||
1096 | # CONFIG_MFD_SM501 is not set | 1070 | # CONFIG_MFD_SM501 is not set |
1097 | # CONFIG_MFD_ASIC3 is not set | 1071 | # CONFIG_MFD_ASIC3 is not set |
1098 | # CONFIG_HTC_EGPIO is not set | 1072 | # CONFIG_HTC_EGPIO is not set |
1099 | # CONFIG_HTC_PASIC3 is not set | 1073 | # CONFIG_HTC_PASIC3 is not set |
1074 | # CONFIG_HTC_I2CPLD is not set | ||
1100 | # CONFIG_TPS65010 is not set | 1075 | # CONFIG_TPS65010 is not set |
1101 | # CONFIG_TWL4030_CORE is not set | 1076 | # CONFIG_TWL4030_CORE is not set |
1102 | # CONFIG_MFD_TMIO is not set | 1077 | # CONFIG_MFD_TMIO is not set |
@@ -1105,22 +1080,25 @@ CONFIG_SSB_POSSIBLE=y | |||
1105 | # CONFIG_MFD_TC6393XB is not set | 1080 | # CONFIG_MFD_TC6393XB is not set |
1106 | CONFIG_PMIC_DA903X=y | 1081 | CONFIG_PMIC_DA903X=y |
1107 | # CONFIG_PMIC_ADP5520 is not set | 1082 | # CONFIG_PMIC_ADP5520 is not set |
1083 | # CONFIG_MFD_MAX8925 is not set | ||
1108 | # CONFIG_MFD_WM8400 is not set | 1084 | # CONFIG_MFD_WM8400 is not set |
1109 | # CONFIG_MFD_WM831X is not set | 1085 | # CONFIG_MFD_WM831X is not set |
1110 | # CONFIG_MFD_WM8350_I2C is not set | 1086 | # CONFIG_MFD_WM8350_I2C is not set |
1087 | # CONFIG_MFD_WM8994 is not set | ||
1111 | # CONFIG_MFD_PCF50633 is not set | 1088 | # CONFIG_MFD_PCF50633 is not set |
1112 | # CONFIG_MFD_MC13783 is not set | 1089 | # CONFIG_MFD_MC13783 is not set |
1113 | # CONFIG_AB3100_CORE is not set | 1090 | # CONFIG_AB3100_CORE is not set |
1114 | # CONFIG_EZX_PCAP is not set | 1091 | # CONFIG_EZX_PCAP is not set |
1115 | # CONFIG_MFD_88PM8607 is not set | ||
1116 | # CONFIG_AB4500_CORE is not set | 1092 | # CONFIG_AB4500_CORE is not set |
1117 | CONFIG_REGULATOR=y | 1093 | CONFIG_REGULATOR=y |
1118 | CONFIG_REGULATOR_DEBUG=y | 1094 | CONFIG_REGULATOR_DEBUG=y |
1095 | # CONFIG_REGULATOR_DUMMY is not set | ||
1119 | # CONFIG_REGULATOR_FIXED_VOLTAGE is not set | 1096 | # CONFIG_REGULATOR_FIXED_VOLTAGE is not set |
1120 | CONFIG_REGULATOR_VIRTUAL_CONSUMER=y | 1097 | CONFIG_REGULATOR_VIRTUAL_CONSUMER=y |
1121 | CONFIG_REGULATOR_USERSPACE_CONSUMER=y | 1098 | CONFIG_REGULATOR_USERSPACE_CONSUMER=y |
1122 | # CONFIG_REGULATOR_BQ24022 is not set | 1099 | # CONFIG_REGULATOR_BQ24022 is not set |
1123 | # CONFIG_REGULATOR_MAX1586 is not set | 1100 | # CONFIG_REGULATOR_MAX1586 is not set |
1101 | # CONFIG_REGULATOR_MAX8649 is not set | ||
1124 | # CONFIG_REGULATOR_MAX8660 is not set | 1102 | # CONFIG_REGULATOR_MAX8660 is not set |
1125 | CONFIG_REGULATOR_DA903X=y | 1103 | CONFIG_REGULATOR_DA903X=y |
1126 | # CONFIG_REGULATOR_LP3971 is not set | 1104 | # CONFIG_REGULATOR_LP3971 is not set |
@@ -1218,6 +1196,7 @@ CONFIG_VIDEO_IR_I2C=y | |||
1218 | # CONFIG_VIDEO_SAA7191 is not set | 1196 | # CONFIG_VIDEO_SAA7191 is not set |
1219 | # CONFIG_VIDEO_TVP514X is not set | 1197 | # CONFIG_VIDEO_TVP514X is not set |
1220 | # CONFIG_VIDEO_TVP5150 is not set | 1198 | # CONFIG_VIDEO_TVP5150 is not set |
1199 | # CONFIG_VIDEO_TVP7002 is not set | ||
1221 | # CONFIG_VIDEO_VPX3220 is not set | 1200 | # CONFIG_VIDEO_VPX3220 is not set |
1222 | 1201 | ||
1223 | # | 1202 | # |
@@ -1264,15 +1243,7 @@ CONFIG_SOC_CAMERA_MT9M111=y | |||
1264 | CONFIG_VIDEO_PXA27x=y | 1243 | CONFIG_VIDEO_PXA27x=y |
1265 | # CONFIG_VIDEO_SH_MOBILE_CEU is not set | 1244 | # CONFIG_VIDEO_SH_MOBILE_CEU is not set |
1266 | # CONFIG_V4L_USB_DRIVERS is not set | 1245 | # CONFIG_V4L_USB_DRIVERS is not set |
1267 | CONFIG_RADIO_ADAPTERS=y | 1246 | # CONFIG_RADIO_ADAPTERS is not set |
1268 | # CONFIG_I2C_SI4713 is not set | ||
1269 | # CONFIG_RADIO_SI4713 is not set | ||
1270 | # CONFIG_USB_DSBR is not set | ||
1271 | # CONFIG_RADIO_SI470X is not set | ||
1272 | # CONFIG_USB_MR800 is not set | ||
1273 | CONFIG_RADIO_TEA5764=y | ||
1274 | CONFIG_RADIO_TEA5764_XTAL=y | ||
1275 | # CONFIG_RADIO_TEF6862 is not set | ||
1276 | # CONFIG_DAB is not set | 1247 | # CONFIG_DAB is not set |
1277 | 1248 | ||
1278 | # | 1249 | # |
@@ -1398,8 +1369,6 @@ CONFIG_HID=y | |||
1398 | # | 1369 | # |
1399 | # Special HID drivers | 1370 | # Special HID drivers |
1400 | # | 1371 | # |
1401 | CONFIG_HID_APPLE=m | ||
1402 | # CONFIG_HID_WACOM is not set | ||
1403 | CONFIG_USB_SUPPORT=y | 1372 | CONFIG_USB_SUPPORT=y |
1404 | CONFIG_USB_ARCH_HAS_HCD=y | 1373 | CONFIG_USB_ARCH_HAS_HCD=y |
1405 | CONFIG_USB_ARCH_HAS_OHCI=y | 1374 | CONFIG_USB_ARCH_HAS_OHCI=y |
@@ -1477,7 +1446,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y | |||
1477 | # CONFIG_USB_RIO500 is not set | 1446 | # CONFIG_USB_RIO500 is not set |
1478 | # CONFIG_USB_LEGOTOWER is not set | 1447 | # CONFIG_USB_LEGOTOWER is not set |
1479 | # CONFIG_USB_LCD is not set | 1448 | # CONFIG_USB_LCD is not set |
1480 | # CONFIG_USB_BERRY_CHARGE is not set | ||
1481 | # CONFIG_USB_LED is not set | 1449 | # CONFIG_USB_LED is not set |
1482 | # CONFIG_USB_CYPRESS_CY7C63 is not set | 1450 | # CONFIG_USB_CYPRESS_CY7C63 is not set |
1483 | # CONFIG_USB_CYTHERM is not set | 1451 | # CONFIG_USB_CYTHERM is not set |
@@ -1489,7 +1457,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y | |||
1489 | # CONFIG_USB_IOWARRIOR is not set | 1457 | # CONFIG_USB_IOWARRIOR is not set |
1490 | # CONFIG_USB_TEST is not set | 1458 | # CONFIG_USB_TEST is not set |
1491 | # CONFIG_USB_ISIGHTFW is not set | 1459 | # CONFIG_USB_ISIGHTFW is not set |
1492 | # CONFIG_USB_VST is not set | ||
1493 | CONFIG_USB_GADGET=y | 1460 | CONFIG_USB_GADGET=y |
1494 | # CONFIG_USB_GADGET_DEBUG is not set | 1461 | # CONFIG_USB_GADGET_DEBUG is not set |
1495 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | 1462 | # CONFIG_USB_GADGET_DEBUG_FILES is not set |
@@ -1529,6 +1496,7 @@ CONFIG_USB_ETH=y | |||
1529 | # CONFIG_USB_MIDI_GADGET is not set | 1496 | # CONFIG_USB_MIDI_GADGET is not set |
1530 | # CONFIG_USB_G_PRINTER is not set | 1497 | # CONFIG_USB_G_PRINTER is not set |
1531 | # CONFIG_USB_CDC_COMPOSITE is not set | 1498 | # CONFIG_USB_CDC_COMPOSITE is not set |
1499 | # CONFIG_USB_G_NOKIA is not set | ||
1532 | # CONFIG_USB_G_MULTI is not set | 1500 | # CONFIG_USB_G_MULTI is not set |
1533 | 1501 | ||
1534 | # | 1502 | # |
@@ -1555,8 +1523,6 @@ CONFIG_SDIO_UART=m | |||
1555 | # | 1523 | # |
1556 | CONFIG_MMC_PXA=y | 1524 | CONFIG_MMC_PXA=y |
1557 | # CONFIG_MMC_SDHCI is not set | 1525 | # CONFIG_MMC_SDHCI is not set |
1558 | # CONFIG_MMC_AT91 is not set | ||
1559 | # CONFIG_MMC_ATMELMCI is not set | ||
1560 | CONFIG_MMC_SPI=y | 1526 | CONFIG_MMC_SPI=y |
1561 | # CONFIG_MEMSTICK is not set | 1527 | # CONFIG_MEMSTICK is not set |
1562 | CONFIG_NEW_LEDS=y | 1528 | CONFIG_NEW_LEDS=y |
@@ -1574,11 +1540,11 @@ CONFIG_LEDS_LP3944=y | |||
1574 | # CONFIG_LEDS_REGULATOR is not set | 1540 | # CONFIG_LEDS_REGULATOR is not set |
1575 | # CONFIG_LEDS_BD2802 is not set | 1541 | # CONFIG_LEDS_BD2802 is not set |
1576 | # CONFIG_LEDS_LT3593 is not set | 1542 | # CONFIG_LEDS_LT3593 is not set |
1543 | CONFIG_LEDS_TRIGGERS=y | ||
1577 | 1544 | ||
1578 | # | 1545 | # |
1579 | # LED Triggers | 1546 | # LED Triggers |
1580 | # | 1547 | # |
1581 | CONFIG_LEDS_TRIGGERS=y | ||
1582 | CONFIG_LEDS_TRIGGER_TIMER=y | 1548 | CONFIG_LEDS_TRIGGER_TIMER=y |
1583 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | 1549 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y |
1584 | CONFIG_LEDS_TRIGGER_BACKLIGHT=y | 1550 | CONFIG_LEDS_TRIGGER_BACKLIGHT=y |
@@ -1656,7 +1622,7 @@ CONFIG_RTC_INTF_DEV=y | |||
1656 | # on-CPU RTC drivers | 1622 | # on-CPU RTC drivers |
1657 | # | 1623 | # |
1658 | # CONFIG_RTC_DRV_SA1100 is not set | 1624 | # CONFIG_RTC_DRV_SA1100 is not set |
1659 | # CONFIG_RTC_DRV_PXA is not set | 1625 | CONFIG_RTC_DRV_PXA=y |
1660 | # CONFIG_DMADEVICES is not set | 1626 | # CONFIG_DMADEVICES is not set |
1661 | # CONFIG_AUXDISPLAY is not set | 1627 | # CONFIG_AUXDISPLAY is not set |
1662 | # CONFIG_UIO is not set | 1628 | # CONFIG_UIO is not set |
@@ -1681,19 +1647,10 @@ CONFIG_EXT3_FS_XATTR=y | |||
1681 | CONFIG_JBD=m | 1647 | CONFIG_JBD=m |
1682 | # CONFIG_JBD_DEBUG is not set | 1648 | # CONFIG_JBD_DEBUG is not set |
1683 | CONFIG_FS_MBCACHE=m | 1649 | CONFIG_FS_MBCACHE=m |
1684 | CONFIG_REISERFS_FS=m | 1650 | # CONFIG_REISERFS_FS is not set |
1685 | # CONFIG_REISERFS_CHECK is not set | ||
1686 | # CONFIG_REISERFS_PROC_INFO is not set | ||
1687 | CONFIG_REISERFS_FS_XATTR=y | ||
1688 | CONFIG_REISERFS_FS_POSIX_ACL=y | ||
1689 | CONFIG_REISERFS_FS_SECURITY=y | ||
1690 | # CONFIG_JFS_FS is not set | 1651 | # CONFIG_JFS_FS is not set |
1691 | CONFIG_FS_POSIX_ACL=y | 1652 | CONFIG_FS_POSIX_ACL=y |
1692 | CONFIG_XFS_FS=m | 1653 | # CONFIG_XFS_FS is not set |
1693 | # CONFIG_XFS_QUOTA is not set | ||
1694 | # CONFIG_XFS_POSIX_ACL is not set | ||
1695 | # CONFIG_XFS_RT is not set | ||
1696 | # CONFIG_XFS_DEBUG is not set | ||
1697 | # CONFIG_OCFS2_FS is not set | 1654 | # CONFIG_OCFS2_FS is not set |
1698 | # CONFIG_BTRFS_FS is not set | 1655 | # CONFIG_BTRFS_FS is not set |
1699 | # CONFIG_NILFS2_FS is not set | 1656 | # CONFIG_NILFS2_FS is not set |
@@ -1716,9 +1673,7 @@ CONFIG_CUSE=m | |||
1716 | # | 1673 | # |
1717 | # CD-ROM/DVD Filesystems | 1674 | # CD-ROM/DVD Filesystems |
1718 | # | 1675 | # |
1719 | CONFIG_ISO9660_FS=m | 1676 | # CONFIG_ISO9660_FS is not set |
1720 | CONFIG_JOLIET=y | ||
1721 | CONFIG_ZISOFS=y | ||
1722 | # CONFIG_UDF_FS is not set | 1677 | # CONFIG_UDF_FS is not set |
1723 | 1678 | ||
1724 | # | 1679 | # |
@@ -1750,12 +1705,14 @@ CONFIG_MISC_FILESYSTEMS=y | |||
1750 | # CONFIG_BEFS_FS is not set | 1705 | # CONFIG_BEFS_FS is not set |
1751 | # CONFIG_BFS_FS is not set | 1706 | # CONFIG_BFS_FS is not set |
1752 | # CONFIG_EFS_FS is not set | 1707 | # CONFIG_EFS_FS is not set |
1753 | CONFIG_JFFS2_FS=m | 1708 | CONFIG_JFFS2_FS=y |
1754 | CONFIG_JFFS2_FS_DEBUG=0 | 1709 | CONFIG_JFFS2_FS_DEBUG=0 |
1755 | CONFIG_JFFS2_FS_WRITEBUFFER=y | 1710 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
1756 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | 1711 | CONFIG_JFFS2_FS_WBUF_VERIFY=y |
1757 | # CONFIG_JFFS2_SUMMARY is not set | 1712 | CONFIG_JFFS2_SUMMARY=y |
1758 | # CONFIG_JFFS2_FS_XATTR is not set | 1713 | CONFIG_JFFS2_FS_XATTR=y |
1714 | CONFIG_JFFS2_FS_POSIX_ACL=y | ||
1715 | CONFIG_JFFS2_FS_SECURITY=y | ||
1759 | CONFIG_JFFS2_COMPRESSION_OPTIONS=y | 1716 | CONFIG_JFFS2_COMPRESSION_OPTIONS=y |
1760 | CONFIG_JFFS2_ZLIB=y | 1717 | CONFIG_JFFS2_ZLIB=y |
1761 | CONFIG_JFFS2_LZO=y | 1718 | CONFIG_JFFS2_LZO=y |
@@ -1765,6 +1722,7 @@ CONFIG_JFFS2_RUBIN=y | |||
1765 | CONFIG_JFFS2_CMODE_PRIORITY=y | 1722 | CONFIG_JFFS2_CMODE_PRIORITY=y |
1766 | # CONFIG_JFFS2_CMODE_SIZE is not set | 1723 | # CONFIG_JFFS2_CMODE_SIZE is not set |
1767 | # CONFIG_JFFS2_CMODE_FAVOURLZO is not set | 1724 | # CONFIG_JFFS2_CMODE_FAVOURLZO is not set |
1725 | # CONFIG_LOGFS is not set | ||
1768 | CONFIG_CRAMFS=m | 1726 | CONFIG_CRAMFS=m |
1769 | CONFIG_SQUASHFS=m | 1727 | CONFIG_SQUASHFS=m |
1770 | # CONFIG_SQUASHFS_EMBEDDED is not set | 1728 | # CONFIG_SQUASHFS_EMBEDDED is not set |
@@ -1802,6 +1760,7 @@ CONFIG_SUNRPC=y | |||
1802 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 1760 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
1803 | CONFIG_SMB_FS=m | 1761 | CONFIG_SMB_FS=m |
1804 | # CONFIG_SMB_NLS_DEFAULT is not set | 1762 | # CONFIG_SMB_NLS_DEFAULT is not set |
1763 | # CONFIG_CEPH_FS is not set | ||
1805 | CONFIG_CIFS=m | 1764 | CONFIG_CIFS=m |
1806 | CONFIG_CIFS_STATS=y | 1765 | CONFIG_CIFS_STATS=y |
1807 | # CONFIG_CIFS_STATS2 is not set | 1766 | # CONFIG_CIFS_STATS2 is not set |
@@ -1895,6 +1854,7 @@ CONFIG_DEBUG_SPINLOCK=y | |||
1895 | CONFIG_DEBUG_MUTEXES=y | 1854 | CONFIG_DEBUG_MUTEXES=y |
1896 | CONFIG_DEBUG_LOCK_ALLOC=y | 1855 | CONFIG_DEBUG_LOCK_ALLOC=y |
1897 | CONFIG_PROVE_LOCKING=y | 1856 | CONFIG_PROVE_LOCKING=y |
1857 | # CONFIG_PROVE_RCU is not set | ||
1898 | CONFIG_LOCKDEP=y | 1858 | CONFIG_LOCKDEP=y |
1899 | # CONFIG_LOCK_STAT is not set | 1859 | # CONFIG_LOCK_STAT is not set |
1900 | # CONFIG_DEBUG_LOCKDEP is not set | 1860 | # CONFIG_DEBUG_LOCKDEP is not set |
@@ -1918,6 +1878,7 @@ CONFIG_DEBUG_BUGVERBOSE=y | |||
1918 | # CONFIG_BACKTRACE_SELF_TEST is not set | 1878 | # CONFIG_BACKTRACE_SELF_TEST is not set |
1919 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | 1879 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set |
1920 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set | 1880 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set |
1881 | # CONFIG_LKDTM is not set | ||
1921 | # CONFIG_FAULT_INJECTION is not set | 1882 | # CONFIG_FAULT_INJECTION is not set |
1922 | # CONFIG_LATENCYTOP is not set | 1883 | # CONFIG_LATENCYTOP is not set |
1923 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | 1884 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set |
@@ -2061,9 +2022,9 @@ CONFIG_CRC32=y | |||
2061 | CONFIG_CRC7=y | 2022 | CONFIG_CRC7=y |
2062 | CONFIG_LIBCRC32C=m | 2023 | CONFIG_LIBCRC32C=m |
2063 | CONFIG_ZLIB_INFLATE=y | 2024 | CONFIG_ZLIB_INFLATE=y |
2064 | CONFIG_ZLIB_DEFLATE=m | 2025 | CONFIG_ZLIB_DEFLATE=y |
2065 | CONFIG_LZO_COMPRESS=m | 2026 | CONFIG_LZO_COMPRESS=y |
2066 | CONFIG_LZO_DECOMPRESS=m | 2027 | CONFIG_LZO_DECOMPRESS=y |
2067 | CONFIG_DECOMPRESS_GZIP=y | 2028 | CONFIG_DECOMPRESS_GZIP=y |
2068 | CONFIG_DECOMPRESS_BZIP2=y | 2029 | CONFIG_DECOMPRESS_BZIP2=y |
2069 | CONFIG_DECOMPRESS_LZMA=y | 2030 | CONFIG_DECOMPRESS_LZMA=y |
@@ -2075,3 +2036,4 @@ CONFIG_HAS_IOMEM=y | |||
2075 | CONFIG_HAS_IOPORT=y | 2036 | CONFIG_HAS_IOPORT=y |
2076 | CONFIG_HAS_DMA=y | 2037 | CONFIG_HAS_DMA=y |
2077 | CONFIG_NLATTR=y | 2038 | CONFIG_NLATTR=y |
2039 | CONFIG_GENERIC_ATOMIC64=y | ||
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index 0d08d4170b64..4656a24058d2 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -371,6 +371,10 @@ static inline void __flush_icache_all(void) | |||
371 | #ifdef CONFIG_ARM_ERRATA_411920 | 371 | #ifdef CONFIG_ARM_ERRATA_411920 |
372 | extern void v6_icache_inval_all(void); | 372 | extern void v6_icache_inval_all(void); |
373 | v6_icache_inval_all(); | 373 | v6_icache_inval_all(); |
374 | #elif defined(CONFIG_SMP) && __LINUX_ARM_ARCH__ >= 7 | ||
375 | asm("mcr p15, 0, %0, c7, c1, 0 @ invalidate I-cache inner shareable\n" | ||
376 | : | ||
377 | : "r" (0)); | ||
374 | #else | 378 | #else |
375 | asm("mcr p15, 0, %0, c7, c5, 0 @ invalidate I-cache\n" | 379 | asm("mcr p15, 0, %0, c7, c5, 0 @ invalidate I-cache\n" |
376 | : | 380 | : |
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index bff056489cc1..51662feb9f1d 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #include <asm/ptrace.h> | 9 | #include <asm/ptrace.h> |
10 | #include <asm/user.h> | 10 | #include <asm/user.h> |
11 | 11 | ||
12 | struct task_struct; | ||
13 | |||
12 | typedef unsigned long elf_greg_t; | 14 | typedef unsigned long elf_greg_t; |
13 | typedef unsigned long elf_freg_t[3]; | 15 | typedef unsigned long elf_freg_t[3]; |
14 | 16 | ||
diff --git a/arch/arm/include/asm/smp_twd.h b/arch/arm/include/asm/smp_twd.h index 7be0978b2625..634f357be6bb 100644 --- a/arch/arm/include/asm/smp_twd.h +++ b/arch/arm/include/asm/smp_twd.h | |||
@@ -1,6 +1,23 @@ | |||
1 | #ifndef __ASMARM_SMP_TWD_H | 1 | #ifndef __ASMARM_SMP_TWD_H |
2 | #define __ASMARM_SMP_TWD_H | 2 | #define __ASMARM_SMP_TWD_H |
3 | 3 | ||
4 | #define TWD_TIMER_LOAD 0x00 | ||
5 | #define TWD_TIMER_COUNTER 0x04 | ||
6 | #define TWD_TIMER_CONTROL 0x08 | ||
7 | #define TWD_TIMER_INTSTAT 0x0C | ||
8 | |||
9 | #define TWD_WDOG_LOAD 0x20 | ||
10 | #define TWD_WDOG_COUNTER 0x24 | ||
11 | #define TWD_WDOG_CONTROL 0x28 | ||
12 | #define TWD_WDOG_INTSTAT 0x2C | ||
13 | #define TWD_WDOG_RESETSTAT 0x30 | ||
14 | #define TWD_WDOG_DISABLE 0x34 | ||
15 | |||
16 | #define TWD_TIMER_CONTROL_ENABLE (1 << 0) | ||
17 | #define TWD_TIMER_CONTROL_ONESHOT (0 << 1) | ||
18 | #define TWD_TIMER_CONTROL_PERIODIC (1 << 1) | ||
19 | #define TWD_TIMER_CONTROL_IT_ENABLE (1 << 2) | ||
20 | |||
4 | struct clock_event_device; | 21 | struct clock_event_device; |
5 | 22 | ||
6 | extern void __iomem *twd_base; | 23 | extern void __iomem *twd_base; |
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index e085e2c545eb..bd863d8608cd 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h | |||
@@ -46,6 +46,9 @@ | |||
46 | #define TLB_V7_UIS_FULL (1 << 20) | 46 | #define TLB_V7_UIS_FULL (1 << 20) |
47 | #define TLB_V7_UIS_ASID (1 << 21) | 47 | #define TLB_V7_UIS_ASID (1 << 21) |
48 | 48 | ||
49 | /* Inner Shareable BTB operation (ARMv7 MP extensions) */ | ||
50 | #define TLB_V7_IS_BTB (1 << 22) | ||
51 | |||
49 | #define TLB_L2CLEAN_FR (1 << 29) /* Feroceon */ | 52 | #define TLB_L2CLEAN_FR (1 << 29) /* Feroceon */ |
50 | #define TLB_DCLEAN (1 << 30) | 53 | #define TLB_DCLEAN (1 << 30) |
51 | #define TLB_WB (1 << 31) | 54 | #define TLB_WB (1 << 31) |
@@ -183,7 +186,7 @@ | |||
183 | #endif | 186 | #endif |
184 | 187 | ||
185 | #ifdef CONFIG_SMP | 188 | #ifdef CONFIG_SMP |
186 | #define v7wbi_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_BTB | \ | 189 | #define v7wbi_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_V7_IS_BTB | \ |
187 | TLB_V7_UIS_FULL | TLB_V7_UIS_PAGE | TLB_V7_UIS_ASID) | 190 | TLB_V7_UIS_FULL | TLB_V7_UIS_PAGE | TLB_V7_UIS_ASID) |
188 | #else | 191 | #else |
189 | #define v7wbi_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_BTB | \ | 192 | #define v7wbi_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_BTB | \ |
@@ -339,6 +342,12 @@ static inline void local_flush_tlb_all(void) | |||
339 | dsb(); | 342 | dsb(); |
340 | isb(); | 343 | isb(); |
341 | } | 344 | } |
345 | if (tlb_flag(TLB_V7_IS_BTB)) { | ||
346 | /* flush the branch target cache */ | ||
347 | asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero) : "cc"); | ||
348 | dsb(); | ||
349 | isb(); | ||
350 | } | ||
342 | } | 351 | } |
343 | 352 | ||
344 | static inline void local_flush_tlb_mm(struct mm_struct *mm) | 353 | static inline void local_flush_tlb_mm(struct mm_struct *mm) |
@@ -376,6 +385,12 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm) | |||
376 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); | 385 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); |
377 | dsb(); | 386 | dsb(); |
378 | } | 387 | } |
388 | if (tlb_flag(TLB_V7_IS_BTB)) { | ||
389 | /* flush the branch target cache */ | ||
390 | asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero) : "cc"); | ||
391 | dsb(); | ||
392 | isb(); | ||
393 | } | ||
379 | } | 394 | } |
380 | 395 | ||
381 | static inline void | 396 | static inline void |
@@ -416,6 +431,12 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | |||
416 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); | 431 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); |
417 | dsb(); | 432 | dsb(); |
418 | } | 433 | } |
434 | if (tlb_flag(TLB_V7_IS_BTB)) { | ||
435 | /* flush the branch target cache */ | ||
436 | asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero) : "cc"); | ||
437 | dsb(); | ||
438 | isb(); | ||
439 | } | ||
419 | } | 440 | } |
420 | 441 | ||
421 | static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | 442 | static inline void local_flush_tlb_kernel_page(unsigned long kaddr) |
@@ -454,6 +475,12 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | |||
454 | dsb(); | 475 | dsb(); |
455 | isb(); | 476 | isb(); |
456 | } | 477 | } |
478 | if (tlb_flag(TLB_V7_IS_BTB)) { | ||
479 | /* flush the branch target cache */ | ||
480 | asm("mcr p15, 0, %0, c7, c1, 6" : : "r" (zero) : "cc"); | ||
481 | dsb(); | ||
482 | isb(); | ||
483 | } | ||
457 | } | 484 | } |
458 | 485 | ||
459 | /* | 486 | /* |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index e6a0fb0f392e..7ee48e7f8f31 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -676,10 +676,10 @@ do_fpe: | |||
676 | * lr = unrecognised FP instruction return address | 676 | * lr = unrecognised FP instruction return address |
677 | */ | 677 | */ |
678 | 678 | ||
679 | .data | 679 | .pushsection .data |
680 | ENTRY(fp_enter) | 680 | ENTRY(fp_enter) |
681 | .word no_fp | 681 | .word no_fp |
682 | .text | 682 | .popsection |
683 | 683 | ||
684 | ENTRY(no_fp) | 684 | ENTRY(no_fp) |
685 | mov pc, lr | 685 | mov pc, lr |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 577543f3857f..a01194e583ff 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -86,6 +86,12 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
86 | return PTR_ERR(idle); | 86 | return PTR_ERR(idle); |
87 | } | 87 | } |
88 | ci->idle = idle; | 88 | ci->idle = idle; |
89 | } else { | ||
90 | /* | ||
91 | * Since this idle thread is being re-used, call | ||
92 | * init_idle() to reinitialize the thread structure. | ||
93 | */ | ||
94 | init_idle(idle, cpu); | ||
89 | } | 95 | } |
90 | 96 | ||
91 | /* | 97 | /* |
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index ea02a7b1c244..7c5f0c024db7 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -21,23 +21,6 @@ | |||
21 | #include <asm/smp_twd.h> | 21 | #include <asm/smp_twd.h> |
22 | #include <asm/hardware/gic.h> | 22 | #include <asm/hardware/gic.h> |
23 | 23 | ||
24 | #define TWD_TIMER_LOAD 0x00 | ||
25 | #define TWD_TIMER_COUNTER 0x04 | ||
26 | #define TWD_TIMER_CONTROL 0x08 | ||
27 | #define TWD_TIMER_INTSTAT 0x0C | ||
28 | |||
29 | #define TWD_WDOG_LOAD 0x20 | ||
30 | #define TWD_WDOG_COUNTER 0x24 | ||
31 | #define TWD_WDOG_CONTROL 0x28 | ||
32 | #define TWD_WDOG_INTSTAT 0x2C | ||
33 | #define TWD_WDOG_RESETSTAT 0x30 | ||
34 | #define TWD_WDOG_DISABLE 0x34 | ||
35 | |||
36 | #define TWD_TIMER_CONTROL_ENABLE (1 << 0) | ||
37 | #define TWD_TIMER_CONTROL_ONESHOT (0 << 1) | ||
38 | #define TWD_TIMER_CONTROL_PERIODIC (1 << 1) | ||
39 | #define TWD_TIMER_CONTROL_IT_ENABLE (1 << 2) | ||
40 | |||
41 | /* set up by the platform code */ | 24 | /* set up by the platform code */ |
42 | void __iomem *twd_base; | 25 | void __iomem *twd_base; |
43 | 26 | ||
diff --git a/arch/arm/lib/clear_user.S b/arch/arm/lib/clear_user.S index 5e3f99620c04..14a0d988c82c 100644 --- a/arch/arm/lib/clear_user.S +++ b/arch/arm/lib/clear_user.S | |||
@@ -45,6 +45,7 @@ USER( strnebt r2, [r0]) | |||
45 | mov r0, #0 | 45 | mov r0, #0 |
46 | ldmfd sp!, {r1, pc} | 46 | ldmfd sp!, {r1, pc} |
47 | ENDPROC(__clear_user) | 47 | ENDPROC(__clear_user) |
48 | ENDPROC(__clear_user_std) | ||
48 | 49 | ||
49 | .pushsection .fixup,"ax" | 50 | .pushsection .fixup,"ax" |
50 | .align 0 | 51 | .align 0 |
diff --git a/arch/arm/lib/copy_to_user.S b/arch/arm/lib/copy_to_user.S index 027b69bdbad1..d066df686e17 100644 --- a/arch/arm/lib/copy_to_user.S +++ b/arch/arm/lib/copy_to_user.S | |||
@@ -93,6 +93,7 @@ WEAK(__copy_to_user) | |||
93 | #include "copy_template.S" | 93 | #include "copy_template.S" |
94 | 94 | ||
95 | ENDPROC(__copy_to_user) | 95 | ENDPROC(__copy_to_user) |
96 | ENDPROC(__copy_to_user_std) | ||
96 | 97 | ||
97 | .pushsection .fixup,"ax" | 98 | .pushsection .fixup,"ax" |
98 | .align 0 | 99 | .align 0 |
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index 122e61a9f505..e8cb982f5e8e 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c | |||
@@ -410,7 +410,7 @@ static struct clk_lookup da830_clks[] = { | |||
410 | CLK("davinci-mcasp.0", NULL, &mcasp0_clk), | 410 | CLK("davinci-mcasp.0", NULL, &mcasp0_clk), |
411 | CLK("davinci-mcasp.1", NULL, &mcasp1_clk), | 411 | CLK("davinci-mcasp.1", NULL, &mcasp1_clk), |
412 | CLK("davinci-mcasp.2", NULL, &mcasp2_clk), | 412 | CLK("davinci-mcasp.2", NULL, &mcasp2_clk), |
413 | CLK("musb_hdrc", NULL, &usb20_clk), | 413 | CLK(NULL, "usb20", &usb20_clk), |
414 | CLK(NULL, "aemif", &aemif_clk), | 414 | CLK(NULL, "aemif", &aemif_clk), |
415 | CLK(NULL, "aintc", &aintc_clk), | 415 | CLK(NULL, "aintc", &aintc_clk), |
416 | CLK(NULL, "secu_mgr", &secu_mgr_clk), | 416 | CLK(NULL, "secu_mgr", &secu_mgr_clk), |
diff --git a/arch/arm/mach-mx5/clock-mx51.c b/arch/arm/mach-mx5/clock-mx51.c index 8f85f73b83a8..1ee6ce4087b8 100644 --- a/arch/arm/mach-mx5/clock-mx51.c +++ b/arch/arm/mach-mx5/clock-mx51.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | 17 | ||
18 | #include <asm/clkdev.h> | 18 | #include <asm/clkdev.h> |
19 | #include <asm/div64.h> | ||
19 | 20 | ||
20 | #include <mach/hardware.h> | 21 | #include <mach/hardware.h> |
21 | #include <mach/common.h> | 22 | #include <mach/common.h> |
diff --git a/arch/arm/mach-pxa/include/mach/colibri.h b/arch/arm/mach-pxa/include/mach/colibri.h index 811743c56147..5f2ba8d9015c 100644 --- a/arch/arm/mach-pxa/include/mach/colibri.h +++ b/arch/arm/mach-pxa/include/mach/colibri.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _COLIBRI_H_ | 2 | #define _COLIBRI_H_ |
3 | 3 | ||
4 | #include <net/ax88796.h> | 4 | #include <net/ax88796.h> |
5 | #include <mach/mfp.h> | ||
5 | 6 | ||
6 | /* | 7 | /* |
7 | * common settings for all modules | 8 | * common settings for all modules |
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h index 7515757d6911..3d8d8cb09685 100644 --- a/arch/arm/mach-pxa/include/mach/hardware.h +++ b/arch/arm/mach-pxa/include/mach/hardware.h | |||
@@ -202,7 +202,7 @@ | |||
202 | #define __cpu_is_pxa950(id) \ | 202 | #define __cpu_is_pxa950(id) \ |
203 | ({ \ | 203 | ({ \ |
204 | unsigned int _id = (id) >> 4 & 0xfff; \ | 204 | unsigned int _id = (id) >> 4 & 0xfff; \ |
205 | id == 0x697; \ | 205 | _id == 0x697; \ |
206 | }) | 206 | }) |
207 | #else | 207 | #else |
208 | #define __cpu_is_pxa950(id) (0) | 208 | #define __cpu_is_pxa950(id) (0) |
diff --git a/arch/arm/mach-pxa/include/mach/regs-u2d.h b/arch/arm/mach-pxa/include/mach/regs-u2d.h index 44b0b20b69a4..c15c0c57de08 100644 --- a/arch/arm/mach-pxa/include/mach/regs-u2d.h +++ b/arch/arm/mach-pxa/include/mach/regs-u2d.h | |||
@@ -166,7 +166,8 @@ | |||
166 | #define U2DMACSR_BUSERRTYPE (7 << 10) /* PX Bus Error Type */ | 166 | #define U2DMACSR_BUSERRTYPE (7 << 10) /* PX Bus Error Type */ |
167 | #define U2DMACSR_EORINTR (1 << 9) /* End Of Receive */ | 167 | #define U2DMACSR_EORINTR (1 << 9) /* End Of Receive */ |
168 | #define U2DMACSR_REQPEND (1 << 8) /* Request Pending */ | 168 | #define U2DMACSR_REQPEND (1 << 8) /* Request Pending */ |
169 | #define U2DMACSR_RASINTR (1 << 4) /* Request After Channel Stopped (read / write 1 clear) */#define U2DMACSR_STOPINTR (1 << 3) /* Stop Interrupt (read only) */ | 169 | #define U2DMACSR_RASINTR (1 << 4) /* Request After Channel Stopped (read / write 1 clear) */ |
170 | #define U2DMACSR_STOPINTR (1 << 3) /* Stop Interrupt (read only) */ | ||
170 | #define U2DMACSR_ENDINTR (1 << 2) /* End Interrupt (read / write 1 clear) */ | 171 | #define U2DMACSR_ENDINTR (1 << 2) /* End Interrupt (read / write 1 clear) */ |
171 | #define U2DMACSR_STARTINTR (1 << 1) /* Start Interrupt (read / write 1 clear) */ | 172 | #define U2DMACSR_STARTINTR (1 << 1) /* Start Interrupt (read / write 1 clear) */ |
172 | #define U2DMACSR_BUSERRINTR (1 << 0) /* Bus Error Interrupt (read / write 1 clear) */ | 173 | #define U2DMACSR_BUSERRINTR (1 << 0) /* Bus Error Interrupt (read / write 1 clear) */ |
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 44bb675e47f1..d12667bd9ebe 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c | |||
@@ -983,7 +983,7 @@ static void __init raumfeld_common_init(void) | |||
983 | int i; | 983 | int i; |
984 | 984 | ||
985 | for (i = 0; i < ARRAY_SIZE(gpio_keys_button); i++) | 985 | for (i = 0; i < ARRAY_SIZE(gpio_keys_button); i++) |
986 | if (!strcmp(gpio_keys_button[i].desc, "on/off button")) | 986 | if (!strcmp(gpio_keys_button[i].desc, "on_off button")) |
987 | gpio_keys_button[i].active_low = 1; | 987 | gpio_keys_button[i].active_low = 1; |
988 | } | 988 | } |
989 | 989 | ||
@@ -1009,8 +1009,7 @@ static void __init raumfeld_common_init(void) | |||
1009 | gpio_direction_output(GPIO_W2W_PDN, 0); | 1009 | gpio_direction_output(GPIO_W2W_PDN, 0); |
1010 | 1010 | ||
1011 | /* this can be used to switch off the device */ | 1011 | /* this can be used to switch off the device */ |
1012 | ret = gpio_request(GPIO_SHUTDOWN_SUPPLY, | 1012 | ret = gpio_request(GPIO_SHUTDOWN_SUPPLY, "supply shutdown"); |
1013 | "supply shutdown"); | ||
1014 | if (ret < 0) | 1013 | if (ret < 0) |
1015 | pr_warning("Unable to request GPIO_SHUTDOWN_SUPPLY\n"); | 1014 | pr_warning("Unable to request GPIO_SHUTDOWN_SUPPLY\n"); |
1016 | else | 1015 | else |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 19b5109d9808..01bdd7500df4 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -363,7 +363,7 @@ static struct gpio_keys_button spitz_gpio_keys[] = { | |||
363 | .type = EV_PWR, | 363 | .type = EV_PWR, |
364 | .code = KEY_SUSPEND, | 364 | .code = KEY_SUSPEND, |
365 | .gpio = SPITZ_GPIO_ON_KEY, | 365 | .gpio = SPITZ_GPIO_ON_KEY, |
366 | .desc = "On/Off", | 366 | .desc = "On Off", |
367 | .wakeup = 1, | 367 | .wakeup = 1, |
368 | }, | 368 | }, |
369 | /* Two buttons detecting the lid state */ | 369 | /* Two buttons detecting the lid state */ |
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 9e0c5c3988a1..e90114a7e246 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/pm.h> | 34 | #include <linux/pm.h> |
35 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
36 | #include <linux/gpio.h> | 36 | #include <linux/gpio.h> |
37 | #include <linux/jiffies.h> | ||
37 | #include <linux/i2c-gpio.h> | 38 | #include <linux/i2c-gpio.h> |
38 | #include <linux/serial_8250.h> | 39 | #include <linux/serial_8250.h> |
39 | #include <linux/smc91x.h> | 40 | #include <linux/smc91x.h> |
@@ -454,7 +455,7 @@ static struct i2c_gpio_platform_data i2c_bus_data = { | |||
454 | .sda_pin = VIPER_RTC_I2C_SDA_GPIO, | 455 | .sda_pin = VIPER_RTC_I2C_SDA_GPIO, |
455 | .scl_pin = VIPER_RTC_I2C_SCL_GPIO, | 456 | .scl_pin = VIPER_RTC_I2C_SCL_GPIO, |
456 | .udelay = 10, | 457 | .udelay = 10, |
457 | .timeout = 100, | 458 | .timeout = HZ, |
458 | }; | 459 | }; |
459 | 460 | ||
460 | static struct platform_device i2c_bus_device = { | 461 | static struct platform_device i2c_bus_device = { |
@@ -779,7 +780,7 @@ static void __init viper_tpm_init(void) | |||
779 | .sda_pin = VIPER_TPM_I2C_SDA_GPIO, | 780 | .sda_pin = VIPER_TPM_I2C_SDA_GPIO, |
780 | .scl_pin = VIPER_TPM_I2C_SCL_GPIO, | 781 | .scl_pin = VIPER_TPM_I2C_SCL_GPIO, |
781 | .udelay = 10, | 782 | .udelay = 10, |
782 | .timeout = 100, | 783 | .timeout = HZ, |
783 | }; | 784 | }; |
784 | char *errstr; | 785 | char *errstr; |
785 | 786 | ||
diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig index b17d52f7cc48..fd4c52b7ccb6 100644 --- a/arch/arm/mach-sa1100/Kconfig +++ b/arch/arm/mach-sa1100/Kconfig | |||
@@ -57,7 +57,7 @@ config SA1100_COLLIE | |||
57 | config SA1100_H3100 | 57 | config SA1100_H3100 |
58 | bool "Compaq iPAQ H3100" | 58 | bool "Compaq iPAQ H3100" |
59 | select HTC_EGPIO | 59 | select HTC_EGPIO |
60 | select CPU_FREQ_SA1100 | 60 | select CPU_FREQ_SA1110 |
61 | help | 61 | help |
62 | Say Y here if you intend to run this kernel on the Compaq iPAQ | 62 | Say Y here if you intend to run this kernel on the Compaq iPAQ |
63 | H3100 handheld computer. Information about this machine and the | 63 | H3100 handheld computer. Information about this machine and the |
@@ -68,7 +68,7 @@ config SA1100_H3100 | |||
68 | config SA1100_H3600 | 68 | config SA1100_H3600 |
69 | bool "Compaq iPAQ H3600/H3700" | 69 | bool "Compaq iPAQ H3600/H3700" |
70 | select HTC_EGPIO | 70 | select HTC_EGPIO |
71 | select CPU_FREQ_SA1100 | 71 | select CPU_FREQ_SA1110 |
72 | help | 72 | help |
73 | Say Y here if you intend to run this kernel on the Compaq iPAQ | 73 | Say Y here if you intend to run this kernel on the Compaq iPAQ |
74 | H3600 handheld computer. Information about this machine and the | 74 | H3600 handheld computer. Information about this machine and the |
diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c index 63b32b68b296..7252874d328b 100644 --- a/arch/arm/mach-sa1100/cpu-sa1110.c +++ b/arch/arm/mach-sa1100/cpu-sa1110.c | |||
@@ -363,6 +363,9 @@ static int __init sa1110_clk_init(void) | |||
363 | struct sdram_params *sdram; | 363 | struct sdram_params *sdram; |
364 | const char *name = sdram_name; | 364 | const char *name = sdram_name; |
365 | 365 | ||
366 | if (!cpu_is_sa1110()) | ||
367 | return -ENODEV; | ||
368 | |||
366 | if (!name[0]) { | 369 | if (!name[0]) { |
367 | if (machine_is_assabet()) | 370 | if (machine_is_assabet()) |
368 | name = "TC59SM716-CL3"; | 371 | name = "TC59SM716-CL3"; |
diff --git a/arch/arm/mm/cache-v6.S b/arch/arm/mm/cache-v6.S index 9d89c67a1cc3..e46ecd847138 100644 --- a/arch/arm/mm/cache-v6.S +++ b/arch/arm/mm/cache-v6.S | |||
@@ -211,6 +211,9 @@ v6_dma_inv_range: | |||
211 | mcrne p15, 0, r1, c7, c15, 1 @ clean & invalidate unified line | 211 | mcrne p15, 0, r1, c7, c15, 1 @ clean & invalidate unified line |
212 | #endif | 212 | #endif |
213 | 1: | 213 | 1: |
214 | #ifdef CONFIG_SMP | ||
215 | str r0, [r0] @ write for ownership | ||
216 | #endif | ||
214 | #ifdef HARVARD_CACHE | 217 | #ifdef HARVARD_CACHE |
215 | mcr p15, 0, r0, c7, c6, 1 @ invalidate D line | 218 | mcr p15, 0, r0, c7, c6, 1 @ invalidate D line |
216 | #else | 219 | #else |
@@ -231,6 +234,9 @@ v6_dma_inv_range: | |||
231 | v6_dma_clean_range: | 234 | v6_dma_clean_range: |
232 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 | 235 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 |
233 | 1: | 236 | 1: |
237 | #ifdef CONFIG_SMP | ||
238 | ldr r2, [r0] @ read for ownership | ||
239 | #endif | ||
234 | #ifdef HARVARD_CACHE | 240 | #ifdef HARVARD_CACHE |
235 | mcr p15, 0, r0, c7, c10, 1 @ clean D line | 241 | mcr p15, 0, r0, c7, c10, 1 @ clean D line |
236 | #else | 242 | #else |
@@ -251,6 +257,10 @@ v6_dma_clean_range: | |||
251 | ENTRY(v6_dma_flush_range) | 257 | ENTRY(v6_dma_flush_range) |
252 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 | 258 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 |
253 | 1: | 259 | 1: |
260 | #ifdef CONFIG_SMP | ||
261 | ldr r2, [r0] @ read for ownership | ||
262 | str r2, [r0] @ write for ownership | ||
263 | #endif | ||
254 | #ifdef HARVARD_CACHE | 264 | #ifdef HARVARD_CACHE |
255 | mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line | 265 | mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line |
256 | #else | 266 | #else |
@@ -273,7 +283,9 @@ ENTRY(v6_dma_map_area) | |||
273 | add r1, r1, r0 | 283 | add r1, r1, r0 |
274 | teq r2, #DMA_FROM_DEVICE | 284 | teq r2, #DMA_FROM_DEVICE |
275 | beq v6_dma_inv_range | 285 | beq v6_dma_inv_range |
276 | b v6_dma_clean_range | 286 | teq r2, #DMA_TO_DEVICE |
287 | beq v6_dma_clean_range | ||
288 | b v6_dma_flush_range | ||
277 | ENDPROC(v6_dma_map_area) | 289 | ENDPROC(v6_dma_map_area) |
278 | 290 | ||
279 | /* | 291 | /* |
@@ -283,9 +295,6 @@ ENDPROC(v6_dma_map_area) | |||
283 | * - dir - DMA direction | 295 | * - dir - DMA direction |
284 | */ | 296 | */ |
285 | ENTRY(v6_dma_unmap_area) | 297 | ENTRY(v6_dma_unmap_area) |
286 | add r1, r1, r0 | ||
287 | teq r2, #DMA_TO_DEVICE | ||
288 | bne v6_dma_inv_range | ||
289 | mov pc, lr | 298 | mov pc, lr |
290 | ENDPROC(v6_dma_unmap_area) | 299 | ENDPROC(v6_dma_unmap_area) |
291 | 300 | ||
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index bcd64f265870..06a90dcfc60a 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -167,7 +167,11 @@ ENTRY(v7_coherent_user_range) | |||
167 | cmp r0, r1 | 167 | cmp r0, r1 |
168 | blo 1b | 168 | blo 1b |
169 | mov r0, #0 | 169 | mov r0, #0 |
170 | #ifdef CONFIG_SMP | ||
171 | mcr p15, 0, r0, c7, c1, 6 @ invalidate BTB Inner Shareable | ||
172 | #else | ||
170 | mcr p15, 0, r0, c7, c5, 6 @ invalidate BTB | 173 | mcr p15, 0, r0, c7, c5, 6 @ invalidate BTB |
174 | #endif | ||
171 | dsb | 175 | dsb |
172 | isb | 176 | isb |
173 | mov pc, lr | 177 | mov pc, lr |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 83db12a68d56..0ed29bfeba1c 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -86,9 +86,6 @@ void show_mem(void) | |||
86 | printk("Mem-info:\n"); | 86 | printk("Mem-info:\n"); |
87 | show_free_areas(); | 87 | show_free_areas(); |
88 | for_each_online_node(node) { | 88 | for_each_online_node(node) { |
89 | pg_data_t *n = NODE_DATA(node); | ||
90 | struct page *map = pgdat_page_nr(n, 0) - n->node_start_pfn; | ||
91 | |||
92 | for_each_nodebank (i,mi,node) { | 89 | for_each_nodebank (i,mi,node) { |
93 | struct membank *bank = &mi->bank[i]; | 90 | struct membank *bank = &mi->bank[i]; |
94 | unsigned int pfn1, pfn2; | 91 | unsigned int pfn1, pfn2; |
@@ -97,8 +94,8 @@ void show_mem(void) | |||
97 | pfn1 = bank_pfn_start(bank); | 94 | pfn1 = bank_pfn_start(bank); |
98 | pfn2 = bank_pfn_end(bank); | 95 | pfn2 = bank_pfn_end(bank); |
99 | 96 | ||
100 | page = map + pfn1; | 97 | page = pfn_to_page(pfn1); |
101 | end = map + pfn2; | 98 | end = pfn_to_page(pfn2 - 1) + 1; |
102 | 99 | ||
103 | do { | 100 | do { |
104 | total++; | 101 | total++; |
@@ -603,9 +600,6 @@ void __init mem_init(void) | |||
603 | reserved_pages = free_pages = 0; | 600 | reserved_pages = free_pages = 0; |
604 | 601 | ||
605 | for_each_online_node(node) { | 602 | for_each_online_node(node) { |
606 | pg_data_t *n = NODE_DATA(node); | ||
607 | struct page *map = pgdat_page_nr(n, 0) - n->node_start_pfn; | ||
608 | |||
609 | for_each_nodebank(i, &meminfo, node) { | 603 | for_each_nodebank(i, &meminfo, node) { |
610 | struct membank *bank = &meminfo.bank[i]; | 604 | struct membank *bank = &meminfo.bank[i]; |
611 | unsigned int pfn1, pfn2; | 605 | unsigned int pfn1, pfn2; |
@@ -614,8 +608,8 @@ void __init mem_init(void) | |||
614 | pfn1 = bank_pfn_start(bank); | 608 | pfn1 = bank_pfn_start(bank); |
615 | pfn2 = bank_pfn_end(bank); | 609 | pfn2 = bank_pfn_end(bank); |
616 | 610 | ||
617 | page = map + pfn1; | 611 | page = pfn_to_page(pfn1); |
618 | end = map + pfn2; | 612 | end = pfn_to_page(pfn2 - 1) + 1; |
619 | 613 | ||
620 | do { | 614 | do { |
621 | if (PageReserved(page)) | 615 | if (PageReserved(page)) |
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index 9bfeb6b9509a..33b327379f07 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c | |||
@@ -65,6 +65,15 @@ void flush_dcache_page(struct page *page) | |||
65 | } | 65 | } |
66 | EXPORT_SYMBOL(flush_dcache_page); | 66 | EXPORT_SYMBOL(flush_dcache_page); |
67 | 67 | ||
68 | void copy_to_user_page(struct vm_area_struct *vma, struct page *page, | ||
69 | unsigned long uaddr, void *dst, const void *src, | ||
70 | unsigned long len) | ||
71 | { | ||
72 | memcpy(dst, src, len); | ||
73 | if (vma->vm_flags & VM_EXEC) | ||
74 | __cpuc_coherent_user_range(uaddr, uaddr + len); | ||
75 | } | ||
76 | |||
68 | void __iomem *__arm_ioremap_pfn(unsigned long pfn, unsigned long offset, | 77 | void __iomem *__arm_ioremap_pfn(unsigned long pfn, unsigned long offset, |
69 | size_t size, unsigned int mtype) | 78 | size_t size, unsigned int mtype) |
70 | { | 79 | { |
@@ -87,8 +96,8 @@ void __iomem *__arm_ioremap(unsigned long phys_addr, size_t size, | |||
87 | } | 96 | } |
88 | EXPORT_SYMBOL(__arm_ioremap); | 97 | EXPORT_SYMBOL(__arm_ioremap); |
89 | 98 | ||
90 | void __iomem *__arm_ioremap(unsigned long phys_addr, size_t size, | 99 | void __iomem *__arm_ioremap_caller(unsigned long phys_addr, size_t size, |
91 | unsigned int mtype, void *caller) | 100 | unsigned int mtype, void *caller) |
92 | { | 101 | { |
93 | return __arm_ioremap(phys_addr, size, mtype); | 102 | return __arm_ioremap(phys_addr, size, mtype); |
94 | } | 103 | } |
diff --git a/arch/arm/mm/tlb-v7.S b/arch/arm/mm/tlb-v7.S index 0cb1848bd876..f3f288a9546d 100644 --- a/arch/arm/mm/tlb-v7.S +++ b/arch/arm/mm/tlb-v7.S | |||
@@ -50,7 +50,11 @@ ENTRY(v7wbi_flush_user_tlb_range) | |||
50 | cmp r0, r1 | 50 | cmp r0, r1 |
51 | blo 1b | 51 | blo 1b |
52 | mov ip, #0 | 52 | mov ip, #0 |
53 | #ifdef CONFIG_SMP | ||
54 | mcr p15, 0, ip, c7, c1, 6 @ flush BTAC/BTB Inner Shareable | ||
55 | #else | ||
53 | mcr p15, 0, ip, c7, c5, 6 @ flush BTAC/BTB | 56 | mcr p15, 0, ip, c7, c5, 6 @ flush BTAC/BTB |
57 | #endif | ||
54 | dsb | 58 | dsb |
55 | mov pc, lr | 59 | mov pc, lr |
56 | ENDPROC(v7wbi_flush_user_tlb_range) | 60 | ENDPROC(v7wbi_flush_user_tlb_range) |
@@ -79,7 +83,11 @@ ENTRY(v7wbi_flush_kern_tlb_range) | |||
79 | cmp r0, r1 | 83 | cmp r0, r1 |
80 | blo 1b | 84 | blo 1b |
81 | mov r2, #0 | 85 | mov r2, #0 |
86 | #ifdef CONFIG_SMP | ||
87 | mcr p15, 0, r2, c7, c1, 6 @ flush BTAC/BTB Inner Shareable | ||
88 | #else | ||
82 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB | 89 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB |
90 | #endif | ||
83 | dsb | 91 | dsb |
84 | isb | 92 | isb |
85 | mov pc, lr | 93 | mov pc, lr |
diff --git a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h b/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h index 07be8ad7ec37..7c4870bd5a21 100644 --- a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h +++ b/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h | |||
@@ -31,7 +31,13 @@ | |||
31 | #define DMA_MODE_WRITE 1 | 31 | #define DMA_MODE_WRITE 1 |
32 | #define DMA_MODE_MASK 1 | 32 | #define DMA_MODE_MASK 1 |
33 | 33 | ||
34 | #define DMA_BASE IO_ADDRESS(DMA_BASE_ADDR) | 34 | #define MX1_DMA_REG(offset) MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR + (offset)) |
35 | |||
36 | /* DMA Interrupt Mask Register */ | ||
37 | #define MX1_DMA_DIMR MX1_DMA_REG(0x08) | ||
38 | |||
39 | /* Channel Control Register */ | ||
40 | #define MX1_DMA_CCR(x) MX1_DMA_REG(0x8c + ((x) << 6)) | ||
35 | 41 | ||
36 | #define IMX_DMA_MEMSIZE_32 (0 << 4) | 42 | #define IMX_DMA_MEMSIZE_32 (0 << 4) |
37 | #define IMX_DMA_MEMSIZE_8 (1 << 4) | 43 | #define IMX_DMA_MEMSIZE_8 (1 << 4) |
diff --git a/arch/arm/plat-pxa/dma.c b/arch/arm/plat-pxa/dma.c index 742350e0f2a7..2d3c19d7c7b1 100644 --- a/arch/arm/plat-pxa/dma.c +++ b/arch/arm/plat-pxa/dma.c | |||
@@ -245,7 +245,7 @@ static void pxa_dma_init_debugfs(void) | |||
245 | 245 | ||
246 | dbgfs_chan = kmalloc(sizeof(*dbgfs_state) * num_dma_channels, | 246 | dbgfs_chan = kmalloc(sizeof(*dbgfs_state) * num_dma_channels, |
247 | GFP_KERNEL); | 247 | GFP_KERNEL); |
248 | if (!dbgfs_state) | 248 | if (!dbgfs_chan) |
249 | goto err_alloc; | 249 | goto err_alloc; |
250 | 250 | ||
251 | chandir = debugfs_create_dir("channels", dbgfs_root); | 251 | chandir = debugfs_create_dir("channels", dbgfs_root); |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 1536f1784cac..8f10d24ae625 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -12,7 +12,7 @@ | |||
12 | # | 12 | # |
13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
14 | # | 14 | # |
15 | # Last update: Sat Mar 20 15:35:41 2010 | 15 | # Last update: Sat May 1 10:36:42 2010 |
16 | # | 16 | # |
17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
18 | # | 18 | # |
@@ -2749,3 +2749,58 @@ stamp9g45 MACH_STAMP9G45 STAMP9G45 2761 | |||
2749 | h6053 MACH_H6053 H6053 2762 | 2749 | h6053 MACH_H6053 H6053 2762 |
2750 | smint01 MACH_SMINT01 SMINT01 2763 | 2750 | smint01 MACH_SMINT01 SMINT01 2763 |
2751 | prtlvt2 MACH_PRTLVT2 PRTLVT2 2764 | 2751 | prtlvt2 MACH_PRTLVT2 PRTLVT2 2764 |
2752 | ap420 MACH_AP420 AP420 2765 | ||
2753 | htcshift MACH_HTCSHIFT HTCSHIFT 2766 | ||
2754 | davinci_dm365_fc MACH_DAVINCI_DM365_FC DAVINCI_DM365_FC 2767 | ||
2755 | msm8x55_surf MACH_MSM8X55_SURF MSM8X55_SURF 2768 | ||
2756 | msm8x55_ffa MACH_MSM8X55_FFA MSM8X55_FFA 2769 | ||
2757 | esl_vamana MACH_ESL_VAMANA ESL_VAMANA 2770 | ||
2758 | sbc35 MACH_SBC35 SBC35 2771 | ||
2759 | mpx6446 MACH_MPX6446 MPX6446 2772 | ||
2760 | oreo_controller MACH_OREO_CONTROLLER OREO_CONTROLLER 2773 | ||
2761 | kopin_models MACH_KOPIN_MODELS KOPIN_MODELS 2774 | ||
2762 | ttc_vision2 MACH_TTC_VISION2 TTC_VISION2 2775 | ||
2763 | cns3420vb MACH_CNS3420VB CNS3420VB 2776 | ||
2764 | lpc2 MACH_LPC2 LPC2 2777 | ||
2765 | olympus MACH_OLYMPUS OLYMPUS 2778 | ||
2766 | vortex MACH_VORTEX VORTEX 2779 | ||
2767 | s5pc200 MACH_S5PC200 S5PC200 2780 | ||
2768 | ecucore_9263 MACH_ECUCORE_9263 ECUCORE_9263 2781 | ||
2769 | smdkc200 MACH_SMDKC200 SMDKC200 2782 | ||
2770 | emsiso_sx27 MACH_EMSISO_SX27 EMSISO_SX27 2783 | ||
2771 | apx_som9g45_ek MACH_APX_SOM9G45_EK APX_SOM9G45_EK 2784 | ||
2772 | songshan MACH_SONGSHAN SONGSHAN 2785 | ||
2773 | tianshan MACH_TIANSHAN TIANSHAN 2786 | ||
2774 | vpx500 MACH_VPX500 VPX500 2787 | ||
2775 | am3517sam MACH_AM3517SAM AM3517SAM 2788 | ||
2776 | skat91_sim508 MACH_SKAT91_SIM508 SKAT91_SIM508 2789 | ||
2777 | skat91_s3e MACH_SKAT91_S3E SKAT91_S3E 2790 | ||
2778 | omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 | ||
2779 | df7220 MACH_DF7220 DF7220 2792 | ||
2780 | nemini MACH_NEMINI NEMINI 2793 | ||
2781 | t8200 MACH_T8200 T8200 2794 | ||
2782 | apf51 MACH_APF51 APF51 2795 | ||
2783 | dr_rc_unit MACH_DR_RC_UNIT DR_RC_UNIT 2796 | ||
2784 | bordeaux MACH_BORDEAUX BORDEAUX 2797 | ||
2785 | catania_b MACH_CATANIA_B CATANIA_B 2798 | ||
2786 | mx51_ocean MACH_MX51_OCEAN MX51_OCEAN 2799 | ||
2787 | ti8168evm MACH_TI8168EVM TI8168EVM 2800 | ||
2788 | neocoreomap MACH_NEOCOREOMAP NEOCOREOMAP 2801 | ||
2789 | withings_wbp MACH_WITHINGS_WBP WITHINGS_WBP 2802 | ||
2790 | dbps MACH_DBPS DBPS 2803 | ||
2791 | sbc9261 MACH_SBC9261 SBC9261 2804 | ||
2792 | pcbfp0001 MACH_PCBFP0001 PCBFP0001 2805 | ||
2793 | speedy MACH_SPEEDY SPEEDY 2806 | ||
2794 | chrysaor MACH_CHRYSAOR CHRYSAOR 2807 | ||
2795 | tango MACH_TANGO TANGO 2808 | ||
2796 | synology_dsx11 MACH_SYNOLOGY_DSX11 SYNOLOGY_DSX11 2809 | ||
2797 | hanlin_v3ext MACH_HANLIN_V3EXT HANLIN_V3EXT 2810 | ||
2798 | hanlin_v5 MACH_HANLIN_V5 HANLIN_V5 2811 | ||
2799 | hanlin_v3plus MACH_HANLIN_V3PLUS HANLIN_V3PLUS 2812 | ||
2800 | iriver_story MACH_IRIVER_STORY IRIVER_STORY 2813 | ||
2801 | irex_iliad MACH_IREX_ILIAD IREX_ILIAD 2814 | ||
2802 | irex_dr1000 MACH_IREX_DR1000 IREX_DR1000 2815 | ||
2803 | teton_bga MACH_TETON_BGA TETON_BGA 2816 | ||
2804 | snapper9g45 MACH_SNAPPER9G45 SNAPPER9G45 2817 | ||
2805 | tam3517 MACH_TAM3517 TAM3517 2818 | ||
2806 | pdc100 MACH_PDC100 PDC100 2819 | ||
diff --git a/arch/microblaze/configs/mmu_defconfig b/arch/microblaze/configs/mmu_defconfig index 6fced1fe3bf0..3c91cf6192c6 100644 --- a/arch/microblaze/configs/mmu_defconfig +++ b/arch/microblaze/configs/mmu_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.33-rc6 | 3 | # Linux kernel version: 2.6.34-rc6 |
4 | # Wed Feb 3 10:02:59 2010 | 4 | # Thu May 6 11:22:14 2010 |
5 | # | 5 | # |
6 | CONFIG_MICROBLAZE=y | 6 | CONFIG_MICROBLAZE=y |
7 | # CONFIG_SWAP is not set | 7 | # CONFIG_SWAP is not set |
@@ -22,8 +22,6 @@ CONFIG_GENERIC_CSUM=y | |||
22 | CONFIG_STACKTRACE_SUPPORT=y | 22 | CONFIG_STACKTRACE_SUPPORT=y |
23 | CONFIG_LOCKDEP_SUPPORT=y | 23 | CONFIG_LOCKDEP_SUPPORT=y |
24 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | 24 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y |
25 | # CONFIG_PCI is not set | ||
26 | CONFIG_NO_DMA=y | ||
27 | CONFIG_DTC=y | 25 | CONFIG_DTC=y |
28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 26 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
29 | CONFIG_CONSTRUCTORS=y | 27 | CONFIG_CONSTRUCTORS=y |
@@ -56,7 +54,6 @@ CONFIG_RCU_FANOUT=32 | |||
56 | CONFIG_IKCONFIG=y | 54 | CONFIG_IKCONFIG=y |
57 | CONFIG_IKCONFIG_PROC=y | 55 | CONFIG_IKCONFIG_PROC=y |
58 | CONFIG_LOG_BUF_SHIFT=17 | 56 | CONFIG_LOG_BUF_SHIFT=17 |
59 | # CONFIG_GROUP_SCHED is not set | ||
60 | # CONFIG_CGROUPS is not set | 57 | # CONFIG_CGROUPS is not set |
61 | CONFIG_SYSFS_DEPRECATED=y | 58 | CONFIG_SYSFS_DEPRECATED=y |
62 | CONFIG_SYSFS_DEPRECATED_V2=y | 59 | CONFIG_SYSFS_DEPRECATED_V2=y |
@@ -106,6 +103,8 @@ CONFIG_SLAB=y | |||
106 | # CONFIG_SLOB is not set | 103 | # CONFIG_SLOB is not set |
107 | # CONFIG_PROFILING is not set | 104 | # CONFIG_PROFILING is not set |
108 | CONFIG_HAVE_OPROFILE=y | 105 | CONFIG_HAVE_OPROFILE=y |
106 | CONFIG_HAVE_DMA_ATTRS=y | ||
107 | CONFIG_HAVE_DMA_API_DEBUG=y | ||
109 | 108 | ||
110 | # | 109 | # |
111 | # GCOV-based kernel profiling | 110 | # GCOV-based kernel profiling |
@@ -245,13 +244,20 @@ CONFIG_BINFMT_ELF=y | |||
245 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 244 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
246 | # CONFIG_HAVE_AOUT is not set | 245 | # CONFIG_HAVE_AOUT is not set |
247 | # CONFIG_BINFMT_MISC is not set | 246 | # CONFIG_BINFMT_MISC is not set |
247 | |||
248 | # | ||
249 | # Bus Options | ||
250 | # | ||
251 | # CONFIG_PCI is not set | ||
252 | # CONFIG_PCI_DOMAINS is not set | ||
253 | # CONFIG_PCI_SYSCALL is not set | ||
254 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
248 | CONFIG_NET=y | 255 | CONFIG_NET=y |
249 | 256 | ||
250 | # | 257 | # |
251 | # Networking options | 258 | # Networking options |
252 | # | 259 | # |
253 | CONFIG_PACKET=y | 260 | CONFIG_PACKET=y |
254 | # CONFIG_PACKET_MMAP is not set | ||
255 | CONFIG_UNIX=y | 261 | CONFIG_UNIX=y |
256 | CONFIG_XFRM=y | 262 | CONFIG_XFRM=y |
257 | # CONFIG_XFRM_USER is not set | 263 | # CONFIG_XFRM_USER is not set |
@@ -341,7 +347,9 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
341 | # CONFIG_SYS_HYPERVISOR is not set | 347 | # CONFIG_SYS_HYPERVISOR is not set |
342 | # CONFIG_CONNECTOR is not set | 348 | # CONFIG_CONNECTOR is not set |
343 | # CONFIG_MTD is not set | 349 | # CONFIG_MTD is not set |
350 | CONFIG_OF_FLATTREE=y | ||
344 | CONFIG_OF_DEVICE=y | 351 | CONFIG_OF_DEVICE=y |
352 | CONFIG_OF_MDIO=y | ||
345 | # CONFIG_PARPORT is not set | 353 | # CONFIG_PARPORT is not set |
346 | CONFIG_BLK_DEV=y | 354 | CONFIG_BLK_DEV=y |
347 | # CONFIG_BLK_DEV_COW_COMMON is not set | 355 | # CONFIG_BLK_DEV_COW_COMMON is not set |
@@ -370,6 +378,7 @@ CONFIG_MISC_DEVICES=y | |||
370 | # | 378 | # |
371 | # SCSI device support | 379 | # SCSI device support |
372 | # | 380 | # |
381 | CONFIG_SCSI_MOD=y | ||
373 | # CONFIG_RAID_ATTRS is not set | 382 | # CONFIG_RAID_ATTRS is not set |
374 | # CONFIG_SCSI is not set | 383 | # CONFIG_SCSI is not set |
375 | # CONFIG_SCSI_DMA is not set | 384 | # CONFIG_SCSI_DMA is not set |
@@ -383,9 +392,30 @@ CONFIG_NETDEVICES=y | |||
383 | # CONFIG_EQUALIZER is not set | 392 | # CONFIG_EQUALIZER is not set |
384 | # CONFIG_TUN is not set | 393 | # CONFIG_TUN is not set |
385 | # CONFIG_VETH is not set | 394 | # CONFIG_VETH is not set |
386 | # CONFIG_PHYLIB is not set | 395 | CONFIG_PHYLIB=y |
396 | |||
397 | # | ||
398 | # MII PHY device drivers | ||
399 | # | ||
400 | # CONFIG_MARVELL_PHY is not set | ||
401 | # CONFIG_DAVICOM_PHY is not set | ||
402 | # CONFIG_QSEMI_PHY is not set | ||
403 | # CONFIG_LXT_PHY is not set | ||
404 | # CONFIG_CICADA_PHY is not set | ||
405 | # CONFIG_VITESSE_PHY is not set | ||
406 | # CONFIG_SMSC_PHY is not set | ||
407 | # CONFIG_BROADCOM_PHY is not set | ||
408 | # CONFIG_ICPLUS_PHY is not set | ||
409 | # CONFIG_REALTEK_PHY is not set | ||
410 | # CONFIG_NATIONAL_PHY is not set | ||
411 | # CONFIG_STE10XP is not set | ||
412 | # CONFIG_LSI_ET1011C_PHY is not set | ||
413 | # CONFIG_MICREL_PHY is not set | ||
414 | # CONFIG_FIXED_PHY is not set | ||
415 | # CONFIG_MDIO_BITBANG is not set | ||
387 | CONFIG_NET_ETHERNET=y | 416 | CONFIG_NET_ETHERNET=y |
388 | # CONFIG_MII is not set | 417 | # CONFIG_MII is not set |
418 | # CONFIG_ETHOC is not set | ||
389 | # CONFIG_DNET is not set | 419 | # CONFIG_DNET is not set |
390 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 420 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
391 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 421 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
@@ -394,6 +424,7 @@ CONFIG_NET_ETHERNET=y | |||
394 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | 424 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set |
395 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | 425 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set |
396 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | 426 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
427 | # CONFIG_B44 is not set | ||
397 | # CONFIG_KS8842 is not set | 428 | # CONFIG_KS8842 is not set |
398 | # CONFIG_KS8851_MLL is not set | 429 | # CONFIG_KS8851_MLL is not set |
399 | CONFIG_XILINX_EMACLITE=y | 430 | CONFIG_XILINX_EMACLITE=y |
@@ -444,6 +475,7 @@ CONFIG_SERIAL_UARTLITE=y | |||
444 | CONFIG_SERIAL_UARTLITE_CONSOLE=y | 475 | CONFIG_SERIAL_UARTLITE_CONSOLE=y |
445 | CONFIG_SERIAL_CORE=y | 476 | CONFIG_SERIAL_CORE=y |
446 | CONFIG_SERIAL_CORE_CONSOLE=y | 477 | CONFIG_SERIAL_CORE_CONSOLE=y |
478 | # CONFIG_SERIAL_TIMBERDALE is not set | ||
447 | # CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set | 479 | # CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set |
448 | CONFIG_UNIX98_PTYS=y | 480 | CONFIG_UNIX98_PTYS=y |
449 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | 481 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set |
@@ -471,6 +503,12 @@ CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | |||
471 | # CONFIG_HWMON is not set | 503 | # CONFIG_HWMON is not set |
472 | # CONFIG_THERMAL is not set | 504 | # CONFIG_THERMAL is not set |
473 | # CONFIG_WATCHDOG is not set | 505 | # CONFIG_WATCHDOG is not set |
506 | CONFIG_SSB_POSSIBLE=y | ||
507 | |||
508 | # | ||
509 | # Sonics Silicon Backplane | ||
510 | # | ||
511 | # CONFIG_SSB is not set | ||
474 | 512 | ||
475 | # | 513 | # |
476 | # Multifunction device drivers | 514 | # Multifunction device drivers |
@@ -502,6 +540,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
502 | # CONFIG_NEW_LEDS is not set | 540 | # CONFIG_NEW_LEDS is not set |
503 | # CONFIG_ACCESSIBILITY is not set | 541 | # CONFIG_ACCESSIBILITY is not set |
504 | # CONFIG_RTC_CLASS is not set | 542 | # CONFIG_RTC_CLASS is not set |
543 | # CONFIG_DMADEVICES is not set | ||
505 | # CONFIG_AUXDISPLAY is not set | 544 | # CONFIG_AUXDISPLAY is not set |
506 | # CONFIG_UIO is not set | 545 | # CONFIG_UIO is not set |
507 | 546 | ||
@@ -572,6 +611,7 @@ CONFIG_MISC_FILESYSTEMS=y | |||
572 | # CONFIG_BEFS_FS is not set | 611 | # CONFIG_BEFS_FS is not set |
573 | # CONFIG_BFS_FS is not set | 612 | # CONFIG_BFS_FS is not set |
574 | # CONFIG_EFS_FS is not set | 613 | # CONFIG_EFS_FS is not set |
614 | # CONFIG_LOGFS is not set | ||
575 | # CONFIG_CRAMFS is not set | 615 | # CONFIG_CRAMFS is not set |
576 | # CONFIG_SQUASHFS is not set | 616 | # CONFIG_SQUASHFS is not set |
577 | # CONFIG_VXFS_FS is not set | 617 | # CONFIG_VXFS_FS is not set |
@@ -595,6 +635,7 @@ CONFIG_SUNRPC=y | |||
595 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 635 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
596 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 636 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
597 | # CONFIG_SMB_FS is not set | 637 | # CONFIG_SMB_FS is not set |
638 | # CONFIG_CEPH_FS is not set | ||
598 | CONFIG_CIFS=y | 639 | CONFIG_CIFS=y |
599 | CONFIG_CIFS_STATS=y | 640 | CONFIG_CIFS_STATS=y |
600 | CONFIG_CIFS_STATS2=y | 641 | CONFIG_CIFS_STATS2=y |
@@ -696,6 +737,7 @@ CONFIG_SCHED_DEBUG=y | |||
696 | # CONFIG_DEBUG_OBJECTS is not set | 737 | # CONFIG_DEBUG_OBJECTS is not set |
697 | CONFIG_DEBUG_SLAB=y | 738 | CONFIG_DEBUG_SLAB=y |
698 | # CONFIG_DEBUG_SLAB_LEAK is not set | 739 | # CONFIG_DEBUG_SLAB_LEAK is not set |
740 | # CONFIG_DEBUG_KMEMLEAK is not set | ||
699 | CONFIG_DEBUG_SPINLOCK=y | 741 | CONFIG_DEBUG_SPINLOCK=y |
700 | # CONFIG_DEBUG_MUTEXES is not set | 742 | # CONFIG_DEBUG_MUTEXES is not set |
701 | # CONFIG_DEBUG_LOCK_ALLOC is not set | 743 | # CONFIG_DEBUG_LOCK_ALLOC is not set |
@@ -741,6 +783,7 @@ CONFIG_BRANCH_PROFILE_NONE=y | |||
741 | # CONFIG_KMEMTRACE is not set | 783 | # CONFIG_KMEMTRACE is not set |
742 | # CONFIG_WORKQUEUE_TRACER is not set | 784 | # CONFIG_WORKQUEUE_TRACER is not set |
743 | # CONFIG_BLK_DEV_IO_TRACE is not set | 785 | # CONFIG_BLK_DEV_IO_TRACE is not set |
786 | # CONFIG_DMA_API_DEBUG is not set | ||
744 | # CONFIG_SAMPLES is not set | 787 | # CONFIG_SAMPLES is not set |
745 | CONFIG_EARLY_PRINTK=y | 788 | CONFIG_EARLY_PRINTK=y |
746 | # CONFIG_HEART_BEAT is not set | 789 | # CONFIG_HEART_BEAT is not set |
@@ -862,5 +905,6 @@ CONFIG_ZLIB_INFLATE=y | |||
862 | CONFIG_DECOMPRESS_GZIP=y | 905 | CONFIG_DECOMPRESS_GZIP=y |
863 | CONFIG_HAS_IOMEM=y | 906 | CONFIG_HAS_IOMEM=y |
864 | CONFIG_HAS_IOPORT=y | 907 | CONFIG_HAS_IOPORT=y |
908 | CONFIG_HAS_DMA=y | ||
865 | CONFIG_HAVE_LMB=y | 909 | CONFIG_HAVE_LMB=y |
866 | CONFIG_NLATTR=y | 910 | CONFIG_NLATTR=y |
diff --git a/arch/microblaze/configs/nommu_defconfig b/arch/microblaze/configs/nommu_defconfig index ce2da535246a..dd3a494257f4 100644 --- a/arch/microblaze/configs/nommu_defconfig +++ b/arch/microblaze/configs/nommu_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.33-rc6 | 3 | # Linux kernel version: 2.6.34-rc6 |
4 | # Wed Feb 3 10:03:21 2010 | 4 | # Thu May 6 11:25:12 2010 |
5 | # | 5 | # |
6 | CONFIG_MICROBLAZE=y | 6 | CONFIG_MICROBLAZE=y |
7 | # CONFIG_SWAP is not set | 7 | # CONFIG_SWAP is not set |
@@ -22,8 +22,6 @@ CONFIG_GENERIC_CSUM=y | |||
22 | CONFIG_STACKTRACE_SUPPORT=y | 22 | CONFIG_STACKTRACE_SUPPORT=y |
23 | CONFIG_LOCKDEP_SUPPORT=y | 23 | CONFIG_LOCKDEP_SUPPORT=y |
24 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | 24 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y |
25 | # CONFIG_PCI is not set | ||
26 | CONFIG_NO_DMA=y | ||
27 | CONFIG_DTC=y | 25 | CONFIG_DTC=y |
28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 26 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
29 | CONFIG_CONSTRUCTORS=y | 27 | CONFIG_CONSTRUCTORS=y |
@@ -58,7 +56,6 @@ CONFIG_RCU_FANOUT=32 | |||
58 | CONFIG_IKCONFIG=y | 56 | CONFIG_IKCONFIG=y |
59 | CONFIG_IKCONFIG_PROC=y | 57 | CONFIG_IKCONFIG_PROC=y |
60 | CONFIG_LOG_BUF_SHIFT=17 | 58 | CONFIG_LOG_BUF_SHIFT=17 |
61 | # CONFIG_GROUP_SCHED is not set | ||
62 | # CONFIG_CGROUPS is not set | 59 | # CONFIG_CGROUPS is not set |
63 | CONFIG_SYSFS_DEPRECATED=y | 60 | CONFIG_SYSFS_DEPRECATED=y |
64 | CONFIG_SYSFS_DEPRECATED_V2=y | 61 | CONFIG_SYSFS_DEPRECATED_V2=y |
@@ -96,6 +93,8 @@ CONFIG_SLAB=y | |||
96 | # CONFIG_MMAP_ALLOW_UNINITIALIZED is not set | 93 | # CONFIG_MMAP_ALLOW_UNINITIALIZED is not set |
97 | # CONFIG_PROFILING is not set | 94 | # CONFIG_PROFILING is not set |
98 | CONFIG_HAVE_OPROFILE=y | 95 | CONFIG_HAVE_OPROFILE=y |
96 | CONFIG_HAVE_DMA_ATTRS=y | ||
97 | CONFIG_HAVE_DMA_API_DEBUG=y | ||
99 | 98 | ||
100 | # | 99 | # |
101 | # GCOV-based kernel profiling | 100 | # GCOV-based kernel profiling |
@@ -209,11 +208,14 @@ CONFIG_PROC_DEVICETREE=y | |||
209 | # | 208 | # |
210 | # Advanced setup | 209 | # Advanced setup |
211 | # | 210 | # |
211 | # CONFIG_ADVANCED_OPTIONS is not set | ||
212 | 212 | ||
213 | # | 213 | # |
214 | # Default settings for advanced configuration options are used | 214 | # Default settings for advanced configuration options are used |
215 | # | 215 | # |
216 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
216 | CONFIG_KERNEL_START=0x90000000 | 217 | CONFIG_KERNEL_START=0x90000000 |
218 | CONFIG_TASK_SIZE=0x80000000 | ||
217 | CONFIG_SELECT_MEMORY_MODEL=y | 219 | CONFIG_SELECT_MEMORY_MODEL=y |
218 | CONFIG_FLATMEM_MANUAL=y | 220 | CONFIG_FLATMEM_MANUAL=y |
219 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 221 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
@@ -235,13 +237,20 @@ CONFIG_BINFMT_FLAT=y | |||
235 | # CONFIG_BINFMT_SHARED_FLAT is not set | 237 | # CONFIG_BINFMT_SHARED_FLAT is not set |
236 | # CONFIG_HAVE_AOUT is not set | 238 | # CONFIG_HAVE_AOUT is not set |
237 | # CONFIG_BINFMT_MISC is not set | 239 | # CONFIG_BINFMT_MISC is not set |
240 | |||
241 | # | ||
242 | # Bus Options | ||
243 | # | ||
244 | # CONFIG_PCI is not set | ||
245 | # CONFIG_PCI_DOMAINS is not set | ||
246 | # CONFIG_PCI_SYSCALL is not set | ||
247 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
238 | CONFIG_NET=y | 248 | CONFIG_NET=y |
239 | 249 | ||
240 | # | 250 | # |
241 | # Networking options | 251 | # Networking options |
242 | # | 252 | # |
243 | CONFIG_PACKET=y | 253 | CONFIG_PACKET=y |
244 | # CONFIG_PACKET_MMAP is not set | ||
245 | CONFIG_UNIX=y | 254 | CONFIG_UNIX=y |
246 | CONFIG_XFRM=y | 255 | CONFIG_XFRM=y |
247 | # CONFIG_XFRM_USER is not set | 256 | # CONFIG_XFRM_USER is not set |
@@ -413,6 +422,7 @@ CONFIG_MTD_UCLINUX=y | |||
413 | # UBI - Unsorted block images | 422 | # UBI - Unsorted block images |
414 | # | 423 | # |
415 | # CONFIG_MTD_UBI is not set | 424 | # CONFIG_MTD_UBI is not set |
425 | CONFIG_OF_FLATTREE=y | ||
416 | CONFIG_OF_DEVICE=y | 426 | CONFIG_OF_DEVICE=y |
417 | # CONFIG_PARPORT is not set | 427 | # CONFIG_PARPORT is not set |
418 | CONFIG_BLK_DEV=y | 428 | CONFIG_BLK_DEV=y |
@@ -442,6 +452,7 @@ CONFIG_MISC_DEVICES=y | |||
442 | # | 452 | # |
443 | # SCSI device support | 453 | # SCSI device support |
444 | # | 454 | # |
455 | CONFIG_SCSI_MOD=y | ||
445 | # CONFIG_RAID_ATTRS is not set | 456 | # CONFIG_RAID_ATTRS is not set |
446 | # CONFIG_SCSI is not set | 457 | # CONFIG_SCSI is not set |
447 | # CONFIG_SCSI_DMA is not set | 458 | # CONFIG_SCSI_DMA is not set |
@@ -458,6 +469,7 @@ CONFIG_NETDEVICES=y | |||
458 | # CONFIG_PHYLIB is not set | 469 | # CONFIG_PHYLIB is not set |
459 | CONFIG_NET_ETHERNET=y | 470 | CONFIG_NET_ETHERNET=y |
460 | # CONFIG_MII is not set | 471 | # CONFIG_MII is not set |
472 | # CONFIG_ETHOC is not set | ||
461 | # CONFIG_DNET is not set | 473 | # CONFIG_DNET is not set |
462 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 474 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
463 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 475 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
@@ -466,6 +478,7 @@ CONFIG_NET_ETHERNET=y | |||
466 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | 478 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set |
467 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | 479 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set |
468 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | 480 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
481 | # CONFIG_B44 is not set | ||
469 | # CONFIG_KS8842 is not set | 482 | # CONFIG_KS8842 is not set |
470 | # CONFIG_KS8851_MLL is not set | 483 | # CONFIG_KS8851_MLL is not set |
471 | # CONFIG_XILINX_EMACLITE is not set | 484 | # CONFIG_XILINX_EMACLITE is not set |
@@ -516,6 +529,7 @@ CONFIG_SERIAL_UARTLITE=y | |||
516 | CONFIG_SERIAL_UARTLITE_CONSOLE=y | 529 | CONFIG_SERIAL_UARTLITE_CONSOLE=y |
517 | CONFIG_SERIAL_CORE=y | 530 | CONFIG_SERIAL_CORE=y |
518 | CONFIG_SERIAL_CORE_CONSOLE=y | 531 | CONFIG_SERIAL_CORE_CONSOLE=y |
532 | # CONFIG_SERIAL_TIMBERDALE is not set | ||
519 | # CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set | 533 | # CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set |
520 | CONFIG_UNIX98_PTYS=y | 534 | CONFIG_UNIX98_PTYS=y |
521 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | 535 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set |
@@ -544,6 +558,12 @@ CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | |||
544 | # CONFIG_HWMON is not set | 558 | # CONFIG_HWMON is not set |
545 | # CONFIG_THERMAL is not set | 559 | # CONFIG_THERMAL is not set |
546 | # CONFIG_WATCHDOG is not set | 560 | # CONFIG_WATCHDOG is not set |
561 | CONFIG_SSB_POSSIBLE=y | ||
562 | |||
563 | # | ||
564 | # Sonics Silicon Backplane | ||
565 | # | ||
566 | # CONFIG_SSB is not set | ||
547 | 567 | ||
548 | # | 568 | # |
549 | # Multifunction device drivers | 569 | # Multifunction device drivers |
@@ -593,6 +613,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
593 | # CONFIG_NEW_LEDS is not set | 613 | # CONFIG_NEW_LEDS is not set |
594 | # CONFIG_ACCESSIBILITY is not set | 614 | # CONFIG_ACCESSIBILITY is not set |
595 | # CONFIG_RTC_CLASS is not set | 615 | # CONFIG_RTC_CLASS is not set |
616 | # CONFIG_DMADEVICES is not set | ||
596 | # CONFIG_AUXDISPLAY is not set | 617 | # CONFIG_AUXDISPLAY is not set |
597 | # CONFIG_UIO is not set | 618 | # CONFIG_UIO is not set |
598 | 619 | ||
@@ -661,6 +682,7 @@ CONFIG_MISC_FILESYSTEMS=y | |||
661 | # CONFIG_BFS_FS is not set | 682 | # CONFIG_BFS_FS is not set |
662 | # CONFIG_EFS_FS is not set | 683 | # CONFIG_EFS_FS is not set |
663 | # CONFIG_JFFS2_FS is not set | 684 | # CONFIG_JFFS2_FS is not set |
685 | # CONFIG_LOGFS is not set | ||
664 | CONFIG_CRAMFS=y | 686 | CONFIG_CRAMFS=y |
665 | # CONFIG_SQUASHFS is not set | 687 | # CONFIG_SQUASHFS is not set |
666 | # CONFIG_VXFS_FS is not set | 688 | # CONFIG_VXFS_FS is not set |
@@ -689,6 +711,7 @@ CONFIG_SUNRPC=y | |||
689 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 711 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
690 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 712 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
691 | # CONFIG_SMB_FS is not set | 713 | # CONFIG_SMB_FS is not set |
714 | # CONFIG_CEPH_FS is not set | ||
692 | # CONFIG_CIFS is not set | 715 | # CONFIG_CIFS is not set |
693 | # CONFIG_NCP_FS is not set | 716 | # CONFIG_NCP_FS is not set |
694 | # CONFIG_CODA_FS is not set | 717 | # CONFIG_CODA_FS is not set |
@@ -733,6 +756,7 @@ CONFIG_DEBUG_OBJECTS_TIMERS=y | |||
733 | # CONFIG_DEBUG_OBJECTS_WORK is not set | 756 | # CONFIG_DEBUG_OBJECTS_WORK is not set |
734 | CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 | 757 | CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 |
735 | # CONFIG_DEBUG_SLAB is not set | 758 | # CONFIG_DEBUG_SLAB is not set |
759 | # CONFIG_DEBUG_KMEMLEAK is not set | ||
736 | # CONFIG_DEBUG_RT_MUTEXES is not set | 760 | # CONFIG_DEBUG_RT_MUTEXES is not set |
737 | # CONFIG_RT_MUTEX_TESTER is not set | 761 | # CONFIG_RT_MUTEX_TESTER is not set |
738 | # CONFIG_DEBUG_SPINLOCK is not set | 762 | # CONFIG_DEBUG_SPINLOCK is not set |
@@ -758,6 +782,7 @@ CONFIG_DEBUG_SG=y | |||
758 | # CONFIG_BACKTRACE_SELF_TEST is not set | 782 | # CONFIG_BACKTRACE_SELF_TEST is not set |
759 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | 783 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set |
760 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set | 784 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set |
785 | # CONFIG_LKDTM is not set | ||
761 | # CONFIG_FAULT_INJECTION is not set | 786 | # CONFIG_FAULT_INJECTION is not set |
762 | # CONFIG_LATENCYTOP is not set | 787 | # CONFIG_LATENCYTOP is not set |
763 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 788 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
@@ -782,6 +807,7 @@ CONFIG_BRANCH_PROFILE_NONE=y | |||
782 | # CONFIG_WORKQUEUE_TRACER is not set | 807 | # CONFIG_WORKQUEUE_TRACER is not set |
783 | # CONFIG_BLK_DEV_IO_TRACE is not set | 808 | # CONFIG_BLK_DEV_IO_TRACE is not set |
784 | # CONFIG_DYNAMIC_DEBUG is not set | 809 | # CONFIG_DYNAMIC_DEBUG is not set |
810 | # CONFIG_DMA_API_DEBUG is not set | ||
785 | # CONFIG_SAMPLES is not set | 811 | # CONFIG_SAMPLES is not set |
786 | CONFIG_EARLY_PRINTK=y | 812 | CONFIG_EARLY_PRINTK=y |
787 | # CONFIG_HEART_BEAT is not set | 813 | # CONFIG_HEART_BEAT is not set |
@@ -901,5 +927,6 @@ CONFIG_GENERIC_FIND_LAST_BIT=y | |||
901 | CONFIG_ZLIB_INFLATE=y | 927 | CONFIG_ZLIB_INFLATE=y |
902 | CONFIG_HAS_IOMEM=y | 928 | CONFIG_HAS_IOMEM=y |
903 | CONFIG_HAS_IOPORT=y | 929 | CONFIG_HAS_IOPORT=y |
930 | CONFIG_HAS_DMA=y | ||
904 | CONFIG_HAVE_LMB=y | 931 | CONFIG_HAVE_LMB=y |
905 | CONFIG_NLATTR=y | 932 | CONFIG_NLATTR=y |
diff --git a/arch/microblaze/include/asm/cache.h b/arch/microblaze/include/asm/cache.h index e52210891d78..4efe96a036f7 100644 --- a/arch/microblaze/include/asm/cache.h +++ b/arch/microblaze/include/asm/cache.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #include <asm/registers.h> | 16 | #include <asm/registers.h> |
17 | 17 | ||
18 | #define L1_CACHE_SHIFT 2 | 18 | #define L1_CACHE_SHIFT 5 |
19 | /* word-granular cache in microblaze */ | 19 | /* word-granular cache in microblaze */ |
20 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 20 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
21 | 21 | ||
diff --git a/arch/microblaze/include/asm/dma.h b/arch/microblaze/include/asm/dma.h index 08c073badf19..0d73d0c6de37 100644 --- a/arch/microblaze/include/asm/dma.h +++ b/arch/microblaze/include/asm/dma.h | |||
@@ -18,4 +18,10 @@ | |||
18 | #define MAX_DMA_ADDRESS (CONFIG_KERNEL_START + memory_size - 1) | 18 | #define MAX_DMA_ADDRESS (CONFIG_KERNEL_START + memory_size - 1) |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | #ifdef CONFIG_PCI | ||
22 | extern int isa_dma_bridge_buggy; | ||
23 | #else | ||
24 | #define isa_dma_bridge_buggy (0) | ||
25 | #endif | ||
26 | |||
21 | #endif /* _ASM_MICROBLAZE_DMA_H */ | 27 | #endif /* _ASM_MICROBLAZE_DMA_H */ |
diff --git a/arch/microblaze/include/asm/exceptions.h b/arch/microblaze/include/asm/exceptions.h index 90731df9e574..4c7b5d037c88 100644 --- a/arch/microblaze/include/asm/exceptions.h +++ b/arch/microblaze/include/asm/exceptions.h | |||
@@ -64,12 +64,6 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, | |||
64 | void die(const char *str, struct pt_regs *fp, long err); | 64 | void die(const char *str, struct pt_regs *fp, long err); |
65 | void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr); | 65 | void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr); |
66 | 66 | ||
67 | #ifdef CONFIG_MMU | ||
68 | void __bug(const char *file, int line, void *data); | ||
69 | int bad_trap(int trap_num, struct pt_regs *regs); | ||
70 | int debug_trap(struct pt_regs *regs); | ||
71 | #endif /* CONFIG_MMU */ | ||
72 | |||
73 | #if defined(CONFIG_KGDB) | 67 | #if defined(CONFIG_KGDB) |
74 | void (*debugger)(struct pt_regs *regs); | 68 | void (*debugger)(struct pt_regs *regs); |
75 | int (*debugger_bpt)(struct pt_regs *regs); | 69 | int (*debugger_bpt)(struct pt_regs *regs); |
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h index e45a6eea92e0..00b5398d08c7 100644 --- a/arch/microblaze/include/asm/io.h +++ b/arch/microblaze/include/asm/io.h | |||
@@ -139,8 +139,6 @@ static inline void writel(unsigned int v, volatile void __iomem *addr) | |||
139 | 139 | ||
140 | #ifdef CONFIG_MMU | 140 | #ifdef CONFIG_MMU |
141 | 141 | ||
142 | #define mm_ptov(addr) ((void *)__phys_to_virt(addr)) | ||
143 | #define mm_vtop(addr) ((unsigned long)__virt_to_phys(addr)) | ||
144 | #define phys_to_virt(addr) ((void *)__phys_to_virt(addr)) | 142 | #define phys_to_virt(addr) ((void *)__phys_to_virt(addr)) |
145 | #define virt_to_phys(addr) ((unsigned long)__virt_to_phys(addr)) | 143 | #define virt_to_phys(addr) ((unsigned long)__virt_to_phys(addr)) |
146 | #define virt_to_bus(addr) ((unsigned long)__virt_to_phys(addr)) | 144 | #define virt_to_bus(addr) ((unsigned long)__virt_to_phys(addr)) |
diff --git a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h index 2dd1d04129e0..de493f86d28f 100644 --- a/arch/microblaze/include/asm/page.h +++ b/arch/microblaze/include/asm/page.h | |||
@@ -31,6 +31,9 @@ | |||
31 | 31 | ||
32 | #ifndef __ASSEMBLY__ | 32 | #ifndef __ASSEMBLY__ |
33 | 33 | ||
34 | /* MS be sure that SLAB allocates aligned objects */ | ||
35 | #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES | ||
36 | |||
34 | #define PAGE_UP(addr) (((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1))) | 37 | #define PAGE_UP(addr) (((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1))) |
35 | #define PAGE_DOWN(addr) ((addr)&(~((PAGE_SIZE)-1))) | 38 | #define PAGE_DOWN(addr) ((addr)&(~((PAGE_SIZE)-1))) |
36 | 39 | ||
@@ -70,14 +73,7 @@ typedef unsigned long pte_basic_t; | |||
70 | 73 | ||
71 | #endif /* CONFIG_MMU */ | 74 | #endif /* CONFIG_MMU */ |
72 | 75 | ||
73 | # ifndef CONFIG_MMU | 76 | # define copy_page(to, from) memcpy((to), (from), PAGE_SIZE) |
74 | # define copy_page(to, from) memcpy((to), (from), PAGE_SIZE) | ||
75 | # define get_user_page(vaddr) __get_free_page(GFP_KERNEL) | ||
76 | # define free_user_page(page, addr) free_page(addr) | ||
77 | # else /* CONFIG_MMU */ | ||
78 | extern void copy_page(void *to, void *from); | ||
79 | # endif /* CONFIG_MMU */ | ||
80 | |||
81 | # define clear_page(pgaddr) memset((pgaddr), 0, PAGE_SIZE) | 77 | # define clear_page(pgaddr) memset((pgaddr), 0, PAGE_SIZE) |
82 | 78 | ||
83 | # define clear_user_page(pgaddr, vaddr, page) memset((pgaddr), 0, PAGE_SIZE) | 79 | # define clear_user_page(pgaddr, vaddr, page) memset((pgaddr), 0, PAGE_SIZE) |
diff --git a/arch/microblaze/include/asm/pci.h b/arch/microblaze/include/asm/pci.h index bdd65aaee30d..5a388eeeb28f 100644 --- a/arch/microblaze/include/asm/pci.h +++ b/arch/microblaze/include/asm/pci.h | |||
@@ -94,14 +94,6 @@ extern int pci_mmap_legacy_page_range(struct pci_bus *bus, | |||
94 | 94 | ||
95 | #define HAVE_PCI_LEGACY 1 | 95 | #define HAVE_PCI_LEGACY 1 |
96 | 96 | ||
97 | /* pci_unmap_{page,single} is a nop so... */ | ||
98 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | ||
99 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) | ||
100 | #define pci_unmap_addr(PTR, ADDR_NAME) (0) | ||
101 | #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) | ||
102 | #define pci_unmap_len(PTR, LEN_NAME) (0) | ||
103 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | ||
104 | |||
105 | /* The PCI address space does equal the physical memory | 97 | /* The PCI address space does equal the physical memory |
106 | * address space (no IOMMU). The IDE and SCSI device layers use | 98 | * address space (no IOMMU). The IDE and SCSI device layers use |
107 | * this boolean for bounce buffer decisions. | 99 | * this boolean for bounce buffer decisions. |
diff --git a/arch/microblaze/include/asm/pgalloc.h b/arch/microblaze/include/asm/pgalloc.h index f44b0d696fe2..c614a893f8a3 100644 --- a/arch/microblaze/include/asm/pgalloc.h +++ b/arch/microblaze/include/asm/pgalloc.h | |||
@@ -108,21 +108,7 @@ extern inline void free_pgd_slow(pgd_t *pgd) | |||
108 | #define pmd_alloc_one_fast(mm, address) ({ BUG(); ((pmd_t *)1); }) | 108 | #define pmd_alloc_one_fast(mm, address) ({ BUG(); ((pmd_t *)1); }) |
109 | #define pmd_alloc_one(mm, address) ({ BUG(); ((pmd_t *)2); }) | 109 | #define pmd_alloc_one(mm, address) ({ BUG(); ((pmd_t *)2); }) |
110 | 110 | ||
111 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | 111 | extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr); |
112 | unsigned long address) | ||
113 | { | ||
114 | pte_t *pte; | ||
115 | extern void *early_get_page(void); | ||
116 | if (mem_init_done) { | ||
117 | pte = (pte_t *)__get_free_page(GFP_KERNEL | | ||
118 | __GFP_REPEAT | __GFP_ZERO); | ||
119 | } else { | ||
120 | pte = (pte_t *)early_get_page(); | ||
121 | if (pte) | ||
122 | clear_page(pte); | ||
123 | } | ||
124 | return pte; | ||
125 | } | ||
126 | 112 | ||
127 | static inline struct page *pte_alloc_one(struct mm_struct *mm, | 113 | static inline struct page *pte_alloc_one(struct mm_struct *mm, |
128 | unsigned long address) | 114 | unsigned long address) |
diff --git a/arch/microblaze/include/asm/pgtable.h b/arch/microblaze/include/asm/pgtable.h index dd2bb60651c7..ca2d92871545 100644 --- a/arch/microblaze/include/asm/pgtable.h +++ b/arch/microblaze/include/asm/pgtable.h | |||
@@ -512,15 +512,6 @@ static inline pmd_t *pmd_offset(pgd_t *dir, unsigned long address) | |||
512 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 512 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; |
513 | 513 | ||
514 | /* | 514 | /* |
515 | * When flushing the tlb entry for a page, we also need to flush the hash | ||
516 | * table entry. flush_hash_page is assembler (for speed) in hashtable.S. | ||
517 | */ | ||
518 | extern int flush_hash_page(unsigned context, unsigned long va, pte_t *ptep); | ||
519 | |||
520 | /* Add an HPTE to the hash table */ | ||
521 | extern void add_hash_page(unsigned context, unsigned long va, pte_t *ptep); | ||
522 | |||
523 | /* | ||
524 | * Encode and decode a swap entry. | 515 | * Encode and decode a swap entry. |
525 | * Note that the bits we use in a PTE for representing a swap entry | 516 | * Note that the bits we use in a PTE for representing a swap entry |
526 | * must not include the _PAGE_PRESENT bit, or the _PAGE_HASHPTE bit | 517 | * must not include the _PAGE_PRESENT bit, or the _PAGE_HASHPTE bit |
@@ -533,15 +524,7 @@ extern void add_hash_page(unsigned context, unsigned long va, pte_t *ptep); | |||
533 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 2 }) | 524 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 2 }) |
534 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val << 2 }) | 525 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val << 2 }) |
535 | 526 | ||
536 | |||
537 | /* CONFIG_APUS */ | ||
538 | /* For virtual address to physical address conversion */ | ||
539 | extern void cache_clear(__u32 addr, int length); | ||
540 | extern void cache_push(__u32 addr, int length); | ||
541 | extern int mm_end_of_chunk(unsigned long addr, int len); | ||
542 | extern unsigned long iopa(unsigned long addr); | 527 | extern unsigned long iopa(unsigned long addr); |
543 | /* extern unsigned long mm_ptov(unsigned long addr) \ | ||
544 | __attribute__ ((const)); TBD */ | ||
545 | 528 | ||
546 | /* Values for nocacheflag and cmode */ | 529 | /* Values for nocacheflag and cmode */ |
547 | /* These are not used by the APUS kernel_map, but prevents | 530 | /* These are not used by the APUS kernel_map, but prevents |
@@ -552,18 +535,6 @@ extern unsigned long iopa(unsigned long addr); | |||
552 | #define IOMAP_NOCACHE_NONSER 2 | 535 | #define IOMAP_NOCACHE_NONSER 2 |
553 | #define IOMAP_NO_COPYBACK 3 | 536 | #define IOMAP_NO_COPYBACK 3 |
554 | 537 | ||
555 | /* | ||
556 | * Map some physical address range into the kernel address space. | ||
557 | */ | ||
558 | extern unsigned long kernel_map(unsigned long paddr, unsigned long size, | ||
559 | int nocacheflag, unsigned long *memavailp); | ||
560 | |||
561 | /* | ||
562 | * Set cache mode of (kernel space) address range. | ||
563 | */ | ||
564 | extern void kernel_set_cachemode(unsigned long address, unsigned long size, | ||
565 | unsigned int cmode); | ||
566 | |||
567 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ | 538 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ |
568 | #define kern_addr_valid(addr) (1) | 539 | #define kern_addr_valid(addr) (1) |
569 | 540 | ||
@@ -577,10 +548,6 @@ extern void kernel_set_cachemode(unsigned long address, unsigned long size, | |||
577 | void do_page_fault(struct pt_regs *regs, unsigned long address, | 548 | void do_page_fault(struct pt_regs *regs, unsigned long address, |
578 | unsigned long error_code); | 549 | unsigned long error_code); |
579 | 550 | ||
580 | void __init io_block_mapping(unsigned long virt, phys_addr_t phys, | ||
581 | unsigned int size, int flags); | ||
582 | |||
583 | void __init adjust_total_lowmem(void); | ||
584 | void mapin_ram(void); | 551 | void mapin_ram(void); |
585 | int map_page(unsigned long va, phys_addr_t pa, int flags); | 552 | int map_page(unsigned long va, phys_addr_t pa, int flags); |
586 | 553 | ||
@@ -601,7 +568,7 @@ void __init *early_get_page(void); | |||
601 | extern unsigned long ioremap_bot, ioremap_base; | 568 | extern unsigned long ioremap_bot, ioremap_base; |
602 | 569 | ||
603 | void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle); | 570 | void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle); |
604 | void consistent_free(void *vaddr); | 571 | void consistent_free(size_t size, void *vaddr); |
605 | void consistent_sync(void *vaddr, size_t size, int direction); | 572 | void consistent_sync(void *vaddr, size_t size, int direction); |
606 | void consistent_sync_page(struct page *page, unsigned long offset, | 573 | void consistent_sync_page(struct page *page, unsigned long offset, |
607 | size_t size, int direction); | 574 | size_t size, int direction); |
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h index 446bec29b142..26460d15b338 100644 --- a/arch/microblaze/include/asm/uaccess.h +++ b/arch/microblaze/include/asm/uaccess.h | |||
@@ -182,6 +182,39 @@ extern long __user_bad(void); | |||
182 | * Returns zero on success, or -EFAULT on error. | 182 | * Returns zero on success, or -EFAULT on error. |
183 | * On error, the variable @x is set to zero. | 183 | * On error, the variable @x is set to zero. |
184 | */ | 184 | */ |
185 | #define get_user(x, ptr) \ | ||
186 | __get_user_check((x), (ptr), sizeof(*(ptr))) | ||
187 | |||
188 | #define __get_user_check(x, ptr, size) \ | ||
189 | ({ \ | ||
190 | unsigned long __gu_val = 0; \ | ||
191 | const typeof(*(ptr)) __user *__gu_addr = (ptr); \ | ||
192 | int __gu_err = 0; \ | ||
193 | \ | ||
194 | if (access_ok(VERIFY_READ, __gu_addr, size)) { \ | ||
195 | switch (size) { \ | ||
196 | case 1: \ | ||
197 | __get_user_asm("lbu", __gu_addr, __gu_val, \ | ||
198 | __gu_err); \ | ||
199 | break; \ | ||
200 | case 2: \ | ||
201 | __get_user_asm("lhu", __gu_addr, __gu_val, \ | ||
202 | __gu_err); \ | ||
203 | break; \ | ||
204 | case 4: \ | ||
205 | __get_user_asm("lw", __gu_addr, __gu_val, \ | ||
206 | __gu_err); \ | ||
207 | break; \ | ||
208 | default: \ | ||
209 | __gu_err = __user_bad(); \ | ||
210 | break; \ | ||
211 | } \ | ||
212 | } else { \ | ||
213 | __gu_err = -EFAULT; \ | ||
214 | } \ | ||
215 | x = (typeof(*(ptr)))__gu_val; \ | ||
216 | __gu_err; \ | ||
217 | }) | ||
185 | 218 | ||
186 | #define __get_user(x, ptr) \ | 219 | #define __get_user(x, ptr) \ |
187 | ({ \ | 220 | ({ \ |
@@ -206,12 +239,6 @@ extern long __user_bad(void); | |||
206 | }) | 239 | }) |
207 | 240 | ||
208 | 241 | ||
209 | #define get_user(x, ptr) \ | ||
210 | ({ \ | ||
211 | access_ok(VERIFY_READ, (ptr), sizeof(*(ptr))) \ | ||
212 | ? __get_user((x), (ptr)) : -EFAULT; \ | ||
213 | }) | ||
214 | |||
215 | #define __put_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ | 242 | #define __put_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ |
216 | ({ \ | 243 | ({ \ |
217 | __asm__ __volatile__ ( \ | 244 | __asm__ __volatile__ ( \ |
@@ -266,6 +293,42 @@ extern long __user_bad(void); | |||
266 | * | 293 | * |
267 | * Returns zero on success, or -EFAULT on error. | 294 | * Returns zero on success, or -EFAULT on error. |
268 | */ | 295 | */ |
296 | #define put_user(x, ptr) \ | ||
297 | __put_user_check((x), (ptr), sizeof(*(ptr))) | ||
298 | |||
299 | #define __put_user_check(x, ptr, size) \ | ||
300 | ({ \ | ||
301 | typeof(*(ptr)) __pu_val; \ | ||
302 | typeof(*(ptr)) __user *__pu_addr = (ptr); \ | ||
303 | int __pu_err = 0; \ | ||
304 | \ | ||
305 | __pu_val = (x); \ | ||
306 | if (access_ok(VERIFY_WRITE, __pu_addr, size)) { \ | ||
307 | switch (size) { \ | ||
308 | case 1: \ | ||
309 | __put_user_asm("sb", __pu_addr, __pu_val, \ | ||
310 | __pu_err); \ | ||
311 | break; \ | ||
312 | case 2: \ | ||
313 | __put_user_asm("sh", __pu_addr, __pu_val, \ | ||
314 | __pu_err); \ | ||
315 | break; \ | ||
316 | case 4: \ | ||
317 | __put_user_asm("sw", __pu_addr, __pu_val, \ | ||
318 | __pu_err); \ | ||
319 | break; \ | ||
320 | case 8: \ | ||
321 | __put_user_asm_8(__pu_addr, __pu_val, __pu_err);\ | ||
322 | break; \ | ||
323 | default: \ | ||
324 | __pu_err = __user_bad(); \ | ||
325 | break; \ | ||
326 | } \ | ||
327 | } else { \ | ||
328 | __pu_err = -EFAULT; \ | ||
329 | } \ | ||
330 | __pu_err; \ | ||
331 | }) | ||
269 | 332 | ||
270 | #define __put_user(x, ptr) \ | 333 | #define __put_user(x, ptr) \ |
271 | ({ \ | 334 | ({ \ |
@@ -290,18 +353,6 @@ extern long __user_bad(void); | |||
290 | __gu_err; \ | 353 | __gu_err; \ |
291 | }) | 354 | }) |
292 | 355 | ||
293 | #ifndef CONFIG_MMU | ||
294 | |||
295 | #define put_user(x, ptr) __put_user((x), (ptr)) | ||
296 | |||
297 | #else /* CONFIG_MMU */ | ||
298 | |||
299 | #define put_user(x, ptr) \ | ||
300 | ({ \ | ||
301 | access_ok(VERIFY_WRITE, (ptr), sizeof(*(ptr))) \ | ||
302 | ? __put_user((x), (ptr)) : -EFAULT; \ | ||
303 | }) | ||
304 | #endif /* CONFIG_MMU */ | ||
305 | 356 | ||
306 | /* copy_to_from_user */ | 357 | /* copy_to_from_user */ |
307 | #define __copy_from_user(to, from, n) \ | 358 | #define __copy_from_user(to, from, n) \ |
diff --git a/arch/microblaze/kernel/asm-offsets.c b/arch/microblaze/kernel/asm-offsets.c index 0071260a672c..c1b459c97571 100644 --- a/arch/microblaze/kernel/asm-offsets.c +++ b/arch/microblaze/kernel/asm-offsets.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/hardirq.h> | 16 | #include <linux/hardirq.h> |
17 | #include <linux/thread_info.h> | 17 | #include <linux/thread_info.h> |
18 | #include <linux/kbuild.h> | 18 | #include <linux/kbuild.h> |
19 | #include <asm/cpuinfo.h> | ||
19 | 20 | ||
20 | int main(int argc, char *argv[]) | 21 | int main(int argc, char *argv[]) |
21 | { | 22 | { |
diff --git a/arch/microblaze/kernel/cpu/cache.c b/arch/microblaze/kernel/cpu/cache.c index f04d8a86dead..109876e8d643 100644 --- a/arch/microblaze/kernel/cpu/cache.c +++ b/arch/microblaze/kernel/cpu/cache.c | |||
@@ -96,13 +96,16 @@ static inline void __disable_dcache_nomsr(void) | |||
96 | } | 96 | } |
97 | 97 | ||
98 | 98 | ||
99 | /* Helper macro for computing the limits of cache range loops */ | 99 | /* Helper macro for computing the limits of cache range loops |
100 | * | ||
101 | * End address can be unaligned which is OK for C implementation. | ||
102 | * ASM implementation align it in ASM macros | ||
103 | */ | ||
100 | #define CACHE_LOOP_LIMITS(start, end, cache_line_length, cache_size) \ | 104 | #define CACHE_LOOP_LIMITS(start, end, cache_line_length, cache_size) \ |
101 | do { \ | 105 | do { \ |
102 | int align = ~(cache_line_length - 1); \ | 106 | int align = ~(cache_line_length - 1); \ |
103 | end = min(start + cache_size, end); \ | 107 | end = min(start + cache_size, end); \ |
104 | start &= align; \ | 108 | start &= align; \ |
105 | end = ((end & align) + cache_line_length); \ | ||
106 | } while (0); | 109 | } while (0); |
107 | 110 | ||
108 | /* | 111 | /* |
@@ -111,9 +114,9 @@ do { \ | |||
111 | */ | 114 | */ |
112 | #define CACHE_ALL_LOOP(cache_size, line_length, op) \ | 115 | #define CACHE_ALL_LOOP(cache_size, line_length, op) \ |
113 | do { \ | 116 | do { \ |
114 | unsigned int len = cache_size; \ | 117 | unsigned int len = cache_size - line_length; \ |
115 | int step = -line_length; \ | 118 | int step = -line_length; \ |
116 | BUG_ON(step >= 0); \ | 119 | WARN_ON(step >= 0); \ |
117 | \ | 120 | \ |
118 | __asm__ __volatile__ (" 1: " #op " %0, r0; \ | 121 | __asm__ __volatile__ (" 1: " #op " %0, r0; \ |
119 | bgtid %0, 1b; \ | 122 | bgtid %0, 1b; \ |
@@ -122,26 +125,22 @@ do { \ | |||
122 | : "memory"); \ | 125 | : "memory"); \ |
123 | } while (0); | 126 | } while (0); |
124 | 127 | ||
125 | 128 | /* Used for wdc.flush/clear which can use rB for offset which is not possible | |
126 | #define CACHE_ALL_LOOP2(cache_size, line_length, op) \ | 129 | * to use for simple wdc or wic. |
127 | do { \ | 130 | * |
128 | unsigned int len = cache_size; \ | 131 | * start address is cache aligned |
129 | int step = -line_length; \ | 132 | * end address is not aligned, if end is aligned then I have to substract |
130 | BUG_ON(step >= 0); \ | 133 | * cacheline length because I can't flush/invalidate the next cacheline. |
131 | \ | 134 | * If is not, I align it because I will flush/invalidate whole line. |
132 | __asm__ __volatile__ (" 1: " #op " r0, %0; \ | 135 | */ |
133 | bgtid %0, 1b; \ | ||
134 | addk %0, %0, %1; \ | ||
135 | " : : "r" (len), "r" (step) \ | ||
136 | : "memory"); \ | ||
137 | } while (0); | ||
138 | |||
139 | /* for wdc.flush/clear */ | ||
140 | #define CACHE_RANGE_LOOP_2(start, end, line_length, op) \ | 136 | #define CACHE_RANGE_LOOP_2(start, end, line_length, op) \ |
141 | do { \ | 137 | do { \ |
142 | int step = -line_length; \ | 138 | int step = -line_length; \ |
143 | int count = end - start; \ | 139 | int align = ~(line_length - 1); \ |
144 | BUG_ON(count <= 0); \ | 140 | int count; \ |
141 | end = ((end & align) == end) ? end - line_length : end & align; \ | ||
142 | count = end - start; \ | ||
143 | WARN_ON(count < 0); \ | ||
145 | \ | 144 | \ |
146 | __asm__ __volatile__ (" 1: " #op " %0, %1; \ | 145 | __asm__ __volatile__ (" 1: " #op " %0, %1; \ |
147 | bgtid %1, 1b; \ | 146 | bgtid %1, 1b; \ |
@@ -154,7 +153,9 @@ do { \ | |||
154 | #define CACHE_RANGE_LOOP_1(start, end, line_length, op) \ | 153 | #define CACHE_RANGE_LOOP_1(start, end, line_length, op) \ |
155 | do { \ | 154 | do { \ |
156 | int volatile temp; \ | 155 | int volatile temp; \ |
157 | BUG_ON(end - start <= 0); \ | 156 | int align = ~(line_length - 1); \ |
157 | end = ((end & align) == end) ? end - line_length : end & align; \ | ||
158 | WARN_ON(end - start < 0); \ | ||
158 | \ | 159 | \ |
159 | __asm__ __volatile__ (" 1: " #op " %1, r0; \ | 160 | __asm__ __volatile__ (" 1: " #op " %1, r0; \ |
160 | cmpu %0, %1, %2; \ | 161 | cmpu %0, %1, %2; \ |
@@ -360,8 +361,12 @@ static void __invalidate_dcache_all_noirq_wt(void) | |||
360 | #endif | 361 | #endif |
361 | } | 362 | } |
362 | 363 | ||
363 | /* FIXME this is weird - should be only wdc but not work | 364 | /* FIXME It is blindly invalidation as is expected |
364 | * MS: I am getting bus errors and other weird things */ | 365 | * but can't be called on noMMU in microblaze_cache_init below |
366 | * | ||
367 | * MS: noMMU kernel won't boot if simple wdc is used | ||
368 | * The reason should be that there are discared data which kernel needs | ||
369 | */ | ||
365 | static void __invalidate_dcache_all_wb(void) | 370 | static void __invalidate_dcache_all_wb(void) |
366 | { | 371 | { |
367 | #ifndef ASM_LOOP | 372 | #ifndef ASM_LOOP |
@@ -369,12 +374,12 @@ static void __invalidate_dcache_all_wb(void) | |||
369 | #endif | 374 | #endif |
370 | pr_debug("%s\n", __func__); | 375 | pr_debug("%s\n", __func__); |
371 | #ifdef ASM_LOOP | 376 | #ifdef ASM_LOOP |
372 | CACHE_ALL_LOOP2(cpuinfo.dcache_size, cpuinfo.dcache_line_length, | 377 | CACHE_ALL_LOOP(cpuinfo.dcache_size, cpuinfo.dcache_line_length, |
373 | wdc.clear) | 378 | wdc) |
374 | #else | 379 | #else |
375 | for (i = 0; i < cpuinfo.dcache_size; | 380 | for (i = 0; i < cpuinfo.dcache_size; |
376 | i += cpuinfo.dcache_line_length) | 381 | i += cpuinfo.dcache_line_length) |
377 | __asm__ __volatile__ ("wdc.clear %0, r0;" \ | 382 | __asm__ __volatile__ ("wdc %0, r0;" \ |
378 | : : "r" (i)); | 383 | : : "r" (i)); |
379 | #endif | 384 | #endif |
380 | } | 385 | } |
@@ -393,7 +398,7 @@ static void __invalidate_dcache_range_wb(unsigned long start, | |||
393 | #ifdef ASM_LOOP | 398 | #ifdef ASM_LOOP |
394 | CACHE_RANGE_LOOP_2(start, end, cpuinfo.dcache_line_length, wdc.clear); | 399 | CACHE_RANGE_LOOP_2(start, end, cpuinfo.dcache_line_length, wdc.clear); |
395 | #else | 400 | #else |
396 | for (i = start; i < end; i += cpuinfo.icache_line_length) | 401 | for (i = start; i < end; i += cpuinfo.dcache_line_length) |
397 | __asm__ __volatile__ ("wdc.clear %0, r0;" \ | 402 | __asm__ __volatile__ ("wdc.clear %0, r0;" \ |
398 | : : "r" (i)); | 403 | : : "r" (i)); |
399 | #endif | 404 | #endif |
@@ -413,7 +418,7 @@ static void __invalidate_dcache_range_nomsr_wt(unsigned long start, | |||
413 | #ifdef ASM_LOOP | 418 | #ifdef ASM_LOOP |
414 | CACHE_RANGE_LOOP_1(start, end, cpuinfo.dcache_line_length, wdc); | 419 | CACHE_RANGE_LOOP_1(start, end, cpuinfo.dcache_line_length, wdc); |
415 | #else | 420 | #else |
416 | for (i = start; i < end; i += cpuinfo.icache_line_length) | 421 | for (i = start; i < end; i += cpuinfo.dcache_line_length) |
417 | __asm__ __volatile__ ("wdc %0, r0;" \ | 422 | __asm__ __volatile__ ("wdc %0, r0;" \ |
418 | : : "r" (i)); | 423 | : : "r" (i)); |
419 | #endif | 424 | #endif |
@@ -437,7 +442,7 @@ static void __invalidate_dcache_range_msr_irq_wt(unsigned long start, | |||
437 | #ifdef ASM_LOOP | 442 | #ifdef ASM_LOOP |
438 | CACHE_RANGE_LOOP_1(start, end, cpuinfo.dcache_line_length, wdc); | 443 | CACHE_RANGE_LOOP_1(start, end, cpuinfo.dcache_line_length, wdc); |
439 | #else | 444 | #else |
440 | for (i = start; i < end; i += cpuinfo.icache_line_length) | 445 | for (i = start; i < end; i += cpuinfo.dcache_line_length) |
441 | __asm__ __volatile__ ("wdc %0, r0;" \ | 446 | __asm__ __volatile__ ("wdc %0, r0;" \ |
442 | : : "r" (i)); | 447 | : : "r" (i)); |
443 | #endif | 448 | #endif |
@@ -465,7 +470,7 @@ static void __invalidate_dcache_range_nomsr_irq(unsigned long start, | |||
465 | #ifdef ASM_LOOP | 470 | #ifdef ASM_LOOP |
466 | CACHE_RANGE_LOOP_1(start, end, cpuinfo.dcache_line_length, wdc); | 471 | CACHE_RANGE_LOOP_1(start, end, cpuinfo.dcache_line_length, wdc); |
467 | #else | 472 | #else |
468 | for (i = start; i < end; i += cpuinfo.icache_line_length) | 473 | for (i = start; i < end; i += cpuinfo.dcache_line_length) |
469 | __asm__ __volatile__ ("wdc %0, r0;" \ | 474 | __asm__ __volatile__ ("wdc %0, r0;" \ |
470 | : : "r" (i)); | 475 | : : "r" (i)); |
471 | #endif | 476 | #endif |
@@ -504,7 +509,7 @@ static void __flush_dcache_range_wb(unsigned long start, unsigned long end) | |||
504 | #ifdef ASM_LOOP | 509 | #ifdef ASM_LOOP |
505 | CACHE_RANGE_LOOP_2(start, end, cpuinfo.dcache_line_length, wdc.flush); | 510 | CACHE_RANGE_LOOP_2(start, end, cpuinfo.dcache_line_length, wdc.flush); |
506 | #else | 511 | #else |
507 | for (i = start; i < end; i += cpuinfo.icache_line_length) | 512 | for (i = start; i < end; i += cpuinfo.dcache_line_length) |
508 | __asm__ __volatile__ ("wdc.flush %0, r0;" \ | 513 | __asm__ __volatile__ ("wdc.flush %0, r0;" \ |
509 | : : "r" (i)); | 514 | : : "r" (i)); |
510 | #endif | 515 | #endif |
@@ -650,7 +655,11 @@ void microblaze_cache_init(void) | |||
650 | } | 655 | } |
651 | } | 656 | } |
652 | } | 657 | } |
653 | invalidate_dcache(); | 658 | /* FIXME Invalidation is done in U-BOOT |
659 | * WT cache: Data is already written to main memory | ||
660 | * WB cache: Discard data on noMMU which caused that kernel doesn't boot | ||
661 | */ | ||
662 | /* invalidate_dcache(); */ | ||
654 | enable_dcache(); | 663 | enable_dcache(); |
655 | 664 | ||
656 | invalidate_icache(); | 665 | invalidate_icache(); |
diff --git a/arch/microblaze/kernel/cpu/mb.c b/arch/microblaze/kernel/cpu/mb.c index 0c912b2a8e03..4216eb1eaa32 100644 --- a/arch/microblaze/kernel/cpu/mb.c +++ b/arch/microblaze/kernel/cpu/mb.c | |||
@@ -98,15 +98,17 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
98 | 98 | ||
99 | if (cpuinfo.use_icache) | 99 | if (cpuinfo.use_icache) |
100 | count += seq_printf(m, | 100 | count += seq_printf(m, |
101 | "Icache:\t\t%ukB\n", | 101 | "Icache:\t\t%ukB\tline length:\t%dB\n", |
102 | cpuinfo.icache_size >> 10); | 102 | cpuinfo.icache_size >> 10, |
103 | cpuinfo.icache_line_length); | ||
103 | else | 104 | else |
104 | count += seq_printf(m, "Icache:\t\tno\n"); | 105 | count += seq_printf(m, "Icache:\t\tno\n"); |
105 | 106 | ||
106 | if (cpuinfo.use_dcache) { | 107 | if (cpuinfo.use_dcache) { |
107 | count += seq_printf(m, | 108 | count += seq_printf(m, |
108 | "Dcache:\t\t%ukB\n", | 109 | "Dcache:\t\t%ukB\tline length:\t%dB\n", |
109 | cpuinfo.dcache_size >> 10); | 110 | cpuinfo.dcache_size >> 10, |
111 | cpuinfo.dcache_line_length); | ||
110 | if (cpuinfo.dcache_wb) | 112 | if (cpuinfo.dcache_wb) |
111 | count += seq_printf(m, "\t\twrite-back\n"); | 113 | count += seq_printf(m, "\t\twrite-back\n"); |
112 | else | 114 | else |
diff --git a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c index ce72dd4967cf..9dcd90b5df55 100644 --- a/arch/microblaze/kernel/dma.c +++ b/arch/microblaze/kernel/dma.c | |||
@@ -74,7 +74,7 @@ static void dma_direct_free_coherent(struct device *dev, size_t size, | |||
74 | void *vaddr, dma_addr_t dma_handle) | 74 | void *vaddr, dma_addr_t dma_handle) |
75 | { | 75 | { |
76 | #ifdef NOT_COHERENT_CACHE | 76 | #ifdef NOT_COHERENT_CACHE |
77 | consistent_free(vaddr); | 77 | consistent_free(size, vaddr); |
78 | #else | 78 | #else |
79 | free_pages((unsigned long)vaddr, get_order(size)); | 79 | free_pages((unsigned long)vaddr, get_order(size)); |
80 | #endif | 80 | #endif |
diff --git a/arch/microblaze/kernel/entry-nommu.S b/arch/microblaze/kernel/entry-nommu.S index 391d6197fc3b..8cc18cd2cce6 100644 --- a/arch/microblaze/kernel/entry-nommu.S +++ b/arch/microblaze/kernel/entry-nommu.S | |||
@@ -476,6 +476,8 @@ ENTRY(ret_from_fork) | |||
476 | nop | 476 | nop |
477 | 477 | ||
478 | work_pending: | 478 | work_pending: |
479 | enable_irq | ||
480 | |||
479 | andi r11, r19, _TIF_NEED_RESCHED | 481 | andi r11, r19, _TIF_NEED_RESCHED |
480 | beqi r11, 1f | 482 | beqi r11, 1f |
481 | bralid r15, schedule | 483 | bralid r15, schedule |
diff --git a/arch/microblaze/kernel/exceptions.c b/arch/microblaze/kernel/exceptions.c index d9f70f83097f..02cbdfe5aa8d 100644 --- a/arch/microblaze/kernel/exceptions.c +++ b/arch/microblaze/kernel/exceptions.c | |||
@@ -121,7 +121,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, | |||
121 | } | 121 | } |
122 | printk(KERN_WARNING "Divide by zero exception " \ | 122 | printk(KERN_WARNING "Divide by zero exception " \ |
123 | "in kernel mode.\n"); | 123 | "in kernel mode.\n"); |
124 | die("Divide by exception", regs, SIGBUS); | 124 | die("Divide by zero exception", regs, SIGBUS); |
125 | break; | 125 | break; |
126 | case MICROBLAZE_FPU_EXCEPTION: | 126 | case MICROBLAZE_FPU_EXCEPTION: |
127 | pr_debug(KERN_WARNING "FPU exception\n"); | 127 | pr_debug(KERN_WARNING "FPU exception\n"); |
diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S index da6a5f5dc766..1bf739888260 100644 --- a/arch/microblaze/kernel/head.S +++ b/arch/microblaze/kernel/head.S | |||
@@ -28,6 +28,7 @@ | |||
28 | * for more details. | 28 | * for more details. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/init.h> | ||
31 | #include <linux/linkage.h> | 32 | #include <linux/linkage.h> |
32 | #include <asm/thread_info.h> | 33 | #include <asm/thread_info.h> |
33 | #include <asm/page.h> | 34 | #include <asm/page.h> |
@@ -49,7 +50,7 @@ swapper_pg_dir: | |||
49 | 50 | ||
50 | #endif /* CONFIG_MMU */ | 51 | #endif /* CONFIG_MMU */ |
51 | 52 | ||
52 | .text | 53 | __HEAD |
53 | ENTRY(_start) | 54 | ENTRY(_start) |
54 | #if CONFIG_KERNEL_BASE_ADDR == 0 | 55 | #if CONFIG_KERNEL_BASE_ADDR == 0 |
55 | brai TOPHYS(real_start) | 56 | brai TOPHYS(real_start) |
diff --git a/arch/microblaze/kernel/irq.c b/arch/microblaze/kernel/irq.c index 6f39e2c001f3..8f120aca123d 100644 --- a/arch/microblaze/kernel/irq.c +++ b/arch/microblaze/kernel/irq.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/ftrace.h> | ||
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
13 | #include <linux/hardirq.h> | 14 | #include <linux/hardirq.h> |
14 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
@@ -32,7 +33,7 @@ EXPORT_SYMBOL_GPL(irq_of_parse_and_map); | |||
32 | 33 | ||
33 | static u32 concurrent_irq; | 34 | static u32 concurrent_irq; |
34 | 35 | ||
35 | void do_IRQ(struct pt_regs *regs) | 36 | void __irq_entry do_IRQ(struct pt_regs *regs) |
36 | { | 37 | { |
37 | unsigned int irq; | 38 | unsigned int irq; |
38 | struct pt_regs *old_regs = set_irq_regs(regs); | 39 | struct pt_regs *old_regs = set_irq_regs(regs); |
diff --git a/arch/microblaze/kernel/microblaze_ksyms.c b/arch/microblaze/kernel/microblaze_ksyms.c index bc4dcb7d3861..ff85f7718035 100644 --- a/arch/microblaze/kernel/microblaze_ksyms.c +++ b/arch/microblaze/kernel/microblaze_ksyms.c | |||
@@ -52,3 +52,14 @@ EXPORT_SYMBOL_GPL(_ebss); | |||
52 | extern void _mcount(void); | 52 | extern void _mcount(void); |
53 | EXPORT_SYMBOL(_mcount); | 53 | EXPORT_SYMBOL(_mcount); |
54 | #endif | 54 | #endif |
55 | |||
56 | /* | ||
57 | * Assembly functions that may be used (directly or indirectly) by modules | ||
58 | */ | ||
59 | EXPORT_SYMBOL(__copy_tofrom_user); | ||
60 | EXPORT_SYMBOL(__strncpy_user); | ||
61 | |||
62 | #ifdef CONFIG_OPT_LIB_ASM | ||
63 | EXPORT_SYMBOL(memcpy); | ||
64 | EXPORT_SYMBOL(memmove); | ||
65 | #endif | ||
diff --git a/arch/microblaze/kernel/misc.S b/arch/microblaze/kernel/misc.S index 7cf86498326c..0fb5fc6c1fc2 100644 --- a/arch/microblaze/kernel/misc.S +++ b/arch/microblaze/kernel/misc.S | |||
@@ -93,39 +93,3 @@ early_console_reg_tlb_alloc: | |||
93 | nop | 93 | nop |
94 | 94 | ||
95 | .size early_console_reg_tlb_alloc, . - early_console_reg_tlb_alloc | 95 | .size early_console_reg_tlb_alloc, . - early_console_reg_tlb_alloc |
96 | |||
97 | /* | ||
98 | * Copy a whole page (4096 bytes). | ||
99 | */ | ||
100 | #define COPY_16_BYTES \ | ||
101 | lwi r7, r6, 0; \ | ||
102 | lwi r8, r6, 4; \ | ||
103 | lwi r9, r6, 8; \ | ||
104 | lwi r10, r6, 12; \ | ||
105 | swi r7, r5, 0; \ | ||
106 | swi r8, r5, 4; \ | ||
107 | swi r9, r5, 8; \ | ||
108 | swi r10, r5, 12 | ||
109 | |||
110 | |||
111 | /* FIXME DCACHE_LINE_BYTES (CONFIG_XILINX_MICROBLAZE0_DCACHE_LINE_LEN * 4)*/ | ||
112 | #define DCACHE_LINE_BYTES (4 * 4) | ||
113 | |||
114 | .globl copy_page; | ||
115 | .type copy_page, @function | ||
116 | .align 4; | ||
117 | copy_page: | ||
118 | ori r11, r0, (PAGE_SIZE/DCACHE_LINE_BYTES) - 1 | ||
119 | _copy_page_loop: | ||
120 | COPY_16_BYTES | ||
121 | #if DCACHE_LINE_BYTES >= 32 | ||
122 | COPY_16_BYTES | ||
123 | #endif | ||
124 | addik r6, r6, DCACHE_LINE_BYTES | ||
125 | addik r5, r5, DCACHE_LINE_BYTES | ||
126 | bneid r11, _copy_page_loop | ||
127 | addik r11, r11, -1 | ||
128 | rtsd r15, 8 | ||
129 | nop | ||
130 | |||
131 | .size copy_page, . - copy_page | ||
diff --git a/arch/microblaze/kernel/module.c b/arch/microblaze/kernel/module.c index cbecf110dc30..0e73f6606547 100644 --- a/arch/microblaze/kernel/module.c +++ b/arch/microblaze/kernel/module.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | 17 | ||
18 | #include <asm/pgtable.h> | 18 | #include <asm/pgtable.h> |
19 | #include <asm/cacheflush.h> | ||
19 | 20 | ||
20 | void *module_alloc(unsigned long size) | 21 | void *module_alloc(unsigned long size) |
21 | { | 22 | { |
@@ -151,6 +152,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, | |||
151 | int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, | 152 | int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, |
152 | struct module *module) | 153 | struct module *module) |
153 | { | 154 | { |
155 | flush_dcache(); | ||
154 | return 0; | 156 | return 0; |
155 | } | 157 | } |
156 | 158 | ||
diff --git a/arch/microblaze/kernel/traps.c b/arch/microblaze/kernel/traps.c index 5e4570ef515c..75e49202a5ed 100644 --- a/arch/microblaze/kernel/traps.c +++ b/arch/microblaze/kernel/traps.c | |||
@@ -95,37 +95,3 @@ void dump_stack(void) | |||
95 | show_stack(NULL, NULL); | 95 | show_stack(NULL, NULL); |
96 | } | 96 | } |
97 | EXPORT_SYMBOL(dump_stack); | 97 | EXPORT_SYMBOL(dump_stack); |
98 | |||
99 | #ifdef CONFIG_MMU | ||
100 | void __bug(const char *file, int line, void *data) | ||
101 | { | ||
102 | if (data) | ||
103 | printk(KERN_CRIT "kernel BUG at %s:%d (data = %p)!\n", | ||
104 | file, line, data); | ||
105 | else | ||
106 | printk(KERN_CRIT "kernel BUG at %s:%d!\n", file, line); | ||
107 | |||
108 | machine_halt(); | ||
109 | } | ||
110 | |||
111 | int bad_trap(int trap_num, struct pt_regs *regs) | ||
112 | { | ||
113 | printk(KERN_CRIT | ||
114 | "unimplemented trap %d called at 0x%08lx, pid %d!\n", | ||
115 | trap_num, regs->pc, current->pid); | ||
116 | return -ENOSYS; | ||
117 | } | ||
118 | |||
119 | int debug_trap(struct pt_regs *regs) | ||
120 | { | ||
121 | int i; | ||
122 | printk(KERN_CRIT "debug trap\n"); | ||
123 | for (i = 0; i < 32; i++) { | ||
124 | /* printk("r%i:%08X\t",i,regs->gpr[i]); */ | ||
125 | if ((i % 4) == 3) | ||
126 | printk(KERN_CRIT "\n"); | ||
127 | } | ||
128 | printk(KERN_CRIT "pc:%08lX\tmsr:%08lX\n", regs->pc, regs->msr); | ||
129 | return -ENOSYS; | ||
130 | } | ||
131 | #endif | ||
diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S index 5ef619aad634..db72d7124602 100644 --- a/arch/microblaze/kernel/vmlinux.lds.S +++ b/arch/microblaze/kernel/vmlinux.lds.S | |||
@@ -24,7 +24,8 @@ SECTIONS { | |||
24 | .text : AT(ADDR(.text) - LOAD_OFFSET) { | 24 | .text : AT(ADDR(.text) - LOAD_OFFSET) { |
25 | _text = . ; | 25 | _text = . ; |
26 | _stext = . ; | 26 | _stext = . ; |
27 | *(.text .text.*) | 27 | HEAD_TEXT |
28 | TEXT_TEXT | ||
28 | *(.fixup) | 29 | *(.fixup) |
29 | EXIT_TEXT | 30 | EXIT_TEXT |
30 | EXIT_CALL | 31 | EXIT_CALL |
diff --git a/arch/microblaze/mm/consistent.c b/arch/microblaze/mm/consistent.c index f956e24fe49c..5a59dad62bd2 100644 --- a/arch/microblaze/mm/consistent.c +++ b/arch/microblaze/mm/consistent.c | |||
@@ -42,11 +42,12 @@ | |||
42 | #include <linux/uaccess.h> | 42 | #include <linux/uaccess.h> |
43 | #include <asm/pgtable.h> | 43 | #include <asm/pgtable.h> |
44 | #include <asm/cpuinfo.h> | 44 | #include <asm/cpuinfo.h> |
45 | #include <asm/tlbflush.h> | ||
45 | 46 | ||
46 | #ifndef CONFIG_MMU | 47 | #ifndef CONFIG_MMU |
47 | |||
48 | /* I have to use dcache values because I can't relate on ram size */ | 48 | /* I have to use dcache values because I can't relate on ram size */ |
49 | #define UNCACHED_SHADOW_MASK (cpuinfo.dcache_high - cpuinfo.dcache_base + 1) | 49 | # define UNCACHED_SHADOW_MASK (cpuinfo.dcache_high - cpuinfo.dcache_base + 1) |
50 | #endif | ||
50 | 51 | ||
51 | /* | 52 | /* |
52 | * Consistent memory allocators. Used for DMA devices that want to | 53 | * Consistent memory allocators. Used for DMA devices that want to |
@@ -60,71 +61,16 @@ | |||
60 | */ | 61 | */ |
61 | void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle) | 62 | void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle) |
62 | { | 63 | { |
63 | struct page *page, *end, *free; | 64 | unsigned long order, vaddr; |
64 | unsigned long order; | 65 | void *ret; |
65 | void *ret, *virt; | 66 | unsigned int i, err = 0; |
66 | 67 | struct page *page, *end; | |
67 | if (in_interrupt()) | ||
68 | BUG(); | ||
69 | |||
70 | size = PAGE_ALIGN(size); | ||
71 | order = get_order(size); | ||
72 | |||
73 | page = alloc_pages(gfp, order); | ||
74 | if (!page) | ||
75 | goto no_page; | ||
76 | |||
77 | /* We could do with a page_to_phys and page_to_bus here. */ | ||
78 | virt = page_address(page); | ||
79 | ret = ioremap(virt_to_phys(virt), size); | ||
80 | if (!ret) | ||
81 | goto no_remap; | ||
82 | |||
83 | /* | ||
84 | * Here's the magic! Note if the uncached shadow is not implemented, | ||
85 | * it's up to the calling code to also test that condition and make | ||
86 | * other arranegments, such as manually flushing the cache and so on. | ||
87 | */ | ||
88 | #ifdef CONFIG_XILINX_UNCACHED_SHADOW | ||
89 | ret = (void *)((unsigned) ret | UNCACHED_SHADOW_MASK); | ||
90 | #endif | ||
91 | /* dma_handle is same as physical (shadowed) address */ | ||
92 | *dma_handle = (dma_addr_t)ret; | ||
93 | |||
94 | /* | ||
95 | * free wasted pages. We skip the first page since we know | ||
96 | * that it will have count = 1 and won't require freeing. | ||
97 | * We also mark the pages in use as reserved so that | ||
98 | * remap_page_range works. | ||
99 | */ | ||
100 | page = virt_to_page(virt); | ||
101 | free = page + (size >> PAGE_SHIFT); | ||
102 | end = page + (1 << order); | ||
103 | |||
104 | for (; page < end; page++) { | ||
105 | init_page_count(page); | ||
106 | if (page >= free) | ||
107 | __free_page(page); | ||
108 | else | ||
109 | SetPageReserved(page); | ||
110 | } | ||
111 | |||
112 | return ret; | ||
113 | no_remap: | ||
114 | __free_pages(page, order); | ||
115 | no_page: | ||
116 | return NULL; | ||
117 | } | ||
118 | |||
119 | #else | ||
120 | 68 | ||
121 | void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle) | 69 | #ifdef CONFIG_MMU |
122 | { | ||
123 | int order, err, i; | ||
124 | unsigned long page, va, flags; | ||
125 | phys_addr_t pa; | 70 | phys_addr_t pa; |
126 | struct vm_struct *area; | 71 | struct vm_struct *area; |
127 | void *ret; | 72 | unsigned long va; |
73 | #endif | ||
128 | 74 | ||
129 | if (in_interrupt()) | 75 | if (in_interrupt()) |
130 | BUG(); | 76 | BUG(); |
@@ -133,71 +79,133 @@ void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle) | |||
133 | size = PAGE_ALIGN(size); | 79 | size = PAGE_ALIGN(size); |
134 | order = get_order(size); | 80 | order = get_order(size); |
135 | 81 | ||
136 | page = __get_free_pages(gfp, order); | 82 | vaddr = __get_free_pages(gfp, order); |
137 | if (!page) { | 83 | if (!vaddr) |
138 | BUG(); | ||
139 | return NULL; | 84 | return NULL; |
140 | } | ||
141 | 85 | ||
142 | /* | 86 | /* |
143 | * we need to ensure that there are no cachelines in use, | 87 | * we need to ensure that there are no cachelines in use, |
144 | * or worse dirty in this area. | 88 | * or worse dirty in this area. |
145 | */ | 89 | */ |
146 | flush_dcache_range(virt_to_phys(page), virt_to_phys(page) + size); | 90 | flush_dcache_range(virt_to_phys((void *)vaddr), |
91 | virt_to_phys((void *)vaddr) + size); | ||
147 | 92 | ||
93 | #ifndef CONFIG_MMU | ||
94 | ret = (void *)vaddr; | ||
95 | /* | ||
96 | * Here's the magic! Note if the uncached shadow is not implemented, | ||
97 | * it's up to the calling code to also test that condition and make | ||
98 | * other arranegments, such as manually flushing the cache and so on. | ||
99 | */ | ||
100 | # ifdef CONFIG_XILINX_UNCACHED_SHADOW | ||
101 | ret = (void *)((unsigned) ret | UNCACHED_SHADOW_MASK); | ||
102 | # endif | ||
103 | if ((unsigned int)ret > cpuinfo.dcache_base && | ||
104 | (unsigned int)ret < cpuinfo.dcache_high) | ||
105 | printk(KERN_WARNING | ||
106 | "ERROR: Your cache coherent area is CACHED!!!\n"); | ||
107 | |||
108 | /* dma_handle is same as physical (shadowed) address */ | ||
109 | *dma_handle = (dma_addr_t)ret; | ||
110 | #else | ||
148 | /* Allocate some common virtual space to map the new pages. */ | 111 | /* Allocate some common virtual space to map the new pages. */ |
149 | area = get_vm_area(size, VM_ALLOC); | 112 | area = get_vm_area(size, VM_ALLOC); |
150 | if (area == NULL) { | 113 | if (!area) { |
151 | free_pages(page, order); | 114 | free_pages(vaddr, order); |
152 | return NULL; | 115 | return NULL; |
153 | } | 116 | } |
154 | va = (unsigned long) area->addr; | 117 | va = (unsigned long) area->addr; |
155 | ret = (void *)va; | 118 | ret = (void *)va; |
156 | 119 | ||
157 | /* This gives us the real physical address of the first page. */ | 120 | /* This gives us the real physical address of the first page. */ |
158 | *dma_handle = pa = virt_to_bus((void *)page); | 121 | *dma_handle = pa = virt_to_bus((void *)vaddr); |
159 | 122 | #endif | |
160 | /* MS: This is the whole magic - use cache inhibit pages */ | ||
161 | flags = _PAGE_KERNEL | _PAGE_NO_CACHE; | ||
162 | 123 | ||
163 | /* | 124 | /* |
164 | * Set refcount=1 on all pages in an order>0 | 125 | * free wasted pages. We skip the first page since we know |
165 | * allocation so that vfree() will actually | 126 | * that it will have count = 1 and won't require freeing. |
166 | * free all pages that were allocated. | 127 | * We also mark the pages in use as reserved so that |
128 | * remap_page_range works. | ||
167 | */ | 129 | */ |
168 | if (order > 0) { | 130 | page = virt_to_page(vaddr); |
169 | struct page *rpage = virt_to_page(page); | 131 | end = page + (1 << order); |
170 | for (i = 1; i < (1 << order); i++) | 132 | |
171 | init_page_count(rpage+i); | 133 | split_page(page, order); |
134 | |||
135 | for (i = 0; i < size && err == 0; i += PAGE_SIZE) { | ||
136 | #ifdef CONFIG_MMU | ||
137 | /* MS: This is the whole magic - use cache inhibit pages */ | ||
138 | err = map_page(va + i, pa + i, _PAGE_KERNEL | _PAGE_NO_CACHE); | ||
139 | #endif | ||
140 | |||
141 | SetPageReserved(page); | ||
142 | page++; | ||
172 | } | 143 | } |
173 | 144 | ||
174 | err = 0; | 145 | /* Free the otherwise unused pages. */ |
175 | for (i = 0; i < size && err == 0; i += PAGE_SIZE) | 146 | while (page < end) { |
176 | err = map_page(va+i, pa+i, flags); | 147 | __free_page(page); |
148 | page++; | ||
149 | } | ||
177 | 150 | ||
178 | if (err) { | 151 | if (err) { |
179 | vfree((void *)va); | 152 | free_pages(vaddr, order); |
180 | return NULL; | 153 | return NULL; |
181 | } | 154 | } |
182 | 155 | ||
183 | return ret; | 156 | return ret; |
184 | } | 157 | } |
185 | #endif /* CONFIG_MMU */ | ||
186 | EXPORT_SYMBOL(consistent_alloc); | 158 | EXPORT_SYMBOL(consistent_alloc); |
187 | 159 | ||
188 | /* | 160 | /* |
189 | * free page(s) as defined by the above mapping. | 161 | * free page(s) as defined by the above mapping. |
190 | */ | 162 | */ |
191 | void consistent_free(void *vaddr) | 163 | void consistent_free(size_t size, void *vaddr) |
192 | { | 164 | { |
165 | struct page *page; | ||
166 | |||
193 | if (in_interrupt()) | 167 | if (in_interrupt()) |
194 | BUG(); | 168 | BUG(); |
195 | 169 | ||
170 | size = PAGE_ALIGN(size); | ||
171 | |||
172 | #ifndef CONFIG_MMU | ||
196 | /* Clear SHADOW_MASK bit in address, and free as per usual */ | 173 | /* Clear SHADOW_MASK bit in address, and free as per usual */ |
197 | #ifdef CONFIG_XILINX_UNCACHED_SHADOW | 174 | # ifdef CONFIG_XILINX_UNCACHED_SHADOW |
198 | vaddr = (void *)((unsigned)vaddr & ~UNCACHED_SHADOW_MASK); | 175 | vaddr = (void *)((unsigned)vaddr & ~UNCACHED_SHADOW_MASK); |
176 | # endif | ||
177 | page = virt_to_page(vaddr); | ||
178 | |||
179 | do { | ||
180 | ClearPageReserved(page); | ||
181 | __free_page(page); | ||
182 | page++; | ||
183 | } while (size -= PAGE_SIZE); | ||
184 | #else | ||
185 | do { | ||
186 | pte_t *ptep; | ||
187 | unsigned long pfn; | ||
188 | |||
189 | ptep = pte_offset_kernel(pmd_offset(pgd_offset_k( | ||
190 | (unsigned int)vaddr), | ||
191 | (unsigned int)vaddr), | ||
192 | (unsigned int)vaddr); | ||
193 | if (!pte_none(*ptep) && pte_present(*ptep)) { | ||
194 | pfn = pte_pfn(*ptep); | ||
195 | pte_clear(&init_mm, (unsigned int)vaddr, ptep); | ||
196 | if (pfn_valid(pfn)) { | ||
197 | page = pfn_to_page(pfn); | ||
198 | |||
199 | ClearPageReserved(page); | ||
200 | __free_page(page); | ||
201 | } | ||
202 | } | ||
203 | vaddr += PAGE_SIZE; | ||
204 | } while (size -= PAGE_SIZE); | ||
205 | |||
206 | /* flush tlb */ | ||
207 | flush_tlb_all(); | ||
199 | #endif | 208 | #endif |
200 | vfree(vaddr); | ||
201 | } | 209 | } |
202 | EXPORT_SYMBOL(consistent_free); | 210 | EXPORT_SYMBOL(consistent_free); |
203 | 211 | ||
@@ -221,7 +229,7 @@ void consistent_sync(void *vaddr, size_t size, int direction) | |||
221 | case PCI_DMA_NONE: | 229 | case PCI_DMA_NONE: |
222 | BUG(); | 230 | BUG(); |
223 | case PCI_DMA_FROMDEVICE: /* invalidate only */ | 231 | case PCI_DMA_FROMDEVICE: /* invalidate only */ |
224 | flush_dcache_range(start, end); | 232 | invalidate_dcache_range(start, end); |
225 | break; | 233 | break; |
226 | case PCI_DMA_TODEVICE: /* writeback only */ | 234 | case PCI_DMA_TODEVICE: /* writeback only */ |
227 | flush_dcache_range(start, end); | 235 | flush_dcache_range(start, end); |
diff --git a/arch/microblaze/mm/fault.c b/arch/microblaze/mm/fault.c index 7af87f4b2c2c..bab922993185 100644 --- a/arch/microblaze/mm/fault.c +++ b/arch/microblaze/mm/fault.c | |||
@@ -273,16 +273,11 @@ bad_area_nosemaphore: | |||
273 | * us unable to handle the page fault gracefully. | 273 | * us unable to handle the page fault gracefully. |
274 | */ | 274 | */ |
275 | out_of_memory: | 275 | out_of_memory: |
276 | if (current->pid == 1) { | ||
277 | yield(); | ||
278 | down_read(&mm->mmap_sem); | ||
279 | goto survive; | ||
280 | } | ||
281 | up_read(&mm->mmap_sem); | 276 | up_read(&mm->mmap_sem); |
282 | printk(KERN_WARNING "VM: killing process %s\n", current->comm); | 277 | if (!user_mode(regs)) |
283 | if (user_mode(regs)) | 278 | bad_page_fault(regs, address, SIGKILL); |
284 | do_exit(SIGKILL); | 279 | else |
285 | bad_page_fault(regs, address, SIGKILL); | 280 | pagefault_out_of_memory(); |
286 | return; | 281 | return; |
287 | 282 | ||
288 | do_sigbus: | 283 | do_sigbus: |
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index f42c2dde8b1c..cca3579d4268 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c | |||
@@ -47,6 +47,7 @@ unsigned long memory_start; | |||
47 | EXPORT_SYMBOL(memory_start); | 47 | EXPORT_SYMBOL(memory_start); |
48 | unsigned long memory_end; /* due to mm/nommu.c */ | 48 | unsigned long memory_end; /* due to mm/nommu.c */ |
49 | unsigned long memory_size; | 49 | unsigned long memory_size; |
50 | EXPORT_SYMBOL(memory_size); | ||
50 | 51 | ||
51 | /* | 52 | /* |
52 | * paging_init() sets up the page tables - in fact we've already done this. | 53 | * paging_init() sets up the page tables - in fact we've already done this. |
diff --git a/arch/microblaze/mm/pgtable.c b/arch/microblaze/mm/pgtable.c index d31312cde6ea..59bf2335a4ce 100644 --- a/arch/microblaze/mm/pgtable.c +++ b/arch/microblaze/mm/pgtable.c | |||
@@ -42,6 +42,7 @@ | |||
42 | 42 | ||
43 | unsigned long ioremap_base; | 43 | unsigned long ioremap_base; |
44 | unsigned long ioremap_bot; | 44 | unsigned long ioremap_bot; |
45 | EXPORT_SYMBOL(ioremap_bot); | ||
45 | 46 | ||
46 | /* The maximum lowmem defaults to 768Mb, but this can be configured to | 47 | /* The maximum lowmem defaults to 768Mb, but this can be configured to |
47 | * another value. | 48 | * another value. |
@@ -161,24 +162,6 @@ int map_page(unsigned long va, phys_addr_t pa, int flags) | |||
161 | return err; | 162 | return err; |
162 | } | 163 | } |
163 | 164 | ||
164 | void __init adjust_total_lowmem(void) | ||
165 | { | ||
166 | /* TBD */ | ||
167 | #if 0 | ||
168 | unsigned long max_low_mem = MAX_LOW_MEM; | ||
169 | |||
170 | if (total_lowmem > max_low_mem) { | ||
171 | total_lowmem = max_low_mem; | ||
172 | #ifndef CONFIG_HIGHMEM | ||
173 | printk(KERN_INFO "Warning, memory limited to %ld Mb, use " | ||
174 | "CONFIG_HIGHMEM to reach %ld Mb\n", | ||
175 | max_low_mem >> 20, total_memory >> 20); | ||
176 | total_memory = total_lowmem; | ||
177 | #endif /* CONFIG_HIGHMEM */ | ||
178 | } | ||
179 | #endif | ||
180 | } | ||
181 | |||
182 | /* | 165 | /* |
183 | * Map in all of physical memory starting at CONFIG_KERNEL_START. | 166 | * Map in all of physical memory starting at CONFIG_KERNEL_START. |
184 | */ | 167 | */ |
@@ -206,24 +189,6 @@ void __init mapin_ram(void) | |||
206 | /* is x a power of 2? */ | 189 | /* is x a power of 2? */ |
207 | #define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0)) | 190 | #define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0)) |
208 | 191 | ||
209 | /* | ||
210 | * Set up a mapping for a block of I/O. | ||
211 | * virt, phys, size must all be page-aligned. | ||
212 | * This should only be called before ioremap is called. | ||
213 | */ | ||
214 | void __init io_block_mapping(unsigned long virt, phys_addr_t phys, | ||
215 | unsigned int size, int flags) | ||
216 | { | ||
217 | int i; | ||
218 | |||
219 | if (virt > CONFIG_KERNEL_START && virt < ioremap_bot) | ||
220 | ioremap_bot = ioremap_base = virt; | ||
221 | |||
222 | /* Put it in the page tables. */ | ||
223 | for (i = 0; i < size; i += PAGE_SIZE) | ||
224 | map_page(virt + i, phys + i, flags); | ||
225 | } | ||
226 | |||
227 | /* Scan the real Linux page tables and return a PTE pointer for | 192 | /* Scan the real Linux page tables and return a PTE pointer for |
228 | * a virtual address in a context. | 193 | * a virtual address in a context. |
229 | * Returns true (1) if PTE was found, zero otherwise. The pointer to | 194 | * Returns true (1) if PTE was found, zero otherwise. The pointer to |
@@ -274,3 +239,18 @@ unsigned long iopa(unsigned long addr) | |||
274 | 239 | ||
275 | return pa; | 240 | return pa; |
276 | } | 241 | } |
242 | |||
243 | __init_refok pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | ||
244 | unsigned long address) | ||
245 | { | ||
246 | pte_t *pte; | ||
247 | if (mem_init_done) { | ||
248 | pte = (pte_t *)__get_free_page(GFP_KERNEL | | ||
249 | __GFP_REPEAT | __GFP_ZERO); | ||
250 | } else { | ||
251 | pte = (pte_t *)early_get_page(); | ||
252 | if (pte) | ||
253 | clear_page(pte); | ||
254 | } | ||
255 | return pte; | ||
256 | } | ||
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index 740bb32ec57e..9cb782b8e036 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c | |||
@@ -1025,7 +1025,7 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus) | |||
1025 | 1025 | ||
1026 | struct pci_dev *dev = bus->self; | 1026 | struct pci_dev *dev = bus->self; |
1027 | 1027 | ||
1028 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) { | 1028 | pci_bus_for_each_resource(bus, res, i) { |
1029 | res = bus->resource[i]; | 1029 | res = bus->resource[i]; |
1030 | if (!res) | 1030 | if (!res) |
1031 | continue; | 1031 | continue; |
@@ -1131,21 +1131,20 @@ static int skip_isa_ioresource_align(struct pci_dev *dev) | |||
1131 | * but we want to try to avoid allocating at 0x2900-0x2bff | 1131 | * but we want to try to avoid allocating at 0x2900-0x2bff |
1132 | * which might have be mirrored at 0x0100-0x03ff.. | 1132 | * which might have be mirrored at 0x0100-0x03ff.. |
1133 | */ | 1133 | */ |
1134 | void pcibios_align_resource(void *data, struct resource *res, | 1134 | resource_size_t pcibios_align_resource(void *data, const struct resource *res, |
1135 | resource_size_t size, resource_size_t align) | 1135 | resource_size_t size, resource_size_t align) |
1136 | { | 1136 | { |
1137 | struct pci_dev *dev = data; | 1137 | struct pci_dev *dev = data; |
1138 | resource_size_t start = res->start; | ||
1138 | 1139 | ||
1139 | if (res->flags & IORESOURCE_IO) { | 1140 | if (res->flags & IORESOURCE_IO) { |
1140 | resource_size_t start = res->start; | ||
1141 | |||
1142 | if (skip_isa_ioresource_align(dev)) | 1141 | if (skip_isa_ioresource_align(dev)) |
1143 | return; | 1142 | return start; |
1144 | if (start & 0x300) { | 1143 | if (start & 0x300) |
1145 | start = (start + 0x3ff) & ~0x3ff; | 1144 | start = (start + 0x3ff) & ~0x3ff; |
1146 | res->start = start; | ||
1147 | } | ||
1148 | } | 1145 | } |
1146 | |||
1147 | return start; | ||
1149 | } | 1148 | } |
1150 | EXPORT_SYMBOL(pcibios_align_resource); | 1149 | EXPORT_SYMBOL(pcibios_align_resource); |
1151 | 1150 | ||
@@ -1228,7 +1227,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus) | |||
1228 | pr_debug("PCI: Allocating bus resources for %04x:%02x...\n", | 1227 | pr_debug("PCI: Allocating bus resources for %04x:%02x...\n", |
1229 | pci_domain_nr(bus), bus->number); | 1228 | pci_domain_nr(bus), bus->number); |
1230 | 1229 | ||
1231 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) { | 1230 | pci_bus_for_each_resource(bus, res, i) { |
1232 | res = bus->resource[i]; | 1231 | res = bus->resource[i]; |
1233 | if (!res || !res->flags | 1232 | if (!res || !res->flags |
1234 | || res->start > res->end || res->parent) | 1233 | || res->start > res->end || res->parent) |
@@ -1508,7 +1507,7 @@ void pcibios_finish_adding_to_bus(struct pci_bus *bus) | |||
1508 | pci_bus_add_devices(bus); | 1507 | pci_bus_add_devices(bus); |
1509 | 1508 | ||
1510 | /* Fixup EEH */ | 1509 | /* Fixup EEH */ |
1511 | eeh_add_device_tree_late(bus); | 1510 | /* eeh_add_device_tree_late(bus); */ |
1512 | } | 1511 | } |
1513 | EXPORT_SYMBOL_GPL(pcibios_finish_adding_to_bus); | 1512 | EXPORT_SYMBOL_GPL(pcibios_finish_adding_to_bus); |
1514 | 1513 | ||
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h index 9f4c9d4f5803..bd100fcf40d0 100644 --- a/arch/powerpc/include/asm/hw_irq.h +++ b/arch/powerpc/include/asm/hw_irq.h | |||
@@ -130,43 +130,5 @@ static inline int irqs_disabled_flags(unsigned long flags) | |||
130 | */ | 130 | */ |
131 | struct irq_chip; | 131 | struct irq_chip; |
132 | 132 | ||
133 | #ifdef CONFIG_PERF_EVENTS | ||
134 | |||
135 | #ifdef CONFIG_PPC64 | ||
136 | static inline unsigned long test_perf_event_pending(void) | ||
137 | { | ||
138 | unsigned long x; | ||
139 | |||
140 | asm volatile("lbz %0,%1(13)" | ||
141 | : "=r" (x) | ||
142 | : "i" (offsetof(struct paca_struct, perf_event_pending))); | ||
143 | return x; | ||
144 | } | ||
145 | |||
146 | static inline void set_perf_event_pending(void) | ||
147 | { | ||
148 | asm volatile("stb %0,%1(13)" : : | ||
149 | "r" (1), | ||
150 | "i" (offsetof(struct paca_struct, perf_event_pending))); | ||
151 | } | ||
152 | |||
153 | static inline void clear_perf_event_pending(void) | ||
154 | { | ||
155 | asm volatile("stb %0,%1(13)" : : | ||
156 | "r" (0), | ||
157 | "i" (offsetof(struct paca_struct, perf_event_pending))); | ||
158 | } | ||
159 | #endif /* CONFIG_PPC64 */ | ||
160 | |||
161 | #else /* CONFIG_PERF_EVENTS */ | ||
162 | |||
163 | static inline unsigned long test_perf_event_pending(void) | ||
164 | { | ||
165 | return 0; | ||
166 | } | ||
167 | |||
168 | static inline void clear_perf_event_pending(void) {} | ||
169 | #endif /* CONFIG_PERF_EVENTS */ | ||
170 | |||
171 | #endif /* __KERNEL__ */ | 133 | #endif /* __KERNEL__ */ |
172 | #endif /* _ASM_POWERPC_HW_IRQ_H */ | 134 | #endif /* _ASM_POWERPC_HW_IRQ_H */ |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 957ceb7059c5..c09138d150d4 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -133,7 +133,6 @@ int main(void) | |||
133 | DEFINE(PACAKMSR, offsetof(struct paca_struct, kernel_msr)); | 133 | DEFINE(PACAKMSR, offsetof(struct paca_struct, kernel_msr)); |
134 | DEFINE(PACASOFTIRQEN, offsetof(struct paca_struct, soft_enabled)); | 134 | DEFINE(PACASOFTIRQEN, offsetof(struct paca_struct, soft_enabled)); |
135 | DEFINE(PACAHARDIRQEN, offsetof(struct paca_struct, hard_enabled)); | 135 | DEFINE(PACAHARDIRQEN, offsetof(struct paca_struct, hard_enabled)); |
136 | DEFINE(PACAPERFPEND, offsetof(struct paca_struct, perf_event_pending)); | ||
137 | DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id)); | 136 | DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id)); |
138 | #ifdef CONFIG_PPC_MM_SLICES | 137 | #ifdef CONFIG_PPC_MM_SLICES |
139 | DEFINE(PACALOWSLICESPSIZE, offsetof(struct paca_struct, | 138 | DEFINE(PACALOWSLICESPSIZE, offsetof(struct paca_struct, |
diff --git a/arch/powerpc/kernel/dma-swiotlb.c b/arch/powerpc/kernel/dma-swiotlb.c index 59c928564a03..4ff4da2c238b 100644 --- a/arch/powerpc/kernel/dma-swiotlb.c +++ b/arch/powerpc/kernel/dma-swiotlb.c | |||
@@ -1,7 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Contains routines needed to support swiotlb for ppc. | 2 | * Contains routines needed to support swiotlb for ppc. |
3 | * | 3 | * |
4 | * Copyright (C) 2009 Becky Bruce, Freescale Semiconductor | 4 | * Copyright (C) 2009-2010 Freescale Semiconductor, Inc. |
5 | * Author: Becky Bruce | ||
5 | * | 6 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License as published by the |
@@ -70,7 +71,7 @@ static int ppc_swiotlb_bus_notify(struct notifier_block *nb, | |||
70 | sd->max_direct_dma_addr = 0; | 71 | sd->max_direct_dma_addr = 0; |
71 | 72 | ||
72 | /* May need to bounce if the device can't address all of DRAM */ | 73 | /* May need to bounce if the device can't address all of DRAM */ |
73 | if (dma_get_mask(dev) < lmb_end_of_DRAM()) | 74 | if ((dma_get_mask(dev) + 1) < lmb_end_of_DRAM()) |
74 | set_dma_ops(dev, &swiotlb_dma_ops); | 75 | set_dma_ops(dev, &swiotlb_dma_ops); |
75 | 76 | ||
76 | return NOTIFY_DONE; | 77 | return NOTIFY_DONE; |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 07109d843787..42e9d908914a 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -556,15 +556,6 @@ ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES) | |||
556 | 2: | 556 | 2: |
557 | TRACE_AND_RESTORE_IRQ(r5); | 557 | TRACE_AND_RESTORE_IRQ(r5); |
558 | 558 | ||
559 | #ifdef CONFIG_PERF_EVENTS | ||
560 | /* check paca->perf_event_pending if we're enabling ints */ | ||
561 | lbz r3,PACAPERFPEND(r13) | ||
562 | and. r3,r3,r5 | ||
563 | beq 27f | ||
564 | bl .perf_event_do_pending | ||
565 | 27: | ||
566 | #endif /* CONFIG_PERF_EVENTS */ | ||
567 | |||
568 | /* extract EE bit and use it to restore paca->hard_enabled */ | 559 | /* extract EE bit and use it to restore paca->hard_enabled */ |
569 | ld r3,_MSR(r1) | 560 | ld r3,_MSR(r1) |
570 | rldicl r4,r3,49,63 /* r0 = (r3 >> 15) & 1 */ | 561 | rldicl r4,r3,49,63 /* r0 = (r3 >> 15) & 1 */ |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 64f6f2031c22..066bd31551d5 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -53,7 +53,6 @@ | |||
53 | #include <linux/bootmem.h> | 53 | #include <linux/bootmem.h> |
54 | #include <linux/pci.h> | 54 | #include <linux/pci.h> |
55 | #include <linux/debugfs.h> | 55 | #include <linux/debugfs.h> |
56 | #include <linux/perf_event.h> | ||
57 | 56 | ||
58 | #include <asm/uaccess.h> | 57 | #include <asm/uaccess.h> |
59 | #include <asm/system.h> | 58 | #include <asm/system.h> |
@@ -145,11 +144,6 @@ notrace void raw_local_irq_restore(unsigned long en) | |||
145 | } | 144 | } |
146 | #endif /* CONFIG_PPC_STD_MMU_64 */ | 145 | #endif /* CONFIG_PPC_STD_MMU_64 */ |
147 | 146 | ||
148 | if (test_perf_event_pending()) { | ||
149 | clear_perf_event_pending(); | ||
150 | perf_event_do_pending(); | ||
151 | } | ||
152 | |||
153 | /* | 147 | /* |
154 | * if (get_paca()->hard_enabled) return; | 148 | * if (get_paca()->hard_enabled) return; |
155 | * But again we need to take care that gcc gets hard_enabled directly | 149 | * But again we need to take care that gcc gets hard_enabled directly |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 1b16b9a3e49a..0441bbdadbd1 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -532,25 +532,60 @@ void __init iSeries_time_init_early(void) | |||
532 | } | 532 | } |
533 | #endif /* CONFIG_PPC_ISERIES */ | 533 | #endif /* CONFIG_PPC_ISERIES */ |
534 | 534 | ||
535 | #if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_PPC32) | 535 | #ifdef CONFIG_PERF_EVENTS |
536 | DEFINE_PER_CPU(u8, perf_event_pending); | ||
537 | 536 | ||
538 | void set_perf_event_pending(void) | 537 | /* |
538 | * 64-bit uses a byte in the PACA, 32-bit uses a per-cpu variable... | ||
539 | */ | ||
540 | #ifdef CONFIG_PPC64 | ||
541 | static inline unsigned long test_perf_event_pending(void) | ||
539 | { | 542 | { |
540 | get_cpu_var(perf_event_pending) = 1; | 543 | unsigned long x; |
541 | set_dec(1); | 544 | |
542 | put_cpu_var(perf_event_pending); | 545 | asm volatile("lbz %0,%1(13)" |
546 | : "=r" (x) | ||
547 | : "i" (offsetof(struct paca_struct, perf_event_pending))); | ||
548 | return x; | ||
543 | } | 549 | } |
544 | 550 | ||
551 | static inline void set_perf_event_pending_flag(void) | ||
552 | { | ||
553 | asm volatile("stb %0,%1(13)" : : | ||
554 | "r" (1), | ||
555 | "i" (offsetof(struct paca_struct, perf_event_pending))); | ||
556 | } | ||
557 | |||
558 | static inline void clear_perf_event_pending(void) | ||
559 | { | ||
560 | asm volatile("stb %0,%1(13)" : : | ||
561 | "r" (0), | ||
562 | "i" (offsetof(struct paca_struct, perf_event_pending))); | ||
563 | } | ||
564 | |||
565 | #else /* 32-bit */ | ||
566 | |||
567 | DEFINE_PER_CPU(u8, perf_event_pending); | ||
568 | |||
569 | #define set_perf_event_pending_flag() __get_cpu_var(perf_event_pending) = 1 | ||
545 | #define test_perf_event_pending() __get_cpu_var(perf_event_pending) | 570 | #define test_perf_event_pending() __get_cpu_var(perf_event_pending) |
546 | #define clear_perf_event_pending() __get_cpu_var(perf_event_pending) = 0 | 571 | #define clear_perf_event_pending() __get_cpu_var(perf_event_pending) = 0 |
547 | 572 | ||
548 | #else /* CONFIG_PERF_EVENTS && CONFIG_PPC32 */ | 573 | #endif /* 32 vs 64 bit */ |
574 | |||
575 | void set_perf_event_pending(void) | ||
576 | { | ||
577 | preempt_disable(); | ||
578 | set_perf_event_pending_flag(); | ||
579 | set_dec(1); | ||
580 | preempt_enable(); | ||
581 | } | ||
582 | |||
583 | #else /* CONFIG_PERF_EVENTS */ | ||
549 | 584 | ||
550 | #define test_perf_event_pending() 0 | 585 | #define test_perf_event_pending() 0 |
551 | #define clear_perf_event_pending() | 586 | #define clear_perf_event_pending() |
552 | 587 | ||
553 | #endif /* CONFIG_PERF_EVENTS && CONFIG_PPC32 */ | 588 | #endif /* CONFIG_PERF_EVENTS */ |
554 | 589 | ||
555 | /* | 590 | /* |
556 | * For iSeries shared processors, we have to let the hypervisor | 591 | * For iSeries shared processors, we have to let the hypervisor |
@@ -582,10 +617,6 @@ void timer_interrupt(struct pt_regs * regs) | |||
582 | set_dec(DECREMENTER_MAX); | 617 | set_dec(DECREMENTER_MAX); |
583 | 618 | ||
584 | #ifdef CONFIG_PPC32 | 619 | #ifdef CONFIG_PPC32 |
585 | if (test_perf_event_pending()) { | ||
586 | clear_perf_event_pending(); | ||
587 | perf_event_do_pending(); | ||
588 | } | ||
589 | if (atomic_read(&ppc_n_lost_interrupts) != 0) | 620 | if (atomic_read(&ppc_n_lost_interrupts) != 0) |
590 | do_IRQ(regs); | 621 | do_IRQ(regs); |
591 | #endif | 622 | #endif |
@@ -604,6 +635,11 @@ void timer_interrupt(struct pt_regs * regs) | |||
604 | 635 | ||
605 | calculate_steal_time(); | 636 | calculate_steal_time(); |
606 | 637 | ||
638 | if (test_perf_event_pending()) { | ||
639 | clear_perf_event_pending(); | ||
640 | perf_event_do_pending(); | ||
641 | } | ||
642 | |||
607 | #ifdef CONFIG_PPC_ISERIES | 643 | #ifdef CONFIG_PPC_ISERIES |
608 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | 644 | if (firmware_has_feature(FW_FEATURE_ISERIES)) |
609 | get_lppaca()->int_dword.fields.decr_int = 0; | 645 | get_lppaca()->int_dword.fields.decr_int = 0; |
diff --git a/arch/powerpc/kvm/44x_tlb.c b/arch/powerpc/kvm/44x_tlb.c index 2570fcc7665d..812312542e50 100644 --- a/arch/powerpc/kvm/44x_tlb.c +++ b/arch/powerpc/kvm/44x_tlb.c | |||
@@ -440,7 +440,7 @@ int kvmppc_44x_emul_tlbwe(struct kvm_vcpu *vcpu, u8 ra, u8 rs, u8 ws) | |||
440 | unsigned int gtlb_index; | 440 | unsigned int gtlb_index; |
441 | 441 | ||
442 | gtlb_index = kvmppc_get_gpr(vcpu, ra); | 442 | gtlb_index = kvmppc_get_gpr(vcpu, ra); |
443 | if (gtlb_index > KVM44x_GUEST_TLB_SIZE) { | 443 | if (gtlb_index >= KVM44x_GUEST_TLB_SIZE) { |
444 | printk("%s: index %d\n", __func__, gtlb_index); | 444 | printk("%s: index %d\n", __func__, gtlb_index); |
445 | kvmppc_dump_vcpu(vcpu); | 445 | kvmppc_dump_vcpu(vcpu); |
446 | return EMULATE_FAIL; | 446 | return EMULATE_FAIL; |
diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S index 1bbcc499d455..b8f8dc126102 100644 --- a/arch/s390/kernel/head31.S +++ b/arch/s390/kernel/head31.S | |||
@@ -82,7 +82,7 @@ startup_continue: | |||
82 | _ehead: | 82 | _ehead: |
83 | 83 | ||
84 | #ifdef CONFIG_SHARED_KERNEL | 84 | #ifdef CONFIG_SHARED_KERNEL |
85 | .org 0x100000 | 85 | .org 0x100000 - 0x11000 # head.o ends at 0x11000 |
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | # | 88 | # |
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index 1f70970de0aa..cdef68717416 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
@@ -80,7 +80,7 @@ startup_continue: | |||
80 | _ehead: | 80 | _ehead: |
81 | 81 | ||
82 | #ifdef CONFIG_SHARED_KERNEL | 82 | #ifdef CONFIG_SHARED_KERNEL |
83 | .org 0x100000 | 83 | .org 0x100000 - 0x11000 # head.o ends at 0x11000 |
84 | #endif | 84 | #endif |
85 | 85 | ||
86 | # | 86 | # |
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 33fdc5a79764..9f654da4cecc 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -640,7 +640,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
640 | 640 | ||
641 | asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | 641 | asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) |
642 | { | 642 | { |
643 | long ret; | 643 | long ret = 0; |
644 | 644 | ||
645 | /* Do the secure computing check first. */ | 645 | /* Do the secure computing check first. */ |
646 | secure_computing(regs->gprs[2]); | 646 | secure_computing(regs->gprs[2]); |
@@ -649,7 +649,6 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
649 | * The sysc_tracesys code in entry.S stored the system | 649 | * The sysc_tracesys code in entry.S stored the system |
650 | * call number to gprs[2]. | 650 | * call number to gprs[2]. |
651 | */ | 651 | */ |
652 | ret = regs->gprs[2]; | ||
653 | if (test_thread_flag(TIF_SYSCALL_TRACE) && | 652 | if (test_thread_flag(TIF_SYSCALL_TRACE) && |
654 | (tracehook_report_syscall_entry(regs) || | 653 | (tracehook_report_syscall_entry(regs) || |
655 | regs->gprs[2] >= NR_syscalls)) { | 654 | regs->gprs[2] >= NR_syscalls)) { |
@@ -671,7 +670,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
671 | regs->gprs[2], regs->orig_gpr2, | 670 | regs->gprs[2], regs->orig_gpr2, |
672 | regs->gprs[3], regs->gprs[4], | 671 | regs->gprs[3], regs->gprs[4], |
673 | regs->gprs[5]); | 672 | regs->gprs[5]); |
674 | return ret; | 673 | return ret ?: regs->gprs[2]; |
675 | } | 674 | } |
676 | 675 | ||
677 | asmlinkage void do_syscall_trace_exit(struct pt_regs *regs) | 676 | asmlinkage void do_syscall_trace_exit(struct pt_regs *regs) |
diff --git a/arch/sh/configs/rts7751r2d1_defconfig b/arch/sh/configs/rts7751r2d1_defconfig index fba1f62d56e7..dba024d72a89 100644 --- a/arch/sh/configs/rts7751r2d1_defconfig +++ b/arch/sh/configs/rts7751r2d1_defconfig | |||
@@ -877,7 +877,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | |||
877 | # | 877 | # |
878 | # CONFIG_SERIAL_MAX3100 is not set | 878 | # CONFIG_SERIAL_MAX3100 is not set |
879 | CONFIG_SERIAL_SH_SCI=y | 879 | CONFIG_SERIAL_SH_SCI=y |
880 | CONFIG_SERIAL_SH_SCI_NR_UARTS=1 | 880 | CONFIG_SERIAL_SH_SCI_NR_UARTS=2 |
881 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | 881 | CONFIG_SERIAL_SH_SCI_CONSOLE=y |
882 | CONFIG_SERIAL_CORE=y | 882 | CONFIG_SERIAL_CORE=y |
883 | CONFIG_SERIAL_CORE_CONSOLE=y | 883 | CONFIG_SERIAL_CORE_CONSOLE=y |
diff --git a/arch/sh/configs/rts7751r2dplus_defconfig b/arch/sh/configs/rts7751r2dplus_defconfig index a8d538f06e67..6d511d06cbf6 100644 --- a/arch/sh/configs/rts7751r2dplus_defconfig +++ b/arch/sh/configs/rts7751r2dplus_defconfig | |||
@@ -963,7 +963,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | |||
963 | # | 963 | # |
964 | # CONFIG_SERIAL_MAX3100 is not set | 964 | # CONFIG_SERIAL_MAX3100 is not set |
965 | CONFIG_SERIAL_SH_SCI=y | 965 | CONFIG_SERIAL_SH_SCI=y |
966 | CONFIG_SERIAL_SH_SCI_NR_UARTS=1 | 966 | CONFIG_SERIAL_SH_SCI_NR_UARTS=2 |
967 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | 967 | CONFIG_SERIAL_SH_SCI_CONSOLE=y |
968 | CONFIG_SERIAL_CORE=y | 968 | CONFIG_SERIAL_CORE=y |
969 | CONFIG_SERIAL_CORE_CONSOLE=y | 969 | CONFIG_SERIAL_CORE_CONSOLE=y |
diff --git a/arch/sh/drivers/pci/pci-sh7751.c b/arch/sh/drivers/pci/pci-sh7751.c index 17811e5d287b..f98141b3b7d7 100644 --- a/arch/sh/drivers/pci/pci-sh7751.c +++ b/arch/sh/drivers/pci/pci-sh7751.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include "pci-sh4.h" | 18 | #include "pci-sh4.h" |
19 | #include <asm/addrspace.h> | 19 | #include <asm/addrspace.h> |
20 | #include <asm/sizes.h> | ||
20 | 21 | ||
21 | static int __init __area_sdram_check(struct pci_channel *chan, | 22 | static int __init __area_sdram_check(struct pci_channel *chan, |
22 | unsigned int area) | 23 | unsigned int area) |
@@ -47,8 +48,8 @@ static int __init __area_sdram_check(struct pci_channel *chan, | |||
47 | static struct resource sh7751_pci_resources[] = { | 48 | static struct resource sh7751_pci_resources[] = { |
48 | { | 49 | { |
49 | .name = "SH7751_IO", | 50 | .name = "SH7751_IO", |
50 | .start = SH7751_PCI_IO_BASE, | 51 | .start = 0x1000, |
51 | .end = SH7751_PCI_IO_BASE + SH7751_PCI_IO_SIZE - 1, | 52 | .end = SZ_4M - 1, |
52 | .flags = IORESOURCE_IO | 53 | .flags = IORESOURCE_IO |
53 | }, { | 54 | }, { |
54 | .name = "SH7751_mem", | 55 | .name = "SH7751_mem", |
diff --git a/arch/sh/include/cpu-sh4/cpu/dma-register.h b/arch/sh/include/cpu-sh4/cpu/dma-register.h index 55f9fec082d4..de2359533994 100644 --- a/arch/sh/include/cpu-sh4/cpu/dma-register.h +++ b/arch/sh/include/cpu-sh4/cpu/dma-register.h | |||
@@ -76,7 +76,7 @@ enum { | |||
76 | } | 76 | } |
77 | 77 | ||
78 | #define TS_INDEX2VAL(i) ((((i) & 3) << CHCR_TS_LOW_SHIFT) | \ | 78 | #define TS_INDEX2VAL(i) ((((i) & 3) << CHCR_TS_LOW_SHIFT) | \ |
79 | ((((i) >> 2) & 3) << CHCR_TS_HIGH_SHIFT)) | 79 | (((i) & 0xc) << CHCR_TS_HIGH_SHIFT)) |
80 | 80 | ||
81 | #else /* CONFIG_CPU_SH4A */ | 81 | #else /* CONFIG_CPU_SH4A */ |
82 | 82 | ||
diff --git a/arch/x86/include/asm/k8.h b/arch/x86/include/asm/k8.h index f70e60071fe8..af00bd1d2089 100644 --- a/arch/x86/include/asm/k8.h +++ b/arch/x86/include/asm/k8.h | |||
@@ -16,11 +16,16 @@ extern int k8_numa_init(unsigned long start_pfn, unsigned long end_pfn); | |||
16 | extern int k8_scan_nodes(void); | 16 | extern int k8_scan_nodes(void); |
17 | 17 | ||
18 | #ifdef CONFIG_K8_NB | 18 | #ifdef CONFIG_K8_NB |
19 | extern int num_k8_northbridges; | ||
20 | |||
19 | static inline struct pci_dev *node_to_k8_nb_misc(int node) | 21 | static inline struct pci_dev *node_to_k8_nb_misc(int node) |
20 | { | 22 | { |
21 | return (node < num_k8_northbridges) ? k8_northbridges[node] : NULL; | 23 | return (node < num_k8_northbridges) ? k8_northbridges[node] : NULL; |
22 | } | 24 | } |
25 | |||
23 | #else | 26 | #else |
27 | #define num_k8_northbridges 0 | ||
28 | |||
24 | static inline struct pci_dev *node_to_k8_nb_misc(int node) | 29 | static inline struct pci_dev *node_to_k8_nb_misc(int node) |
25 | { | 30 | { |
26 | return NULL; | 31 | return NULL; |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index b3eeb66c0a51..95962a93f99a 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -340,6 +340,10 @@ amd_check_l3_disable(int index, struct _cpuid4_info_regs *this_leaf) | |||
340 | (boot_cpu_data.x86_mask < 0x1))) | 340 | (boot_cpu_data.x86_mask < 0x1))) |
341 | return; | 341 | return; |
342 | 342 | ||
343 | /* not in virtualized environments */ | ||
344 | if (num_k8_northbridges == 0) | ||
345 | return; | ||
346 | |||
343 | this_leaf->can_disable = true; | 347 | this_leaf->can_disable = true; |
344 | this_leaf->l3_indices = amd_calc_l3_indices(); | 348 | this_leaf->l3_indices = amd_calc_l3_indices(); |
345 | } | 349 | } |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 28ad9f4d8b94..0415c3ef91b5 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -546,11 +546,13 @@ static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c) | |||
546 | * check OSVW bit for CPUs that are not affected | 546 | * check OSVW bit for CPUs that are not affected |
547 | * by erratum #400 | 547 | * by erratum #400 |
548 | */ | 548 | */ |
549 | rdmsrl(MSR_AMD64_OSVW_ID_LENGTH, val); | 549 | if (cpu_has(c, X86_FEATURE_OSVW)) { |
550 | if (val >= 2) { | 550 | rdmsrl(MSR_AMD64_OSVW_ID_LENGTH, val); |
551 | rdmsrl(MSR_AMD64_OSVW_STATUS, val); | 551 | if (val >= 2) { |
552 | if (!(val & BIT(1))) | 552 | rdmsrl(MSR_AMD64_OSVW_STATUS, val); |
553 | goto no_c1e_idle; | 553 | if (!(val & BIT(1))) |
554 | goto no_c1e_idle; | ||
555 | } | ||
554 | } | 556 | } |
555 | return 1; | 557 | return 1; |
556 | } | 558 | } |
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 2ba58206812a..737361fcd503 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -2067,7 +2067,7 @@ static int cpuid_interception(struct vcpu_svm *svm) | |||
2067 | static int iret_interception(struct vcpu_svm *svm) | 2067 | static int iret_interception(struct vcpu_svm *svm) |
2068 | { | 2068 | { |
2069 | ++svm->vcpu.stat.nmi_window_exits; | 2069 | ++svm->vcpu.stat.nmi_window_exits; |
2070 | svm->vmcb->control.intercept &= ~(1UL << INTERCEPT_IRET); | 2070 | svm->vmcb->control.intercept &= ~(1ULL << INTERCEPT_IRET); |
2071 | svm->vcpu.arch.hflags |= HF_IRET_MASK; | 2071 | svm->vcpu.arch.hflags |= HF_IRET_MASK; |
2072 | return 1; | 2072 | return 1; |
2073 | } | 2073 | } |
@@ -2479,7 +2479,7 @@ static void svm_inject_nmi(struct kvm_vcpu *vcpu) | |||
2479 | 2479 | ||
2480 | svm->vmcb->control.event_inj = SVM_EVTINJ_VALID | SVM_EVTINJ_TYPE_NMI; | 2480 | svm->vmcb->control.event_inj = SVM_EVTINJ_VALID | SVM_EVTINJ_TYPE_NMI; |
2481 | vcpu->arch.hflags |= HF_NMI_MASK; | 2481 | vcpu->arch.hflags |= HF_NMI_MASK; |
2482 | svm->vmcb->control.intercept |= (1UL << INTERCEPT_IRET); | 2482 | svm->vmcb->control.intercept |= (1ULL << INTERCEPT_IRET); |
2483 | ++vcpu->stat.nmi_injections; | 2483 | ++vcpu->stat.nmi_injections; |
2484 | } | 2484 | } |
2485 | 2485 | ||
@@ -2539,10 +2539,10 @@ static void svm_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked) | |||
2539 | 2539 | ||
2540 | if (masked) { | 2540 | if (masked) { |
2541 | svm->vcpu.arch.hflags |= HF_NMI_MASK; | 2541 | svm->vcpu.arch.hflags |= HF_NMI_MASK; |
2542 | svm->vmcb->control.intercept |= (1UL << INTERCEPT_IRET); | 2542 | svm->vmcb->control.intercept |= (1ULL << INTERCEPT_IRET); |
2543 | } else { | 2543 | } else { |
2544 | svm->vcpu.arch.hflags &= ~HF_NMI_MASK; | 2544 | svm->vcpu.arch.hflags &= ~HF_NMI_MASK; |
2545 | svm->vmcb->control.intercept &= ~(1UL << INTERCEPT_IRET); | 2545 | svm->vmcb->control.intercept &= ~(1ULL << INTERCEPT_IRET); |
2546 | } | 2546 | } |
2547 | } | 2547 | } |
2548 | 2548 | ||
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index bc933cfb4e66..2f8db0ec8ae4 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -2703,8 +2703,7 @@ static int vmx_nmi_allowed(struct kvm_vcpu *vcpu) | |||
2703 | return 0; | 2703 | return 0; |
2704 | 2704 | ||
2705 | return !(vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & | 2705 | return !(vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & |
2706 | (GUEST_INTR_STATE_STI | GUEST_INTR_STATE_MOV_SS | | 2706 | (GUEST_INTR_STATE_MOV_SS | GUEST_INTR_STATE_NMI)); |
2707 | GUEST_INTR_STATE_NMI)); | ||
2708 | } | 2707 | } |
2709 | 2708 | ||
2710 | static bool vmx_get_nmi_mask(struct kvm_vcpu *vcpu) | 2709 | static bool vmx_get_nmi_mask(struct kvm_vcpu *vcpu) |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 3c4ca98ad27f..c4f35b545c1d 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -1712,6 +1712,7 @@ static int kvm_vcpu_ioctl_set_cpuid(struct kvm_vcpu *vcpu, | |||
1712 | if (copy_from_user(cpuid_entries, entries, | 1712 | if (copy_from_user(cpuid_entries, entries, |
1713 | cpuid->nent * sizeof(struct kvm_cpuid_entry))) | 1713 | cpuid->nent * sizeof(struct kvm_cpuid_entry))) |
1714 | goto out_free; | 1714 | goto out_free; |
1715 | vcpu_load(vcpu); | ||
1715 | for (i = 0; i < cpuid->nent; i++) { | 1716 | for (i = 0; i < cpuid->nent; i++) { |
1716 | vcpu->arch.cpuid_entries[i].function = cpuid_entries[i].function; | 1717 | vcpu->arch.cpuid_entries[i].function = cpuid_entries[i].function; |
1717 | vcpu->arch.cpuid_entries[i].eax = cpuid_entries[i].eax; | 1718 | vcpu->arch.cpuid_entries[i].eax = cpuid_entries[i].eax; |
@@ -1729,6 +1730,7 @@ static int kvm_vcpu_ioctl_set_cpuid(struct kvm_vcpu *vcpu, | |||
1729 | r = 0; | 1730 | r = 0; |
1730 | kvm_apic_set_version(vcpu); | 1731 | kvm_apic_set_version(vcpu); |
1731 | kvm_x86_ops->cpuid_update(vcpu); | 1732 | kvm_x86_ops->cpuid_update(vcpu); |
1733 | vcpu_put(vcpu); | ||
1732 | 1734 | ||
1733 | out_free: | 1735 | out_free: |
1734 | vfree(cpuid_entries); | 1736 | vfree(cpuid_entries); |
@@ -1749,9 +1751,11 @@ static int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu, | |||
1749 | if (copy_from_user(&vcpu->arch.cpuid_entries, entries, | 1751 | if (copy_from_user(&vcpu->arch.cpuid_entries, entries, |
1750 | cpuid->nent * sizeof(struct kvm_cpuid_entry2))) | 1752 | cpuid->nent * sizeof(struct kvm_cpuid_entry2))) |
1751 | goto out; | 1753 | goto out; |
1754 | vcpu_load(vcpu); | ||
1752 | vcpu->arch.cpuid_nent = cpuid->nent; | 1755 | vcpu->arch.cpuid_nent = cpuid->nent; |
1753 | kvm_apic_set_version(vcpu); | 1756 | kvm_apic_set_version(vcpu); |
1754 | kvm_x86_ops->cpuid_update(vcpu); | 1757 | kvm_x86_ops->cpuid_update(vcpu); |
1758 | vcpu_put(vcpu); | ||
1755 | return 0; | 1759 | return 0; |
1756 | 1760 | ||
1757 | out: | 1761 | out: |
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c index 28c68762648f..38512d0c4742 100644 --- a/arch/x86/mm/srat_64.c +++ b/arch/x86/mm/srat_64.c | |||
@@ -461,7 +461,8 @@ void __init acpi_fake_nodes(const struct bootnode *fake_nodes, int num_nodes) | |||
461 | * node, it must now point to the fake node ID. | 461 | * node, it must now point to the fake node ID. |
462 | */ | 462 | */ |
463 | for (j = 0; j < MAX_LOCAL_APIC; j++) | 463 | for (j = 0; j < MAX_LOCAL_APIC; j++) |
464 | if (apicid_to_node[j] == nid) | 464 | if (apicid_to_node[j] == nid && |
465 | fake_apicid_to_node[j] == NUMA_NO_NODE) | ||
465 | fake_apicid_to_node[j] = i; | 466 | fake_apicid_to_node[j] = i; |
466 | } | 467 | } |
467 | for (i = 0; i < num_nodes; i++) | 468 | for (i = 0; i < num_nodes; i++) |
diff --git a/arch/x86/pci/mrst.c b/arch/x86/pci/mrst.c index 8bf2fcb88d04..1cdc02cf8fa4 100644 --- a/arch/x86/pci/mrst.c +++ b/arch/x86/pci/mrst.c | |||
@@ -247,6 +247,10 @@ static void __devinit pci_fixed_bar_fixup(struct pci_dev *dev) | |||
247 | u32 size; | 247 | u32 size; |
248 | int i; | 248 | int i; |
249 | 249 | ||
250 | /* Must have extended configuration space */ | ||
251 | if (dev->cfg_size < PCIE_CAP_OFFSET + 4) | ||
252 | return; | ||
253 | |||
250 | /* Fixup the BAR sizes for fixed BAR devices and make them unmoveable */ | 254 | /* Fixup the BAR sizes for fixed BAR devices and make them unmoveable */ |
251 | offset = fixed_bar_cap(dev->bus, dev->devfn); | 255 | offset = fixed_bar_cap(dev->bus, dev->devfn); |
252 | if (!offset || PCI_DEVFN(2, 0) == dev->devfn || | 256 | if (!offset || PCI_DEVFN(2, 0) == dev->devfn || |
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 5fe03def34b2..2cc682b860ea 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -286,16 +286,16 @@ done: | |||
286 | static struct cgroup_subsys_state * | 286 | static struct cgroup_subsys_state * |
287 | blkiocg_create(struct cgroup_subsys *subsys, struct cgroup *cgroup) | 287 | blkiocg_create(struct cgroup_subsys *subsys, struct cgroup *cgroup) |
288 | { | 288 | { |
289 | struct blkio_cgroup *blkcg, *parent_blkcg; | 289 | struct blkio_cgroup *blkcg; |
290 | struct cgroup *parent = cgroup->parent; | ||
290 | 291 | ||
291 | if (!cgroup->parent) { | 292 | if (!parent) { |
292 | blkcg = &blkio_root_cgroup; | 293 | blkcg = &blkio_root_cgroup; |
293 | goto done; | 294 | goto done; |
294 | } | 295 | } |
295 | 296 | ||
296 | /* Currently we do not support hierarchy deeper than two level (0,1) */ | 297 | /* Currently we do not support hierarchy deeper than two level (0,1) */ |
297 | parent_blkcg = cgroup_to_blkio_cgroup(cgroup->parent); | 298 | if (parent != cgroup->top_cgroup) |
298 | if (css_depth(&parent_blkcg->css) > 0) | ||
299 | return ERR_PTR(-EINVAL); | 299 | return ERR_PTR(-EINVAL); |
300 | 300 | ||
301 | blkcg = kzalloc(sizeof(*blkcg), GFP_KERNEL); | 301 | blkcg = kzalloc(sizeof(*blkcg), GFP_KERNEL); |
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 838834be115b..5f127cfb2e92 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -3694,8 +3694,10 @@ static void *cfq_init_queue(struct request_queue *q) | |||
3694 | * to make sure that cfq_put_cfqg() does not try to kfree root group | 3694 | * to make sure that cfq_put_cfqg() does not try to kfree root group |
3695 | */ | 3695 | */ |
3696 | atomic_set(&cfqg->ref, 1); | 3696 | atomic_set(&cfqg->ref, 1); |
3697 | rcu_read_lock(); | ||
3697 | blkiocg_add_blkio_group(&blkio_root_cgroup, &cfqg->blkg, (void *)cfqd, | 3698 | blkiocg_add_blkio_group(&blkio_root_cgroup, &cfqg->blkg, (void *)cfqd, |
3698 | 0); | 3699 | 0); |
3700 | rcu_read_unlock(); | ||
3699 | #endif | 3701 | #endif |
3700 | /* | 3702 | /* |
3701 | * Not strictly needed (since RB_ROOT just clears the node and we | 3703 | * Not strictly needed (since RB_ROOT just clears the node and we |
diff --git a/drivers/Makefile b/drivers/Makefile index 34f1e1064dbc..f42a03029b7c 100644 --- a/drivers/Makefile +++ b/drivers/Makefile | |||
@@ -17,6 +17,7 @@ obj-$(CONFIG_SFI) += sfi/ | |||
17 | obj-$(CONFIG_PNP) += pnp/ | 17 | obj-$(CONFIG_PNP) += pnp/ |
18 | obj-$(CONFIG_ARM_AMBA) += amba/ | 18 | obj-$(CONFIG_ARM_AMBA) += amba/ |
19 | 19 | ||
20 | obj-$(CONFIG_VIRTIO) += virtio/ | ||
20 | obj-$(CONFIG_XEN) += xen/ | 21 | obj-$(CONFIG_XEN) += xen/ |
21 | 22 | ||
22 | # regulators early, since some subsystems rely on them to initialize | 23 | # regulators early, since some subsystems rely on them to initialize |
@@ -108,7 +109,6 @@ obj-$(CONFIG_PPC_PS3) += ps3/ | |||
108 | obj-$(CONFIG_OF) += of/ | 109 | obj-$(CONFIG_OF) += of/ |
109 | obj-$(CONFIG_SSB) += ssb/ | 110 | obj-$(CONFIG_SSB) += ssb/ |
110 | obj-$(CONFIG_VHOST_NET) += vhost/ | 111 | obj-$(CONFIG_VHOST_NET) += vhost/ |
111 | obj-$(CONFIG_VIRTIO) += virtio/ | ||
112 | obj-$(CONFIG_VLYNQ) += vlynq/ | 112 | obj-$(CONFIG_VLYNQ) += vlynq/ |
113 | obj-$(CONFIG_STAGING) += staging/ | 113 | obj-$(CONFIG_STAGING) += staging/ |
114 | obj-y += platform/ | 114 | obj-y += platform/ |
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index 19dacfd43163..62122134693b 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <acpi/acpi_bus.h> | 31 | #include <acpi/acpi_bus.h> |
32 | #include <acpi/acpi_drivers.h> | 32 | #include <acpi/acpi_drivers.h> |
33 | 33 | ||
34 | #define ACPI_PROCESSOR_AGGREGATOR_CLASS "processor_aggregator" | 34 | #define ACPI_PROCESSOR_AGGREGATOR_CLASS "acpi_pad" |
35 | #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator" | 35 | #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator" |
36 | #define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80 | 36 | #define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80 |
37 | static DEFINE_MUTEX(isolated_cpus_lock); | 37 | static DEFINE_MUTEX(isolated_cpus_lock); |
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 37132dc2da03..743576bf1bd7 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -527,7 +527,7 @@ int acpi_bus_generate_proc_event4(const char *device_class, const char *bus_id, | |||
527 | if (!event_is_open) | 527 | if (!event_is_open) |
528 | return 0; | 528 | return 0; |
529 | 529 | ||
530 | event = kmalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC); | 530 | event = kzalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC); |
531 | if (!event) | 531 | if (!event) |
532 | return -ENOMEM; | 532 | return -ENOMEM; |
533 | 533 | ||
diff --git a/drivers/acpi/hest.c b/drivers/acpi/hest.c index 4bb18c980ac6..1c527a192872 100644 --- a/drivers/acpi/hest.c +++ b/drivers/acpi/hest.c | |||
@@ -123,6 +123,10 @@ int acpi_hest_firmware_first_pci(struct pci_dev *pci) | |||
123 | { | 123 | { |
124 | acpi_status status = AE_NOT_FOUND; | 124 | acpi_status status = AE_NOT_FOUND; |
125 | struct acpi_table_header *hest = NULL; | 125 | struct acpi_table_header *hest = NULL; |
126 | |||
127 | if (acpi_disabled) | ||
128 | return 0; | ||
129 | |||
126 | status = acpi_get_table(ACPI_SIG_HEST, 1, &hest); | 130 | status = acpi_get_table(ACPI_SIG_HEST, 1, &hest); |
127 | 131 | ||
128 | if (ACPI_SUCCESS(status)) { | 132 | if (ACPI_SUCCESS(status)) { |
diff --git a/drivers/acpi/power_meter.c b/drivers/acpi/power_meter.c index e8c32a49f14e..66f67293341e 100644 --- a/drivers/acpi/power_meter.c +++ b/drivers/acpi/power_meter.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #define ACPI_POWER_METER_NAME "power_meter" | 35 | #define ACPI_POWER_METER_NAME "power_meter" |
36 | ACPI_MODULE_NAME(ACPI_POWER_METER_NAME); | 36 | ACPI_MODULE_NAME(ACPI_POWER_METER_NAME); |
37 | #define ACPI_POWER_METER_DEVICE_NAME "Power Meter" | 37 | #define ACPI_POWER_METER_DEVICE_NAME "Power Meter" |
38 | #define ACPI_POWER_METER_CLASS "power_meter_resource" | 38 | #define ACPI_POWER_METER_CLASS "pwr_meter_resource" |
39 | 39 | ||
40 | #define NUM_SENSORS 17 | 40 | #define NUM_SENSORS 17 |
41 | 41 | ||
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c index 36704b887ccf..f8be23b6c129 100644 --- a/drivers/acpi/sbshc.c +++ b/drivers/acpi/sbshc.c | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | #define PREFIX "ACPI: " | 19 | #define PREFIX "ACPI: " |
20 | 20 | ||
21 | #define ACPI_SMB_HC_CLASS "smbus_host_controller" | 21 | #define ACPI_SMB_HC_CLASS "smbus_host_ctl" |
22 | #define ACPI_SMB_HC_DEVICE_NAME "ACPI SMBus HC" | 22 | #define ACPI_SMB_HC_DEVICE_NAME "ACPI SMBus HC" |
23 | 23 | ||
24 | struct acpi_smb_hc { | 24 | struct acpi_smb_hc { |
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index f74834a544fd..baa76bbf244a 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -450,6 +450,38 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { | |||
450 | }, | 450 | }, |
451 | }, | 451 | }, |
452 | { | 452 | { |
453 | .callback = init_set_sci_en_on_resume, | ||
454 | .ident = "Lenovo ThinkPad T410", | ||
455 | .matches = { | ||
456 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
457 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T410"), | ||
458 | }, | ||
459 | }, | ||
460 | { | ||
461 | .callback = init_set_sci_en_on_resume, | ||
462 | .ident = "Lenovo ThinkPad T510", | ||
463 | .matches = { | ||
464 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
465 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T510"), | ||
466 | }, | ||
467 | }, | ||
468 | { | ||
469 | .callback = init_set_sci_en_on_resume, | ||
470 | .ident = "Lenovo ThinkPad W510", | ||
471 | .matches = { | ||
472 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
473 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W510"), | ||
474 | }, | ||
475 | }, | ||
476 | { | ||
477 | .callback = init_set_sci_en_on_resume, | ||
478 | .ident = "Lenovo ThinkPad X201[s]", | ||
479 | .matches = { | ||
480 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
481 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201"), | ||
482 | }, | ||
483 | }, | ||
484 | { | ||
453 | .callback = init_old_suspend_ordering, | 485 | .callback = init_old_suspend_ordering, |
454 | .ident = "Panasonic CF51-2L", | 486 | .ident = "Panasonic CF51-2L", |
455 | .matches = { | 487 | .matches = { |
@@ -458,6 +490,30 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { | |||
458 | DMI_MATCH(DMI_BOARD_NAME, "CF51-2L"), | 490 | DMI_MATCH(DMI_BOARD_NAME, "CF51-2L"), |
459 | }, | 491 | }, |
460 | }, | 492 | }, |
493 | { | ||
494 | .callback = init_set_sci_en_on_resume, | ||
495 | .ident = "Dell Studio 1558", | ||
496 | .matches = { | ||
497 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
498 | DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1558"), | ||
499 | }, | ||
500 | }, | ||
501 | { | ||
502 | .callback = init_set_sci_en_on_resume, | ||
503 | .ident = "Dell Studio 1557", | ||
504 | .matches = { | ||
505 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
506 | DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1557"), | ||
507 | }, | ||
508 | }, | ||
509 | { | ||
510 | .callback = init_set_sci_en_on_resume, | ||
511 | .ident = "Dell Studio 1555", | ||
512 | .matches = { | ||
513 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
514 | DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1555"), | ||
515 | }, | ||
516 | }, | ||
461 | {}, | 517 | {}, |
462 | }; | 518 | }; |
463 | #endif /* CONFIG_SUSPEND */ | 519 | #endif /* CONFIG_SUSPEND */ |
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index 44bf6d11197e..d48a1dfd7b24 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c | |||
@@ -235,7 +235,7 @@ void drbd_endio_pri(struct bio *bio, int error) | |||
235 | if (unlikely(error)) { | 235 | if (unlikely(error)) { |
236 | what = (bio_data_dir(bio) == WRITE) | 236 | what = (bio_data_dir(bio) == WRITE) |
237 | ? write_completed_with_error | 237 | ? write_completed_with_error |
238 | : (bio_rw(bio) == READA) | 238 | : (bio_rw(bio) == READ) |
239 | ? read_completed_with_error | 239 | ? read_completed_with_error |
240 | : read_ahead_completed_with_error; | 240 | : read_ahead_completed_with_error; |
241 | } else | 241 | } else |
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 6da962c9b21c..d71f0fc34b46 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -1875,6 +1875,7 @@ got_driver: | |||
1875 | */ | 1875 | */ |
1876 | if (filp->f_op == &hung_up_tty_fops) | 1876 | if (filp->f_op == &hung_up_tty_fops) |
1877 | filp->f_op = &tty_fops; | 1877 | filp->f_op = &tty_fops; |
1878 | unlock_kernel(); | ||
1878 | goto retry_open; | 1879 | goto retry_open; |
1879 | } | 1880 | } |
1880 | unlock_kernel(); | 1881 | unlock_kernel(); |
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index 1aea7157d8ff..f8e57c6303f2 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c | |||
@@ -100,7 +100,6 @@ struct menu_device { | |||
100 | int needs_update; | 100 | int needs_update; |
101 | 101 | ||
102 | unsigned int expected_us; | 102 | unsigned int expected_us; |
103 | unsigned int measured_us; | ||
104 | u64 predicted_us; | 103 | u64 predicted_us; |
105 | unsigned int exit_us; | 104 | unsigned int exit_us; |
106 | unsigned int bucket; | 105 | unsigned int bucket; |
@@ -187,14 +186,14 @@ static int menu_select(struct cpuidle_device *dev) | |||
187 | int i; | 186 | int i; |
188 | int multiplier; | 187 | int multiplier; |
189 | 188 | ||
190 | data->last_state_idx = 0; | ||
191 | data->exit_us = 0; | ||
192 | |||
193 | if (data->needs_update) { | 189 | if (data->needs_update) { |
194 | menu_update(dev); | 190 | menu_update(dev); |
195 | data->needs_update = 0; | 191 | data->needs_update = 0; |
196 | } | 192 | } |
197 | 193 | ||
194 | data->last_state_idx = 0; | ||
195 | data->exit_us = 0; | ||
196 | |||
198 | /* Special case when user has set very strict latency requirement */ | 197 | /* Special case when user has set very strict latency requirement */ |
199 | if (unlikely(latency_req == 0)) | 198 | if (unlikely(latency_req == 0)) |
200 | return 0; | 199 | return 0; |
@@ -294,7 +293,7 @@ static void menu_update(struct cpuidle_device *dev) | |||
294 | new_factor = data->correction_factor[data->bucket] | 293 | new_factor = data->correction_factor[data->bucket] |
295 | * (DECAY - 1) / DECAY; | 294 | * (DECAY - 1) / DECAY; |
296 | 295 | ||
297 | if (data->expected_us > 0 && data->measured_us < MAX_INTERESTING) | 296 | if (data->expected_us > 0 && measured_us < MAX_INTERESTING) |
298 | new_factor += RESOLUTION * measured_us / data->expected_us; | 297 | new_factor += RESOLUTION * measured_us / data->expected_us; |
299 | else | 298 | else |
300 | /* | 299 | /* |
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 7cc31b3f40d8..6f25a20de99f 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c | |||
@@ -290,6 +290,7 @@ static int sh_dmae_alloc_chan_resources(struct dma_chan *chan) | |||
290 | struct sh_dmae_chan *sh_chan = to_sh_chan(chan); | 290 | struct sh_dmae_chan *sh_chan = to_sh_chan(chan); |
291 | struct sh_desc *desc; | 291 | struct sh_desc *desc; |
292 | struct sh_dmae_slave *param = chan->private; | 292 | struct sh_dmae_slave *param = chan->private; |
293 | int ret; | ||
293 | 294 | ||
294 | pm_runtime_get_sync(sh_chan->dev); | 295 | pm_runtime_get_sync(sh_chan->dev); |
295 | 296 | ||
@@ -301,11 +302,15 @@ static int sh_dmae_alloc_chan_resources(struct dma_chan *chan) | |||
301 | struct sh_dmae_slave_config *cfg; | 302 | struct sh_dmae_slave_config *cfg; |
302 | 303 | ||
303 | cfg = sh_dmae_find_slave(sh_chan, param->slave_id); | 304 | cfg = sh_dmae_find_slave(sh_chan, param->slave_id); |
304 | if (!cfg) | 305 | if (!cfg) { |
305 | return -EINVAL; | 306 | ret = -EINVAL; |
307 | goto efindslave; | ||
308 | } | ||
306 | 309 | ||
307 | if (test_and_set_bit(param->slave_id, sh_dmae_slave_used)) | 310 | if (test_and_set_bit(param->slave_id, sh_dmae_slave_used)) { |
308 | return -EBUSY; | 311 | ret = -EBUSY; |
312 | goto etestused; | ||
313 | } | ||
309 | 314 | ||
310 | param->config = cfg; | 315 | param->config = cfg; |
311 | 316 | ||
@@ -334,10 +339,20 @@ static int sh_dmae_alloc_chan_resources(struct dma_chan *chan) | |||
334 | } | 339 | } |
335 | spin_unlock_bh(&sh_chan->desc_lock); | 340 | spin_unlock_bh(&sh_chan->desc_lock); |
336 | 341 | ||
337 | if (!sh_chan->descs_allocated) | 342 | if (!sh_chan->descs_allocated) { |
338 | pm_runtime_put(sh_chan->dev); | 343 | ret = -ENOMEM; |
344 | goto edescalloc; | ||
345 | } | ||
339 | 346 | ||
340 | return sh_chan->descs_allocated; | 347 | return sh_chan->descs_allocated; |
348 | |||
349 | edescalloc: | ||
350 | if (param) | ||
351 | clear_bit(param->slave_id, sh_dmae_slave_used); | ||
352 | etestused: | ||
353 | efindslave: | ||
354 | pm_runtime_put(sh_chan->dev); | ||
355 | return ret; | ||
341 | } | 356 | } |
342 | 357 | ||
343 | /* | 358 | /* |
diff --git a/drivers/gpio/it8761e_gpio.c b/drivers/gpio/it8761e_gpio.c index 753219cf993a..41a9388f2fde 100644 --- a/drivers/gpio/it8761e_gpio.c +++ b/drivers/gpio/it8761e_gpio.c | |||
@@ -80,8 +80,8 @@ static int it8761e_gpio_get(struct gpio_chip *gc, unsigned gpio_num) | |||
80 | u16 reg; | 80 | u16 reg; |
81 | u8 bit; | 81 | u8 bit; |
82 | 82 | ||
83 | bit = gpio_num % 7; | 83 | bit = gpio_num % 8; |
84 | reg = (gpio_num >= 7) ? gpio_ba + 1 : gpio_ba; | 84 | reg = (gpio_num >= 8) ? gpio_ba + 1 : gpio_ba; |
85 | 85 | ||
86 | return !!(inb(reg) & (1 << bit)); | 86 | return !!(inb(reg) & (1 << bit)); |
87 | } | 87 | } |
@@ -91,8 +91,8 @@ static int it8761e_gpio_direction_in(struct gpio_chip *gc, unsigned gpio_num) | |||
91 | u8 curr_dirs; | 91 | u8 curr_dirs; |
92 | u8 io_reg, bit; | 92 | u8 io_reg, bit; |
93 | 93 | ||
94 | bit = gpio_num % 7; | 94 | bit = gpio_num % 8; |
95 | io_reg = (gpio_num >= 7) ? GPIO2X_IO : GPIO1X_IO; | 95 | io_reg = (gpio_num >= 8) ? GPIO2X_IO : GPIO1X_IO; |
96 | 96 | ||
97 | spin_lock(&sio_lock); | 97 | spin_lock(&sio_lock); |
98 | 98 | ||
@@ -116,8 +116,8 @@ static void it8761e_gpio_set(struct gpio_chip *gc, | |||
116 | u8 curr_vals, bit; | 116 | u8 curr_vals, bit; |
117 | u16 reg; | 117 | u16 reg; |
118 | 118 | ||
119 | bit = gpio_num % 7; | 119 | bit = gpio_num % 8; |
120 | reg = (gpio_num >= 7) ? gpio_ba + 1 : gpio_ba; | 120 | reg = (gpio_num >= 8) ? gpio_ba + 1 : gpio_ba; |
121 | 121 | ||
122 | spin_lock(&sio_lock); | 122 | spin_lock(&sio_lock); |
123 | 123 | ||
@@ -135,8 +135,8 @@ static int it8761e_gpio_direction_out(struct gpio_chip *gc, | |||
135 | { | 135 | { |
136 | u8 curr_dirs, io_reg, bit; | 136 | u8 curr_dirs, io_reg, bit; |
137 | 137 | ||
138 | bit = gpio_num % 7; | 138 | bit = gpio_num % 8; |
139 | io_reg = (gpio_num >= 7) ? GPIO2X_IO : GPIO1X_IO; | 139 | io_reg = (gpio_num >= 8) ? GPIO2X_IO : GPIO1X_IO; |
140 | 140 | ||
141 | it8761e_gpio_set(gc, gpio_num, val); | 141 | it8761e_gpio_set(gc, gpio_num, val); |
142 | 142 | ||
@@ -200,7 +200,7 @@ static int __init it8761e_gpio_init(void) | |||
200 | return -EBUSY; | 200 | return -EBUSY; |
201 | 201 | ||
202 | it8761e_gpio_chip.base = -1; | 202 | it8761e_gpio_chip.base = -1; |
203 | it8761e_gpio_chip.ngpio = 14; | 203 | it8761e_gpio_chip.ngpio = 16; |
204 | 204 | ||
205 | err = gpiochip_add(&it8761e_gpio_chip); | 205 | err = gpiochip_add(&it8761e_gpio_chip); |
206 | if (err < 0) | 206 | if (err < 0) |
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 2b8b969d0c15..df6a9cd82c4d 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -456,11 +456,15 @@ i915_error_object_create(struct drm_device *dev, | |||
456 | 456 | ||
457 | for (page = 0; page < page_count; page++) { | 457 | for (page = 0; page < page_count; page++) { |
458 | void *s, *d = kmalloc(PAGE_SIZE, GFP_ATOMIC); | 458 | void *s, *d = kmalloc(PAGE_SIZE, GFP_ATOMIC); |
459 | unsigned long flags; | ||
460 | |||
459 | if (d == NULL) | 461 | if (d == NULL) |
460 | goto unwind; | 462 | goto unwind; |
461 | s = kmap_atomic(src_priv->pages[page], KM_USER0); | 463 | local_irq_save(flags); |
464 | s = kmap_atomic(src_priv->pages[page], KM_IRQ0); | ||
462 | memcpy(d, s, PAGE_SIZE); | 465 | memcpy(d, s, PAGE_SIZE); |
463 | kunmap_atomic(s, KM_USER0); | 466 | kunmap_atomic(s, KM_IRQ0); |
467 | local_irq_restore(flags); | ||
464 | dst->pages[page] = d; | 468 | dst->pages[page] = d; |
465 | } | 469 | } |
466 | dst->page_count = page_count; | 470 | dst->page_count = page_count; |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 4b05563d99e1..b3749d47be7b 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
@@ -216,6 +216,7 @@ static struct drm_driver driver_old = { | |||
216 | .mmap = drm_mmap, | 216 | .mmap = drm_mmap, |
217 | .poll = drm_poll, | 217 | .poll = drm_poll, |
218 | .fasync = drm_fasync, | 218 | .fasync = drm_fasync, |
219 | .read = drm_read, | ||
219 | #ifdef CONFIG_COMPAT | 220 | #ifdef CONFIG_COMPAT |
220 | .compat_ioctl = radeon_compat_ioctl, | 221 | .compat_ioctl = radeon_compat_ioctl, |
221 | #endif | 222 | #endif |
@@ -304,6 +305,7 @@ static struct drm_driver kms_driver = { | |||
304 | .mmap = radeon_mmap, | 305 | .mmap = radeon_mmap, |
305 | .poll = drm_poll, | 306 | .poll = drm_poll, |
306 | .fasync = drm_fasync, | 307 | .fasync = drm_fasync, |
308 | .read = drm_read, | ||
307 | #ifdef CONFIG_COMPAT | 309 | #ifdef CONFIG_COMPAT |
308 | .compat_ioctl = radeon_kms_compat_ioctl, | 310 | .compat_ioctl = radeon_kms_compat_ioctl, |
309 | #endif | 311 | #endif |
diff --git a/drivers/gpu/drm/radeon/radeon_state.c b/drivers/gpu/drm/radeon/radeon_state.c index 40ab6d9c3736..cc5316dcf580 100644 --- a/drivers/gpu/drm/radeon/radeon_state.c +++ b/drivers/gpu/drm/radeon/radeon_state.c | |||
@@ -424,7 +424,7 @@ static __inline__ int radeon_check_and_fixup_packet3(drm_radeon_private_t * | |||
424 | if ((*cmd & RADEON_GMC_SRC_PITCH_OFFSET_CNTL) && | 424 | if ((*cmd & RADEON_GMC_SRC_PITCH_OFFSET_CNTL) && |
425 | (*cmd & RADEON_GMC_DST_PITCH_OFFSET_CNTL)) { | 425 | (*cmd & RADEON_GMC_DST_PITCH_OFFSET_CNTL)) { |
426 | u32 *cmd3 = drm_buffer_pointer_to_dword(cmdbuf->buffer, 3); | 426 | u32 *cmd3 = drm_buffer_pointer_to_dword(cmdbuf->buffer, 3); |
427 | offset = *cmd << 10; | 427 | offset = *cmd3 << 10; |
428 | if (radeon_check_and_fixup_offset | 428 | if (radeon_check_and_fixup_offset |
429 | (dev_priv, file_priv, &offset)) { | 429 | (dev_priv, file_priv, &offset)) { |
430 | DRM_ERROR("Invalid second packet offset\n"); | 430 | DRM_ERROR("Invalid second packet offset\n"); |
@@ -2895,9 +2895,12 @@ static int radeon_cp_cmdbuf(struct drm_device *dev, void *data, | |||
2895 | return rv; | 2895 | return rv; |
2896 | rv = drm_buffer_copy_from_user(cmdbuf->buffer, buffer, | 2896 | rv = drm_buffer_copy_from_user(cmdbuf->buffer, buffer, |
2897 | cmdbuf->bufsz); | 2897 | cmdbuf->bufsz); |
2898 | if (rv) | 2898 | if (rv) { |
2899 | drm_buffer_free(cmdbuf->buffer); | ||
2899 | return rv; | 2900 | return rv; |
2900 | } | 2901 | } |
2902 | } else | ||
2903 | goto done; | ||
2901 | 2904 | ||
2902 | orig_nbox = cmdbuf->nbox; | 2905 | orig_nbox = cmdbuf->nbox; |
2903 | 2906 | ||
@@ -2905,8 +2908,7 @@ static int radeon_cp_cmdbuf(struct drm_device *dev, void *data, | |||
2905 | int temp; | 2908 | int temp; |
2906 | temp = r300_do_cp_cmdbuf(dev, file_priv, cmdbuf); | 2909 | temp = r300_do_cp_cmdbuf(dev, file_priv, cmdbuf); |
2907 | 2910 | ||
2908 | if (cmdbuf->bufsz != 0) | 2911 | drm_buffer_free(cmdbuf->buffer); |
2909 | drm_buffer_free(cmdbuf->buffer); | ||
2910 | 2912 | ||
2911 | return temp; | 2913 | return temp; |
2912 | } | 2914 | } |
@@ -3012,16 +3014,15 @@ static int radeon_cp_cmdbuf(struct drm_device *dev, void *data, | |||
3012 | } | 3014 | } |
3013 | } | 3015 | } |
3014 | 3016 | ||
3015 | if (cmdbuf->bufsz != 0) | 3017 | drm_buffer_free(cmdbuf->buffer); |
3016 | drm_buffer_free(cmdbuf->buffer); | ||
3017 | 3018 | ||
3019 | done: | ||
3018 | DRM_DEBUG("DONE\n"); | 3020 | DRM_DEBUG("DONE\n"); |
3019 | COMMIT_RING(); | 3021 | COMMIT_RING(); |
3020 | return 0; | 3022 | return 0; |
3021 | 3023 | ||
3022 | err: | 3024 | err: |
3023 | if (cmdbuf->bufsz != 0) | 3025 | drm_buffer_free(cmdbuf->buffer); |
3024 | drm_buffer_free(cmdbuf->buffer); | ||
3025 | return -EINVAL; | 3026 | return -EINVAL; |
3026 | } | 3027 | } |
3027 | 3028 | ||
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index dd47b2a9a791..0e3754a3a303 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
@@ -1716,40 +1716,12 @@ int ttm_bo_wait(struct ttm_buffer_object *bo, | |||
1716 | } | 1716 | } |
1717 | EXPORT_SYMBOL(ttm_bo_wait); | 1717 | EXPORT_SYMBOL(ttm_bo_wait); |
1718 | 1718 | ||
1719 | void ttm_bo_unblock_reservation(struct ttm_buffer_object *bo) | ||
1720 | { | ||
1721 | atomic_set(&bo->reserved, 0); | ||
1722 | wake_up_all(&bo->event_queue); | ||
1723 | } | ||
1724 | |||
1725 | int ttm_bo_block_reservation(struct ttm_buffer_object *bo, bool interruptible, | ||
1726 | bool no_wait) | ||
1727 | { | ||
1728 | int ret; | ||
1729 | |||
1730 | while (unlikely(atomic_cmpxchg(&bo->reserved, 0, 1) != 0)) { | ||
1731 | if (no_wait) | ||
1732 | return -EBUSY; | ||
1733 | else if (interruptible) { | ||
1734 | ret = wait_event_interruptible | ||
1735 | (bo->event_queue, atomic_read(&bo->reserved) == 0); | ||
1736 | if (unlikely(ret != 0)) | ||
1737 | return ret; | ||
1738 | } else { | ||
1739 | wait_event(bo->event_queue, | ||
1740 | atomic_read(&bo->reserved) == 0); | ||
1741 | } | ||
1742 | } | ||
1743 | return 0; | ||
1744 | } | ||
1745 | |||
1746 | int ttm_bo_synccpu_write_grab(struct ttm_buffer_object *bo, bool no_wait) | 1719 | int ttm_bo_synccpu_write_grab(struct ttm_buffer_object *bo, bool no_wait) |
1747 | { | 1720 | { |
1748 | int ret = 0; | 1721 | int ret = 0; |
1749 | 1722 | ||
1750 | /* | 1723 | /* |
1751 | * Using ttm_bo_reserve instead of ttm_bo_block_reservation | 1724 | * Using ttm_bo_reserve makes sure the lru lists are updated. |
1752 | * makes sure the lru lists are updated. | ||
1753 | */ | 1725 | */ |
1754 | 1726 | ||
1755 | ret = ttm_bo_reserve(bo, true, no_wait, false, 0); | 1727 | ret = ttm_bo_reserve(bo, true, no_wait, false, 0); |
diff --git a/drivers/gpu/drm/ttm/ttm_lock.c b/drivers/gpu/drm/ttm/ttm_lock.c index 3d172ef04ee1..de41e55a944a 100644 --- a/drivers/gpu/drm/ttm/ttm_lock.c +++ b/drivers/gpu/drm/ttm/ttm_lock.c | |||
@@ -204,7 +204,6 @@ static int __ttm_vt_unlock(struct ttm_lock *lock) | |||
204 | lock->flags &= ~TTM_VT_LOCK; | 204 | lock->flags &= ~TTM_VT_LOCK; |
205 | wake_up_all(&lock->queue); | 205 | wake_up_all(&lock->queue); |
206 | spin_unlock(&lock->lock); | 206 | spin_unlock(&lock->lock); |
207 | printk(KERN_INFO TTM_PFX "vt unlock.\n"); | ||
208 | 207 | ||
209 | return ret; | 208 | return ret; |
210 | } | 209 | } |
@@ -265,10 +264,8 @@ int ttm_vt_lock(struct ttm_lock *lock, | |||
265 | ttm_lock_type, &ttm_vt_lock_remove, NULL); | 264 | ttm_lock_type, &ttm_vt_lock_remove, NULL); |
266 | if (ret) | 265 | if (ret) |
267 | (void)__ttm_vt_unlock(lock); | 266 | (void)__ttm_vt_unlock(lock); |
268 | else { | 267 | else |
269 | lock->vt_holder = tfile; | 268 | lock->vt_holder = tfile; |
270 | printk(KERN_INFO TTM_PFX "vt lock.\n"); | ||
271 | } | ||
272 | 269 | ||
273 | return ret; | 270 | return ret; |
274 | } | 271 | } |
diff --git a/drivers/hid/hid-cherry.c b/drivers/hid/hid-cherry.c index 7e597d7f770f..24663a8717b1 100644 --- a/drivers/hid/hid-cherry.c +++ b/drivers/hid/hid-cherry.c | |||
@@ -59,6 +59,7 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |||
59 | 59 | ||
60 | static const struct hid_device_id ch_devices[] = { | 60 | static const struct hid_device_id ch_devices[] = { |
61 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION) }, | 61 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION) }, |
62 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) }, | ||
62 | { } | 63 | { } |
63 | }; | 64 | }; |
64 | MODULE_DEVICE_TABLE(hid, ch_devices); | 65 | MODULE_DEVICE_TABLE(hid, ch_devices); |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 2e2aa759d230..143e788b729b 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1043,13 +1043,8 @@ void hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, | |||
1043 | 1043 | ||
1044 | if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event) | 1044 | if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event) |
1045 | hid->hiddev_report_event(hid, report); | 1045 | hid->hiddev_report_event(hid, report); |
1046 | if (hid->claimed & HID_CLAIMED_HIDRAW) { | 1046 | if (hid->claimed & HID_CLAIMED_HIDRAW) |
1047 | /* numbered reports need to be passed with the report num */ | 1047 | hidraw_report_event(hid, data, size); |
1048 | if (report_enum->numbered) | ||
1049 | hidraw_report_event(hid, data - 1, size + 1); | ||
1050 | else | ||
1051 | hidraw_report_event(hid, data, size); | ||
1052 | } | ||
1053 | 1048 | ||
1054 | for (a = 0; a < report->maxfield; a++) | 1049 | for (a = 0; a < report->maxfield; a++) |
1055 | hid_input_field(hid, report->field[a], cdata, interrupt); | 1050 | hid_input_field(hid, report->field[a], cdata, interrupt); |
@@ -1296,6 +1291,7 @@ static const struct hid_device_id hid_blacklist[] = { | |||
1296 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, | 1291 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, |
1297 | { HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) }, | 1292 | { HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) }, |
1298 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION) }, | 1293 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION) }, |
1294 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) }, | ||
1299 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, | 1295 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, |
1300 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) }, | 1296 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) }, |
1301 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) }, | 1297 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) }, |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 797e06470356..09d27649a0f7 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -131,6 +131,7 @@ | |||
131 | 131 | ||
132 | #define USB_VENDOR_ID_CHERRY 0x046a | 132 | #define USB_VENDOR_ID_CHERRY 0x046a |
133 | #define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023 | 133 | #define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023 |
134 | #define USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR 0x0027 | ||
134 | 135 | ||
135 | #define USB_VENDOR_ID_CHIC 0x05fe | 136 | #define USB_VENDOR_ID_CHIC 0x05fe |
136 | #define USB_DEVICE_ID_CHIC_GAMEPAD 0x0014 | 137 | #define USB_DEVICE_ID_CHIC_GAMEPAD 0x0014 |
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c index 9b24fc510712..4777bbfa1cc2 100644 --- a/drivers/hid/hid-ntrig.c +++ b/drivers/hid/hid-ntrig.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * HID driver for N-Trig touchscreens | 2 | * HID driver for N-Trig touchscreens |
3 | * | 3 | * |
4 | * Copyright (c) 2008 Rafi Rubin | 4 | * Copyright (c) 2008-2010 Rafi Rubin |
5 | * Copyright (c) 2009 Stephane Chatty | 5 | * Copyright (c) 2009-2010 Stephane Chatty |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | 8 | ||
@@ -15,6 +15,8 @@ | |||
15 | 15 | ||
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/hid.h> | 17 | #include <linux/hid.h> |
18 | #include <linux/usb.h> | ||
19 | #include "usbhid/usbhid.h" | ||
18 | #include <linux/module.h> | 20 | #include <linux/module.h> |
19 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
20 | 22 | ||
@@ -22,17 +24,16 @@ | |||
22 | 24 | ||
23 | #define NTRIG_DUPLICATE_USAGES 0x001 | 25 | #define NTRIG_DUPLICATE_USAGES 0x001 |
24 | 26 | ||
25 | #define nt_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ | ||
26 | EV_KEY, (c)) | ||
27 | |||
28 | struct ntrig_data { | 27 | struct ntrig_data { |
29 | /* Incoming raw values for a single contact */ | 28 | /* Incoming raw values for a single contact */ |
30 | __u16 x, y, w, h; | 29 | __u16 x, y, w, h; |
31 | __u16 id; | 30 | __u16 id; |
32 | __u8 confidence; | 31 | |
32 | bool tipswitch; | ||
33 | bool confidence; | ||
34 | bool first_contact_touch; | ||
33 | 35 | ||
34 | bool reading_mt; | 36 | bool reading_mt; |
35 | __u8 first_contact_confidence; | ||
36 | 37 | ||
37 | __u8 mt_footer[4]; | 38 | __u8 mt_footer[4]; |
38 | __u8 mt_foot_count; | 39 | __u8 mt_foot_count; |
@@ -139,9 +140,10 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, | |||
139 | case 0xff000001: | 140 | case 0xff000001: |
140 | /* Tag indicating the start of a multitouch group */ | 141 | /* Tag indicating the start of a multitouch group */ |
141 | nd->reading_mt = 1; | 142 | nd->reading_mt = 1; |
142 | nd->first_contact_confidence = 0; | 143 | nd->first_contact_touch = 0; |
143 | break; | 144 | break; |
144 | case HID_DG_TIPSWITCH: | 145 | case HID_DG_TIPSWITCH: |
146 | nd->tipswitch = value; | ||
145 | /* Prevent emission of touch until validated */ | 147 | /* Prevent emission of touch until validated */ |
146 | return 1; | 148 | return 1; |
147 | case HID_DG_CONFIDENCE: | 149 | case HID_DG_CONFIDENCE: |
@@ -169,8 +171,14 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, | |||
169 | * to emit a normal (X, Y) position | 171 | * to emit a normal (X, Y) position |
170 | */ | 172 | */ |
171 | if (!nd->reading_mt) { | 173 | if (!nd->reading_mt) { |
174 | /* | ||
175 | * TipSwitch indicates the presence of a | ||
176 | * finger in single touch mode. | ||
177 | */ | ||
178 | input_report_key(input, BTN_TOUCH, | ||
179 | nd->tipswitch); | ||
172 | input_report_key(input, BTN_TOOL_DOUBLETAP, | 180 | input_report_key(input, BTN_TOOL_DOUBLETAP, |
173 | (nd->confidence != 0)); | 181 | nd->tipswitch); |
174 | input_event(input, EV_ABS, ABS_X, nd->x); | 182 | input_event(input, EV_ABS, ABS_X, nd->x); |
175 | input_event(input, EV_ABS, ABS_Y, nd->y); | 183 | input_event(input, EV_ABS, ABS_Y, nd->y); |
176 | } | 184 | } |
@@ -209,7 +217,13 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, | |||
209 | 217 | ||
210 | /* emit a normal (X, Y) for the first point only */ | 218 | /* emit a normal (X, Y) for the first point only */ |
211 | if (nd->id == 0) { | 219 | if (nd->id == 0) { |
212 | nd->first_contact_confidence = nd->confidence; | 220 | /* |
221 | * TipSwitch is superfluous in multitouch | ||
222 | * mode. The footer events tell us | ||
223 | * if there is a finger on the screen or | ||
224 | * not. | ||
225 | */ | ||
226 | nd->first_contact_touch = nd->confidence; | ||
213 | input_event(input, EV_ABS, ABS_X, nd->x); | 227 | input_event(input, EV_ABS, ABS_X, nd->x); |
214 | input_event(input, EV_ABS, ABS_Y, nd->y); | 228 | input_event(input, EV_ABS, ABS_Y, nd->y); |
215 | } | 229 | } |
@@ -239,30 +253,11 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, | |||
239 | 253 | ||
240 | nd->reading_mt = 0; | 254 | nd->reading_mt = 0; |
241 | 255 | ||
242 | if (nd->first_contact_confidence) { | 256 | if (nd->first_contact_touch) { |
243 | switch (value) { | 257 | input_report_key(input, BTN_TOOL_DOUBLETAP, 1); |
244 | case 0: /* for single touch devices */ | ||
245 | case 1: | ||
246 | input_report_key(input, | ||
247 | BTN_TOOL_DOUBLETAP, 1); | ||
248 | break; | ||
249 | case 2: | ||
250 | input_report_key(input, | ||
251 | BTN_TOOL_TRIPLETAP, 1); | ||
252 | break; | ||
253 | case 3: | ||
254 | default: | ||
255 | input_report_key(input, | ||
256 | BTN_TOOL_QUADTAP, 1); | ||
257 | } | ||
258 | input_report_key(input, BTN_TOUCH, 1); | 258 | input_report_key(input, BTN_TOUCH, 1); |
259 | } else { | 259 | } else { |
260 | input_report_key(input, | 260 | input_report_key(input, BTN_TOOL_DOUBLETAP, 0); |
261 | BTN_TOOL_DOUBLETAP, 0); | ||
262 | input_report_key(input, | ||
263 | BTN_TOOL_TRIPLETAP, 0); | ||
264 | input_report_key(input, | ||
265 | BTN_TOOL_QUADTAP, 0); | ||
266 | input_report_key(input, BTN_TOUCH, 0); | 261 | input_report_key(input, BTN_TOUCH, 0); |
267 | } | 262 | } |
268 | break; | 263 | break; |
@@ -286,6 +281,7 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
286 | struct ntrig_data *nd; | 281 | struct ntrig_data *nd; |
287 | struct hid_input *hidinput; | 282 | struct hid_input *hidinput; |
288 | struct input_dev *input; | 283 | struct input_dev *input; |
284 | struct hid_report *report; | ||
289 | 285 | ||
290 | if (id->driver_data) | 286 | if (id->driver_data) |
291 | hdev->quirks |= HID_QUIRK_MULTI_INPUT; | 287 | hdev->quirks |= HID_QUIRK_MULTI_INPUT; |
@@ -327,13 +323,7 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
327 | __clear_bit(BTN_TOOL_PEN, input->keybit); | 323 | __clear_bit(BTN_TOOL_PEN, input->keybit); |
328 | __clear_bit(BTN_TOOL_FINGER, input->keybit); | 324 | __clear_bit(BTN_TOOL_FINGER, input->keybit); |
329 | __clear_bit(BTN_0, input->keybit); | 325 | __clear_bit(BTN_0, input->keybit); |
330 | /* | ||
331 | * A little something special to enable | ||
332 | * two and three finger taps. | ||
333 | */ | ||
334 | __set_bit(BTN_TOOL_DOUBLETAP, input->keybit); | 326 | __set_bit(BTN_TOOL_DOUBLETAP, input->keybit); |
335 | __set_bit(BTN_TOOL_TRIPLETAP, input->keybit); | ||
336 | __set_bit(BTN_TOOL_QUADTAP, input->keybit); | ||
337 | /* | 327 | /* |
338 | * The physical touchscreen (single touch) | 328 | * The physical touchscreen (single touch) |
339 | * input has a value for physical, whereas | 329 | * input has a value for physical, whereas |
@@ -349,6 +339,12 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
349 | } | 339 | } |
350 | } | 340 | } |
351 | 341 | ||
342 | /* This is needed for devices with more recent firmware versions */ | ||
343 | report = hdev->report_enum[HID_FEATURE_REPORT].report_id_hash[0x0a]; | ||
344 | if (report) | ||
345 | usbhid_submit_report(hdev, report, USB_DIR_OUT); | ||
346 | |||
347 | |||
352 | return 0; | 348 | return 0; |
353 | err_free: | 349 | err_free: |
354 | kfree(nd); | 350 | kfree(nd); |
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 7502a4b2fa86..402d5574b574 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c | |||
@@ -76,7 +76,7 @@ static int sony_set_operational_usb(struct hid_device *hdev) | |||
76 | 76 | ||
77 | static int sony_set_operational_bt(struct hid_device *hdev) | 77 | static int sony_set_operational_bt(struct hid_device *hdev) |
78 | { | 78 | { |
79 | unsigned char buf[] = { 0x53, 0xf4, 0x42, 0x03, 0x00, 0x00 }; | 79 | unsigned char buf[] = { 0xf4, 0x42, 0x03, 0x00, 0x00 }; |
80 | return hdev->hid_output_raw_report(hdev, buf, sizeof(buf), HID_FEATURE_REPORT); | 80 | return hdev->hid_output_raw_report(hdev, buf, sizeof(buf), HID_FEATURE_REPORT); |
81 | } | 81 | } |
82 | 82 | ||
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c index f7700cf49721..f947d8337e21 100644 --- a/drivers/hid/hid-wacom.c +++ b/drivers/hid/hid-wacom.c | |||
@@ -277,7 +277,6 @@ static int __init wacom_init(void) | |||
277 | ret = hid_register_driver(&wacom_driver); | 277 | ret = hid_register_driver(&wacom_driver); |
278 | if (ret) | 278 | if (ret) |
279 | printk(KERN_ERR "can't register wacom driver\n"); | 279 | printk(KERN_ERR "can't register wacom driver\n"); |
280 | printk(KERN_ERR "wacom driver registered\n"); | ||
281 | return ret; | 280 | return ret; |
282 | } | 281 | } |
283 | 282 | ||
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 56d06cd8075b..7b85b696fdab 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -999,13 +999,6 @@ static int usbhid_start(struct hid_device *hid) | |||
999 | } | 999 | } |
1000 | } | 1000 | } |
1001 | 1001 | ||
1002 | init_waitqueue_head(&usbhid->wait); | ||
1003 | INIT_WORK(&usbhid->reset_work, hid_reset); | ||
1004 | INIT_WORK(&usbhid->restart_work, __usbhid_restart_queues); | ||
1005 | setup_timer(&usbhid->io_retry, hid_retry_timeout, (unsigned long) hid); | ||
1006 | |||
1007 | spin_lock_init(&usbhid->lock); | ||
1008 | |||
1009 | usbhid->urbctrl = usb_alloc_urb(0, GFP_KERNEL); | 1002 | usbhid->urbctrl = usb_alloc_urb(0, GFP_KERNEL); |
1010 | if (!usbhid->urbctrl) { | 1003 | if (!usbhid->urbctrl) { |
1011 | ret = -ENOMEM; | 1004 | ret = -ENOMEM; |
@@ -1179,6 +1172,12 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id * | |||
1179 | usbhid->intf = intf; | 1172 | usbhid->intf = intf; |
1180 | usbhid->ifnum = interface->desc.bInterfaceNumber; | 1173 | usbhid->ifnum = interface->desc.bInterfaceNumber; |
1181 | 1174 | ||
1175 | init_waitqueue_head(&usbhid->wait); | ||
1176 | INIT_WORK(&usbhid->reset_work, hid_reset); | ||
1177 | INIT_WORK(&usbhid->restart_work, __usbhid_restart_queues); | ||
1178 | setup_timer(&usbhid->io_retry, hid_retry_timeout, (unsigned long) hid); | ||
1179 | spin_lock_init(&usbhid->lock); | ||
1180 | |||
1182 | ret = hid_add_device(hid); | 1181 | ret = hid_add_device(hid); |
1183 | if (ret) { | 1182 | if (ret) { |
1184 | if (ret != -ENODEV) | 1183 | if (ret != -ENODEV) |
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c index 0f28d91f29d8..f085c18d2905 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c | |||
@@ -195,6 +195,9 @@ static unsigned int applesmc_accelerometer; | |||
195 | /* Indicates whether this computer has light sensors and keyboard backlight. */ | 195 | /* Indicates whether this computer has light sensors and keyboard backlight. */ |
196 | static unsigned int applesmc_light; | 196 | static unsigned int applesmc_light; |
197 | 197 | ||
198 | /* The number of fans handled by the driver */ | ||
199 | static unsigned int fans_handled; | ||
200 | |||
198 | /* Indicates which temperature sensors set to use. */ | 201 | /* Indicates which temperature sensors set to use. */ |
199 | static unsigned int applesmc_temperature_set; | 202 | static unsigned int applesmc_temperature_set; |
200 | 203 | ||
@@ -1492,39 +1495,24 @@ static int __init applesmc_init(void) | |||
1492 | 1495 | ||
1493 | /* create fan files */ | 1496 | /* create fan files */ |
1494 | count = applesmc_get_fan_count(); | 1497 | count = applesmc_get_fan_count(); |
1495 | if (count < 0) { | 1498 | if (count < 0) |
1496 | printk(KERN_ERR "applesmc: Cannot get the number of fans.\n"); | 1499 | printk(KERN_ERR "applesmc: Cannot get the number of fans.\n"); |
1497 | } else { | 1500 | else |
1498 | printk(KERN_INFO "applesmc: %d fans found.\n", count); | 1501 | printk(KERN_INFO "applesmc: %d fans found.\n", count); |
1499 | 1502 | ||
1500 | switch (count) { | 1503 | if (count > 4) { |
1501 | default: | 1504 | count = 4; |
1502 | printk(KERN_WARNING "applesmc: More than 4 fans found," | 1505 | printk(KERN_WARNING "applesmc: More than 4 fans found," |
1503 | " but at most 4 fans are supported" | 1506 | " but at most 4 fans are supported" |
1504 | " by the driver.\n"); | 1507 | " by the driver.\n"); |
1505 | case 4: | 1508 | } |
1506 | ret = sysfs_create_group(&pdev->dev.kobj, | 1509 | |
1507 | &fan_attribute_groups[3]); | 1510 | while (fans_handled < count) { |
1508 | if (ret) | 1511 | ret = sysfs_create_group(&pdev->dev.kobj, |
1509 | goto out_key_enumeration; | 1512 | &fan_attribute_groups[fans_handled]); |
1510 | case 3: | 1513 | if (ret) |
1511 | ret = sysfs_create_group(&pdev->dev.kobj, | 1514 | goto out_fans; |
1512 | &fan_attribute_groups[2]); | 1515 | fans_handled++; |
1513 | if (ret) | ||
1514 | goto out_key_enumeration; | ||
1515 | case 2: | ||
1516 | ret = sysfs_create_group(&pdev->dev.kobj, | ||
1517 | &fan_attribute_groups[1]); | ||
1518 | if (ret) | ||
1519 | goto out_key_enumeration; | ||
1520 | case 1: | ||
1521 | ret = sysfs_create_group(&pdev->dev.kobj, | ||
1522 | &fan_attribute_groups[0]); | ||
1523 | if (ret) | ||
1524 | goto out_fan_1; | ||
1525 | case 0: | ||
1526 | ; | ||
1527 | } | ||
1528 | } | 1516 | } |
1529 | 1517 | ||
1530 | for (i = 0; | 1518 | for (i = 0; |
@@ -1593,10 +1581,10 @@ out_accelerometer: | |||
1593 | applesmc_release_accelerometer(); | 1581 | applesmc_release_accelerometer(); |
1594 | out_temperature: | 1582 | out_temperature: |
1595 | sysfs_remove_group(&pdev->dev.kobj, &temperature_attributes_group); | 1583 | sysfs_remove_group(&pdev->dev.kobj, &temperature_attributes_group); |
1596 | sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[0]); | 1584 | out_fans: |
1597 | out_fan_1: | 1585 | while (fans_handled) |
1598 | sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[1]); | 1586 | sysfs_remove_group(&pdev->dev.kobj, |
1599 | out_key_enumeration: | 1587 | &fan_attribute_groups[--fans_handled]); |
1600 | sysfs_remove_group(&pdev->dev.kobj, &key_enumeration_group); | 1588 | sysfs_remove_group(&pdev->dev.kobj, &key_enumeration_group); |
1601 | out_name: | 1589 | out_name: |
1602 | sysfs_remove_file(&pdev->dev.kobj, &dev_attr_name.attr); | 1590 | sysfs_remove_file(&pdev->dev.kobj, &dev_attr_name.attr); |
@@ -1622,8 +1610,9 @@ static void __exit applesmc_exit(void) | |||
1622 | if (applesmc_accelerometer) | 1610 | if (applesmc_accelerometer) |
1623 | applesmc_release_accelerometer(); | 1611 | applesmc_release_accelerometer(); |
1624 | sysfs_remove_group(&pdev->dev.kobj, &temperature_attributes_group); | 1612 | sysfs_remove_group(&pdev->dev.kobj, &temperature_attributes_group); |
1625 | sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[0]); | 1613 | while (fans_handled) |
1626 | sysfs_remove_group(&pdev->dev.kobj, &fan_attribute_groups[1]); | 1614 | sysfs_remove_group(&pdev->dev.kobj, |
1615 | &fan_attribute_groups[--fans_handled]); | ||
1627 | sysfs_remove_group(&pdev->dev.kobj, &key_enumeration_group); | 1616 | sysfs_remove_group(&pdev->dev.kobj, &key_enumeration_group); |
1628 | sysfs_remove_file(&pdev->dev.kobj, &dev_attr_name.attr); | 1617 | sysfs_remove_file(&pdev->dev.kobj, &dev_attr_name.attr); |
1629 | platform_device_unregister(pdev); | 1618 | platform_device_unregister(pdev); |
diff --git a/drivers/hwmon/asc7621.c b/drivers/hwmon/asc7621.c index 7f948105d8ad..0f388adc6187 100644 --- a/drivers/hwmon/asc7621.c +++ b/drivers/hwmon/asc7621.c | |||
@@ -268,8 +268,11 @@ static ssize_t store_fan16(struct device *dev, | |||
268 | if (strict_strtol(buf, 10, &reqval)) | 268 | if (strict_strtol(buf, 10, &reqval)) |
269 | return -EINVAL; | 269 | return -EINVAL; |
270 | 270 | ||
271 | /* If a minimum RPM of zero is requested, then we set the register to | ||
272 | 0xffff. This value allows the fan to be stopped completely without | ||
273 | generating an alarm. */ | ||
271 | reqval = | 274 | reqval = |
272 | (SENSORS_LIMIT((reqval) <= 0 ? 0 : 5400000 / (reqval), 0, 65534)); | 275 | (reqval <= 0 ? 0xffff : SENSORS_LIMIT(5400000 / reqval, 0, 0xfffe)); |
273 | 276 | ||
274 | mutex_lock(&data->update_lock); | 277 | mutex_lock(&data->update_lock); |
275 | data->reg[param->msb[0]] = (reqval >> 8) & 0xff; | 278 | data->reg[param->msb[0]] = (reqval >> 8) & 0xff; |
@@ -285,8 +288,9 @@ static ssize_t store_fan16(struct device *dev, | |||
285 | * Voltages are scaled in the device so that the nominal voltage | 288 | * Voltages are scaled in the device so that the nominal voltage |
286 | * is 3/4ths of the 0-255 range (i.e. 192). | 289 | * is 3/4ths of the 0-255 range (i.e. 192). |
287 | * If all voltages are 'normal' then all voltage registers will | 290 | * If all voltages are 'normal' then all voltage registers will |
288 | * read 0xC0. This doesn't help us if we don't have a point of refernce. | 291 | * read 0xC0. |
289 | * The data sheet however provides us with the full scale value for each | 292 | * |
293 | * The data sheet provides us with the 3/4 scale value for each voltage | ||
290 | * which is stored in in_scaling. The sda->index parameter value provides | 294 | * which is stored in in_scaling. The sda->index parameter value provides |
291 | * the index into in_scaling. | 295 | * the index into in_scaling. |
292 | * | 296 | * |
@@ -295,7 +299,7 @@ static ssize_t store_fan16(struct device *dev, | |||
295 | */ | 299 | */ |
296 | 300 | ||
297 | static int asc7621_in_scaling[] = { | 301 | static int asc7621_in_scaling[] = { |
298 | 3320, 3000, 4380, 6640, 16000 | 302 | 2500, 2250, 3300, 5000, 12000 |
299 | }; | 303 | }; |
300 | 304 | ||
301 | static ssize_t show_in10(struct device *dev, struct device_attribute *attr, | 305 | static ssize_t show_in10(struct device *dev, struct device_attribute *attr, |
@@ -306,19 +310,12 @@ static ssize_t show_in10(struct device *dev, struct device_attribute *attr, | |||
306 | u8 nr = sda->index; | 310 | u8 nr = sda->index; |
307 | 311 | ||
308 | mutex_lock(&data->update_lock); | 312 | mutex_lock(&data->update_lock); |
309 | regval = (data->reg[param->msb[0]] * asc7621_in_scaling[nr]) / 256; | 313 | regval = (data->reg[param->msb[0]] << 8) | (data->reg[param->lsb[0]]); |
310 | |||
311 | /* The LSB value is a 2-bit scaling of the MSB's LSbit value. | ||
312 | * I.E. If the maximim voltage for this input is 6640 millivolts then | ||
313 | * a MSB register value of 0 = 0mv and 255 = 6640mv. | ||
314 | * A 1 step change therefore represents 25.9mv (6640 / 256). | ||
315 | * The extra 2-bits therefore represent increments of 6.48mv. | ||
316 | */ | ||
317 | regval += ((asc7621_in_scaling[nr] / 256) / 4) * | ||
318 | (data->reg[param->lsb[0]] >> 6); | ||
319 | |||
320 | mutex_unlock(&data->update_lock); | 314 | mutex_unlock(&data->update_lock); |
321 | 315 | ||
316 | /* The LSB value is a 2-bit scaling of the MSB's LSbit value. */ | ||
317 | regval = (regval >> 6) * asc7621_in_scaling[nr] / (0xc0 << 2); | ||
318 | |||
322 | return sprintf(buf, "%u\n", regval); | 319 | return sprintf(buf, "%u\n", regval); |
323 | } | 320 | } |
324 | 321 | ||
@@ -331,7 +328,7 @@ static ssize_t show_in8(struct device *dev, struct device_attribute *attr, | |||
331 | 328 | ||
332 | return sprintf(buf, "%u\n", | 329 | return sprintf(buf, "%u\n", |
333 | ((data->reg[param->msb[0]] * | 330 | ((data->reg[param->msb[0]] * |
334 | asc7621_in_scaling[nr]) / 256)); | 331 | asc7621_in_scaling[nr]) / 0xc0)); |
335 | } | 332 | } |
336 | 333 | ||
337 | static ssize_t store_in8(struct device *dev, struct device_attribute *attr, | 334 | static ssize_t store_in8(struct device *dev, struct device_attribute *attr, |
@@ -344,9 +341,11 @@ static ssize_t store_in8(struct device *dev, struct device_attribute *attr, | |||
344 | if (strict_strtol(buf, 10, &reqval)) | 341 | if (strict_strtol(buf, 10, &reqval)) |
345 | return -EINVAL; | 342 | return -EINVAL; |
346 | 343 | ||
347 | reqval = SENSORS_LIMIT(reqval, 0, asc7621_in_scaling[nr]); | 344 | reqval = SENSORS_LIMIT(reqval, 0, 0xffff); |
345 | |||
346 | reqval = reqval * 0xc0 / asc7621_in_scaling[nr]; | ||
348 | 347 | ||
349 | reqval = (reqval * 255 + 128) / asc7621_in_scaling[nr]; | 348 | reqval = SENSORS_LIMIT(reqval, 0, 0xff); |
350 | 349 | ||
351 | mutex_lock(&data->update_lock); | 350 | mutex_lock(&data->update_lock); |
352 | data->reg[param->msb[0]] = reqval; | 351 | data->reg[param->msb[0]] = reqval; |
@@ -846,11 +845,11 @@ static struct asc7621_param asc7621_params[] = { | |||
846 | PWRITE(in3_max, 3, PRI_LOW, 0x4b, 0, 0, 0, in8), | 845 | PWRITE(in3_max, 3, PRI_LOW, 0x4b, 0, 0, 0, in8), |
847 | PWRITE(in4_max, 4, PRI_LOW, 0x4d, 0, 0, 0, in8), | 846 | PWRITE(in4_max, 4, PRI_LOW, 0x4d, 0, 0, 0, in8), |
848 | 847 | ||
849 | PREAD(in0_alarm, 0, PRI_LOW, 0x41, 0, 0x01, 0, bitmask), | 848 | PREAD(in0_alarm, 0, PRI_HIGH, 0x41, 0, 0x01, 0, bitmask), |
850 | PREAD(in1_alarm, 1, PRI_LOW, 0x41, 0, 0x01, 1, bitmask), | 849 | PREAD(in1_alarm, 1, PRI_HIGH, 0x41, 0, 0x01, 1, bitmask), |
851 | PREAD(in2_alarm, 2, PRI_LOW, 0x41, 0, 0x01, 2, bitmask), | 850 | PREAD(in2_alarm, 2, PRI_HIGH, 0x41, 0, 0x01, 2, bitmask), |
852 | PREAD(in3_alarm, 3, PRI_LOW, 0x41, 0, 0x01, 3, bitmask), | 851 | PREAD(in3_alarm, 3, PRI_HIGH, 0x41, 0, 0x01, 3, bitmask), |
853 | PREAD(in4_alarm, 4, PRI_LOW, 0x42, 0, 0x01, 0, bitmask), | 852 | PREAD(in4_alarm, 4, PRI_HIGH, 0x42, 0, 0x01, 0, bitmask), |
854 | 853 | ||
855 | PREAD(fan1_input, 0, PRI_HIGH, 0x29, 0x28, 0, 0, fan16), | 854 | PREAD(fan1_input, 0, PRI_HIGH, 0x29, 0x28, 0, 0, fan16), |
856 | PREAD(fan2_input, 1, PRI_HIGH, 0x2b, 0x2a, 0, 0, fan16), | 855 | PREAD(fan2_input, 1, PRI_HIGH, 0x2b, 0x2a, 0, 0, fan16), |
@@ -862,10 +861,10 @@ static struct asc7621_param asc7621_params[] = { | |||
862 | PWRITE(fan3_min, 2, PRI_LOW, 0x59, 0x58, 0, 0, fan16), | 861 | PWRITE(fan3_min, 2, PRI_LOW, 0x59, 0x58, 0, 0, fan16), |
863 | PWRITE(fan4_min, 3, PRI_LOW, 0x5b, 0x5a, 0, 0, fan16), | 862 | PWRITE(fan4_min, 3, PRI_LOW, 0x5b, 0x5a, 0, 0, fan16), |
864 | 863 | ||
865 | PREAD(fan1_alarm, 0, PRI_LOW, 0x42, 0, 0x01, 0, bitmask), | 864 | PREAD(fan1_alarm, 0, PRI_HIGH, 0x42, 0, 0x01, 2, bitmask), |
866 | PREAD(fan2_alarm, 1, PRI_LOW, 0x42, 0, 0x01, 1, bitmask), | 865 | PREAD(fan2_alarm, 1, PRI_HIGH, 0x42, 0, 0x01, 3, bitmask), |
867 | PREAD(fan3_alarm, 2, PRI_LOW, 0x42, 0, 0x01, 2, bitmask), | 866 | PREAD(fan3_alarm, 2, PRI_HIGH, 0x42, 0, 0x01, 4, bitmask), |
868 | PREAD(fan4_alarm, 3, PRI_LOW, 0x42, 0, 0x01, 3, bitmask), | 867 | PREAD(fan4_alarm, 3, PRI_HIGH, 0x42, 0, 0x01, 5, bitmask), |
869 | 868 | ||
870 | PREAD(temp1_input, 0, PRI_HIGH, 0x25, 0x10, 0, 0, temp10), | 869 | PREAD(temp1_input, 0, PRI_HIGH, 0x25, 0x10, 0, 0, temp10), |
871 | PREAD(temp2_input, 1, PRI_HIGH, 0x26, 0x15, 0, 0, temp10), | 870 | PREAD(temp2_input, 1, PRI_HIGH, 0x26, 0x15, 0, 0, temp10), |
@@ -886,10 +885,10 @@ static struct asc7621_param asc7621_params[] = { | |||
886 | PWRITE(temp3_max, 2, PRI_LOW, 0x53, 0, 0, 0, temp8), | 885 | PWRITE(temp3_max, 2, PRI_LOW, 0x53, 0, 0, 0, temp8), |
887 | PWRITE(temp4_max, 3, PRI_LOW, 0x35, 0, 0, 0, temp8), | 886 | PWRITE(temp4_max, 3, PRI_LOW, 0x35, 0, 0, 0, temp8), |
888 | 887 | ||
889 | PREAD(temp1_alarm, 0, PRI_LOW, 0x41, 0, 0x01, 4, bitmask), | 888 | PREAD(temp1_alarm, 0, PRI_HIGH, 0x41, 0, 0x01, 4, bitmask), |
890 | PREAD(temp2_alarm, 1, PRI_LOW, 0x41, 0, 0x01, 5, bitmask), | 889 | PREAD(temp2_alarm, 1, PRI_HIGH, 0x41, 0, 0x01, 5, bitmask), |
891 | PREAD(temp3_alarm, 2, PRI_LOW, 0x41, 0, 0x01, 6, bitmask), | 890 | PREAD(temp3_alarm, 2, PRI_HIGH, 0x41, 0, 0x01, 6, bitmask), |
892 | PREAD(temp4_alarm, 3, PRI_LOW, 0x43, 0, 0x01, 0, bitmask), | 891 | PREAD(temp4_alarm, 3, PRI_HIGH, 0x43, 0, 0x01, 0, bitmask), |
893 | 892 | ||
894 | PWRITE(temp1_source, 0, PRI_LOW, 0x02, 0, 0x07, 4, bitmask), | 893 | PWRITE(temp1_source, 0, PRI_LOW, 0x02, 0, 0x07, 4, bitmask), |
895 | PWRITE(temp2_source, 1, PRI_LOW, 0x02, 0, 0x07, 0, bitmask), | 894 | PWRITE(temp2_source, 1, PRI_LOW, 0x02, 0, 0x07, 0, bitmask), |
@@ -898,7 +897,7 @@ static struct asc7621_param asc7621_params[] = { | |||
898 | 897 | ||
899 | PWRITE(temp1_smoothing_enable, 0, PRI_LOW, 0x62, 0, 0x01, 3, bitmask), | 898 | PWRITE(temp1_smoothing_enable, 0, PRI_LOW, 0x62, 0, 0x01, 3, bitmask), |
900 | PWRITE(temp2_smoothing_enable, 1, PRI_LOW, 0x63, 0, 0x01, 7, bitmask), | 899 | PWRITE(temp2_smoothing_enable, 1, PRI_LOW, 0x63, 0, 0x01, 7, bitmask), |
901 | PWRITE(temp3_smoothing_enable, 2, PRI_LOW, 0x64, 0, 0x01, 3, bitmask), | 900 | PWRITE(temp3_smoothing_enable, 2, PRI_LOW, 0x63, 0, 0x01, 3, bitmask), |
902 | PWRITE(temp4_smoothing_enable, 3, PRI_LOW, 0x3c, 0, 0x01, 3, bitmask), | 901 | PWRITE(temp4_smoothing_enable, 3, PRI_LOW, 0x3c, 0, 0x01, 3, bitmask), |
903 | 902 | ||
904 | PWRITE(temp1_smoothing_time, 0, PRI_LOW, 0x62, 0, 0x07, 0, temp_st), | 903 | PWRITE(temp1_smoothing_time, 0, PRI_LOW, 0x62, 0, 0x07, 0, temp_st), |
diff --git a/drivers/hwmon/hp_accel.c b/drivers/hwmon/hp_accel.c index c8ab50516672..7580f55e67e3 100644 --- a/drivers/hwmon/hp_accel.c +++ b/drivers/hwmon/hp_accel.c | |||
@@ -328,8 +328,8 @@ static int lis3lv02d_remove(struct acpi_device *device, int type) | |||
328 | lis3lv02d_joystick_disable(); | 328 | lis3lv02d_joystick_disable(); |
329 | lis3lv02d_poweroff(&lis3_dev); | 329 | lis3lv02d_poweroff(&lis3_dev); |
330 | 330 | ||
331 | flush_work(&hpled_led.work); | ||
332 | led_classdev_unregister(&hpled_led.led_classdev); | 331 | led_classdev_unregister(&hpled_led.led_classdev); |
332 | flush_work(&hpled_led.work); | ||
333 | 333 | ||
334 | return lis3lv02d_remove_fs(&lis3_dev); | 334 | return lis3lv02d_remove_fs(&lis3_dev); |
335 | } | 335 | } |
diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c index b1edd778639c..405febd94f24 100644 --- a/drivers/input/joystick/iforce/iforce-main.c +++ b/drivers/input/joystick/iforce/iforce-main.c | |||
@@ -54,6 +54,9 @@ static signed short btn_avb_wheel[] = | |||
54 | static signed short abs_joystick[] = | 54 | static signed short abs_joystick[] = |
55 | { ABS_X, ABS_Y, ABS_THROTTLE, ABS_HAT0X, ABS_HAT0Y, -1 }; | 55 | { ABS_X, ABS_Y, ABS_THROTTLE, ABS_HAT0X, ABS_HAT0Y, -1 }; |
56 | 56 | ||
57 | static signed short abs_joystick_rudder[] = | ||
58 | { ABS_X, ABS_Y, ABS_THROTTLE, ABS_RUDDER, ABS_HAT0X, ABS_HAT0Y, -1 }; | ||
59 | |||
57 | static signed short abs_avb_pegasus[] = | 60 | static signed short abs_avb_pegasus[] = |
58 | { ABS_X, ABS_Y, ABS_THROTTLE, ABS_RUDDER, ABS_HAT0X, ABS_HAT0Y, | 61 | { ABS_X, ABS_Y, ABS_THROTTLE, ABS_RUDDER, ABS_HAT0X, ABS_HAT0Y, |
59 | ABS_HAT1X, ABS_HAT1Y, -1 }; | 62 | ABS_HAT1X, ABS_HAT1Y, -1 }; |
@@ -76,8 +79,9 @@ static struct iforce_device iforce_device[] = { | |||
76 | { 0x061c, 0xc0a4, "ACT LABS Force RS", btn_wheel, abs_wheel, ff_iforce }, //? | 79 | { 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 }, | 80 | { 0x061c, 0xc084, "ACT LABS Force RS", btn_wheel, abs_wheel, ff_iforce }, |
78 | { 0x06f8, 0x0001, "Guillemot Race Leader Force Feedback", btn_wheel, abs_wheel, ff_iforce }, //? | 81 | { 0x06f8, 0x0001, "Guillemot Race Leader Force Feedback", btn_wheel, abs_wheel, ff_iforce }, //? |
82 | { 0x06f8, 0x0001, "Guillemot Jet Leader Force Feedback", btn_joystick, abs_joystick_rudder, ff_iforce }, | ||
79 | { 0x06f8, 0x0004, "Guillemot Force Feedback Racing Wheel", btn_wheel, abs_wheel, ff_iforce }, //? | 83 | { 0x06f8, 0x0004, "Guillemot Force Feedback Racing Wheel", btn_wheel, abs_wheel, ff_iforce }, //? |
80 | { 0x06f8, 0x0004, "Gullemot Jet Leader 3D", btn_joystick, abs_joystick, ff_iforce }, //? | 84 | { 0x06f8, 0xa302, "Guillemot Jet Leader 3D", btn_joystick, abs_joystick, ff_iforce }, //? |
81 | { 0x06d6, 0x29bc, "Trust Force Feedback Race Master", btn_wheel, abs_wheel, ff_iforce }, | 85 | { 0x06d6, 0x29bc, "Trust Force Feedback Race Master", btn_wheel, abs_wheel, ff_iforce }, |
82 | { 0x0000, 0x0000, "Unknown I-Force Device [%04x:%04x]", btn_joystick, abs_joystick, ff_iforce } | 86 | { 0x0000, 0x0000, "Unknown I-Force Device [%04x:%04x]", btn_joystick, abs_joystick, ff_iforce } |
83 | }; | 87 | }; |
diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index b41303d3ec54..6c96631ae5d9 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c | |||
@@ -212,6 +212,7 @@ static struct usb_device_id iforce_usb_ids [] = { | |||
212 | { USB_DEVICE(0x061c, 0xc0a4) }, /* ACT LABS Force RS */ | 212 | { USB_DEVICE(0x061c, 0xc0a4) }, /* ACT LABS Force RS */ |
213 | { USB_DEVICE(0x061c, 0xc084) }, /* ACT LABS Force RS */ | 213 | { USB_DEVICE(0x061c, 0xc084) }, /* ACT LABS Force RS */ |
214 | { USB_DEVICE(0x06f8, 0x0001) }, /* Guillemot Race Leader Force Feedback */ | 214 | { USB_DEVICE(0x06f8, 0x0001) }, /* Guillemot Race Leader Force Feedback */ |
215 | { USB_DEVICE(0x06f8, 0x0003) }, /* Guillemot Jet Leader Force Feedback */ | ||
215 | { USB_DEVICE(0x06f8, 0x0004) }, /* Guillemot Force Feedback Racing Wheel */ | 216 | { USB_DEVICE(0x06f8, 0x0004) }, /* Guillemot Force Feedback Racing Wheel */ |
216 | { USB_DEVICE(0x06f8, 0xa302) }, /* Guillemot Jet Leader 3D */ | 217 | { USB_DEVICE(0x06f8, 0xa302) }, /* Guillemot Jet Leader 3D */ |
217 | { } /* Terminating entry */ | 218 | { } /* Terminating entry */ |
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 0520c2e19927..112b4ee52ff2 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
@@ -185,7 +185,7 @@ static void elantech_report_absolute_v1(struct psmouse *psmouse) | |||
185 | int fingers; | 185 | int fingers; |
186 | static int old_fingers; | 186 | static int old_fingers; |
187 | 187 | ||
188 | if (etd->fw_version_maj == 0x01) { | 188 | if (etd->fw_version < 0x020000) { |
189 | /* | 189 | /* |
190 | * byte 0: D U p1 p2 1 p3 R L | 190 | * byte 0: D U p1 p2 1 p3 R L |
191 | * byte 1: f 0 th tw x9 x8 y9 y8 | 191 | * byte 1: f 0 th tw x9 x8 y9 y8 |
@@ -227,7 +227,7 @@ static void elantech_report_absolute_v1(struct psmouse *psmouse) | |||
227 | input_report_key(dev, BTN_LEFT, packet[0] & 0x01); | 227 | input_report_key(dev, BTN_LEFT, packet[0] & 0x01); |
228 | input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); | 228 | input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); |
229 | 229 | ||
230 | if ((etd->fw_version_maj == 0x01) && | 230 | if (etd->fw_version < 0x020000 && |
231 | (etd->capabilities & ETP_CAP_HAS_ROCKER)) { | 231 | (etd->capabilities & ETP_CAP_HAS_ROCKER)) { |
232 | /* rocker up */ | 232 | /* rocker up */ |
233 | input_report_key(dev, BTN_FORWARD, packet[0] & 0x40); | 233 | input_report_key(dev, BTN_FORWARD, packet[0] & 0x40); |
@@ -321,7 +321,7 @@ static int elantech_check_parity_v1(struct psmouse *psmouse) | |||
321 | unsigned char p1, p2, p3; | 321 | unsigned char p1, p2, p3; |
322 | 322 | ||
323 | /* Parity bits are placed differently */ | 323 | /* Parity bits are placed differently */ |
324 | if (etd->fw_version_maj == 0x01) { | 324 | if (etd->fw_version < 0x020000) { |
325 | /* byte 0: D U p1 p2 1 p3 R L */ | 325 | /* byte 0: D U p1 p2 1 p3 R L */ |
326 | p1 = (packet[0] & 0x20) >> 5; | 326 | p1 = (packet[0] & 0x20) >> 5; |
327 | p2 = (packet[0] & 0x10) >> 4; | 327 | p2 = (packet[0] & 0x10) >> 4; |
@@ -457,7 +457,7 @@ static void elantech_set_input_params(struct psmouse *psmouse) | |||
457 | switch (etd->hw_version) { | 457 | switch (etd->hw_version) { |
458 | case 1: | 458 | case 1: |
459 | /* Rocker button */ | 459 | /* Rocker button */ |
460 | if ((etd->fw_version_maj == 0x01) && | 460 | if (etd->fw_version < 0x020000 && |
461 | (etd->capabilities & ETP_CAP_HAS_ROCKER)) { | 461 | (etd->capabilities & ETP_CAP_HAS_ROCKER)) { |
462 | __set_bit(BTN_FORWARD, dev->keybit); | 462 | __set_bit(BTN_FORWARD, dev->keybit); |
463 | __set_bit(BTN_BACK, dev->keybit); | 463 | __set_bit(BTN_BACK, dev->keybit); |
@@ -686,15 +686,14 @@ int elantech_init(struct psmouse *psmouse) | |||
686 | pr_err("elantech.c: failed to query firmware version.\n"); | 686 | pr_err("elantech.c: failed to query firmware version.\n"); |
687 | goto init_fail; | 687 | goto init_fail; |
688 | } | 688 | } |
689 | etd->fw_version_maj = param[0]; | 689 | |
690 | etd->fw_version_min = param[2]; | 690 | etd->fw_version = (param[0] << 16) | (param[1] << 8) | param[2]; |
691 | 691 | ||
692 | /* | 692 | /* |
693 | * Assume every version greater than this is new EeePC style | 693 | * Assume every version greater than this is new EeePC style |
694 | * hardware with 6 byte packets | 694 | * hardware with 6 byte packets |
695 | */ | 695 | */ |
696 | if ((etd->fw_version_maj == 0x02 && etd->fw_version_min >= 0x30) || | 696 | if (etd->fw_version >= 0x020030) { |
697 | etd->fw_version_maj > 0x02) { | ||
698 | etd->hw_version = 2; | 697 | etd->hw_version = 2; |
699 | /* For now show extra debug information */ | 698 | /* For now show extra debug information */ |
700 | etd->debug = 1; | 699 | etd->debug = 1; |
@@ -704,8 +703,9 @@ int elantech_init(struct psmouse *psmouse) | |||
704 | etd->hw_version = 1; | 703 | etd->hw_version = 1; |
705 | etd->paritycheck = 1; | 704 | etd->paritycheck = 1; |
706 | } | 705 | } |
707 | pr_info("elantech.c: assuming hardware version %d, firmware version %d.%d\n", | 706 | |
708 | etd->hw_version, etd->fw_version_maj, etd->fw_version_min); | 707 | pr_info("elantech.c: assuming hardware version %d, firmware version %d.%d.%d\n", |
708 | etd->hw_version, param[0], param[1], param[2]); | ||
709 | 709 | ||
710 | if (synaptics_send_cmd(psmouse, ETP_CAPABILITIES_QUERY, param)) { | 710 | if (synaptics_send_cmd(psmouse, ETP_CAPABILITIES_QUERY, param)) { |
711 | pr_err("elantech.c: failed to query capabilities.\n"); | 711 | pr_err("elantech.c: failed to query capabilities.\n"); |
@@ -720,8 +720,8 @@ int elantech_init(struct psmouse *psmouse) | |||
720 | * a touch action starts causing the mouse cursor or scrolled page | 720 | * a touch action starts causing the mouse cursor or scrolled page |
721 | * to jump. Enable a workaround. | 721 | * to jump. Enable a workaround. |
722 | */ | 722 | */ |
723 | if (etd->fw_version_maj == 0x02 && etd->fw_version_min == 0x22) { | 723 | if (etd->fw_version == 0x020022) { |
724 | pr_info("elantech.c: firmware version 2.34 detected, " | 724 | pr_info("elantech.c: firmware version 2.0.34 detected, " |
725 | "enabling jumpy cursor workaround\n"); | 725 | "enabling jumpy cursor workaround\n"); |
726 | etd->jumpy_cursor = 1; | 726 | etd->jumpy_cursor = 1; |
727 | } | 727 | } |
diff --git a/drivers/input/mouse/elantech.h b/drivers/input/mouse/elantech.h index feac5f7af966..ac57bde1bb9f 100644 --- a/drivers/input/mouse/elantech.h +++ b/drivers/input/mouse/elantech.h | |||
@@ -100,11 +100,10 @@ struct elantech_data { | |||
100 | unsigned char reg_26; | 100 | unsigned char reg_26; |
101 | unsigned char debug; | 101 | unsigned char debug; |
102 | unsigned char capabilities; | 102 | unsigned char capabilities; |
103 | unsigned char fw_version_maj; | ||
104 | unsigned char fw_version_min; | ||
105 | unsigned char hw_version; | ||
106 | unsigned char paritycheck; | 103 | unsigned char paritycheck; |
107 | unsigned char jumpy_cursor; | 104 | unsigned char jumpy_cursor; |
105 | unsigned char hw_version; | ||
106 | unsigned int fw_version; | ||
108 | unsigned char parity[256]; | 107 | unsigned char parity[256]; |
109 | }; | 108 | }; |
110 | 109 | ||
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index cbc807264940..a3c97315a473 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -1394,6 +1394,7 @@ static int psmouse_reconnect(struct serio *serio) | |||
1394 | struct psmouse *psmouse = serio_get_drvdata(serio); | 1394 | struct psmouse *psmouse = serio_get_drvdata(serio); |
1395 | struct psmouse *parent = NULL; | 1395 | struct psmouse *parent = NULL; |
1396 | struct serio_driver *drv = serio->drv; | 1396 | struct serio_driver *drv = serio->drv; |
1397 | unsigned char type; | ||
1397 | int rc = -1; | 1398 | int rc = -1; |
1398 | 1399 | ||
1399 | if (!drv || !psmouse) { | 1400 | if (!drv || !psmouse) { |
@@ -1413,10 +1414,15 @@ static int psmouse_reconnect(struct serio *serio) | |||
1413 | if (psmouse->reconnect) { | 1414 | if (psmouse->reconnect) { |
1414 | if (psmouse->reconnect(psmouse)) | 1415 | if (psmouse->reconnect(psmouse)) |
1415 | goto out; | 1416 | goto out; |
1416 | } else if (psmouse_probe(psmouse) < 0 || | 1417 | } else { |
1417 | psmouse->type != psmouse_extensions(psmouse, | 1418 | psmouse_reset(psmouse); |
1418 | psmouse_max_proto, false)) { | 1419 | |
1419 | goto out; | 1420 | if (psmouse_probe(psmouse) < 0) |
1421 | goto out; | ||
1422 | |||
1423 | type = psmouse_extensions(psmouse, psmouse_max_proto, false); | ||
1424 | if (psmouse->type != type) | ||
1425 | goto out; | ||
1420 | } | 1426 | } |
1421 | 1427 | ||
1422 | /* ok, the device type (and capabilities) match the old one, | 1428 | /* ok, the device type (and capabilities) match the old one, |
diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index e019d53d1ab4..0d2d7e54b465 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c | |||
@@ -156,9 +156,14 @@ struct ser_req { | |||
156 | u16 reset; | 156 | u16 reset; |
157 | u16 ref_on; | 157 | u16 ref_on; |
158 | u16 command; | 158 | u16 command; |
159 | u16 sample; | ||
160 | struct spi_message msg; | 159 | struct spi_message msg; |
161 | struct spi_transfer xfer[6]; | 160 | struct spi_transfer xfer[6]; |
161 | |||
162 | /* | ||
163 | * DMA (thus cache coherency maintenance) requires the | ||
164 | * transfer buffers to live in their own cache lines. | ||
165 | */ | ||
166 | u16 sample ____cacheline_aligned; | ||
162 | }; | 167 | }; |
163 | 168 | ||
164 | struct ad7877 { | 169 | struct ad7877 { |
@@ -182,8 +187,6 @@ struct ad7877 { | |||
182 | u8 averaging; | 187 | u8 averaging; |
183 | u8 pen_down_acc_interval; | 188 | u8 pen_down_acc_interval; |
184 | 189 | ||
185 | u16 conversion_data[AD7877_NR_SENSE]; | ||
186 | |||
187 | struct spi_transfer xfer[AD7877_NR_SENSE + 2]; | 190 | struct spi_transfer xfer[AD7877_NR_SENSE + 2]; |
188 | struct spi_message msg; | 191 | struct spi_message msg; |
189 | 192 | ||
@@ -195,6 +198,12 @@ struct ad7877 { | |||
195 | spinlock_t lock; | 198 | spinlock_t lock; |
196 | struct timer_list timer; /* P: lock */ | 199 | struct timer_list timer; /* P: lock */ |
197 | unsigned pending:1; /* P: lock */ | 200 | unsigned pending:1; /* P: lock */ |
201 | |||
202 | /* | ||
203 | * DMA (thus cache coherency maintenance) requires the | ||
204 | * transfer buffers to live in their own cache lines. | ||
205 | */ | ||
206 | u16 conversion_data[AD7877_NR_SENSE] ____cacheline_aligned; | ||
198 | }; | 207 | }; |
199 | 208 | ||
200 | static int gpio3; | 209 | static int gpio3; |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 9712b2e97be4..cefd63daff31 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -2109,12 +2109,18 @@ repeat: | |||
2109 | if (!mddev->in_sync || mddev->recovery_cp != MaxSector) { /* not clean */ | 2109 | if (!mddev->in_sync || mddev->recovery_cp != MaxSector) { /* not clean */ |
2110 | /* .. if the array isn't clean, an 'even' event must also go | 2110 | /* .. if the array isn't clean, an 'even' event must also go |
2111 | * to spares. */ | 2111 | * to spares. */ |
2112 | if ((mddev->events&1)==0) | 2112 | if ((mddev->events&1)==0) { |
2113 | nospares = 0; | 2113 | nospares = 0; |
2114 | sync_req = 2; /* force a second update to get the | ||
2115 | * even/odd in sync */ | ||
2116 | } | ||
2114 | } else { | 2117 | } else { |
2115 | /* otherwise an 'odd' event must go to spares */ | 2118 | /* otherwise an 'odd' event must go to spares */ |
2116 | if ((mddev->events&1)) | 2119 | if ((mddev->events&1)) { |
2117 | nospares = 0; | 2120 | nospares = 0; |
2121 | sync_req = 2; /* force a second update to get the | ||
2122 | * even/odd in sync */ | ||
2123 | } | ||
2118 | } | 2124 | } |
2119 | } | 2125 | } |
2120 | 2126 | ||
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 58ea0ecae7c3..15348c393b5d 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -1527,7 +1527,7 @@ static void raid5_end_read_request(struct bio * bi, int error) | |||
1527 | 1527 | ||
1528 | clear_bit(R5_UPTODATE, &sh->dev[i].flags); | 1528 | clear_bit(R5_UPTODATE, &sh->dev[i].flags); |
1529 | atomic_inc(&rdev->read_errors); | 1529 | atomic_inc(&rdev->read_errors); |
1530 | if (conf->mddev->degraded) | 1530 | if (conf->mddev->degraded >= conf->max_degraded) |
1531 | printk_rl(KERN_WARNING | 1531 | printk_rl(KERN_WARNING |
1532 | "raid5:%s: read error not correctable " | 1532 | "raid5:%s: read error not correctable " |
1533 | "(sector %llu on %s).\n", | 1533 | "(sector %llu on %s).\n", |
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index fd8e1f45be36..7364b9642d00 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c | |||
@@ -423,15 +423,14 @@ static void vv_callback(struct saa7146_dev *dev, unsigned long status) | |||
423 | } | 423 | } |
424 | } | 424 | } |
425 | 425 | ||
426 | int saa7146_vv_devinit(struct saa7146_dev *dev) | ||
427 | { | ||
428 | return v4l2_device_register(&dev->pci->dev, &dev->v4l2_dev); | ||
429 | } | ||
430 | EXPORT_SYMBOL_GPL(saa7146_vv_devinit); | ||
431 | |||
432 | int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv) | 426 | int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv) |
433 | { | 427 | { |
434 | struct saa7146_vv *vv; | 428 | struct saa7146_vv *vv; |
429 | int err; | ||
430 | |||
431 | err = v4l2_device_register(&dev->pci->dev, &dev->v4l2_dev); | ||
432 | if (err) | ||
433 | return err; | ||
435 | 434 | ||
436 | vv = kzalloc(sizeof(struct saa7146_vv), GFP_KERNEL); | 435 | vv = kzalloc(sizeof(struct saa7146_vv), GFP_KERNEL); |
437 | if (vv == NULL) { | 436 | if (vv == NULL) { |
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index 5ed75263340a..b8b2c551a1e2 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c | |||
@@ -558,9 +558,11 @@ static int vidioc_s_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *f | |||
558 | /* ok, accept it */ | 558 | /* ok, accept it */ |
559 | vv->ov_fb = *fb; | 559 | vv->ov_fb = *fb; |
560 | vv->ov_fmt = fmt; | 560 | vv->ov_fmt = fmt; |
561 | if (0 == vv->ov_fb.fmt.bytesperline) | 561 | |
562 | vv->ov_fb.fmt.bytesperline = | 562 | if (vv->ov_fb.fmt.bytesperline < vv->ov_fb.fmt.width) { |
563 | vv->ov_fb.fmt.width * fmt->depth / 8; | 563 | vv->ov_fb.fmt.bytesperline = vv->ov_fb.fmt.width * fmt->depth / 8; |
564 | DEB_D(("setting bytesperline to %d\n", vv->ov_fb.fmt.bytesperline)); | ||
565 | } | ||
564 | 566 | ||
565 | mutex_unlock(&dev->lock); | 567 | mutex_unlock(&dev->lock); |
566 | return 0; | 568 | return 0; |
diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c index a3c07fe0e6c4..96972804f4ad 100644 --- a/drivers/media/dvb/frontends/stv090x.c +++ b/drivers/media/dvb/frontends/stv090x.c | |||
@@ -4470,6 +4470,10 @@ static int stv090x_setup(struct dvb_frontend *fe) | |||
4470 | if (stv090x_write_reg(state, STV090x_TSTRES0, 0x00) < 0) | 4470 | if (stv090x_write_reg(state, STV090x_TSTRES0, 0x00) < 0) |
4471 | goto err; | 4471 | goto err; |
4472 | 4472 | ||
4473 | /* workaround for stuck DiSEqC output */ | ||
4474 | if (config->diseqc_envelope_mode) | ||
4475 | stv090x_send_diseqc_burst(fe, SEC_MINI_A); | ||
4476 | |||
4473 | return 0; | 4477 | return 0; |
4474 | err: | 4478 | err: |
4475 | dprintk(FE_ERROR, 1, "I/O error"); | 4479 | dprintk(FE_ERROR, 1, "I/O error"); |
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c index 9fdf26cc6998..1500210c06cf 100644 --- a/drivers/media/dvb/ttpci/budget.c +++ b/drivers/media/dvb/ttpci/budget.c | |||
@@ -643,9 +643,6 @@ static void frontend_init(struct budget *budget) | |||
643 | &budget->i2c_adap, | 643 | &budget->i2c_adap, |
644 | &tt1600_isl6423_config); | 644 | &tt1600_isl6423_config); |
645 | 645 | ||
646 | } else { | ||
647 | dvb_frontend_detach(budget->dvb_frontend); | ||
648 | budget->dvb_frontend = NULL; | ||
649 | } | 646 | } |
650 | } | 647 | } |
651 | break; | 648 | break; |
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index f8fc8654693d..9644cf760aaa 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -361,7 +361,7 @@ config VIDEO_SAA717X | |||
361 | 361 | ||
362 | config VIDEO_SAA7191 | 362 | config VIDEO_SAA7191 |
363 | tristate "Philips SAA7191 video decoder" | 363 | tristate "Philips SAA7191 video decoder" |
364 | depends on VIDEO_V4L1 && I2C | 364 | depends on VIDEO_V4L2 && I2C |
365 | ---help--- | 365 | ---help--- |
366 | Support for the Philips SAA7191 video decoder. | 366 | Support for the Philips SAA7191 video decoder. |
367 | 367 | ||
@@ -756,7 +756,7 @@ source "drivers/media/video/saa7134/Kconfig" | |||
756 | 756 | ||
757 | config VIDEO_MXB | 757 | config VIDEO_MXB |
758 | tristate "Siemens-Nixdorf 'Multimedia eXtension Board'" | 758 | tristate "Siemens-Nixdorf 'Multimedia eXtension Board'" |
759 | depends on PCI && VIDEO_V4L1 && I2C | 759 | depends on PCI && VIDEO_V4L2 && I2C |
760 | select VIDEO_SAA7146_VV | 760 | select VIDEO_SAA7146_VV |
761 | select VIDEO_TUNER | 761 | select VIDEO_TUNER |
762 | select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO | 762 | select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO |
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile index b88b6174a331..c51c386559f2 100644 --- a/drivers/media/video/Makefile +++ b/drivers/media/video/Makefile | |||
@@ -160,8 +160,6 @@ obj-$(CONFIG_VIDEO_MX3) += mx3_camera.o | |||
160 | obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o | 160 | obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o |
161 | obj-$(CONFIG_VIDEO_SH_MOBILE_CEU) += sh_mobile_ceu_camera.o | 161 | obj-$(CONFIG_VIDEO_SH_MOBILE_CEU) += sh_mobile_ceu_camera.o |
162 | 162 | ||
163 | obj-$(CONFIG_ARCH_DAVINCI) += davinci/ | ||
164 | |||
165 | obj-$(CONFIG_VIDEO_AU0828) += au0828/ | 163 | obj-$(CONFIG_VIDEO_AU0828) += au0828/ |
166 | 164 | ||
167 | obj-$(CONFIG_USB_VIDEO_CLASS) += uvc/ | 165 | obj-$(CONFIG_USB_VIDEO_CLASS) += uvc/ |
diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index 7cf042f9b377..398dbe71cb82 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c | |||
@@ -223,7 +223,6 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) | |||
223 | BUG_ON(!dev->hw_ops.get_frame_format); | 223 | BUG_ON(!dev->hw_ops.get_frame_format); |
224 | BUG_ON(!dev->hw_ops.get_pixel_format); | 224 | BUG_ON(!dev->hw_ops.get_pixel_format); |
225 | BUG_ON(!dev->hw_ops.set_pixel_format); | 225 | BUG_ON(!dev->hw_ops.set_pixel_format); |
226 | BUG_ON(!dev->hw_ops.set_params); | ||
227 | BUG_ON(!dev->hw_ops.set_image_window); | 226 | BUG_ON(!dev->hw_ops.set_image_window); |
228 | BUG_ON(!dev->hw_ops.get_image_window); | 227 | BUG_ON(!dev->hw_ops.get_image_window); |
229 | BUG_ON(!dev->hw_ops.get_line_length); | 228 | BUG_ON(!dev->hw_ops.get_line_length); |
@@ -1689,11 +1688,12 @@ static long vpfe_param_handler(struct file *file, void *priv, | |||
1689 | struct vpfe_device *vpfe_dev = video_drvdata(file); | 1688 | struct vpfe_device *vpfe_dev = video_drvdata(file); |
1690 | int ret = 0; | 1689 | int ret = 0; |
1691 | 1690 | ||
1692 | v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_param_handler\n"); | 1691 | v4l2_dbg(2, debug, &vpfe_dev->v4l2_dev, "vpfe_param_handler\n"); |
1693 | 1692 | ||
1694 | if (vpfe_dev->started) { | 1693 | if (vpfe_dev->started) { |
1695 | /* only allowed if streaming is not started */ | 1694 | /* only allowed if streaming is not started */ |
1696 | v4l2_err(&vpfe_dev->v4l2_dev, "device already started\n"); | 1695 | v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, |
1696 | "device already started\n"); | ||
1697 | return -EBUSY; | 1697 | return -EBUSY; |
1698 | } | 1698 | } |
1699 | 1699 | ||
@@ -1705,16 +1705,23 @@ static long vpfe_param_handler(struct file *file, void *priv, | |||
1705 | case VPFE_CMD_S_CCDC_RAW_PARAMS: | 1705 | case VPFE_CMD_S_CCDC_RAW_PARAMS: |
1706 | v4l2_warn(&vpfe_dev->v4l2_dev, | 1706 | v4l2_warn(&vpfe_dev->v4l2_dev, |
1707 | "VPFE_CMD_S_CCDC_RAW_PARAMS: experimental ioctl\n"); | 1707 | "VPFE_CMD_S_CCDC_RAW_PARAMS: experimental ioctl\n"); |
1708 | ret = ccdc_dev->hw_ops.set_params(param); | 1708 | if (ccdc_dev->hw_ops.set_params) { |
1709 | if (ret) { | 1709 | ret = ccdc_dev->hw_ops.set_params(param); |
1710 | v4l2_err(&vpfe_dev->v4l2_dev, | 1710 | if (ret) { |
1711 | "Error in setting parameters in CCDC\n"); | 1711 | v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, |
1712 | goto unlock_out; | 1712 | "Error setting parameters in CCDC\n"); |
1713 | } | 1713 | goto unlock_out; |
1714 | if (vpfe_get_ccdc_image_format(vpfe_dev, &vpfe_dev->fmt) < 0) { | 1714 | } |
1715 | v4l2_err(&vpfe_dev->v4l2_dev, | 1715 | if (vpfe_get_ccdc_image_format(vpfe_dev, |
1716 | "Invalid image format at CCDC\n"); | 1716 | &vpfe_dev->fmt) < 0) { |
1717 | goto unlock_out; | 1717 | v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, |
1718 | "Invalid image format at CCDC\n"); | ||
1719 | goto unlock_out; | ||
1720 | } | ||
1721 | } else { | ||
1722 | ret = -EINVAL; | ||
1723 | v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, | ||
1724 | "VPFE_CMD_S_CCDC_RAW_PARAMS not supported\n"); | ||
1718 | } | 1725 | } |
1719 | break; | 1726 | break; |
1720 | default: | 1727 | default: |
@@ -1830,7 +1837,7 @@ static __init int vpfe_probe(struct platform_device *pdev) | |||
1830 | if (NULL == ccdc_cfg) { | 1837 | if (NULL == ccdc_cfg) { |
1831 | v4l2_err(pdev->dev.driver, | 1838 | v4l2_err(pdev->dev.driver, |
1832 | "Memory allocation failed for ccdc_cfg\n"); | 1839 | "Memory allocation failed for ccdc_cfg\n"); |
1833 | goto probe_free_dev_mem; | 1840 | goto probe_free_lock; |
1834 | } | 1841 | } |
1835 | 1842 | ||
1836 | strncpy(ccdc_cfg->name, vpfe_cfg->ccdc, 32); | 1843 | strncpy(ccdc_cfg->name, vpfe_cfg->ccdc, 32); |
@@ -1982,8 +1989,9 @@ probe_out_video_release: | |||
1982 | probe_out_release_irq: | 1989 | probe_out_release_irq: |
1983 | free_irq(vpfe_dev->ccdc_irq0, vpfe_dev); | 1990 | free_irq(vpfe_dev->ccdc_irq0, vpfe_dev); |
1984 | probe_free_ccdc_cfg_mem: | 1991 | probe_free_ccdc_cfg_mem: |
1985 | mutex_unlock(&ccdc_lock); | ||
1986 | kfree(ccdc_cfg); | 1992 | kfree(ccdc_cfg); |
1993 | probe_free_lock: | ||
1994 | mutex_unlock(&ccdc_lock); | ||
1987 | probe_free_dev_mem: | 1995 | probe_free_dev_mem: |
1988 | kfree(vpfe_dev); | 1996 | kfree(vpfe_dev); |
1989 | return ret; | 1997 | return ret; |
diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c index 38a6e15e096b..3dee3e5844b6 100644 --- a/drivers/media/video/gspca/sn9c20x.c +++ b/drivers/media/video/gspca/sn9c20x.c | |||
@@ -1427,7 +1427,7 @@ static int input_kthread(void *data) | |||
1427 | struct gspca_dev *gspca_dev = (struct gspca_dev *)data; | 1427 | struct gspca_dev *gspca_dev = (struct gspca_dev *)data; |
1428 | struct sd *sd = (struct sd *) gspca_dev; | 1428 | struct sd *sd = (struct sd *) gspca_dev; |
1429 | 1429 | ||
1430 | DECLARE_WAIT_QUEUE_HEAD(wait); | 1430 | DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait); |
1431 | set_freezable(); | 1431 | set_freezable(); |
1432 | for (;;) { | 1432 | for (;;) { |
1433 | if (kthread_should_stop()) | 1433 | if (kthread_should_stop()) |
diff --git a/drivers/media/video/gspca/spca508.c b/drivers/media/video/gspca/spca508.c index 15b2eef8a3f6..edf0fe157501 100644 --- a/drivers/media/video/gspca/spca508.c +++ b/drivers/media/video/gspca/spca508.c | |||
@@ -1513,7 +1513,6 @@ static const struct sd_desc sd_desc = { | |||
1513 | static const __devinitdata struct usb_device_id device_table[] = { | 1513 | static const __devinitdata struct usb_device_id device_table[] = { |
1514 | {USB_DEVICE(0x0130, 0x0130), .driver_info = HamaUSBSightcam}, | 1514 | {USB_DEVICE(0x0130, 0x0130), .driver_info = HamaUSBSightcam}, |
1515 | {USB_DEVICE(0x041e, 0x4018), .driver_info = CreativeVista}, | 1515 | {USB_DEVICE(0x041e, 0x4018), .driver_info = CreativeVista}, |
1516 | {USB_DEVICE(0x0461, 0x0815), .driver_info = MicroInnovationIC200}, | ||
1517 | {USB_DEVICE(0x0733, 0x0110), .driver_info = ViewQuestVQ110}, | 1516 | {USB_DEVICE(0x0733, 0x0110), .driver_info = ViewQuestVQ110}, |
1518 | {USB_DEVICE(0x0af9, 0x0010), .driver_info = HamaUSBSightcam}, | 1517 | {USB_DEVICE(0x0af9, 0x0010), .driver_info = HamaUSBSightcam}, |
1519 | {USB_DEVICE(0x0af9, 0x0011), .driver_info = HamaUSBSightcam2}, | 1518 | {USB_DEVICE(0x0af9, 0x0011), .driver_info = HamaUSBSightcam2}, |
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c index dc7f2b0fbc79..b9c80e2103b9 100644 --- a/drivers/media/video/gspca/spca561.c +++ b/drivers/media/video/gspca/spca561.c | |||
@@ -1053,6 +1053,7 @@ static const __devinitdata struct usb_device_id device_table[] = { | |||
1053 | {USB_DEVICE(0x041e, 0x401a), .driver_info = Rev072A}, | 1053 | {USB_DEVICE(0x041e, 0x401a), .driver_info = Rev072A}, |
1054 | {USB_DEVICE(0x041e, 0x403b), .driver_info = Rev012A}, | 1054 | {USB_DEVICE(0x041e, 0x403b), .driver_info = Rev012A}, |
1055 | {USB_DEVICE(0x0458, 0x7004), .driver_info = Rev072A}, | 1055 | {USB_DEVICE(0x0458, 0x7004), .driver_info = Rev072A}, |
1056 | {USB_DEVICE(0x0461, 0x0815), .driver_info = Rev072A}, | ||
1056 | {USB_DEVICE(0x046d, 0x0928), .driver_info = Rev012A}, | 1057 | {USB_DEVICE(0x046d, 0x0928), .driver_info = Rev012A}, |
1057 | {USB_DEVICE(0x046d, 0x0929), .driver_info = Rev012A}, | 1058 | {USB_DEVICE(0x046d, 0x0929), .driver_info = Rev012A}, |
1058 | {USB_DEVICE(0x046d, 0x092a), .driver_info = Rev012A}, | 1059 | {USB_DEVICE(0x046d, 0x092a), .driver_info = Rev012A}, |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.c b/drivers/media/video/gspca/stv06xx/stv06xx.c index af73da34c83f..14f179a19485 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx.c | |||
@@ -524,8 +524,6 @@ static const __devinitdata struct usb_device_id device_table[] = { | |||
524 | {USB_DEVICE(0x046D, 0x08F5), .driver_info = BRIDGE_ST6422 }, | 524 | {USB_DEVICE(0x046D, 0x08F5), .driver_info = BRIDGE_ST6422 }, |
525 | /* QuickCam Messenger (new) */ | 525 | /* QuickCam Messenger (new) */ |
526 | {USB_DEVICE(0x046D, 0x08F6), .driver_info = BRIDGE_ST6422 }, | 526 | {USB_DEVICE(0x046D, 0x08F6), .driver_info = BRIDGE_ST6422 }, |
527 | /* QuickCam Messenger (new) */ | ||
528 | {USB_DEVICE(0x046D, 0x08DA), .driver_info = BRIDGE_ST6422 }, | ||
529 | {} | 527 | {} |
530 | }; | 528 | }; |
531 | MODULE_DEVICE_TABLE(usb, device_table); | 529 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/hexium_gemini.c b/drivers/media/video/hexium_gemini.c index e620a3a92f25..ad2c232baa6d 100644 --- a/drivers/media/video/hexium_gemini.c +++ b/drivers/media/video/hexium_gemini.c | |||
@@ -356,9 +356,6 @@ static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d | |||
356 | 356 | ||
357 | DEB_EE((".\n")); | 357 | DEB_EE((".\n")); |
358 | 358 | ||
359 | ret = saa7146_vv_devinit(dev); | ||
360 | if (ret) | ||
361 | return ret; | ||
362 | hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); | 359 | hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); |
363 | if (NULL == hexium) { | 360 | if (NULL == hexium) { |
364 | printk("hexium_gemini: not enough kernel memory in hexium_attach().\n"); | 361 | printk("hexium_gemini: not enough kernel memory in hexium_attach().\n"); |
diff --git a/drivers/media/video/hexium_orion.c b/drivers/media/video/hexium_orion.c index fe596a1c12a8..938a1f8f880a 100644 --- a/drivers/media/video/hexium_orion.c +++ b/drivers/media/video/hexium_orion.c | |||
@@ -216,10 +216,6 @@ static int hexium_probe(struct saa7146_dev *dev) | |||
216 | return -EFAULT; | 216 | return -EFAULT; |
217 | } | 217 | } |
218 | 218 | ||
219 | err = saa7146_vv_devinit(dev); | ||
220 | if (err) | ||
221 | return err; | ||
222 | |||
223 | hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); | 219 | hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); |
224 | if (NULL == hexium) { | 220 | if (NULL == hexium) { |
225 | printk("hexium_orion: hexium_probe: not enough kernel memory.\n"); | 221 | printk("hexium_orion: hexium_probe: not enough kernel memory.\n"); |
diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c index 3c8ebfcb742e..34a66019190e 100644 --- a/drivers/media/video/mx1_camera.c +++ b/drivers/media/video/mx1_camera.c | |||
@@ -49,8 +49,6 @@ | |||
49 | /* | 49 | /* |
50 | * CSI registers | 50 | * CSI registers |
51 | */ | 51 | */ |
52 | #define DMA_CCR(x) (0x8c + ((x) << 6)) /* Control Registers */ | ||
53 | #define DMA_DIMR 0x08 /* Interrupt mask Register */ | ||
54 | #define CSICR1 0x00 /* CSI Control Register 1 */ | 52 | #define CSICR1 0x00 /* CSI Control Register 1 */ |
55 | #define CSISR 0x08 /* CSI Status Register */ | 53 | #define CSISR 0x08 /* CSI Status Register */ |
56 | #define CSIRXR 0x10 /* CSI RxFIFO Register */ | 54 | #define CSIRXR 0x10 /* CSI RxFIFO Register */ |
@@ -784,7 +782,7 @@ static int __init mx1_camera_probe(struct platform_device *pdev) | |||
784 | pcdev); | 782 | pcdev); |
785 | 783 | ||
786 | imx_dma_config_channel(pcdev->dma_chan, IMX_DMA_TYPE_FIFO, | 784 | imx_dma_config_channel(pcdev->dma_chan, IMX_DMA_TYPE_FIFO, |
787 | IMX_DMA_MEMSIZE_32, DMA_REQ_CSI_R, 0); | 785 | IMX_DMA_MEMSIZE_32, MX1_DMA_REQ_CSI_R, 0); |
788 | /* burst length : 16 words = 64 bytes */ | 786 | /* burst length : 16 words = 64 bytes */ |
789 | imx_dma_config_burstlen(pcdev->dma_chan, 0); | 787 | imx_dma_config_burstlen(pcdev->dma_chan, 0); |
790 | 788 | ||
@@ -798,8 +796,8 @@ static int __init mx1_camera_probe(struct platform_device *pdev) | |||
798 | set_fiq_handler(&mx1_camera_sof_fiq_start, &mx1_camera_sof_fiq_end - | 796 | set_fiq_handler(&mx1_camera_sof_fiq_start, &mx1_camera_sof_fiq_end - |
799 | &mx1_camera_sof_fiq_start); | 797 | &mx1_camera_sof_fiq_start); |
800 | 798 | ||
801 | regs.ARM_r8 = DMA_BASE + DMA_DIMR; | 799 | regs.ARM_r8 = (long)MX1_DMA_DIMR; |
802 | regs.ARM_r9 = DMA_BASE + DMA_CCR(pcdev->dma_chan); | 800 | regs.ARM_r9 = (long)MX1_DMA_CCR(pcdev->dma_chan); |
803 | regs.ARM_r10 = (long)pcdev->base + CSICR1; | 801 | regs.ARM_r10 = (long)pcdev->base + CSICR1; |
804 | regs.ARM_fp = (long)pcdev->base + CSISR; | 802 | regs.ARM_fp = (long)pcdev->base + CSISR; |
805 | regs.ARM_sp = 1 << pcdev->dma_chan; | 803 | regs.ARM_sp = 1 << pcdev->dma_chan; |
diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c index 9f01f14e4aa2..ef0c8178f255 100644 --- a/drivers/media/video/mxb.c +++ b/drivers/media/video/mxb.c | |||
@@ -169,11 +169,7 @@ static struct saa7146_extension extension; | |||
169 | static int mxb_probe(struct saa7146_dev *dev) | 169 | static int mxb_probe(struct saa7146_dev *dev) |
170 | { | 170 | { |
171 | struct mxb *mxb = NULL; | 171 | struct mxb *mxb = NULL; |
172 | int err; | ||
173 | 172 | ||
174 | err = saa7146_vv_devinit(dev); | ||
175 | if (err) | ||
176 | return err; | ||
177 | mxb = kzalloc(sizeof(struct mxb), GFP_KERNEL); | 173 | mxb = kzalloc(sizeof(struct mxb), GFP_KERNEL); |
178 | if (mxb == NULL) { | 174 | if (mxb == NULL) { |
179 | DEB_D(("not enough kernel memory.\n")); | 175 | DEB_D(("not enough kernel memory.\n")); |
@@ -699,14 +695,17 @@ static struct saa7146_ext_vv vv_data; | |||
699 | /* this function only gets called when the probing was successful */ | 695 | /* this function only gets called when the probing was successful */ |
700 | static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info) | 696 | static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info) |
701 | { | 697 | { |
702 | struct mxb *mxb = (struct mxb *)dev->ext_priv; | 698 | struct mxb *mxb; |
703 | 699 | ||
704 | DEB_EE(("dev:%p\n", dev)); | 700 | DEB_EE(("dev:%p\n", dev)); |
705 | 701 | ||
706 | /* checking for i2c-devices can be omitted here, because we | ||
707 | already did this in "mxb_vl42_probe" */ | ||
708 | |||
709 | saa7146_vv_init(dev, &vv_data); | 702 | saa7146_vv_init(dev, &vv_data); |
703 | if (mxb_probe(dev)) { | ||
704 | saa7146_vv_release(dev); | ||
705 | return -1; | ||
706 | } | ||
707 | mxb = (struct mxb *)dev->ext_priv; | ||
708 | |||
710 | vv_data.ops.vidioc_queryctrl = vidioc_queryctrl; | 709 | vv_data.ops.vidioc_queryctrl = vidioc_queryctrl; |
711 | vv_data.ops.vidioc_g_ctrl = vidioc_g_ctrl; | 710 | vv_data.ops.vidioc_g_ctrl = vidioc_g_ctrl; |
712 | vv_data.ops.vidioc_s_ctrl = vidioc_s_ctrl; | 711 | vv_data.ops.vidioc_s_ctrl = vidioc_s_ctrl; |
@@ -726,6 +725,7 @@ static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data | |||
726 | vv_data.ops.vidioc_default = vidioc_default; | 725 | vv_data.ops.vidioc_default = vidioc_default; |
727 | if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_GRABBER)) { | 726 | if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_GRABBER)) { |
728 | ERR(("cannot register capture v4l2 device. skipping.\n")); | 727 | ERR(("cannot register capture v4l2 device. skipping.\n")); |
728 | saa7146_vv_release(dev); | ||
729 | return -1; | 729 | return -1; |
730 | } | 730 | } |
731 | 731 | ||
@@ -846,7 +846,6 @@ static struct saa7146_extension extension = { | |||
846 | .pci_tbl = &pci_tbl[0], | 846 | .pci_tbl = &pci_tbl[0], |
847 | .module = THIS_MODULE, | 847 | .module = THIS_MODULE, |
848 | 848 | ||
849 | .probe = mxb_probe, | ||
850 | .attach = mxb_attach, | 849 | .attach = mxb_attach, |
851 | .detach = mxb_detach, | 850 | .detach = mxb_detach, |
852 | 851 | ||
diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c index b189fe63394b..ce76d952e161 100644 --- a/drivers/media/video/omap24xxcam.c +++ b/drivers/media/video/omap24xxcam.c | |||
@@ -1405,7 +1405,7 @@ static int omap24xxcam_mmap_buffers(struct file *file, | |||
1405 | } | 1405 | } |
1406 | 1406 | ||
1407 | size = 0; | 1407 | size = 0; |
1408 | for (i = first; i <= last; i++) { | 1408 | for (i = first; i <= last && i < VIDEO_MAX_FRAME; i++) { |
1409 | struct videobuf_dmabuf *dma = videobuf_to_dma(vbq->bufs[i]); | 1409 | struct videobuf_dmabuf *dma = videobuf_to_dma(vbq->bufs[i]); |
1410 | 1410 | ||
1411 | for (j = 0; j < dma->sglen; j++) { | 1411 | for (j = 0; j < dma->sglen; j++) { |
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 5ecc30daef2d..04bf5c11308d 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -609,12 +609,9 @@ static void pxa_dma_add_tail_buf(struct pxa_camera_dev *pcdev, | |||
609 | */ | 609 | */ |
610 | static void pxa_camera_start_capture(struct pxa_camera_dev *pcdev) | 610 | static void pxa_camera_start_capture(struct pxa_camera_dev *pcdev) |
611 | { | 611 | { |
612 | unsigned long cicr0, cifr; | 612 | unsigned long cicr0; |
613 | 613 | ||
614 | dev_dbg(pcdev->soc_host.v4l2_dev.dev, "%s\n", __func__); | 614 | dev_dbg(pcdev->soc_host.v4l2_dev.dev, "%s\n", __func__); |
615 | /* Reset the FIFOs */ | ||
616 | cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F; | ||
617 | __raw_writel(cifr, pcdev->base + CIFR); | ||
618 | /* Enable End-Of-Frame Interrupt */ | 615 | /* Enable End-Of-Frame Interrupt */ |
619 | cicr0 = __raw_readl(pcdev->base + CICR0) | CICR0_ENB; | 616 | cicr0 = __raw_readl(pcdev->base + CICR0) | CICR0_ENB; |
620 | cicr0 &= ~CICR0_EOFM; | 617 | cicr0 &= ~CICR0_EOFM; |
@@ -935,7 +932,7 @@ static void pxa_camera_deactivate(struct pxa_camera_dev *pcdev) | |||
935 | static irqreturn_t pxa_camera_irq(int irq, void *data) | 932 | static irqreturn_t pxa_camera_irq(int irq, void *data) |
936 | { | 933 | { |
937 | struct pxa_camera_dev *pcdev = data; | 934 | struct pxa_camera_dev *pcdev = data; |
938 | unsigned long status, cicr0; | 935 | unsigned long status, cifr, cicr0; |
939 | struct pxa_buffer *buf; | 936 | struct pxa_buffer *buf; |
940 | struct videobuf_buffer *vb; | 937 | struct videobuf_buffer *vb; |
941 | 938 | ||
@@ -949,6 +946,10 @@ static irqreturn_t pxa_camera_irq(int irq, void *data) | |||
949 | __raw_writel(status, pcdev->base + CISR); | 946 | __raw_writel(status, pcdev->base + CISR); |
950 | 947 | ||
951 | if (status & CISR_EOF) { | 948 | if (status & CISR_EOF) { |
949 | /* Reset the FIFOs */ | ||
950 | cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F; | ||
951 | __raw_writel(cifr, pcdev->base + CIFR); | ||
952 | |||
952 | pcdev->active = list_first_entry(&pcdev->capture, | 953 | pcdev->active = list_first_entry(&pcdev->capture, |
953 | struct pxa_buffer, vb.queue); | 954 | struct pxa_buffer, vb.queue); |
954 | vb = &pcdev->active->vb; | 955 | vb = &pcdev->active->vb; |
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 6e16b3979326..1ad980f8e770 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c | |||
@@ -1633,7 +1633,7 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd, | |||
1633 | height = pix->height; | 1633 | height = pix->height; |
1634 | 1634 | ||
1635 | pix->bytesperline = soc_mbus_bytes_per_line(width, xlate->host_fmt); | 1635 | pix->bytesperline = soc_mbus_bytes_per_line(width, xlate->host_fmt); |
1636 | if (pix->bytesperline < 0) | 1636 | if ((int)pix->bytesperline < 0) |
1637 | return pix->bytesperline; | 1637 | return pix->bytesperline; |
1638 | pix->sizeimage = height * pix->bytesperline; | 1638 | pix->sizeimage = height * pix->bytesperline; |
1639 | 1639 | ||
diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c index a3d5728b6449..f2ab025ad97a 100644 --- a/drivers/mfd/wm831x-core.c +++ b/drivers/mfd/wm831x-core.c | |||
@@ -349,6 +349,9 @@ int wm831x_auxadc_read(struct wm831x *wm831x, enum wm831x_auxadc input) | |||
349 | goto disable; | 349 | goto disable; |
350 | } | 350 | } |
351 | 351 | ||
352 | /* If an interrupt arrived late clean up after it */ | ||
353 | try_wait_for_completion(&wm831x->auxadc_done); | ||
354 | |||
352 | /* Ignore the result to allow us to soldier on without IRQ hookup */ | 355 | /* Ignore the result to allow us to soldier on without IRQ hookup */ |
353 | wait_for_completion_timeout(&wm831x->auxadc_done, msecs_to_jiffies(5)); | 356 | wait_for_completion_timeout(&wm831x->auxadc_done, msecs_to_jiffies(5)); |
354 | 357 | ||
diff --git a/drivers/mfd/wm8350-core.c b/drivers/mfd/wm8350-core.c index e400a3bed063..b5807484b4c9 100644 --- a/drivers/mfd/wm8350-core.c +++ b/drivers/mfd/wm8350-core.c | |||
@@ -363,6 +363,10 @@ int wm8350_read_auxadc(struct wm8350 *wm8350, int channel, int scale, int vref) | |||
363 | reg |= 1 << channel | WM8350_AUXADC_POLL; | 363 | reg |= 1 << channel | WM8350_AUXADC_POLL; |
364 | wm8350_reg_write(wm8350, WM8350_DIGITISER_CONTROL_1, reg); | 364 | wm8350_reg_write(wm8350, WM8350_DIGITISER_CONTROL_1, reg); |
365 | 365 | ||
366 | /* If a late IRQ left the completion signalled then consume | ||
367 | * the completion. */ | ||
368 | try_wait_for_completion(&wm8350->auxadc_done); | ||
369 | |||
366 | /* We ignore the result of the completion and just check for a | 370 | /* We ignore the result of the completion and just check for a |
367 | * conversion result, allowing us to soldier on if the IRQ | 371 | * conversion result, allowing us to soldier on if the IRQ |
368 | * infrastructure is not set up for the chip. */ | 372 | * infrastructure is not set up for the chip. */ |
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 88be37d9e9a5..fb279f4ed8b3 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c | |||
@@ -266,7 +266,7 @@ static int atmci_req_show(struct seq_file *s, void *v) | |||
266 | "CMD%u(0x%x) flg %x rsp %x %x %x %x err %d\n", | 266 | "CMD%u(0x%x) flg %x rsp %x %x %x %x err %d\n", |
267 | cmd->opcode, cmd->arg, cmd->flags, | 267 | cmd->opcode, cmd->arg, cmd->flags, |
268 | cmd->resp[0], cmd->resp[1], cmd->resp[2], | 268 | cmd->resp[0], cmd->resp[1], cmd->resp[2], |
269 | cmd->resp[2], cmd->error); | 269 | cmd->resp[3], cmd->error); |
270 | if (data) | 270 | if (data) |
271 | seq_printf(s, "DATA %u / %u * %u flg %x err %d\n", | 271 | seq_printf(s, "DATA %u / %u * %u flg %x err %d\n", |
272 | data->bytes_xfered, data->blocks, | 272 | data->bytes_xfered, data->blocks, |
@@ -276,7 +276,7 @@ static int atmci_req_show(struct seq_file *s, void *v) | |||
276 | "CMD%u(0x%x) flg %x rsp %x %x %x %x err %d\n", | 276 | "CMD%u(0x%x) flg %x rsp %x %x %x %x err %d\n", |
277 | stop->opcode, stop->arg, stop->flags, | 277 | stop->opcode, stop->arg, stop->flags, |
278 | stop->resp[0], stop->resp[1], stop->resp[2], | 278 | stop->resp[0], stop->resp[1], stop->resp[2], |
279 | stop->resp[2], stop->error); | 279 | stop->resp[3], stop->error); |
280 | } | 280 | } |
281 | 281 | ||
282 | spin_unlock_bh(&slot->host->lock); | 282 | spin_unlock_bh(&slot->host->lock); |
@@ -569,9 +569,10 @@ static void atmci_dma_cleanup(struct atmel_mci *host) | |||
569 | { | 569 | { |
570 | struct mmc_data *data = host->data; | 570 | struct mmc_data *data = host->data; |
571 | 571 | ||
572 | dma_unmap_sg(&host->pdev->dev, data->sg, data->sg_len, | 572 | if (data) |
573 | ((data->flags & MMC_DATA_WRITE) | 573 | dma_unmap_sg(&host->pdev->dev, data->sg, data->sg_len, |
574 | ? DMA_TO_DEVICE : DMA_FROM_DEVICE)); | 574 | ((data->flags & MMC_DATA_WRITE) |
575 | ? DMA_TO_DEVICE : DMA_FROM_DEVICE)); | ||
575 | } | 576 | } |
576 | 577 | ||
577 | static void atmci_stop_dma(struct atmel_mci *host) | 578 | static void atmci_stop_dma(struct atmel_mci *host) |
@@ -1099,8 +1100,8 @@ static void atmci_command_complete(struct atmel_mci *host, | |||
1099 | "command error: status=0x%08x\n", status); | 1100 | "command error: status=0x%08x\n", status); |
1100 | 1101 | ||
1101 | if (cmd->data) { | 1102 | if (cmd->data) { |
1102 | host->data = NULL; | ||
1103 | atmci_stop_dma(host); | 1103 | atmci_stop_dma(host); |
1104 | host->data = NULL; | ||
1104 | mci_writel(host, IDR, MCI_NOTBUSY | 1105 | mci_writel(host, IDR, MCI_NOTBUSY |
1105 | | MCI_TXRDY | MCI_RXRDY | 1106 | | MCI_TXRDY | MCI_RXRDY |
1106 | | ATMCI_DATA_ERROR_FLAGS); | 1107 | | ATMCI_DATA_ERROR_FLAGS); |
@@ -1293,6 +1294,7 @@ static void atmci_tasklet_func(unsigned long priv) | |||
1293 | } else { | 1294 | } else { |
1294 | data->bytes_xfered = data->blocks * data->blksz; | 1295 | data->bytes_xfered = data->blocks * data->blksz; |
1295 | data->error = 0; | 1296 | data->error = 0; |
1297 | mci_writel(host, IDR, ATMCI_DATA_ERROR_FLAGS); | ||
1296 | } | 1298 | } |
1297 | 1299 | ||
1298 | if (!data->stop) { | 1300 | if (!data->stop) { |
@@ -1751,13 +1753,13 @@ static int __init atmci_probe(struct platform_device *pdev) | |||
1751 | ret = -ENODEV; | 1753 | ret = -ENODEV; |
1752 | if (pdata->slot[0].bus_width) { | 1754 | if (pdata->slot[0].bus_width) { |
1753 | ret = atmci_init_slot(host, &pdata->slot[0], | 1755 | ret = atmci_init_slot(host, &pdata->slot[0], |
1754 | MCI_SDCSEL_SLOT_A, 0); | 1756 | 0, MCI_SDCSEL_SLOT_A); |
1755 | if (!ret) | 1757 | if (!ret) |
1756 | nr_slots++; | 1758 | nr_slots++; |
1757 | } | 1759 | } |
1758 | if (pdata->slot[1].bus_width) { | 1760 | if (pdata->slot[1].bus_width) { |
1759 | ret = atmci_init_slot(host, &pdata->slot[1], | 1761 | ret = atmci_init_slot(host, &pdata->slot[1], |
1760 | MCI_SDCSEL_SLOT_B, 1); | 1762 | 1, MCI_SDCSEL_SLOT_B); |
1761 | if (!ret) | 1763 | if (!ret) |
1762 | nr_slots++; | 1764 | nr_slots++; |
1763 | } | 1765 | } |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 4e97ca182997..5d3763fb3472 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -1649,6 +1649,7 @@ static void free_skb_resources(struct gfar_private *priv) | |||
1649 | sizeof(struct rxbd8) * priv->total_rx_ring_size, | 1649 | sizeof(struct rxbd8) * priv->total_rx_ring_size, |
1650 | priv->tx_queue[0]->tx_bd_base, | 1650 | priv->tx_queue[0]->tx_bd_base, |
1651 | priv->tx_queue[0]->tx_bd_dma_base); | 1651 | priv->tx_queue[0]->tx_bd_dma_base); |
1652 | skb_queue_purge(&priv->rx_recycle); | ||
1652 | } | 1653 | } |
1653 | 1654 | ||
1654 | void gfar_start(struct net_device *dev) | 1655 | void gfar_start(struct net_device *dev) |
@@ -2088,7 +2089,6 @@ static int gfar_close(struct net_device *dev) | |||
2088 | 2089 | ||
2089 | disable_napi(priv); | 2090 | disable_napi(priv); |
2090 | 2091 | ||
2091 | skb_queue_purge(&priv->rx_recycle); | ||
2092 | cancel_work_sync(&priv->reset_task); | 2092 | cancel_work_sync(&priv->reset_task); |
2093 | stop_gfar(dev); | 2093 | stop_gfar(dev); |
2094 | 2094 | ||
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 0cd80e4d71d9..e67691dca4ab 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c | |||
@@ -32,6 +32,7 @@ static int kszphy_config_init(struct phy_device *phydev) | |||
32 | 32 | ||
33 | static struct phy_driver ks8001_driver = { | 33 | static struct phy_driver ks8001_driver = { |
34 | .phy_id = PHY_ID_KS8001, | 34 | .phy_id = PHY_ID_KS8001, |
35 | .name = "Micrel KS8001", | ||
35 | .phy_id_mask = 0x00fffff0, | 36 | .phy_id_mask = 0x00fffff0, |
36 | .features = PHY_BASIC_FEATURES, | 37 | .features = PHY_BASIC_FEATURES, |
37 | .flags = PHY_POLL, | 38 | .flags = PHY_POLL, |
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index f9f0730b53d5..5ec542dd5b50 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c | |||
@@ -187,7 +187,6 @@ tx_drop: | |||
187 | return NETDEV_TX_OK; | 187 | return NETDEV_TX_OK; |
188 | 188 | ||
189 | rx_drop: | 189 | rx_drop: |
190 | kfree_skb(skb); | ||
191 | rcv_stats->rx_dropped++; | 190 | rcv_stats->rx_dropped++; |
192 | return NETDEV_TX_OK; | 191 | return NETDEV_TX_OK; |
193 | } | 192 | } |
diff --git a/drivers/net/wireless/ath/ar9170/usb.c b/drivers/net/wireless/ath/ar9170/usb.c index 99a6da464bd3..e1c2fcaa8bed 100644 --- a/drivers/net/wireless/ath/ar9170/usb.c +++ b/drivers/net/wireless/ath/ar9170/usb.c | |||
@@ -727,12 +727,16 @@ static void ar9170_usb_firmware_failed(struct ar9170_usb *aru) | |||
727 | { | 727 | { |
728 | struct device *parent = aru->udev->dev.parent; | 728 | struct device *parent = aru->udev->dev.parent; |
729 | 729 | ||
730 | complete(&aru->firmware_loading_complete); | ||
731 | |||
730 | /* unbind anything failed */ | 732 | /* unbind anything failed */ |
731 | if (parent) | 733 | if (parent) |
732 | down(&parent->sem); | 734 | down(&parent->sem); |
733 | device_release_driver(&aru->udev->dev); | 735 | device_release_driver(&aru->udev->dev); |
734 | if (parent) | 736 | if (parent) |
735 | up(&parent->sem); | 737 | up(&parent->sem); |
738 | |||
739 | usb_put_dev(aru->udev); | ||
736 | } | 740 | } |
737 | 741 | ||
738 | static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context) | 742 | static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context) |
@@ -761,6 +765,8 @@ static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context) | |||
761 | if (err) | 765 | if (err) |
762 | goto err_unrx; | 766 | goto err_unrx; |
763 | 767 | ||
768 | complete(&aru->firmware_loading_complete); | ||
769 | usb_put_dev(aru->udev); | ||
764 | return; | 770 | return; |
765 | 771 | ||
766 | err_unrx: | 772 | err_unrx: |
@@ -858,6 +864,7 @@ static int ar9170_usb_probe(struct usb_interface *intf, | |||
858 | init_usb_anchor(&aru->tx_pending); | 864 | init_usb_anchor(&aru->tx_pending); |
859 | init_usb_anchor(&aru->tx_submitted); | 865 | init_usb_anchor(&aru->tx_submitted); |
860 | init_completion(&aru->cmd_wait); | 866 | init_completion(&aru->cmd_wait); |
867 | init_completion(&aru->firmware_loading_complete); | ||
861 | spin_lock_init(&aru->tx_urb_lock); | 868 | spin_lock_init(&aru->tx_urb_lock); |
862 | 869 | ||
863 | aru->tx_pending_urbs = 0; | 870 | aru->tx_pending_urbs = 0; |
@@ -877,6 +884,7 @@ static int ar9170_usb_probe(struct usb_interface *intf, | |||
877 | if (err) | 884 | if (err) |
878 | goto err_freehw; | 885 | goto err_freehw; |
879 | 886 | ||
887 | usb_get_dev(aru->udev); | ||
880 | return request_firmware_nowait(THIS_MODULE, 1, "ar9170.fw", | 888 | return request_firmware_nowait(THIS_MODULE, 1, "ar9170.fw", |
881 | &aru->udev->dev, GFP_KERNEL, aru, | 889 | &aru->udev->dev, GFP_KERNEL, aru, |
882 | ar9170_usb_firmware_step2); | 890 | ar9170_usb_firmware_step2); |
@@ -896,6 +904,9 @@ static void ar9170_usb_disconnect(struct usb_interface *intf) | |||
896 | return; | 904 | return; |
897 | 905 | ||
898 | aru->common.state = AR9170_IDLE; | 906 | aru->common.state = AR9170_IDLE; |
907 | |||
908 | wait_for_completion(&aru->firmware_loading_complete); | ||
909 | |||
899 | ar9170_unregister(&aru->common); | 910 | ar9170_unregister(&aru->common); |
900 | ar9170_usb_cancel_urbs(aru); | 911 | ar9170_usb_cancel_urbs(aru); |
901 | 912 | ||
diff --git a/drivers/net/wireless/ath/ar9170/usb.h b/drivers/net/wireless/ath/ar9170/usb.h index a2ce3b169ceb..919b06046eb3 100644 --- a/drivers/net/wireless/ath/ar9170/usb.h +++ b/drivers/net/wireless/ath/ar9170/usb.h | |||
@@ -71,6 +71,7 @@ struct ar9170_usb { | |||
71 | unsigned int tx_pending_urbs; | 71 | unsigned int tx_pending_urbs; |
72 | 72 | ||
73 | struct completion cmd_wait; | 73 | struct completion cmd_wait; |
74 | struct completion firmware_loading_complete; | ||
74 | int readlen; | 75 | int readlen; |
75 | u8 *readbuf; | 76 | u8 *readbuf; |
76 | 77 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index 6383d9f8c9b3..f4e59ae07f8e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
@@ -2621,7 +2621,9 @@ struct iwl_ssid_ie { | |||
2621 | #define PROBE_OPTION_MAX_3945 4 | 2621 | #define PROBE_OPTION_MAX_3945 4 |
2622 | #define PROBE_OPTION_MAX 20 | 2622 | #define PROBE_OPTION_MAX 20 |
2623 | #define TX_CMD_LIFE_TIME_INFINITE cpu_to_le32(0xFFFFFFFF) | 2623 | #define TX_CMD_LIFE_TIME_INFINITE cpu_to_le32(0xFFFFFFFF) |
2624 | #define IWL_GOOD_CRC_TH cpu_to_le16(1) | 2624 | #define IWL_GOOD_CRC_TH_DISABLED 0 |
2625 | #define IWL_GOOD_CRC_TH_DEFAULT cpu_to_le16(1) | ||
2626 | #define IWL_GOOD_CRC_TH_NEVER cpu_to_le16(0xffff) | ||
2625 | #define IWL_MAX_SCAN_SIZE 1024 | 2627 | #define IWL_MAX_SCAN_SIZE 1024 |
2626 | #define IWL_MAX_CMD_SIZE 4096 | 2628 | #define IWL_MAX_CMD_SIZE 4096 |
2627 | #define IWL_MAX_PROBE_REQUEST 200 | 2629 | #define IWL_MAX_PROBE_REQUEST 200 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 12e455a4b90e..741e65ec8301 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -813,16 +813,29 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
813 | rate = IWL_RATE_1M_PLCP; | 813 | rate = IWL_RATE_1M_PLCP; |
814 | rate_flags = RATE_MCS_CCK_MSK; | 814 | rate_flags = RATE_MCS_CCK_MSK; |
815 | } | 815 | } |
816 | scan->good_CRC_th = 0; | 816 | scan->good_CRC_th = IWL_GOOD_CRC_TH_DISABLED; |
817 | } else if (priv->scan_bands & BIT(IEEE80211_BAND_5GHZ)) { | 817 | } else if (priv->scan_bands & BIT(IEEE80211_BAND_5GHZ)) { |
818 | band = IEEE80211_BAND_5GHZ; | 818 | band = IEEE80211_BAND_5GHZ; |
819 | rate = IWL_RATE_6M_PLCP; | 819 | rate = IWL_RATE_6M_PLCP; |
820 | /* | 820 | /* |
821 | * If active scaning is requested but a certain channel | 821 | * If active scanning is requested but a certain channel is |
822 | * is marked passive, we can do active scanning if we | 822 | * marked passive, we can do active scanning if we detect |
823 | * detect transmissions. | 823 | * transmissions. |
824 | * | ||
825 | * There is an issue with some firmware versions that triggers | ||
826 | * a sysassert on a "good CRC threshold" of zero (== disabled), | ||
827 | * on a radar channel even though this means that we should NOT | ||
828 | * send probes. | ||
829 | * | ||
830 | * The "good CRC threshold" is the number of frames that we | ||
831 | * need to receive during our dwell time on a channel before | ||
832 | * sending out probes -- setting this to a huge value will | ||
833 | * mean we never reach it, but at the same time work around | ||
834 | * the aforementioned issue. Thus use IWL_GOOD_CRC_TH_NEVER | ||
835 | * here instead of IWL_GOOD_CRC_TH_DISABLED. | ||
824 | */ | 836 | */ |
825 | scan->good_CRC_th = is_active ? IWL_GOOD_CRC_TH : 0; | 837 | scan->good_CRC_th = is_active ? IWL_GOOD_CRC_TH_DEFAULT : |
838 | IWL_GOOD_CRC_TH_NEVER; | ||
826 | 839 | ||
827 | /* Force use of chains B and C (0x6) for scan Rx for 4965 | 840 | /* Force use of chains B and C (0x6) for scan Rx for 4965 |
828 | * Avoid A (0x1) because of its off-channel reception on A-band. | 841 | * Avoid A (0x1) because of its off-channel reception on A-band. |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index b55e4f39a9e1..b74a56c48d26 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -2967,7 +2967,8 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
2967 | * is marked passive, we can do active scanning if we | 2967 | * is marked passive, we can do active scanning if we |
2968 | * detect transmissions. | 2968 | * detect transmissions. |
2969 | */ | 2969 | */ |
2970 | scan->good_CRC_th = is_active ? IWL_GOOD_CRC_TH : 0; | 2970 | scan->good_CRC_th = is_active ? IWL_GOOD_CRC_TH_DEFAULT : |
2971 | IWL_GOOD_CRC_TH_DISABLED; | ||
2971 | band = IEEE80211_BAND_5GHZ; | 2972 | band = IEEE80211_BAND_5GHZ; |
2972 | } else { | 2973 | } else { |
2973 | IWL_WARN(priv, "Invalid scan band count\n"); | 2974 | IWL_WARN(priv, "Invalid scan band count\n"); |
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 4fe36d2e1049..19b111383f62 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -838,65 +838,11 @@ static void pci_bus_dump_resources(struct pci_bus *bus) | |||
838 | } | 838 | } |
839 | } | 839 | } |
840 | 840 | ||
841 | static int __init pci_bus_get_depth(struct pci_bus *bus) | ||
842 | { | ||
843 | int depth = 0; | ||
844 | struct pci_dev *dev; | ||
845 | |||
846 | list_for_each_entry(dev, &bus->devices, bus_list) { | ||
847 | int ret; | ||
848 | struct pci_bus *b = dev->subordinate; | ||
849 | if (!b) | ||
850 | continue; | ||
851 | |||
852 | ret = pci_bus_get_depth(b); | ||
853 | if (ret + 1 > depth) | ||
854 | depth = ret + 1; | ||
855 | } | ||
856 | |||
857 | return depth; | ||
858 | } | ||
859 | static int __init pci_get_max_depth(void) | ||
860 | { | ||
861 | int depth = 0; | ||
862 | struct pci_bus *bus; | ||
863 | |||
864 | list_for_each_entry(bus, &pci_root_buses, node) { | ||
865 | int ret; | ||
866 | |||
867 | ret = pci_bus_get_depth(bus); | ||
868 | if (ret > depth) | ||
869 | depth = ret; | ||
870 | } | ||
871 | |||
872 | return depth; | ||
873 | } | ||
874 | |||
875 | /* | ||
876 | * first try will not touch pci bridge res | ||
877 | * second and later try will clear small leaf bridge res | ||
878 | * will stop till to the max deepth if can not find good one | ||
879 | */ | ||
880 | void __init | 841 | void __init |
881 | pci_assign_unassigned_resources(void) | 842 | pci_assign_unassigned_resources(void) |
882 | { | 843 | { |
883 | struct pci_bus *bus; | 844 | struct pci_bus *bus; |
884 | int tried_times = 0; | ||
885 | enum release_type rel_type = leaf_only; | ||
886 | struct resource_list_x head, *list; | ||
887 | unsigned long type_mask = IORESOURCE_IO | IORESOURCE_MEM | | ||
888 | IORESOURCE_PREFETCH; | ||
889 | unsigned long failed_type; | ||
890 | int max_depth = pci_get_max_depth(); | ||
891 | int pci_try_num; | ||
892 | 845 | ||
893 | head.next = NULL; | ||
894 | |||
895 | pci_try_num = max_depth + 1; | ||
896 | printk(KERN_DEBUG "PCI: max bus depth: %d pci_try_num: %d\n", | ||
897 | max_depth, pci_try_num); | ||
898 | |||
899 | again: | ||
900 | /* Depth first, calculate sizes and alignments of all | 846 | /* Depth first, calculate sizes and alignments of all |
901 | subordinate buses. */ | 847 | subordinate buses. */ |
902 | list_for_each_entry(bus, &pci_root_buses, node) { | 848 | list_for_each_entry(bus, &pci_root_buses, node) { |
@@ -904,65 +850,9 @@ again: | |||
904 | } | 850 | } |
905 | /* Depth last, allocate resources and update the hardware. */ | 851 | /* Depth last, allocate resources and update the hardware. */ |
906 | list_for_each_entry(bus, &pci_root_buses, node) { | 852 | list_for_each_entry(bus, &pci_root_buses, node) { |
907 | __pci_bus_assign_resources(bus, &head); | 853 | pci_bus_assign_resources(bus); |
908 | } | ||
909 | tried_times++; | ||
910 | |||
911 | /* any device complain? */ | ||
912 | if (!head.next) | ||
913 | goto enable_and_dump; | ||
914 | failed_type = 0; | ||
915 | for (list = head.next; list;) { | ||
916 | failed_type |= list->flags; | ||
917 | list = list->next; | ||
918 | } | ||
919 | /* | ||
920 | * io port are tight, don't try extra | ||
921 | * or if reach the limit, don't want to try more | ||
922 | */ | ||
923 | failed_type &= type_mask; | ||
924 | if ((failed_type == IORESOURCE_IO) || (tried_times >= pci_try_num)) { | ||
925 | free_failed_list(&head); | ||
926 | goto enable_and_dump; | ||
927 | } | ||
928 | |||
929 | printk(KERN_DEBUG "PCI: No. %d try to assign unassigned res\n", | ||
930 | tried_times + 1); | ||
931 | |||
932 | /* third times and later will not check if it is leaf */ | ||
933 | if ((tried_times + 1) > 2) | ||
934 | rel_type = whole_subtree; | ||
935 | |||
936 | /* | ||
937 | * Try to release leaf bridge's resources that doesn't fit resource of | ||
938 | * child device under that bridge | ||
939 | */ | ||
940 | for (list = head.next; list;) { | ||
941 | bus = list->dev->bus; | ||
942 | pci_bus_release_bridge_resources(bus, list->flags & type_mask, | ||
943 | rel_type); | ||
944 | list = list->next; | ||
945 | } | ||
946 | /* restore size and flags */ | ||
947 | for (list = head.next; list;) { | ||
948 | struct resource *res = list->res; | ||
949 | |||
950 | res->start = list->start; | ||
951 | res->end = list->end; | ||
952 | res->flags = list->flags; | ||
953 | if (list->dev->subordinate) | ||
954 | res->flags = 0; | ||
955 | |||
956 | list = list->next; | ||
957 | } | ||
958 | free_failed_list(&head); | ||
959 | |||
960 | goto again; | ||
961 | |||
962 | enable_and_dump: | ||
963 | /* Depth last, update the hardware. */ | ||
964 | list_for_each_entry(bus, &pci_root_buses, node) | ||
965 | pci_enable_bridges(bus); | 854 | pci_enable_bridges(bus); |
855 | } | ||
966 | 856 | ||
967 | /* dump the resource on buses */ | 857 | /* dump the resource on buses */ |
968 | list_for_each_entry(bus, &pci_root_buses, node) { | 858 | list_for_each_entry(bus, &pci_root_buses, node) { |
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index 75ed866e6953..c3383750e333 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c | |||
@@ -671,20 +671,22 @@ static int pccardd(void *__skt) | |||
671 | socket_remove(skt); | 671 | socket_remove(skt); |
672 | if (sysfs_events & PCMCIA_UEVENT_INSERT) | 672 | if (sysfs_events & PCMCIA_UEVENT_INSERT) |
673 | socket_insert(skt); | 673 | socket_insert(skt); |
674 | if ((sysfs_events & PCMCIA_UEVENT_RESUME) && | ||
675 | !(skt->state & SOCKET_CARDBUS)) { | ||
676 | ret = socket_resume(skt); | ||
677 | if (!ret && skt->callback) | ||
678 | skt->callback->resume(skt); | ||
679 | } | ||
680 | if ((sysfs_events & PCMCIA_UEVENT_SUSPEND) && | 674 | if ((sysfs_events & PCMCIA_UEVENT_SUSPEND) && |
681 | !(skt->state & SOCKET_CARDBUS)) { | 675 | !(skt->state & SOCKET_CARDBUS)) { |
682 | if (skt->callback) | 676 | if (skt->callback) |
683 | ret = skt->callback->suspend(skt); | 677 | ret = skt->callback->suspend(skt); |
684 | else | 678 | else |
685 | ret = 0; | 679 | ret = 0; |
686 | if (!ret) | 680 | if (!ret) { |
687 | socket_suspend(skt); | 681 | socket_suspend(skt); |
682 | msleep(100); | ||
683 | } | ||
684 | } | ||
685 | if ((sysfs_events & PCMCIA_UEVENT_RESUME) && | ||
686 | !(skt->state & SOCKET_CARDBUS)) { | ||
687 | ret = socket_resume(skt); | ||
688 | if (!ret && skt->callback) | ||
689 | skt->callback->resume(skt); | ||
688 | } | 690 | } |
689 | if ((sysfs_events & PCMCIA_UEVENT_REQUERY) && | 691 | if ((sysfs_events & PCMCIA_UEVENT_REQUERY) && |
690 | !(skt->state & SOCKET_CARDBUS)) { | 692 | !(skt->state & SOCKET_CARDBUS)) { |
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 508f94a2a78d..041eee43fd8d 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -1283,6 +1283,7 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority) | |||
1283 | destroy_cis_cache(skt); | 1283 | destroy_cis_cache(skt); |
1284 | kfree(skt->fake_cis); | 1284 | kfree(skt->fake_cis); |
1285 | skt->fake_cis = NULL; | 1285 | skt->fake_cis = NULL; |
1286 | s->functions = 0; | ||
1286 | mutex_unlock(&s->ops_mutex); | 1287 | mutex_unlock(&s->ops_mutex); |
1287 | /* now, add the new card */ | 1288 | /* now, add the new card */ |
1288 | ds_event(skt, CS_EVENT_CARD_INSERTION, | 1289 | ds_event(skt, CS_EVENT_CARD_INSERTION, |
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index 104e73d5d86c..7631faa0cadd 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c | |||
@@ -711,7 +711,7 @@ static int ds_open(struct inode *inode, struct file *file) | |||
711 | warning_printed = 1; | 711 | warning_printed = 1; |
712 | } | 712 | } |
713 | 713 | ||
714 | if (s->pcmcia_state.present) | 714 | if (atomic_read(&s->present)) |
715 | queue_event(user, CS_EVENT_CARD_INSERTION); | 715 | queue_event(user, CS_EVENT_CARD_INSERTION); |
716 | out: | 716 | out: |
717 | unlock_kernel(); | 717 | unlock_kernel(); |
@@ -770,9 +770,6 @@ static ssize_t ds_read(struct file *file, char __user *buf, | |||
770 | return -EIO; | 770 | return -EIO; |
771 | 771 | ||
772 | s = user->socket; | 772 | s = user->socket; |
773 | if (s->pcmcia_state.dead) | ||
774 | return -EIO; | ||
775 | |||
776 | ret = wait_event_interruptible(s->queue, !queue_empty(user)); | 773 | ret = wait_event_interruptible(s->queue, !queue_empty(user)); |
777 | if (ret == 0) | 774 | if (ret == 0) |
778 | ret = put_user(get_queued_event(user), (int __user *)buf) ? -EFAULT : 4; | 775 | ret = put_user(get_queued_event(user), (int __user *)buf) ? -EFAULT : 4; |
@@ -838,8 +835,6 @@ static int ds_ioctl(struct inode *inode, struct file *file, | |||
838 | return -EIO; | 835 | return -EIO; |
839 | 836 | ||
840 | s = user->socket; | 837 | s = user->socket; |
841 | if (s->pcmcia_state.dead) | ||
842 | return -EIO; | ||
843 | 838 | ||
844 | size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT; | 839 | size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT; |
845 | if (size > sizeof(ds_ioctl_arg_t)) | 840 | if (size > sizeof(ds_ioctl_arg_t)) |
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 35bb44af49b3..100e4d9372f1 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -274,26 +274,6 @@ static void pnpacpi_parse_allocated_busresource(struct pnp_dev *dev, | |||
274 | pnp_add_bus_resource(dev, start, end); | 274 | pnp_add_bus_resource(dev, start, end); |
275 | } | 275 | } |
276 | 276 | ||
277 | static u64 addr_space_length(struct pnp_dev *dev, u64 min, u64 max, u64 len) | ||
278 | { | ||
279 | u64 max_len; | ||
280 | |||
281 | max_len = max - min + 1; | ||
282 | if (len <= max_len) | ||
283 | return len; | ||
284 | |||
285 | /* | ||
286 | * Per 6.4.3.5, _LEN cannot exceed _MAX - _MIN + 1, but some BIOSes | ||
287 | * don't do this correctly, e.g., | ||
288 | * https://bugzilla.kernel.org/show_bug.cgi?id=15480 | ||
289 | */ | ||
290 | dev_info(&dev->dev, | ||
291 | "resource length %#llx doesn't fit in %#llx-%#llx, trimming\n", | ||
292 | (unsigned long long) len, (unsigned long long) min, | ||
293 | (unsigned long long) max); | ||
294 | return max_len; | ||
295 | } | ||
296 | |||
297 | static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev, | 277 | static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev, |
298 | struct acpi_resource *res) | 278 | struct acpi_resource *res) |
299 | { | 279 | { |
@@ -309,7 +289,8 @@ static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev, | |||
309 | return; | 289 | return; |
310 | } | 290 | } |
311 | 291 | ||
312 | len = addr_space_length(dev, p->minimum, p->maximum, p->address_length); | 292 | /* Windows apparently computes length rather than using _LEN */ |
293 | len = p->maximum - p->minimum + 1; | ||
313 | window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0; | 294 | window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0; |
314 | 295 | ||
315 | if (p->resource_type == ACPI_MEMORY_RANGE) | 296 | if (p->resource_type == ACPI_MEMORY_RANGE) |
@@ -330,7 +311,8 @@ static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev, | |||
330 | int window; | 311 | int window; |
331 | u64 len; | 312 | u64 len; |
332 | 313 | ||
333 | len = addr_space_length(dev, p->minimum, p->maximum, p->address_length); | 314 | /* Windows apparently computes length rather than using _LEN */ |
315 | len = p->maximum - p->minimum + 1; | ||
334 | window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0; | 316 | window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0; |
335 | 317 | ||
336 | if (p->resource_type == ACPI_MEMORY_RANGE) | 318 | if (p->resource_type == ACPI_MEMORY_RANGE) |
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index 2e54e6a23c72..e3446ab8b563 100644 --- a/drivers/pnp/resource.c +++ b/drivers/pnp/resource.c | |||
@@ -211,6 +211,8 @@ int pnp_check_port(struct pnp_dev *dev, struct resource *res) | |||
211 | if (tres->flags & IORESOURCE_IO) { | 211 | if (tres->flags & IORESOURCE_IO) { |
212 | if (cannot_compare(tres->flags)) | 212 | if (cannot_compare(tres->flags)) |
213 | continue; | 213 | continue; |
214 | if (tres->flags & IORESOURCE_WINDOW) | ||
215 | continue; | ||
214 | tport = &tres->start; | 216 | tport = &tres->start; |
215 | tend = &tres->end; | 217 | tend = &tres->end; |
216 | if (ranged_conflict(port, end, tport, tend)) | 218 | if (ranged_conflict(port, end, tport, tend)) |
@@ -271,6 +273,8 @@ int pnp_check_mem(struct pnp_dev *dev, struct resource *res) | |||
271 | if (tres->flags & IORESOURCE_MEM) { | 273 | if (tres->flags & IORESOURCE_MEM) { |
272 | if (cannot_compare(tres->flags)) | 274 | if (cannot_compare(tres->flags)) |
273 | continue; | 275 | continue; |
276 | if (tres->flags & IORESOURCE_WINDOW) | ||
277 | continue; | ||
274 | taddr = &tres->start; | 278 | taddr = &tres->start; |
275 | tend = &tres->end; | 279 | tend = &tres->end; |
276 | if (ranged_conflict(addr, end, taddr, tend)) | 280 | if (ranged_conflict(addr, end, taddr, tend)) |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index acf222f91f5a..fa2339cb1681 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -37,6 +37,9 @@ | |||
37 | */ | 37 | */ |
38 | #define DASD_CHANQ_MAX_SIZE 4 | 38 | #define DASD_CHANQ_MAX_SIZE 4 |
39 | 39 | ||
40 | #define DASD_SLEEPON_START_TAG (void *) 1 | ||
41 | #define DASD_SLEEPON_END_TAG (void *) 2 | ||
42 | |||
40 | /* | 43 | /* |
41 | * SECTION: exported variables of dasd.c | 44 | * SECTION: exported variables of dasd.c |
42 | */ | 45 | */ |
@@ -1472,7 +1475,10 @@ void dasd_add_request_tail(struct dasd_ccw_req *cqr) | |||
1472 | */ | 1475 | */ |
1473 | static void dasd_wakeup_cb(struct dasd_ccw_req *cqr, void *data) | 1476 | static void dasd_wakeup_cb(struct dasd_ccw_req *cqr, void *data) |
1474 | { | 1477 | { |
1475 | wake_up((wait_queue_head_t *) data); | 1478 | spin_lock_irq(get_ccwdev_lock(cqr->startdev->cdev)); |
1479 | cqr->callback_data = DASD_SLEEPON_END_TAG; | ||
1480 | spin_unlock_irq(get_ccwdev_lock(cqr->startdev->cdev)); | ||
1481 | wake_up(&generic_waitq); | ||
1476 | } | 1482 | } |
1477 | 1483 | ||
1478 | static inline int _wait_for_wakeup(struct dasd_ccw_req *cqr) | 1484 | static inline int _wait_for_wakeup(struct dasd_ccw_req *cqr) |
@@ -1482,10 +1488,7 @@ static inline int _wait_for_wakeup(struct dasd_ccw_req *cqr) | |||
1482 | 1488 | ||
1483 | device = cqr->startdev; | 1489 | device = cqr->startdev; |
1484 | spin_lock_irq(get_ccwdev_lock(device->cdev)); | 1490 | spin_lock_irq(get_ccwdev_lock(device->cdev)); |
1485 | rc = ((cqr->status == DASD_CQR_DONE || | 1491 | rc = (cqr->callback_data == DASD_SLEEPON_END_TAG); |
1486 | cqr->status == DASD_CQR_NEED_ERP || | ||
1487 | cqr->status == DASD_CQR_TERMINATED) && | ||
1488 | list_empty(&cqr->devlist)); | ||
1489 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); | 1492 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
1490 | return rc; | 1493 | return rc; |
1491 | } | 1494 | } |
@@ -1573,7 +1576,7 @@ static int _dasd_sleep_on(struct dasd_ccw_req *maincqr, int interruptible) | |||
1573 | wait_event(generic_waitq, !(device->stopped)); | 1576 | wait_event(generic_waitq, !(device->stopped)); |
1574 | 1577 | ||
1575 | cqr->callback = dasd_wakeup_cb; | 1578 | cqr->callback = dasd_wakeup_cb; |
1576 | cqr->callback_data = (void *) &generic_waitq; | 1579 | cqr->callback_data = DASD_SLEEPON_START_TAG; |
1577 | dasd_add_request_tail(cqr); | 1580 | dasd_add_request_tail(cqr); |
1578 | if (interruptible) { | 1581 | if (interruptible) { |
1579 | rc = wait_event_interruptible( | 1582 | rc = wait_event_interruptible( |
@@ -1652,7 +1655,7 @@ int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) | |||
1652 | } | 1655 | } |
1653 | 1656 | ||
1654 | cqr->callback = dasd_wakeup_cb; | 1657 | cqr->callback = dasd_wakeup_cb; |
1655 | cqr->callback_data = (void *) &generic_waitq; | 1658 | cqr->callback_data = DASD_SLEEPON_START_TAG; |
1656 | cqr->status = DASD_CQR_QUEUED; | 1659 | cqr->status = DASD_CQR_QUEUED; |
1657 | list_add(&cqr->devlist, &device->ccw_queue); | 1660 | list_add(&cqr->devlist, &device->ccw_queue); |
1658 | 1661 | ||
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 9201afe65609..7f87979da22d 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
@@ -4724,6 +4724,10 @@ static ushort AscInitMicroCodeVar(ASC_DVC_VAR *asc_dvc) | |||
4724 | BUG_ON((unsigned long)asc_dvc->overrun_buf & 7); | 4724 | BUG_ON((unsigned long)asc_dvc->overrun_buf & 7); |
4725 | asc_dvc->overrun_dma = dma_map_single(board->dev, asc_dvc->overrun_buf, | 4725 | asc_dvc->overrun_dma = dma_map_single(board->dev, asc_dvc->overrun_buf, |
4726 | ASC_OVERRUN_BSIZE, DMA_FROM_DEVICE); | 4726 | ASC_OVERRUN_BSIZE, DMA_FROM_DEVICE); |
4727 | if (dma_mapping_error(board->dev, asc_dvc->overrun_dma)) { | ||
4728 | warn_code = -ENOMEM; | ||
4729 | goto err_dma_map; | ||
4730 | } | ||
4727 | phy_addr = cpu_to_le32(asc_dvc->overrun_dma); | 4731 | phy_addr = cpu_to_le32(asc_dvc->overrun_dma); |
4728 | AscMemDWordCopyPtrToLram(iop_base, ASCV_OVERRUN_PADDR_D, | 4732 | AscMemDWordCopyPtrToLram(iop_base, ASCV_OVERRUN_PADDR_D, |
4729 | (uchar *)&phy_addr, 1); | 4733 | (uchar *)&phy_addr, 1); |
@@ -4739,14 +4743,23 @@ static ushort AscInitMicroCodeVar(ASC_DVC_VAR *asc_dvc) | |||
4739 | AscSetPCAddr(iop_base, ASC_MCODE_START_ADDR); | 4743 | AscSetPCAddr(iop_base, ASC_MCODE_START_ADDR); |
4740 | if (AscGetPCAddr(iop_base) != ASC_MCODE_START_ADDR) { | 4744 | if (AscGetPCAddr(iop_base) != ASC_MCODE_START_ADDR) { |
4741 | asc_dvc->err_code |= ASC_IERR_SET_PC_ADDR; | 4745 | asc_dvc->err_code |= ASC_IERR_SET_PC_ADDR; |
4742 | return warn_code; | 4746 | warn_code = UW_ERR; |
4747 | goto err_mcode_start; | ||
4743 | } | 4748 | } |
4744 | if (AscStartChip(iop_base) != 1) { | 4749 | if (AscStartChip(iop_base) != 1) { |
4745 | asc_dvc->err_code |= ASC_IERR_START_STOP_CHIP; | 4750 | asc_dvc->err_code |= ASC_IERR_START_STOP_CHIP; |
4746 | return warn_code; | 4751 | warn_code = UW_ERR; |
4752 | goto err_mcode_start; | ||
4747 | } | 4753 | } |
4748 | 4754 | ||
4749 | return warn_code; | 4755 | return warn_code; |
4756 | |||
4757 | err_mcode_start: | ||
4758 | dma_unmap_single(board->dev, asc_dvc->overrun_dma, | ||
4759 | ASC_OVERRUN_BSIZE, DMA_FROM_DEVICE); | ||
4760 | err_dma_map: | ||
4761 | asc_dvc->overrun_dma = 0; | ||
4762 | return warn_code; | ||
4750 | } | 4763 | } |
4751 | 4764 | ||
4752 | static ushort AscInitAsc1000Driver(ASC_DVC_VAR *asc_dvc) | 4765 | static ushort AscInitAsc1000Driver(ASC_DVC_VAR *asc_dvc) |
@@ -4802,6 +4815,8 @@ static ushort AscInitAsc1000Driver(ASC_DVC_VAR *asc_dvc) | |||
4802 | } | 4815 | } |
4803 | release_firmware(fw); | 4816 | release_firmware(fw); |
4804 | warn_code |= AscInitMicroCodeVar(asc_dvc); | 4817 | warn_code |= AscInitMicroCodeVar(asc_dvc); |
4818 | if (!asc_dvc->overrun_dma) | ||
4819 | return warn_code; | ||
4805 | asc_dvc->init_state |= ASC_INIT_STATE_END_LOAD_MC; | 4820 | asc_dvc->init_state |= ASC_INIT_STATE_END_LOAD_MC; |
4806 | AscEnableInterrupt(iop_base); | 4821 | AscEnableInterrupt(iop_base); |
4807 | return warn_code; | 4822 | return warn_code; |
@@ -7978,9 +7993,10 @@ static int advansys_reset(struct scsi_cmnd *scp) | |||
7978 | status = AscInitAsc1000Driver(asc_dvc); | 7993 | status = AscInitAsc1000Driver(asc_dvc); |
7979 | 7994 | ||
7980 | /* Refer to ASC_IERR_* definitions for meaning of 'err_code'. */ | 7995 | /* Refer to ASC_IERR_* definitions for meaning of 'err_code'. */ |
7981 | if (asc_dvc->err_code) { | 7996 | if (asc_dvc->err_code || !asc_dvc->overrun_dma) { |
7982 | scmd_printk(KERN_INFO, scp, "SCSI bus reset error: " | 7997 | scmd_printk(KERN_INFO, scp, "SCSI bus reset error: " |
7983 | "0x%x\n", asc_dvc->err_code); | 7998 | "0x%x, status: 0x%x\n", asc_dvc->err_code, |
7999 | status); | ||
7984 | ret = FAILED; | 8000 | ret = FAILED; |
7985 | } else if (status) { | 8001 | } else if (status) { |
7986 | scmd_printk(KERN_INFO, scp, "SCSI bus reset warning: " | 8002 | scmd_printk(KERN_INFO, scp, "SCSI bus reset warning: " |
@@ -12311,7 +12327,7 @@ static int __devinit advansys_board_found(struct Scsi_Host *shost, | |||
12311 | asc_dvc_varp->overrun_buf = kzalloc(ASC_OVERRUN_BSIZE, GFP_KERNEL); | 12327 | asc_dvc_varp->overrun_buf = kzalloc(ASC_OVERRUN_BSIZE, GFP_KERNEL); |
12312 | if (!asc_dvc_varp->overrun_buf) { | 12328 | if (!asc_dvc_varp->overrun_buf) { |
12313 | ret = -ENOMEM; | 12329 | ret = -ENOMEM; |
12314 | goto err_free_wide_mem; | 12330 | goto err_free_irq; |
12315 | } | 12331 | } |
12316 | warn_code = AscInitAsc1000Driver(asc_dvc_varp); | 12332 | warn_code = AscInitAsc1000Driver(asc_dvc_varp); |
12317 | 12333 | ||
@@ -12320,30 +12336,36 @@ static int __devinit advansys_board_found(struct Scsi_Host *shost, | |||
12320 | "warn 0x%x, error 0x%x\n", | 12336 | "warn 0x%x, error 0x%x\n", |
12321 | asc_dvc_varp->init_state, warn_code, | 12337 | asc_dvc_varp->init_state, warn_code, |
12322 | asc_dvc_varp->err_code); | 12338 | asc_dvc_varp->err_code); |
12323 | if (asc_dvc_varp->err_code) { | 12339 | if (!asc_dvc_varp->overrun_dma) { |
12324 | ret = -ENODEV; | 12340 | ret = -ENODEV; |
12325 | kfree(asc_dvc_varp->overrun_buf); | 12341 | goto err_free_mem; |
12326 | } | 12342 | } |
12327 | } | 12343 | } |
12328 | } else { | 12344 | } else { |
12329 | if (advansys_wide_init_chip(shost)) | 12345 | if (advansys_wide_init_chip(shost)) { |
12330 | ret = -ENODEV; | 12346 | ret = -ENODEV; |
12347 | goto err_free_mem; | ||
12348 | } | ||
12331 | } | 12349 | } |
12332 | 12350 | ||
12333 | if (ret) | ||
12334 | goto err_free_wide_mem; | ||
12335 | |||
12336 | ASC_DBG_PRT_SCSI_HOST(2, shost); | 12351 | ASC_DBG_PRT_SCSI_HOST(2, shost); |
12337 | 12352 | ||
12338 | ret = scsi_add_host(shost, boardp->dev); | 12353 | ret = scsi_add_host(shost, boardp->dev); |
12339 | if (ret) | 12354 | if (ret) |
12340 | goto err_free_wide_mem; | 12355 | goto err_free_mem; |
12341 | 12356 | ||
12342 | scsi_scan_host(shost); | 12357 | scsi_scan_host(shost); |
12343 | return 0; | 12358 | return 0; |
12344 | 12359 | ||
12345 | err_free_wide_mem: | 12360 | err_free_mem: |
12346 | advansys_wide_free_mem(boardp); | 12361 | if (ASC_NARROW_BOARD(boardp)) { |
12362 | if (asc_dvc_varp->overrun_dma) | ||
12363 | dma_unmap_single(boardp->dev, asc_dvc_varp->overrun_dma, | ||
12364 | ASC_OVERRUN_BSIZE, DMA_FROM_DEVICE); | ||
12365 | kfree(asc_dvc_varp->overrun_buf); | ||
12366 | } else | ||
12367 | advansys_wide_free_mem(boardp); | ||
12368 | err_free_irq: | ||
12347 | free_irq(boardp->irq, shost); | 12369 | free_irq(boardp->irq, shost); |
12348 | err_free_dma: | 12370 | err_free_dma: |
12349 | #ifdef CONFIG_ISA | 12371 | #ifdef CONFIG_ISA |
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 6d5ae4474bb3..633e09036357 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -471,12 +471,12 @@ static int iscsi_prep_scsi_cmd_pdu(struct iscsi_task *task) | |||
471 | 471 | ||
472 | WARN_ON(hdrlength >= 256); | 472 | WARN_ON(hdrlength >= 256); |
473 | hdr->hlength = hdrlength & 0xFF; | 473 | hdr->hlength = hdrlength & 0xFF; |
474 | hdr->cmdsn = task->cmdsn = cpu_to_be32(session->cmdsn); | ||
474 | 475 | ||
475 | if (session->tt->init_task && session->tt->init_task(task)) | 476 | if (session->tt->init_task && session->tt->init_task(task)) |
476 | return -EIO; | 477 | return -EIO; |
477 | 478 | ||
478 | task->state = ISCSI_TASK_RUNNING; | 479 | task->state = ISCSI_TASK_RUNNING; |
479 | hdr->cmdsn = task->cmdsn = cpu_to_be32(session->cmdsn); | ||
480 | session->cmdsn++; | 480 | session->cmdsn++; |
481 | 481 | ||
482 | conn->scsicmd_pdus_cnt++; | 482 | conn->scsicmd_pdus_cnt++; |
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index b00efd19aadb..88f744672576 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c | |||
@@ -395,11 +395,15 @@ int sas_ata_init_host_and_port(struct domain_device *found_dev, | |||
395 | void sas_ata_task_abort(struct sas_task *task) | 395 | void sas_ata_task_abort(struct sas_task *task) |
396 | { | 396 | { |
397 | struct ata_queued_cmd *qc = task->uldd_task; | 397 | struct ata_queued_cmd *qc = task->uldd_task; |
398 | struct request_queue *q = qc->scsicmd->device->request_queue; | ||
398 | struct completion *waiting; | 399 | struct completion *waiting; |
400 | unsigned long flags; | ||
399 | 401 | ||
400 | /* Bounce SCSI-initiated commands to the SCSI EH */ | 402 | /* Bounce SCSI-initiated commands to the SCSI EH */ |
401 | if (qc->scsicmd) { | 403 | if (qc->scsicmd) { |
404 | spin_lock_irqsave(q->queue_lock, flags); | ||
402 | blk_abort_request(qc->scsicmd->request); | 405 | blk_abort_request(qc->scsicmd->request); |
406 | spin_unlock_irqrestore(q->queue_lock, flags); | ||
403 | scsi_schedule_eh(qc->scsicmd->device->host); | 407 | scsi_schedule_eh(qc->scsicmd->device->host); |
404 | return; | 408 | return; |
405 | } | 409 | } |
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 2660e1b4569a..822835055cef 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -1030,6 +1030,8 @@ int __sas_task_abort(struct sas_task *task) | |||
1030 | void sas_task_abort(struct sas_task *task) | 1030 | void sas_task_abort(struct sas_task *task) |
1031 | { | 1031 | { |
1032 | struct scsi_cmnd *sc = task->uldd_task; | 1032 | struct scsi_cmnd *sc = task->uldd_task; |
1033 | struct request_queue *q = sc->device->request_queue; | ||
1034 | unsigned long flags; | ||
1033 | 1035 | ||
1034 | /* Escape for libsas internal commands */ | 1036 | /* Escape for libsas internal commands */ |
1035 | if (!sc) { | 1037 | if (!sc) { |
@@ -1044,7 +1046,9 @@ void sas_task_abort(struct sas_task *task) | |||
1044 | return; | 1046 | return; |
1045 | } | 1047 | } |
1046 | 1048 | ||
1049 | spin_lock_irqsave(q->queue_lock, flags); | ||
1047 | blk_abort_request(sc->request); | 1050 | blk_abort_request(sc->request); |
1051 | spin_unlock_irqrestore(q->queue_lock, flags); | ||
1048 | scsi_schedule_eh(sc->device->host); | 1052 | scsi_schedule_eh(sc->device->host); |
1049 | } | 1053 | } |
1050 | 1054 | ||
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 3e10c306de94..3a5bfd10b2cb 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -957,7 +957,8 @@ static int resp_start_stop(struct scsi_cmnd * scp, | |||
957 | static sector_t get_sdebug_capacity(void) | 957 | static sector_t get_sdebug_capacity(void) |
958 | { | 958 | { |
959 | if (scsi_debug_virtual_gb > 0) | 959 | if (scsi_debug_virtual_gb > 0) |
960 | return 2048 * 1024 * (sector_t)scsi_debug_virtual_gb; | 960 | return (sector_t)scsi_debug_virtual_gb * |
961 | (1073741824 / scsi_debug_sector_size); | ||
961 | else | 962 | else |
962 | return sdebug_store_sectors; | 963 | return sdebug_store_sectors; |
963 | } | 964 | } |
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index d45c69ca5737..7ad53fa42766 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -302,7 +302,20 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) | |||
302 | if (scmd->device->allow_restart && | 302 | if (scmd->device->allow_restart && |
303 | (sshdr.asc == 0x04) && (sshdr.ascq == 0x02)) | 303 | (sshdr.asc == 0x04) && (sshdr.ascq == 0x02)) |
304 | return FAILED; | 304 | return FAILED; |
305 | return SUCCESS; | 305 | |
306 | if (blk_barrier_rq(scmd->request)) | ||
307 | /* | ||
308 | * barrier requests should always retry on UA | ||
309 | * otherwise block will get a spurious error | ||
310 | */ | ||
311 | return NEEDS_RETRY; | ||
312 | else | ||
313 | /* | ||
314 | * for normal (non barrier) commands, pass the | ||
315 | * UA upwards for a determination in the | ||
316 | * completion functions | ||
317 | */ | ||
318 | return SUCCESS; | ||
306 | 319 | ||
307 | /* these three are not supported */ | 320 | /* these three are not supported */ |
308 | case COPY_ABORTED: | 321 | case COPY_ABORTED: |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 8b827f37b03e..de6c60320f6f 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -1040,6 +1040,7 @@ static void sd_prepare_flush(struct request_queue *q, struct request *rq) | |||
1040 | { | 1040 | { |
1041 | rq->cmd_type = REQ_TYPE_BLOCK_PC; | 1041 | rq->cmd_type = REQ_TYPE_BLOCK_PC; |
1042 | rq->timeout = SD_TIMEOUT; | 1042 | rq->timeout = SD_TIMEOUT; |
1043 | rq->retries = SD_MAX_RETRIES; | ||
1043 | rq->cmd[0] = SYNCHRONIZE_CACHE; | 1044 | rq->cmd[0] = SYNCHRONIZE_CACHE; |
1044 | rq->cmd_len = 10; | 1045 | rq->cmd_len = 10; |
1045 | } | 1046 | } |
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 4315b23590bd..eacb588a9345 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c | |||
@@ -120,7 +120,8 @@ | |||
120 | #define MX2_UCR3_RXDMUXSEL (1<<2) /* RXD Muxed Input Select, on mx2/mx3 */ | 120 | #define MX2_UCR3_RXDMUXSEL (1<<2) /* RXD Muxed Input Select, on mx2/mx3 */ |
121 | #define UCR3_INVT (1<<1) /* Inverted Infrared transmission */ | 121 | #define UCR3_INVT (1<<1) /* Inverted Infrared transmission */ |
122 | #define UCR3_BPEN (1<<0) /* Preset registers enable */ | 122 | #define UCR3_BPEN (1<<0) /* Preset registers enable */ |
123 | #define UCR4_CTSTL_32 (32<<10) /* CTS trigger level (32 chars) */ | 123 | #define UCR4_CTSTL_SHF 10 /* CTS trigger level shift */ |
124 | #define UCR4_CTSTL_MASK 0x3F /* CTS trigger is 6 bits wide */ | ||
124 | #define UCR4_INVR (1<<9) /* Inverted infrared reception */ | 125 | #define UCR4_INVR (1<<9) /* Inverted infrared reception */ |
125 | #define UCR4_ENIRI (1<<8) /* Serial infrared interrupt enable */ | 126 | #define UCR4_ENIRI (1<<8) /* Serial infrared interrupt enable */ |
126 | #define UCR4_WKEN (1<<7) /* Wake interrupt enable */ | 127 | #define UCR4_WKEN (1<<7) /* Wake interrupt enable */ |
@@ -591,6 +592,9 @@ static int imx_setup_ufcr(struct imx_port *sport, unsigned int mode) | |||
591 | return 0; | 592 | return 0; |
592 | } | 593 | } |
593 | 594 | ||
595 | /* half the RX buffer size */ | ||
596 | #define CTSTL 16 | ||
597 | |||
594 | static int imx_startup(struct uart_port *port) | 598 | static int imx_startup(struct uart_port *port) |
595 | { | 599 | { |
596 | struct imx_port *sport = (struct imx_port *)port; | 600 | struct imx_port *sport = (struct imx_port *)port; |
@@ -607,6 +611,10 @@ static int imx_startup(struct uart_port *port) | |||
607 | if (USE_IRDA(sport)) | 611 | if (USE_IRDA(sport)) |
608 | temp |= UCR4_IRSC; | 612 | temp |= UCR4_IRSC; |
609 | 613 | ||
614 | /* set the trigger level for CTS */ | ||
615 | temp &= ~(UCR4_CTSTL_MASK<< UCR4_CTSTL_SHF); | ||
616 | temp |= CTSTL<< UCR4_CTSTL_SHF; | ||
617 | |||
610 | writel(temp & ~UCR4_DREN, sport->port.membase + UCR4); | 618 | writel(temp & ~UCR4_DREN, sport->port.membase + UCR4); |
611 | 619 | ||
612 | if (USE_IRDA(sport)) { | 620 | if (USE_IRDA(sport)) { |
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index a176ab4bd65b..02469c31bf0b 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -1467,7 +1467,7 @@ mpc52xx_uart_init(void) | |||
1467 | /* | 1467 | /* |
1468 | * Map the PSC FIFO Controller and init if on MPC512x. | 1468 | * Map the PSC FIFO Controller and init if on MPC512x. |
1469 | */ | 1469 | */ |
1470 | if (psc_ops->fifoc_init) { | 1470 | if (psc_ops && psc_ops->fifoc_init) { |
1471 | ret = psc_ops->fifoc_init(); | 1471 | ret = psc_ops->fifoc_init(); |
1472 | if (ret) | 1472 | if (ret) |
1473 | return ret; | 1473 | return ret; |
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index e69d238c5af0..49fa953aaf6e 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c | |||
@@ -1035,7 +1035,12 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len) | |||
1035 | /* This actually signals the guest, using eventfd. */ | 1035 | /* This actually signals the guest, using eventfd. */ |
1036 | void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) | 1036 | void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) |
1037 | { | 1037 | { |
1038 | __u16 flags = 0; | 1038 | __u16 flags; |
1039 | /* Flush out used index updates. This is paired | ||
1040 | * with the barrier that the Guest executes when enabling | ||
1041 | * interrupts. */ | ||
1042 | smp_mb(); | ||
1043 | |||
1039 | if (get_user(flags, &vq->avail->flags)) { | 1044 | if (get_user(flags, &vq->avail->flags)) { |
1040 | vq_err(vq, "Failed to get flags"); | 1045 | vq_err(vq, "Failed to get flags"); |
1041 | return; | 1046 | return; |
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c index 44e49c28b2a7..c2ec3dcd4e91 100644 --- a/drivers/video/bfin-t350mcqb-fb.c +++ b/drivers/video/bfin-t350mcqb-fb.c | |||
@@ -488,9 +488,9 @@ static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev) | |||
488 | fbinfo->fbops = &bfin_t350mcqb_fb_ops; | 488 | fbinfo->fbops = &bfin_t350mcqb_fb_ops; |
489 | fbinfo->flags = FBINFO_FLAG_DEFAULT; | 489 | fbinfo->flags = FBINFO_FLAG_DEFAULT; |
490 | 490 | ||
491 | info->fb_buffer = | 491 | info->fb_buffer = dma_alloc_coherent(NULL, fbinfo->fix.smem_len + |
492 | dma_alloc_coherent(NULL, fbinfo->fix.smem_len, &info->dma_handle, | 492 | ACTIVE_VIDEO_MEM_OFFSET, |
493 | GFP_KERNEL); | 493 | &info->dma_handle, GFP_KERNEL); |
494 | 494 | ||
495 | if (NULL == info->fb_buffer) { | 495 | if (NULL == info->fb_buffer) { |
496 | printk(KERN_ERR DRIVER_NAME | 496 | printk(KERN_ERR DRIVER_NAME |
@@ -568,8 +568,8 @@ out7: | |||
568 | out6: | 568 | out6: |
569 | fb_dealloc_cmap(&fbinfo->cmap); | 569 | fb_dealloc_cmap(&fbinfo->cmap); |
570 | out4: | 570 | out4: |
571 | dma_free_coherent(NULL, fbinfo->fix.smem_len, info->fb_buffer, | 571 | dma_free_coherent(NULL, fbinfo->fix.smem_len + ACTIVE_VIDEO_MEM_OFFSET, |
572 | info->dma_handle); | 572 | info->fb_buffer, info->dma_handle); |
573 | out3: | 573 | out3: |
574 | framebuffer_release(fbinfo); | 574 | framebuffer_release(fbinfo); |
575 | out2: | 575 | out2: |
@@ -592,8 +592,9 @@ static int __devexit bfin_t350mcqb_remove(struct platform_device *pdev) | |||
592 | free_irq(info->irq, info); | 592 | free_irq(info->irq, info); |
593 | 593 | ||
594 | if (info->fb_buffer != NULL) | 594 | if (info->fb_buffer != NULL) |
595 | dma_free_coherent(NULL, fbinfo->fix.smem_len, info->fb_buffer, | 595 | dma_free_coherent(NULL, fbinfo->fix.smem_len + |
596 | info->dma_handle); | 596 | ACTIVE_VIDEO_MEM_OFFSET, info->fb_buffer, |
597 | info->dma_handle); | ||
597 | 598 | ||
598 | fb_dealloc_cmap(&fbinfo->cmap); | 599 | fb_dealloc_cmap(&fbinfo->cmap); |
599 | 600 | ||
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index e14bd0749129..e8c769944812 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -695,6 +695,7 @@ static int sh_mobile_lcdc_setup_clocks(struct platform_device *pdev, | |||
695 | * 1) Enable Runtime PM | 695 | * 1) Enable Runtime PM |
696 | * 2) Force Runtime PM Resume since hardware is accessed from probe() | 696 | * 2) Force Runtime PM Resume since hardware is accessed from probe() |
697 | */ | 697 | */ |
698 | priv->dev = &pdev->dev; | ||
698 | pm_runtime_enable(priv->dev); | 699 | pm_runtime_enable(priv->dev); |
699 | pm_runtime_resume(priv->dev); | 700 | pm_runtime_resume(priv->dev); |
700 | return 0; | 701 | return 0; |
@@ -957,25 +958,24 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev) | |||
957 | 958 | ||
958 | if (!pdev->dev.platform_data) { | 959 | if (!pdev->dev.platform_data) { |
959 | dev_err(&pdev->dev, "no platform data defined\n"); | 960 | dev_err(&pdev->dev, "no platform data defined\n"); |
960 | error = -EINVAL; | 961 | return -EINVAL; |
961 | goto err0; | ||
962 | } | 962 | } |
963 | 963 | ||
964 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 964 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
965 | i = platform_get_irq(pdev, 0); | 965 | i = platform_get_irq(pdev, 0); |
966 | if (!res || i < 0) { | 966 | if (!res || i < 0) { |
967 | dev_err(&pdev->dev, "cannot get platform resources\n"); | 967 | dev_err(&pdev->dev, "cannot get platform resources\n"); |
968 | error = -ENOENT; | 968 | return -ENOENT; |
969 | goto err0; | ||
970 | } | 969 | } |
971 | 970 | ||
972 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | 971 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
973 | if (!priv) { | 972 | if (!priv) { |
974 | dev_err(&pdev->dev, "cannot allocate device data\n"); | 973 | dev_err(&pdev->dev, "cannot allocate device data\n"); |
975 | error = -ENOMEM; | 974 | return -ENOMEM; |
976 | goto err0; | ||
977 | } | 975 | } |
978 | 976 | ||
977 | platform_set_drvdata(pdev, priv); | ||
978 | |||
979 | error = request_irq(i, sh_mobile_lcdc_irq, IRQF_DISABLED, | 979 | error = request_irq(i, sh_mobile_lcdc_irq, IRQF_DISABLED, |
980 | dev_name(&pdev->dev), priv); | 980 | dev_name(&pdev->dev), priv); |
981 | if (error) { | 981 | if (error) { |
@@ -984,8 +984,6 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev) | |||
984 | } | 984 | } |
985 | 985 | ||
986 | priv->irq = i; | 986 | priv->irq = i; |
987 | priv->dev = &pdev->dev; | ||
988 | platform_set_drvdata(pdev, priv); | ||
989 | pdata = pdev->dev.platform_data; | 987 | pdata = pdev->dev.platform_data; |
990 | 988 | ||
991 | j = 0; | 989 | j = 0; |
@@ -1099,9 +1097,9 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev) | |||
1099 | info = ch->info; | 1097 | info = ch->info; |
1100 | 1098 | ||
1101 | if (info->fbdefio) { | 1099 | if (info->fbdefio) { |
1102 | priv->ch->sglist = vmalloc(sizeof(struct scatterlist) * | 1100 | ch->sglist = vmalloc(sizeof(struct scatterlist) * |
1103 | info->fix.smem_len >> PAGE_SHIFT); | 1101 | info->fix.smem_len >> PAGE_SHIFT); |
1104 | if (!priv->ch->sglist) { | 1102 | if (!ch->sglist) { |
1105 | dev_err(&pdev->dev, "cannot allocate sglist\n"); | 1103 | dev_err(&pdev->dev, "cannot allocate sglist\n"); |
1106 | goto err1; | 1104 | goto err1; |
1107 | } | 1105 | } |
@@ -1126,9 +1124,9 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev) | |||
1126 | } | 1124 | } |
1127 | 1125 | ||
1128 | return 0; | 1126 | return 0; |
1129 | err1: | 1127 | err1: |
1130 | sh_mobile_lcdc_remove(pdev); | 1128 | sh_mobile_lcdc_remove(pdev); |
1131 | err0: | 1129 | |
1132 | return error; | 1130 | return error; |
1133 | } | 1131 | } |
1134 | 1132 | ||
@@ -1139,7 +1137,7 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev) | |||
1139 | int i; | 1137 | int i; |
1140 | 1138 | ||
1141 | for (i = 0; i < ARRAY_SIZE(priv->ch); i++) | 1139 | for (i = 0; i < ARRAY_SIZE(priv->ch); i++) |
1142 | if (priv->ch[i].info->dev) | 1140 | if (priv->ch[i].info && priv->ch[i].info->dev) |
1143 | unregister_framebuffer(priv->ch[i].info); | 1141 | unregister_framebuffer(priv->ch[i].info); |
1144 | 1142 | ||
1145 | sh_mobile_lcdc_stop(priv); | 1143 | sh_mobile_lcdc_stop(priv); |
@@ -1162,7 +1160,8 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev) | |||
1162 | if (priv->dot_clk) | 1160 | if (priv->dot_clk) |
1163 | clk_put(priv->dot_clk); | 1161 | clk_put(priv->dot_clk); |
1164 | 1162 | ||
1165 | pm_runtime_disable(priv->dev); | 1163 | if (priv->dev) |
1164 | pm_runtime_disable(priv->dev); | ||
1166 | 1165 | ||
1167 | if (priv->base) | 1166 | if (priv->base) |
1168 | iounmap(priv->base); | 1167 | iounmap(priv->base); |
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 0bf5020d0d32..b87ba23442d2 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
@@ -175,7 +175,7 @@ config SA1100_WATCHDOG | |||
175 | 175 | ||
176 | config MPCORE_WATCHDOG | 176 | config MPCORE_WATCHDOG |
177 | tristate "MPcore watchdog" | 177 | tristate "MPcore watchdog" |
178 | depends on ARM_MPCORE_PLATFORM && LOCAL_TIMERS | 178 | depends on HAVE_ARM_TWD |
179 | help | 179 | help |
180 | Watchdog timer embedded into the MPcore system. | 180 | Watchdog timer embedded into the MPcore system. |
181 | 181 | ||
diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c index 016c6a791cab..b8ec7aca3c8e 100644 --- a/drivers/watchdog/mpcore_wdt.c +++ b/drivers/watchdog/mpcore_wdt.c | |||
@@ -31,8 +31,9 @@ | |||
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/uaccess.h> | 32 | #include <linux/uaccess.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <linux/io.h> | ||
34 | 35 | ||
35 | #include <asm/hardware/arm_twd.h> | 36 | #include <asm/smp_twd.h> |
36 | 37 | ||
37 | struct mpcore_wdt { | 38 | struct mpcore_wdt { |
38 | unsigned long timer_alive; | 39 | unsigned long timer_alive; |
@@ -44,7 +45,7 @@ struct mpcore_wdt { | |||
44 | }; | 45 | }; |
45 | 46 | ||
46 | static struct platform_device *mpcore_wdt_dev; | 47 | static struct platform_device *mpcore_wdt_dev; |
47 | extern unsigned int mpcore_timer_rate; | 48 | static DEFINE_SPINLOCK(wdt_lock); |
48 | 49 | ||
49 | #define TIMER_MARGIN 60 | 50 | #define TIMER_MARGIN 60 |
50 | static int mpcore_margin = TIMER_MARGIN; | 51 | static int mpcore_margin = TIMER_MARGIN; |
@@ -94,13 +95,15 @@ static irqreturn_t mpcore_wdt_fire(int irq, void *arg) | |||
94 | */ | 95 | */ |
95 | static void mpcore_wdt_keepalive(struct mpcore_wdt *wdt) | 96 | static void mpcore_wdt_keepalive(struct mpcore_wdt *wdt) |
96 | { | 97 | { |
97 | unsigned int count; | 98 | unsigned long count; |
98 | 99 | ||
100 | spin_lock(&wdt_lock); | ||
99 | /* Assume prescale is set to 256 */ | 101 | /* Assume prescale is set to 256 */ |
100 | count = (mpcore_timer_rate / 256) * mpcore_margin; | 102 | count = __raw_readl(wdt->base + TWD_WDOG_COUNTER); |
103 | count = (0xFFFFFFFFU - count) * (HZ / 5); | ||
104 | count = (count / 256) * mpcore_margin; | ||
101 | 105 | ||
102 | /* Reload the counter */ | 106 | /* Reload the counter */ |
103 | spin_lock(&wdt_lock); | ||
104 | writel(count + wdt->perturb, wdt->base + TWD_WDOG_LOAD); | 107 | writel(count + wdt->perturb, wdt->base + TWD_WDOG_LOAD); |
105 | wdt->perturb = wdt->perturb ? 0 : 1; | 108 | wdt->perturb = wdt->perturb ? 0 : 1; |
106 | spin_unlock(&wdt_lock); | 109 | spin_unlock(&wdt_lock); |
@@ -119,7 +122,6 @@ static void mpcore_wdt_start(struct mpcore_wdt *wdt) | |||
119 | { | 122 | { |
120 | dev_printk(KERN_INFO, wdt->dev, "enabling watchdog.\n"); | 123 | dev_printk(KERN_INFO, wdt->dev, "enabling watchdog.\n"); |
121 | 124 | ||
122 | spin_lock(&wdt_lock); | ||
123 | /* This loads the count register but does NOT start the count yet */ | 125 | /* This loads the count register but does NOT start the count yet */ |
124 | mpcore_wdt_keepalive(wdt); | 126 | mpcore_wdt_keepalive(wdt); |
125 | 127 | ||
@@ -130,7 +132,6 @@ static void mpcore_wdt_start(struct mpcore_wdt *wdt) | |||
130 | /* Enable watchdog - prescale=256, watchdog mode=1, enable=1 */ | 132 | /* Enable watchdog - prescale=256, watchdog mode=1, enable=1 */ |
131 | writel(0x0000FF09, wdt->base + TWD_WDOG_CONTROL); | 133 | writel(0x0000FF09, wdt->base + TWD_WDOG_CONTROL); |
132 | } | 134 | } |
133 | spin_unlock(&wdt_lock); | ||
134 | } | 135 | } |
135 | 136 | ||
136 | static int mpcore_wdt_set_heartbeat(int t) | 137 | static int mpcore_wdt_set_heartbeat(int t) |
@@ -360,7 +361,7 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev) | |||
360 | mpcore_wdt_miscdev.parent = &dev->dev; | 361 | mpcore_wdt_miscdev.parent = &dev->dev; |
361 | ret = misc_register(&mpcore_wdt_miscdev); | 362 | ret = misc_register(&mpcore_wdt_miscdev); |
362 | if (ret) { | 363 | if (ret) { |
363 | dev_printk(KERN_ERR, _dev, | 364 | dev_printk(KERN_ERR, wdt->dev, |
364 | "cannot register miscdev on minor=%d (err=%d)\n", | 365 | "cannot register miscdev on minor=%d (err=%d)\n", |
365 | WATCHDOG_MINOR, ret); | 366 | WATCHDOG_MINOR, ret); |
366 | goto err_misc; | 367 | goto err_misc; |
@@ -369,13 +370,13 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev) | |||
369 | ret = request_irq(wdt->irq, mpcore_wdt_fire, IRQF_DISABLED, | 370 | ret = request_irq(wdt->irq, mpcore_wdt_fire, IRQF_DISABLED, |
370 | "mpcore_wdt", wdt); | 371 | "mpcore_wdt", wdt); |
371 | if (ret) { | 372 | if (ret) { |
372 | dev_printk(KERN_ERR, _dev, | 373 | dev_printk(KERN_ERR, wdt->dev, |
373 | "cannot register IRQ%d for watchdog\n", wdt->irq); | 374 | "cannot register IRQ%d for watchdog\n", wdt->irq); |
374 | goto err_irq; | 375 | goto err_irq; |
375 | } | 376 | } |
376 | 377 | ||
377 | mpcore_wdt_stop(wdt); | 378 | mpcore_wdt_stop(wdt); |
378 | platform_set_drvdata(&dev->dev, wdt); | 379 | platform_set_drvdata(dev, wdt); |
379 | mpcore_wdt_dev = dev; | 380 | mpcore_wdt_dev = dev; |
380 | 381 | ||
381 | return 0; | 382 | return 0; |
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index 109a6c606d92..e8e5e63ac950 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c | |||
@@ -177,8 +177,7 @@ static int try_to_fill_dentry(struct dentry *dentry, int flags) | |||
177 | } | 177 | } |
178 | /* Trigger mount for path component or follow link */ | 178 | /* Trigger mount for path component or follow link */ |
179 | } else if (ino->flags & AUTOFS_INF_PENDING || | 179 | } else if (ino->flags & AUTOFS_INF_PENDING || |
180 | autofs4_need_mount(flags) || | 180 | autofs4_need_mount(flags)) { |
181 | current->link_count) { | ||
182 | DPRINTK("waiting for mount name=%.*s", | 181 | DPRINTK("waiting for mount name=%.*s", |
183 | dentry->d_name.len, dentry->d_name.name); | 182 | dentry->d_name.len, dentry->d_name.name); |
184 | 183 | ||
@@ -262,7 +261,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
262 | spin_unlock(&dcache_lock); | 261 | spin_unlock(&dcache_lock); |
263 | spin_unlock(&sbi->fs_lock); | 262 | spin_unlock(&sbi->fs_lock); |
264 | 263 | ||
265 | status = try_to_fill_dentry(dentry, 0); | 264 | status = try_to_fill_dentry(dentry, nd->flags); |
266 | if (status) | 265 | if (status) |
267 | goto out_error; | 266 | goto out_error; |
268 | 267 | ||
diff --git a/fs/cachefiles/internal.h b/fs/cachefiles/internal.h index f7c255f9c624..a8cd821226da 100644 --- a/fs/cachefiles/internal.h +++ b/fs/cachefiles/internal.h | |||
@@ -34,6 +34,7 @@ struct cachefiles_object { | |||
34 | loff_t i_size; /* object size */ | 34 | loff_t i_size; /* object size */ |
35 | unsigned long flags; | 35 | unsigned long flags; |
36 | #define CACHEFILES_OBJECT_ACTIVE 0 /* T if marked active */ | 36 | #define CACHEFILES_OBJECT_ACTIVE 0 /* T if marked active */ |
37 | #define CACHEFILES_OBJECT_BURIED 1 /* T if preemptively buried */ | ||
37 | atomic_t usage; /* object usage count */ | 38 | atomic_t usage; /* object usage count */ |
38 | uint8_t type; /* object type */ | 39 | uint8_t type; /* object type */ |
39 | uint8_t new; /* T if object new */ | 40 | uint8_t new; /* T if object new */ |
diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index d5db84a1ee0d..f4a7840bf42c 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c | |||
@@ -93,6 +93,59 @@ static noinline void cachefiles_printk_object(struct cachefiles_object *object, | |||
93 | } | 93 | } |
94 | 94 | ||
95 | /* | 95 | /* |
96 | * mark the owner of a dentry, if there is one, to indicate that that dentry | ||
97 | * has been preemptively deleted | ||
98 | * - the caller must hold the i_mutex on the dentry's parent as required to | ||
99 | * call vfs_unlink(), vfs_rmdir() or vfs_rename() | ||
100 | */ | ||
101 | static void cachefiles_mark_object_buried(struct cachefiles_cache *cache, | ||
102 | struct dentry *dentry) | ||
103 | { | ||
104 | struct cachefiles_object *object; | ||
105 | struct rb_node *p; | ||
106 | |||
107 | _enter(",'%*.*s'", | ||
108 | dentry->d_name.len, dentry->d_name.len, dentry->d_name.name); | ||
109 | |||
110 | write_lock(&cache->active_lock); | ||
111 | |||
112 | p = cache->active_nodes.rb_node; | ||
113 | while (p) { | ||
114 | object = rb_entry(p, struct cachefiles_object, active_node); | ||
115 | if (object->dentry > dentry) | ||
116 | p = p->rb_left; | ||
117 | else if (object->dentry < dentry) | ||
118 | p = p->rb_right; | ||
119 | else | ||
120 | goto found_dentry; | ||
121 | } | ||
122 | |||
123 | write_unlock(&cache->active_lock); | ||
124 | _leave(" [no owner]"); | ||
125 | return; | ||
126 | |||
127 | /* found the dentry for */ | ||
128 | found_dentry: | ||
129 | kdebug("preemptive burial: OBJ%x [%s] %p", | ||
130 | object->fscache.debug_id, | ||
131 | fscache_object_states[object->fscache.state], | ||
132 | dentry); | ||
133 | |||
134 | if (object->fscache.state < FSCACHE_OBJECT_DYING) { | ||
135 | printk(KERN_ERR "\n"); | ||
136 | printk(KERN_ERR "CacheFiles: Error:" | ||
137 | " Can't preemptively bury live object\n"); | ||
138 | cachefiles_printk_object(object, NULL); | ||
139 | } else if (test_and_set_bit(CACHEFILES_OBJECT_BURIED, &object->flags)) { | ||
140 | printk(KERN_ERR "CacheFiles: Error:" | ||
141 | " Object already preemptively buried\n"); | ||
142 | } | ||
143 | |||
144 | write_unlock(&cache->active_lock); | ||
145 | _leave(" [owner marked]"); | ||
146 | } | ||
147 | |||
148 | /* | ||
96 | * record the fact that an object is now active | 149 | * record the fact that an object is now active |
97 | */ | 150 | */ |
98 | static int cachefiles_mark_object_active(struct cachefiles_cache *cache, | 151 | static int cachefiles_mark_object_active(struct cachefiles_cache *cache, |
@@ -219,7 +272,8 @@ requeue: | |||
219 | */ | 272 | */ |
220 | static int cachefiles_bury_object(struct cachefiles_cache *cache, | 273 | static int cachefiles_bury_object(struct cachefiles_cache *cache, |
221 | struct dentry *dir, | 274 | struct dentry *dir, |
222 | struct dentry *rep) | 275 | struct dentry *rep, |
276 | bool preemptive) | ||
223 | { | 277 | { |
224 | struct dentry *grave, *trap; | 278 | struct dentry *grave, *trap; |
225 | char nbuffer[8 + 8 + 1]; | 279 | char nbuffer[8 + 8 + 1]; |
@@ -229,11 +283,16 @@ static int cachefiles_bury_object(struct cachefiles_cache *cache, | |||
229 | dir->d_name.len, dir->d_name.len, dir->d_name.name, | 283 | dir->d_name.len, dir->d_name.len, dir->d_name.name, |
230 | rep->d_name.len, rep->d_name.len, rep->d_name.name); | 284 | rep->d_name.len, rep->d_name.len, rep->d_name.name); |
231 | 285 | ||
286 | _debug("remove %p from %p", rep, dir); | ||
287 | |||
232 | /* non-directories can just be unlinked */ | 288 | /* non-directories can just be unlinked */ |
233 | if (!S_ISDIR(rep->d_inode->i_mode)) { | 289 | if (!S_ISDIR(rep->d_inode->i_mode)) { |
234 | _debug("unlink stale object"); | 290 | _debug("unlink stale object"); |
235 | ret = vfs_unlink(dir->d_inode, rep); | 291 | ret = vfs_unlink(dir->d_inode, rep); |
236 | 292 | ||
293 | if (preemptive) | ||
294 | cachefiles_mark_object_buried(cache, rep); | ||
295 | |||
237 | mutex_unlock(&dir->d_inode->i_mutex); | 296 | mutex_unlock(&dir->d_inode->i_mutex); |
238 | 297 | ||
239 | if (ret == -EIO) | 298 | if (ret == -EIO) |
@@ -325,6 +384,9 @@ try_again: | |||
325 | if (ret != 0 && ret != -ENOMEM) | 384 | if (ret != 0 && ret != -ENOMEM) |
326 | cachefiles_io_error(cache, "Rename failed with error %d", ret); | 385 | cachefiles_io_error(cache, "Rename failed with error %d", ret); |
327 | 386 | ||
387 | if (preemptive) | ||
388 | cachefiles_mark_object_buried(cache, rep); | ||
389 | |||
328 | unlock_rename(cache->graveyard, dir); | 390 | unlock_rename(cache->graveyard, dir); |
329 | dput(grave); | 391 | dput(grave); |
330 | _leave(" = 0"); | 392 | _leave(" = 0"); |
@@ -340,7 +402,7 @@ int cachefiles_delete_object(struct cachefiles_cache *cache, | |||
340 | struct dentry *dir; | 402 | struct dentry *dir; |
341 | int ret; | 403 | int ret; |
342 | 404 | ||
343 | _enter(",{%p}", object->dentry); | 405 | _enter(",OBJ%x{%p}", object->fscache.debug_id, object->dentry); |
344 | 406 | ||
345 | ASSERT(object->dentry); | 407 | ASSERT(object->dentry); |
346 | ASSERT(object->dentry->d_inode); | 408 | ASSERT(object->dentry->d_inode); |
@@ -350,15 +412,25 @@ int cachefiles_delete_object(struct cachefiles_cache *cache, | |||
350 | 412 | ||
351 | mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT); | 413 | mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT); |
352 | 414 | ||
353 | /* we need to check that our parent is _still_ our parent - it may have | 415 | if (test_bit(CACHEFILES_OBJECT_BURIED, &object->flags)) { |
354 | * been renamed */ | 416 | /* object allocation for the same key preemptively deleted this |
355 | if (dir == object->dentry->d_parent) { | 417 | * object's file so that it could create its own file */ |
356 | ret = cachefiles_bury_object(cache, dir, object->dentry); | 418 | _debug("object preemptively buried"); |
357 | } else { | ||
358 | /* it got moved, presumably by cachefilesd culling it, so it's | ||
359 | * no longer in the key path and we can ignore it */ | ||
360 | mutex_unlock(&dir->d_inode->i_mutex); | 419 | mutex_unlock(&dir->d_inode->i_mutex); |
361 | ret = 0; | 420 | ret = 0; |
421 | } else { | ||
422 | /* we need to check that our parent is _still_ our parent - it | ||
423 | * may have been renamed */ | ||
424 | if (dir == object->dentry->d_parent) { | ||
425 | ret = cachefiles_bury_object(cache, dir, | ||
426 | object->dentry, false); | ||
427 | } else { | ||
428 | /* it got moved, presumably by cachefilesd culling it, | ||
429 | * so it's no longer in the key path and we can ignore | ||
430 | * it */ | ||
431 | mutex_unlock(&dir->d_inode->i_mutex); | ||
432 | ret = 0; | ||
433 | } | ||
362 | } | 434 | } |
363 | 435 | ||
364 | dput(dir); | 436 | dput(dir); |
@@ -381,7 +453,9 @@ int cachefiles_walk_to_object(struct cachefiles_object *parent, | |||
381 | const char *name; | 453 | const char *name; |
382 | int ret, nlen; | 454 | int ret, nlen; |
383 | 455 | ||
384 | _enter("{%p},,%s,", parent->dentry, key); | 456 | _enter("OBJ%x{%p},OBJ%x,%s,", |
457 | parent->fscache.debug_id, parent->dentry, | ||
458 | object->fscache.debug_id, key); | ||
385 | 459 | ||
386 | cache = container_of(parent->fscache.cache, | 460 | cache = container_of(parent->fscache.cache, |
387 | struct cachefiles_cache, cache); | 461 | struct cachefiles_cache, cache); |
@@ -509,7 +583,7 @@ lookup_again: | |||
509 | * mutex) */ | 583 | * mutex) */ |
510 | object->dentry = NULL; | 584 | object->dentry = NULL; |
511 | 585 | ||
512 | ret = cachefiles_bury_object(cache, dir, next); | 586 | ret = cachefiles_bury_object(cache, dir, next, true); |
513 | dput(next); | 587 | dput(next); |
514 | next = NULL; | 588 | next = NULL; |
515 | 589 | ||
@@ -828,7 +902,7 @@ int cachefiles_cull(struct cachefiles_cache *cache, struct dentry *dir, | |||
828 | /* actually remove the victim (drops the dir mutex) */ | 902 | /* actually remove the victim (drops the dir mutex) */ |
829 | _debug("bury"); | 903 | _debug("bury"); |
830 | 904 | ||
831 | ret = cachefiles_bury_object(cache, dir, victim); | 905 | ret = cachefiles_bury_object(cache, dir, victim, false); |
832 | if (ret < 0) | 906 | if (ret < 0) |
833 | goto error; | 907 | goto error; |
834 | 908 | ||
diff --git a/fs/cachefiles/security.c b/fs/cachefiles/security.c index b5808cdb2232..039b5011d83b 100644 --- a/fs/cachefiles/security.c +++ b/fs/cachefiles/security.c | |||
@@ -77,6 +77,8 @@ static int cachefiles_check_cache_dir(struct cachefiles_cache *cache, | |||
77 | /* | 77 | /* |
78 | * check the security details of the on-disk cache | 78 | * check the security details of the on-disk cache |
79 | * - must be called with security override in force | 79 | * - must be called with security override in force |
80 | * - must return with a security override in force - even in the case of an | ||
81 | * error | ||
80 | */ | 82 | */ |
81 | int cachefiles_determine_cache_security(struct cachefiles_cache *cache, | 83 | int cachefiles_determine_cache_security(struct cachefiles_cache *cache, |
82 | struct dentry *root, | 84 | struct dentry *root, |
@@ -99,6 +101,8 @@ int cachefiles_determine_cache_security(struct cachefiles_cache *cache, | |||
99 | * which create files */ | 101 | * which create files */ |
100 | ret = set_create_files_as(new, root->d_inode); | 102 | ret = set_create_files_as(new, root->d_inode); |
101 | if (ret < 0) { | 103 | if (ret < 0) { |
104 | abort_creds(new); | ||
105 | cachefiles_begin_secure(cache, _saved_cred); | ||
102 | _leave(" = %d [cfa]", ret); | 106 | _leave(" = %d [cfa]", ret); |
103 | return ret; | 107 | return ret; |
104 | } | 108 | } |
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 4b42c2bb603f..a9005d862ed4 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
@@ -504,7 +504,6 @@ static void writepages_finish(struct ceph_osd_request *req, | |||
504 | int i; | 504 | int i; |
505 | struct ceph_snap_context *snapc = req->r_snapc; | 505 | struct ceph_snap_context *snapc = req->r_snapc; |
506 | struct address_space *mapping = inode->i_mapping; | 506 | struct address_space *mapping = inode->i_mapping; |
507 | struct writeback_control *wbc = req->r_wbc; | ||
508 | __s32 rc = -EIO; | 507 | __s32 rc = -EIO; |
509 | u64 bytes = 0; | 508 | u64 bytes = 0; |
510 | struct ceph_client *client = ceph_inode_to_client(inode); | 509 | struct ceph_client *client = ceph_inode_to_client(inode); |
@@ -546,10 +545,6 @@ static void writepages_finish(struct ceph_osd_request *req, | |||
546 | clear_bdi_congested(&client->backing_dev_info, | 545 | clear_bdi_congested(&client->backing_dev_info, |
547 | BLK_RW_ASYNC); | 546 | BLK_RW_ASYNC); |
548 | 547 | ||
549 | if (i >= wrote) { | ||
550 | dout("inode %p skipping page %p\n", inode, page); | ||
551 | wbc->pages_skipped++; | ||
552 | } | ||
553 | ceph_put_snap_context((void *)page->private); | 548 | ceph_put_snap_context((void *)page->private); |
554 | page->private = 0; | 549 | page->private = 0; |
555 | ClearPagePrivate(page); | 550 | ClearPagePrivate(page); |
@@ -799,7 +794,6 @@ get_more_pages: | |||
799 | alloc_page_vec(client, req); | 794 | alloc_page_vec(client, req); |
800 | req->r_callback = writepages_finish; | 795 | req->r_callback = writepages_finish; |
801 | req->r_inode = inode; | 796 | req->r_inode = inode; |
802 | req->r_wbc = wbc; | ||
803 | } | 797 | } |
804 | 798 | ||
805 | /* note position of first page in pvec */ | 799 | /* note position of first page in pvec */ |
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 0c1681806867..d9400534b279 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -858,6 +858,8 @@ static int __ceph_is_any_caps(struct ceph_inode_info *ci) | |||
858 | } | 858 | } |
859 | 859 | ||
860 | /* | 860 | /* |
861 | * Remove a cap. Take steps to deal with a racing iterate_session_caps. | ||
862 | * | ||
861 | * caller should hold i_lock. | 863 | * caller should hold i_lock. |
862 | * caller will not hold session s_mutex if called from destroy_inode. | 864 | * caller will not hold session s_mutex if called from destroy_inode. |
863 | */ | 865 | */ |
@@ -866,15 +868,10 @@ void __ceph_remove_cap(struct ceph_cap *cap) | |||
866 | struct ceph_mds_session *session = cap->session; | 868 | struct ceph_mds_session *session = cap->session; |
867 | struct ceph_inode_info *ci = cap->ci; | 869 | struct ceph_inode_info *ci = cap->ci; |
868 | struct ceph_mds_client *mdsc = &ceph_client(ci->vfs_inode.i_sb)->mdsc; | 870 | struct ceph_mds_client *mdsc = &ceph_client(ci->vfs_inode.i_sb)->mdsc; |
871 | int removed = 0; | ||
869 | 872 | ||
870 | dout("__ceph_remove_cap %p from %p\n", cap, &ci->vfs_inode); | 873 | dout("__ceph_remove_cap %p from %p\n", cap, &ci->vfs_inode); |
871 | 874 | ||
872 | /* remove from inode list */ | ||
873 | rb_erase(&cap->ci_node, &ci->i_caps); | ||
874 | cap->ci = NULL; | ||
875 | if (ci->i_auth_cap == cap) | ||
876 | ci->i_auth_cap = NULL; | ||
877 | |||
878 | /* remove from session list */ | 875 | /* remove from session list */ |
879 | spin_lock(&session->s_cap_lock); | 876 | spin_lock(&session->s_cap_lock); |
880 | if (session->s_cap_iterator == cap) { | 877 | if (session->s_cap_iterator == cap) { |
@@ -885,10 +882,18 @@ void __ceph_remove_cap(struct ceph_cap *cap) | |||
885 | list_del_init(&cap->session_caps); | 882 | list_del_init(&cap->session_caps); |
886 | session->s_nr_caps--; | 883 | session->s_nr_caps--; |
887 | cap->session = NULL; | 884 | cap->session = NULL; |
885 | removed = 1; | ||
888 | } | 886 | } |
887 | /* protect backpointer with s_cap_lock: see iterate_session_caps */ | ||
888 | cap->ci = NULL; | ||
889 | spin_unlock(&session->s_cap_lock); | 889 | spin_unlock(&session->s_cap_lock); |
890 | 890 | ||
891 | if (cap->session == NULL) | 891 | /* remove from inode list */ |
892 | rb_erase(&cap->ci_node, &ci->i_caps); | ||
893 | if (ci->i_auth_cap == cap) | ||
894 | ci->i_auth_cap = NULL; | ||
895 | |||
896 | if (removed) | ||
892 | ceph_put_cap(cap); | 897 | ceph_put_cap(cap); |
893 | 898 | ||
894 | if (!__ceph_is_any_caps(ci) && ci->i_snap_realm) { | 899 | if (!__ceph_is_any_caps(ci) && ci->i_snap_realm) { |
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 261f3e6c0bcf..85b4d2ffdeba 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -733,6 +733,10 @@ no_change: | |||
733 | __ceph_get_fmode(ci, cap_fmode); | 733 | __ceph_get_fmode(ci, cap_fmode); |
734 | spin_unlock(&inode->i_lock); | 734 | spin_unlock(&inode->i_lock); |
735 | } | 735 | } |
736 | } else if (cap_fmode >= 0) { | ||
737 | pr_warning("mds issued no caps on %llx.%llx\n", | ||
738 | ceph_vinop(inode)); | ||
739 | __ceph_get_fmode(ci, cap_fmode); | ||
736 | } | 740 | } |
737 | 741 | ||
738 | /* update delegation info? */ | 742 | /* update delegation info? */ |
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 60a9a4ae47be..24561a557e01 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -736,9 +736,10 @@ static void cleanup_cap_releases(struct ceph_mds_session *session) | |||
736 | } | 736 | } |
737 | 737 | ||
738 | /* | 738 | /* |
739 | * Helper to safely iterate over all caps associated with a session. | 739 | * Helper to safely iterate over all caps associated with a session, with |
740 | * special care taken to handle a racing __ceph_remove_cap(). | ||
740 | * | 741 | * |
741 | * caller must hold session s_mutex | 742 | * Caller must hold session s_mutex. |
742 | */ | 743 | */ |
743 | static int iterate_session_caps(struct ceph_mds_session *session, | 744 | static int iterate_session_caps(struct ceph_mds_session *session, |
744 | int (*cb)(struct inode *, struct ceph_cap *, | 745 | int (*cb)(struct inode *, struct ceph_cap *, |
@@ -2136,7 +2137,7 @@ static void send_mds_reconnect(struct ceph_mds_client *mdsc, int mds) | |||
2136 | struct ceph_mds_session *session = NULL; | 2137 | struct ceph_mds_session *session = NULL; |
2137 | struct ceph_msg *reply; | 2138 | struct ceph_msg *reply; |
2138 | struct rb_node *p; | 2139 | struct rb_node *p; |
2139 | int err; | 2140 | int err = -ENOMEM; |
2140 | struct ceph_pagelist *pagelist; | 2141 | struct ceph_pagelist *pagelist; |
2141 | 2142 | ||
2142 | pr_info("reconnect to recovering mds%d\n", mds); | 2143 | pr_info("reconnect to recovering mds%d\n", mds); |
@@ -2185,7 +2186,7 @@ static void send_mds_reconnect(struct ceph_mds_client *mdsc, int mds) | |||
2185 | goto fail; | 2186 | goto fail; |
2186 | err = iterate_session_caps(session, encode_caps_cb, pagelist); | 2187 | err = iterate_session_caps(session, encode_caps_cb, pagelist); |
2187 | if (err < 0) | 2188 | if (err < 0) |
2188 | goto out; | 2189 | goto fail; |
2189 | 2190 | ||
2190 | /* | 2191 | /* |
2191 | * snaprealms. we provide mds with the ino, seq (version), and | 2192 | * snaprealms. we provide mds with the ino, seq (version), and |
@@ -2213,28 +2214,31 @@ send: | |||
2213 | reply->nr_pages = calc_pages_for(0, pagelist->length); | 2214 | reply->nr_pages = calc_pages_for(0, pagelist->length); |
2214 | ceph_con_send(&session->s_con, reply); | 2215 | ceph_con_send(&session->s_con, reply); |
2215 | 2216 | ||
2216 | if (session) { | 2217 | session->s_state = CEPH_MDS_SESSION_OPEN; |
2217 | session->s_state = CEPH_MDS_SESSION_OPEN; | 2218 | mutex_unlock(&session->s_mutex); |
2218 | __wake_requests(mdsc, &session->s_waiting); | 2219 | |
2219 | } | 2220 | mutex_lock(&mdsc->mutex); |
2221 | __wake_requests(mdsc, &session->s_waiting); | ||
2222 | mutex_unlock(&mdsc->mutex); | ||
2223 | |||
2224 | ceph_put_mds_session(session); | ||
2220 | 2225 | ||
2221 | out: | ||
2222 | up_read(&mdsc->snap_rwsem); | 2226 | up_read(&mdsc->snap_rwsem); |
2223 | if (session) { | ||
2224 | mutex_unlock(&session->s_mutex); | ||
2225 | ceph_put_mds_session(session); | ||
2226 | } | ||
2227 | mutex_lock(&mdsc->mutex); | 2227 | mutex_lock(&mdsc->mutex); |
2228 | return; | 2228 | return; |
2229 | 2229 | ||
2230 | fail: | 2230 | fail: |
2231 | ceph_msg_put(reply); | 2231 | ceph_msg_put(reply); |
2232 | up_read(&mdsc->snap_rwsem); | ||
2233 | mutex_unlock(&session->s_mutex); | ||
2234 | ceph_put_mds_session(session); | ||
2232 | fail_nomsg: | 2235 | fail_nomsg: |
2233 | ceph_pagelist_release(pagelist); | 2236 | ceph_pagelist_release(pagelist); |
2234 | kfree(pagelist); | 2237 | kfree(pagelist); |
2235 | fail_nopagelist: | 2238 | fail_nopagelist: |
2236 | pr_err("ENOMEM preparing reconnect for mds%d\n", mds); | 2239 | pr_err("error %d preparing reconnect for mds%d\n", err, mds); |
2237 | goto out; | 2240 | mutex_lock(&mdsc->mutex); |
2241 | return; | ||
2238 | } | 2242 | } |
2239 | 2243 | ||
2240 | 2244 | ||
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index 509f57d9ccb3..cd4fadb6491a 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c | |||
@@ -492,7 +492,14 @@ static void prepare_write_message(struct ceph_connection *con) | |||
492 | list_move_tail(&m->list_head, &con->out_sent); | 492 | list_move_tail(&m->list_head, &con->out_sent); |
493 | } | 493 | } |
494 | 494 | ||
495 | m->hdr.seq = cpu_to_le64(++con->out_seq); | 495 | /* |
496 | * only assign outgoing seq # if we haven't sent this message | ||
497 | * yet. if it is requeued, resend with it's original seq. | ||
498 | */ | ||
499 | if (m->needs_out_seq) { | ||
500 | m->hdr.seq = cpu_to_le64(++con->out_seq); | ||
501 | m->needs_out_seq = false; | ||
502 | } | ||
496 | 503 | ||
497 | dout("prepare_write_message %p seq %lld type %d len %d+%d+%d %d pgs\n", | 504 | dout("prepare_write_message %p seq %lld type %d len %d+%d+%d %d pgs\n", |
498 | m, con->out_seq, le16_to_cpu(m->hdr.type), | 505 | m, con->out_seq, le16_to_cpu(m->hdr.type), |
@@ -1986,6 +1993,8 @@ void ceph_con_send(struct ceph_connection *con, struct ceph_msg *msg) | |||
1986 | 1993 | ||
1987 | BUG_ON(msg->front.iov_len != le32_to_cpu(msg->hdr.front_len)); | 1994 | BUG_ON(msg->front.iov_len != le32_to_cpu(msg->hdr.front_len)); |
1988 | 1995 | ||
1996 | msg->needs_out_seq = true; | ||
1997 | |||
1989 | /* queue */ | 1998 | /* queue */ |
1990 | mutex_lock(&con->mutex); | 1999 | mutex_lock(&con->mutex); |
1991 | BUG_ON(!list_empty(&msg->list_head)); | 2000 | BUG_ON(!list_empty(&msg->list_head)); |
@@ -2085,15 +2094,19 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, | |||
2085 | kref_init(&m->kref); | 2094 | kref_init(&m->kref); |
2086 | INIT_LIST_HEAD(&m->list_head); | 2095 | INIT_LIST_HEAD(&m->list_head); |
2087 | 2096 | ||
2097 | m->hdr.tid = 0; | ||
2088 | m->hdr.type = cpu_to_le16(type); | 2098 | m->hdr.type = cpu_to_le16(type); |
2099 | m->hdr.priority = cpu_to_le16(CEPH_MSG_PRIO_DEFAULT); | ||
2100 | m->hdr.version = 0; | ||
2089 | m->hdr.front_len = cpu_to_le32(front_len); | 2101 | m->hdr.front_len = cpu_to_le32(front_len); |
2090 | m->hdr.middle_len = 0; | 2102 | m->hdr.middle_len = 0; |
2091 | m->hdr.data_len = cpu_to_le32(page_len); | 2103 | m->hdr.data_len = cpu_to_le32(page_len); |
2092 | m->hdr.data_off = cpu_to_le16(page_off); | 2104 | m->hdr.data_off = cpu_to_le16(page_off); |
2093 | m->hdr.priority = cpu_to_le16(CEPH_MSG_PRIO_DEFAULT); | 2105 | m->hdr.reserved = 0; |
2094 | m->footer.front_crc = 0; | 2106 | m->footer.front_crc = 0; |
2095 | m->footer.middle_crc = 0; | 2107 | m->footer.middle_crc = 0; |
2096 | m->footer.data_crc = 0; | 2108 | m->footer.data_crc = 0; |
2109 | m->footer.flags = 0; | ||
2097 | m->front_max = front_len; | 2110 | m->front_max = front_len; |
2098 | m->front_is_vmalloc = false; | 2111 | m->front_is_vmalloc = false; |
2099 | m->more_to_follow = false; | 2112 | m->more_to_follow = false; |
diff --git a/fs/ceph/messenger.h b/fs/ceph/messenger.h index a343dae73cdc..a5caf91cc971 100644 --- a/fs/ceph/messenger.h +++ b/fs/ceph/messenger.h | |||
@@ -86,6 +86,7 @@ struct ceph_msg { | |||
86 | struct kref kref; | 86 | struct kref kref; |
87 | bool front_is_vmalloc; | 87 | bool front_is_vmalloc; |
88 | bool more_to_follow; | 88 | bool more_to_follow; |
89 | bool needs_out_seq; | ||
89 | int front_max; | 90 | int front_max; |
90 | 91 | ||
91 | struct ceph_msgpool *pool; | 92 | struct ceph_msgpool *pool; |
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c index c7b4dedaace6..3514f71ff85f 100644 --- a/fs/ceph/osd_client.c +++ b/fs/ceph/osd_client.c | |||
@@ -565,7 +565,8 @@ static int __map_osds(struct ceph_osd_client *osdc, | |||
565 | { | 565 | { |
566 | struct ceph_osd_request_head *reqhead = req->r_request->front.iov_base; | 566 | struct ceph_osd_request_head *reqhead = req->r_request->front.iov_base; |
567 | struct ceph_pg pgid; | 567 | struct ceph_pg pgid; |
568 | int o = -1; | 568 | int acting[CEPH_PG_MAX_SIZE]; |
569 | int o = -1, num = 0; | ||
569 | int err; | 570 | int err; |
570 | 571 | ||
571 | dout("map_osds %p tid %lld\n", req, req->r_tid); | 572 | dout("map_osds %p tid %lld\n", req, req->r_tid); |
@@ -576,10 +577,16 @@ static int __map_osds(struct ceph_osd_client *osdc, | |||
576 | pgid = reqhead->layout.ol_pgid; | 577 | pgid = reqhead->layout.ol_pgid; |
577 | req->r_pgid = pgid; | 578 | req->r_pgid = pgid; |
578 | 579 | ||
579 | o = ceph_calc_pg_primary(osdc->osdmap, pgid); | 580 | err = ceph_calc_pg_acting(osdc->osdmap, pgid, acting); |
581 | if (err > 0) { | ||
582 | o = acting[0]; | ||
583 | num = err; | ||
584 | } | ||
580 | 585 | ||
581 | if ((req->r_osd && req->r_osd->o_osd == o && | 586 | if ((req->r_osd && req->r_osd->o_osd == o && |
582 | req->r_sent >= req->r_osd->o_incarnation) || | 587 | req->r_sent >= req->r_osd->o_incarnation && |
588 | req->r_num_pg_osds == num && | ||
589 | memcmp(req->r_pg_osds, acting, sizeof(acting[0])*num) == 0) || | ||
583 | (req->r_osd == NULL && o == -1)) | 590 | (req->r_osd == NULL && o == -1)) |
584 | return 0; /* no change */ | 591 | return 0; /* no change */ |
585 | 592 | ||
@@ -587,6 +594,10 @@ static int __map_osds(struct ceph_osd_client *osdc, | |||
587 | req->r_tid, le32_to_cpu(pgid.pool), le16_to_cpu(pgid.ps), o, | 594 | req->r_tid, le32_to_cpu(pgid.pool), le16_to_cpu(pgid.ps), o, |
588 | req->r_osd ? req->r_osd->o_osd : -1); | 595 | req->r_osd ? req->r_osd->o_osd : -1); |
589 | 596 | ||
597 | /* record full pg acting set */ | ||
598 | memcpy(req->r_pg_osds, acting, sizeof(acting[0]) * num); | ||
599 | req->r_num_pg_osds = num; | ||
600 | |||
590 | if (req->r_osd) { | 601 | if (req->r_osd) { |
591 | __cancel_request(req); | 602 | __cancel_request(req); |
592 | list_del_init(&req->r_osd_item); | 603 | list_del_init(&req->r_osd_item); |
@@ -612,7 +623,7 @@ static int __map_osds(struct ceph_osd_client *osdc, | |||
612 | __remove_osd_from_lru(req->r_osd); | 623 | __remove_osd_from_lru(req->r_osd); |
613 | list_add(&req->r_osd_item, &req->r_osd->o_requests); | 624 | list_add(&req->r_osd_item, &req->r_osd->o_requests); |
614 | } | 625 | } |
615 | err = 1; /* osd changed */ | 626 | err = 1; /* osd or pg changed */ |
616 | 627 | ||
617 | out: | 628 | out: |
618 | return err; | 629 | return err; |
@@ -779,16 +790,18 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg, | |||
779 | struct ceph_osd_request *req; | 790 | struct ceph_osd_request *req; |
780 | u64 tid; | 791 | u64 tid; |
781 | int numops, object_len, flags; | 792 | int numops, object_len, flags; |
793 | s32 result; | ||
782 | 794 | ||
783 | tid = le64_to_cpu(msg->hdr.tid); | 795 | tid = le64_to_cpu(msg->hdr.tid); |
784 | if (msg->front.iov_len < sizeof(*rhead)) | 796 | if (msg->front.iov_len < sizeof(*rhead)) |
785 | goto bad; | 797 | goto bad; |
786 | numops = le32_to_cpu(rhead->num_ops); | 798 | numops = le32_to_cpu(rhead->num_ops); |
787 | object_len = le32_to_cpu(rhead->object_len); | 799 | object_len = le32_to_cpu(rhead->object_len); |
800 | result = le32_to_cpu(rhead->result); | ||
788 | if (msg->front.iov_len != sizeof(*rhead) + object_len + | 801 | if (msg->front.iov_len != sizeof(*rhead) + object_len + |
789 | numops * sizeof(struct ceph_osd_op)) | 802 | numops * sizeof(struct ceph_osd_op)) |
790 | goto bad; | 803 | goto bad; |
791 | dout("handle_reply %p tid %llu\n", msg, tid); | 804 | dout("handle_reply %p tid %llu result %d\n", msg, tid, (int)result); |
792 | 805 | ||
793 | /* lookup */ | 806 | /* lookup */ |
794 | mutex_lock(&osdc->request_mutex); | 807 | mutex_lock(&osdc->request_mutex); |
@@ -834,7 +847,8 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg, | |||
834 | dout("handle_reply tid %llu flags %d\n", tid, flags); | 847 | dout("handle_reply tid %llu flags %d\n", tid, flags); |
835 | 848 | ||
836 | /* either this is a read, or we got the safe response */ | 849 | /* either this is a read, or we got the safe response */ |
837 | if ((flags & CEPH_OSD_FLAG_ONDISK) || | 850 | if (result < 0 || |
851 | (flags & CEPH_OSD_FLAG_ONDISK) || | ||
838 | ((flags & CEPH_OSD_FLAG_WRITE) == 0)) | 852 | ((flags & CEPH_OSD_FLAG_WRITE) == 0)) |
839 | __unregister_request(osdc, req); | 853 | __unregister_request(osdc, req); |
840 | 854 | ||
diff --git a/fs/ceph/osd_client.h b/fs/ceph/osd_client.h index b0759911e7c3..ce776989ef6a 100644 --- a/fs/ceph/osd_client.h +++ b/fs/ceph/osd_client.h | |||
@@ -48,6 +48,8 @@ struct ceph_osd_request { | |||
48 | struct list_head r_osd_item; | 48 | struct list_head r_osd_item; |
49 | struct ceph_osd *r_osd; | 49 | struct ceph_osd *r_osd; |
50 | struct ceph_pg r_pgid; | 50 | struct ceph_pg r_pgid; |
51 | int r_pg_osds[CEPH_PG_MAX_SIZE]; | ||
52 | int r_num_pg_osds; | ||
51 | 53 | ||
52 | struct ceph_connection *r_con_filling_msg; | 54 | struct ceph_connection *r_con_filling_msg; |
53 | 55 | ||
@@ -66,7 +68,6 @@ struct ceph_osd_request { | |||
66 | struct list_head r_unsafe_item; | 68 | struct list_head r_unsafe_item; |
67 | 69 | ||
68 | struct inode *r_inode; /* for use by callbacks */ | 70 | struct inode *r_inode; /* for use by callbacks */ |
69 | struct writeback_control *r_wbc; /* ditto */ | ||
70 | 71 | ||
71 | char r_oid[40]; /* object name */ | 72 | char r_oid[40]; /* object name */ |
72 | int r_oid_len; | 73 | int r_oid_len; |
diff --git a/fs/ceph/osdmap.c b/fs/ceph/osdmap.c index 2e2c15eed82a..cfdd8f4388b7 100644 --- a/fs/ceph/osdmap.c +++ b/fs/ceph/osdmap.c | |||
@@ -1041,12 +1041,33 @@ static int *calc_pg_raw(struct ceph_osdmap *osdmap, struct ceph_pg pgid, | |||
1041 | } | 1041 | } |
1042 | 1042 | ||
1043 | /* | 1043 | /* |
1044 | * Return acting set for given pgid. | ||
1045 | */ | ||
1046 | int ceph_calc_pg_acting(struct ceph_osdmap *osdmap, struct ceph_pg pgid, | ||
1047 | int *acting) | ||
1048 | { | ||
1049 | int rawosds[CEPH_PG_MAX_SIZE], *osds; | ||
1050 | int i, o, num = CEPH_PG_MAX_SIZE; | ||
1051 | |||
1052 | osds = calc_pg_raw(osdmap, pgid, rawosds, &num); | ||
1053 | if (!osds) | ||
1054 | return -1; | ||
1055 | |||
1056 | /* primary is first up osd */ | ||
1057 | o = 0; | ||
1058 | for (i = 0; i < num; i++) | ||
1059 | if (ceph_osd_is_up(osdmap, osds[i])) | ||
1060 | acting[o++] = osds[i]; | ||
1061 | return o; | ||
1062 | } | ||
1063 | |||
1064 | /* | ||
1044 | * Return primary osd for given pgid, or -1 if none. | 1065 | * Return primary osd for given pgid, or -1 if none. |
1045 | */ | 1066 | */ |
1046 | int ceph_calc_pg_primary(struct ceph_osdmap *osdmap, struct ceph_pg pgid) | 1067 | int ceph_calc_pg_primary(struct ceph_osdmap *osdmap, struct ceph_pg pgid) |
1047 | { | 1068 | { |
1048 | int rawosds[10], *osds; | 1069 | int rawosds[CEPH_PG_MAX_SIZE], *osds; |
1049 | int i, num = ARRAY_SIZE(rawosds); | 1070 | int i, num = CEPH_PG_MAX_SIZE; |
1050 | 1071 | ||
1051 | osds = calc_pg_raw(osdmap, pgid, rawosds, &num); | 1072 | osds = calc_pg_raw(osdmap, pgid, rawosds, &num); |
1052 | if (!osds) | 1073 | if (!osds) |
@@ -1054,9 +1075,7 @@ int ceph_calc_pg_primary(struct ceph_osdmap *osdmap, struct ceph_pg pgid) | |||
1054 | 1075 | ||
1055 | /* primary is first up osd */ | 1076 | /* primary is first up osd */ |
1056 | for (i = 0; i < num; i++) | 1077 | for (i = 0; i < num; i++) |
1057 | if (ceph_osd_is_up(osdmap, osds[i])) { | 1078 | if (ceph_osd_is_up(osdmap, osds[i])) |
1058 | return osds[i]; | 1079 | return osds[i]; |
1059 | break; | ||
1060 | } | ||
1061 | return -1; | 1080 | return -1; |
1062 | } | 1081 | } |
diff --git a/fs/ceph/osdmap.h b/fs/ceph/osdmap.h index 8bc9f1e4f562..970b547e510d 100644 --- a/fs/ceph/osdmap.h +++ b/fs/ceph/osdmap.h | |||
@@ -120,6 +120,8 @@ extern int ceph_calc_object_layout(struct ceph_object_layout *ol, | |||
120 | const char *oid, | 120 | const char *oid, |
121 | struct ceph_file_layout *fl, | 121 | struct ceph_file_layout *fl, |
122 | struct ceph_osdmap *osdmap); | 122 | struct ceph_osdmap *osdmap); |
123 | extern int ceph_calc_pg_acting(struct ceph_osdmap *osdmap, struct ceph_pg pgid, | ||
124 | int *acting); | ||
123 | extern int ceph_calc_pg_primary(struct ceph_osdmap *osdmap, | 125 | extern int ceph_calc_pg_primary(struct ceph_osdmap *osdmap, |
124 | struct ceph_pg pgid); | 126 | struct ceph_pg pgid); |
125 | 127 | ||
diff --git a/fs/ceph/rados.h b/fs/ceph/rados.h index a1fc1d017b58..fd56451a871f 100644 --- a/fs/ceph/rados.h +++ b/fs/ceph/rados.h | |||
@@ -58,6 +58,7 @@ struct ceph_timespec { | |||
58 | #define CEPH_PG_LAYOUT_LINEAR 2 | 58 | #define CEPH_PG_LAYOUT_LINEAR 2 |
59 | #define CEPH_PG_LAYOUT_HYBRID 3 | 59 | #define CEPH_PG_LAYOUT_HYBRID 3 |
60 | 60 | ||
61 | #define CEPH_PG_MAX_SIZE 16 /* max # osds in a single pg */ | ||
61 | 62 | ||
62 | /* | 63 | /* |
63 | * placement group. | 64 | * placement group. |
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index f888cf487b7c..110857ba9269 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c | |||
@@ -47,10 +47,20 @@ const char *ceph_file_part(const char *s, int len) | |||
47 | */ | 47 | */ |
48 | static void ceph_put_super(struct super_block *s) | 48 | static void ceph_put_super(struct super_block *s) |
49 | { | 49 | { |
50 | struct ceph_client *cl = ceph_client(s); | 50 | struct ceph_client *client = ceph_sb_to_client(s); |
51 | 51 | ||
52 | dout("put_super\n"); | 52 | dout("put_super\n"); |
53 | ceph_mdsc_close_sessions(&cl->mdsc); | 53 | ceph_mdsc_close_sessions(&client->mdsc); |
54 | |||
55 | /* | ||
56 | * ensure we release the bdi before put_anon_super releases | ||
57 | * the device name. | ||
58 | */ | ||
59 | if (s->s_bdi == &client->backing_dev_info) { | ||
60 | bdi_unregister(&client->backing_dev_info); | ||
61 | s->s_bdi = NULL; | ||
62 | } | ||
63 | |||
54 | return; | 64 | return; |
55 | } | 65 | } |
56 | 66 | ||
@@ -636,6 +646,8 @@ static void ceph_destroy_client(struct ceph_client *client) | |||
636 | destroy_workqueue(client->pg_inv_wq); | 646 | destroy_workqueue(client->pg_inv_wq); |
637 | destroy_workqueue(client->trunc_wq); | 647 | destroy_workqueue(client->trunc_wq); |
638 | 648 | ||
649 | bdi_destroy(&client->backing_dev_info); | ||
650 | |||
639 | if (client->msgr) | 651 | if (client->msgr) |
640 | ceph_messenger_destroy(client->msgr); | 652 | ceph_messenger_destroy(client->msgr); |
641 | mempool_destroy(client->wb_pagevec_pool); | 653 | mempool_destroy(client->wb_pagevec_pool); |
@@ -876,14 +888,14 @@ static int ceph_register_bdi(struct super_block *sb, struct ceph_client *client) | |||
876 | { | 888 | { |
877 | int err; | 889 | int err; |
878 | 890 | ||
879 | sb->s_bdi = &client->backing_dev_info; | ||
880 | |||
881 | /* set ra_pages based on rsize mount option? */ | 891 | /* set ra_pages based on rsize mount option? */ |
882 | if (client->mount_args->rsize >= PAGE_CACHE_SIZE) | 892 | if (client->mount_args->rsize >= PAGE_CACHE_SIZE) |
883 | client->backing_dev_info.ra_pages = | 893 | client->backing_dev_info.ra_pages = |
884 | (client->mount_args->rsize + PAGE_CACHE_SIZE - 1) | 894 | (client->mount_args->rsize + PAGE_CACHE_SIZE - 1) |
885 | >> PAGE_SHIFT; | 895 | >> PAGE_SHIFT; |
886 | err = bdi_register_dev(&client->backing_dev_info, sb->s_dev); | 896 | err = bdi_register_dev(&client->backing_dev_info, sb->s_dev); |
897 | if (!err) | ||
898 | sb->s_bdi = &client->backing_dev_info; | ||
887 | return err; | 899 | return err; |
888 | } | 900 | } |
889 | 901 | ||
@@ -957,9 +969,6 @@ static void ceph_kill_sb(struct super_block *s) | |||
957 | dout("kill_sb %p\n", s); | 969 | dout("kill_sb %p\n", s); |
958 | ceph_mdsc_pre_umount(&client->mdsc); | 970 | ceph_mdsc_pre_umount(&client->mdsc); |
959 | kill_anon_super(s); /* will call put_super after sb is r/o */ | 971 | kill_anon_super(s); /* will call put_super after sb is r/o */ |
960 | if (s->s_bdi == &client->backing_dev_info) | ||
961 | bdi_unregister(&client->backing_dev_info); | ||
962 | bdi_destroy(&client->backing_dev_info); | ||
963 | ceph_destroy_client(client); | 972 | ceph_destroy_client(client); |
964 | } | 973 | } |
965 | 974 | ||
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index ecf0ffbe2b64..0c2fd17439c8 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -502,6 +502,7 @@ struct dfs_info3_param { | |||
502 | #define CIFS_FATTR_DFS_REFERRAL 0x1 | 502 | #define CIFS_FATTR_DFS_REFERRAL 0x1 |
503 | #define CIFS_FATTR_DELETE_PENDING 0x2 | 503 | #define CIFS_FATTR_DELETE_PENDING 0x2 |
504 | #define CIFS_FATTR_NEED_REVAL 0x4 | 504 | #define CIFS_FATTR_NEED_REVAL 0x4 |
505 | #define CIFS_FATTR_INO_COLLISION 0x8 | ||
505 | 506 | ||
506 | struct cifs_fattr { | 507 | struct cifs_fattr { |
507 | u32 cf_flags; | 508 | u32 cf_flags; |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 35ec11716213..29b9ea244c81 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -715,6 +715,16 @@ cifs_find_inode(struct inode *inode, void *opaque) | |||
715 | if (CIFS_I(inode)->uniqueid != fattr->cf_uniqueid) | 715 | if (CIFS_I(inode)->uniqueid != fattr->cf_uniqueid) |
716 | return 0; | 716 | return 0; |
717 | 717 | ||
718 | /* | ||
719 | * uh oh -- it's a directory. We can't use it since hardlinked dirs are | ||
720 | * verboten. Disable serverino and return it as if it were found, the | ||
721 | * caller can discard it, generate a uniqueid and retry the find | ||
722 | */ | ||
723 | if (S_ISDIR(inode->i_mode) && !list_empty(&inode->i_dentry)) { | ||
724 | fattr->cf_flags |= CIFS_FATTR_INO_COLLISION; | ||
725 | cifs_autodisable_serverino(CIFS_SB(inode->i_sb)); | ||
726 | } | ||
727 | |||
718 | return 1; | 728 | return 1; |
719 | } | 729 | } |
720 | 730 | ||
@@ -734,15 +744,22 @@ cifs_iget(struct super_block *sb, struct cifs_fattr *fattr) | |||
734 | unsigned long hash; | 744 | unsigned long hash; |
735 | struct inode *inode; | 745 | struct inode *inode; |
736 | 746 | ||
747 | retry_iget5_locked: | ||
737 | cFYI(1, ("looking for uniqueid=%llu", fattr->cf_uniqueid)); | 748 | cFYI(1, ("looking for uniqueid=%llu", fattr->cf_uniqueid)); |
738 | 749 | ||
739 | /* hash down to 32-bits on 32-bit arch */ | 750 | /* hash down to 32-bits on 32-bit arch */ |
740 | hash = cifs_uniqueid_to_ino_t(fattr->cf_uniqueid); | 751 | hash = cifs_uniqueid_to_ino_t(fattr->cf_uniqueid); |
741 | 752 | ||
742 | inode = iget5_locked(sb, hash, cifs_find_inode, cifs_init_inode, fattr); | 753 | inode = iget5_locked(sb, hash, cifs_find_inode, cifs_init_inode, fattr); |
743 | |||
744 | /* we have fattrs in hand, update the inode */ | ||
745 | if (inode) { | 754 | if (inode) { |
755 | /* was there a problematic inode number collision? */ | ||
756 | if (fattr->cf_flags & CIFS_FATTR_INO_COLLISION) { | ||
757 | iput(inode); | ||
758 | fattr->cf_uniqueid = iunique(sb, ROOT_I); | ||
759 | fattr->cf_flags &= ~CIFS_FATTR_INO_COLLISION; | ||
760 | goto retry_iget5_locked; | ||
761 | } | ||
762 | |||
746 | cifs_fattr_to_inode(inode, fattr); | 763 | cifs_fattr_to_inode(inode, fattr); |
747 | if (sb->s_flags & MS_NOATIME) | 764 | if (sb->s_flags & MS_NOATIME) |
748 | inode->i_flags |= S_NOATIME | S_NOCMTIME; | 765 | inode->i_flags |= S_NOATIME | S_NOCMTIME; |
diff --git a/fs/compat.c b/fs/compat.c index 4b6ed03cc478..05448730f840 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -1531,8 +1531,6 @@ int compat_do_execve(char * filename, | |||
1531 | if (retval < 0) | 1531 | if (retval < 0) |
1532 | goto out; | 1532 | goto out; |
1533 | 1533 | ||
1534 | current->stack_start = current->mm->start_stack; | ||
1535 | |||
1536 | /* execve succeeded */ | 1534 | /* execve succeeded */ |
1537 | current->fs->in_exec = 0; | 1535 | current->fs->in_exec = 0; |
1538 | current->in_execve = 0; | 1536 | current->in_execve = 0; |
@@ -1387,8 +1387,6 @@ int do_execve(char * filename, | |||
1387 | if (retval < 0) | 1387 | if (retval < 0) |
1388 | goto out; | 1388 | goto out; |
1389 | 1389 | ||
1390 | current->stack_start = current->mm->start_stack; | ||
1391 | |||
1392 | /* execve succeeded */ | 1390 | /* execve succeeded */ |
1393 | current->fs->in_exec = 0; | 1391 | current->fs->in_exec = 0; |
1394 | current->in_execve = 0; | 1392 | current->in_execve = 0; |
diff --git a/fs/namei.c b/fs/namei.c index a7dce91a7e42..16df7277a92e 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1641,7 +1641,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path, | |||
1641 | if (nd->last.name[nd->last.len]) { | 1641 | if (nd->last.name[nd->last.len]) { |
1642 | if (open_flag & O_CREAT) | 1642 | if (open_flag & O_CREAT) |
1643 | goto exit; | 1643 | goto exit; |
1644 | nd->flags |= LOOKUP_DIRECTORY; | 1644 | nd->flags |= LOOKUP_DIRECTORY | LOOKUP_FOLLOW; |
1645 | } | 1645 | } |
1646 | 1646 | ||
1647 | /* just plain open? */ | 1647 | /* just plain open? */ |
@@ -1830,6 +1830,8 @@ reval: | |||
1830 | } | 1830 | } |
1831 | if (open_flag & O_DIRECTORY) | 1831 | if (open_flag & O_DIRECTORY) |
1832 | nd.flags |= LOOKUP_DIRECTORY; | 1832 | nd.flags |= LOOKUP_DIRECTORY; |
1833 | if (!(open_flag & O_NOFOLLOW)) | ||
1834 | nd.flags |= LOOKUP_FOLLOW; | ||
1833 | filp = do_last(&nd, &path, open_flag, acc_mode, mode, pathname); | 1835 | filp = do_last(&nd, &path, open_flag, acc_mode, mode, pathname); |
1834 | while (unlikely(!filp)) { /* trailing symlink */ | 1836 | while (unlikely(!filp)) { /* trailing symlink */ |
1835 | struct path holder; | 1837 | struct path holder; |
@@ -1837,7 +1839,7 @@ reval: | |||
1837 | void *cookie; | 1839 | void *cookie; |
1838 | error = -ELOOP; | 1840 | error = -ELOOP; |
1839 | /* S_ISDIR part is a temporary automount kludge */ | 1841 | /* S_ISDIR part is a temporary automount kludge */ |
1840 | if ((open_flag & O_NOFOLLOW) && !S_ISDIR(inode->i_mode)) | 1842 | if (!(nd.flags & LOOKUP_FOLLOW) && !S_ISDIR(inode->i_mode)) |
1841 | goto exit_dput; | 1843 | goto exit_dput; |
1842 | if (count++ == 32) | 1844 | if (count++ == 32) |
1843 | goto exit_dput; | 1845 | goto exit_dput; |
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 15671245c6ee..ea61d26e7871 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c | |||
@@ -24,6 +24,8 @@ | |||
24 | 24 | ||
25 | static void nfs_do_free_delegation(struct nfs_delegation *delegation) | 25 | static void nfs_do_free_delegation(struct nfs_delegation *delegation) |
26 | { | 26 | { |
27 | if (delegation->cred) | ||
28 | put_rpccred(delegation->cred); | ||
27 | kfree(delegation); | 29 | kfree(delegation); |
28 | } | 30 | } |
29 | 31 | ||
@@ -36,13 +38,7 @@ static void nfs_free_delegation_callback(struct rcu_head *head) | |||
36 | 38 | ||
37 | static void nfs_free_delegation(struct nfs_delegation *delegation) | 39 | static void nfs_free_delegation(struct nfs_delegation *delegation) |
38 | { | 40 | { |
39 | struct rpc_cred *cred; | ||
40 | |||
41 | cred = rcu_dereference(delegation->cred); | ||
42 | rcu_assign_pointer(delegation->cred, NULL); | ||
43 | call_rcu(&delegation->rcu, nfs_free_delegation_callback); | 41 | call_rcu(&delegation->rcu, nfs_free_delegation_callback); |
44 | if (cred) | ||
45 | put_rpccred(cred); | ||
46 | } | 42 | } |
47 | 43 | ||
48 | void nfs_mark_delegation_referenced(struct nfs_delegation *delegation) | 44 | void nfs_mark_delegation_referenced(struct nfs_delegation *delegation) |
@@ -129,21 +125,35 @@ again: | |||
129 | */ | 125 | */ |
130 | void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res) | 126 | void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res) |
131 | { | 127 | { |
132 | struct nfs_delegation *delegation = NFS_I(inode)->delegation; | 128 | struct nfs_delegation *delegation; |
133 | struct rpc_cred *oldcred; | 129 | struct rpc_cred *oldcred = NULL; |
134 | 130 | ||
135 | if (delegation == NULL) | 131 | rcu_read_lock(); |
136 | return; | 132 | delegation = rcu_dereference(NFS_I(inode)->delegation); |
137 | memcpy(delegation->stateid.data, res->delegation.data, | 133 | if (delegation != NULL) { |
138 | sizeof(delegation->stateid.data)); | 134 | spin_lock(&delegation->lock); |
139 | delegation->type = res->delegation_type; | 135 | if (delegation->inode != NULL) { |
140 | delegation->maxsize = res->maxsize; | 136 | memcpy(delegation->stateid.data, res->delegation.data, |
141 | oldcred = delegation->cred; | 137 | sizeof(delegation->stateid.data)); |
142 | delegation->cred = get_rpccred(cred); | 138 | delegation->type = res->delegation_type; |
143 | clear_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags); | 139 | delegation->maxsize = res->maxsize; |
144 | NFS_I(inode)->delegation_state = delegation->type; | 140 | oldcred = delegation->cred; |
145 | smp_wmb(); | 141 | delegation->cred = get_rpccred(cred); |
146 | put_rpccred(oldcred); | 142 | clear_bit(NFS_DELEGATION_NEED_RECLAIM, |
143 | &delegation->flags); | ||
144 | NFS_I(inode)->delegation_state = delegation->type; | ||
145 | spin_unlock(&delegation->lock); | ||
146 | put_rpccred(oldcred); | ||
147 | rcu_read_unlock(); | ||
148 | } else { | ||
149 | /* We appear to have raced with a delegation return. */ | ||
150 | spin_unlock(&delegation->lock); | ||
151 | rcu_read_unlock(); | ||
152 | nfs_inode_set_delegation(inode, cred, res); | ||
153 | } | ||
154 | } else { | ||
155 | rcu_read_unlock(); | ||
156 | } | ||
147 | } | 157 | } |
148 | 158 | ||
149 | static int nfs_do_return_delegation(struct inode *inode, struct nfs_delegation *delegation, int issync) | 159 | static int nfs_do_return_delegation(struct inode *inode, struct nfs_delegation *delegation, int issync) |
@@ -166,9 +176,13 @@ static struct inode *nfs_delegation_grab_inode(struct nfs_delegation *delegation | |||
166 | return inode; | 176 | return inode; |
167 | } | 177 | } |
168 | 178 | ||
169 | static struct nfs_delegation *nfs_detach_delegation_locked(struct nfs_inode *nfsi, const nfs4_stateid *stateid) | 179 | static struct nfs_delegation *nfs_detach_delegation_locked(struct nfs_inode *nfsi, |
180 | const nfs4_stateid *stateid, | ||
181 | struct nfs_client *clp) | ||
170 | { | 182 | { |
171 | struct nfs_delegation *delegation = rcu_dereference(nfsi->delegation); | 183 | struct nfs_delegation *delegation = |
184 | rcu_dereference_protected(nfsi->delegation, | ||
185 | lockdep_is_held(&clp->cl_lock)); | ||
172 | 186 | ||
173 | if (delegation == NULL) | 187 | if (delegation == NULL) |
174 | goto nomatch; | 188 | goto nomatch; |
@@ -195,7 +209,7 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct | |||
195 | { | 209 | { |
196 | struct nfs_client *clp = NFS_SERVER(inode)->nfs_client; | 210 | struct nfs_client *clp = NFS_SERVER(inode)->nfs_client; |
197 | struct nfs_inode *nfsi = NFS_I(inode); | 211 | struct nfs_inode *nfsi = NFS_I(inode); |
198 | struct nfs_delegation *delegation; | 212 | struct nfs_delegation *delegation, *old_delegation; |
199 | struct nfs_delegation *freeme = NULL; | 213 | struct nfs_delegation *freeme = NULL; |
200 | int status = 0; | 214 | int status = 0; |
201 | 215 | ||
@@ -213,10 +227,12 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct | |||
213 | spin_lock_init(&delegation->lock); | 227 | spin_lock_init(&delegation->lock); |
214 | 228 | ||
215 | spin_lock(&clp->cl_lock); | 229 | spin_lock(&clp->cl_lock); |
216 | if (rcu_dereference(nfsi->delegation) != NULL) { | 230 | old_delegation = rcu_dereference_protected(nfsi->delegation, |
217 | if (memcmp(&delegation->stateid, &nfsi->delegation->stateid, | 231 | lockdep_is_held(&clp->cl_lock)); |
218 | sizeof(delegation->stateid)) == 0 && | 232 | if (old_delegation != NULL) { |
219 | delegation->type == nfsi->delegation->type) { | 233 | if (memcmp(&delegation->stateid, &old_delegation->stateid, |
234 | sizeof(old_delegation->stateid)) == 0 && | ||
235 | delegation->type == old_delegation->type) { | ||
220 | goto out; | 236 | goto out; |
221 | } | 237 | } |
222 | /* | 238 | /* |
@@ -226,12 +242,12 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct | |||
226 | dfprintk(FILE, "%s: server %s handed out " | 242 | dfprintk(FILE, "%s: server %s handed out " |
227 | "a duplicate delegation!\n", | 243 | "a duplicate delegation!\n", |
228 | __func__, clp->cl_hostname); | 244 | __func__, clp->cl_hostname); |
229 | if (delegation->type <= nfsi->delegation->type) { | 245 | if (delegation->type <= old_delegation->type) { |
230 | freeme = delegation; | 246 | freeme = delegation; |
231 | delegation = NULL; | 247 | delegation = NULL; |
232 | goto out; | 248 | goto out; |
233 | } | 249 | } |
234 | freeme = nfs_detach_delegation_locked(nfsi, NULL); | 250 | freeme = nfs_detach_delegation_locked(nfsi, NULL, clp); |
235 | } | 251 | } |
236 | list_add_rcu(&delegation->super_list, &clp->cl_delegations); | 252 | list_add_rcu(&delegation->super_list, &clp->cl_delegations); |
237 | nfsi->delegation_state = delegation->type; | 253 | nfsi->delegation_state = delegation->type; |
@@ -301,7 +317,7 @@ restart: | |||
301 | if (inode == NULL) | 317 | if (inode == NULL) |
302 | continue; | 318 | continue; |
303 | spin_lock(&clp->cl_lock); | 319 | spin_lock(&clp->cl_lock); |
304 | delegation = nfs_detach_delegation_locked(NFS_I(inode), NULL); | 320 | delegation = nfs_detach_delegation_locked(NFS_I(inode), NULL, clp); |
305 | spin_unlock(&clp->cl_lock); | 321 | spin_unlock(&clp->cl_lock); |
306 | rcu_read_unlock(); | 322 | rcu_read_unlock(); |
307 | if (delegation != NULL) { | 323 | if (delegation != NULL) { |
@@ -330,9 +346,9 @@ void nfs_inode_return_delegation_noreclaim(struct inode *inode) | |||
330 | struct nfs_inode *nfsi = NFS_I(inode); | 346 | struct nfs_inode *nfsi = NFS_I(inode); |
331 | struct nfs_delegation *delegation; | 347 | struct nfs_delegation *delegation; |
332 | 348 | ||
333 | if (rcu_dereference(nfsi->delegation) != NULL) { | 349 | if (rcu_access_pointer(nfsi->delegation) != NULL) { |
334 | spin_lock(&clp->cl_lock); | 350 | spin_lock(&clp->cl_lock); |
335 | delegation = nfs_detach_delegation_locked(nfsi, NULL); | 351 | delegation = nfs_detach_delegation_locked(nfsi, NULL, clp); |
336 | spin_unlock(&clp->cl_lock); | 352 | spin_unlock(&clp->cl_lock); |
337 | if (delegation != NULL) | 353 | if (delegation != NULL) |
338 | nfs_do_return_delegation(inode, delegation, 0); | 354 | nfs_do_return_delegation(inode, delegation, 0); |
@@ -346,9 +362,9 @@ int nfs_inode_return_delegation(struct inode *inode) | |||
346 | struct nfs_delegation *delegation; | 362 | struct nfs_delegation *delegation; |
347 | int err = 0; | 363 | int err = 0; |
348 | 364 | ||
349 | if (rcu_dereference(nfsi->delegation) != NULL) { | 365 | if (rcu_access_pointer(nfsi->delegation) != NULL) { |
350 | spin_lock(&clp->cl_lock); | 366 | spin_lock(&clp->cl_lock); |
351 | delegation = nfs_detach_delegation_locked(nfsi, NULL); | 367 | delegation = nfs_detach_delegation_locked(nfsi, NULL, clp); |
352 | spin_unlock(&clp->cl_lock); | 368 | spin_unlock(&clp->cl_lock); |
353 | if (delegation != NULL) { | 369 | if (delegation != NULL) { |
354 | nfs_msync_inode(inode); | 370 | nfs_msync_inode(inode); |
@@ -526,7 +542,7 @@ restart: | |||
526 | if (inode == NULL) | 542 | if (inode == NULL) |
527 | continue; | 543 | continue; |
528 | spin_lock(&clp->cl_lock); | 544 | spin_lock(&clp->cl_lock); |
529 | delegation = nfs_detach_delegation_locked(NFS_I(inode), NULL); | 545 | delegation = nfs_detach_delegation_locked(NFS_I(inode), NULL, clp); |
530 | spin_unlock(&clp->cl_lock); | 546 | spin_unlock(&clp->cl_lock); |
531 | rcu_read_unlock(); | 547 | rcu_read_unlock(); |
532 | if (delegation != NULL) | 548 | if (delegation != NULL) |
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c index 1afb0a10229f..e27960cd76ab 100644 --- a/fs/notify/inotify/inotify_fsnotify.c +++ b/fs/notify/inotify/inotify_fsnotify.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/path.h> /* struct path */ | 28 | #include <linux/path.h> /* struct path */ |
29 | #include <linux/slab.h> /* kmem_* */ | 29 | #include <linux/slab.h> /* kmem_* */ |
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/sched.h> | ||
31 | 32 | ||
32 | #include "inotify.h" | 33 | #include "inotify.h" |
33 | 34 | ||
@@ -146,6 +147,7 @@ static void inotify_free_group_priv(struct fsnotify_group *group) | |||
146 | idr_for_each(&group->inotify_data.idr, idr_callback, group); | 147 | idr_for_each(&group->inotify_data.idr, idr_callback, group); |
147 | idr_remove_all(&group->inotify_data.idr); | 148 | idr_remove_all(&group->inotify_data.idr); |
148 | idr_destroy(&group->inotify_data.idr); | 149 | idr_destroy(&group->inotify_data.idr); |
150 | free_uid(group->inotify_data.user); | ||
149 | } | 151 | } |
150 | 152 | ||
151 | void inotify_free_event_priv(struct fsnotify_event_private_data *fsn_event_priv) | 153 | void inotify_free_event_priv(struct fsnotify_event_private_data *fsn_event_priv) |
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 472cdf29ef82..e46ca685b9be 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -546,21 +546,24 @@ retry: | |||
546 | if (unlikely(!idr_pre_get(&group->inotify_data.idr, GFP_KERNEL))) | 546 | if (unlikely(!idr_pre_get(&group->inotify_data.idr, GFP_KERNEL))) |
547 | goto out_err; | 547 | goto out_err; |
548 | 548 | ||
549 | /* we are putting the mark on the idr, take a reference */ | ||
550 | fsnotify_get_mark(&tmp_ientry->fsn_entry); | ||
551 | |||
549 | spin_lock(&group->inotify_data.idr_lock); | 552 | spin_lock(&group->inotify_data.idr_lock); |
550 | ret = idr_get_new_above(&group->inotify_data.idr, &tmp_ientry->fsn_entry, | 553 | ret = idr_get_new_above(&group->inotify_data.idr, &tmp_ientry->fsn_entry, |
551 | group->inotify_data.last_wd+1, | 554 | group->inotify_data.last_wd+1, |
552 | &tmp_ientry->wd); | 555 | &tmp_ientry->wd); |
553 | spin_unlock(&group->inotify_data.idr_lock); | 556 | spin_unlock(&group->inotify_data.idr_lock); |
554 | if (ret) { | 557 | if (ret) { |
558 | /* we didn't get on the idr, drop the idr reference */ | ||
559 | fsnotify_put_mark(&tmp_ientry->fsn_entry); | ||
560 | |||
555 | /* idr was out of memory allocate and try again */ | 561 | /* idr was out of memory allocate and try again */ |
556 | if (ret == -EAGAIN) | 562 | if (ret == -EAGAIN) |
557 | goto retry; | 563 | goto retry; |
558 | goto out_err; | 564 | goto out_err; |
559 | } | 565 | } |
560 | 566 | ||
561 | /* we put the mark on the idr, take a reference */ | ||
562 | fsnotify_get_mark(&tmp_ientry->fsn_entry); | ||
563 | |||
564 | /* we are on the idr, now get on the inode */ | 567 | /* we are on the idr, now get on the inode */ |
565 | ret = fsnotify_add_mark(&tmp_ientry->fsn_entry, group, inode); | 568 | ret = fsnotify_add_mark(&tmp_ientry->fsn_entry, group, inode); |
566 | if (ret) { | 569 | if (ret) { |
@@ -578,16 +581,13 @@ retry: | |||
578 | /* return the watch descriptor for this new entry */ | 581 | /* return the watch descriptor for this new entry */ |
579 | ret = tmp_ientry->wd; | 582 | ret = tmp_ientry->wd; |
580 | 583 | ||
581 | /* match the ref from fsnotify_init_markentry() */ | ||
582 | fsnotify_put_mark(&tmp_ientry->fsn_entry); | ||
583 | |||
584 | /* if this mark added a new event update the group mask */ | 584 | /* if this mark added a new event update the group mask */ |
585 | if (mask & ~group->mask) | 585 | if (mask & ~group->mask) |
586 | fsnotify_recalc_group_mask(group); | 586 | fsnotify_recalc_group_mask(group); |
587 | 587 | ||
588 | out_err: | 588 | out_err: |
589 | if (ret < 0) | 589 | /* match the ref from fsnotify_init_markentry() */ |
590 | kmem_cache_free(inotify_inode_mark_cachep, tmp_ientry); | 590 | fsnotify_put_mark(&tmp_ientry->fsn_entry); |
591 | 591 | ||
592 | return ret; | 592 | return ret; |
593 | } | 593 | } |
diff --git a/fs/proc/array.c b/fs/proc/array.c index e51f2ec2c5e5..885ab5513ac5 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -81,7 +81,6 @@ | |||
81 | #include <linux/pid_namespace.h> | 81 | #include <linux/pid_namespace.h> |
82 | #include <linux/ptrace.h> | 82 | #include <linux/ptrace.h> |
83 | #include <linux/tracehook.h> | 83 | #include <linux/tracehook.h> |
84 | #include <linux/swapops.h> | ||
85 | 84 | ||
86 | #include <asm/pgtable.h> | 85 | #include <asm/pgtable.h> |
87 | #include <asm/processor.h> | 86 | #include <asm/processor.h> |
@@ -495,7 +494,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, | |||
495 | rsslim, | 494 | rsslim, |
496 | mm ? mm->start_code : 0, | 495 | mm ? mm->start_code : 0, |
497 | mm ? mm->end_code : 0, | 496 | mm ? mm->end_code : 0, |
498 | (permitted && mm) ? task->stack_start : 0, | 497 | (permitted && mm) ? mm->start_stack : 0, |
499 | esp, | 498 | esp, |
500 | eip, | 499 | eip, |
501 | /* The signal information here is obsolete. | 500 | /* The signal information here is obsolete. |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 070553427dd5..47f5b145f56e 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -247,25 +247,6 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma) | |||
247 | } else if (vma->vm_start <= mm->start_stack && | 247 | } else if (vma->vm_start <= mm->start_stack && |
248 | vma->vm_end >= mm->start_stack) { | 248 | vma->vm_end >= mm->start_stack) { |
249 | name = "[stack]"; | 249 | name = "[stack]"; |
250 | } else { | ||
251 | unsigned long stack_start; | ||
252 | struct proc_maps_private *pmp; | ||
253 | |||
254 | pmp = m->private; | ||
255 | stack_start = pmp->task->stack_start; | ||
256 | |||
257 | if (vma->vm_start <= stack_start && | ||
258 | vma->vm_end >= stack_start) { | ||
259 | pad_len_spaces(m, len); | ||
260 | seq_printf(m, | ||
261 | "[threadstack:%08lx]", | ||
262 | #ifdef CONFIG_STACK_GROWSUP | ||
263 | vma->vm_end - stack_start | ||
264 | #else | ||
265 | stack_start - vma->vm_start | ||
266 | #endif | ||
267 | ); | ||
268 | } | ||
269 | } | 250 | } |
270 | } else { | 251 | } else { |
271 | name = "[vdso]"; | 252 | name = "[vdso]"; |
diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h index e694263445f7..69206957b72c 100644 --- a/include/asm-generic/dma-mapping-common.h +++ b/include/asm-generic/dma-mapping-common.h | |||
@@ -131,7 +131,7 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev, | |||
131 | debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir); | 131 | debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir); |
132 | 132 | ||
133 | } else | 133 | } else |
134 | dma_sync_single_for_cpu(dev, addr, size, dir); | 134 | dma_sync_single_for_cpu(dev, addr + offset, size, dir); |
135 | } | 135 | } |
136 | 136 | ||
137 | static inline void dma_sync_single_range_for_device(struct device *dev, | 137 | static inline void dma_sync_single_range_for_device(struct device *dev, |
@@ -148,7 +148,7 @@ static inline void dma_sync_single_range_for_device(struct device *dev, | |||
148 | debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir); | 148 | debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir); |
149 | 149 | ||
150 | } else | 150 | } else |
151 | dma_sync_single_for_device(dev, addr, size, dir); | 151 | dma_sync_single_for_device(dev, addr + offset, size, dir); |
152 | } | 152 | } |
153 | 153 | ||
154 | static inline void | 154 | static inline void |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index e929c27ede22..6b9db917e717 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
@@ -789,34 +789,6 @@ extern void ttm_bo_unreserve(struct ttm_buffer_object *bo); | |||
789 | extern int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, | 789 | extern int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, |
790 | bool interruptible); | 790 | bool interruptible); |
791 | 791 | ||
792 | /** | ||
793 | * ttm_bo_block_reservation | ||
794 | * | ||
795 | * @bo: A pointer to a struct ttm_buffer_object. | ||
796 | * @interruptible: Use interruptible sleep when waiting. | ||
797 | * @no_wait: Don't sleep, but rather return -EBUSY. | ||
798 | * | ||
799 | * Block reservation for validation by simply reserving the buffer. | ||
800 | * This is intended for single buffer use only without eviction, | ||
801 | * and thus needs no deadlock protection. | ||
802 | * | ||
803 | * Returns: | ||
804 | * -EBUSY: If no_wait == 1 and the buffer is already reserved. | ||
805 | * -ERESTARTSYS: If interruptible == 1 and the process received a signal | ||
806 | * while sleeping. | ||
807 | */ | ||
808 | extern int ttm_bo_block_reservation(struct ttm_buffer_object *bo, | ||
809 | bool interruptible, bool no_wait); | ||
810 | |||
811 | /** | ||
812 | * ttm_bo_unblock_reservation | ||
813 | * | ||
814 | * @bo: A pointer to a struct ttm_buffer_object. | ||
815 | * | ||
816 | * Unblocks reservation leaving lru lists untouched. | ||
817 | */ | ||
818 | extern void ttm_bo_unblock_reservation(struct ttm_buffer_object *bo); | ||
819 | |||
820 | /* | 792 | /* |
821 | * ttm_bo_util.c | 793 | * ttm_bo_util.c |
822 | */ | 794 | */ |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index b8ad1ea99586..8f78073d7caa 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -530,6 +530,7 @@ static inline struct cgroup_subsys_state *task_subsys_state( | |||
530 | { | 530 | { |
531 | return rcu_dereference_check(task->cgroups->subsys[subsys_id], | 531 | return rcu_dereference_check(task->cgroups->subsys[subsys_id], |
532 | rcu_read_lock_held() || | 532 | rcu_read_lock_held() || |
533 | lockdep_is_held(&task->alloc_lock) || | ||
533 | cgroup_lock_is_held()); | 534 | cgroup_lock_is_held()); |
534 | } | 535 | } |
535 | 536 | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 07db2feb8572..db266bbed23f 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -190,6 +190,8 @@ static inline int rcu_read_lock_sched_held(void) | |||
190 | 190 | ||
191 | #ifdef CONFIG_PROVE_RCU | 191 | #ifdef CONFIG_PROVE_RCU |
192 | 192 | ||
193 | extern int rcu_my_thread_group_empty(void); | ||
194 | |||
193 | /** | 195 | /** |
194 | * rcu_dereference_check - rcu_dereference with debug checking | 196 | * rcu_dereference_check - rcu_dereference with debug checking |
195 | * @p: The pointer to read, prior to dereferencing | 197 | * @p: The pointer to read, prior to dereferencing |
diff --git a/include/linux/sched.h b/include/linux/sched.h index dad7f668ebf7..2b7b81df78b3 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1497,7 +1497,6 @@ struct task_struct { | |||
1497 | /* bitmask of trace recursion */ | 1497 | /* bitmask of trace recursion */ |
1498 | unsigned long trace_recursion; | 1498 | unsigned long trace_recursion; |
1499 | #endif /* CONFIG_TRACING */ | 1499 | #endif /* CONFIG_TRACING */ |
1500 | unsigned long stack_start; | ||
1501 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR /* memcg uses this to do batch job */ | 1500 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR /* memcg uses this to do batch job */ |
1502 | struct memcg_batch_info { | 1501 | struct memcg_batch_info { |
1503 | int do_batch; /* incremented when batch uncharge started */ | 1502 | int do_batch; /* incremented when batch uncharge started */ |
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index b9da1f5591e7..4aeff96ff7d8 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h | |||
@@ -188,7 +188,6 @@ void saa7146_buffer_timeout(unsigned long data); | |||
188 | void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q, | 188 | void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q, |
189 | struct saa7146_buf *buf); | 189 | struct saa7146_buf *buf); |
190 | 190 | ||
191 | int saa7146_vv_devinit(struct saa7146_dev *dev); | ||
192 | int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv); | 191 | int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv); |
193 | int saa7146_vv_release(struct saa7146_dev* dev); | 192 | int saa7146_vv_release(struct saa7146_dev* dev); |
194 | 193 | ||
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 851c813adb3a..61d73e37d543 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -279,6 +279,7 @@ int sctp_do_sm(sctp_event_t event_type, sctp_subtype_t subtype, | |||
279 | /* 2nd level prototypes */ | 279 | /* 2nd level prototypes */ |
280 | void sctp_generate_t3_rtx_event(unsigned long peer); | 280 | void sctp_generate_t3_rtx_event(unsigned long peer); |
281 | void sctp_generate_heartbeat_event(unsigned long peer); | 281 | void sctp_generate_heartbeat_event(unsigned long peer); |
282 | void sctp_generate_proto_unreach_event(unsigned long peer); | ||
282 | 283 | ||
283 | void sctp_ootb_pkt_free(struct sctp_packet *); | 284 | void sctp_ootb_pkt_free(struct sctp_packet *); |
284 | 285 | ||
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 597f8e27aaf6..219043a67bf7 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -1010,6 +1010,9 @@ struct sctp_transport { | |||
1010 | /* Heartbeat timer is per destination. */ | 1010 | /* Heartbeat timer is per destination. */ |
1011 | struct timer_list hb_timer; | 1011 | struct timer_list hb_timer; |
1012 | 1012 | ||
1013 | /* Timer to handle ICMP proto unreachable envets */ | ||
1014 | struct timer_list proto_unreach_timer; | ||
1015 | |||
1013 | /* Since we're using per-destination retransmission timers | 1016 | /* Since we're using per-destination retransmission timers |
1014 | * (see above), we're also using per-destination "transmitted" | 1017 | * (see above), we're also using per-destination "transmitted" |
1015 | * queues. This probably ought to be a private struct | 1018 | * queues. This probably ought to be a private struct |
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 722b0130aa94..59a009dc54a8 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -158,7 +158,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb, | |||
158 | u->mq_bytes + mq_bytes > | 158 | u->mq_bytes + mq_bytes > |
159 | task_rlimit(p, RLIMIT_MSGQUEUE)) { | 159 | task_rlimit(p, RLIMIT_MSGQUEUE)) { |
160 | spin_unlock(&mq_lock); | 160 | spin_unlock(&mq_lock); |
161 | kfree(info->messages); | 161 | /* mqueue_delete_inode() releases info->messages */ |
162 | goto out_inode; | 162 | goto out_inode; |
163 | } | 163 | } |
164 | u->mq_bytes += mq_bytes; | 164 | u->mq_bytes += mq_bytes; |
diff --git a/kernel/acct.c b/kernel/acct.c index 24f8c81fc48d..e4c0e1fee9b0 100644 --- a/kernel/acct.c +++ b/kernel/acct.c | |||
@@ -353,17 +353,18 @@ restart: | |||
353 | 353 | ||
354 | void acct_exit_ns(struct pid_namespace *ns) | 354 | void acct_exit_ns(struct pid_namespace *ns) |
355 | { | 355 | { |
356 | struct bsd_acct_struct *acct; | 356 | struct bsd_acct_struct *acct = ns->bacct; |
357 | 357 | ||
358 | spin_lock(&acct_lock); | 358 | if (acct == NULL) |
359 | acct = ns->bacct; | 359 | return; |
360 | if (acct != NULL) { | ||
361 | if (acct->file != NULL) | ||
362 | acct_file_reopen(acct, NULL, NULL); | ||
363 | 360 | ||
364 | kfree(acct); | 361 | del_timer_sync(&acct->timer); |
365 | } | 362 | spin_lock(&acct_lock); |
363 | if (acct->file != NULL) | ||
364 | acct_file_reopen(acct, NULL, NULL); | ||
366 | spin_unlock(&acct_lock); | 365 | spin_unlock(&acct_lock); |
366 | |||
367 | kfree(acct); | ||
367 | } | 368 | } |
368 | 369 | ||
369 | /* | 370 | /* |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index e2769e13980c..6d870f2d1228 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -1646,7 +1646,9 @@ static inline struct cftype *__d_cft(struct dentry *dentry) | |||
1646 | int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen) | 1646 | int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen) |
1647 | { | 1647 | { |
1648 | char *start; | 1648 | char *start; |
1649 | struct dentry *dentry = rcu_dereference(cgrp->dentry); | 1649 | struct dentry *dentry = rcu_dereference_check(cgrp->dentry, |
1650 | rcu_read_lock_held() || | ||
1651 | cgroup_lock_is_held()); | ||
1650 | 1652 | ||
1651 | if (!dentry || cgrp == dummytop) { | 1653 | if (!dentry || cgrp == dummytop) { |
1652 | /* | 1654 | /* |
@@ -1662,13 +1664,17 @@ int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen) | |||
1662 | *--start = '\0'; | 1664 | *--start = '\0'; |
1663 | for (;;) { | 1665 | for (;;) { |
1664 | int len = dentry->d_name.len; | 1666 | int len = dentry->d_name.len; |
1667 | |||
1665 | if ((start -= len) < buf) | 1668 | if ((start -= len) < buf) |
1666 | return -ENAMETOOLONG; | 1669 | return -ENAMETOOLONG; |
1667 | memcpy(start, cgrp->dentry->d_name.name, len); | 1670 | memcpy(start, dentry->d_name.name, len); |
1668 | cgrp = cgrp->parent; | 1671 | cgrp = cgrp->parent; |
1669 | if (!cgrp) | 1672 | if (!cgrp) |
1670 | break; | 1673 | break; |
1671 | dentry = rcu_dereference(cgrp->dentry); | 1674 | |
1675 | dentry = rcu_dereference_check(cgrp->dentry, | ||
1676 | rcu_read_lock_held() || | ||
1677 | cgroup_lock_is_held()); | ||
1672 | if (!cgrp->parent) | 1678 | if (!cgrp->parent) |
1673 | continue; | 1679 | continue; |
1674 | if (--start < buf) | 1680 | if (--start < buf) |
@@ -4429,7 +4435,15 @@ __setup("cgroup_disable=", cgroup_disable); | |||
4429 | */ | 4435 | */ |
4430 | unsigned short css_id(struct cgroup_subsys_state *css) | 4436 | unsigned short css_id(struct cgroup_subsys_state *css) |
4431 | { | 4437 | { |
4432 | struct css_id *cssid = rcu_dereference(css->id); | 4438 | struct css_id *cssid; |
4439 | |||
4440 | /* | ||
4441 | * This css_id() can return correct value when somone has refcnt | ||
4442 | * on this or this is under rcu_read_lock(). Once css->id is allocated, | ||
4443 | * it's unchanged until freed. | ||
4444 | */ | ||
4445 | cssid = rcu_dereference_check(css->id, | ||
4446 | rcu_read_lock_held() || atomic_read(&css->refcnt)); | ||
4433 | 4447 | ||
4434 | if (cssid) | 4448 | if (cssid) |
4435 | return cssid->id; | 4449 | return cssid->id; |
@@ -4439,7 +4453,10 @@ EXPORT_SYMBOL_GPL(css_id); | |||
4439 | 4453 | ||
4440 | unsigned short css_depth(struct cgroup_subsys_state *css) | 4454 | unsigned short css_depth(struct cgroup_subsys_state *css) |
4441 | { | 4455 | { |
4442 | struct css_id *cssid = rcu_dereference(css->id); | 4456 | struct css_id *cssid; |
4457 | |||
4458 | cssid = rcu_dereference_check(css->id, | ||
4459 | rcu_read_lock_held() || atomic_read(&css->refcnt)); | ||
4443 | 4460 | ||
4444 | if (cssid) | 4461 | if (cssid) |
4445 | return cssid->depth; | 4462 | return cssid->depth; |
@@ -4447,15 +4464,36 @@ unsigned short css_depth(struct cgroup_subsys_state *css) | |||
4447 | } | 4464 | } |
4448 | EXPORT_SYMBOL_GPL(css_depth); | 4465 | EXPORT_SYMBOL_GPL(css_depth); |
4449 | 4466 | ||
4467 | /** | ||
4468 | * css_is_ancestor - test "root" css is an ancestor of "child" | ||
4469 | * @child: the css to be tested. | ||
4470 | * @root: the css supporsed to be an ancestor of the child. | ||
4471 | * | ||
4472 | * Returns true if "root" is an ancestor of "child" in its hierarchy. Because | ||
4473 | * this function reads css->id, this use rcu_dereference() and rcu_read_lock(). | ||
4474 | * But, considering usual usage, the csses should be valid objects after test. | ||
4475 | * Assuming that the caller will do some action to the child if this returns | ||
4476 | * returns true, the caller must take "child";s reference count. | ||
4477 | * If "child" is valid object and this returns true, "root" is valid, too. | ||
4478 | */ | ||
4479 | |||
4450 | bool css_is_ancestor(struct cgroup_subsys_state *child, | 4480 | bool css_is_ancestor(struct cgroup_subsys_state *child, |
4451 | const struct cgroup_subsys_state *root) | 4481 | const struct cgroup_subsys_state *root) |
4452 | { | 4482 | { |
4453 | struct css_id *child_id = rcu_dereference(child->id); | 4483 | struct css_id *child_id; |
4454 | struct css_id *root_id = rcu_dereference(root->id); | 4484 | struct css_id *root_id; |
4485 | bool ret = true; | ||
4455 | 4486 | ||
4456 | if (!child_id || !root_id || (child_id->depth < root_id->depth)) | 4487 | rcu_read_lock(); |
4457 | return false; | 4488 | child_id = rcu_dereference(child->id); |
4458 | return child_id->stack[root_id->depth] == root_id->id; | 4489 | root_id = rcu_dereference(root->id); |
4490 | if (!child_id | ||
4491 | || !root_id | ||
4492 | || (child_id->depth < root_id->depth) | ||
4493 | || (child_id->stack[root_id->depth] != root_id->id)) | ||
4494 | ret = false; | ||
4495 | rcu_read_unlock(); | ||
4496 | return ret; | ||
4459 | } | 4497 | } |
4460 | 4498 | ||
4461 | static void __free_css_id_cb(struct rcu_head *head) | 4499 | static void __free_css_id_cb(struct rcu_head *head) |
@@ -4555,13 +4593,13 @@ static int alloc_css_id(struct cgroup_subsys *ss, struct cgroup *parent, | |||
4555 | { | 4593 | { |
4556 | int subsys_id, i, depth = 0; | 4594 | int subsys_id, i, depth = 0; |
4557 | struct cgroup_subsys_state *parent_css, *child_css; | 4595 | struct cgroup_subsys_state *parent_css, *child_css; |
4558 | struct css_id *child_id, *parent_id = NULL; | 4596 | struct css_id *child_id, *parent_id; |
4559 | 4597 | ||
4560 | subsys_id = ss->subsys_id; | 4598 | subsys_id = ss->subsys_id; |
4561 | parent_css = parent->subsys[subsys_id]; | 4599 | parent_css = parent->subsys[subsys_id]; |
4562 | child_css = child->subsys[subsys_id]; | 4600 | child_css = child->subsys[subsys_id]; |
4563 | depth = css_depth(parent_css) + 1; | ||
4564 | parent_id = parent_css->id; | 4601 | parent_id = parent_css->id; |
4602 | depth = parent_id->depth; | ||
4565 | 4603 | ||
4566 | child_id = get_new_cssid(ss, depth); | 4604 | child_id = get_new_cssid(ss, depth); |
4567 | if (IS_ERR(child_id)) | 4605 | if (IS_ERR(child_id)) |
diff --git a/kernel/fork.c b/kernel/fork.c index 44b0791b0a2e..4c14942a0ee3 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1114,8 +1114,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1114 | 1114 | ||
1115 | p->bts = NULL; | 1115 | p->bts = NULL; |
1116 | 1116 | ||
1117 | p->stack_start = stack_start; | ||
1118 | |||
1119 | /* Perform scheduler related setup. Assign this task to a CPU. */ | 1117 | /* Perform scheduler related setup. Assign this task to a CPU. */ |
1120 | sched_fork(p, clone_flags); | 1118 | sched_fork(p, clone_flags); |
1121 | 1119 | ||
diff --git a/kernel/kexec.c b/kernel/kexec.c index 87ebe8adc474..474a84715eac 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
@@ -1134,11 +1134,9 @@ int crash_shrink_memory(unsigned long new_size) | |||
1134 | 1134 | ||
1135 | free_reserved_phys_range(end, crashk_res.end); | 1135 | free_reserved_phys_range(end, crashk_res.end); |
1136 | 1136 | ||
1137 | if (start == end) { | 1137 | if (start == end) |
1138 | crashk_res.end = end; | ||
1139 | release_resource(&crashk_res); | 1138 | release_resource(&crashk_res); |
1140 | } else | 1139 | crashk_res.end = end - 1; |
1141 | crashk_res.end = end - 1; | ||
1142 | 1140 | ||
1143 | unlock: | 1141 | unlock: |
1144 | mutex_unlock(&kexec_mutex); | 1142 | mutex_unlock(&kexec_mutex); |
diff --git a/kernel/profile.c b/kernel/profile.c index a55d3a367ae8..dfadc5b729f1 100644 --- a/kernel/profile.c +++ b/kernel/profile.c | |||
@@ -127,8 +127,10 @@ int __ref profile_init(void) | |||
127 | return 0; | 127 | return 0; |
128 | 128 | ||
129 | prof_buffer = vmalloc(buffer_bytes); | 129 | prof_buffer = vmalloc(buffer_bytes); |
130 | if (prof_buffer) | 130 | if (prof_buffer) { |
131 | memset(prof_buffer, 0, buffer_bytes); | ||
131 | return 0; | 132 | return 0; |
133 | } | ||
132 | 134 | ||
133 | free_cpumask_var(prof_cpu_mask); | 135 | free_cpumask_var(prof_cpu_mask); |
134 | return -ENOMEM; | 136 | return -ENOMEM; |
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index 03a7ea1579f6..49d808e833b0 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c | |||
@@ -122,3 +122,14 @@ void wakeme_after_rcu(struct rcu_head *head) | |||
122 | rcu = container_of(head, struct rcu_synchronize, head); | 122 | rcu = container_of(head, struct rcu_synchronize, head); |
123 | complete(&rcu->completion); | 123 | complete(&rcu->completion); |
124 | } | 124 | } |
125 | |||
126 | #ifdef CONFIG_PROVE_RCU | ||
127 | /* | ||
128 | * wrapper function to avoid #include problems. | ||
129 | */ | ||
130 | int rcu_my_thread_group_empty(void) | ||
131 | { | ||
132 | return thread_group_empty(current); | ||
133 | } | ||
134 | EXPORT_SYMBOL_GPL(rcu_my_thread_group_empty); | ||
135 | #endif /* #ifdef CONFIG_PROVE_RCU */ | ||
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c index 9b49db144037..19be00ba6123 100644 --- a/kernel/sched_debug.c +++ b/kernel/sched_debug.c | |||
@@ -114,7 +114,9 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p) | |||
114 | { | 114 | { |
115 | char path[64]; | 115 | char path[64]; |
116 | 116 | ||
117 | rcu_read_lock(); | ||
117 | cgroup_path(task_group(p)->css.cgroup, path, sizeof(path)); | 118 | cgroup_path(task_group(p)->css.cgroup, path, sizeof(path)); |
119 | rcu_read_unlock(); | ||
118 | SEQ_printf(m, " %s", path); | 120 | SEQ_printf(m, " %s", path); |
119 | } | 121 | } |
120 | #endif | 122 | #endif |
diff --git a/lib/rwsem.c b/lib/rwsem.c index 3e3365e5665e..ceba8e28807a 100644 --- a/lib/rwsem.c +++ b/lib/rwsem.c | |||
@@ -136,9 +136,10 @@ __rwsem_do_wake(struct rw_semaphore *sem, int downgrading) | |||
136 | out: | 136 | out: |
137 | return sem; | 137 | return sem; |
138 | 138 | ||
139 | /* undo the change to count, but check for a transition 1->0 */ | 139 | /* undo the change to the active count, but check for a transition |
140 | * 1->0 */ | ||
140 | undo: | 141 | undo: |
141 | if (rwsem_atomic_update(-RWSEM_ACTIVE_BIAS, sem) != 0) | 142 | if (rwsem_atomic_update(-RWSEM_ACTIVE_BIAS, sem) & RWSEM_ACTIVE_MASK) |
142 | goto out; | 143 | goto out; |
143 | goto try_again; | 144 | goto try_again; |
144 | } | 145 | } |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index ffbdfc86aedf..4c9e6bbf3772 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -1039,7 +1039,7 @@ static struct page *alloc_huge_page(struct vm_area_struct *vma, | |||
1039 | page = alloc_buddy_huge_page(h, vma, addr); | 1039 | page = alloc_buddy_huge_page(h, vma, addr); |
1040 | if (!page) { | 1040 | if (!page) { |
1041 | hugetlb_put_quota(inode->i_mapping, chg); | 1041 | hugetlb_put_quota(inode->i_mapping, chg); |
1042 | return ERR_PTR(-VM_FAULT_OOM); | 1042 | return ERR_PTR(-VM_FAULT_SIGBUS); |
1043 | } | 1043 | } |
1044 | } | 1044 | } |
1045 | 1045 | ||
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 6c755de385f7..8a79a6f0f029 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -1601,7 +1601,6 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm, | |||
1601 | * There is a small race that "from" or "to" can be | 1601 | * There is a small race that "from" or "to" can be |
1602 | * freed by rmdir, so we use css_tryget(). | 1602 | * freed by rmdir, so we use css_tryget(). |
1603 | */ | 1603 | */ |
1604 | rcu_read_lock(); | ||
1605 | from = mc.from; | 1604 | from = mc.from; |
1606 | to = mc.to; | 1605 | to = mc.to; |
1607 | if (from && css_tryget(&from->css)) { | 1606 | if (from && css_tryget(&from->css)) { |
@@ -1622,7 +1621,6 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm, | |||
1622 | do_continue = (to == mem_over_limit); | 1621 | do_continue = (to == mem_over_limit); |
1623 | css_put(&to->css); | 1622 | css_put(&to->css); |
1624 | } | 1623 | } |
1625 | rcu_read_unlock(); | ||
1626 | if (do_continue) { | 1624 | if (do_continue) { |
1627 | DEFINE_WAIT(wait); | 1625 | DEFINE_WAIT(wait); |
1628 | prepare_to_wait(&mc.waitq, &wait, | 1626 | prepare_to_wait(&mc.waitq, &wait, |
@@ -336,14 +336,13 @@ vma_address(struct page *page, struct vm_area_struct *vma) | |||
336 | 336 | ||
337 | /* | 337 | /* |
338 | * At what user virtual address is page expected in vma? | 338 | * At what user virtual address is page expected in vma? |
339 | * checking that the page matches the vma. | 339 | * Caller should check the page is actually part of the vma. |
340 | */ | 340 | */ |
341 | unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma) | 341 | unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma) |
342 | { | 342 | { |
343 | if (PageAnon(page)) { | 343 | if (PageAnon(page)) |
344 | if (vma->anon_vma != page_anon_vma(page)) | 344 | ; |
345 | return -EFAULT; | 345 | else if (page->mapping && !(vma->vm_flags & VM_NONLINEAR)) { |
346 | } else if (page->mapping && !(vma->vm_flags & VM_NONLINEAR)) { | ||
347 | if (!vma->vm_file || | 346 | if (!vma->vm_file || |
348 | vma->vm_file->f_mapping != page->mapping) | 347 | vma->vm_file->f_mapping != page->mapping) |
349 | return -EFAULT; | 348 | return -EFAULT; |
diff --git a/net/core/dev.c b/net/core/dev.c index f769098774b7..264137fce3a2 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1451,7 +1451,7 @@ static inline void net_timestamp(struct sk_buff *skb) | |||
1451 | * | 1451 | * |
1452 | * return values: | 1452 | * return values: |
1453 | * NET_RX_SUCCESS (no congestion) | 1453 | * NET_RX_SUCCESS (no congestion) |
1454 | * NET_RX_DROP (packet was dropped) | 1454 | * NET_RX_DROP (packet was dropped, but freed) |
1455 | * | 1455 | * |
1456 | * dev_forward_skb can be used for injecting an skb from the | 1456 | * dev_forward_skb can be used for injecting an skb from the |
1457 | * start_xmit function of one device into the receive queue | 1457 | * start_xmit function of one device into the receive queue |
@@ -1465,12 +1465,11 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb) | |||
1465 | { | 1465 | { |
1466 | skb_orphan(skb); | 1466 | skb_orphan(skb); |
1467 | 1467 | ||
1468 | if (!(dev->flags & IFF_UP)) | 1468 | if (!(dev->flags & IFF_UP) || |
1469 | return NET_RX_DROP; | 1469 | (skb->len > (dev->mtu + dev->hard_header_len))) { |
1470 | 1470 | kfree_skb(skb); | |
1471 | if (skb->len > (dev->mtu + dev->hard_header_len)) | ||
1472 | return NET_RX_DROP; | 1471 | return NET_RX_DROP; |
1473 | 1472 | } | |
1474 | skb_set_dev(skb, dev); | 1473 | skb_set_dev(skb, dev); |
1475 | skb->tstamp.tv64 = 0; | 1474 | skb->tstamp.tv64 = 0; |
1476 | skb->pkt_type = PACKET_HOST; | 1475 | skb->pkt_type = PACKET_HOST; |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 6e747065c202..80769f1f9fab 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -661,13 +661,13 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, | |||
661 | #endif | 661 | #endif |
662 | #endif | 662 | #endif |
663 | 663 | ||
664 | #ifdef CONFIG_FDDI | 664 | #if defined(CONFIG_FDDI) || defined(CONFIG_FDDI_MODULE) |
665 | case ARPHRD_FDDI: | 665 | case ARPHRD_FDDI: |
666 | arp->ar_hrd = htons(ARPHRD_ETHER); | 666 | arp->ar_hrd = htons(ARPHRD_ETHER); |
667 | arp->ar_pro = htons(ETH_P_IP); | 667 | arp->ar_pro = htons(ETH_P_IP); |
668 | break; | 668 | break; |
669 | #endif | 669 | #endif |
670 | #ifdef CONFIG_TR | 670 | #if defined(CONFIG_TR) || defined(CONFIG_TR_MODULE) |
671 | case ARPHRD_IEEE802_TR: | 671 | case ARPHRD_IEEE802_TR: |
672 | arp->ar_hrd = htons(ARPHRD_IEEE802); | 672 | arp->ar_hrd = htons(ARPHRD_IEEE802); |
673 | arp->ar_pro = htons(ETH_P_IP); | 673 | arp->ar_pro = htons(ETH_P_IP); |
@@ -1051,7 +1051,7 @@ static int arp_req_set(struct net *net, struct arpreq *r, | |||
1051 | return -EINVAL; | 1051 | return -EINVAL; |
1052 | } | 1052 | } |
1053 | switch (dev->type) { | 1053 | switch (dev->type) { |
1054 | #ifdef CONFIG_FDDI | 1054 | #if defined(CONFIG_FDDI) || defined(CONFIG_FDDI_MODULE) |
1055 | case ARPHRD_FDDI: | 1055 | case ARPHRD_FDDI: |
1056 | /* | 1056 | /* |
1057 | * According to RFC 1390, FDDI devices should accept ARP | 1057 | * According to RFC 1390, FDDI devices should accept ARP |
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 9d4f6d1340a4..ec19a890c9a0 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -754,7 +754,8 @@ ipmr_cache_unresolved(struct net *net, vifi_t vifi, struct sk_buff *skb) | |||
754 | c->next = mfc_unres_queue; | 754 | c->next = mfc_unres_queue; |
755 | mfc_unres_queue = c; | 755 | mfc_unres_queue = c; |
756 | 756 | ||
757 | mod_timer(&ipmr_expire_timer, c->mfc_un.unres.expires); | 757 | if (atomic_read(&net->ipv4.cache_resolve_queue_len) == 1) |
758 | mod_timer(&ipmr_expire_timer, c->mfc_un.unres.expires); | ||
758 | } | 759 | } |
759 | 760 | ||
760 | /* | 761 | /* |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 8fef859db35d..c36522a0f113 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1527,6 +1527,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, | |||
1527 | 1527 | ||
1528 | uh = udp_hdr(skb); | 1528 | uh = udp_hdr(skb); |
1529 | ulen = ntohs(uh->len); | 1529 | ulen = ntohs(uh->len); |
1530 | saddr = ip_hdr(skb)->saddr; | ||
1531 | daddr = ip_hdr(skb)->daddr; | ||
1532 | |||
1530 | if (ulen > skb->len) | 1533 | if (ulen > skb->len) |
1531 | goto short_packet; | 1534 | goto short_packet; |
1532 | 1535 | ||
@@ -1540,9 +1543,6 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, | |||
1540 | if (udp4_csum_init(skb, uh, proto)) | 1543 | if (udp4_csum_init(skb, uh, proto)) |
1541 | goto csum_error; | 1544 | goto csum_error; |
1542 | 1545 | ||
1543 | saddr = ip_hdr(skb)->saddr; | ||
1544 | daddr = ip_hdr(skb)->daddr; | ||
1545 | |||
1546 | if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST)) | 1546 | if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST)) |
1547 | return __udp4_lib_mcast_deliver(net, skb, uh, | 1547 | return __udp4_lib_mcast_deliver(net, skb, uh, |
1548 | saddr, daddr, udptable); | 1548 | saddr, daddr, udptable); |
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index 622dc7939a1b..61573885e451 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c | |||
@@ -222,6 +222,8 @@ void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, | |||
222 | if (!skb) | 222 | if (!skb) |
223 | return; | 223 | return; |
224 | 224 | ||
225 | skb->protocol = htons(ETH_P_IPV6); | ||
226 | |||
225 | serr = SKB_EXT_ERR(skb); | 227 | serr = SKB_EXT_ERR(skb); |
226 | serr->ee.ee_errno = err; | 228 | serr->ee.ee_errno = err; |
227 | serr->ee.ee_origin = SO_EE_ORIGIN_ICMP6; | 229 | serr->ee.ee_origin = SO_EE_ORIGIN_ICMP6; |
@@ -255,6 +257,8 @@ void ipv6_local_error(struct sock *sk, int err, struct flowi *fl, u32 info) | |||
255 | if (!skb) | 257 | if (!skb) |
256 | return; | 258 | return; |
257 | 259 | ||
260 | skb->protocol = htons(ETH_P_IPV6); | ||
261 | |||
258 | skb_put(skb, sizeof(struct ipv6hdr)); | 262 | skb_put(skb, sizeof(struct ipv6hdr)); |
259 | skb_reset_network_header(skb); | 263 | skb_reset_network_header(skb); |
260 | iph = ipv6_hdr(skb); | 264 | iph = ipv6_hdr(skb); |
@@ -319,7 +323,7 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len) | |||
319 | sin->sin6_flowinfo = 0; | 323 | sin->sin6_flowinfo = 0; |
320 | sin->sin6_port = serr->port; | 324 | sin->sin6_port = serr->port; |
321 | sin->sin6_scope_id = 0; | 325 | sin->sin6_scope_id = 0; |
322 | if (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP6) { | 326 | if (skb->protocol == htons(ETH_P_IPV6)) { |
323 | ipv6_addr_copy(&sin->sin6_addr, | 327 | ipv6_addr_copy(&sin->sin6_addr, |
324 | (struct in6_addr *)(nh + serr->addr_offset)); | 328 | (struct in6_addr *)(nh + serr->addr_offset)); |
325 | if (np->sndflow) | 329 | if (np->sndflow) |
@@ -341,7 +345,7 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len) | |||
341 | sin->sin6_family = AF_INET6; | 345 | sin->sin6_family = AF_INET6; |
342 | sin->sin6_flowinfo = 0; | 346 | sin->sin6_flowinfo = 0; |
343 | sin->sin6_scope_id = 0; | 347 | sin->sin6_scope_id = 0; |
344 | if (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP6) { | 348 | if (skb->protocol == htons(ETH_P_IPV6)) { |
345 | ipv6_addr_copy(&sin->sin6_addr, &ipv6_hdr(skb)->saddr); | 349 | ipv6_addr_copy(&sin->sin6_addr, &ipv6_hdr(skb)->saddr); |
346 | if (np->rxopt.all) | 350 | if (np->rxopt.all) |
347 | datagram_recv_ctl(sk, msg, skb); | 351 | datagram_recv_ctl(sk, msg, skb); |
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c index a432f0ec051c..94e7fca75b85 100644 --- a/net/llc/llc_sap.c +++ b/net/llc/llc_sap.c | |||
@@ -31,7 +31,7 @@ static int llc_mac_header_len(unsigned short devtype) | |||
31 | case ARPHRD_ETHER: | 31 | case ARPHRD_ETHER: |
32 | case ARPHRD_LOOPBACK: | 32 | case ARPHRD_LOOPBACK: |
33 | return sizeof(struct ethhdr); | 33 | return sizeof(struct ethhdr); |
34 | #ifdef CONFIG_TR | 34 | #if defined(CONFIG_TR) || defined(CONFIG_TR_MODULE) |
35 | case ARPHRD_IEEE802_TR: | 35 | case ARPHRD_IEEE802_TR: |
36 | return sizeof(struct trh_hdr); | 36 | return sizeof(struct trh_hdr); |
37 | #endif | 37 | #endif |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4aefa6dc3091..875c8dec940a 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -2030,7 +2030,8 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
2030 | continue; | 2030 | continue; |
2031 | 2031 | ||
2032 | if (wk->type != IEEE80211_WORK_DIRECT_PROBE && | 2032 | if (wk->type != IEEE80211_WORK_DIRECT_PROBE && |
2033 | wk->type != IEEE80211_WORK_AUTH) | 2033 | wk->type != IEEE80211_WORK_AUTH && |
2034 | wk->type != IEEE80211_WORK_ASSOC) | ||
2034 | continue; | 2035 | continue; |
2035 | 2036 | ||
2036 | if (memcmp(req->bss->bssid, wk->filter_ta, ETH_ALEN)) | 2037 | if (memcmp(req->bss->bssid, wk->filter_ta, ETH_ALEN)) |
diff --git a/net/sctp/input.c b/net/sctp/input.c index 2a570184e5a9..ea2192444ce6 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c | |||
@@ -440,11 +440,25 @@ void sctp_icmp_proto_unreachable(struct sock *sk, | |||
440 | { | 440 | { |
441 | SCTP_DEBUG_PRINTK("%s\n", __func__); | 441 | SCTP_DEBUG_PRINTK("%s\n", __func__); |
442 | 442 | ||
443 | sctp_do_sm(SCTP_EVENT_T_OTHER, | 443 | if (sock_owned_by_user(sk)) { |
444 | SCTP_ST_OTHER(SCTP_EVENT_ICMP_PROTO_UNREACH), | 444 | if (timer_pending(&t->proto_unreach_timer)) |
445 | asoc->state, asoc->ep, asoc, t, | 445 | return; |
446 | GFP_ATOMIC); | 446 | else { |
447 | if (!mod_timer(&t->proto_unreach_timer, | ||
448 | jiffies + (HZ/20))) | ||
449 | sctp_association_hold(asoc); | ||
450 | } | ||
451 | |||
452 | } else { | ||
453 | if (timer_pending(&t->proto_unreach_timer) && | ||
454 | del_timer(&t->proto_unreach_timer)) | ||
455 | sctp_association_put(asoc); | ||
447 | 456 | ||
457 | sctp_do_sm(SCTP_EVENT_T_OTHER, | ||
458 | SCTP_ST_OTHER(SCTP_EVENT_ICMP_PROTO_UNREACH), | ||
459 | asoc->state, asoc->ep, asoc, t, | ||
460 | GFP_ATOMIC); | ||
461 | } | ||
448 | } | 462 | } |
449 | 463 | ||
450 | /* Common lookup code for icmp/icmpv6 error handler. */ | 464 | /* Common lookup code for icmp/icmpv6 error handler. */ |
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index d5ae450b6f02..eb1f42f45fdd 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -397,6 +397,41 @@ out_unlock: | |||
397 | sctp_transport_put(transport); | 397 | sctp_transport_put(transport); |
398 | } | 398 | } |
399 | 399 | ||
400 | /* Handle the timeout of the ICMP protocol unreachable timer. Trigger | ||
401 | * the correct state machine transition that will close the association. | ||
402 | */ | ||
403 | void sctp_generate_proto_unreach_event(unsigned long data) | ||
404 | { | ||
405 | struct sctp_transport *transport = (struct sctp_transport *) data; | ||
406 | struct sctp_association *asoc = transport->asoc; | ||
407 | |||
408 | sctp_bh_lock_sock(asoc->base.sk); | ||
409 | if (sock_owned_by_user(asoc->base.sk)) { | ||
410 | SCTP_DEBUG_PRINTK("%s:Sock is busy.\n", __func__); | ||
411 | |||
412 | /* Try again later. */ | ||
413 | if (!mod_timer(&transport->proto_unreach_timer, | ||
414 | jiffies + (HZ/20))) | ||
415 | sctp_association_hold(asoc); | ||
416 | goto out_unlock; | ||
417 | } | ||
418 | |||
419 | /* Is this structure just waiting around for us to actually | ||
420 | * get destroyed? | ||
421 | */ | ||
422 | if (asoc->base.dead) | ||
423 | goto out_unlock; | ||
424 | |||
425 | sctp_do_sm(SCTP_EVENT_T_OTHER, | ||
426 | SCTP_ST_OTHER(SCTP_EVENT_ICMP_PROTO_UNREACH), | ||
427 | asoc->state, asoc->ep, asoc, transport, GFP_ATOMIC); | ||
428 | |||
429 | out_unlock: | ||
430 | sctp_bh_unlock_sock(asoc->base.sk); | ||
431 | sctp_association_put(asoc); | ||
432 | } | ||
433 | |||
434 | |||
400 | /* Inject a SACK Timeout event into the state machine. */ | 435 | /* Inject a SACK Timeout event into the state machine. */ |
401 | static void sctp_generate_sack_event(unsigned long data) | 436 | static void sctp_generate_sack_event(unsigned long data) |
402 | { | 437 | { |
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index be4d63d5a5cc..4a368038d46f 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -108,6 +108,8 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, | |||
108 | (unsigned long)peer); | 108 | (unsigned long)peer); |
109 | setup_timer(&peer->hb_timer, sctp_generate_heartbeat_event, | 109 | setup_timer(&peer->hb_timer, sctp_generate_heartbeat_event, |
110 | (unsigned long)peer); | 110 | (unsigned long)peer); |
111 | setup_timer(&peer->proto_unreach_timer, | ||
112 | sctp_generate_proto_unreach_event, (unsigned long)peer); | ||
111 | 113 | ||
112 | /* Initialize the 64-bit random nonce sent with heartbeat. */ | 114 | /* Initialize the 64-bit random nonce sent with heartbeat. */ |
113 | get_random_bytes(&peer->hb_nonce, sizeof(peer->hb_nonce)); | 115 | get_random_bytes(&peer->hb_nonce, sizeof(peer->hb_nonce)); |
diff --git a/security/min_addr.c b/security/min_addr.c index e86f297522bf..f728728f193b 100644 --- a/security/min_addr.c +++ b/security/min_addr.c | |||
@@ -33,7 +33,7 @@ int mmap_min_addr_handler(struct ctl_table *table, int write, | |||
33 | { | 33 | { |
34 | int ret; | 34 | int ret; |
35 | 35 | ||
36 | if (!capable(CAP_SYS_RAWIO)) | 36 | if (write && !capable(CAP_SYS_RAWIO)) |
37 | return -EPERM; | 37 | return -EPERM; |
38 | 38 | ||
39 | ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos); | 39 | ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos); |
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 872887624030..20b5982c996b 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -36,6 +36,9 @@ | |||
36 | #include <sound/timer.h> | 36 | #include <sound/timer.h> |
37 | #include <sound/minors.h> | 37 | #include <sound/minors.h> |
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
39 | #if defined(CONFIG_MIPS) && defined(CONFIG_DMA_NONCOHERENT) | ||
40 | #include <dma-coherence.h> | ||
41 | #endif | ||
39 | 42 | ||
40 | /* | 43 | /* |
41 | * Compatibility | 44 | * Compatibility |
@@ -3184,6 +3187,10 @@ static int snd_pcm_default_mmap(struct snd_pcm_substream *substream, | |||
3184 | substream->runtime->dma_area, | 3187 | substream->runtime->dma_area, |
3185 | substream->runtime->dma_addr, | 3188 | substream->runtime->dma_addr, |
3186 | area->vm_end - area->vm_start); | 3189 | area->vm_end - area->vm_start); |
3190 | #elif defined(CONFIG_MIPS) && defined(CONFIG_DMA_NONCOHERENT) | ||
3191 | if (substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV && | ||
3192 | !plat_device_is_coherent(substream->dma_buffer.dev.dev)) | ||
3193 | area->vm_page_prot = pgprot_noncached(area->vm_page_prot); | ||
3187 | #endif /* ARCH_HAS_DMA_MMAP_COHERENT */ | 3194 | #endif /* ARCH_HAS_DMA_MMAP_COHERENT */ |
3188 | /* mmap with fault handler */ | 3195 | /* mmap with fault handler */ |
3189 | area->vm_ops = &snd_pcm_vm_ops_data_fault; | 3196 | area->vm_ops = &snd_pcm_vm_ops_data_fault; |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 56e52071c769..feabb44c7ca4 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -1197,9 +1197,10 @@ static int patch_cxt5045(struct hda_codec *codec) | |||
1197 | case 0x103c: | 1197 | case 0x103c: |
1198 | case 0x1631: | 1198 | case 0x1631: |
1199 | case 0x1734: | 1199 | case 0x1734: |
1200 | /* HP, Packard Bell, & Fujitsu-Siemens laptops have really bad | 1200 | case 0x17aa: |
1201 | * sound over 0dB on NID 0x17. Fix max PCM level to 0 dB | 1201 | /* HP, Packard Bell, Fujitsu-Siemens & Lenovo laptops have |
1202 | * (originally it has 0x2b steps with 0dB offset 0x14) | 1202 | * really bad sound over 0dB on NID 0x17. Fix max PCM level to |
1203 | * 0 dB (originally it has 0x2b steps with 0dB offset 0x14) | ||
1203 | */ | 1204 | */ |
1204 | snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT, | 1205 | snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT, |
1205 | (0x14 << AC_AMPCAP_OFFSET_SHIFT) | | 1206 | (0x14 << AC_AMPCAP_OFFSET_SHIFT) | |
@@ -2846,6 +2847,7 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = { | |||
2846 | SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), | 2847 | SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), |
2847 | SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5), | 2848 | SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5), |
2848 | SND_PCI_QUIRK(0x1179, 0xffe0, "Toshiba Satellite Pro T130-15F", CXT5066_OLPC_XO_1_5), | 2849 | SND_PCI_QUIRK(0x1179, 0xffe0, "Toshiba Satellite Pro T130-15F", CXT5066_OLPC_XO_1_5), |
2850 | SND_PCI_QUIRK(0x17aa, 0x21b2, "Thinkpad X100e", CXT5066_IDEAPAD), | ||
2849 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "ideapad", CXT5066_IDEAPAD), | 2851 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "ideapad", CXT5066_IDEAPAD), |
2850 | {} | 2852 | {} |
2851 | }; | 2853 | }; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 7404dba16f83..886d8e46bb37 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -17871,7 +17871,6 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = { | |||
17871 | ALC662_3ST_6ch_DIG), | 17871 | ALC662_3ST_6ch_DIG), |
17872 | SND_PCI_QUIRK_MASK(0x1854, 0xf000, 0x2000, "ASUS H13-200x", | 17872 | SND_PCI_QUIRK_MASK(0x1854, 0xf000, 0x2000, "ASUS H13-200x", |
17873 | ALC663_ASUS_H13), | 17873 | ALC663_ASUS_H13), |
17874 | SND_PCI_QUIRK(0x8086, 0xd604, "Intel mobo", ALC662_3ST_2ch_DIG), | ||
17875 | {} | 17874 | {} |
17876 | }; | 17875 | }; |
17877 | 17876 | ||
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 7fb7d017a347..a0e06d82da1f 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -104,6 +104,7 @@ enum { | |||
104 | STAC_DELL_M4_2, | 104 | STAC_DELL_M4_2, |
105 | STAC_DELL_M4_3, | 105 | STAC_DELL_M4_3, |
106 | STAC_HP_M4, | 106 | STAC_HP_M4, |
107 | STAC_HP_DV4, | ||
107 | STAC_HP_DV5, | 108 | STAC_HP_DV5, |
108 | STAC_HP_HDX, | 109 | STAC_HP_HDX, |
109 | STAC_HP_DV4_1222NR, | 110 | STAC_HP_DV4_1222NR, |
@@ -1544,11 +1545,9 @@ static unsigned int alienware_m17x_pin_configs[13] = { | |||
1544 | 0x904601b0, | 1545 | 0x904601b0, |
1545 | }; | 1546 | }; |
1546 | 1547 | ||
1547 | static unsigned int intel_dg45id_pin_configs[14] = { | 1548 | static unsigned int intel_dg45id_pin_configs[13] = { |
1548 | 0x02214230, 0x02A19240, 0x01013214, 0x01014210, | 1549 | 0x02214230, 0x02A19240, 0x01013214, 0x01014210, |
1549 | 0x01A19250, 0x01011212, 0x01016211, 0x40f000f0, | 1550 | 0x01A19250, 0x01011212, 0x01016211 |
1550 | 0x40f000f0, 0x40f000f0, 0x40f000f0, 0x014510A0, | ||
1551 | 0x074510B0, 0x40f000f0 | ||
1552 | }; | 1551 | }; |
1553 | 1552 | ||
1554 | static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = { | 1553 | static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = { |
@@ -1693,6 +1692,7 @@ static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = { | |||
1693 | [STAC_DELL_M4_2] = dell_m4_2_pin_configs, | 1692 | [STAC_DELL_M4_2] = dell_m4_2_pin_configs, |
1694 | [STAC_DELL_M4_3] = dell_m4_3_pin_configs, | 1693 | [STAC_DELL_M4_3] = dell_m4_3_pin_configs, |
1695 | [STAC_HP_M4] = NULL, | 1694 | [STAC_HP_M4] = NULL, |
1695 | [STAC_HP_DV4] = NULL, | ||
1696 | [STAC_HP_DV5] = NULL, | 1696 | [STAC_HP_DV5] = NULL, |
1697 | [STAC_HP_HDX] = NULL, | 1697 | [STAC_HP_HDX] = NULL, |
1698 | [STAC_HP_DV4_1222NR] = NULL, | 1698 | [STAC_HP_DV4_1222NR] = NULL, |
@@ -1705,6 +1705,7 @@ static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = { | |||
1705 | [STAC_DELL_M4_2] = "dell-m4-2", | 1705 | [STAC_DELL_M4_2] = "dell-m4-2", |
1706 | [STAC_DELL_M4_3] = "dell-m4-3", | 1706 | [STAC_DELL_M4_3] = "dell-m4-3", |
1707 | [STAC_HP_M4] = "hp-m4", | 1707 | [STAC_HP_M4] = "hp-m4", |
1708 | [STAC_HP_DV4] = "hp-dv4", | ||
1708 | [STAC_HP_DV5] = "hp-dv5", | 1709 | [STAC_HP_DV5] = "hp-dv5", |
1709 | [STAC_HP_HDX] = "hp-hdx", | 1710 | [STAC_HP_HDX] = "hp-hdx", |
1710 | [STAC_HP_DV4_1222NR] = "hp-dv4-1222nr", | 1711 | [STAC_HP_DV4_1222NR] = "hp-dv4-1222nr", |
@@ -1723,7 +1724,7 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { | |||
1723 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3080, | 1724 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3080, |
1724 | "HP", STAC_HP_DV5), | 1725 | "HP", STAC_HP_DV5), |
1725 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x30f0, | 1726 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x30f0, |
1726 | "HP dv4-7", STAC_HP_DV5), | 1727 | "HP dv4-7", STAC_HP_DV4), |
1727 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3600, | 1728 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3600, |
1728 | "HP dv4-7", STAC_HP_DV5), | 1729 | "HP dv4-7", STAC_HP_DV5), |
1729 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3610, | 1730 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3610, |
@@ -4768,6 +4769,9 @@ static void set_hp_led_gpio(struct hda_codec *codec) | |||
4768 | struct sigmatel_spec *spec = codec->spec; | 4769 | struct sigmatel_spec *spec = codec->spec; |
4769 | unsigned int gpio; | 4770 | unsigned int gpio; |
4770 | 4771 | ||
4772 | if (spec->gpio_led) | ||
4773 | return; | ||
4774 | |||
4771 | gpio = snd_hda_param_read(codec, codec->afg, AC_PAR_GPIO_CAP); | 4775 | gpio = snd_hda_param_read(codec, codec->afg, AC_PAR_GPIO_CAP); |
4772 | gpio &= AC_GPIO_IO_COUNT; | 4776 | gpio &= AC_GPIO_IO_COUNT; |
4773 | if (gpio > 3) | 4777 | if (gpio > 3) |
@@ -5677,6 +5681,9 @@ again: | |||
5677 | spec->num_smuxes = 1; | 5681 | spec->num_smuxes = 1; |
5678 | spec->num_dmuxes = 1; | 5682 | spec->num_dmuxes = 1; |
5679 | /* fallthrough */ | 5683 | /* fallthrough */ |
5684 | case STAC_HP_DV4: | ||
5685 | spec->gpio_led = 0x01; | ||
5686 | /* fallthrough */ | ||
5680 | case STAC_HP_DV5: | 5687 | case STAC_HP_DV5: |
5681 | snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010); | 5688 | snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010); |
5682 | stac92xx_auto_set_pinctl(codec, 0x0d, AC_PINCTL_OUT_EN); | 5689 | stac92xx_auto_set_pinctl(codec, 0x0d, AC_PINCTL_OUT_EN); |
@@ -5690,6 +5697,7 @@ again: | |||
5690 | spec->num_dmics = 1; | 5697 | spec->num_dmics = 1; |
5691 | spec->num_dmuxes = 1; | 5698 | spec->num_dmuxes = 1; |
5692 | spec->num_smuxes = 1; | 5699 | spec->num_smuxes = 1; |
5700 | spec->gpio_led = 0x08; | ||
5693 | break; | 5701 | break; |
5694 | } | 5702 | } |
5695 | 5703 | ||
@@ -5746,7 +5754,8 @@ again: | |||
5746 | } | 5754 | } |
5747 | 5755 | ||
5748 | /* enable bass on HP dv7 */ | 5756 | /* enable bass on HP dv7 */ |
5749 | if (spec->board_config == STAC_HP_DV5) { | 5757 | if (spec->board_config == STAC_HP_DV4 || |
5758 | spec->board_config == STAC_HP_DV5) { | ||
5750 | unsigned int cap; | 5759 | unsigned int cap; |
5751 | cap = snd_hda_param_read(codec, 0x1, AC_PAR_GPIO_CAP); | 5760 | cap = snd_hda_param_read(codec, 0x1, AC_PAR_GPIO_CAP); |
5752 | cap &= AC_GPIO_IO_COUNT; | 5761 | cap &= AC_GPIO_IO_COUNT; |
diff --git a/sound/pci/ice1712/maya44.c b/sound/pci/ice1712/maya44.c index 3e1c20ae2f1c..726fd4b92e19 100644 --- a/sound/pci/ice1712/maya44.c +++ b/sound/pci/ice1712/maya44.c | |||
@@ -347,7 +347,7 @@ static int maya_gpio_sw_put(struct snd_kcontrol *kcontrol, | |||
347 | 347 | ||
348 | /* known working input slots (0-4) */ | 348 | /* known working input slots (0-4) */ |
349 | #define MAYA_LINE_IN 1 /* in-2 */ | 349 | #define MAYA_LINE_IN 1 /* in-2 */ |
350 | #define MAYA_MIC_IN 4 /* in-5 */ | 350 | #define MAYA_MIC_IN 3 /* in-4 */ |
351 | 351 | ||
352 | static void wm8776_select_input(struct snd_maya44 *chip, int idx, int line) | 352 | static void wm8776_select_input(struct snd_maya44 *chip, int idx, int line) |
353 | { | 353 | { |
@@ -393,8 +393,8 @@ static int maya_rec_src_put(struct snd_kcontrol *kcontrol, | |||
393 | int changed; | 393 | int changed; |
394 | 394 | ||
395 | mutex_lock(&chip->mutex); | 395 | mutex_lock(&chip->mutex); |
396 | changed = maya_set_gpio_bits(chip->ice, GPIO_MIC_RELAY, | 396 | changed = maya_set_gpio_bits(chip->ice, 1 << GPIO_MIC_RELAY, |
397 | sel ? GPIO_MIC_RELAY : 0); | 397 | sel ? (1 << GPIO_MIC_RELAY) : 0); |
398 | wm8776_select_input(chip, 0, sel ? MAYA_MIC_IN : MAYA_LINE_IN); | 398 | wm8776_select_input(chip, 0, sel ? MAYA_MIC_IN : MAYA_LINE_IN); |
399 | mutex_unlock(&chip->mutex); | 399 | mutex_unlock(&chip->mutex); |
400 | return changed; | 400 | return changed; |
diff --git a/sound/pci/oxygen/xonar_cs43xx.c b/sound/pci/oxygen/xonar_cs43xx.c index 16c226bfcd2b..7c4986b27f2b 100644 --- a/sound/pci/oxygen/xonar_cs43xx.c +++ b/sound/pci/oxygen/xonar_cs43xx.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include <sound/pcm_params.h> | 56 | #include <sound/pcm_params.h> |
57 | #include <sound/tlv.h> | 57 | #include <sound/tlv.h> |
58 | #include "xonar.h" | 58 | #include "xonar.h" |
59 | #include "cm9780.h" | ||
59 | #include "cs4398.h" | 60 | #include "cs4398.h" |
60 | #include "cs4362a.h" | 61 | #include "cs4362a.h" |
61 | 62 | ||
@@ -172,6 +173,8 @@ static void xonar_d1_init(struct oxygen *chip) | |||
172 | oxygen_clear_bits16(chip, OXYGEN_GPIO_DATA, | 173 | oxygen_clear_bits16(chip, OXYGEN_GPIO_DATA, |
173 | GPIO_D1_FRONT_PANEL | GPIO_D1_INPUT_ROUTE); | 174 | GPIO_D1_FRONT_PANEL | GPIO_D1_INPUT_ROUTE); |
174 | 175 | ||
176 | oxygen_ac97_set_bits(chip, 0, CM9780_JACK, CM9780_FMIC2MIC); | ||
177 | |||
175 | xonar_init_cs53x1(chip); | 178 | xonar_init_cs53x1(chip); |
176 | xonar_enable_output(chip); | 179 | xonar_enable_output(chip); |
177 | 180 | ||
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 03a5eb22da2b..7c79c1d76d0c 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c | |||
@@ -197,7 +197,7 @@ int kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level) | |||
197 | union kvm_ioapic_redirect_entry entry; | 197 | union kvm_ioapic_redirect_entry entry; |
198 | int ret = 1; | 198 | int ret = 1; |
199 | 199 | ||
200 | mutex_lock(&ioapic->lock); | 200 | spin_lock(&ioapic->lock); |
201 | if (irq >= 0 && irq < IOAPIC_NUM_PINS) { | 201 | if (irq >= 0 && irq < IOAPIC_NUM_PINS) { |
202 | entry = ioapic->redirtbl[irq]; | 202 | entry = ioapic->redirtbl[irq]; |
203 | level ^= entry.fields.polarity; | 203 | level ^= entry.fields.polarity; |
@@ -214,7 +214,7 @@ int kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level) | |||
214 | } | 214 | } |
215 | trace_kvm_ioapic_set_irq(entry.bits, irq, ret == 0); | 215 | trace_kvm_ioapic_set_irq(entry.bits, irq, ret == 0); |
216 | } | 216 | } |
217 | mutex_unlock(&ioapic->lock); | 217 | spin_unlock(&ioapic->lock); |
218 | 218 | ||
219 | return ret; | 219 | return ret; |
220 | } | 220 | } |
@@ -238,9 +238,9 @@ static void __kvm_ioapic_update_eoi(struct kvm_ioapic *ioapic, int vector, | |||
238 | * is dropped it will be put into irr and will be delivered | 238 | * is dropped it will be put into irr and will be delivered |
239 | * after ack notifier returns. | 239 | * after ack notifier returns. |
240 | */ | 240 | */ |
241 | mutex_unlock(&ioapic->lock); | 241 | spin_unlock(&ioapic->lock); |
242 | kvm_notify_acked_irq(ioapic->kvm, KVM_IRQCHIP_IOAPIC, i); | 242 | kvm_notify_acked_irq(ioapic->kvm, KVM_IRQCHIP_IOAPIC, i); |
243 | mutex_lock(&ioapic->lock); | 243 | spin_lock(&ioapic->lock); |
244 | 244 | ||
245 | if (trigger_mode != IOAPIC_LEVEL_TRIG) | 245 | if (trigger_mode != IOAPIC_LEVEL_TRIG) |
246 | continue; | 246 | continue; |
@@ -259,9 +259,9 @@ void kvm_ioapic_update_eoi(struct kvm *kvm, int vector, int trigger_mode) | |||
259 | smp_rmb(); | 259 | smp_rmb(); |
260 | if (!test_bit(vector, ioapic->handled_vectors)) | 260 | if (!test_bit(vector, ioapic->handled_vectors)) |
261 | return; | 261 | return; |
262 | mutex_lock(&ioapic->lock); | 262 | spin_lock(&ioapic->lock); |
263 | __kvm_ioapic_update_eoi(ioapic, vector, trigger_mode); | 263 | __kvm_ioapic_update_eoi(ioapic, vector, trigger_mode); |
264 | mutex_unlock(&ioapic->lock); | 264 | spin_unlock(&ioapic->lock); |
265 | } | 265 | } |
266 | 266 | ||
267 | static inline struct kvm_ioapic *to_ioapic(struct kvm_io_device *dev) | 267 | static inline struct kvm_ioapic *to_ioapic(struct kvm_io_device *dev) |
@@ -287,7 +287,7 @@ static int ioapic_mmio_read(struct kvm_io_device *this, gpa_t addr, int len, | |||
287 | ASSERT(!(addr & 0xf)); /* check alignment */ | 287 | ASSERT(!(addr & 0xf)); /* check alignment */ |
288 | 288 | ||
289 | addr &= 0xff; | 289 | addr &= 0xff; |
290 | mutex_lock(&ioapic->lock); | 290 | spin_lock(&ioapic->lock); |
291 | switch (addr) { | 291 | switch (addr) { |
292 | case IOAPIC_REG_SELECT: | 292 | case IOAPIC_REG_SELECT: |
293 | result = ioapic->ioregsel; | 293 | result = ioapic->ioregsel; |
@@ -301,7 +301,7 @@ static int ioapic_mmio_read(struct kvm_io_device *this, gpa_t addr, int len, | |||
301 | result = 0; | 301 | result = 0; |
302 | break; | 302 | break; |
303 | } | 303 | } |
304 | mutex_unlock(&ioapic->lock); | 304 | spin_unlock(&ioapic->lock); |
305 | 305 | ||
306 | switch (len) { | 306 | switch (len) { |
307 | case 8: | 307 | case 8: |
@@ -338,7 +338,7 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len, | |||
338 | } | 338 | } |
339 | 339 | ||
340 | addr &= 0xff; | 340 | addr &= 0xff; |
341 | mutex_lock(&ioapic->lock); | 341 | spin_lock(&ioapic->lock); |
342 | switch (addr) { | 342 | switch (addr) { |
343 | case IOAPIC_REG_SELECT: | 343 | case IOAPIC_REG_SELECT: |
344 | ioapic->ioregsel = data; | 344 | ioapic->ioregsel = data; |
@@ -356,7 +356,7 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len, | |||
356 | default: | 356 | default: |
357 | break; | 357 | break; |
358 | } | 358 | } |
359 | mutex_unlock(&ioapic->lock); | 359 | spin_unlock(&ioapic->lock); |
360 | return 0; | 360 | return 0; |
361 | } | 361 | } |
362 | 362 | ||
@@ -386,7 +386,7 @@ int kvm_ioapic_init(struct kvm *kvm) | |||
386 | ioapic = kzalloc(sizeof(struct kvm_ioapic), GFP_KERNEL); | 386 | ioapic = kzalloc(sizeof(struct kvm_ioapic), GFP_KERNEL); |
387 | if (!ioapic) | 387 | if (!ioapic) |
388 | return -ENOMEM; | 388 | return -ENOMEM; |
389 | mutex_init(&ioapic->lock); | 389 | spin_lock_init(&ioapic->lock); |
390 | kvm->arch.vioapic = ioapic; | 390 | kvm->arch.vioapic = ioapic; |
391 | kvm_ioapic_reset(ioapic); | 391 | kvm_ioapic_reset(ioapic); |
392 | kvm_iodevice_init(&ioapic->dev, &ioapic_mmio_ops); | 392 | kvm_iodevice_init(&ioapic->dev, &ioapic_mmio_ops); |
@@ -419,9 +419,9 @@ int kvm_get_ioapic(struct kvm *kvm, struct kvm_ioapic_state *state) | |||
419 | if (!ioapic) | 419 | if (!ioapic) |
420 | return -EINVAL; | 420 | return -EINVAL; |
421 | 421 | ||
422 | mutex_lock(&ioapic->lock); | 422 | spin_lock(&ioapic->lock); |
423 | memcpy(state, ioapic, sizeof(struct kvm_ioapic_state)); | 423 | memcpy(state, ioapic, sizeof(struct kvm_ioapic_state)); |
424 | mutex_unlock(&ioapic->lock); | 424 | spin_unlock(&ioapic->lock); |
425 | return 0; | 425 | return 0; |
426 | } | 426 | } |
427 | 427 | ||
@@ -431,9 +431,9 @@ int kvm_set_ioapic(struct kvm *kvm, struct kvm_ioapic_state *state) | |||
431 | if (!ioapic) | 431 | if (!ioapic) |
432 | return -EINVAL; | 432 | return -EINVAL; |
433 | 433 | ||
434 | mutex_lock(&ioapic->lock); | 434 | spin_lock(&ioapic->lock); |
435 | memcpy(ioapic, state, sizeof(struct kvm_ioapic_state)); | 435 | memcpy(ioapic, state, sizeof(struct kvm_ioapic_state)); |
436 | update_handled_vectors(ioapic); | 436 | update_handled_vectors(ioapic); |
437 | mutex_unlock(&ioapic->lock); | 437 | spin_unlock(&ioapic->lock); |
438 | return 0; | 438 | return 0; |
439 | } | 439 | } |
diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapic.h index 8a751b78a430..0b190c34ccc3 100644 --- a/virt/kvm/ioapic.h +++ b/virt/kvm/ioapic.h | |||
@@ -45,7 +45,7 @@ struct kvm_ioapic { | |||
45 | struct kvm_io_device dev; | 45 | struct kvm_io_device dev; |
46 | struct kvm *kvm; | 46 | struct kvm *kvm; |
47 | void (*ack_notifier)(void *opaque, int irq); | 47 | void (*ack_notifier)(void *opaque, int irq); |
48 | struct mutex lock; | 48 | spinlock_t lock; |
49 | DECLARE_BITMAP(handled_vectors, 256); | 49 | DECLARE_BITMAP(handled_vectors, 256); |
50 | }; | 50 | }; |
51 | 51 | ||