瀏覽代碼

Merge branch 'master' into work

Greg Kroah-Hartman 14 年之前
父節點
當前提交
8d7ee9c498
共有 100 個文件被更改,包括 605 次插入462 次删除
  1. 0 4
      Documentation/DocBook/sh.tmpl
  2. 3 3
      Documentation/DocBook/uio-howto.tmpl
  3. 23 10
      Documentation/development-process/2.Process
  4. 25 7
      Documentation/fb/00-INDEX
  5. 1 1
      Documentation/filesystems/configfs/configfs_example_explicit.c
  6. 10 0
      Documentation/gpio.txt
  7. 1 1
      Documentation/hwmon/lm93
  8. 1 1
      Documentation/hwmon/max6650
  9. 5 0
      Documentation/kernel-parameters.txt
  10. 3 0
      Documentation/power/opp.txt
  11. 0 32
      Documentation/sh/clk.txt
  12. 15 2
      MAINTAINERS
  13. 1 1
      Makefile
  14. 1 1
      arch/arm/boot/compressed/head.S
  15. 1 1
      arch/arm/boot/compressed/vmlinux.lds.in
  16. 1 1
      arch/arm/include/asm/assembler.h
  17. 4 0
      arch/arm/include/asm/mmu.h
  18. 3 0
      arch/arm/include/asm/pgtable.h
  19. 4 2
      arch/arm/lib/findbit.S
  20. 1 1
      arch/arm/mach-aaec2000/include/mach/vmalloc.h
  21. 1 1
      arch/arm/mach-bcmring/include/mach/vmalloc.h
  22. 1 1
      arch/arm/mach-clps711x/include/mach/vmalloc.h
  23. 3 3
      arch/arm/mach-davinci/dm355.c
  24. 3 3
      arch/arm/mach-davinci/dm365.c
  25. 2 2
      arch/arm/mach-davinci/dm644x.c
  26. 1 1
      arch/arm/mach-ebsa110/include/mach/vmalloc.h
  27. 1 1
      arch/arm/mach-footbridge/include/mach/vmalloc.h
  28. 1 1
      arch/arm/mach-h720x/include/mach/vmalloc.h
  29. 0 6
      arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
  30. 1 1
      arch/arm/mach-integrator/include/mach/vmalloc.h
  31. 1 1
      arch/arm/mach-msm/include/mach/vmalloc.h
  32. 2 2
      arch/arm/mach-mx25/devices-imx25.h
  33. 2 3
      arch/arm/mach-mx3/mach-pcm037_eet.c
  34. 1 1
      arch/arm/mach-netx/include/mach/vmalloc.h
  35. 1 1
      arch/arm/mach-omap1/include/mach/vmalloc.h
  36. 1 1
      arch/arm/mach-omap2/include/mach/vmalloc.h
  37. 1 1
      arch/arm/mach-pnx4008/include/mach/vmalloc.h
  38. 1 1
      arch/arm/mach-rpc/include/mach/vmalloc.h
  39. 4 4
      arch/arm/mach-s3c2410/h1940-bluetooth.c
  40. 2 3
      arch/arm/mach-s3c2416/irq.c
  41. 2 3
      arch/arm/mach-s3c2443/irq.c
  42. 1 1
      arch/arm/mach-s3c64xx/mach-mini6410.c
  43. 1 1
      arch/arm/mach-s3c64xx/mach-real6410.c
  44. 1 0
      arch/arm/mach-s5pv210/mach-smdkc110.c
  45. 1 0
      arch/arm/mach-s5pv210/mach-smdkv210.c
  46. 1 1
      arch/arm/mach-shark/include/mach/vmalloc.h
  47. 111 36
      arch/arm/mach-shmobile/board-ap4evb.c
  48. 10 29
      arch/arm/mach-shmobile/clock-sh7372.c
  49. 3 3
      arch/arm/mach-ux500/cpu.c
  50. 1 1
      arch/arm/mach-versatile/include/mach/vmalloc.h
  51. 2 2
      arch/arm/mm/ioremap.c
  52. 0 8
      arch/arm/plat-mxc/devices/platform-imx-dma.c
  53. 1 0
      arch/arm/plat-mxc/devices/platform-spi_imx.c
  54. 80 9
      arch/arm/plat-nomadik/timer.c
  55. 3 0
      arch/arm/plat-pxa/include/plat/sdhci.h
  56. 3 3
      arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c
  57. 3 3
      arch/arm/plat-s3c24xx/spi-bus1-gpd8_9_10.c
  58. 3 3
      arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c
  59. 0 1
      arch/blackfin/kernel/process.c
  60. 0 1
      arch/frv/kernel/process.c
  61. 0 1
      arch/h8300/kernel/process.c
  62. 3 1
      arch/ia64/hp/sim/simscsi.c
  63. 0 1
      arch/m68k/kernel/process.c
  64. 0 1
      arch/m68knommu/kernel/process.c
  65. 0 1
      arch/mn10300/kernel/process.c
  66. 0 1
      arch/parisc/hpux/sys_hpux.c
  67. 0 1
      arch/parisc/kernel/sys_parisc32.c
  68. 4 0
      arch/powerpc/Kconfig
  69. 2 1
      arch/powerpc/boot/div64.S
  70. 2 2
      arch/powerpc/kernel/kgdb.c
  71. 2 3
      arch/powerpc/kernel/setup_64.c
  72. 0 1
      arch/powerpc/kernel/sys_ppc32.c
  73. 1 1
      arch/powerpc/mm/hash_utils_64.c
  74. 4 1
      arch/powerpc/mm/tlb_low_64e.S
  75. 1 1
      arch/powerpc/mm/tlb_nohash.c
  76. 6 0
      arch/powerpc/platforms/pseries/Kconfig
  77. 0 2
      arch/powerpc/platforms/pseries/eeh.c
  78. 0 2
      arch/powerpc/platforms/pseries/pci_dlpar.c
  79. 12 0
      arch/s390/Kconfig.debug
  80. 5 0
      arch/s390/include/asm/page.h
  81. 0 1
      arch/s390/kernel/compat_linux.c
  82. 53 17
      arch/s390/kernel/kprobes.c
  83. 4 6
      arch/s390/kernel/nmi.c
  84. 9 5
      arch/s390/lib/delay.c
  85. 3 4
      arch/s390/mm/gup.c
  86. 5 2
      arch/sh/include/asm/processor_32.h
  87. 1 1
      arch/sh/kernel/cpu/sh4/clock-sh4-202.c
  88. 1 1
      arch/sh/kernel/sys_sh.c
  89. 1 1
      arch/sh/kernel/vsyscall/vsyscall-trapa.S
  90. 0 1
      arch/sparc/kernel/leon_smp.c
  91. 0 1
      arch/sparc/kernel/sys_sparc32.c
  92. 0 1
      arch/sparc/kernel/sys_sparc_32.c
  93. 0 1
      arch/sparc/kernel/unaligned_32.c
  94. 0 1
      arch/sparc/kernel/windows.c
  95. 12 0
      arch/tile/Kconfig
  96. 52 0
      arch/tile/include/asm/cacheflush.h
  97. 11 4
      arch/tile/include/asm/io.h
  98. 0 117
      arch/tile/include/asm/pci-bridge.h
  99. 41 66
      arch/tile/include/asm/pci.h
  100. 10 0
      arch/tile/include/asm/processor.h

+ 0 - 4
Documentation/DocBook/sh.tmpl

@@ -79,10 +79,6 @@
       </sect2>
       </sect2>
     </sect1>
     </sect1>
   </chapter>
   </chapter>
-  <chapter id="clk">
-    <title>Clock Framework Extensions</title>
-!Iinclude/linux/sh_clk.h
-  </chapter>
   <chapter id="mach">
   <chapter id="mach">
     <title>Machine Specific Interfaces</title>
     <title>Machine Specific Interfaces</title>
     <sect1 id="dreamcast">
     <sect1 id="dreamcast">

+ 3 - 3
Documentation/DocBook/uio-howto.tmpl

@@ -16,7 +16,7 @@
 	</orgname>
 	</orgname>
 
 
 	<address>
 	<address>
-	   <email>hjk@linutronix.de</email>
+	   <email>hjk@hansjkoch.de</email>
 	</address>
 	</address>
     </affiliation>
     </affiliation>
 </author>
 </author>
@@ -114,7 +114,7 @@ GPL version 2.
 
 
 <para>If you know of any translations for this document, or you are
 <para>If you know of any translations for this document, or you are
 interested in translating it, please email me
 interested in translating it, please email me
-<email>hjk@linutronix.de</email>.
+<email>hjk@hansjkoch.de</email>.
 </para>
 </para>
 </sect1>
 </sect1>
 
 
@@ -171,7 +171,7 @@ interested in translating it, please email me
 <title>Feedback</title>
 <title>Feedback</title>
 	<para>Find something wrong with this document? (Or perhaps something
 	<para>Find something wrong with this document? (Or perhaps something
 	right?) I would love to hear from you. Please email me at
 	right?) I would love to hear from you. Please email me at
-	<email>hjk@linutronix.de</email>.</para>
+	<email>hjk@hansjkoch.de</email>.</para>
 </sect1>
 </sect1>
 </chapter>
 </chapter>
 
 

+ 23 - 10
Documentation/development-process/2.Process

@@ -154,7 +154,7 @@ The stages that a patch goes through are, generally:
    inclusion, it should be accepted by a relevant subsystem maintainer -
    inclusion, it should be accepted by a relevant subsystem maintainer -
    though this acceptance is not a guarantee that the patch will make it
    though this acceptance is not a guarantee that the patch will make it
    all the way to the mainline.  The patch will show up in the maintainer's
    all the way to the mainline.  The patch will show up in the maintainer's
-   subsystem tree and into the staging trees (described below).  When the
+   subsystem tree and into the -next trees (described below).  When the
    process works, this step leads to more extensive review of the patch and
    process works, this step leads to more extensive review of the patch and
    the discovery of any problems resulting from the integration of this
    the discovery of any problems resulting from the integration of this
    patch with work being done by others.
    patch with work being done by others.
@@ -236,7 +236,7 @@ finding the right maintainer.  Sending patches directly to Linus is not
 normally the right way to go.
 normally the right way to go.
 
 
 
 
-2.4: STAGING TREES
+2.4: NEXT TREES
 
 
 The chain of subsystem trees guides the flow of patches into the kernel,
 The chain of subsystem trees guides the flow of patches into the kernel,
 but it also raises an interesting question: what if somebody wants to look
 but it also raises an interesting question: what if somebody wants to look
@@ -250,7 +250,7 @@ changes land in the mainline kernel.  One could pull changes from all of
 the interesting subsystem trees, but that would be a big and error-prone
 the interesting subsystem trees, but that would be a big and error-prone
 job.
 job.
 
 
-The answer comes in the form of staging trees, where subsystem trees are
+The answer comes in the form of -next trees, where subsystem trees are
 collected for testing and review.  The older of these trees, maintained by
 collected for testing and review.  The older of these trees, maintained by
 Andrew Morton, is called "-mm" (for memory management, which is how it got
 Andrew Morton, is called "-mm" (for memory management, which is how it got
 started).  The -mm tree integrates patches from a long list of subsystem
 started).  The -mm tree integrates patches from a long list of subsystem
@@ -275,7 +275,7 @@ directory at:
 Use of the MMOTM tree is likely to be a frustrating experience, though;
 Use of the MMOTM tree is likely to be a frustrating experience, though;
 there is a definite chance that it will not even compile.
 there is a definite chance that it will not even compile.
 
 
-The other staging tree, started more recently, is linux-next, maintained by
+The other -next tree, started more recently, is linux-next, maintained by
 Stephen Rothwell.  The linux-next tree is, by design, a snapshot of what
 Stephen Rothwell.  The linux-next tree is, by design, a snapshot of what
 the mainline is expected to look like after the next merge window closes.
 the mainline is expected to look like after the next merge window closes.
 Linux-next trees are announced on the linux-kernel and linux-next mailing
 Linux-next trees are announced on the linux-kernel and linux-next mailing
@@ -303,12 +303,25 @@ volatility of linux-next tends to make it a difficult development target.
 See http://lwn.net/Articles/289013/ for more information on this topic, and
 See http://lwn.net/Articles/289013/ for more information on this topic, and
 stay tuned; much is still in flux where linux-next is involved.
 stay tuned; much is still in flux where linux-next is involved.
 
 
-Besides the mmotm and linux-next trees, the kernel source tree now contains
-the drivers/staging/ directory and many sub-directories for drivers or
-filesystems that are on their way to being added to the kernel tree
-proper, but they remain in drivers/staging/ while they still need more
-work.
-
+2.4.1: STAGING TREES
+
+The kernel source tree now contains the drivers/staging/ directory, where
+many sub-directories for drivers or filesystems that are on their way to
+being added to the kernel tree live.  They remain in drivers/staging while
+they still need more work; once complete, they can be moved into the
+kernel proper.  This is a way to keep track of drivers that aren't
+up to Linux kernel coding or quality standards, but people may want to use
+them and track development.
+
+Greg Kroah-Hartman currently (as of 2.6.36) maintains the staging tree.
+Drivers that still need work are sent to him, with each driver having
+its own subdirectory in drivers/staging/.  Along with the driver source
+files, a TODO file should be present in the directory as well.  The TODO
+file lists the pending work that the driver needs for acceptance into
+the kernel proper, as well as a list of people that should be Cc'd for any
+patches to the driver.  Staging drivers that don't currently build should
+have their config entries depend upon CONFIG_BROKEN.  Once they can
+be successfully built without outside patches, CONFIG_BROKEN can be removed.
 
 
 2.5: TOOLS
 2.5: TOOLS
 
 

+ 25 - 7
Documentation/fb/00-INDEX

@@ -4,33 +4,41 @@ please mail me.
 				    Geert Uytterhoeven <geert@linux-m68k.org>
 				    Geert Uytterhoeven <geert@linux-m68k.org>
 
 
 00-INDEX
 00-INDEX
-	- this file
+	- this file.
 arkfb.txt
 arkfb.txt
 	- info on the fbdev driver for ARK Logic chips.
 	- info on the fbdev driver for ARK Logic chips.
 aty128fb.txt
 aty128fb.txt
 	- info on the ATI Rage128 frame buffer driver.
 	- info on the ATI Rage128 frame buffer driver.
 cirrusfb.txt
 cirrusfb.txt
 	- info on the driver for Cirrus Logic chipsets.
 	- info on the driver for Cirrus Logic chipsets.
+cmap_xfbdev.txt
+	- an introduction to fbdev's cmap structures.
 deferred_io.txt
 deferred_io.txt
 	- an introduction to deferred IO.
 	- an introduction to deferred IO.
+efifb.txt
+	- info on the EFI platform driver for Intel based Apple computers.
+ep93xx-fb.txt
+	- info on the driver for EP93xx LCD controller.
 fbcon.txt
 fbcon.txt
 	- intro to and usage guide for the framebuffer console (fbcon).
 	- intro to and usage guide for the framebuffer console (fbcon).
 framebuffer.txt
 framebuffer.txt
 	- introduction to frame buffer devices.
 	- introduction to frame buffer devices.
-imacfb.txt
-	- info on the generic EFI platform driver for Intel based Macs.
+gxfb.txt
+	- info on the framebuffer driver for AMD Geode GX2 based processors.
 intel810.txt
 intel810.txt
 	- documentation for the Intel 810/815 framebuffer driver.
 	- documentation for the Intel 810/815 framebuffer driver.
 intelfb.txt
 intelfb.txt
 	- docs for Intel 830M/845G/852GM/855GM/865G/915G/945G fb driver.
 	- docs for Intel 830M/845G/852GM/855GM/865G/915G/945G fb driver.
 internals.txt
 internals.txt
 	- quick overview of frame buffer device internals.
 	- quick overview of frame buffer device internals.
+lxfb.txt
+	- info on the framebuffer driver for AMD Geode LX based processors.
 matroxfb.txt
 matroxfb.txt
 	- info on the Matrox framebuffer driver for Alpha, Intel and PPC.
 	- info on the Matrox framebuffer driver for Alpha, Intel and PPC.
+metronomefb.txt
+	- info on the driver for the Metronome display controller.
 modedb.txt
 modedb.txt
 	- info on the video mode database.
 	- info on the video mode database.
-matroxfb.txt
-	- info on the Matrox frame buffer driver.
 pvr2fb.txt
 pvr2fb.txt
 	- info on the PowerVR 2 frame buffer driver.
 	- info on the PowerVR 2 frame buffer driver.
 pxafb.txt
 pxafb.txt
@@ -39,13 +47,23 @@ s3fb.txt
 	- info on the fbdev driver for S3 Trio/Virge chips.
 	- info on the fbdev driver for S3 Trio/Virge chips.
 sa1100fb.txt
 sa1100fb.txt
 	- information about the driver for the SA-1100 LCD controller.
 	- information about the driver for the SA-1100 LCD controller.
+sh7760fb.txt
+	- info on the SH7760/SH7763 integrated LCDC Framebuffer driver.
 sisfb.txt
 sisfb.txt
 	- info on the framebuffer device driver for various SiS chips.
 	- info on the framebuffer device driver for various SiS chips.
 sstfb.txt
 sstfb.txt
 	- info on the frame buffer driver for 3dfx' Voodoo Graphics boards.
 	- info on the frame buffer driver for 3dfx' Voodoo Graphics boards.
 tgafb.txt
 tgafb.txt
-	- info on the TGA (DECChip 21030) frame buffer driver
+	- info on the TGA (DECChip 21030) frame buffer driver.
+tridentfb.txt
+	info on the framebuffer driver for some Trident chip based cards.
+uvesafb.txt
+	- info on the userspace VESA (VBE2+ compliant) frame buffer device.
 vesafb.txt
 vesafb.txt
-	- info on the VESA frame buffer device
+	- info on the VESA frame buffer device.
+viafb.modes
+	- list of modes for VIA Integration Graphic Chip.
+viafb.txt
+	- info on the VIA Integration Graphic Chip console framebuffer driver.
 vt8623fb.txt
 vt8623fb.txt
 	- info on the fb driver for the graphics core in VIA VT8623 chipsets.
 	- info on the fb driver for the graphics core in VIA VT8623 chipsets.

+ 1 - 1
Documentation/filesystems/configfs/configfs_example_explicit.c

@@ -89,7 +89,7 @@ static ssize_t childless_storeme_write(struct childless *childless,
 	char *p = (char *) page;
 	char *p = (char *) page;
 
 
 	tmp = simple_strtoul(p, &p, 10);
 	tmp = simple_strtoul(p, &p, 10);
-	if (!p || (*p && (*p != '\n')))
+	if ((*p != '\0') && (*p != '\n'))
 		return -EINVAL;
 		return -EINVAL;
 
 
 	if (tmp > INT_MAX)
 	if (tmp > INT_MAX)

+ 10 - 0
Documentation/gpio.txt

@@ -617,6 +617,16 @@ and have the following read/write attributes:
 		is configured as an output, this value may be written;
 		is configured as an output, this value may be written;
 		any nonzero value is treated as high.
 		any nonzero value is treated as high.
 
 
+		If the pin can be configured as interrupt-generating interrupt
+		and if it has been configured to generate interrupts (see the
+		description of "edge"), you can poll(2) on that file and
+		poll(2) will return whenever the interrupt was triggered. If
+		you use poll(2), set the events POLLPRI and POLLERR. If you
+		use select(2), set the file descriptor in exceptfds. After
+		poll(2) returns, either lseek(2) to the beginning of the sysfs
+		file and read the new value or close the file and re-open it
+		to read the value.
+
 	"edge" ... reads as either "none", "rising", "falling", or
 	"edge" ... reads as either "none", "rising", "falling", or
 		"both". Write these strings to select the signal edge(s)
 		"both". Write these strings to select the signal edge(s)
 		that will make poll(2) on the "value" file return.
 		that will make poll(2) on the "value" file return.

+ 1 - 1
Documentation/hwmon/lm93

@@ -11,7 +11,7 @@ Authors:
 	Mark M. Hoffman <mhoffman@lightlink.com>
 	Mark M. Hoffman <mhoffman@lightlink.com>
 	Ported to 2.6 by Eric J. Bowersox <ericb@aspsys.com>
 	Ported to 2.6 by Eric J. Bowersox <ericb@aspsys.com>
 	Adapted to 2.6.20 by Carsten Emde <ce@osadl.org>
 	Adapted to 2.6.20 by Carsten Emde <ce@osadl.org>
-	Modified for mainline integration by Hans J. Koch <hjk@linutronix.de>
+	Modified for mainline integration by Hans J. Koch <hjk@hansjkoch.de>
 
 
 Module Parameters
 Module Parameters
 -----------------
 -----------------

+ 1 - 1
Documentation/hwmon/max6650

@@ -8,7 +8,7 @@ Supported chips:
     Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6650-MAX6651.pdf
     Datasheet: http://pdfserv.maxim-ic.com/en/ds/MAX6650-MAX6651.pdf
 
 
 Authors:
 Authors:
-    Hans J. Koch <hjk@linutronix.de>
+    Hans J. Koch <hjk@hansjkoch.de>
     John Morris <john.morris@spirentcom.com>
     John Morris <john.morris@spirentcom.com>
     Claus Gindhart <claus.gindhart@kontron.com>
     Claus Gindhart <claus.gindhart@kontron.com>
 
 

+ 5 - 0
Documentation/kernel-parameters.txt

@@ -2385,6 +2385,11 @@ and is between 256 and 4096 characters. It is defined in the file
 			improve throughput, but will also increase the
 			improve throughput, but will also increase the
 			amount of memory reserved for use by the client.
 			amount of memory reserved for use by the client.
 
 
+	swapaccount[=0|1]
+			[KNL] Enable accounting of swap in memory resource
+			controller if no parameter or 1 is given or disable
+			it if 0 is given (See Documentation/cgroups/memory.txt)
+
 	swiotlb=	[IA-64] Number of I/O TLB slabs
 	swiotlb=	[IA-64] Number of I/O TLB slabs
 
 
 	switches=	[HW,M68k]
 	switches=	[HW,M68k]

+ 3 - 0
Documentation/power/opp.txt

@@ -37,6 +37,9 @@ Typical usage of the OPP library is as follows:
 SoC framework	-> modifies on required cases certain OPPs	-> OPP layer
 SoC framework	-> modifies on required cases certain OPPs	-> OPP layer
 		-> queries to search/retrieve information	->
 		-> queries to search/retrieve information	->
 
 
+Architectures that provide a SoC framework for OPP should select ARCH_HAS_OPP
+to make the OPP layer available.
+
 OPP layer expects each domain to be represented by a unique device pointer. SoC
 OPP layer expects each domain to be represented by a unique device pointer. SoC
 framework registers a set of initial OPPs per device with the OPP layer. This
 framework registers a set of initial OPPs per device with the OPP layer. This
 list is expected to be an optimally small number typically around 5 per device.
 list is expected to be an optimally small number typically around 5 per device.

+ 0 - 32
Documentation/sh/clk.txt

@@ -1,32 +0,0 @@
-Clock framework on SuperH architecture
-
-The framework on SH extends existing API by the function clk_set_rate_ex,
-which prototype is as follows:
-
-    clk_set_rate_ex (struct clk *clk, unsigned long rate, int algo_id)
-
-The algo_id parameter is used to specify algorithm used to recalculate clocks,
-adjanced to clock, specified as first argument. It is assumed that algo_id==0
-means no changes to adjanced clock
-
-Internally, the clk_set_rate_ex forwards request to clk->ops->set_rate method,
-if it is present in ops structure. The method should set the clock rate and adjust
-all needed clocks according to the passed algo_id.
-Exact values for algo_id are machine-dependent. For the sh7722, the following
-values are defined:
-
-	NO_CHANGE	= 0,
-	IUS_N1_N1,	/* I:U = N:1, U:Sh = N:1 */
-	IUS_322,	/* I:U:Sh = 3:2:2	 */
-	IUS_522,	/* I:U:Sh = 5:2:2 	 */
-	IUS_N11,	/* I:U:Sh = N:1:1	 */
-	SB_N1,		/* Sh:B = N:1		 */
-	SB3_N1,		/* Sh:B3 = N:1		 */
-	SB3_32,		/* Sh:B3 = 3:2		 */
-	SB3_43,		/* Sh:B3 = 4:3		 */
-	SB3_54,		/* Sh:B3 = 5:4		 */
-	BP_N1,		/* B:P	 = N:1		 */
-	IP_N1		/* I:P	 = N:1		 */
-
-Each of these constants means relation between clocks that can be set via the FRQCR
-register

+ 15 - 2
MAINTAINERS

@@ -1359,7 +1359,7 @@ F:	include/net/bluetooth/
 
 
 BONDING DRIVER
 BONDING DRIVER
 M:	Jay Vosburgh <fubar@us.ibm.com>
 M:	Jay Vosburgh <fubar@us.ibm.com>
-L:	bonding-devel@lists.sourceforge.net
+L:	netdev@vger.kernel.org
 W:	http://sourceforge.net/projects/bonding/
 W:	http://sourceforge.net/projects/bonding/
 S:	Supported
 S:	Supported
 F:	drivers/net/bonding/
 F:	drivers/net/bonding/
@@ -1829,6 +1829,13 @@ W:	http://www.chelsio.com
 S:	Supported
 S:	Supported
 F:	drivers/net/cxgb4vf/
 F:	drivers/net/cxgb4vf/
 
 
+STMMAC ETHERNET DRIVER
+M:	Giuseppe Cavallaro <peppe.cavallaro@st.com>
+L:	netdev@vger.kernel.org
+W:	http://www.stlinux.com
+S:	Supported
+F:	drivers/net/stmmac/
+
 CYBERPRO FB DRIVER
 CYBERPRO FB DRIVER
 M:	Russell King <linux@arm.linux.org.uk>
 M:	Russell King <linux@arm.linux.org.uk>
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@ -2008,6 +2015,7 @@ F:	drivers/hwmon/dme1737.c
 DOCBOOK FOR DOCUMENTATION
 DOCBOOK FOR DOCUMENTATION
 M:	Randy Dunlap <rdunlap@xenotime.net>
 M:	Randy Dunlap <rdunlap@xenotime.net>
 S:	Maintained
 S:	Maintained
+F:	scripts/kernel-doc
 
 
 DOCKING STATION DRIVER
 DOCKING STATION DRIVER
 M:	Shaohua Li <shaohua.li@intel.com>
 M:	Shaohua Li <shaohua.li@intel.com>
@@ -2018,6 +2026,7 @@ F:	drivers/acpi/dock.c
 DOCUMENTATION
 DOCUMENTATION
 M:	Randy Dunlap <rdunlap@xenotime.net>
 M:	Randy Dunlap <rdunlap@xenotime.net>
 L:	linux-doc@vger.kernel.org
 L:	linux-doc@vger.kernel.org
+T:	quilt oss.oracle.com/~rdunlap/kernel-doc-patches/current/
 S:	Maintained
 S:	Maintained
 F:	Documentation/
 F:	Documentation/
 
 
@@ -2435,10 +2444,12 @@ F:	drivers/net/wan/sdla.c
 FRAMEBUFFER LAYER
 FRAMEBUFFER LAYER
 L:	linux-fbdev@vger.kernel.org
 L:	linux-fbdev@vger.kernel.org
 W:	http://linux-fbdev.sourceforge.net/
 W:	http://linux-fbdev.sourceforge.net/
+Q:	http://patchwork.kernel.org/project/linux-fbdev/list/
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6.git
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6.git
 S:	Orphan
 S:	Orphan
 F:	Documentation/fb/
 F:	Documentation/fb/
-F:	drivers/video/fb*
+F:	drivers/video/
+F:	include/video/
 F:	include/linux/fb.h
 F:	include/linux/fb.h
 
 
 FREESCALE DMA DRIVER
 FREESCALE DMA DRIVER
@@ -5828,6 +5839,8 @@ M:	Chris Metcalf <cmetcalf@tilera.com>
 W:	http://www.tilera.com/scm/
 W:	http://www.tilera.com/scm/
 S:	Supported
 S:	Supported
 F:	arch/tile/
 F:	arch/tile/
+F:	drivers/char/hvc_tile.c
+F:	drivers/net/tile/
 
 
 TLAN NETWORK DRIVER
 TLAN NETWORK DRIVER
 M:	Samuel Chessman <chessman@tux.org>
 M:	Samuel Chessman <chessman@tux.org>

+ 1 - 1
Makefile

@@ -1,7 +1,7 @@
 VERSION = 2
 VERSION = 2
 PATCHLEVEL = 6
 PATCHLEVEL = 6
 SUBLEVEL = 37
 SUBLEVEL = 37
-EXTRAVERSION = -rc2
+EXTRAVERSION = -rc3
 NAME = Flesh-Eating Bats with Fangs
 NAME = Flesh-Eating Bats with Fangs
 
 
 # *DOCUMENTATION*
 # *DOCUMENTATION*

+ 1 - 1
arch/arm/boot/compressed/head.S

@@ -1084,6 +1084,6 @@ memdump:	mov	r12, r0
 reloc_end:
 reloc_end:
 
 
 		.align
 		.align
-		.section ".stack", "w"
+		.section ".stack", "aw", %nobits
 user_stack:	.space	4096
 user_stack:	.space	4096
 user_stack_end:
 user_stack_end:

+ 1 - 1
arch/arm/boot/compressed/vmlinux.lds.in

@@ -57,7 +57,7 @@ SECTIONS
   .bss			: { *(.bss) }
   .bss			: { *(.bss) }
   _end = .;
   _end = .;
 
 
-  .stack (NOLOAD)	: { *(.stack) }
+  .stack		: { *(.stack) }
 
 
   .stab 0		: { *(.stab) }
   .stab 0		: { *(.stab) }
   .stabstr 0		: { *(.stabstr) }
   .stabstr 0		: { *(.stabstr) }

+ 1 - 1
arch/arm/include/asm/assembler.h

@@ -238,7 +238,7 @@
 	@ Slightly optimised to avoid incrementing the pointer twice
 	@ Slightly optimised to avoid incrementing the pointer twice
 	usraccoff \instr, \reg, \ptr, \inc, 0, \cond, \abort
 	usraccoff \instr, \reg, \ptr, \inc, 0, \cond, \abort
 	.if	\rept == 2
 	.if	\rept == 2
-	usraccoff \instr, \reg, \ptr, \inc, 4, \cond, \abort
+	usraccoff \instr, \reg, \ptr, \inc, \inc, \cond, \abort
 	.endif
 	.endif
 
 
 	add\cond \ptr, #\rept * \inc
 	add\cond \ptr, #\rept * \inc

+ 4 - 0
arch/arm/include/asm/mmu.h

@@ -13,6 +13,10 @@ typedef struct {
 
 
 #ifdef CONFIG_CPU_HAS_ASID
 #ifdef CONFIG_CPU_HAS_ASID
 #define ASID(mm)	((mm)->context.id & 255)
 #define ASID(mm)	((mm)->context.id & 255)
+
+/* init_mm.context.id_lock should be initialized. */
+#define INIT_MM_CONTEXT(name)                                                 \
+	.context.id_lock    = __SPIN_LOCK_UNLOCKED(name.context.id_lock),
 #else
 #else
 #define ASID(mm)	(0)
 #define ASID(mm)	(0)
 #endif
 #endif

+ 3 - 0
arch/arm/include/asm/pgtable.h

@@ -374,6 +374,9 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd)
 
 
 #define pmd_page(pmd)		pfn_to_page(__phys_to_pfn(pmd_val(pmd)))
 #define pmd_page(pmd)		pfn_to_page(__phys_to_pfn(pmd_val(pmd)))
 
 
+/* we don't need complex calculations here as the pmd is folded into the pgd */
+#define pmd_addr_end(addr,end)	(end)
+
 /*
 /*
  * Conversion functions: convert a page and protection to a page entry,
  * Conversion functions: convert a page and protection to a page entry,
  * and a page entry and page directory to the page they refer to.
  * and a page entry and page directory to the page they refer to.

+ 4 - 2
arch/arm/lib/findbit.S

@@ -174,8 +174,8 @@ ENDPROC(_find_next_bit_be)
  */
  */
 .L_found:
 .L_found:
 #if __LINUX_ARM_ARCH__ >= 5
 #if __LINUX_ARM_ARCH__ >= 5
-		rsb	r1, r3, #0
-		and	r3, r3, r1
+		rsb	r0, r3, #0
+		and	r3, r3, r0
 		clz	r3, r3
 		clz	r3, r3
 		rsb	r3, r3, #31
 		rsb	r3, r3, #31
 		add	r0, r2, r3
 		add	r0, r2, r3
@@ -190,5 +190,7 @@ ENDPROC(_find_next_bit_be)
 		addeq	r2, r2, #1
 		addeq	r2, r2, #1
 		mov	r0, r2
 		mov	r0, r2
 #endif
 #endif
+		cmp	r1, r0			@ Clamp to maxbit
+		movlo	r0, r1
 		mov	pc, lr
 		mov	pc, lr
 
 

+ 1 - 1
arch/arm/mach-aaec2000/include/mach/vmalloc.h

@@ -11,6 +11,6 @@
 #ifndef __ASM_ARCH_VMALLOC_H
 #ifndef __ASM_ARCH_VMALLOC_H
 #define __ASM_ARCH_VMALLOC_H
 #define __ASM_ARCH_VMALLOC_H
 
 
-#define VMALLOC_END		0xd0000000
+#define VMALLOC_END		0xd0000000UL
 
 
 #endif /* __ASM_ARCH_VMALLOC_H */
 #endif /* __ASM_ARCH_VMALLOC_H */

+ 1 - 1
arch/arm/mach-bcmring/include/mach/vmalloc.h

@@ -22,4 +22,4 @@
  * 0xe0000000 to 0xefffffff. This gives us 256 MB of vm space and handles
  * 0xe0000000 to 0xefffffff. This gives us 256 MB of vm space and handles
  * larger physical memory designs better.
  * larger physical memory designs better.
  */
  */
-#define VMALLOC_END       0xf0000000
+#define VMALLOC_END       0xf0000000UL

+ 1 - 1
arch/arm/mach-clps711x/include/mach/vmalloc.h

@@ -17,4 +17,4 @@
  * along with this program; if not, write to the Free Software
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
-#define VMALLOC_END       0xd0000000
+#define VMALLOC_END       0xd0000000UL

+ 3 - 3
arch/arm/mach-davinci/dm355.c

@@ -359,8 +359,8 @@ static struct clk_lookup dm355_clks[] = {
 	CLK(NULL, "uart1", &uart1_clk),
 	CLK(NULL, "uart1", &uart1_clk),
 	CLK(NULL, "uart2", &uart2_clk),
 	CLK(NULL, "uart2", &uart2_clk),
 	CLK("i2c_davinci.1", NULL, &i2c_clk),
 	CLK("i2c_davinci.1", NULL, &i2c_clk),
-	CLK("davinci-asp.0", NULL, &asp0_clk),
-	CLK("davinci-asp.1", NULL, &asp1_clk),
+	CLK("davinci-mcbsp.0", NULL, &asp0_clk),
+	CLK("davinci-mcbsp.1", NULL, &asp1_clk),
 	CLK("davinci_mmc.0", NULL, &mmcsd0_clk),
 	CLK("davinci_mmc.0", NULL, &mmcsd0_clk),
 	CLK("davinci_mmc.1", NULL, &mmcsd1_clk),
 	CLK("davinci_mmc.1", NULL, &mmcsd1_clk),
 	CLK("spi_davinci.0", NULL, &spi0_clk),
 	CLK("spi_davinci.0", NULL, &spi0_clk),
@@ -664,7 +664,7 @@ static struct resource dm355_asp1_resources[] = {
 };
 };
 
 
 static struct platform_device dm355_asp1_device = {
 static struct platform_device dm355_asp1_device = {
-	.name		= "davinci-asp",
+	.name		= "davinci-mcbsp",
 	.id		= 1,
 	.id		= 1,
 	.num_resources	= ARRAY_SIZE(dm355_asp1_resources),
 	.num_resources	= ARRAY_SIZE(dm355_asp1_resources),
 	.resource	= dm355_asp1_resources,
 	.resource	= dm355_asp1_resources,

+ 3 - 3
arch/arm/mach-davinci/dm365.c

@@ -459,7 +459,7 @@ static struct clk_lookup dm365_clks[] = {
 	CLK(NULL, "usb", &usb_clk),
 	CLK(NULL, "usb", &usb_clk),
 	CLK("davinci_emac.1", NULL, &emac_clk),
 	CLK("davinci_emac.1", NULL, &emac_clk),
 	CLK("davinci_voicecodec", NULL, &voicecodec_clk),
 	CLK("davinci_voicecodec", NULL, &voicecodec_clk),
-	CLK("davinci-asp.0", NULL, &asp0_clk),
+	CLK("davinci-mcbsp", NULL, &asp0_clk),
 	CLK(NULL, "rto", &rto_clk),
 	CLK(NULL, "rto", &rto_clk),
 	CLK(NULL, "mjcp", &mjcp_clk),
 	CLK(NULL, "mjcp", &mjcp_clk),
 	CLK(NULL, NULL, NULL),
 	CLK(NULL, NULL, NULL),
@@ -922,8 +922,8 @@ static struct resource dm365_asp_resources[] = {
 };
 };
 
 
 static struct platform_device dm365_asp_device = {
 static struct platform_device dm365_asp_device = {
-	.name		= "davinci-asp",
-	.id		= 0,
+	.name		= "davinci-mcbsp",
+	.id		= -1,
 	.num_resources	= ARRAY_SIZE(dm365_asp_resources),
 	.num_resources	= ARRAY_SIZE(dm365_asp_resources),
 	.resource	= dm365_asp_resources,
 	.resource	= dm365_asp_resources,
 };
 };

+ 2 - 2
arch/arm/mach-davinci/dm644x.c

@@ -302,7 +302,7 @@ static struct clk_lookup dm644x_clks[] = {
 	CLK("davinci_emac.1", NULL, &emac_clk),
 	CLK("davinci_emac.1", NULL, &emac_clk),
 	CLK("i2c_davinci.1", NULL, &i2c_clk),
 	CLK("i2c_davinci.1", NULL, &i2c_clk),
 	CLK("palm_bk3710", NULL, &ide_clk),
 	CLK("palm_bk3710", NULL, &ide_clk),
-	CLK("davinci-asp", NULL, &asp_clk),
+	CLK("davinci-mcbsp", NULL, &asp_clk),
 	CLK("davinci_mmc.0", NULL, &mmcsd_clk),
 	CLK("davinci_mmc.0", NULL, &mmcsd_clk),
 	CLK(NULL, "spi", &spi_clk),
 	CLK(NULL, "spi", &spi_clk),
 	CLK(NULL, "gpio", &gpio_clk),
 	CLK(NULL, "gpio", &gpio_clk),
@@ -580,7 +580,7 @@ static struct resource dm644x_asp_resources[] = {
 };
 };
 
 
 static struct platform_device dm644x_asp_device = {
 static struct platform_device dm644x_asp_device = {
-	.name		= "davinci-asp",
+	.name		= "davinci-mcbsp",
 	.id		= -1,
 	.id		= -1,
 	.num_resources	= ARRAY_SIZE(dm644x_asp_resources),
 	.num_resources	= ARRAY_SIZE(dm644x_asp_resources),
 	.resource	= dm644x_asp_resources,
 	.resource	= dm644x_asp_resources,

+ 1 - 1
arch/arm/mach-ebsa110/include/mach/vmalloc.h

@@ -7,4 +7,4 @@
  * it under the terms of the GNU General Public License version 2 as
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  * published by the Free Software Foundation.
  */
  */
-#define VMALLOC_END       0xdf000000
+#define VMALLOC_END       0xdf000000UL

+ 1 - 1
arch/arm/mach-footbridge/include/mach/vmalloc.h

@@ -7,4 +7,4 @@
  */
  */
 
 
 
 
-#define VMALLOC_END       0xf0000000
+#define VMALLOC_END       0xf0000000UL

+ 1 - 1
arch/arm/mach-h720x/include/mach/vmalloc.h

@@ -5,6 +5,6 @@
 #ifndef __ARCH_ARM_VMALLOC_H
 #ifndef __ARCH_ARM_VMALLOC_H
 #define __ARCH_ARM_VMALLOC_H
 #define __ARCH_ARM_VMALLOC_H
 
 
-#define VMALLOC_END       0xd0000000
+#define VMALLOC_END       0xd0000000UL
 
 
 #endif
 #endif

+ 0 - 6
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c

@@ -250,9 +250,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 	.flags = IMXUART_HAVE_RTSCTS,
 };
 };
 
 
-#if defined(CONFIG_TOUCHSCREEN_ADS7846) \
-	|| defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
-
 #define ADS7846_PENDOWN (GPIO_PORTD | 25)
 #define ADS7846_PENDOWN (GPIO_PORTD | 25)
 
 
 static void ads7846_dev_init(void)
 static void ads7846_dev_init(void)
@@ -273,9 +270,7 @@ static struct ads7846_platform_data ads7846_config __initdata = {
 	.get_pendown_state	= ads7846_get_pendown_state,
 	.get_pendown_state	= ads7846_get_pendown_state,
 	.keep_vref_on		= 1,
 	.keep_vref_on		= 1,
 };
 };
-#endif
 
 
-#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
 static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = {
 static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = {
 	[0] = {
 	[0] = {
 		.modalias	= "ads7846",
 		.modalias	= "ads7846",
@@ -294,7 +289,6 @@ static const struct spi_imx_master eukrea_mbimx27_spi0_data __initconst = {
 	.chipselect	= eukrea_mbimx27_spi_cs,
 	.chipselect	= eukrea_mbimx27_spi_cs,
 	.num_chipselect = ARRAY_SIZE(eukrea_mbimx27_spi_cs),
 	.num_chipselect = ARRAY_SIZE(eukrea_mbimx27_spi_cs),
 };
 };
-#endif
 
 
 static struct i2c_board_info eukrea_mbimx27_i2c_devices[] = {
 static struct i2c_board_info eukrea_mbimx27_i2c_devices[] = {
 	{
 	{

+ 1 - 1
arch/arm/mach-integrator/include/mach/vmalloc.h

@@ -17,4 +17,4 @@
  * along with this program; if not, write to the Free Software
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
-#define VMALLOC_END       0xd0000000
+#define VMALLOC_END       0xd0000000UL

+ 1 - 1
arch/arm/mach-msm/include/mach/vmalloc.h

@@ -16,7 +16,7 @@
 #ifndef __ASM_ARCH_MSM_VMALLOC_H
 #ifndef __ASM_ARCH_MSM_VMALLOC_H
 #define __ASM_ARCH_MSM_VMALLOC_H
 #define __ASM_ARCH_MSM_VMALLOC_H
 
 
-#define VMALLOC_END	  0xd0000000
+#define VMALLOC_END	  0xd0000000UL
 
 
 #endif
 #endif
 
 

+ 2 - 2
arch/arm/mach-mx25/devices-imx25.h

@@ -42,9 +42,9 @@ extern const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst;
 #define imx25_add_mxc_nand(pdata)	\
 #define imx25_add_mxc_nand(pdata)	\
 	imx_add_mxc_nand(&imx25_mxc_nand_data, pdata)
 	imx_add_mxc_nand(&imx25_mxc_nand_data, pdata)
 
 
-extern const struct imx_spi_imx_data imx25_spi_imx_data[] __initconst;
+extern const struct imx_spi_imx_data imx25_cspi_data[] __initconst;
 #define imx25_add_spi_imx(id, pdata)	\
 #define imx25_add_spi_imx(id, pdata)	\
-	imx_add_spi_imx(&imx25_spi_imx_data[id], pdata)
+	imx_add_spi_imx(&imx25_cspi_data[id], pdata)
 #define imx25_add_spi_imx0(pdata)	imx25_add_spi_imx(0, pdata)
 #define imx25_add_spi_imx0(pdata)	imx25_add_spi_imx(0, pdata)
 #define imx25_add_spi_imx1(pdata)	imx25_add_spi_imx(1, pdata)
 #define imx25_add_spi_imx1(pdata)	imx25_add_spi_imx(1, pdata)
 #define imx25_add_spi_imx2(pdata)	imx25_add_spi_imx(2, pdata)
 #define imx25_add_spi_imx2(pdata)	imx25_add_spi_imx(2, pdata)

+ 2 - 3
arch/arm/mach-mx3/mach-pcm037_eet.c

@@ -14,6 +14,7 @@
 
 
 #include <mach/common.h>
 #include <mach/common.h>
 #include <mach/iomux-mx3.h>
 #include <mach/iomux-mx3.h>
+#include <mach/spi.h>
 
 
 #include <asm/mach-types.h>
 #include <asm/mach-types.h>
 
 
@@ -59,14 +60,12 @@ static struct spi_board_info pcm037_spi_dev[] = {
 };
 };
 
 
 /* Platform Data for MXC CSPI */
 /* Platform Data for MXC CSPI */
-#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
 static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)};
 static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)};
 
 
 static const struct spi_imx_master pcm037_spi1_pdata __initconst = {
 static const struct spi_imx_master pcm037_spi1_pdata __initconst = {
 	.chipselect = pcm037_spi1_cs,
 	.chipselect = pcm037_spi1_cs,
 	.num_chipselect = ARRAY_SIZE(pcm037_spi1_cs),
 	.num_chipselect = ARRAY_SIZE(pcm037_spi1_cs),
 };
 };
-#endif
 
 
 /* GPIO-keys input device */
 /* GPIO-keys input device */
 static struct gpio_keys_button pcm037_gpio_keys[] = {
 static struct gpio_keys_button pcm037_gpio_keys[] = {
@@ -171,7 +170,7 @@ static struct platform_device pcm037_gpio_keys_device = {
 	},
 	},
 };
 };
 
 
-static int eet_init_devices(void)
+static int __init eet_init_devices(void)
 {
 {
 	if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET)
 	if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET)
 		return 0;
 		return 0;

+ 1 - 1
arch/arm/mach-netx/include/mach/vmalloc.h

@@ -16,4 +16,4 @@
  * along with this program; if not, write to the Free Software
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
-#define VMALLOC_END       0xd0000000
+#define VMALLOC_END       0xd0000000UL

+ 1 - 1
arch/arm/mach-omap1/include/mach/vmalloc.h

@@ -17,4 +17,4 @@
  * along with this program; if not, write to the Free Software
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
  */
-#define VMALLOC_END	0xd8000000
+#define VMALLOC_END	0xd8000000UL

+ 1 - 1
arch/arm/mach-omap2/include/mach/vmalloc.h

@@ -17,4 +17,4 @@
  * along with this program; if not, write to the Free Software
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
  */
-#define VMALLOC_END	  0xf8000000
+#define VMALLOC_END	  0xf8000000UL

+ 1 - 1
arch/arm/mach-pnx4008/include/mach/vmalloc.h

@@ -17,4 +17,4 @@
  * The vmalloc() routines leaves a hole of 4kB between each vmalloced
  * The vmalloc() routines leaves a hole of 4kB between each vmalloced
  * area for the same reason. ;)
  * area for the same reason. ;)
  */
  */
-#define VMALLOC_END       0xd0000000
+#define VMALLOC_END       0xd0000000UL

+ 1 - 1
arch/arm/mach-rpc/include/mach/vmalloc.h

@@ -7,4 +7,4 @@
  * it under the terms of the GNU General Public License version 2 as
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  * published by the Free Software Foundation.
  */
  */
-#define VMALLOC_END       0xdc000000
+#define VMALLOC_END       0xdc000000UL

+ 4 - 4
arch/arm/mach-s3c2410/h1940-bluetooth.c

@@ -77,13 +77,13 @@ static int __devinit h1940bt_probe(struct platform_device *pdev)
 
 
 	/* Configures BT serial port GPIOs */
 	/* Configures BT serial port GPIOs */
 	s3c_gpio_cfgpin(S3C2410_GPH(0), S3C2410_GPH0_nCTS0);
 	s3c_gpio_cfgpin(S3C2410_GPH(0), S3C2410_GPH0_nCTS0);
-	s3c_gpio_cfgpull(S3C2410_GPH(0), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPH(0), S3C_GPIO_PULL_NONE);
 	s3c_gpio_cfgpin(S3C2410_GPH(1), S3C2410_GPIO_OUTPUT);
 	s3c_gpio_cfgpin(S3C2410_GPH(1), S3C2410_GPIO_OUTPUT);
-	s3c_gpio_cfgpull(S3C2410_GPH(1), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPH(1), S3C_GPIO_PULL_NONE);
 	s3c_gpio_cfgpin(S3C2410_GPH(2), S3C2410_GPH2_TXD0);
 	s3c_gpio_cfgpin(S3C2410_GPH(2), S3C2410_GPH2_TXD0);
-	s3c_gpio_cfgpull(S3C2410_GPH(2), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPH(2), S3C_GPIO_PULL_NONE);
 	s3c_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0);
 	s3c_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0);
-	s3c_gpio_cfgpull(S3C2410_GPH(3), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPH(3), S3C_GPIO_PULL_NONE);
 
 
 
 
 	rfk = rfkill_alloc(DRV_NAME, &pdev->dev, RFKILL_TYPE_BLUETOOTH,
 	rfk = rfkill_alloc(DRV_NAME, &pdev->dev, RFKILL_TYPE_BLUETOOTH,

+ 2 - 3
arch/arm/mach-s3c2416/irq.c

@@ -168,12 +168,11 @@ static struct irq_chip s3c2416_irq_dma = {
 
 
 static void s3c2416_irq_demux_uart3(unsigned int irq, struct irq_desc *desc)
 static void s3c2416_irq_demux_uart3(unsigned int irq, struct irq_desc *desc)
 {
 {
-	s3c2416_irq_demux(IRQ_S3C2443_UART3, 3);
+	s3c2416_irq_demux(IRQ_S3C2443_RX3, 3);
 }
 }
 
 
 #define INTMSK_UART3	(1UL << (IRQ_S3C2443_UART3 - IRQ_EINT0))
 #define INTMSK_UART3	(1UL << (IRQ_S3C2443_UART3 - IRQ_EINT0))
-#define SUBMSK_UART3	(0xf << (IRQ_S3C2443_RX3 - S3C2410_IRQSUB(0)))
-
+#define SUBMSK_UART3	(0x7 << (IRQ_S3C2443_RX3 - S3C2410_IRQSUB(0)))
 
 
 static void s3c2416_irq_uart3_mask(unsigned int irqno)
 static void s3c2416_irq_uart3_mask(unsigned int irqno)
 {
 {

+ 2 - 3
arch/arm/mach-s3c2443/irq.c

@@ -166,12 +166,11 @@ static struct irq_chip s3c2443_irq_dma = {
 
 
 static void s3c2443_irq_demux_uart3(unsigned int irq, struct irq_desc *desc)
 static void s3c2443_irq_demux_uart3(unsigned int irq, struct irq_desc *desc)
 {
 {
-	s3c2443_irq_demux(IRQ_S3C2443_UART3, 3);
+	s3c2443_irq_demux(IRQ_S3C2443_RX3, 3);
 }
 }
 
 
 #define INTMSK_UART3	(1UL << (IRQ_S3C2443_UART3 - IRQ_EINT0))
 #define INTMSK_UART3	(1UL << (IRQ_S3C2443_UART3 - IRQ_EINT0))
-#define SUBMSK_UART3	(0xf << (IRQ_S3C2443_RX3 - S3C2410_IRQSUB(0)))
-
+#define SUBMSK_UART3	(0x7 << (IRQ_S3C2443_RX3 - S3C2410_IRQSUB(0)))
 
 
 static void s3c2443_irq_uart3_mask(unsigned int irqno)
 static void s3c2443_irq_uart3_mask(unsigned int irqno)
 {
 {

+ 1 - 1
arch/arm/mach-s3c64xx/mach-mini6410.c

@@ -45,7 +45,7 @@
 
 
 #include <video/platform_lcd.h>
 #include <video/platform_lcd.h>
 
 
-#define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
+#define UCON S3C2410_UCON_DEFAULT
 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
 #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
 #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
 
 

+ 1 - 1
arch/arm/mach-s3c64xx/mach-real6410.c

@@ -46,7 +46,7 @@
 
 
 #include <video/platform_lcd.h>
 #include <video/platform_lcd.h>
 
 
-#define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
+#define UCON S3C2410_UCON_DEFAULT
 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
 #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
 #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
 
 

+ 1 - 0
arch/arm/mach-s5pv210/mach-smdkc110.c

@@ -13,6 +13,7 @@
 #include <linux/init.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/serial_core.h>
 #include <linux/i2c.h>
 #include <linux/i2c.h>
+#include <linux/sysdev.h>
 
 
 #include <asm/mach/arch.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/map.h>

+ 1 - 0
arch/arm/mach-s5pv210/mach-smdkv210.c

@@ -13,6 +13,7 @@
 #include <linux/i2c.h>
 #include <linux/i2c.h>
 #include <linux/init.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/serial_core.h>
+#include <linux/sysdev.h>
 
 
 #include <asm/mach/arch.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/map.h>

+ 1 - 1
arch/arm/mach-shark/include/mach/vmalloc.h

@@ -1,4 +1,4 @@
 /*
 /*
  * arch/arm/mach-shark/include/mach/vmalloc.h
  * arch/arm/mach-shark/include/mach/vmalloc.h
  */
  */
-#define VMALLOC_END       0xd0000000
+#define VMALLOC_END       0xd0000000UL

+ 111 - 36
arch/arm/mach-shmobile/board-ap4evb.c

@@ -567,38 +567,127 @@ static struct platform_device *qhd_devices[] __initdata = {
 
 
 /* FSI */
 /* FSI */
 #define IRQ_FSI		evt2irq(0x1840)
 #define IRQ_FSI		evt2irq(0x1840)
+static int __fsi_set_rate(struct clk *clk, long rate, int enable)
+{
+	int ret = 0;
+
+	if (rate <= 0)
+		return ret;
+
+	if (enable) {
+		ret = clk_set_rate(clk, rate);
+		if (0 == ret)
+			ret = clk_enable(clk);
+	} else {
+		clk_disable(clk);
+	}
+
+	return ret;
+}
+
+static int __fsi_set_round_rate(struct clk *clk, long rate, int enable)
+{
+	return __fsi_set_rate(clk, clk_round_rate(clk, rate), enable);
+}
 
 
-static int fsi_set_rate(int is_porta, int rate)
+static int fsi_ak4642_set_rate(struct device *dev, int rate, int enable)
+{
+	struct clk *fsia_ick;
+	struct clk *fsiack;
+	int ret = -EIO;
+
+	fsia_ick = clk_get(dev, "icka");
+	if (IS_ERR(fsia_ick))
+		return PTR_ERR(fsia_ick);
+
+	/*
+	 * FSIACK is connected to AK4642,
+	 * and use external clock pin from it.
+	 * it is parent of fsia_ick now.
+	 */
+	fsiack = clk_get_parent(fsia_ick);
+	if (!fsiack)
+		goto fsia_ick_out;
+
+	/*
+	 * we get 1/1 divided clock by setting same rate to fsiack and fsia_ick
+	 *
+	 ** FIXME **
+	 * Because the freq_table of external clk (fsiack) are all 0,
+	 * the return value of clk_round_rate became 0.
+	 * So, it use __fsi_set_rate here.
+	 */
+	ret = __fsi_set_rate(fsiack, rate, enable);
+	if (ret < 0)
+		goto fsiack_out;
+
+	ret = __fsi_set_round_rate(fsia_ick, rate, enable);
+	if ((ret < 0) && enable)
+		__fsi_set_round_rate(fsiack, rate, 0); /* disable FSI ACK */
+
+fsiack_out:
+	clk_put(fsiack);
+
+fsia_ick_out:
+	clk_put(fsia_ick);
+
+	return 0;
+}
+
+static int fsi_hdmi_set_rate(struct device *dev, int rate, int enable)
 {
 {
 	struct clk *fsib_clk;
 	struct clk *fsib_clk;
 	struct clk *fdiv_clk = &sh7372_fsidivb_clk;
 	struct clk *fdiv_clk = &sh7372_fsidivb_clk;
+	long fsib_rate = 0;
+	long fdiv_rate = 0;
+	int ackmd_bpfmd;
 	int ret;
 	int ret;
 
 
-	/* set_rate is not needed if port A */
-	if (is_porta)
-		return 0;
-
-	fsib_clk = clk_get(NULL, "fsib_clk");
-	if (IS_ERR(fsib_clk))
-		return -EINVAL;
-
 	switch (rate) {
 	switch (rate) {
 	case 44100:
 	case 44100:
-		clk_set_rate(fsib_clk, clk_round_rate(fsib_clk, 11283000));
-		ret = SH_FSI_ACKMD_256 | SH_FSI_BPFMD_64;
+		fsib_rate	= rate * 256;
+		ackmd_bpfmd	= SH_FSI_ACKMD_256 | SH_FSI_BPFMD_64;
 		break;
 		break;
 	case 48000:
 	case 48000:
-		clk_set_rate(fsib_clk, clk_round_rate(fsib_clk, 85428000));
-		clk_set_rate(fdiv_clk, clk_round_rate(fdiv_clk, 12204000));
-		ret = SH_FSI_ACKMD_256 | SH_FSI_BPFMD_64;
+		fsib_rate	= 85428000; /* around 48kHz x 256 x 7 */
+		fdiv_rate	= rate * 256;
+		ackmd_bpfmd	= SH_FSI_ACKMD_256 | SH_FSI_BPFMD_64;
 		break;
 		break;
 	default:
 	default:
 		pr_err("unsupported rate in FSI2 port B\n");
 		pr_err("unsupported rate in FSI2 port B\n");
-		ret = -EINVAL;
-		break;
+		return -EINVAL;
 	}
 	}
 
 
+	/* FSI B setting */
+	fsib_clk = clk_get(dev, "ickb");
+	if (IS_ERR(fsib_clk))
+		return -EIO;
+
+	ret = __fsi_set_round_rate(fsib_clk, fsib_rate, enable);
 	clk_put(fsib_clk);
 	clk_put(fsib_clk);
+	if (ret < 0)
+		return ret;
+
+	/* FSI DIV setting */
+	ret = __fsi_set_round_rate(fdiv_clk, fdiv_rate, enable);
+	if (ret < 0) {
+		/* disable FSI B */
+		if (enable)
+			__fsi_set_round_rate(fsib_clk, fsib_rate, 0);
+		return ret;
+	}
+
+	return ackmd_bpfmd;
+}
+
+static int fsi_set_rate(struct device *dev, int is_porta, int rate, int enable)
+{
+	int ret;
+
+	if (is_porta)
+		ret = fsi_ak4642_set_rate(dev, rate, enable);
+	else
+		ret = fsi_hdmi_set_rate(dev, rate, enable);
 
 
 	return ret;
 	return ret;
 }
 }
@@ -880,6 +969,11 @@ static int __init hdmi_init_pm_clock(void)
 		goto out;
 		goto out;
 	}
 	}
 
 
+	ret = clk_enable(&sh7372_pllc2_clk);
+	if (ret < 0) {
+		pr_err("Cannot enable pllc2 clock\n");
+		goto out;
+	}
 	pr_debug("PLLC2 set frequency %lu\n", rate);
 	pr_debug("PLLC2 set frequency %lu\n", rate);
 
 
 	ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk);
 	ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk);
@@ -896,23 +990,11 @@ out:
 
 
 device_initcall(hdmi_init_pm_clock);
 device_initcall(hdmi_init_pm_clock);
 
 
-#define FSIACK_DUMMY_RATE 48000
 static int __init fsi_init_pm_clock(void)
 static int __init fsi_init_pm_clock(void)
 {
 {
 	struct clk *fsia_ick;
 	struct clk *fsia_ick;
 	int ret;
 	int ret;
 
 
-	/*
-	 * FSIACK is connected to AK4642,
-	 * and the rate is depend on playing sound rate.
-	 * So, set dummy rate (= 48k) here
-	 */
-	ret = clk_set_rate(&sh7372_fsiack_clk, FSIACK_DUMMY_RATE);
-	if (ret < 0) {
-		pr_err("Cannot set FSIACK dummy rate: %d\n", ret);
-		return ret;
-	}
-
 	fsia_ick = clk_get(&fsi_device.dev, "icka");
 	fsia_ick = clk_get(&fsi_device.dev, "icka");
 	if (IS_ERR(fsia_ick)) {
 	if (IS_ERR(fsia_ick)) {
 		ret = PTR_ERR(fsia_ick);
 		ret = PTR_ERR(fsia_ick);
@@ -921,16 +1003,9 @@ static int __init fsi_init_pm_clock(void)
 	}
 	}
 
 
 	ret = clk_set_parent(fsia_ick, &sh7372_fsiack_clk);
 	ret = clk_set_parent(fsia_ick, &sh7372_fsiack_clk);
-	if (ret < 0) {
-		pr_err("Cannot set FSI-A parent: %d\n", ret);
-		goto out;
-	}
-
-	ret = clk_set_rate(fsia_ick, FSIACK_DUMMY_RATE);
 	if (ret < 0)
 	if (ret < 0)
-		pr_err("Cannot set FSI-A rate: %d\n", ret);
+		pr_err("Cannot set FSI-A parent: %d\n", ret);
 
 
-out:
 	clk_put(fsia_ick);
 	clk_put(fsia_ick);
 
 
 	return ret;
 	return ret;

+ 10 - 29
arch/arm/mach-shmobile/clock-sh7372.c

@@ -220,8 +220,7 @@ static void pllc2_disable(struct clk *clk)
 	__raw_writel(__raw_readl(PLLC2CR) & ~0x80000000, PLLC2CR);
 	__raw_writel(__raw_readl(PLLC2CR) & ~0x80000000, PLLC2CR);
 }
 }
 
 
-static int pllc2_set_rate(struct clk *clk,
-			  unsigned long rate, int algo_id)
+static int pllc2_set_rate(struct clk *clk, unsigned long rate)
 {
 {
 	unsigned long value;
 	unsigned long value;
 	int idx;
 	int idx;
@@ -230,21 +229,13 @@ static int pllc2_set_rate(struct clk *clk,
 	if (idx < 0)
 	if (idx < 0)
 		return idx;
 		return idx;
 
 
-	if (rate == clk->parent->rate) {
-		pllc2_disable(clk);
-		return 0;
-	}
+	if (rate == clk->parent->rate)
+		return -EINVAL;
 
 
 	value = __raw_readl(PLLC2CR) & ~(0x3f << 24);
 	value = __raw_readl(PLLC2CR) & ~(0x3f << 24);
 
 
-	if (value & 0x80000000)
-		pllc2_disable(clk);
-
 	__raw_writel((value & ~0x80000000) | ((idx + 19) << 24), PLLC2CR);
 	__raw_writel((value & ~0x80000000) | ((idx + 19) << 24), PLLC2CR);
 
 
-	if (value & 0x80000000)
-		return pllc2_enable(clk);
-
 	return 0;
 	return 0;
 }
 }
 
 
@@ -453,32 +444,24 @@ static int fsidiv_enable(struct clk *clk)
 	unsigned long value;
 	unsigned long value;
 
 
 	value  = __raw_readl(clk->mapping->base) >> 16;
 	value  = __raw_readl(clk->mapping->base) >> 16;
-	if (value < 2) {
-		fsidiv_disable(clk);
-		return -ENOENT;
-	}
+	if (value < 2)
+		return -EIO;
 
 
 	__raw_writel((value << 16) | 0x3, clk->mapping->base);
 	__raw_writel((value << 16) | 0x3, clk->mapping->base);
 
 
 	return 0;
 	return 0;
 }
 }
 
 
-static int fsidiv_set_rate(struct clk *clk,
-			   unsigned long rate, int algo_id)
+static int fsidiv_set_rate(struct clk *clk, unsigned long rate)
 {
 {
 	int idx;
 	int idx;
 
 
-	if (clk->parent->rate == rate) {
-		fsidiv_disable(clk);
-		return 0;
-	}
-
 	idx = (clk->parent->rate / rate) & 0xffff;
 	idx = (clk->parent->rate / rate) & 0xffff;
 	if (idx < 2)
 	if (idx < 2)
-		return -ENOENT;
+		return -EINVAL;
 
 
 	__raw_writel(idx << 16, clk->mapping->base);
 	__raw_writel(idx << 16, clk->mapping->base);
-	return fsidiv_enable(clk);
+	return 0;
 }
 }
 
 
 static struct clk_ops fsidiv_clk_ops = {
 static struct clk_ops fsidiv_clk_ops = {
@@ -609,8 +592,6 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_CON_ID("vck3_clk", &div6_clks[DIV6_VCK3]),
 	CLKDEV_CON_ID("vck3_clk", &div6_clks[DIV6_VCK3]),
 	CLKDEV_CON_ID("fmsi_clk", &div6_clks[DIV6_FMSI]),
 	CLKDEV_CON_ID("fmsi_clk", &div6_clks[DIV6_FMSI]),
 	CLKDEV_CON_ID("fmso_clk", &div6_clks[DIV6_FMSO]),
 	CLKDEV_CON_ID("fmso_clk", &div6_clks[DIV6_FMSO]),
-	CLKDEV_CON_ID("fsia_clk", &div6_reparent_clks[DIV6_FSIA]),
-	CLKDEV_CON_ID("fsib_clk", &div6_reparent_clks[DIV6_FSIB]),
 	CLKDEV_CON_ID("sub_clk", &div6_clks[DIV6_SUB]),
 	CLKDEV_CON_ID("sub_clk", &div6_clks[DIV6_SUB]),
 	CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]),
 	CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]),
 	CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]),
 	CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]),
@@ -647,8 +628,8 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */
 	CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */
 	CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI2 */
 	CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI2 */
 	CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */
 	CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */
-	CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP323]), /* USB0 */
-	CLKDEV_DEV_ID("r8a66597_udc.0", &mstp_clks[MSTP323]), /* USB0 */
+	CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USB0 */
+	CLKDEV_DEV_ID("r8a66597_udc.0", &mstp_clks[MSTP322]), /* USB0 */
 	CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */
 	CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */
 	CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */
 	CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */
 	CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMC */
 	CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMC */

+ 3 - 3
arch/arm/mach-ux500/cpu.c

@@ -75,14 +75,14 @@ void __init ux500_init_irq(void)
 static inline void ux500_cache_wait(void __iomem *reg, unsigned long mask)
 static inline void ux500_cache_wait(void __iomem *reg, unsigned long mask)
 {
 {
 	/* wait for the operation to complete */
 	/* wait for the operation to complete */
-	while (readl(reg) & mask)
+	while (readl_relaxed(reg) & mask)
 		;
 		;
 }
 }
 
 
 static inline void ux500_cache_sync(void)
 static inline void ux500_cache_sync(void)
 {
 {
 	void __iomem *base = __io_address(UX500_L2CC_BASE);
 	void __iomem *base = __io_address(UX500_L2CC_BASE);
-	writel(0, base + L2X0_CACHE_SYNC);
+	writel_relaxed(0, base + L2X0_CACHE_SYNC);
 	ux500_cache_wait(base + L2X0_CACHE_SYNC, 1);
 	ux500_cache_wait(base + L2X0_CACHE_SYNC, 1);
 }
 }
 
 
@@ -107,7 +107,7 @@ static void ux500_l2x0_inv_all(void)
 	uint32_t l2x0_way_mask = (1<<16) - 1;	/* Bitmask of active ways */
 	uint32_t l2x0_way_mask = (1<<16) - 1;	/* Bitmask of active ways */
 
 
 	/* invalidate all ways */
 	/* invalidate all ways */
-	writel(l2x0_way_mask, l2x0_base + L2X0_INV_WAY);
+	writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_INV_WAY);
 	ux500_cache_wait(l2x0_base + L2X0_INV_WAY, l2x0_way_mask);
 	ux500_cache_wait(l2x0_base + L2X0_INV_WAY, l2x0_way_mask);
 	ux500_cache_sync();
 	ux500_cache_sync();
 }
 }

+ 1 - 1
arch/arm/mach-versatile/include/mach/vmalloc.h

@@ -18,4 +18,4 @@
  * along with this program; if not, write to the Free Software
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
-#define VMALLOC_END		0xd8000000
+#define VMALLOC_END		0xd8000000UL

+ 2 - 2
arch/arm/mm/ioremap.c

@@ -206,8 +206,8 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
 	 */
 	 */
 	if (pfn_valid(pfn)) {
 	if (pfn_valid(pfn)) {
 		printk(KERN_WARNING "BUG: Your driver calls ioremap() on system memory.  This leads\n"
 		printk(KERN_WARNING "BUG: Your driver calls ioremap() on system memory.  This leads\n"
-		       KERN_WARNING "to architecturally unpredictable behaviour on ARMv6+, and ioremap()\n"
-		       KERN_WARNING "will fail in the next kernel release.  Please fix your driver.\n");
+		       "to architecturally unpredictable behaviour on ARMv6+, and ioremap()\n"
+		       "will fail in the next kernel release.  Please fix your driver.\n");
 		WARN_ON(1);
 		WARN_ON(1);
 	}
 	}
 
 

+ 0 - 8
arch/arm/plat-mxc/devices/platform-imx-dma.c

@@ -12,15 +12,7 @@
 
 
 #include <mach/hardware.h>
 #include <mach/hardware.h>
 #include <mach/devices-common.h>
 #include <mach/devices-common.h>
-#ifdef SDMA_IS_MERGED
 #include <mach/sdma.h>
 #include <mach/sdma.h>
-#else
-struct sdma_platform_data {
-	int sdma_version;
-	char *cpu_name;
-	int to_version;
-};
-#endif
 
 
 struct imx_imx_sdma_data {
 struct imx_imx_sdma_data {
 	resource_size_t iobase;
 	resource_size_t iobase;

+ 1 - 0
arch/arm/plat-mxc/devices/platform-spi_imx.c

@@ -27,6 +27,7 @@ const struct imx_spi_imx_data imx21_cspi_data[] __initconst = {
 	imx_spi_imx_data_entry(MX21, CSPI, "imx21-cspi", _id, _hwid, SZ_4K)
 	imx_spi_imx_data_entry(MX21, CSPI, "imx21-cspi", _id, _hwid, SZ_4K)
 	imx21_cspi_data_entry(0, 1),
 	imx21_cspi_data_entry(0, 1),
 	imx21_cspi_data_entry(1, 2),
 	imx21_cspi_data_entry(1, 2),
+};
 #endif
 #endif
 
 
 #ifdef CONFIG_ARCH_MX25
 #ifdef CONFIG_ARCH_MX25

+ 80 - 9
arch/arm/plat-nomadik/timer.c

@@ -3,6 +3,7 @@
  *
  *
  * Copyright (C) 2008 STMicroelectronics
  * Copyright (C) 2008 STMicroelectronics
  * Copyright (C) 2010 Alessandro Rubini
  * Copyright (C) 2010 Alessandro Rubini
+ * Copyright (C) 2010 Linus Walleij for ST-Ericsson
  *
  *
  * This program is free software; you can redistribute it and/or modify
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2, as
  * it under the terms of the GNU General Public License version 2, as
@@ -16,11 +17,13 @@
 #include <linux/clk.h>
 #include <linux/clk.h>
 #include <linux/jiffies.h>
 #include <linux/jiffies.h>
 #include <linux/err.h>
 #include <linux/err.h>
+#include <linux/cnt32_to_63.h>
+#include <linux/timer.h>
 #include <asm/mach/time.h>
 #include <asm/mach/time.h>
 
 
 #include <plat/mtu.h>
 #include <plat/mtu.h>
 
 
-void __iomem *mtu_base; /* ssigned by machine code */
+void __iomem *mtu_base; /* Assigned by machine code */
 
 
 /*
 /*
  * Kernel assumes that sched_clock can be called early
  * Kernel assumes that sched_clock can be called early
@@ -48,16 +51,82 @@ static struct clocksource nmdk_clksrc = {
 /*
 /*
  * Override the global weak sched_clock symbol with this
  * Override the global weak sched_clock symbol with this
  * local implementation which uses the clocksource to get some
  * local implementation which uses the clocksource to get some
- * better resolution when scheduling the kernel. We accept that
- * this wraps around for now, since it is just a relative time
- * stamp. (Inspired by OMAP implementation.)
+ * better resolution when scheduling the kernel.
+ *
+ * Because the hardware timer period may be quite short
+ * (32.3 secs on the 133 MHz MTU timer selection on ux500)
+ * and because cnt32_to_63() needs to be called at least once per
+ * half period to work properly, a kernel keepwarm() timer is set up
+ * to ensure this requirement is always met.
+ *
+ * Also the sched_clock timer will wrap around at some point,
+ * here we set it to run continously for a year.
  */
  */
+#define SCHED_CLOCK_MIN_WRAP 3600*24*365
+static struct timer_list cnt32_to_63_keepwarm_timer;
+static u32 sched_mult;
+static u32 sched_shift;
+
 unsigned long long notrace sched_clock(void)
 unsigned long long notrace sched_clock(void)
 {
 {
-	return clocksource_cyc2ns(nmdk_clksrc.read(
-				  &nmdk_clksrc),
-				  nmdk_clksrc.mult,
-				  nmdk_clksrc.shift);
+	u64 cycles;
+
+	if (unlikely(!mtu_base))
+		return 0;
+
+	cycles = cnt32_to_63(-readl(mtu_base + MTU_VAL(0)));
+	/*
+	 * sched_mult is guaranteed to be even so will
+	 * shift out bit 63
+	 */
+	return (cycles * sched_mult) >> sched_shift;
+}
+
+/* Just kick sched_clock every so often */
+static void cnt32_to_63_keepwarm(unsigned long data)
+{
+	mod_timer(&cnt32_to_63_keepwarm_timer, round_jiffies(jiffies + data));
+	(void) sched_clock();
+}
+
+/*
+ * Set up a timer to keep sched_clock():s 32_to_63 algorithm warm
+ * once in half a 32bit timer wrap interval.
+ */
+static void __init nmdk_sched_clock_init(unsigned long rate)
+{
+	u32 v;
+	unsigned long delta;
+	u64 days;
+
+	/* Find the apropriate mult and shift factors */
+	clocks_calc_mult_shift(&sched_mult, &sched_shift,
+			       rate, NSEC_PER_SEC, SCHED_CLOCK_MIN_WRAP);
+	/* We need to multiply by an even number to get rid of bit 63 */
+	if (sched_mult & 1)
+		sched_mult++;
+
+	/* Let's see what we get, take max counter and scale it */
+	days = (0xFFFFFFFFFFFFFFFFLLU * sched_mult) >> sched_shift;
+	do_div(days, NSEC_PER_SEC);
+	do_div(days, (3600*24));
+
+	pr_info("sched_clock: using %d bits @ %lu Hz wrap in %lu days\n",
+		(64 - sched_shift), rate, (unsigned long) days);
+
+	/*
+	 * Program a timer to kick us at half 32bit wraparound
+	 * Formula: seconds per wrap = (2^32) / f
+	 */
+	v = 0xFFFFFFFFUL / rate;
+	/* We want half of the wrap time to keep cnt32_to_63 warm */
+	v /= 2;
+	pr_debug("sched_clock: prescaled timer rate: %lu Hz, "
+		 "initialize keepwarm timer every %d seconds\n", rate, v);
+	/* Convert seconds to jiffies */
+	delta = msecs_to_jiffies(v*1000);
+	setup_timer(&cnt32_to_63_keepwarm_timer, cnt32_to_63_keepwarm, delta);
+	mod_timer(&cnt32_to_63_keepwarm_timer, round_jiffies(jiffies + delta));
 }
 }
 
 
 /* Clockevent device: use one-shot mode */
 /* Clockevent device: use one-shot mode */
@@ -161,13 +230,15 @@ void __init nmdk_timer_init(void)
 	writel(0, mtu_base + MTU_BGLR(0));
 	writel(0, mtu_base + MTU_BGLR(0));
 	writel(cr | MTU_CRn_ENA, mtu_base + MTU_CR(0));
 	writel(cr | MTU_CRn_ENA, mtu_base + MTU_CR(0));
 
 
-	/* Now the scheduling clock is ready */
+	/* Now the clock source is ready */
 	nmdk_clksrc.read = nmdk_read_timer;
 	nmdk_clksrc.read = nmdk_read_timer;
 
 
 	if (clocksource_register(&nmdk_clksrc))
 	if (clocksource_register(&nmdk_clksrc))
 		pr_err("timer: failed to initialize clock source %s\n",
 		pr_err("timer: failed to initialize clock source %s\n",
 		       nmdk_clksrc.name);
 		       nmdk_clksrc.name);
 
 
+	nmdk_sched_clock_init(rate);
+
 	/* Timer 1 is used for events */
 	/* Timer 1 is used for events */
 
 
 	clockevents_calc_mult_shift(&nmdk_clkevt, rate, MTU_MIN_RANGE);
 	clockevents_calc_mult_shift(&nmdk_clkevt, rate, MTU_MIN_RANGE);

+ 3 - 0
arch/arm/plat-pxa/include/plat/sdhci.h

@@ -17,6 +17,9 @@
 /* Require clock free running */
 /* Require clock free running */
 #define PXA_FLAG_DISABLE_CLOCK_GATING (1<<0)
 #define PXA_FLAG_DISABLE_CLOCK_GATING (1<<0)
 
 
+/* Board design supports 8-bit data on SD/SDIO BUS */
+#define PXA_FLAG_SD_8_BIT_CAPABLE_SLOT (1<<2)
+
 /*
 /*
  * struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI
  * struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI
  * @max_speed: the maximum speed supported
  * @max_speed: the maximum speed supported

+ 3 - 3
arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c

@@ -29,8 +29,8 @@ void s3c24xx_spi_gpiocfg_bus0_gpe11_12_13(struct s3c2410_spi_info *spi,
 	} else {
 	} else {
 		s3c_gpio_cfgpin(S3C2410_GPE(13), S3C2410_GPIO_INPUT);
 		s3c_gpio_cfgpin(S3C2410_GPE(13), S3C2410_GPIO_INPUT);
 		s3c_gpio_cfgpin(S3C2410_GPE(11), S3C2410_GPIO_INPUT);
 		s3c_gpio_cfgpin(S3C2410_GPE(11), S3C2410_GPIO_INPUT);
-		s3c_gpio_cfgpull(S3C2410_GPE(11), S3C_GPIO_PULL_NONE);
-		s3c_gpio_cfgpull(S3C2410_GPE(12), S3C_GPIO_PULL_NONE);
-		s3c_gpio_cfgpull(S3C2410_GPE(13), S3C_GPIO_PULL_NONE);
+		s3c_gpio_setpull(S3C2410_GPE(11), S3C_GPIO_PULL_NONE);
+		s3c_gpio_setpull(S3C2410_GPE(12), S3C_GPIO_PULL_NONE);
+		s3c_gpio_setpull(S3C2410_GPE(13), S3C_GPIO_PULL_NONE);
 	}
 	}
 }
 }

+ 3 - 3
arch/arm/plat-s3c24xx/spi-bus1-gpd8_9_10.c

@@ -31,8 +31,8 @@ void s3c24xx_spi_gpiocfg_bus1_gpd8_9_10(struct s3c2410_spi_info *spi,
 	} else {
 	} else {
 		s3c_gpio_cfgpin(S3C2410_GPD(8), S3C2410_GPIO_INPUT);
 		s3c_gpio_cfgpin(S3C2410_GPD(8), S3C2410_GPIO_INPUT);
 		s3c_gpio_cfgpin(S3C2410_GPD(9), S3C2410_GPIO_INPUT);
 		s3c_gpio_cfgpin(S3C2410_GPD(9), S3C2410_GPIO_INPUT);
-		s3c_gpio_cfgpull(S3C2410_GPD(10), S3C_GPIO_PULL_NONE);
-		s3c_gpio_cfgpull(S3C2410_GPD(9), S3C_GPIO_PULL_NONE);
-		s3c_gpio_cfgpull(S3C2410_GPD(8), S3C_GPIO_PULL_NONE);
+		s3c_gpio_setpull(S3C2410_GPD(10), S3C_GPIO_PULL_NONE);
+		s3c_gpio_setpull(S3C2410_GPD(9), S3C_GPIO_PULL_NONE);
+		s3c_gpio_setpull(S3C2410_GPD(8), S3C_GPIO_PULL_NONE);
 	}
 	}
 }
 }

+ 3 - 3
arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c

@@ -29,8 +29,8 @@ void s3c24xx_spi_gpiocfg_bus1_gpg5_6_7(struct s3c2410_spi_info *spi,
 	} else {
 	} else {
 		s3c_gpio_cfgpin(S3C2410_GPG(7), S3C2410_GPIO_INPUT);
 		s3c_gpio_cfgpin(S3C2410_GPG(7), S3C2410_GPIO_INPUT);
 		s3c_gpio_cfgpin(S3C2410_GPG(5), S3C2410_GPIO_INPUT);
 		s3c_gpio_cfgpin(S3C2410_GPG(5), S3C2410_GPIO_INPUT);
-		s3c_gpio_cfgpull(S3C2410_GPG(5), S3C_GPIO_PULL_NONE);
-		s3c_gpio_cfgpull(S3C2410_GPG(6), S3C_GPIO_PULL_NONE);
-		s3c_gpio_cfgpull(S3C2410_GPG(7), S3C_GPIO_PULL_NONE);
+		s3c_gpio_setpull(S3C2410_GPG(5), S3C_GPIO_PULL_NONE);
+		s3c_gpio_setpull(S3C2410_GPG(6), S3C_GPIO_PULL_NONE);
+		s3c_gpio_setpull(S3C2410_GPG(7), S3C_GPIO_PULL_NONE);
 	}
 	}
 }
 }

+ 0 - 1
arch/blackfin/kernel/process.c

@@ -7,7 +7,6 @@
  */
  */
 
 
 #include <linux/module.h>
 #include <linux/module.h>
-#include <linux/smp_lock.h>
 #include <linux/unistd.h>
 #include <linux/unistd.h>
 #include <linux/user.h>
 #include <linux/user.h>
 #include <linux/uaccess.h>
 #include <linux/uaccess.h>

+ 0 - 1
arch/frv/kernel/process.c

@@ -16,7 +16,6 @@
 #include <linux/kernel.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/stddef.h>
 #include <linux/stddef.h>
 #include <linux/unistd.h>
 #include <linux/unistd.h>
 #include <linux/ptrace.h>
 #include <linux/ptrace.h>

+ 0 - 1
arch/h8300/kernel/process.c

@@ -28,7 +28,6 @@
 #include <linux/kernel.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/stddef.h>
 #include <linux/stddef.h>
 #include <linux/unistd.h>
 #include <linux/unistd.h>
 #include <linux/ptrace.h>
 #include <linux/ptrace.h>

+ 3 - 1
arch/ia64/hp/sim/simscsi.c

@@ -202,7 +202,7 @@ simscsi_readwrite10 (struct scsi_cmnd *sc, int mode)
 }
 }
 
 
 static int
 static int
-simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
+simscsi_queuecommand_lck (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
 {
 {
 	unsigned int target_id = sc->device->id;
 	unsigned int target_id = sc->device->id;
 	char fname[MAX_ROOT_LEN+16];
 	char fname[MAX_ROOT_LEN+16];
@@ -326,6 +326,8 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
 	return 0;
 	return 0;
 }
 }
 
 
+static DEF_SCSI_QCMD(simscsi_queuecommand)
+
 static int
 static int
 simscsi_host_reset (struct scsi_cmnd *sc)
 simscsi_host_reset (struct scsi_cmnd *sc)
 {
 {

+ 0 - 1
arch/m68k/kernel/process.c

@@ -18,7 +18,6 @@
 #include <linux/slab.h>
 #include <linux/slab.h>
 #include <linux/fs.h>
 #include <linux/fs.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/stddef.h>
 #include <linux/stddef.h>
 #include <linux/unistd.h>
 #include <linux/unistd.h>
 #include <linux/ptrace.h>
 #include <linux/ptrace.h>

+ 0 - 1
arch/m68knommu/kernel/process.c

@@ -19,7 +19,6 @@
 #include <linux/kernel.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/stddef.h>
 #include <linux/stddef.h>
 #include <linux/unistd.h>
 #include <linux/unistd.h>
 #include <linux/ptrace.h>
 #include <linux/ptrace.h>

+ 0 - 1
arch/mn10300/kernel/process.c

@@ -14,7 +14,6 @@
 #include <linux/kernel.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/stddef.h>
 #include <linux/stddef.h>
 #include <linux/unistd.h>
 #include <linux/unistd.h>
 #include <linux/ptrace.h>
 #include <linux/ptrace.h>

+ 0 - 1
arch/parisc/hpux/sys_hpux.c

@@ -28,7 +28,6 @@
 #include <linux/namei.h>
 #include <linux/namei.h>
 #include <linux/sched.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/slab.h>
-#include <linux/smp_lock.h>
 #include <linux/syscalls.h>
 #include <linux/syscalls.h>
 #include <linux/utsname.h>
 #include <linux/utsname.h>
 #include <linux/vfs.h>
 #include <linux/vfs.h>

+ 0 - 1
arch/parisc/kernel/sys_parisc32.c

@@ -20,7 +20,6 @@
 #include <linux/times.h>
 #include <linux/times.h>
 #include <linux/time.h>
 #include <linux/time.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/sem.h>
 #include <linux/sem.h>
 #include <linux/msg.h>
 #include <linux/msg.h>
 #include <linux/shm.h>
 #include <linux/shm.h>

+ 4 - 0
arch/powerpc/Kconfig

@@ -4,6 +4,10 @@ config PPC32
 	bool
 	bool
 	default y if !PPC64
 	default y if !PPC64
 
 
+config 32BIT
+	bool
+	default y if PPC32
+
 config 64BIT
 config 64BIT
 	bool
 	bool
 	default y if PPC64
 	default y if PPC64

+ 2 - 1
arch/powerpc/boot/div64.S

@@ -33,9 +33,10 @@ __div64_32:
 	cntlzw	r0,r5		# we are shifting the dividend right
 	cntlzw	r0,r5		# we are shifting the dividend right
 	li	r10,-1		# to make it < 2^32, and shifting
 	li	r10,-1		# to make it < 2^32, and shifting
 	srw	r10,r10,r0	# the divisor right the same amount,
 	srw	r10,r10,r0	# the divisor right the same amount,
-	add	r9,r4,r10	# rounding up (so the estimate cannot
+	addc	r9,r4,r10	# rounding up (so the estimate cannot
 	andc	r11,r6,r10	# ever be too large, only too small)
 	andc	r11,r6,r10	# ever be too large, only too small)
 	andc	r9,r9,r10
 	andc	r9,r9,r10
+	addze	r9,r9
 	or	r11,r5,r11
 	or	r11,r5,r11
 	rotlw	r9,r9,r0
 	rotlw	r9,r9,r0
 	rotlw	r11,r11,r0
 	rotlw	r11,r11,r0

+ 2 - 2
arch/powerpc/kernel/kgdb.c

@@ -337,7 +337,7 @@ char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs)
 		/* FP registers 32 -> 63 */
 		/* FP registers 32 -> 63 */
 #if defined(CONFIG_FSL_BOOKE) && defined(CONFIG_SPE)
 #if defined(CONFIG_FSL_BOOKE) && defined(CONFIG_SPE)
 		if (current)
 		if (current)
-			memcpy(mem, current->thread.evr[regno-32],
+			memcpy(mem, &current->thread.evr[regno-32],
 					dbg_reg_def[regno].size);
 					dbg_reg_def[regno].size);
 #else
 #else
 		/* fp registers not used by kernel, leave zero */
 		/* fp registers not used by kernel, leave zero */
@@ -362,7 +362,7 @@ int dbg_set_reg(int regno, void *mem, struct pt_regs *regs)
 	if (regno >= 32 && regno < 64) {
 	if (regno >= 32 && regno < 64) {
 		/* FP registers 32 -> 63 */
 		/* FP registers 32 -> 63 */
 #if defined(CONFIG_FSL_BOOKE) && defined(CONFIG_SPE)
 #if defined(CONFIG_FSL_BOOKE) && defined(CONFIG_SPE)
-		memcpy(current->thread.evr[regno-32], mem,
+		memcpy(&current->thread.evr[regno-32], mem,
 				dbg_reg_def[regno].size);
 				dbg_reg_def[regno].size);
 #else
 #else
 		/* fp registers not used by kernel, leave zero */
 		/* fp registers not used by kernel, leave zero */

+ 2 - 3
arch/powerpc/kernel/setup_64.c

@@ -497,9 +497,8 @@ static void __init emergency_stack_init(void)
 }
 }
 
 
 /*
 /*
- * Called into from start_kernel, after lock_kernel has been called.
- * Initializes bootmem, which is unsed to manage page allocation until
- * mem_init is called.
+ * Called into from start_kernel this initializes bootmem, which is used
+ * to manage page allocation until mem_init is called.
  */
  */
 void __init setup_arch(char **cmdline_p)
 void __init setup_arch(char **cmdline_p)
 {
 {

+ 0 - 1
arch/powerpc/kernel/sys_ppc32.c

@@ -23,7 +23,6 @@
 #include <linux/resource.h>
 #include <linux/resource.h>
 #include <linux/times.h>
 #include <linux/times.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/sem.h>
 #include <linux/sem.h>
 #include <linux/msg.h>
 #include <linux/msg.h>
 #include <linux/shm.h>
 #include <linux/shm.h>

+ 1 - 1
arch/powerpc/mm/hash_utils_64.c

@@ -1123,7 +1123,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
 	else
 	else
 #endif /* CONFIG_PPC_HAS_HASH_64K */
 #endif /* CONFIG_PPC_HAS_HASH_64K */
 		rc = __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize,
 		rc = __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize,
-				    subpage_protection(pgdir, ea));
+				    subpage_protection(mm, ea));
 
 
 	/* Dump some info in case of hash insertion failure, they should
 	/* Dump some info in case of hash insertion failure, they should
 	 * never happen so it is really useful to know if/when they do
 	 * never happen so it is really useful to know if/when they do

+ 4 - 1
arch/powerpc/mm/tlb_low_64e.S

@@ -138,8 +138,11 @@
 	cmpldi	cr0,r15,0			/* Check for user region */
 	cmpldi	cr0,r15,0			/* Check for user region */
 	std	r14,EX_TLB_ESR(r12)		/* write crazy -1 to frame */
 	std	r14,EX_TLB_ESR(r12)		/* write crazy -1 to frame */
 	beq	normal_tlb_miss
 	beq	normal_tlb_miss
+
+	li	r11,_PAGE_PRESENT|_PAGE_BAP_SX	/* Base perm */
+	oris	r11,r11,_PAGE_ACCESSED@h
 	/* XXX replace the RMW cycles with immediate loads + writes */
 	/* XXX replace the RMW cycles with immediate loads + writes */
-1:	mfspr	r10,SPRN_MAS1
+	mfspr	r10,SPRN_MAS1
 	cmpldi	cr0,r15,8			/* Check for vmalloc region */
 	cmpldi	cr0,r15,8			/* Check for vmalloc region */
 	rlwinm	r10,r10,0,16,1			/* Clear TID */
 	rlwinm	r10,r10,0,16,1			/* Clear TID */
 	mtspr	SPRN_MAS1,r10
 	mtspr	SPRN_MAS1,r10

+ 1 - 1
arch/powerpc/mm/tlb_nohash.c

@@ -585,6 +585,6 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base,
 	ppc64_rma_size = min_t(u64, first_memblock_size, 0x40000000);
 	ppc64_rma_size = min_t(u64, first_memblock_size, 0x40000000);
 
 
 	/* Finally limit subsequent allocations */
 	/* Finally limit subsequent allocations */
-	memblock_set_current_limit(ppc64_memblock_base + ppc64_rma_size);
+	memblock_set_current_limit(first_memblock_base + ppc64_rma_size);
 }
 }
 #endif /* CONFIG_PPC64 */
 #endif /* CONFIG_PPC64 */

+ 6 - 0
arch/powerpc/platforms/pseries/Kconfig

@@ -47,6 +47,12 @@ config LPARCFG
 config PPC_PSERIES_DEBUG
 config PPC_PSERIES_DEBUG
 	depends on PPC_PSERIES && PPC_EARLY_DEBUG
 	depends on PPC_PSERIES && PPC_EARLY_DEBUG
 	bool "Enable extra debug logging in platforms/pseries"
 	bool "Enable extra debug logging in platforms/pseries"
+        help
+	  Say Y here if you want the pseries core to produce a bunch of
+	  debug messages to the system log. Select this if you are having a
+	  problem with the pseries core and want to see more of what is
+	  going on. This does not enable debugging in lpar.c, which must
+	  be manually done due to its verbosity.
 	default y
 	default y
 
 
 config PPC_SMLPAR
 config PPC_SMLPAR

+ 0 - 2
arch/powerpc/platforms/pseries/eeh.c

@@ -21,8 +21,6 @@
  * Please address comments and feedback to Linas Vepstas <linas@austin.ibm.com>
  * Please address comments and feedback to Linas Vepstas <linas@austin.ibm.com>
  */
  */
 
 
-#undef DEBUG
-
 #include <linux/delay.h>
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/init.h>
 #include <linux/list.h>
 #include <linux/list.h>

+ 0 - 2
arch/powerpc/platforms/pseries/pci_dlpar.c

@@ -25,8 +25,6 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
  */
 
 
-#undef DEBUG
-
 #include <linux/pci.h>
 #include <linux/pci.h>
 #include <asm/pci-bridge.h>
 #include <asm/pci-bridge.h>
 #include <asm/ppc-pci.h>
 #include <asm/ppc-pci.h>

+ 12 - 0
arch/s390/Kconfig.debug

@@ -6,6 +6,18 @@ config TRACE_IRQFLAGS_SUPPORT
 
 
 source "lib/Kconfig.debug"
 source "lib/Kconfig.debug"
 
 
+config STRICT_DEVMEM
+	def_bool y
+	prompt "Filter access to /dev/mem"
+	---help---
+	  This option restricts access to /dev/mem.  If this option is
+	  disabled, you allow userspace access to all memory, including
+	  kernel and userspace memory. Accidental memory access is likely
+	  to be disastrous.
+	  Memory access is required for experts who want to debug the kernel.
+
+	  If you are unsure, say Y.
+
 config DEBUG_STRICT_USER_COPY_CHECKS
 config DEBUG_STRICT_USER_COPY_CHECKS
 	bool "Strict user copy size checks"
 	bool "Strict user copy size checks"
 	---help---
 	---help---

+ 5 - 0
arch/s390/include/asm/page.h

@@ -130,6 +130,11 @@ struct page;
 void arch_free_page(struct page *page, int order);
 void arch_free_page(struct page *page, int order);
 void arch_alloc_page(struct page *page, int order);
 void arch_alloc_page(struct page *page, int order);
 
 
+static inline int devmem_is_allowed(unsigned long pfn)
+{
+	return 0;
+}
+
 #define HAVE_ARCH_FREE_PAGE
 #define HAVE_ARCH_FREE_PAGE
 #define HAVE_ARCH_ALLOC_PAGE
 #define HAVE_ARCH_ALLOC_PAGE
 
 

+ 0 - 1
arch/s390/kernel/compat_linux.c

@@ -25,7 +25,6 @@
 #include <linux/resource.h>
 #include <linux/resource.h>
 #include <linux/times.h>
 #include <linux/times.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/sem.h>
 #include <linux/sem.h>
 #include <linux/msg.h>
 #include <linux/msg.h>
 #include <linux/shm.h>
 #include <linux/shm.h>

+ 53 - 17
arch/s390/kernel/kprobes.c

@@ -30,6 +30,7 @@
 #include <asm/sections.h>
 #include <asm/sections.h>
 #include <linux/module.h>
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/slab.h>
+#include <linux/hardirq.h>
 
 
 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
 DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
 DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
@@ -212,7 +213,7 @@ static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
 	/* Set the PER control regs, turns on single step for this address */
 	/* Set the PER control regs, turns on single step for this address */
 	__ctl_load(kprobe_per_regs, 9, 11);
 	__ctl_load(kprobe_per_regs, 9, 11);
 	regs->psw.mask |= PSW_MASK_PER;
 	regs->psw.mask |= PSW_MASK_PER;
-	regs->psw.mask &= ~(PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK);
+	regs->psw.mask &= ~(PSW_MASK_IO | PSW_MASK_EXT);
 }
 }
 
 
 static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb)
 static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb)
@@ -239,7 +240,7 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs,
 	__get_cpu_var(current_kprobe) = p;
 	__get_cpu_var(current_kprobe) = p;
 	/* Save the interrupt and per flags */
 	/* Save the interrupt and per flags */
 	kcb->kprobe_saved_imask = regs->psw.mask &
 	kcb->kprobe_saved_imask = regs->psw.mask &
-	    (PSW_MASK_PER | PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK);
+		(PSW_MASK_PER | PSW_MASK_IO | PSW_MASK_EXT);
 	/* Save the control regs that govern PER */
 	/* Save the control regs that govern PER */
 	__ctl_store(kcb->kprobe_saved_ctl, 9, 11);
 	__ctl_store(kcb->kprobe_saved_ctl, 9, 11);
 }
 }
@@ -316,8 +317,6 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
 		return 1;
 		return 1;
 
 
 ss_probe:
 ss_probe:
-	if (regs->psw.mask & (PSW_MASK_PER | PSW_MASK_IO))
-		local_irq_disable();
 	prepare_singlestep(p, regs);
 	prepare_singlestep(p, regs);
 	kcb->kprobe_status = KPROBE_HIT_SS;
 	kcb->kprobe_status = KPROBE_HIT_SS;
 	return 1;
 	return 1;
@@ -350,6 +349,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p,
 	struct hlist_node *node, *tmp;
 	struct hlist_node *node, *tmp;
 	unsigned long flags, orig_ret_address = 0;
 	unsigned long flags, orig_ret_address = 0;
 	unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline;
 	unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline;
+	kprobe_opcode_t *correct_ret_addr = NULL;
 
 
 	INIT_HLIST_HEAD(&empty_rp);
 	INIT_HLIST_HEAD(&empty_rp);
 	kretprobe_hash_lock(current, &head, &flags);
 	kretprobe_hash_lock(current, &head, &flags);
@@ -372,10 +372,32 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p,
 			/* another task is sharing our hash bucket */
 			/* another task is sharing our hash bucket */
 			continue;
 			continue;
 
 
-		if (ri->rp && ri->rp->handler)
-			ri->rp->handler(ri, regs);
+		orig_ret_address = (unsigned long)ri->ret_addr;
+
+		if (orig_ret_address != trampoline_address)
+			/*
+			 * This is the real return address. Any other
+			 * instances associated with this task are for
+			 * other calls deeper on the call stack
+			 */
+			break;
+	}
+
+	kretprobe_assert(ri, orig_ret_address, trampoline_address);
+
+	correct_ret_addr = ri->ret_addr;
+	hlist_for_each_entry_safe(ri, node, tmp, head, hlist) {
+		if (ri->task != current)
+			/* another task is sharing our hash bucket */
+			continue;
 
 
 		orig_ret_address = (unsigned long)ri->ret_addr;
 		orig_ret_address = (unsigned long)ri->ret_addr;
+
+		if (ri->rp && ri->rp->handler) {
+			ri->ret_addr = correct_ret_addr;
+			ri->rp->handler(ri, regs);
+		}
+
 		recycle_rp_inst(ri, &empty_rp);
 		recycle_rp_inst(ri, &empty_rp);
 
 
 		if (orig_ret_address != trampoline_address) {
 		if (orig_ret_address != trampoline_address) {
@@ -387,7 +409,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p,
 			break;
 			break;
 		}
 		}
 	}
 	}
-	kretprobe_assert(ri, orig_ret_address, trampoline_address);
+
 	regs->psw.addr = orig_ret_address | PSW_ADDR_AMODE;
 	regs->psw.addr = orig_ret_address | PSW_ADDR_AMODE;
 
 
 	reset_current_kprobe();
 	reset_current_kprobe();
@@ -465,8 +487,6 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs)
 		goto out;
 		goto out;
 	}
 	}
 	reset_current_kprobe();
 	reset_current_kprobe();
-	if (regs->psw.mask & (PSW_MASK_PER | PSW_MASK_IO))
-		local_irq_enable();
 out:
 out:
 	preempt_enable_no_resched();
 	preempt_enable_no_resched();
 
 
@@ -482,7 +502,7 @@ out:
 	return 1;
 	return 1;
 }
 }
 
 
-int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
+static int __kprobes kprobe_trap_handler(struct pt_regs *regs, int trapnr)
 {
 {
 	struct kprobe *cur = kprobe_running();
 	struct kprobe *cur = kprobe_running();
 	struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
 	struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
@@ -508,8 +528,6 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
 			restore_previous_kprobe(kcb);
 			restore_previous_kprobe(kcb);
 		else {
 		else {
 			reset_current_kprobe();
 			reset_current_kprobe();
-			if (regs->psw.mask & (PSW_MASK_PER | PSW_MASK_IO))
-				local_irq_enable();
 		}
 		}
 		preempt_enable_no_resched();
 		preempt_enable_no_resched();
 		break;
 		break;
@@ -553,6 +571,18 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
 	return 0;
 	return 0;
 }
 }
 
 
+int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
+{
+	int ret;
+
+	if (regs->psw.mask & (PSW_MASK_IO | PSW_MASK_EXT))
+		local_irq_disable();
+	ret = kprobe_trap_handler(regs, trapnr);
+	if (regs->psw.mask & (PSW_MASK_IO | PSW_MASK_EXT))
+		local_irq_restore(regs->psw.mask & ~PSW_MASK_PER);
+	return ret;
+}
+
 /*
 /*
  * Wrapper routine to for handling exceptions.
  * Wrapper routine to for handling exceptions.
  */
  */
@@ -560,8 +590,12 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
 				       unsigned long val, void *data)
 				       unsigned long val, void *data)
 {
 {
 	struct die_args *args = (struct die_args *)data;
 	struct die_args *args = (struct die_args *)data;
+	struct pt_regs *regs = args->regs;
 	int ret = NOTIFY_DONE;
 	int ret = NOTIFY_DONE;
 
 
+	if (regs->psw.mask & (PSW_MASK_IO | PSW_MASK_EXT))
+		local_irq_disable();
+
 	switch (val) {
 	switch (val) {
 	case DIE_BPT:
 	case DIE_BPT:
 		if (kprobe_handler(args->regs))
 		if (kprobe_handler(args->regs))
@@ -572,16 +606,17 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
 			ret = NOTIFY_STOP;
 			ret = NOTIFY_STOP;
 		break;
 		break;
 	case DIE_TRAP:
 	case DIE_TRAP:
-		/* kprobe_running() needs smp_processor_id() */
-		preempt_disable();
-		if (kprobe_running() &&
-		    kprobe_fault_handler(args->regs, args->trapnr))
+		if (!preemptible() && kprobe_running() &&
+		    kprobe_trap_handler(args->regs, args->trapnr))
 			ret = NOTIFY_STOP;
 			ret = NOTIFY_STOP;
-		preempt_enable();
 		break;
 		break;
 	default:
 	default:
 		break;
 		break;
 	}
 	}
+
+	if (regs->psw.mask & (PSW_MASK_IO | PSW_MASK_EXT))
+		local_irq_restore(regs->psw.mask & ~PSW_MASK_PER);
+
 	return ret;
 	return ret;
 }
 }
 
 
@@ -595,6 +630,7 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
 
 
 	/* setup return addr to the jprobe handler routine */
 	/* setup return addr to the jprobe handler routine */
 	regs->psw.addr = (unsigned long)(jp->entry) | PSW_ADDR_AMODE;
 	regs->psw.addr = (unsigned long)(jp->entry) | PSW_ADDR_AMODE;
+	regs->psw.mask &= ~(PSW_MASK_IO | PSW_MASK_EXT);
 
 
 	/* r14 is the function return address */
 	/* r14 is the function return address */
 	kcb->jprobe_saved_r14 = (unsigned long)regs->gprs[14];
 	kcb->jprobe_saved_r14 = (unsigned long)regs->gprs[14];

+ 4 - 6
arch/s390/kernel/nmi.c

@@ -95,7 +95,6 @@ EXPORT_SYMBOL_GPL(s390_handle_mcck);
 static int notrace s390_revalidate_registers(struct mci *mci)
 static int notrace s390_revalidate_registers(struct mci *mci)
 {
 {
 	int kill_task;
 	int kill_task;
-	u64 tmpclock;
 	u64 zero;
 	u64 zero;
 	void *fpt_save_area, *fpt_creg_save_area;
 	void *fpt_save_area, *fpt_creg_save_area;
 
 
@@ -214,11 +213,10 @@ static int notrace s390_revalidate_registers(struct mci *mci)
 			: "0", "cc");
 			: "0", "cc");
 #endif
 #endif
 	/* Revalidate clock comparator register */
 	/* Revalidate clock comparator register */
-	asm volatile(
-		"	stck	0(%1)\n"
-		"	sckc	0(%1)"
-		: "=m" (tmpclock) : "a" (&(tmpclock)) : "cc", "memory");
-
+	if (S390_lowcore.clock_comparator == -1)
+		set_clock_comparator(S390_lowcore.mcck_clock);
+	else
+		set_clock_comparator(S390_lowcore.clock_comparator);
 	/* Check if old PSW is valid */
 	/* Check if old PSW is valid */
 	if (!mci->wp)
 	if (!mci->wp)
 		/*
 		/*

+ 9 - 5
arch/s390/lib/delay.c

@@ -29,17 +29,21 @@ static void __udelay_disabled(unsigned long long usecs)
 {
 {
 	unsigned long mask, cr0, cr0_saved;
 	unsigned long mask, cr0, cr0_saved;
 	u64 clock_saved;
 	u64 clock_saved;
+	u64 end;
 
 
+	mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_EXT;
+	end = get_clock() + (usecs << 12);
 	clock_saved = local_tick_disable();
 	clock_saved = local_tick_disable();
-	set_clock_comparator(get_clock() + (usecs << 12));
 	__ctl_store(cr0_saved, 0, 0);
 	__ctl_store(cr0_saved, 0, 0);
 	cr0 = (cr0_saved & 0xffff00e0) | 0x00000800;
 	cr0 = (cr0_saved & 0xffff00e0) | 0x00000800;
 	__ctl_load(cr0 , 0, 0);
 	__ctl_load(cr0 , 0, 0);
-	mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_EXT;
 	lockdep_off();
 	lockdep_off();
-	trace_hardirqs_on();
-	__load_psw_mask(mask);
-	local_irq_disable();
+	do {
+		set_clock_comparator(end);
+		trace_hardirqs_on();
+		__load_psw_mask(mask);
+		local_irq_disable();
+	} while (get_clock() < end);
 	lockdep_on();
 	lockdep_on();
 	__ctl_load(cr0_saved, 0, 0);
 	__ctl_load(cr0_saved, 0, 0);
 	local_tick_enable(clock_saved);
 	local_tick_enable(clock_saved);

+ 3 - 4
arch/s390/mm/gup.c

@@ -20,18 +20,17 @@
 static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
 static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
 		unsigned long end, int write, struct page **pages, int *nr)
 		unsigned long end, int write, struct page **pages, int *nr)
 {
 {
-	unsigned long mask, result;
+	unsigned long mask;
 	pte_t *ptep, pte;
 	pte_t *ptep, pte;
 	struct page *page;
 	struct page *page;
 
 
-	result = write ? 0 : _PAGE_RO;
-	mask = result | _PAGE_INVALID | _PAGE_SPECIAL;
+	mask = (write ? _PAGE_RO : 0) | _PAGE_INVALID | _PAGE_SPECIAL;
 
 
 	ptep = ((pte_t *) pmd_deref(pmd)) + pte_index(addr);
 	ptep = ((pte_t *) pmd_deref(pmd)) + pte_index(addr);
 	do {
 	do {
 		pte = *ptep;
 		pte = *ptep;
 		barrier();
 		barrier();
-		if ((pte_val(pte) & mask) != result)
+		if ((pte_val(pte) & mask) != 0)
 			return 0;
 			return 0;
 		VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
 		VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
 		page = pte_page(pte);
 		page = pte_page(pte);

+ 5 - 2
arch/sh/include/asm/processor_32.h

@@ -199,10 +199,13 @@ extern unsigned long get_wchan(struct task_struct *p);
 #define ARCH_HAS_PREFETCHW
 #define ARCH_HAS_PREFETCHW
 static inline void prefetch(void *x)
 static inline void prefetch(void *x)
 {
 {
-	__asm__ __volatile__ ("pref @%0\n\t" : : "r" (x) : "memory");
+	__builtin_prefetch(x, 0, 3);
 }
 }
 
 
-#define prefetchw(x)	prefetch(x)
+static inline void prefetchw(void *x)
+{
+	__builtin_prefetch(x, 1, 3);
+}
 #endif
 #endif
 
 
 #endif /* __KERNEL__ */
 #endif /* __KERNEL__ */

+ 1 - 1
arch/sh/kernel/cpu/sh4/clock-sh4-202.c

@@ -110,7 +110,7 @@ static int shoc_clk_verify_rate(struct clk *clk, unsigned long rate)
 	return 0;
 	return 0;
 }
 }
 
 
-static int shoc_clk_set_rate(struct clk *clk, unsigned long rate, int algo_id)
+static int shoc_clk_set_rate(struct clk *clk, unsigned long rate)
 {
 {
 	unsigned long frqcr3;
 	unsigned long frqcr3;
 	unsigned int tmp;
 	unsigned int tmp;

+ 1 - 1
arch/sh/kernel/sys_sh.c

@@ -88,7 +88,7 @@ asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len, int op)
 	}
 	}
 
 
 	if (op & CACHEFLUSH_I)
 	if (op & CACHEFLUSH_I)
-		flush_cache_all();
+		flush_icache_range(addr, addr+len);
 
 
 	up_read(&current->mm->mmap_sem);
 	up_read(&current->mm->mmap_sem);
 	return 0;
 	return 0;

+ 1 - 1
arch/sh/kernel/vsyscall/vsyscall-trapa.S

@@ -8,9 +8,9 @@ __kernel_vsyscall:
 	 * fill out .eh_frame -- PFM. */
 	 * fill out .eh_frame -- PFM. */
 .LEND_vsyscall:
 .LEND_vsyscall:
 	.size __kernel_vsyscall,.-.LSTART_vsyscall
 	.size __kernel_vsyscall,.-.LSTART_vsyscall
-	.previous
 
 
 	.section .eh_frame,"a",@progbits
 	.section .eh_frame,"a",@progbits
+	.previous
 .LCIE:
 .LCIE:
 	.ualong	.LCIE_end - .LCIE_start
 	.ualong	.LCIE_end - .LCIE_start
 .LCIE_start:
 .LCIE_start:

+ 0 - 1
arch/sparc/kernel/leon_smp.c

@@ -12,7 +12,6 @@
 #include <linux/sched.h>
 #include <linux/sched.h>
 #include <linux/threads.h>
 #include <linux/threads.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/interrupt.h>
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
 #include <linux/kernel_stat.h>
 #include <linux/init.h>
 #include <linux/init.h>

+ 0 - 1
arch/sparc/kernel/sys_sparc32.c

@@ -17,7 +17,6 @@
 #include <linux/resource.h>
 #include <linux/resource.h>
 #include <linux/times.h>
 #include <linux/times.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/sem.h>
 #include <linux/sem.h>
 #include <linux/msg.h>
 #include <linux/msg.h>
 #include <linux/shm.h>
 #include <linux/shm.h>

+ 0 - 1
arch/sparc/kernel/sys_sparc_32.c

@@ -19,7 +19,6 @@
 #include <linux/mman.h>
 #include <linux/mman.h>
 #include <linux/utsname.h>
 #include <linux/utsname.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/ipc.h>
 #include <linux/ipc.h>
 
 
 #include <asm/uaccess.h>
 #include <asm/uaccess.h>

+ 0 - 1
arch/sparc/kernel/unaligned_32.c

@@ -16,7 +16,6 @@
 #include <asm/system.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/uaccess.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/perf_event.h>
 #include <linux/perf_event.h>
 
 
 enum direction {
 enum direction {

+ 0 - 1
arch/sparc/kernel/windows.c

@@ -9,7 +9,6 @@
 #include <linux/string.h>
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 
 
 #include <asm/uaccess.h>
 #include <asm/uaccess.h>
 
 

+ 12 - 0
arch/tile/Kconfig

@@ -329,6 +329,18 @@ endmenu  # Tilera-specific configuration
 
 
 menu "Bus options"
 menu "Bus options"
 
 
+config PCI
+	bool "PCI support"
+	default y
+	select PCI_DOMAINS
+	---help---
+	  Enable PCI root complex support, so PCIe endpoint devices can
+	  be attached to the Tile chip.  Many, but not all, PCI devices
+	  are supported under Tilera's root complex driver.
+
+config PCI_DOMAINS
+	bool
+
 config NO_IOMEM
 config NO_IOMEM
 	def_bool !PCI
 	def_bool !PCI
 
 

+ 52 - 0
arch/tile/include/asm/cacheflush.h

@@ -137,4 +137,56 @@ static inline void finv_buffer(void *buffer, size_t size)
 	mb_incoherent();
 	mb_incoherent();
 }
 }
 
 
+/*
+ * Flush & invalidate a VA range that is homed remotely on a single core,
+ * waiting until the memory controller holds the flushed values.
+ */
+static inline void finv_buffer_remote(void *buffer, size_t size)
+{
+	char *p;
+	int i;
+
+	/*
+	 * Flush and invalidate the buffer out of the local L1/L2
+	 * and request the home cache to flush and invalidate as well.
+	 */
+	__finv_buffer(buffer, size);
+
+	/*
+	 * Wait for the home cache to acknowledge that it has processed
+	 * all the flush-and-invalidate requests.  This does not mean
+	 * that the flushed data has reached the memory controller yet,
+	 * but it does mean the home cache is processing the flushes.
+	 */
+	__insn_mf();
+
+	/*
+	 * Issue a load to the last cache line, which can't complete
+	 * until all the previously-issued flushes to the same memory
+	 * controller have also completed.  If we weren't striping
+	 * memory, that one load would be sufficient, but since we may
+	 * be, we also need to back up to the last load issued to
+	 * another memory controller, which would be the point where
+	 * we crossed an 8KB boundary (the granularity of striping
+	 * across memory controllers).  Keep backing up and doing this
+	 * until we are before the beginning of the buffer, or have
+	 * hit all the controllers.
+	 */
+	for (i = 0, p = (char *)buffer + size - 1;
+	     i < (1 << CHIP_LOG_NUM_MSHIMS()) && p >= (char *)buffer;
+	     ++i) {
+		const unsigned long STRIPE_WIDTH = 8192;
+
+		/* Force a load instruction to issue. */
+		*(volatile char *)p;
+
+		/* Jump to end of previous stripe. */
+		p -= STRIPE_WIDTH;
+		p = (char *)((unsigned long)p | (STRIPE_WIDTH - 1));
+	}
+
+	/* Wait for the loads (and thus flushes) to have completed. */
+	__insn_mf();
+}
+
 #endif /* _ASM_TILE_CACHEFLUSH_H */
 #endif /* _ASM_TILE_CACHEFLUSH_H */

+ 11 - 4
arch/tile/include/asm/io.h

@@ -55,9 +55,6 @@ extern void iounmap(volatile void __iomem *addr);
 #define ioremap_writethrough(physaddr, size)	ioremap(physaddr, size)
 #define ioremap_writethrough(physaddr, size)	ioremap(physaddr, size)
 #define ioremap_fullcache(physaddr, size)	ioremap(physaddr, size)
 #define ioremap_fullcache(physaddr, size)	ioremap(physaddr, size)
 
 
-void __iomem *ioport_map(unsigned long port, unsigned int len);
-extern inline void ioport_unmap(void __iomem *addr) {}
-
 #define mmiowb()
 #define mmiowb()
 
 
 /* Conversion between virtual and physical mappings.  */
 /* Conversion between virtual and physical mappings.  */
@@ -189,12 +186,22 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src,
  * we never run, uses them unconditionally.
  * we never run, uses them unconditionally.
  */
  */
 
 
-static inline int ioport_panic(void)
+static inline long ioport_panic(void)
 {
 {
 	panic("inb/outb and friends do not exist on tile");
 	panic("inb/outb and friends do not exist on tile");
 	return 0;
 	return 0;
 }
 }
 
 
+static inline void __iomem *ioport_map(unsigned long port, unsigned int len)
+{
+	return (void __iomem *) ioport_panic();
+}
+
+static inline void ioport_unmap(void __iomem *addr)
+{
+	ioport_panic();
+}
+
 static inline u8 inb(unsigned long addr)
 static inline u8 inb(unsigned long addr)
 {
 {
 	return ioport_panic();
 	return ioport_panic();

+ 0 - 117
arch/tile/include/asm/pci-bridge.h

@@ -1,117 +0,0 @@
-/*
- * Copyright 2010 Tilera Corporation. All Rights Reserved.
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation, version 2.
- *
- *   This program is distributed in the hope that it will be useful, but
- *   WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- *   NON INFRINGEMENT.  See the GNU General Public License for
- *   more details.
- */
-
-#ifndef _ASM_TILE_PCI_BRIDGE_H
-#define _ASM_TILE_PCI_BRIDGE_H
-
-#include <linux/ioport.h>
-#include <linux/pci.h>
-
-struct device_node;
-struct pci_controller;
-
-/*
- * pci_io_base returns the memory address at which you can access
- * the I/O space for PCI bus number `bus' (or NULL on error).
- */
-extern void __iomem *pci_bus_io_base(unsigned int bus);
-extern unsigned long pci_bus_io_base_phys(unsigned int bus);
-extern unsigned long pci_bus_mem_base_phys(unsigned int bus);
-
-/* Allocate a new PCI host bridge structure */
-extern struct pci_controller *pcibios_alloc_controller(void);
-
-/* Helper function for setting up resources */
-extern void pci_init_resource(struct resource *res, unsigned long start,
-			      unsigned long end, int flags, char *name);
-
-/* Get the PCI host controller for a bus */
-extern struct pci_controller *pci_bus_to_hose(int bus);
-
-/*
- * Structure of a PCI controller (host bridge)
- */
-struct pci_controller {
-	int index;		/* PCI domain number */
-	struct pci_bus *root_bus;
-
-	int first_busno;
-	int last_busno;
-
-	int hv_cfg_fd[2];	/* config{0,1} fds for this PCIe controller */
-	int hv_mem_fd;		/* fd to Hypervisor for MMIO operations */
-
-	struct pci_ops *ops;
-
-	int irq_base;		/* Base IRQ from the Hypervisor	*/
-	int plx_gen1;		/* flag for PLX Gen 1 configuration */
-
-	/* Address ranges that are routed to this controller/bridge. */
-	struct resource mem_resources[3];
-};
-
-static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus)
-{
-	return bus->sysdata;
-}
-
-extern void setup_indirect_pci_nomap(struct pci_controller *hose,
-			       void __iomem *cfg_addr, void __iomem *cfg_data);
-extern void setup_indirect_pci(struct pci_controller *hose,
-			       u32 cfg_addr, u32 cfg_data);
-extern void setup_grackle(struct pci_controller *hose);
-
-extern unsigned char common_swizzle(struct pci_dev *, unsigned char *);
-
-/*
- *   The following code swizzles for exactly one bridge.  The routine
- *   common_swizzle below handles multiple bridges.  But there are a
- *   some boards that don't follow the PCI spec's suggestion so we
- *   break this piece out separately.
- */
-static inline unsigned char bridge_swizzle(unsigned char pin,
-		unsigned char idsel)
-{
-	return (((pin-1) + idsel) % 4) + 1;
-}
-
-/*
- * The following macro is used to lookup irqs in a standard table
- * format for those PPC systems that do not already have PCI
- * interrupts properly routed.
- */
-/* FIXME - double check this */
-#define PCI_IRQ_TABLE_LOOKUP ({ \
-	long _ctl_ = -1; \
-	if (idsel >= min_idsel && idsel <= max_idsel && pin <= irqs_per_slot) \
-		_ctl_ = pci_irq_table[idsel - min_idsel][pin-1]; \
-	_ctl_; \
-})
-
-/*
- * Scan the buses below a given PCI host bridge and assign suitable
- * resources to all devices found.
- */
-extern int pciauto_bus_scan(struct pci_controller *, int);
-
-#ifdef CONFIG_PCI
-extern unsigned long pci_address_to_pio(phys_addr_t address);
-#else
-static inline unsigned long pci_address_to_pio(phys_addr_t address)
-{
-	return (unsigned long)-1;
-}
-#endif
-
-#endif /* _ASM_TILE_PCI_BRIDGE_H */

+ 41 - 66
arch/tile/include/asm/pci.h

@@ -15,7 +15,29 @@
 #ifndef _ASM_TILE_PCI_H
 #ifndef _ASM_TILE_PCI_H
 #define _ASM_TILE_PCI_H
 #define _ASM_TILE_PCI_H
 
 
-#include <asm/pci-bridge.h>
+#include <linux/pci.h>
+
+/*
+ * Structure of a PCI controller (host bridge)
+ */
+struct pci_controller {
+	int index;		/* PCI domain number */
+	struct pci_bus *root_bus;
+
+	int first_busno;
+	int last_busno;
+
+	int hv_cfg_fd[2];	/* config{0,1} fds for this PCIe controller */
+	int hv_mem_fd;		/* fd to Hypervisor for MMIO operations */
+
+	struct pci_ops *ops;
+
+	int irq_base;		/* Base IRQ from the Hypervisor	*/
+	int plx_gen1;		/* flag for PLX Gen 1 configuration */
+
+	/* Address ranges that are routed to this controller/bridge. */
+	struct resource mem_resources[3];
+};
 
 
 /*
 /*
  * The hypervisor maps the entirety of CPA-space as bus addresses, so
  * The hypervisor maps the entirety of CPA-space as bus addresses, so
@@ -24,56 +46,12 @@
  */
  */
 #define PCI_DMA_BUS_IS_PHYS     1
 #define PCI_DMA_BUS_IS_PHYS     1
 
 
-struct pci_controller *pci_bus_to_hose(int bus);
-unsigned char __init common_swizzle(struct pci_dev *dev, unsigned char *pinp);
 int __init tile_pci_init(void);
 int __init tile_pci_init(void);
-void pci_iounmap(struct pci_dev *dev, void __iomem *addr);
-void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
-void __devinit pcibios_fixup_bus(struct pci_bus *bus);
 
 
-int __devinit _tile_cfg_read(struct pci_controller *hose,
-				    int bus,
-				    int slot,
-				    int function,
-				    int offset,
-				    int size,
-				    u32 *val);
-int __devinit _tile_cfg_write(struct pci_controller *hose,
-				     int bus,
-				     int slot,
-				     int function,
-				     int offset,
-				     int size,
-				     u32 val);
+void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
+static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) {}
 
 
-/*
- * These are used to to config reads and writes in the early stages of
- * setup before the driver infrastructure has been set up enough to be
- * able to do config reads and writes.
- */
-#define early_cfg_read(where, size, value) \
-	_tile_cfg_read(controller, \
-		       current_bus, \
-		       pci_slot, \
-		       pci_fn, \
-		       where, \
-		       size, \
-		       value)
-
-#define early_cfg_write(where, size, value) \
-	_tile_cfg_write(controller, \
-		       current_bus, \
-		       pci_slot, \
-		       pci_fn, \
-		       where, \
-		       size, \
-		       value)
-
-
-
-#define PCICFG_BYTE	1
-#define PCICFG_WORD	2
-#define PCICFG_DWORD	4
+void __devinit pcibios_fixup_bus(struct pci_bus *bus);
 
 
 #define	TILE_NUM_PCIE	2
 #define	TILE_NUM_PCIE	2
 
 
@@ -88,33 +66,33 @@ static inline int pci_proc_domain(struct pci_bus *bus)
 }
 }
 
 
 /*
 /*
- * I/O space is currently not supported.
+ * pcibios_assign_all_busses() tells whether or not the bus numbers
+ * should be reassigned, in case the BIOS didn't do it correctly, or
+ * in case we don't have a BIOS and we want to let Linux do it.
  */
  */
+static inline int pcibios_assign_all_busses(void)
+{
+	return 1;
+}
 
 
-#define TILE_PCIE_LOWER_IO		0x0
-#define TILE_PCIE_UPPER_IO		0x10000
-#define TILE_PCIE_PCIE_IO_SIZE		0x0000FFFF
-
-#define _PAGE_NO_CACHE		0
-#define _PAGE_GUARDED		0
-
-
-#define pcibios_assign_all_busses()    pci_assign_all_buses
-extern int pci_assign_all_buses;
-
+/*
+ * No special bus mastering setup handling.
+ */
 static inline void pcibios_set_master(struct pci_dev *dev)
 static inline void pcibios_set_master(struct pci_dev *dev)
 {
 {
-	/* No special bus mastering setup handling */
 }
 }
 
 
 #define PCIBIOS_MIN_MEM		0
 #define PCIBIOS_MIN_MEM		0
-#define PCIBIOS_MIN_IO		TILE_PCIE_LOWER_IO
+#define PCIBIOS_MIN_IO		0
 
 
 /*
 /*
  * This flag tells if the platform is TILEmpower that needs
  * This flag tells if the platform is TILEmpower that needs
  * special configuration for the PLX switch chip.
  * special configuration for the PLX switch chip.
  */
  */
-extern int blade_pci;
+extern int tile_plx_gen1;
+
+/* Use any cpu for PCI. */
+#define cpumask_of_pcibus(bus) cpu_online_mask
 
 
 /* implement the pci_ DMA API in terms of the generic device dma_ one */
 /* implement the pci_ DMA API in terms of the generic device dma_ one */
 #include <asm-generic/pci-dma-compat.h>
 #include <asm-generic/pci-dma-compat.h>
@@ -122,7 +100,4 @@ extern int blade_pci;
 /* generic pci stuff */
 /* generic pci stuff */
 #include <asm-generic/pci.h>
 #include <asm-generic/pci.h>
 
 
-/* Use any cpu for PCI. */
-#define cpumask_of_pcibus(bus) cpu_online_mask
-
 #endif /* _ASM_TILE_PCI_H */
 #endif /* _ASM_TILE_PCI_H */

+ 10 - 0
arch/tile/include/asm/processor.h

@@ -292,8 +292,18 @@ extern int kstack_hash;
 /* Are we using huge pages in the TLB for kernel data? */
 /* Are we using huge pages in the TLB for kernel data? */
 extern int kdata_huge;
 extern int kdata_huge;
 
 
+/* Support standard Linux prefetching. */
+#define ARCH_HAS_PREFETCH
+#define prefetch(x) __builtin_prefetch(x)
 #define PREFETCH_STRIDE CHIP_L2_LINE_SIZE()
 #define PREFETCH_STRIDE CHIP_L2_LINE_SIZE()
 
 
+/* Bring a value into the L1D, faulting the TLB if necessary. */
+#ifdef __tilegx__
+#define prefetch_L1(x) __insn_prefetch_l1_fault((void *)(x))
+#else
+#define prefetch_L1(x) __insn_prefetch_L1((void *)(x))
+#endif
+
 #else /* __ASSEMBLY__ */
 #else /* __ASSEMBLY__ */
 
 
 /* Do some slow action (e.g. read a slow SPR). */
 /* Do some slow action (e.g. read a slow SPR). */

Some files were not shown because too many files changed in this diff