History

Merge 3.5-rc4 into usb-next

This is to get the USB fixes that were merged in the 3.5-rc4 tree into usb-next so that everyone can sync up properly.

Greg Kroah-Hartman committed 14 years ago

Commit 889e5522 parents ff446f2 6b16351322 files · +2236 −1194Browse files

Unified · Split

322 files
  1. .mailmap +1 −0
  2. Documentation/ABI/testing/sysfs-bus-iio +31 −0
  3. Documentation/arm/SPEAr/overview.txt +1 −1
  4. Documentation/hwmon/coretemp +21 −1
  5. MAINTAINERS +10 −10
  6. Makefile +3 −3
  7. arch/arm/Kconfig +2 −0
  8. arch/arm/boot/dts/mmp2-brownstone.dts +2 −2
  9. arch/arm/boot/dts/omap2.dtsi +2 −0
  10. arch/arm/boot/dts/spear1310-evb.dts +1 −1
  11. arch/arm/boot/dts/spear1310.dtsi +1 −1
  12. arch/arm/boot/dts/spear1340-evb.dts +1 −1
  13. arch/arm/boot/dts/spear1340.dtsi +1 −1
  14. arch/arm/boot/dts/spear13xx.dtsi +1 −1
  15. arch/arm/boot/dts/spear300-evb.dts +1 −1
  16. arch/arm/boot/dts/spear300.dtsi +1 −1
  17. arch/arm/boot/dts/spear310-evb.dts +1 −1
  18. arch/arm/boot/dts/spear310.dtsi +1 −1
  19. arch/arm/boot/dts/spear320-evb.dts +1 −1
  20. arch/arm/boot/dts/spear320.dtsi +1 −1
  21. arch/arm/boot/dts/spear3xx.dtsi +1 −1
  22. arch/arm/include/asm/futex.h +1 −0
  23. arch/arm/include/asm/hardware/sp810.h +1 −1
  24. arch/arm/kernel/entry-armv.S +1 −0
  25. arch/arm/kernel/kprobes-thumb.c +1 −1
  26. arch/arm/mach-highbank/Makefile +5 −1
  27. arch/arm/mach-highbank/core.h +1 −0
  28. arch/arm/mach-highbank/highbank.c +14 −0
  29. arch/arm/mach-highbank/smc.S +27 −0
  30. arch/arm/mach-imx/Kconfig +1 −0
  31. arch/arm/mach-imx/clk-imx1.c +1 −2
  32. arch/arm/mach-imx/clk-imx21.c +2 −2
  33. arch/arm/mach-imx/clk-imx25.c +1 −1
  34. arch/arm/mach-imx/clk-imx27.c +1 −2
  35. arch/arm/mach-imx/clk-imx31.c +1 −2
  36. arch/arm/mach-imx/clk-imx35.c +2 −4
  37. arch/arm/mach-imx/clk-imx51-imx53.c +5 −7
  38. arch/arm/mach-imx/clk-imx6q.c +7 −15
  39. arch/arm/mach-imx/clk-pllv2.c +55 −38
  40. arch/arm/mach-imx/crm-regs-imx5.h +1 −1
  41. arch/arm/mach-imx/hotplug.c +41 −1
  42. arch/arm/mach-imx/mach-cpuimx35.c +0 −1
  43. arch/arm/mach-imx/mach-cpuimx51sd.c +0 −1
  44. arch/arm/mach-imx/mach-imx27_visstrim_m10.c +25 −11
  45. arch/arm/mach-imx/mach-mx21ads.c +1 −1
  46. arch/arm/mach-imx/mm-imx3.c +4 −0
  47. arch/arm/mach-imx/mm-imx5.c +2 −0
  48. arch/arm/mach-kirkwood/board-iconnect.c +0 −3
  49. arch/arm/mach-kirkwood/common.c +8 −1
  50. arch/arm/mach-kirkwood/include/mach/bridge-regs.h +1 −0
  51. arch/arm/mach-kirkwood/include/mach/kirkwood.h +1 −0
  52. arch/arm/mach-mmp/irq.c +7 −0
  53. arch/arm/mach-omap2/board-n8x0.c +2 −4
  54. arch/arm/mach-omap2/board-omap3beagle.c +12 −16
  55. arch/arm/mach-omap2/board-rx51-peripherals.c +4 −2
  56. arch/arm/mach-omap2/clock3xxx_data.c +1 −1
  57. arch/arm/mach-omap2/clock44xx_data.c +5 −0
  58. arch/arm/mach-omap2/cm.h +11 −0
  59. arch/arm/mach-omap2/cminst44xx.c +2 −2
  60. arch/arm/mach-omap2/dsp.c +3 −0
  61. arch/arm/mach-omap2/id.c +11 −0
  62. arch/arm/mach-omap2/irq.c +1 −0
  63. arch/arm/mach-omap2/mux.c +2 −2
  64. arch/arm/mach-omap2/mux.h +11 −0
  65. arch/arm/mach-omap2/omap_hwmod.c +1 −1
  66. arch/arm/mach-omap2/omap_hwmod_44xx_data.c +6 −2
  67. arch/arm/mach-omap2/omap_l3_smx.c +2 −1
  68. arch/arm/mach-omap2/omap_phy_internal.c +0 −6
  69. arch/arm/mach-omap2/pm34xx.c +1 −0
  70. arch/arm/mach-omap2/prm2xxx_3xxx.c +11 −3
  71. arch/arm/mach-omap2/serial.c +63 −4
  72. arch/arm/mach-omap2/usb-musb.c +2 −4
  73. arch/arm/mach-omap2/usb-tusb6010.c +1 −1
  74. arch/arm/mach-orion5x/include/mach/bridge-regs.h +1 −1
  75. arch/arm/mach-orion5x/include/mach/io.h +22 −0
  76. arch/arm/mach-orion5x/include/mach/orion5x.h +1 −0
  77. arch/arm/mach-spear13xx/include/mach/debug-macro.S +1 −1
  78. arch/arm/mach-spear13xx/include/mach/dma.h +1 −1
  79. arch/arm/mach-spear13xx/include/mach/generic.h +1 −1
  80. arch/arm/mach-spear13xx/include/mach/gpio.h +1 −1
  81. arch/arm/mach-spear13xx/include/mach/irqs.h +1 −1
  82. arch/arm/mach-spear13xx/include/mach/spear.h +1 −1
  83. arch/arm/mach-spear13xx/include/mach/timex.h +1 −1
  84. arch/arm/mach-spear13xx/include/mach/uncompress.h +1 −1
  85. arch/arm/mach-spear13xx/spear1310.c +1 −1
  86. arch/arm/mach-spear13xx/spear1340.c +1 −1
  87. arch/arm/mach-spear13xx/spear13xx.c +1 −1
  88. arch/arm/mach-spear3xx/include/mach/debug-macro.S +1 −1
  89. arch/arm/mach-spear3xx/include/mach/generic.h +1 −1
  90. arch/arm/mach-spear3xx/include/mach/gpio.h +1 −1
  91. arch/arm/mach-spear3xx/include/mach/irqs.h +1 −1
  92. arch/arm/mach-spear3xx/include/mach/misc_regs.h +1 −1
  93. arch/arm/mach-spear3xx/include/mach/spear.h +1 −1
  94. arch/arm/mach-spear3xx/include/mach/timex.h +1 −1
  95. arch/arm/mach-spear3xx/include/mach/uncompress.h +1 −1
  96. arch/arm/mach-spear3xx/spear300.c +1 −1
  97. arch/arm/mach-spear3xx/spear310.c +1 −1
  98. arch/arm/mach-spear3xx/spear320.c +1 −1
  99. arch/arm/mach-spear3xx/spear3xx.c +1 −1
  100. arch/arm/mach-spear6xx/include/mach/gpio.h +1 −1
  101. arch/arm/mach-spear6xx/include/mach/misc_regs.h +1 −1
  102. arch/arm/mach-tegra/reset.c +1 −1
  103. arch/arm/mach-ux500/board-mop500.c +1 −53
  104. arch/arm/mach-versatile/core.c +3 −16
  105. arch/arm/mach-versatile/include/mach/hardware.h +2 −1
  106. arch/arm/mach-versatile/include/mach/io.h +27 −0
  107. arch/arm/mach-versatile/pci.c +16 −2
  108. arch/arm/net/bpf_jit_32.c +5 −0
  109. arch/arm/net/bpf_jit_32.h +4 −0
  110. arch/arm/plat-mxc/epit.c +10 −1
  111. arch/arm/plat-mxc/include/mach/common.h +2 −2
  112. arch/arm/plat-mxc/time.c +12 −12
  113. arch/arm/plat-omap/clock.c +2 −0
  114. arch/arm/plat-omap/include/plat/cpu.h +0 −33
  115. arch/arm/plat-omap/include/plat/mmc.h +1 −3
  116. arch/arm/plat-orion/common.c +1 −1
  117. arch/arm/plat-pxa/ssp.c +1 −0
  118. arch/arm/plat-spear/include/plat/debug-macro.S +1 −1
  119. arch/arm/plat-spear/include/plat/pl080.h +1 −1
  120. arch/arm/plat-spear/include/plat/shirq.h +1 −1
  121. arch/arm/plat-spear/include/plat/timex.h +1 −1
  122. arch/arm/plat-spear/include/plat/uncompress.h +1 −1
  123. arch/arm/plat-spear/pl080.c +1 −1
  124. arch/arm/plat-spear/restart.c +1 −1
  125. arch/arm/plat-spear/shirq.c +1 −1
  126. arch/h8300/kernel/setup.c +10 −13
  127. arch/h8300/mm/init.c +8 −9
  128. arch/powerpc/kvm/book3s_hv.c +66 −30
  129. arch/powerpc/platforms/pseries/nvram.c +7 −54
  130. arch/sparc/kernel/vio.c +1 −1
  131. arch/x86/include/asm/pgtable-3level.h +17 −13
  132. arch/x86/platform/mrst/early_printk_mrst.c +5 −8
  133. arch/xtensa/Makefile +2 −2
  134. arch/xtensa/kernel/vmlinux.lds.S +1 −2
  135. arch/xtensa/mm/init.c +7 −11
  136. drivers/ata/pata_arasan_cf.c +2 −2
  137. drivers/base/dd.c +1 −1
  138. drivers/char/hw_random/atmel-rng.c +1 −1
  139. drivers/clk/spear/clk-aux-synth.c +1 −1
  140. drivers/clk/spear/clk-frac-synth.c +1 −1
  141. drivers/clk/spear/clk-gpt-synth.c +1 −1
  142. drivers/clk/spear/clk-vco-pll.c +1 −1
  143. drivers/clk/spear/clk.c +1 −1
  144. drivers/clk/spear/clk.h +1 −1
  145. drivers/clk/spear/spear1310_clock.c +1 −1
  146. drivers/clk/spear/spear1340_clock.c +1 −1
  147. drivers/clk/spear/spear3xx_clock.c +1 −1
  148. drivers/clk/spear/spear6xx_clock.c +1 −1
  149. drivers/dma/dw_dmac.c +1 −1
  150. drivers/dma/imx-sdma.c +4 −2
  151. drivers/dma/pl330.c +12 −18
  152. drivers/edac/edac_mc.c +1 −1
  153. drivers/edac/i7core_edac.c +4 −11
  154. drivers/edac/mpc85xx_edac.c +2 −1
  155. drivers/edac/sb_edac.c +5 −5
  156. drivers/extcon/extcon-max8997.c +3 −2
  157. drivers/extcon/extcon_class.c +1 −1
  158. drivers/extcon/extcon_gpio.c +2 −0
  159. drivers/gpu/drm/drm_edid.c +1 −1
  160. drivers/gpu/drm/i915/intel_display.c +1 −1
  161. drivers/gpu/drm/i915/intel_dp.c +53 −7
  162. drivers/gpu/drm/radeon/atombios_crtc.c +9 −1
  163. drivers/gpu/drm/radeon/atombios_encoders.c +3 −1
  164. drivers/gpu/drm/radeon/evergreen.c +3 −0
  165. drivers/gpu/drm/radeon/evergreen_hdmi.c +0 −3
  166. drivers/gpu/drm/radeon/evergreend.h +1 −0
  167. drivers/gpu/drm/radeon/ni.c +5 −0
  168. drivers/gpu/drm/radeon/r600.c +1 −0
  169. drivers/gpu/drm/radeon/r600_audio.c +1 −1
  170. drivers/gpu/drm/radeon/r600_cs.c +42 −0
  171. drivers/gpu/drm/radeon/r600_hdmi.c +2 −5
  172. drivers/gpu/drm/radeon/r600d.h +2 −0
  173. drivers/gpu/drm/radeon/radeon_drv.c +2 −1
  174. drivers/gpu/drm/radeon/radeon_pm.c +7 −3
  175. drivers/gpu/drm/radeon/radeon_prime.c +8 −2
  176. drivers/gpu/drm/radeon/rv770.c +4 −1
  177. drivers/gpu/drm/radeon/rv770d.h +3 −0
  178. drivers/gpu/drm/radeon/si_reg.h +72 −0
  179. drivers/gpu/drm/sis/sis_drv.c +1 −1
  180. drivers/gpu/drm/udl/udl_drv.c +14 −1
  181. drivers/gpu/drm/via/via_map.c +1 −2
  182. drivers/hwmon/applesmc.c +2 −2
  183. drivers/hwmon/coretemp.c +31 −2
  184. drivers/hwmon/emc2103.c +8 −4
  185. drivers/iio/Kconfig +1 −2
  186. drivers/iio/industrialio-core.c +9 −7
  187. drivers/infiniband/core/cma.c +1 −1
  188. drivers/infiniband/hw/ocrdma/ocrdma.h +1 −0
  189. drivers/infiniband/hw/ocrdma/ocrdma_hw.c +8 −10
  190. drivers/infiniband/hw/ocrdma/ocrdma_main.c +34 −29
  191. drivers/infiniband/hw/ocrdma/ocrdma_sli.h +4 −1
  192. drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +7 −5
  193. drivers/media/video/pms.c +1 −0
  194. drivers/mfd/stmpe-i2c.c +1 −1
  195. drivers/mfd/stmpe-spi.c +2 −2
  196. drivers/misc/mei/interrupt.c +1 −1
  197. drivers/misc/mei/main.c +5 −4
  198. drivers/misc/mei/wd.c +1 −1
  199. drivers/mmc/core/mmc.c +1 −1
  200. drivers/mmc/core/sd.c +4 −2
  201. drivers/mmc/core/sdio.c +6 −0
  202. drivers/mmc/host/atmel-mci-regs.h +14 −0
  203. drivers/mmc/host/atmel-mci.c +7 −5
  204. drivers/mmc/host/dw_mmc.c +18 −18
  205. drivers/mmc/host/mmci.c +14 −5
  206. drivers/mmc/host/mxs-mmc.c +1 −1
  207. drivers/mmc/host/omap.c +10 −8
  208. drivers/mmc/host/sdhci-s3c.c +1 −1
  209. drivers/mmc/host/sdhci-spear.c +2 −2
  210. drivers/mmc/host/sdhci.c +2 −2
  211. drivers/mtd/mtdoops.c +4 −18
  212. drivers/net/wireless/b43/main.c +1 −1
  213. drivers/net/wireless/b43legacy/main.c +1 −1
  214. drivers/pinctrl/pinctrl-mxs.c +1 −1
  215. drivers/pinctrl/pinctrl-nomadik.c +21 −1
  216. drivers/pinctrl/spear/pinctrl-spear.c +1 −1
  217. drivers/pinctrl/spear/pinctrl-spear.h +1 −1
  218. drivers/pinctrl/spear/pinctrl-spear1310.c +2 −2
  219. drivers/pinctrl/spear/pinctrl-spear1340.c +2 −2
  220. drivers/pinctrl/spear/pinctrl-spear300.c +2 −2
  221. drivers/pinctrl/spear/pinctrl-spear310.c +2 −2
  222. drivers/pinctrl/spear/pinctrl-spear320.c +2 −2
  223. drivers/pinctrl/spear/pinctrl-spear3xx.c +1 −1
  224. drivers/pinctrl/spear/pinctrl-spear3xx.h +1 −1
  225. drivers/regulator/ab8500.c +11 −11
  226. drivers/regulator/db8500-prcmu.c +20 −20
  227. drivers/regulator/s5m8767.c +1 −1
  228. drivers/remoteproc/omap_remoteproc.c +1 −1
  229. drivers/remoteproc/remoteproc_core.c +6 −4
  230. drivers/spi/spi-omap2-mcspi.c +2 −1
  231. drivers/staging/comedi/drivers.c +5 −0
  232. drivers/staging/gdm72xx/netlink_k.c +1 −1
  233. drivers/staging/iio/Documentation/device.txt +0 −2
  234. drivers/staging/iio/adc/Kconfig +1 −0
  235. drivers/staging/iio/adc/ad7606_core.c +2 −1
  236. drivers/staging/omapdrm/omap_fbdev.c +7 −3
  237. drivers/staging/rtl8712/usb_intf.c +2 −0
  238. drivers/tty/serial/8250/8250.c +1 −1
  239. drivers/tty/serial/amba-pl011.c +41 −4
  240. drivers/tty/serial/serial_txx9.c +1 −1
  241. drivers/watchdog/sp805_wdt.c +2 −2
  242. fs/btrfs/backref.c +52 −42
  243. fs/btrfs/ctree.h +7 −2
  244. fs/btrfs/disk-io.c +1 −0
  245. fs/btrfs/inode.c +2 −2
  246. fs/ceph/addr.c +12 −9
  247. fs/exec.c +1 −1
  248. fs/hfsplus/ioctl.c +7 −2
  249. fs/hfsplus/wrapper.c +1 −1
  250. fs/nfs/client.c +0 −1
  251. fs/nfs/direct.c +1 −0
  252. fs/nfs/idmap.c +8 −5
  253. fs/nfs/inode.c +1 −1
  254. fs/nfs/pnfs.c +9 −4
  255. fs/nilfs2/gcinode.c +2 −0
  256. fs/nilfs2/segment.c +2 −0
  257. fs/pstore/inode.c +1 −1
  258. fs/pstore/platform.c +12 −22
  259. fs/pstore/ram.c +3 −0
  260. fs/pstore/ram_core.c +17 −10
  261. fs/xfs/xfs_alloc.c +2 −1
  262. fs/xfs/xfs_aops.c +8 −3
  263. fs/xfs/xfs_buf.c +2 −14
  264. fs/xfs/xfs_inode_item.c +8 −9
  265. fs/xfs/xfs_log.c +45 −32
  266. fs/xfs/xfs_log_cil.c +11 −11
  267. fs/xfs/xfs_log_priv.h +31 −15
  268. fs/xfs/xfs_log_recover.c +19 −19
  269. fs/xfs/xfs_mount.h +2 −2
  270. fs/xfs/xfs_sync.c +16 −16
  271. fs/xfs/xfs_trace.h +9 −9
  272. include/asm-generic/bug.h +5 −3
  273. include/asm-generic/pgtable.h +10 −0
  274. include/drm/drm_pciids.h +0 −4
  275. include/linux/compiler-gcc.h +3 −3
  276. include/linux/kmsg_dump.h +38 −7
  277. include/linux/mm_types.h +10 −0
  278. include/linux/mmc/sdhci-spear.h +1 −1
  279. include/linux/mmc/sdio.h +2 −0
  280. include/linux/nfs_fs_sb.h +1 −0
  281. include/linux/pata_arasan_cf_data.h +1 −1
  282. include/linux/pstore_ram.h +2 −0
  283. include/linux/pxa2xx_ssp.h +2 −0
  284. include/linux/spi/pxa2xx_spi.h +1 −1
  285. include/linux/vga_switcheroo.h +6 −0
  286. kernel/cgroup.c +10 −3
  287. kernel/events/core.c +7 −3
  288. kernel/exit.c +13 −6
  289. kernel/pid_namespace.c +20 −0
  290. kernel/printk.c +208 −33
  291. kernel/sys.c +3 −3
  292. lib/fault-inject.c +4 −0
  293. mm/memblock.c +38 −10
  294. mm/memcontrol.c +3 −3
  295. mm/memory.c +10 −2
  296. mm/mempolicy.c +1 −1
  297. mm/oom_kill.c +8 −9
  298. mm/page_cgroup.c +2 −2
  299. mm/pagewalk.c +0 −1
  300. mm/percpu-vm.c +0 −1
  301. net/9p/trans_virtio.c +1 −1
  302. net/ceph/ceph_common.c +0 −7
  303. net/ceph/messenger.c +4 −0
  304. net/ceph/mon_client.c +8 −0
  305. net/ceph/osd_client.c +6 −6
  306. scripts/get_maintainer.pl +2 −1
  307. sound/pci/hda/hda_codec.c +37 −9
  308. sound/pci/hda/hda_codec.h +2 −0
  309. sound/pci/hda/hda_intel.c +1 −1
  310. sound/soc/codecs/wm8904.c +12 −14
  311. sound/soc/codecs/wm8996.c +3 −5
  312. sound/soc/pxa/pxa-ssp.c +11 −27
  313. sound/soc/tegra/tegra_wm8903.c +13 −0
  314. sound/usb/6fire/firmware.c +1 −1
  315. sound/usb/pcm.c +13 −8
  316. tools/hv/hv_kvp_daemon.c +7 −3
  317. tools/perf/builtin-stat.c +7 −1
  318. tools/perf/util/header.c +41 −7
  319. tools/perf/util/include/linux/bitops.h +2 −0
  320. tools/perf/util/session.c +10 −0
  321. tools/perf/util/session.h +1 −0
  322. virt/kvm/assigned-dev.c +1 −3
.mailmap+1−0
@@ -111,6 +111,7 @@ Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> · 110 unmodified lines
111111 Uwe Kleine-König <ukl@pengutronix.de>
112112 Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
113113 Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
114+Viresh Kumar <viresh.linux@gmail.com> <viresh.kumar@st.com>
114115 Takashi YOSHII <takashi.yoshii.zj@renesas.com>
115116 Yusuke Goda <goda.yusuke@renesas.com>
116117 Gustavo Padovan <gustavo@las.ic.unicamp.br>
Documentation/ABI/testing/sysfs-bus-iio+31−0
@@ -219,6 +219,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_scale · 218 unmodified lines
219219 What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_scale
220220 What: /sys/bus/iio/devices/iio:deviceX/in_voltage_scale
221221 What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_scale
222+What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_scale
222223 What: /sys/bus/iio/devices/iio:deviceX/in_accel_scale
223224 What: /sys/bus/iio/devices/iio:deviceX/in_accel_peak_scale
224225 What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_scale
@@ -273,6 +274,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_accel_scale_available · 48 unmodified lines
273274 What: /sys/.../iio:deviceX/in_voltageX_scale_available
274275 What: /sys/.../iio:deviceX/in_voltage-voltage_scale_available
275276 What: /sys/.../iio:deviceX/out_voltageX_scale_available
277+What: /sys/.../iio:deviceX/out_altvoltageX_scale_available
276278 What: /sys/.../iio:deviceX/in_capacitance_scale_available
277279 KernelVersion: 2.635
278280 Contact: linux-iio@vger.kernel.org
@@ -298,14 +300,19 @@ Description: · 19 unmodified lines
298300 gives the 3dB frequency of the filter in Hz.
299301
300302 What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_raw
303+What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_raw
301304 KernelVersion: 2.6.37
302305 Contact: linux-iio@vger.kernel.org
303306 Description:
304307 Raw (unscaled, no bias etc.) output voltage for
305308 channel Y. The number must always be specified and
306309 unique if the output corresponds to a single channel.
310+ While DAC like devices typically use out_voltage,
311+ a continuous frequency generating device, such as
312+ a DDS or PLL should use out_altvoltage.
307313
308314 What: /sys/bus/iio/devices/iio:deviceX/out_voltageY&Z_raw
315+What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY&Z_raw
309316 KernelVersion: 2.6.37
310317 Contact: linux-iio@vger.kernel.org
311318 Description:
@@ -316,6 +323,8 @@ Description: · 4 unmodified lines
316323
317324 What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_powerdown_mode
318325 What: /sys/bus/iio/devices/iio:deviceX/out_voltage_powerdown_mode
326+What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_powerdown_mode
327+What: /sys/bus/iio/devices/iio:deviceX/out_altvoltage_powerdown_mode
319328 KernelVersion: 2.6.38
320329 Contact: linux-iio@vger.kernel.org
321330 Description:
@@ -330,6 +339,8 @@ Description: · 8 unmodified lines
330339
331340 What: /sys/.../iio:deviceX/out_votlageY_powerdown_mode_available
332341 What: /sys/.../iio:deviceX/out_voltage_powerdown_mode_available
342+What: /sys/.../iio:deviceX/out_altvotlageY_powerdown_mode_available
343+What: /sys/.../iio:deviceX/out_altvoltage_powerdown_mode_available
333344 KernelVersion: 2.6.38
334345 Contact: linux-iio@vger.kernel.org
335346 Description:
@@ -338,6 +349,8 @@ Description: · 2 unmodified lines
338349
339350 What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_powerdown
340351 What: /sys/bus/iio/devices/iio:deviceX/out_voltage_powerdown
352+What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_powerdown
353+What: /sys/bus/iio/devices/iio:deviceX/out_altvoltage_powerdown
341354 KernelVersion: 2.6.38
342355 Contact: linux-iio@vger.kernel.org
343356 Description:
@@ -346,6 +359,24 @@ Description: · 2 unmodified lines
346359 normal operation. Y may be suppressed if all outputs are
347360 controlled together.
348361
362+What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_frequency
363+KernelVersion: 3.4.0
364+Contact: linux-iio@vger.kernel.org
365+Description:
366+ Output frequency for channel Y in Hz. The number must always be
367+ specified and unique if the output corresponds to a single
368+ channel.
369+
370+What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_phase
371+KernelVersion: 3.4.0
372+Contact: linux-iio@vger.kernel.org
373+Description:
374+ Phase in radians of one frequency/clock output Y
375+ (out_altvoltageY) relative to another frequency/clock output
376+ (out_altvoltageZ) of the device X. The number must always be
377+ specified and unique if the output corresponds to a single
378+ channel.
379+
349380 What: /sys/bus/iio/devices/iio:deviceX/events
350381 KernelVersion: 2.6.35
351382 Contact: linux-iio@vger.kernel.org
Documentation/arm/SPEAr/overview.txt+1−1
@@ -60,4 +60,4 @@ Introduction · 59 unmodified lines
6060 Document Author
6161 ---------------
6262
63− Viresh Kumar <viresh.kumar@st.com>, (c) 2010-2012 ST Microelectronics
63+ Viresh Kumar <viresh.linux@gmail.com>, (c) 2010-2012 ST Microelectronics
Documentation/hwmon/coretemp+21−1
@@ -6,7 +6,9 @@ Supported chips: · 5 unmodified lines
66 Prefix: 'coretemp'
77 CPUID: family 0x6, models 0xe (Pentium M DC), 0xf (Core 2 DC 65nm),
88 0x16 (Core 2 SC 65nm), 0x17 (Penryn 45nm),
9− 0x1a (Nehalem), 0x1c (Atom), 0x1e (Lynnfield)
9+ 0x1a (Nehalem), 0x1c (Atom), 0x1e (Lynnfield),
10+ 0x26 (Tunnel Creek Atom), 0x27 (Medfield Atom),
11+ 0x36 (Cedar Trail Atom)
1012 Datasheet: Intel 64 and IA-32 Architectures Software Developer's Manual
1113 Volume 3A: System Programming Guide
1214 http://softwarecommunity.intel.com/Wiki/Mobility/720.htm
@@ -52,6 +54,17 @@ Some information comes from ark.intel.com · 39 unmodified lines
5254
5355 Process Processor TjMax(C)
5456
57+22nm Core i5/i7 Processors
58+ i7 3920XM, 3820QM, 3720QM, 3667U, 3520M 105
59+ i5 3427U, 3360M/3320M 105
60+ i7 3770/3770K 105
61+ i5 3570/3570K, 3550, 3470/3450 105
62+ i7 3770S 103
63+ i5 3570S/3550S, 3475S/3470S/3450S 103
64+ i7 3770T 94
65+ i5 3570T 94
66+ i5 3470T 91
67+
5568 32nm Core i3/i5/i7 Processors
5669 i7 660UM/640/620, 640LM/620, 620M, 610E 105
5770 i5 540UM/520/430, 540M/520/450/430 105
@@ -65,6 +78,11 @@ Process Processor TjMax(C) · 7 unmodified lines
6578 U3400 105
6679 P4505/P4500 90
6780
81+32nm Atom Processors
82+ Z2460 90
83+ D2700/2550/2500 100
84+ N2850/2800/2650/2600 100
85+
6886 45nm Xeon Processors 5400 Quad-Core
6987 X5492, X5482, X5472, X5470, X5460, X5450 85
7088 E5472, E5462, E5450/40/30/20/10/05 85
@@ -85,6 +103,8 @@ Process Processor TjMax(C) · 14 unmodified lines
85103 N475/470/455/450 100
86104 N280/270 90
87105 330/230 125
106+ E680/660/640/620 90
107+ E680T/660T/640T/620T 110
88108
89109 45nm Core2 Processors
90110 Solo ULV SU3500/3300 100
MAINTAINERS+10−10
@@ -579,7 +579,7 @@ F: drivers/net/appletalk/ · 578 unmodified lines
579579 F: net/appletalk/
580580
581581 ARASAN COMPACT FLASH PATA CONTROLLER
582−M: Viresh Kumar <viresh.kumar@st.com>
582+M: Viresh Kumar <viresh.linux@gmail.com>
583583 L: linux-ide@vger.kernel.org
584584 S: Maintained
585585 F: include/linux/pata_arasan_cf_data.h
@@ -5296,7 +5296,7 @@ S: Maintained · 4710 unmodified lines
52965296 F: drivers/pinctrl/
52975297
52985298 PIN CONTROLLER - ST SPEAR
5299−M: Viresh Kumar <viresh.kumar@st.com>
5299+M: Viresh Kumar <viresh.linux@gmail.com>
53005300 L: spear-devel@list.st.com
53015301 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
53025302 W: http://www.st.com/spear
@@ -5873,7 +5873,7 @@ S: Maintained · 570 unmodified lines
58735873 F: drivers/tty/serial
58745874
58755875 SYNOPSYS DESIGNWARE DMAC DRIVER
5876−M: Viresh Kumar <viresh.kumar@st.com>
5876+M: Viresh Kumar <viresh.linux@gmail.com>
58775877 S: Maintained
58785878 F: include/linux/dw_dmac.h
58795879 F: drivers/dma/dw_dmac_regs.h
@@ -6021,7 +6021,7 @@ S: Maintained · 141 unmodified lines
60216021 F: drivers/mmc/host/sdhci-s3c.c
60226022
60236023 SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) ST SPEAR DRIVER
6024−M: Viresh Kumar <viresh.kumar@st.com>
6024+M: Viresh Kumar <viresh.linux@gmail.com>
60256025 L: spear-devel@list.st.com
60266026 L: linux-mmc@vger.kernel.org
60276027 S: Maintained
@@ -6377,7 +6377,7 @@ S: Maintained · 349 unmodified lines
63776377 F: include/linux/compiler.h
63786378
63796379 SPEAR PLATFORM SUPPORT
6380−M: Viresh Kumar <viresh.kumar@st.com>
6380+M: Viresh Kumar <viresh.linux@gmail.com>
63816381 M: Shiraz Hashim <shiraz.hashim@st.com>
63826382 L: spear-devel@list.st.com
63836383 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@ -6386,7 +6386,7 @@ S: Maintained · 2 unmodified lines
63866386 F: arch/arm/plat-spear/
63876387
63886388 SPEAR13XX MACHINE SUPPORT
6389−M: Viresh Kumar <viresh.kumar@st.com>
6389+M: Viresh Kumar <viresh.linux@gmail.com>
63906390 M: Shiraz Hashim <shiraz.hashim@st.com>
63916391 L: spear-devel@list.st.com
63926392 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@ -6395,7 +6395,7 @@ S: Maintained · 2 unmodified lines
63956395 F: arch/arm/mach-spear13xx/
63966396
63976397 SPEAR3XX MACHINE SUPPORT
6398−M: Viresh Kumar <viresh.kumar@st.com>
6398+M: Viresh Kumar <viresh.linux@gmail.com>
63996399 M: Shiraz Hashim <shiraz.hashim@st.com>
64006400 L: spear-devel@list.st.com
64016401 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@ -6406,7 +6406,7 @@ F: arch/arm/mach-spear3xx/ · 4 unmodified lines
64066406 SPEAR6XX MACHINE SUPPORT
64076407 M: Rajeev Kumar <rajeev-dlh.kumar@st.com>
64086408 M: Shiraz Hashim <shiraz.hashim@st.com>
6409−M: Viresh Kumar <viresh.kumar@st.com>
6409+M: Viresh Kumar <viresh.linux@gmail.com>
64106410 L: spear-devel@list.st.com
64116411 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
64126412 W: http://www.st.com/spear
@@ -6414,7 +6414,7 @@ S: Maintained · 1 unmodified line
64146414 F: arch/arm/mach-spear6xx/
64156415
64166416 SPEAR CLOCK FRAMEWORK SUPPORT
6417−M: Viresh Kumar <viresh.kumar@st.com>
6417+M: Viresh Kumar <viresh.linux@gmail.com>
64186418 L: spear-devel@list.st.com
64196419 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
64206420 W: http://www.st.com/spear
@@ -7421,7 +7421,7 @@ F: include/linux/vlynq.h · 1000 unmodified lines
74217421
74227422 VME SUBSYSTEM
74237423 M: Martyn Welch <martyn.welch@ge.com>
7424−M: Manohar Vanga <manohar.vanga@cern.ch>
7424+M: Manohar Vanga <manohar.vanga@gmail.com>
74257425 M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
74267426 L: devel@driverdev.osuosl.org
74277427 S: Maintained
Makefile+3−3
@@ -1,7 +1,7 @@
11 VERSION = 3
22 PATCHLEVEL = 5
33 SUBLEVEL = 0
4−EXTRAVERSION = -rc3
4+EXTRAVERSION = -rc4
55 NAME = Saber-toothed Squirrel
66
77 # *DOCUMENTATION*
@@ -561,6 +561,8 @@ else · 553 unmodified lines
561561 KBUILD_CFLAGS += -O2
562562 endif
563563
564+include $(srctree)/arch/$(SRCARCH)/Makefile
565+
564566 ifdef CONFIG_READABLE_ASM
565567 # Disable optimizations that make assembler listings hard to read.
566568 # reorder blocks reorders the control in the function
@@ -571,8 +573,6 @@ KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \ · 4 unmodified lines
571573 $(call cc-option,-fno-partial-inlining)
572574 endif
573575
574−include $(srctree)/arch/$(SRCARCH)/Makefile
575−
576576 ifneq ($(CONFIG_FRAME_WARN),0)
577577 KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
578578 endif
arch/arm/Kconfig+2−0
@@ -293,6 +293,7 @@ config ARCH_VERSATILE · 292 unmodified lines
293293 select ICST
294294 select GENERIC_CLOCKEVENTS
295295 select ARCH_WANT_OPTIONAL_GPIOLIB
296+ select NEED_MACH_IO_H if PCI
296297 select PLAT_VERSATILE
297298 select PLAT_VERSATILE_CLCD
298299 select PLAT_VERSATILE_FPGA_IRQ
@@ -588,6 +589,7 @@ config ARCH_ORION5X · 289 unmodified lines
588589 select PCI
589590 select ARCH_REQUIRE_GPIOLIB
590591 select GENERIC_CLOCKEVENTS
592+ select NEED_MACH_IO_H
591593 select PLAT_ORION
592594 help
593595 Support for the following Marvell Orion 5x series SoCs:
arch/arm/boot/dts/mmp2-brownstone.dts+2−2
@@ -11,7 +11,7 @@ · 10 unmodified lines
1111 /include/ "mmp2.dtsi"
1212
1313 / {
14− model = "Marvell MMP2 Aspenite Development Board";
14+ model = "Marvell MMP2 Brownstone Development Board";
1515 compatible = "mrvl,mmp2-brownstone", "mrvl,mmp2";
1616
1717 chosen {
@@ -19,7 +19,7 @@ · 1 unmodified line
1919 };
2020
2121 memory {
22− reg = <0x00000000 0x04000000>;
22+ reg = <0x00000000 0x08000000>;
2323 };
2424
2525 soc {
arch/arm/boot/dts/omap2.dtsi+2−0
@@ -44,6 +44,8 @@ · 43 unmodified lines
4444 compatible = "ti,omap2-intc";
4545 interrupt-controller;
4646 #interrupt-cells = <1>;
47+ ti,intc-size = <96>;
48+ reg = <0x480FE000 0x1000>;
4749 };
4850
4951 uart1: serial@4806a000 {
arch/arm/boot/dts/spear1310-evb.dts+1−1
@@ -1,7 +1,7 @@
11 /*
22 * DTS file for SPEAr1310 Evaluation Baord
33 *
4− * Copyright 2012 Viresh Kumar <viresh.kumar@st.com>
4+ * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com>
55 *
66 * The code contained herein is licensed under the GNU General Public
77 * License. You may obtain a copy of the GNU General Public License
arch/arm/boot/dts/spear1310.dtsi+1−1
@@ -1,7 +1,7 @@
11 /*
22 * DTS file for all SPEAr1310 SoCs
33 *
4− * Copyright 2012 Viresh Kumar <viresh.kumar@st.com>
4+ * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com>
55 *
66 * The code contained herein is licensed under the GNU General Public
77 * License. You may obtain a copy of the GNU General Public License
arch/arm/boot/dts/spear1340-evb.dts+1−1
@@ -1,7 +1,7 @@
11 /*
22 * DTS file for SPEAr1340 Evaluation Baord
33 *
4− * Copyright 2012 Viresh Kumar <viresh.kumar@st.com>
4+ * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com>
55 *
66 * The code contained herein is licensed under the GNU General Public
77 * License. You may obtain a copy of the GNU General Public License
arch/arm/boot/dts/spear1340.dtsi+1−1
@@ -1,7 +1,7 @@
11 /*
22 * DTS file for all SPEAr1340 SoCs
33 *
4− * Copyright 2012 Viresh Kumar <viresh.kumar@st.com>
4+ * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com>
55 *
66 * The code contained herein is licensed under the GNU General Public
77 * License. You may obtain a copy of the GNU General Public License
arch/arm/boot/dts/spear13xx.dtsi+1−1
@@ -1,7 +1,7 @@
11 /*
22 * DTS file for all SPEAr13xx SoCs
33 *
4− * Copyright 2012 Viresh Kumar <viresh.kumar@st.com>
4+ * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com>
55 *
66 * The code contained herein is licensed under the GNU General Public
77 * License. You may obtain a copy of the GNU General Public License
arch/arm/boot/dts/spear300-evb.dts+1−1
@@ -1,7 +1,7 @@
11 /*
22 * DTS file for SPEAr300 Evaluation Baord
33 *
4− * Copyright 2012 Viresh Kumar <viresh.kumar@st.com>
4+ * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com>
55 *
66 * The code contained herein is licensed under the GNU General Public
77 * License. You may obtain a copy of the GNU General Public License
arch/arm/boot/dts/spear300.dtsi+1−1
@@ -1,7 +1,7 @@
11 /*
22 * DTS file for SPEAr300 SoC
33 *
4− * Copyright 2012 Viresh Kumar <viresh.kumar@st.com>
4+ * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com>
55 *
66 * The code contained herein is licensed under the GNU General Public
77 * License. You may obtain a copy of the GNU General Public License
arch/arm/boot/dts/spear310-evb.dts+1−1
@@ -1,7 +1,7 @@
11 /*
22 * DTS file for SPEAr310 Evaluation Baord
33 *
4− * Copyright 2012 Viresh Kumar <viresh.kumar@st.com>
4+ * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com>
55 *
66 * The code contained herein is licensed under the GNU General Public
77 * License. You may obtain a copy of the GNU General Public License
arch/arm/boot/dts/spear310.dtsi+1−1
@@ -1,7 +1,7 @@
11 /*
22 * DTS file for SPEAr310 SoC
33 *
4− * Copyright 2012 Viresh Kumar <viresh.kumar@st.com>
4+ * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com>
55 *
66 * The code contained herein is licensed under the GNU General Public
77 * License. You may obtain a copy of the GNU General Public License
arch/arm/boot/dts/spear320-evb.dts+1−1
@@ -1,7 +1,7 @@
11 /*
22 * DTS file for SPEAr320 Evaluation Baord
33 *
4− * Copyright 2012 Viresh Kumar <viresh.kumar@st.com>
4+ * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com>
55 *
66 * The code contained herein is licensed under the GNU General Public
77 * License. You may obtain a copy of the GNU General Public License
arch/arm/boot/dts/spear320.dtsi+1−1
@@ -1,7 +1,7 @@
11 /*
22 * DTS file for SPEAr320 SoC
33 *
4− * Copyright 2012 Viresh Kumar <viresh.kumar@st.com>
4+ * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com>
55 *
66 * The code contained herein is licensed under the GNU General Public
77 * License. You may obtain a copy of the GNU General Public License
arch/arm/boot/dts/spear3xx.dtsi+1−1
@@ -1,7 +1,7 @@
11 /*
22 * DTS file for all SPEAr3xx SoCs
33 *
4− * Copyright 2012 Viresh Kumar <viresh.kumar@st.com>
4+ * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com>
55 *
66 * The code contained herein is licensed under the GNU General Public
77 * License. You may obtain a copy of the GNU General Public License
arch/arm/include/asm/futex.h+1−0
@@ -19,6 +19,7 @@ · 18 unmodified lines
1919 " .long 1b, 4f, 2b, 4f\n" \
2020 " .popsection\n" \
2121 " .pushsection .fixup,\"ax\"\n" \
22+ " .align 2\n" \
2223 "4: mov %0, " err_reg "\n" \
2324 " b 3b\n" \
2425 " .popsection"
arch/arm/include/asm/hardware/sp810.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * ARM PrimeXsys System Controller SP810 header file
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/kernel/entry-armv.S+1−0
@@ -495,6 +495,7 @@ ENDPROC(__und_usr) · 494 unmodified lines
495495 * The out of line fixup for the ldrt above.
496496 */
497497 .pushsection .fixup, "ax"
498+ .align 2
498499 4: mov pc, r9
499500 .popsection
500501 .pushsection __ex_table,"a"
arch/arm/kernel/kprobes-thumb.c+1−1
@@ -660,7 +660,7 @@ static const union decode_item t32_table_1111_100x[] = { · 659 unmodified lines
660660 /* LDRSB (literal) 1111 1001 x001 1111 xxxx xxxx xxxx xxxx */
661661 /* LDRH (literal) 1111 1000 x011 1111 xxxx xxxx xxxx xxxx */
662662 /* LDRSH (literal) 1111 1001 x011 1111 xxxx xxxx xxxx xxxx */
663− DECODE_EMULATEX (0xfe5f0000, 0xf81f0000, t32_simulate_ldr_literal,
663+ DECODE_SIMULATEX(0xfe5f0000, 0xf81f0000, t32_simulate_ldr_literal,
664664 REGS(PC, NOSPPCX, 0, 0, 0)),
665665
666666 /* STRB (immediate) 1111 1000 0000 xxxx xxxx 1xxx xxxx xxxx */
arch/arm/mach-highbank/Makefile+5−1
@@ -1,4 +1,8 @@
1−obj-y := clock.o highbank.o system.o
1+obj-y := clock.o highbank.o system.o smc.o
2+
3+plus_sec := $(call as-instr,.arch_extension sec,+sec)
4+AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec)
5+
26 obj-$(CONFIG_DEBUG_HIGHBANK_UART) += lluart.o
37 obj-$(CONFIG_SMP) += platsmp.o
48 obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
arch/arm/mach-highbank/core.h+1−0
@@ -8,3 +8,4 @@ extern void highbank_lluart_map_io(void); · 7 unmodified lines
88 static inline void highbank_lluart_map_io(void) {}
99 #endif
1010
11+extern void highbank_smc1(int fn, int arg);
arch/arm/mach-highbank/highbank.c+14−0
@@ -85,10 +85,24 @@ const static struct of_device_id irq_match[] = { · 84 unmodified lines
8585 {}
8686 };
8787
88+#ifdef CONFIG_CACHE_L2X0
89+static void highbank_l2x0_disable(void)
90+{
91+ /* Disable PL310 L2 Cache controller */
92+ highbank_smc1(0x102, 0x0);
93+}
94+#endif
95+
8896 static void __init highbank_init_irq(void)
8997 {
9098 of_irq_init(irq_match);
99+
100+#ifdef CONFIG_CACHE_L2X0
101+ /* Enable PL310 L2 Cache controller */
102+ highbank_smc1(0x102, 0x1);
91103 l2x0_of_init(0, ~0UL);
104+ outer_cache.disable = highbank_l2x0_disable;
105+#endif
92106 }
93107
94108 static void __init highbank_timer_init(void)
arch/arm/mach-highbank/smc.S+27−0
@@ -0,0 +1,27 @@
1+/*
2+ * Copied from omap44xx-smc.S Copyright (C) 2010 Texas Instruments, Inc.
3+ * Copyright 2012 Calxeda, Inc.
4+ *
5+ * This program is free software,you can redistribute it and/or modify
6+ * it under the terms of the GNU General Public License version 2 as
7+ * published by the Free Software Foundation.
8+ */
9+
10+#include <linux/linkage.h>
11+
12+/*
13+ * This is common routine to manage secure monitor API
14+ * used to modify the PL310 secure registers.
15+ * 'r0' contains the value to be modified and 'r12' contains
16+ * the monitor API number.
17+ * Function signature : void highbank_smc1(u32 fn, u32 arg)
18+ */
19+
20+ENTRY(highbank_smc1)
21+ stmfd sp!, {r4-r11, lr}
22+ mov r12, r0
23+ mov r0, r1
24+ dsb
25+ smc #0
26+ ldmfd sp!, {r4-r11, pc}
27+ENDPROC(highbank_smc1)
arch/arm/mach-imx/Kconfig+1−0
@@ -477,6 +477,7 @@ config MACH_MX31_3DS · 476 unmodified lines
477477 select IMX_HAVE_PLATFORM_IMX2_WDT
478478 select IMX_HAVE_PLATFORM_IMX_I2C
479479 select IMX_HAVE_PLATFORM_IMX_KEYPAD
480+ select IMX_HAVE_PLATFORM_IMX_SSI
480481 select IMX_HAVE_PLATFORM_IMX_UART
481482 select IMX_HAVE_PLATFORM_IPU_CORE
482483 select IMX_HAVE_PLATFORM_MXC_EHCI
arch/arm/mach-imx/clk-imx1.c+1−2
@@ -108,8 +108,7 @@ int __init mx1_clocks_init(unsigned long fref) · 107 unmodified lines
108108 clk_register_clkdev(clk[clk32], NULL, "mxc_rtc.0");
109109 clk_register_clkdev(clk[clko], "clko", NULL);
110110
111− mxc_timer_init(NULL, MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR),
112− MX1_TIM1_INT);
111+ mxc_timer_init(MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), MX1_TIM1_INT);
113112
114113 return 0;
115114 }
arch/arm/mach-imx/clk-imx21.c+2−2
@@ -180,7 +180,7 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href) · 179 unmodified lines
180180 clk_register_clkdev(clk[sdhc1_ipg_gate], "sdhc1", NULL);
181181 clk_register_clkdev(clk[sdhc2_ipg_gate], "sdhc2", NULL);
182182
183− mxc_timer_init(NULL, MX21_IO_ADDRESS(MX21_GPT1_BASE_ADDR),
184− MX21_INT_GPT1);
183+ mxc_timer_init(MX21_IO_ADDRESS(MX21_GPT1_BASE_ADDR), MX21_INT_GPT1);
184+
185185 return 0;
186186 }
arch/arm/mach-imx/clk-imx25.c+1−1
@@ -243,6 +243,6 @@ int __init mx25_clocks_init(void) · 242 unmodified lines
243243 clk_register_clkdev(clk[sdma_ahb], "ahb", "imx35-sdma");
244244 clk_register_clkdev(clk[iim_ipg], "iim", NULL);
245245
246− mxc_timer_init(NULL, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54);
246+ mxc_timer_init(MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54);
247247 return 0;
248248 }
arch/arm/mach-imx/clk-imx27.c+1−2
@@ -263,8 +263,7 @@ int __init mx27_clocks_init(unsigned long fref) · 262 unmodified lines
263263 clk_register_clkdev(clk[ssi1_baud_gate], "bitrate" , "imx-ssi.0");
264264 clk_register_clkdev(clk[ssi2_baud_gate], "bitrate" , "imx-ssi.1");
265265
266− mxc_timer_init(NULL, MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR),
267− MX27_INT_GPT1);
266+ mxc_timer_init(MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR), MX27_INT_GPT1);
268267
269268 clk_prepare_enable(clk[emi_ahb_gate]);
270269
arch/arm/mach-imx/clk-imx31.c+1−2
@@ -175,8 +175,7 @@ int __init mx31_clocks_init(unsigned long fref) · 174 unmodified lines
175175 mx31_revision();
176176 clk_disable_unprepare(clk[iim_gate]);
177177
178− mxc_timer_init(NULL, MX31_IO_ADDRESS(MX31_GPT1_BASE_ADDR),
179− MX31_INT_GPT);
178+ mxc_timer_init(MX31_IO_ADDRESS(MX31_GPT1_BASE_ADDR), MX31_INT_GPT);
180179
181180 return 0;
182181 }
arch/arm/mach-imx/clk-imx35.c+2−4
@@ -267,11 +267,9 @@ int __init mx35_clocks_init() · 266 unmodified lines
267267 imx_print_silicon_rev("i.MX35", mx35_revision());
268268
269269 #ifdef CONFIG_MXC_USE_EPIT
270− epit_timer_init(&epit1_clk,
271− MX35_IO_ADDRESS(MX35_EPIT1_BASE_ADDR), MX35_INT_EPIT1);
270+ epit_timer_init(MX35_IO_ADDRESS(MX35_EPIT1_BASE_ADDR), MX35_INT_EPIT1);
272271 #else
273− mxc_timer_init(NULL, MX35_IO_ADDRESS(MX35_GPT1_BASE_ADDR),
274− MX35_INT_GPT);
272+ mxc_timer_init(MX35_IO_ADDRESS(MX35_GPT1_BASE_ADDR), MX35_INT_GPT);
275273 #endif
276274
277275 return 0;
arch/arm/mach-imx/clk-imx51-imx53.c+5−7
@@ -104,12 +104,12 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, · 103 unmodified lines
104104 periph_apm_sel, ARRAY_SIZE(periph_apm_sel));
105105 clk[main_bus] = imx_clk_mux("main_bus", MXC_CCM_CBCDR, 25, 1,
106106 main_bus_sel, ARRAY_SIZE(main_bus_sel));
107− clk[per_lp_apm] = imx_clk_mux("per_lp_apm", MXC_CCM_CBCDR, 1, 1,
107+ clk[per_lp_apm] = imx_clk_mux("per_lp_apm", MXC_CCM_CBCMR, 1, 1,
108108 per_lp_apm_sel, ARRAY_SIZE(per_lp_apm_sel));
109109 clk[per_pred1] = imx_clk_divider("per_pred1", "per_lp_apm", MXC_CCM_CBCDR, 6, 2);
110110 clk[per_pred2] = imx_clk_divider("per_pred2", "per_pred1", MXC_CCM_CBCDR, 3, 3);
111111 clk[per_podf] = imx_clk_divider("per_podf", "per_pred2", MXC_CCM_CBCDR, 0, 3);
112− clk[per_root] = imx_clk_mux("per_root", MXC_CCM_CBCDR, 1, 0,
112+ clk[per_root] = imx_clk_mux("per_root", MXC_CCM_CBCMR, 0, 1,
113113 per_root_sel, ARRAY_SIZE(per_root_sel));
114114 clk[ahb] = imx_clk_divider("ahb", "main_bus", MXC_CCM_CBCDR, 10, 3);
115115 clk[ahb_max] = imx_clk_gate2("ahb_max", "ahb", MXC_CCM_CCGR0, 28);
@@ -172,7 +172,7 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, · 56 unmodified lines
172172 clk[pwm1_hf_gate] = imx_clk_gate2("pwm1_hf_gate", "ipg", MXC_CCM_CCGR2, 12);
173173 clk[pwm2_ipg_gate] = imx_clk_gate2("pwm2_ipg_gate", "ipg", MXC_CCM_CCGR2, 14);
174174 clk[pwm2_hf_gate] = imx_clk_gate2("pwm2_hf_gate", "ipg", MXC_CCM_CCGR2, 16);
175− clk[gpt_gate] = imx_clk_gate2("gpt_gate", "ipg", MXC_CCM_CCGR2, 18);
175+ clk[gpt_gate] = imx_clk_gate2("gpt_gate", "per_root", MXC_CCM_CCGR2, 18);
176176 clk[fec_gate] = imx_clk_gate2("fec_gate", "ipg", MXC_CCM_CCGR2, 24);
177177 clk[usboh3_gate] = imx_clk_gate2("usboh3_gate", "ipg", MXC_CCM_CCGR2, 26);
178178 clk[usboh3_per_gate] = imx_clk_gate2("usboh3_per_gate", "usboh3_podf", MXC_CCM_CCGR2, 28);
@@ -366,8 +366,7 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, · 187 unmodified lines
366366 clk_set_rate(clk[esdhc_b_podf], 166250000);
367367
368368 /* System timer */
369− mxc_timer_init(NULL, MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR),
370− MX51_INT_GPT);
369+ mxc_timer_init(MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR), MX51_INT_GPT);
371370
372371 clk_prepare_enable(clk[iim_gate]);
373372 imx_print_silicon_rev("i.MX51", mx51_revision());
@@ -452,8 +451,7 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, · 78 unmodified lines
452451 clk_set_rate(clk[esdhc_b_podf], 200000000);
453452
454453 /* System timer */
455− mxc_timer_init(NULL, MX53_IO_ADDRESS(MX53_GPT1_BASE_ADDR),
456− MX53_INT_GPT);
454+ mxc_timer_init(MX53_IO_ADDRESS(MX53_GPT1_BASE_ADDR), MX53_INT_GPT);
457455
458456 clk_prepare_enable(clk[iim_gate]);
459457 imx_print_silicon_rev("i.MX53", mx53_revision());
arch/arm/mach-imx/clk-imx6q.c+7−15
@@ -122,10 +122,6 @@ static const char *cko1_sels[] = { "pll3_usb_otg", "pll2_bus", "pll1_sys", "pll5 · 121 unmodified lines
122122 "dummy", "axi", "enfc", "ipu1_di0", "ipu1_di1", "ipu2_di0",
123123 "ipu2_di1", "ahb", "ipg", "ipg_per", "ckil", "pll4_audio", };
124124
125−static const char * const clks_init_on[] __initconst = {
126− "mmdc_ch0_axi", "mmdc_ch1_axi", "usboh3",
127−};
128−
129125 enum mx6q_clks {
130126 dummy, ckil, ckih, osc, pll2_pfd0_352m, pll2_pfd1_594m, pll2_pfd2_396m,
131127 pll3_pfd0_720m, pll3_pfd1_540m, pll3_pfd2_508m, pll3_pfd3_454m,
@@ -161,11 +157,14 @@ enum mx6q_clks { · 29 unmodified lines
161157
162158 static struct clk *clk[clk_max];
163159
160+static enum mx6q_clks const clks_init_on[] __initconst = {
161+ mmdc_ch0_axi, mmdc_ch1_axi,
162+};
163+
164164 int __init mx6q_clocks_init(void)
165165 {
166166 struct device_node *np;
167167 void __iomem *base;
168− struct clk *c;
169168 int i, irq;
170169
171170 clk[dummy] = imx_clk_fixed("dummy", 0);
@@ -424,21 +423,14 @@ int __init mx6q_clocks_init(void) · 252 unmodified lines
424423 clk_register_clkdev(clk[ahb], "ahb", NULL);
425424 clk_register_clkdev(clk[cko1], "cko1", NULL);
426425
427− for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) {
428− c = clk_get_sys(clks_init_on[i], NULL);
429− if (IS_ERR(c)) {
430− pr_err("%s: failed to get clk %s", __func__,
431− clks_init_on[i]);
432− return PTR_ERR(c);
433− }
434− clk_prepare_enable(c);
435− }
426+ for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
427+ clk_prepare_enable(clk[clks_init_on[i]]);
436428
437429 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt");
438430 base = of_iomap(np, 0);
439431 WARN_ON(!base);
440432 irq = irq_of_parse_and_map(np, 0);
441− mxc_timer_init(NULL, base, irq);
433+ mxc_timer_init(base, irq);
442434
443435 return 0;
444436 }
arch/arm/mach-imx/clk-pllv2.c+55−38
@@ -74,30 +74,15 @@ struct clk_pllv2 { · 73 unmodified lines
7474 void __iomem *base;
7575 };
7676
77−static unsigned long clk_pllv2_recalc_rate(struct clk_hw *hw,
78− unsigned long parent_rate)
77+static unsigned long __clk_pllv2_recalc_rate(unsigned long parent_rate,
78+ u32 dp_ctl, u32 dp_op, u32 dp_mfd, u32 dp_mfn)
7979 {
8080 long mfi, mfn, mfd, pdf, ref_clk, mfn_abs;
81− unsigned long dp_op, dp_mfd, dp_mfn, dp_ctl, pll_hfsm, dbl;
82− void __iomem *pllbase;
81+ unsigned long dbl;
8382 s64 temp;
84− struct clk_pllv2 *pll = to_clk_pllv2(hw);
85−
86− pllbase = pll->base;
8783
88− dp_ctl = __raw_readl(pllbase + MXC_PLL_DP_CTL);
89− pll_hfsm = dp_ctl & MXC_PLL_DP_CTL_HFSM;
9084 dbl = dp_ctl & MXC_PLL_DP_CTL_DPDCK0_2_EN;
9185
92− if (pll_hfsm == 0) {
93− dp_op = __raw_readl(pllbase + MXC_PLL_DP_OP);
94− dp_mfd = __raw_readl(pllbase + MXC_PLL_DP_MFD);
95− dp_mfn = __raw_readl(pllbase + MXC_PLL_DP_MFN);
96− } else {
97− dp_op = __raw_readl(pllbase + MXC_PLL_DP_HFS_OP);
98− dp_mfd = __raw_readl(pllbase + MXC_PLL_DP_HFS_MFD);
99− dp_mfn = __raw_readl(pllbase + MXC_PLL_DP_HFS_MFN);
100− }
10186 pdf = dp_op & MXC_PLL_DP_OP_PDF_MASK;
10287 mfi = (dp_op & MXC_PLL_DP_OP_MFI_MASK) >> MXC_PLL_DP_OP_MFI_OFFSET;
10388 mfi = (mfi <= 5) ? 5 : mfi;
@@ -123,18 +108,30 @@ static unsigned long clk_pllv2_recalc_rate(struct clk_hw *hw, · 19 unmodified lines
123108 return temp;
124109 }
125110
126−static int clk_pllv2_set_rate(struct clk_hw *hw, unsigned long rate,
111+static unsigned long clk_pllv2_recalc_rate(struct clk_hw *hw,
127112 unsigned long parent_rate)
128113 {
114+ u32 dp_op, dp_mfd, dp_mfn, dp_ctl;
115+ void __iomem *pllbase;
129116 struct clk_pllv2 *pll = to_clk_pllv2(hw);
117+
118+ pllbase = pll->base;
119+
120+ dp_ctl = __raw_readl(pllbase + MXC_PLL_DP_CTL);
121+ dp_op = __raw_readl(pllbase + MXC_PLL_DP_OP);
122+ dp_mfd = __raw_readl(pllbase + MXC_PLL_DP_MFD);
123+ dp_mfn = __raw_readl(pllbase + MXC_PLL_DP_MFN);
124+
125+ return __clk_pllv2_recalc_rate(parent_rate, dp_ctl, dp_op, dp_mfd, dp_mfn);
126+}
127+
128+static int __clk_pllv2_set_rate(unsigned long rate, unsigned long parent_rate,
129+ u32 *dp_op, u32 *dp_mfd, u32 *dp_mfn)
130+{
130131 u32 reg;
131− void __iomem *pllbase;
132132 long mfi, pdf, mfn, mfd = 999999;
133133 s64 temp64;
134134 unsigned long quad_parent_rate;
135− unsigned long pll_hfsm, dp_ctl;
136−
137− pllbase = pll->base;
138135
139136 quad_parent_rate = 4 * parent_rate;
140137 pdf = mfi = -1;
@@ -144,25 +141,41 @@ static int clk_pllv2_set_rate(struct clk_hw *hw, unsigned long rate, · 3 unmodified lines
144141 return -EINVAL;
145142 pdf--;
146143
147− temp64 = rate * (pdf+1) - quad_parent_rate * mfi;
148− do_div(temp64, quad_parent_rate/1000000);
144+ temp64 = rate * (pdf + 1) - quad_parent_rate * mfi;
145+ do_div(temp64, quad_parent_rate / 1000000);
149146 mfn = (long)temp64;
150147
148+ reg = mfi << 4 | pdf;
149+
150+ *dp_op = reg;
151+ *dp_mfd = mfd;
152+ *dp_mfn = mfn;
153+
154+ return 0;
155+}
156+
157+static int clk_pllv2_set_rate(struct clk_hw *hw, unsigned long rate,
158+ unsigned long parent_rate)
159+{
160+ struct clk_pllv2 *pll = to_clk_pllv2(hw);
161+ void __iomem *pllbase;
162+ u32 dp_ctl, dp_op, dp_mfd, dp_mfn;
163+ int ret;
164+
165+ pllbase = pll->base;
166+
167+
168+ ret = __clk_pllv2_set_rate(rate, parent_rate, &dp_op, &dp_mfd, &dp_mfn);
169+ if (ret)
170+ return ret;
171+
151172 dp_ctl = __raw_readl(pllbase + MXC_PLL_DP_CTL);
152173 /* use dpdck0_2 */
153174 __raw_writel(dp_ctl | 0x1000L, pllbase + MXC_PLL_DP_CTL);
154− pll_hfsm = dp_ctl & MXC_PLL_DP_CTL_HFSM;
155− if (pll_hfsm == 0) {
156− reg = mfi << 4 | pdf;
157− __raw_writel(reg, pllbase + MXC_PLL_DP_OP);
158− __raw_writel(mfd, pllbase + MXC_PLL_DP_MFD);
159− __raw_writel(mfn, pllbase + MXC_PLL_DP_MFN);
160− } else {
161− reg = mfi << 4 | pdf;
162− __raw_writel(reg, pllbase + MXC_PLL_DP_HFS_OP);
163− __raw_writel(mfd, pllbase + MXC_PLL_DP_HFS_MFD);
164− __raw_writel(mfn, pllbase + MXC_PLL_DP_HFS_MFN);
165− }
175+
176+ __raw_writel(dp_op, pllbase + MXC_PLL_DP_OP);
177+ __raw_writel(dp_mfd, pllbase + MXC_PLL_DP_MFD);
178+ __raw_writel(dp_mfn, pllbase + MXC_PLL_DP_MFN);
166179
167180 return 0;
168181 }
@@ -170,7 +183,11 @@ static int clk_pllv2_set_rate(struct clk_hw *hw, unsigned long rate, · 1 unmodified line
170183 static long clk_pllv2_round_rate(struct clk_hw *hw, unsigned long rate,
171184 unsigned long *prate)
172185 {
173− return rate;
186+ u32 dp_op, dp_mfd, dp_mfn;
187+
188+ __clk_pllv2_set_rate(rate, *prate, &dp_op, &dp_mfd, &dp_mfn);
189+ return __clk_pllv2_recalc_rate(*prate, MXC_PLL_DP_CTL_DPDCK0_2_EN,
190+ dp_op, dp_mfd, dp_mfn);
174191 }
175192
176193 static int clk_pllv2_prepare(struct clk_hw *hw)
arch/arm/mach-imx/crm-regs-imx5.h+1−1
@@ -23,7 +23,7 @@ · 22 unmodified lines
2323 #define MX53_DPLL1_BASE MX53_IO_ADDRESS(MX53_PLL1_BASE_ADDR)
2424 #define MX53_DPLL2_BASE MX53_IO_ADDRESS(MX53_PLL2_BASE_ADDR)
2525 #define MX53_DPLL3_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR)
26−#define MX53_DPLL4_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR)
26+#define MX53_DPLL4_BASE MX53_IO_ADDRESS(MX53_PLL4_BASE_ADDR)
2727
2828 /* PLL Register Offsets */
2929 #define MXC_PLL_DP_CTL 0x00
arch/arm/mach-imx/hotplug.c+41−1
@@ -12,6 +12,7 @@ · 11 unmodified lines
1212
1313 #include <linux/errno.h>
1414 #include <asm/cacheflush.h>
15+#include <asm/cp15.h>
1516 #include <mach/common.h>
1617
1718 int platform_cpu_kill(unsigned int cpu)
@@ -19,6 +20,44 @@ int platform_cpu_kill(unsigned int cpu) · 1 unmodified line
1920 return 1;
2021 }
2122
23+static inline void cpu_enter_lowpower(void)
24+{
25+ unsigned int v;
26+
27+ flush_cache_all();
28+ asm volatile(
29+ "mcr p15, 0, %1, c7, c5, 0\n"
30+ " mcr p15, 0, %1, c7, c10, 4\n"
31+ /*
32+ * Turn off coherency
33+ */
34+ " mrc p15, 0, %0, c1, c0, 1\n"
35+ " bic %0, %0, %3\n"
36+ " mcr p15, 0, %0, c1, c0, 1\n"
37+ " mrc p15, 0, %0, c1, c0, 0\n"
38+ " bic %0, %0, %2\n"
39+ " mcr p15, 0, %0, c1, c0, 0\n"
40+ : "=&r" (v)
41+ : "r" (0), "Ir" (CR_C), "Ir" (0x40)
42+ : "cc");
43+}
44+
45+static inline void cpu_leave_lowpower(void)
46+{
47+ unsigned int v;
48+
49+ asm volatile(
50+ "mrc p15, 0, %0, c1, c0, 0\n"
51+ " orr %0, %0, %1\n"
52+ " mcr p15, 0, %0, c1, c0, 0\n"
53+ " mrc p15, 0, %0, c1, c0, 1\n"
54+ " orr %0, %0, %2\n"
55+ " mcr p15, 0, %0, c1, c0, 1\n"
56+ : "=&r" (v)
57+ : "Ir" (CR_C), "Ir" (0x40)
58+ : "cc");
59+}
60+
2261 /*
2362 * platform-specific code to shutdown a CPU
2463 *
@@ -26,9 +65,10 @@ int platform_cpu_kill(unsigned int cpu) · 1 unmodified line
2665 */
2766 void platform_cpu_die(unsigned int cpu)
2867 {
29− flush_cache_all();
68+ cpu_enter_lowpower();
3069 imx_enable_cpu(cpu, false);
3170 cpu_do_idle();
71+ cpu_leave_lowpower();
3272
3373 /* We should never return from idle */
3474 panic("cpu %d unexpectedly exit from shutdown\n", cpu);
arch/arm/mach-imx/mach-cpuimx35.c+0−1
@@ -70,7 +70,6 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { · 69 unmodified lines
7070 I2C_BOARD_INFO("pcf8563", 0x51),
7171 }, {
7272 I2C_BOARD_INFO("tsc2007", 0x48),
73− .type = "tsc2007",
7473 .platform_data = &tsc2007_info,
7574 .irq = IMX_GPIO_TO_IRQ(TSC2007_IRQGPIO),
7675 },
arch/arm/mach-imx/mach-cpuimx51sd.c+0−1
@@ -142,7 +142,6 @@ static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = { · 141 unmodified lines
142142 I2C_BOARD_INFO("pcf8563", 0x51),
143143 }, {
144144 I2C_BOARD_INFO("tsc2007", 0x49),
145− .type = "tsc2007",
146145 .platform_data = &tsc2007_info,
147146 },
148147 };
arch/arm/mach-imx/mach-imx27_visstrim_m10.c+25−11
@@ -116,6 +116,8 @@ static const int visstrim_m10_pins[] __initconst = { · 115 unmodified lines
116116 PB23_PF_USB_PWR,
117117 PB24_PF_USB_OC,
118118 /* CSI */
119+ TVP5150_RSTN | GPIO_GPIO | GPIO_OUT,
120+ TVP5150_PWDN | GPIO_GPIO | GPIO_OUT,
119121 PB10_PF_CSI_D0,
120122 PB11_PF_CSI_D1,
121123 PB12_PF_CSI_D2,
@@ -147,6 +149,24 @@ static struct gpio visstrim_m10_version_gpios[] = { · 25 unmodified lines
147149 { MOTHERBOARD_BIT2, GPIOF_IN, "mother-version-2" },
148150 };
149151
152+static const struct gpio visstrim_m10_gpios[] __initconst = {
153+ {
154+ .gpio = TVP5150_RSTN,
155+ .flags = GPIOF_DIR_OUT | GPIOF_INIT_HIGH,
156+ .label = "tvp5150_rstn",
157+ },
158+ {
159+ .gpio = TVP5150_PWDN,
160+ .flags = GPIOF_DIR_OUT | GPIOF_INIT_LOW,
161+ .label = "tvp5150_pwdn",
162+ },
163+ {
164+ .gpio = OTG_PHY_CS_GPIO,
165+ .flags = GPIOF_DIR_OUT | GPIOF_INIT_LOW,
166+ .label = "usbotg_cs",
167+ },
168+};
169+
150170 /* Camera */
151171 static int visstrim_camera_power(struct device *dev, int on)
152172 {
@@ -190,13 +210,6 @@ static void __init visstrim_camera_init(void) · 37 unmodified lines
190210 struct platform_device *pdev;
191211 int dma;
192212
193− /* Initialize tvp5150 gpios */
194− mxc_gpio_mode(TVP5150_RSTN | GPIO_GPIO | GPIO_OUT);
195− mxc_gpio_mode(TVP5150_PWDN | GPIO_GPIO | GPIO_OUT);
196− gpio_set_value(TVP5150_RSTN, 1);
197− gpio_set_value(TVP5150_PWDN, 0);
198− ndelay(1);
199−
200213 gpio_set_value(TVP5150_PWDN, 1);
201214 ndelay(1);
202215 gpio_set_value(TVP5150_RSTN, 0);
@@ -377,10 +390,6 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = { · 174 unmodified lines
377390 /* USB OTG */
378391 static int otg_phy_init(struct platform_device *pdev)
379392 {
380− gpio_set_value(OTG_PHY_CS_GPIO, 0);
381−
382− mdelay(10);
383−
384393 return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
385394 }
386395
@@ -435,6 +444,11 @@ static void __init visstrim_m10_board_init(void) · 48 unmodified lines
435444 if (ret)
436445 pr_err("Failed to setup pins (%d)\n", ret);
437446
447+ ret = gpio_request_array(visstrim_m10_gpios,
448+ ARRAY_SIZE(visstrim_m10_gpios));
449+ if (ret)
450+ pr_err("Failed to request gpios (%d)\n", ret);
451+
438452 imx27_add_imx_ssi(0, &visstrim_m10_ssi_pdata);
439453 imx27_add_imx_uart0(&uart_pdata);
440454
arch/arm/mach-imx/mach-mx21ads.c+1−1
@@ -32,7 +32,7 @@ · 31 unmodified lines
3232 * Memory-mapped I/O on MX21ADS base board
3333 */
3434 #define MX21ADS_MMIO_BASE_ADDR 0xf5000000
35−#define MX21ADS_MMIO_SIZE SZ_16M
35+#define MX21ADS_MMIO_SIZE 0xc00000
3636
3737 #define MX21ADS_REG_ADDR(offset) (void __force __iomem *) \
3838 (MX21ADS_MMIO_BASE_ADDR + (offset))
arch/arm/mach-imx/mm-imx3.c+4−0
@@ -86,6 +86,7 @@ static void __iomem *imx3_ioremap_caller(unsigned long phys_addr, size_t size, · 85 unmodified lines
8686
8787 void __init imx3_init_l2x0(void)
8888 {
89+#ifdef CONFIG_CACHE_L2X0
8990 void __iomem *l2x0_base;
9091 void __iomem *clkctl_base;
9192
@@ -115,6 +116,7 @@ void __init imx3_init_l2x0(void) · 23 unmodified lines
115116 }
116117
117118 l2x0_init(l2x0_base, 0x00030024, 0x00000000);
119+#endif
118120 }
119121
120122 #ifdef CONFIG_SOC_IMX31
@@ -179,6 +181,8 @@ void __init imx31_soc_init(void) · 58 unmodified lines
179181 mxc_register_gpio("imx31-gpio", 1, MX31_GPIO2_BASE_ADDR, SZ_16K, MX31_INT_GPIO2, 0);
180182 mxc_register_gpio("imx31-gpio", 2, MX31_GPIO3_BASE_ADDR, SZ_16K, MX31_INT_GPIO3, 0);
181183
184+ pinctrl_provide_dummies();
185+
182186 if (to_version == 1) {
183187 strncpy(imx31_sdma_pdata.fw_name, "sdma-imx31-to1.bin",
184188 strlen(imx31_sdma_pdata.fw_name));
arch/arm/mach-imx/mm-imx5.c+2−0
@@ -202,6 +202,8 @@ void __init imx51_soc_init(void) · 201 unmodified lines
202202 mxc_register_gpio("imx31-gpio", 2, MX51_GPIO3_BASE_ADDR, SZ_16K, MX51_INT_GPIO3_LOW, MX51_INT_GPIO3_HIGH);
203203 mxc_register_gpio("imx31-gpio", 3, MX51_GPIO4_BASE_ADDR, SZ_16K, MX51_INT_GPIO4_LOW, MX51_INT_GPIO4_HIGH);
204204
205+ pinctrl_provide_dummies();
206+
205207 /* i.mx51 has the i.mx35 type sdma */
206208 imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata);
207209
arch/arm/mach-kirkwood/board-iconnect.c+0−3
@@ -20,9 +20,6 @@ · 19 unmodified lines
2020 #include <linux/mv643xx_eth.h>
2121 #include <linux/gpio.h>
2222 #include <linux/leds.h>
23−#include <linux/spi/flash.h>
24−#include <linux/spi/spi.h>
25−#include <linux/spi/orion_spi.h>
2623 #include <linux/i2c.h>
2724 #include <linux/input.h>
2825 #include <linux/gpio_keys.h>
arch/arm/mach-kirkwood/common.c+8−1
@@ -159,6 +159,7 @@ static struct clk __init *clk_register_gate_fn(struct device *dev, · 158 unmodified lines
159159 gate_fn->gate.flags = clk_gate_flags;
160160 gate_fn->gate.lock = lock;
161161 gate_fn->gate.hw.init = &init;
162+ gate_fn->fn = fn;
162163
163164 /* ops is the gate ops, but with our disable function */
164165 if (clk_gate_fn_ops.disable != clk_gate_fn_disable) {
@@ -193,9 +194,11 @@ static struct clk __init *kirkwood_register_gate_fn(const char *name, · 28 unmodified lines
193194 bit_idx, 0, &gating_lock, fn);
194195 }
195196
197+static struct clk *ge0, *ge1;
198+
196199 void __init kirkwood_clk_init(void)
197200 {
198− struct clk *runit, *ge0, *ge1, *sata0, *sata1, *usb0, *sdio;
201+ struct clk *runit, *sata0, *sata1, *usb0, *sdio;
199202 struct clk *crypto, *xor0, *xor1, *pex0, *pex1, *audio;
200203
201204 tclk = clk_register_fixed_rate(NULL, "tclk", NULL,
@@ -257,6 +260,9 @@ void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data) · 55 unmodified lines
257260 orion_ge00_init(eth_data,
258261 GE00_PHYS_BASE, IRQ_KIRKWOOD_GE00_SUM,
259262 IRQ_KIRKWOOD_GE00_ERR);
263+ /* The interface forgets the MAC address assigned by u-boot if
264+ the clock is turned off, so claim the clk now. */
265+ clk_prepare_enable(ge0);
260266 }
261267
262268
@@ -268,6 +274,7 @@ void __init kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data) · 5 unmodified lines
268274 orion_ge01_init(eth_data,
269275 GE01_PHYS_BASE, IRQ_KIRKWOOD_GE01_SUM,
270276 IRQ_KIRKWOOD_GE01_ERR);
277+ clk_prepare_enable(ge1);
271278 }
272279
273280
arch/arm/mach-kirkwood/include/mach/bridge-regs.h+1−0
@@ -38,6 +38,7 @@ · 37 unmodified lines
3838 #define IRQ_MASK_HIGH_OFF 0x0014
3939
4040 #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
41+#define TIMER_PHYS_BASE (BRIDGE_PHYS_BASE | 0x0300)
4142
4243 #define L2_CONFIG_REG (BRIDGE_VIRT_BASE | 0x0128)
4344 #define L2_WRITETHROUGH 0x00000010
arch/arm/mach-kirkwood/include/mach/kirkwood.h+1−0
@@ -80,6 +80,7 @@ · 79 unmodified lines
8080 #define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
8181
8282 #define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000)
83+#define BRIDGE_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x20000)
8384
8485 #define CRYPTO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x30000)
8586
arch/arm/mach-mmp/irq.c+7−0
@@ -241,6 +241,7 @@ void __init mmp2_init_icu(void) · 240 unmodified lines
241241 icu_data[1].clr_mfp_irq_base = IRQ_MMP2_PMIC_BASE;
242242 icu_data[1].clr_mfp_hwirq = IRQ_MMP2_PMIC - IRQ_MMP2_PMIC_BASE;
243243 icu_data[1].nr_irqs = 2;
244+ icu_data[1].cascade_irq = 4;
244245 icu_data[1].virq_base = IRQ_MMP2_PMIC_BASE;
245246 icu_data[1].domain = irq_domain_add_legacy(NULL, icu_data[1].nr_irqs,
246247 icu_data[1].virq_base, 0,
@@ -249,6 +250,7 @@ void __init mmp2_init_icu(void) · 2 unmodified lines
249250 icu_data[2].reg_status = mmp_icu_base + 0x154;
250251 icu_data[2].reg_mask = mmp_icu_base + 0x16c;
251252 icu_data[2].nr_irqs = 2;
253+ icu_data[2].cascade_irq = 5;
252254 icu_data[2].virq_base = IRQ_MMP2_RTC_BASE;
253255 icu_data[2].domain = irq_domain_add_legacy(NULL, icu_data[2].nr_irqs,
254256 icu_data[2].virq_base, 0,
@@ -257,6 +259,7 @@ void __init mmp2_init_icu(void) · 2 unmodified lines
257259 icu_data[3].reg_status = mmp_icu_base + 0x180;
258260 icu_data[3].reg_mask = mmp_icu_base + 0x17c;
259261 icu_data[3].nr_irqs = 3;
262+ icu_data[3].cascade_irq = 9;
260263 icu_data[3].virq_base = IRQ_MMP2_KEYPAD_BASE;
261264 icu_data[3].domain = irq_domain_add_legacy(NULL, icu_data[3].nr_irqs,
262265 icu_data[3].virq_base, 0,
@@ -265,6 +268,7 @@ void __init mmp2_init_icu(void) · 2 unmodified lines
265268 icu_data[4].reg_status = mmp_icu_base + 0x158;
266269 icu_data[4].reg_mask = mmp_icu_base + 0x170;
267270 icu_data[4].nr_irqs = 5;
271+ icu_data[4].cascade_irq = 17;
268272 icu_data[4].virq_base = IRQ_MMP2_TWSI_BASE;
269273 icu_data[4].domain = irq_domain_add_legacy(NULL, icu_data[4].nr_irqs,
270274 icu_data[4].virq_base, 0,
@@ -273,6 +277,7 @@ void __init mmp2_init_icu(void) · 2 unmodified lines
273277 icu_data[5].reg_status = mmp_icu_base + 0x15c;
274278 icu_data[5].reg_mask = mmp_icu_base + 0x174;
275279 icu_data[5].nr_irqs = 15;
280+ icu_data[5].cascade_irq = 35;
276281 icu_data[5].virq_base = IRQ_MMP2_MISC_BASE;
277282 icu_data[5].domain = irq_domain_add_legacy(NULL, icu_data[5].nr_irqs,
278283 icu_data[5].virq_base, 0,
@@ -281,6 +286,7 @@ void __init mmp2_init_icu(void) · 2 unmodified lines
281286 icu_data[6].reg_status = mmp_icu_base + 0x160;
282287 icu_data[6].reg_mask = mmp_icu_base + 0x178;
283288 icu_data[6].nr_irqs = 2;
289+ icu_data[6].cascade_irq = 51;
284290 icu_data[6].virq_base = IRQ_MMP2_MIPI_HSI1_BASE;
285291 icu_data[6].domain = irq_domain_add_legacy(NULL, icu_data[6].nr_irqs,
286292 icu_data[6].virq_base, 0,
@@ -289,6 +295,7 @@ void __init mmp2_init_icu(void) · 2 unmodified lines
289295 icu_data[7].reg_status = mmp_icu_base + 0x188;
290296 icu_data[7].reg_mask = mmp_icu_base + 0x184;
291297 icu_data[7].nr_irqs = 2;
298+ icu_data[7].cascade_irq = 55;
292299 icu_data[7].virq_base = IRQ_MMP2_MIPI_HSI0_BASE;
293300 icu_data[7].domain = irq_domain_add_legacy(NULL, icu_data[7].nr_irqs,
294301 icu_data[7].virq_base, 0,
arch/arm/mach-omap2/board-n8x0.c+2−4
@@ -83,11 +83,9 @@ static struct musb_hdrc_config musb_config = { · 82 unmodified lines
8383 };
8484
8585 static struct musb_hdrc_platform_data tusb_data = {
86−#if defined(CONFIG_USB_MUSB_OTG)
86+#ifdef CONFIG_USB_GADGET_MUSB_HDRC
8787 .mode = MUSB_OTG,
88−#elif defined(CONFIG_USB_MUSB_PERIPHERAL)
89− .mode = MUSB_PERIPHERAL,
90−#else /* defined(CONFIG_USB_MUSB_HOST) */
88+#else
9189 .mode = MUSB_HOST,
9290 #endif
9391 .set_power = tusb_set_power,
arch/arm/mach-omap2/board-omap3beagle.c+12−16
@@ -81,13 +81,13 @@ static u8 omap3_beagle_version; · 80 unmodified lines
8181 static struct {
8282 int mmc1_gpio_wp;
8383 int usb_pwr_level;
84− int reset_gpio;
84+ int dvi_pd_gpio;
8585 int usr_button_gpio;
8686 int mmc_caps;
8787 } beagle_config = {
8888 .mmc1_gpio_wp = -EINVAL,
8989 .usb_pwr_level = GPIOF_OUT_INIT_LOW,
90− .reset_gpio = 129,
90+ .dvi_pd_gpio = -EINVAL,
9191 .usr_button_gpio = 4,
9292 .mmc_caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
9393 };
@@ -126,21 +126,21 @@ static void __init omap3_beagle_init_rev(void) · 32 unmodified lines
126126 printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n");
127127 omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX;
128128 beagle_config.mmc1_gpio_wp = 29;
129− beagle_config.reset_gpio = 170;
129+ beagle_config.dvi_pd_gpio = 170;
130130 beagle_config.usr_button_gpio = 7;
131131 break;
132132 case 6:
133133 printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
134134 omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3;
135135 beagle_config.mmc1_gpio_wp = 23;
136− beagle_config.reset_gpio = 170;
136+ beagle_config.dvi_pd_gpio = 170;
137137 beagle_config.usr_button_gpio = 7;
138138 break;
139139 case 5:
140140 printk(KERN_INFO "OMAP3 Beagle Rev: C4\n");
141141 omap3_beagle_version = OMAP3BEAGLE_BOARD_C4;
142142 beagle_config.mmc1_gpio_wp = 23;
143− beagle_config.reset_gpio = 170;
143+ beagle_config.dvi_pd_gpio = 170;
144144 beagle_config.usr_button_gpio = 7;
145145 break;
146146 case 0:
@@ -274,11 +274,9 @@ static int beagle_twl_gpio_setup(struct device *dev, · 127 unmodified lines
274274 if (r)
275275 pr_err("%s: unable to configure nDVI_PWR_EN\n",
276276 __func__);
277− r = gpio_request_one(gpio + 2, GPIOF_OUT_INIT_HIGH,
278− "DVI_LDO_EN");
279− if (r)
280− pr_err("%s: unable to configure DVI_LDO_EN\n",
281− __func__);
277+
278+ beagle_config.dvi_pd_gpio = gpio + 2;
279+
282280 } else {
283281 /*
284282 * REVISIT: need ehci-omap hooks for external VBUS
@@ -287,7 +285,7 @@ static int beagle_twl_gpio_setup(struct device *dev, · 2 unmodified lines
287285 if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC"))
288286 pr_err("%s: unable to configure EHCI_nOC\n", __func__);
289287 }
290− dvi_panel.power_down_gpio = beagle_config.reset_gpio;
288+ dvi_panel.power_down_gpio = beagle_config.dvi_pd_gpio;
291289
292290 gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
293291 "nEN_USB_PWR");
@@ -499,7 +497,7 @@ static void __init omap3_beagle_init(void) · 205 unmodified lines
499497 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
500498 omap3_beagle_init_rev();
501499
502− if (beagle_config.mmc1_gpio_wp != -EINVAL)
500+ if (gpio_is_valid(beagle_config.mmc1_gpio_wp))
503501 omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
504502 mmc[0].caps = beagle_config.mmc_caps;
505503 omap_hsmmc_init(mmc);
@@ -510,15 +508,13 @@ static void __init omap3_beagle_init(void) · 4 unmodified lines
510508
511509 platform_add_devices(omap3_beagle_devices,
512510 ARRAY_SIZE(omap3_beagle_devices));
511+ if (gpio_is_valid(beagle_config.dvi_pd_gpio))
512+ omap_mux_init_gpio(beagle_config.dvi_pd_gpio, OMAP_PIN_OUTPUT);
513513 omap_display_init(&beagle_dss_data);
514514 omap_serial_init();
515515 omap_sdrc_init(mt46h32m32lf6_sdrc_params,
516516 mt46h32m32lf6_sdrc_params);
517517
518− omap_mux_init_gpio(170, OMAP_PIN_INPUT);
519− /* REVISIT leave DVI powered down until it's needed ... */
520− gpio_request_one(170, GPIOF_OUT_INIT_HIGH, "DVI_nPD");
521−
522518 usb_musb_init(NULL);
523519 usbhs_init(&usbhs_bdata);
524520 omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions,
arch/arm/mach-omap2/board-rx51-peripherals.c+4−2
@@ -144,7 +144,6 @@ static struct lis3lv02d_platform_data rx51_lis3lv02d_data = { · 143 unmodified lines
144144 .release_resources = lis302_release,
145145 .st_min_limits = {-32, 3, 3},
146146 .st_max_limits = {-3, 32, 32},
147− .irq2 = OMAP_GPIO_IRQ(LIS302_IRQ2_GPIO),
148147 };
149148 #endif
150149
@@ -1030,7 +1029,6 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_3[] = { · 879 unmodified lines
10301029 {
10311030 I2C_BOARD_INFO("lis3lv02d", 0x1d),
10321031 .platform_data = &rx51_lis3lv02d_data,
1033− .irq = OMAP_GPIO_IRQ(LIS302_IRQ1_GPIO),
10341032 },
10351033 #endif
10361034 };
@@ -1056,6 +1054,10 @@ static int __init rx51_i2c_init(void) · 19 unmodified lines
10561054 omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata);
10571055 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2,
10581056 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2));
1057+#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE)
1058+ rx51_lis3lv02d_data.irq2 = gpio_to_irq(LIS302_IRQ2_GPIO);
1059+ rx51_peripherals_i2c_board_info_3[0].irq = gpio_to_irq(LIS302_IRQ1_GPIO);
1060+#endif
10591061 omap_register_i2c_bus(3, 400, rx51_peripherals_i2c_board_info_3,
10601062 ARRAY_SIZE(rx51_peripherals_i2c_board_info_3));
10611063 return 0;
arch/arm/mach-omap2/clock3xxx_data.c+1−1
@@ -3514,7 +3514,7 @@ int __init omap3xxx_clk_init(void) · 3513 unmodified lines
35143514 struct omap_clk *c;
35153515 u32 cpu_clkflg = 0;
35163516
3517− if (cpu_is_omap3517()) {
3517+ if (soc_is_am35xx()) {
35183518 cpu_mask = RATE_IN_34XX;
35193519 cpu_clkflg = CK_AM35XX;
35203520 } else if (cpu_is_omap3630()) {
arch/arm/mach-omap2/clock44xx_data.c+5−0
@@ -84,6 +84,7 @@ static struct clk slimbus_clk = { · 83 unmodified lines
8484
8585 static struct clk sys_32k_ck = {
8686 .name = "sys_32k_ck",
87+ .clkdm_name = "prm_clkdm",
8788 .rate = 32768,
8889 .ops = &clkops_null,
8990 };
@@ -512,6 +513,7 @@ static struct clk ddrphy_ck = { · 422 unmodified lines
512513 .name = "ddrphy_ck",
513514 .parent = &dpll_core_m2_ck,
514515 .ops = &clkops_null,
516+ .clkdm_name = "l3_emif_clkdm",
515517 .fixed_div = 2,
516518 .recalc = &omap_fixed_divisor_recalc,
517519 };
@@ -769,6 +771,7 @@ static const struct clksel dpll_mpu_m2_div[] = { · 251 unmodified lines
769771 static struct clk dpll_mpu_m2_ck = {
770772 .name = "dpll_mpu_m2_ck",
771773 .parent = &dpll_mpu_ck,
774+ .clkdm_name = "cm_clkdm",
772775 .clksel = dpll_mpu_m2_div,
773776 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_MPU,
774777 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
@@ -1149,6 +1152,7 @@ static const struct clksel l3_div_div[] = { · 374 unmodified lines
11491152 static struct clk l3_div_ck = {
11501153 .name = "l3_div_ck",
11511154 .parent = &div_core_ck,
1155+ .clkdm_name = "cm_clkdm",
11521156 .clksel = l3_div_div,
11531157 .clksel_reg = OMAP4430_CM_CLKSEL_CORE,
11541158 .clksel_mask = OMAP4430_CLKSEL_L3_MASK,
@@ -2824,6 +2828,7 @@ static const struct clksel trace_clk_div_div[] = { · 1669 unmodified lines
28242828 static struct clk trace_clk_div_ck = {
28252829 .name = "trace_clk_div_ck",
28262830 .parent = &pmd_trace_clk_mux_ck,
2831+ .clkdm_name = "emu_sys_clkdm",
28272832 .clksel = trace_clk_div_div,
28282833 .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL,
28292834 .clksel_mask = OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK,
arch/arm/mach-omap2/cm.h+11−0
@@ -22,4 +22,15 @@ · 21 unmodified lines
2222 */
2323 #define MAX_MODULE_READY_TIME 2000
2424
25+/*
26+ * MAX_MODULE_DISABLE_TIME: max duration in microseconds to wait for
27+ * the PRCM to request that a module enter the inactive state in the
28+ * case of OMAP2 & 3. In the case of OMAP4 this is the max duration
29+ * in microseconds for the module to reach the inactive state from
30+ * a functional state.
31+ * XXX FSUSB on OMAP4430 takes ~4ms to idle after reset during
32+ * kernel init.
33+ */
34+#define MAX_MODULE_DISABLE_TIME 5000
35+
2536 #endif
arch/arm/mach-omap2/cminst44xx.c+2−2
@@ -313,9 +313,9 @@ int omap4_cminst_wait_module_idle(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_off · 312 unmodified lines
313313
314314 omap_test_timeout((_clkctrl_idlest(part, inst, cdoffs, clkctrl_offs) ==
315315 CLKCTRL_IDLEST_DISABLED),
316− MAX_MODULE_READY_TIME, i);
316+ MAX_MODULE_DISABLE_TIME, i);
317317
318− return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
318+ return (i < MAX_MODULE_DISABLE_TIME) ? 0 : -EBUSY;
319319 }
320320
321321 /**
arch/arm/mach-omap2/dsp.c+3−0
@@ -20,6 +20,9 @@ · 19 unmodified lines
2020
2121 #include <linux/module.h>
2222 #include <linux/platform_device.h>
23+
24+#include <asm/memblock.h>
25+
2326 #include "cm2xxx_3xxx.h"
2427 #include "prm2xxx_3xxx.h"
2528 #ifdef CONFIG_BRIDGE_DVFS
arch/arm/mach-omap2/id.c+11−0
@@ -246,6 +246,17 @@ void __init omap3xxx_check_features(void) · 245 unmodified lines
246246
247247 omap_features |= OMAP3_HAS_SDRC;
248248
249+ /*
250+ * am35x fixups:
251+ * - The am35x Chip ID register has bits 12, 7:5, and 3:2 marked as
252+ * reserved and therefore return 0 when read. Unfortunately,
253+ * OMAP3_CHECK_FEATURE() will interpret some of those zeroes to
254+ * mean that a feature is present even though it isn't so clear
255+ * the incorrectly set feature bits.
256+ */
257+ if (soc_is_am35xx())
258+ omap_features &= ~(OMAP3_HAS_IVA | OMAP3_HAS_ISP);
259+
249260 /*
250261 * TODO: Get additional info (where applicable)
251262 * e.g. Size of L2 cache.
arch/arm/mach-omap2/irq.c+1−0
@@ -149,6 +149,7 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) · 148 unmodified lines
149149 ct->chip.irq_ack = omap_mask_ack_irq;
150150 ct->chip.irq_mask = irq_gc_mask_disable_reg;
151151 ct->chip.irq_unmask = irq_gc_unmask_enable_reg;
152+ ct->chip.flags |= IRQCHIP_SKIP_SET_WAKE;
152153
153154 ct->regs.enable = INTC_MIR_CLEAR0;
154155 ct->regs.disable = INTC_MIR_SET0;
arch/arm/mach-omap2/mux.c+2−2
@@ -41,6 +41,7 @@ · 40 unmodified lines
4141 #include "control.h"
4242 #include "mux.h"
4343 #include "prm.h"
44+#include "common.h"
4445
4546 #define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */
4647 #define OMAP_MUX_BASE_SZ 0x5ca
@@ -217,8 +218,7 @@ static int __init _omap_mux_get_by_name(struct omap_mux_partition *partition, · 170 unmodified lines
217218 return -ENODEV;
218219 }
219220
220−static int __init
221−omap_mux_get_by_name(const char *muxname,
221+int __init omap_mux_get_by_name(const char *muxname,
222222 struct omap_mux_partition **found_partition,
223223 struct omap_mux **found_mux)
224224 {
arch/arm/mach-omap2/mux.h+11−0
@@ -59,6 +59,7 @@ · 58 unmodified lines
5959 #define OMAP_PIN_OFF_WAKEUPENABLE OMAP_WAKEUP_EN
6060
6161 #define OMAP_MODE_GPIO(x) (((x) & OMAP_MUX_MODE7) == OMAP_MUX_MODE4)
62+#define OMAP_MODE_UART(x) (((x) & OMAP_MUX_MODE7) == OMAP_MUX_MODE0)
6263
6364 /* Flags for omapX_mux_init */
6465 #define OMAP_PACKAGE_MASK 0xffff
@@ -225,8 +226,18 @@ omap_hwmod_mux_init(struct omap_device_pad *bpads, int nr_pads); · 160 unmodified lines
225226 */
226227 void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state);
227228
229+int omap_mux_get_by_name(const char *muxname,
230+ struct omap_mux_partition **found_partition,
231+ struct omap_mux **found_mux);
228232 #else
229233
234+static inline int omap_mux_get_by_name(const char *muxname,
235+ struct omap_mux_partition **found_partition,
236+ struct omap_mux **found_mux)
237+{
238+ return 0;
239+}
240+
230241 static inline int omap_mux_init_gpio(int gpio, int val)
231242 {
232243 return 0;
arch/arm/mach-omap2/omap_hwmod.c+1−1
@@ -530,7 +530,7 @@ static int _disable_wakeup(struct omap_hwmod *oh, u32 *v) · 529 unmodified lines
530530 if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)
531531 _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART, v);
532532 if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)
533− _set_master_standbymode(oh, HWMOD_IDLEMODE_SMART_WKUP, v);
533+ _set_master_standbymode(oh, HWMOD_IDLEMODE_SMART, v);
534534
535535 /* XXX test pwrdm_get_wken for this hwmod's subsystem */
536536
arch/arm/mach-omap2/omap_hwmod_44xx_data.c+6−2
@@ -393,8 +393,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_counter_sysc = { · 392 unmodified lines
393393 .rev_offs = 0x0000,
394394 .sysc_offs = 0x0004,
395395 .sysc_flags = SYSC_HAS_SIDLEMODE,
396− .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
397− SIDLE_SMART_WKUP),
396+ .idlemodes = (SIDLE_FORCE | SIDLE_NO),
398397 .sysc_fields = &omap_hwmod_sysc_type1,
399398 };
400399
@@ -854,6 +853,11 @@ static struct omap_hwmod omap44xx_dss_hdmi_hwmod = { · 453 unmodified lines
854853 .name = "dss_hdmi",
855854 .class = &omap44xx_hdmi_hwmod_class,
856855 .clkdm_name = "l3_dss_clkdm",
856+ /*
857+ * HDMI audio requires to use no-idle mode. Hence,
858+ * set idle mode by software.
859+ */
860+ .flags = HWMOD_SWSUP_SIDLE,
857861 .mpu_irqs = omap44xx_dss_hdmi_irqs,
858862 .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs,
859863 .main_clk = "dss_48mhz_clk",
arch/arm/mach-omap2/omap_l3_smx.c+2−1
@@ -155,10 +155,11 @@ static irqreturn_t omap3_l3_block_irq(struct omap3_l3 *l3, · 154 unmodified lines
155155 u8 multi = error & L3_ERROR_LOG_MULTI;
156156 u32 address = omap3_l3_decode_addr(error_addr);
157157
158− WARN(true, "%s seen by %s %s at address %x\n",
158+ pr_err("%s seen by %s %s at address %x\n",
159159 omap3_l3_code_string(code),
160160 omap3_l3_initiator_string(initid),
161161 multi ? "Multiple Errors" : "", address);
162+ WARN_ON(1);
162163
163164 return IRQ_HANDLED;
164165 }
arch/arm/mach-omap2/omap_phy_internal.c+0−6
@@ -239,21 +239,15 @@ void am35x_set_mode(u8 musb_mode) · 238 unmodified lines
239239
240240 devconf2 &= ~CONF2_OTGMODE;
241241 switch (musb_mode) {
242−#ifdef CONFIG_USB_MUSB_HDRC_HCD
243242 case MUSB_HOST: /* Force VBUS valid, ID = 0 */
244243 devconf2 |= CONF2_FORCE_HOST;
245244 break;
246−#endif
247−#ifdef CONFIG_USB_GADGET_MUSB_HDRC
248245 case MUSB_PERIPHERAL: /* Force VBUS valid, ID = 1 */
249246 devconf2 |= CONF2_FORCE_DEVICE;
250247 break;
251−#endif
252−#ifdef CONFIG_USB_MUSB_OTG
253248 case MUSB_OTG: /* Don't override the VBUS/ID comparators */
254249 devconf2 |= CONF2_NO_OVERRIDE;
255250 break;
256−#endif
257251 default:
258252 pr_info(KERN_INFO "Unsupported mode %u\n", musb_mode);
259253 }
arch/arm/mach-omap2/pm34xx.c+1−0
@@ -724,6 +724,7 @@ int __init omap3_pm_init(void) · 723 unmodified lines
724724 ret = request_irq(omap_prcm_event_to_irq("io"),
725725 _prcm_int_handle_io, IRQF_SHARED | IRQF_NO_SUSPEND, "pm_io",
726726 omap3_pm_init);
727+ enable_irq(omap_prcm_event_to_irq("io"));
727728
728729 if (ret) {
729730 pr_err("pm: Failed to request pm_io irq\n");
arch/arm/mach-omap2/prm2xxx_3xxx.c+11−3
@@ -15,6 +15,7 @@ · 14 unmodified lines
1515 #include <linux/errno.h>
1616 #include <linux/err.h>
1717 #include <linux/io.h>
18+#include <linux/irq.h>
1819
1920 #include "common.h"
2021 #include <plat/cpu.h>
@@ -303,8 +304,15 @@ void omap3xxx_prm_restore_irqen(u32 *saved_mask) · 282 unmodified lines
303304
304305 static int __init omap3xxx_prcm_init(void)
305306 {
306− if (cpu_is_omap34xx())
307− return omap_prcm_register_chain_handler(&omap3_prcm_irq_setup);
308− return 0;
307+ int ret = 0;
308+
309+ if (cpu_is_omap34xx()) {
310+ ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup);
311+ if (!ret)
312+ irq_set_status_flags(omap_prcm_event_to_irq("io"),
313+ IRQ_NOAUTOEN);
314+ }
315+
316+ return ret;
309317 }
310318 subsys_initcall(omap3xxx_prcm_init);
arch/arm/mach-omap2/serial.c+63−4
@@ -57,6 +57,7 @@ struct omap_uart_state { · 56 unmodified lines
5757
5858 struct list_head node;
5959 struct omap_hwmod *oh;
60+ struct omap_device_pad default_omap_uart_pads[2];
6061 };
6162
6263 static LIST_HEAD(uart_list);
@@ -126,11 +127,70 @@ static void omap_uart_set_smartidle(struct platform_device *pdev) {} · 63 unmodified lines
126127 #endif /* CONFIG_PM */
127128
128129 #ifdef CONFIG_OMAP_MUX
129−static void omap_serial_fill_default_pads(struct omap_board_data *bdata)
130+
131+#define OMAP_UART_DEFAULT_PAD_NAME_LEN 28
132+static char rx_pad_name[OMAP_UART_DEFAULT_PAD_NAME_LEN],
133+ tx_pad_name[OMAP_UART_DEFAULT_PAD_NAME_LEN] __initdata;
134+
135+static void __init
136+omap_serial_fill_uart_tx_rx_pads(struct omap_board_data *bdata,
137+ struct omap_uart_state *uart)
138+{
139+ uart->default_omap_uart_pads[0].name = rx_pad_name;
140+ uart->default_omap_uart_pads[0].flags = OMAP_DEVICE_PAD_REMUX |
141+ OMAP_DEVICE_PAD_WAKEUP;
142+ uart->default_omap_uart_pads[0].enable = OMAP_PIN_INPUT |
143+ OMAP_MUX_MODE0;
144+ uart->default_omap_uart_pads[0].idle = OMAP_PIN_INPUT | OMAP_MUX_MODE0;
145+ uart->default_omap_uart_pads[1].name = tx_pad_name;
146+ uart->default_omap_uart_pads[1].enable = OMAP_PIN_OUTPUT |
147+ OMAP_MUX_MODE0;
148+ bdata->pads = uart->default_omap_uart_pads;
149+ bdata->pads_cnt = ARRAY_SIZE(uart->default_omap_uart_pads);
150+}
151+
152+static void __init omap_serial_check_wakeup(struct omap_board_data *bdata,
153+ struct omap_uart_state *uart)
130154 {
155+ struct omap_mux_partition *tx_partition = NULL, *rx_partition = NULL;
156+ struct omap_mux *rx_mux = NULL, *tx_mux = NULL;
157+ char *rx_fmt, *tx_fmt;
158+ int uart_nr = bdata->id + 1;
159+
160+ if (bdata->id != 2) {
161+ rx_fmt = "uart%d_rx.uart%d_rx";
162+ tx_fmt = "uart%d_tx.uart%d_tx";
163+ } else {
164+ rx_fmt = "uart%d_rx_irrx.uart%d_rx_irrx";
165+ tx_fmt = "uart%d_tx_irtx.uart%d_tx_irtx";
166+ }
167+
168+ snprintf(rx_pad_name, OMAP_UART_DEFAULT_PAD_NAME_LEN, rx_fmt,
169+ uart_nr, uart_nr);
170+ snprintf(tx_pad_name, OMAP_UART_DEFAULT_PAD_NAME_LEN, tx_fmt,
171+ uart_nr, uart_nr);
172+
173+ if (omap_mux_get_by_name(rx_pad_name, &rx_partition, &rx_mux) >= 0 &&
174+ omap_mux_get_by_name
175+ (tx_pad_name, &tx_partition, &tx_mux) >= 0) {
176+ u16 tx_mode, rx_mode;
177+
178+ tx_mode = omap_mux_read(tx_partition, tx_mux->reg_offset);
179+ rx_mode = omap_mux_read(rx_partition, rx_mux->reg_offset);
180+
181+ /*
182+ * Check if uart is used in default tx/rx mode i.e. in mux mode0
183+ * if yes then configure rx pin for wake up capability
184+ */
185+ if (OMAP_MODE_UART(rx_mode) && OMAP_MODE_UART(tx_mode))
186+ omap_serial_fill_uart_tx_rx_pads(bdata, uart);
187+ }
131188 }
132189 #else
133−static void omap_serial_fill_default_pads(struct omap_board_data *bdata) {}
190+static void __init omap_serial_check_wakeup(struct omap_board_data *bdata,
191+ struct omap_uart_state *uart)
192+{
193+}
134194 #endif
135195
136196 static char *cmdline_find_option(char *str)
@@ -287,8 +347,7 @@ void __init omap_serial_board_init(struct omap_uart_port_info *info) · 150 unmodified lines
287347 bdata.pads = NULL;
288348 bdata.pads_cnt = 0;
289349
290− if (cpu_is_omap44xx() || cpu_is_omap34xx())
291− omap_serial_fill_default_pads(&bdata);
350+ omap_serial_check_wakeup(&bdata, uart);
292351
293352 if (!info)
294353 omap_serial_init_port(&bdata, NULL);
arch/arm/mach-omap2/usb-musb.c+2−4
@@ -41,12 +41,10 @@ static struct musb_hdrc_config musb_config = { · 40 unmodified lines
4141 };
4242
4343 static struct musb_hdrc_platform_data musb_plat = {
44−#ifdef CONFIG_USB_MUSB_OTG
44+#ifdef CONFIG_USB_GADGET_MUSB_HDRC
4545 .mode = MUSB_OTG,
46−#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
46+#else
4747 .mode = MUSB_HOST,
48−#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
49− .mode = MUSB_PERIPHERAL,
5048 #endif
5149 /* .clock is set dynamically */
5250 .config = &musb_config,
arch/arm/mach-omap2/usb-tusb6010.c+1−1
@@ -300,7 +300,7 @@ tusb6010_setup_interface(struct musb_hdrc_platform_data *data, · 299 unmodified lines
300300 printk(error, 3, status);
301301 return status;
302302 }
303− tusb_resources[2].start = irq + IH_GPIO_BASE;
303+ tusb_resources[2].start = gpio_to_irq(irq);
304304
305305 /* set up memory timings ... can speed them up later */
306306 if (!ps_refclk) {
arch/arm/mach-orion5x/include/mach/bridge-regs.h+1−1
@@ -35,5 +35,5 @@ · 34 unmodified lines
3535 #define MAIN_IRQ_MASK (ORION5X_BRIDGE_VIRT_BASE | 0x204)
3636
3737 #define TIMER_VIRT_BASE (ORION5X_BRIDGE_VIRT_BASE | 0x300)
38−
38+#define TIMER_PHYS_BASE (ORION5X_BRIDGE_PHYS_BASE | 0x300)
3939 #endif
arch/arm/mach-orion5x/include/mach/io.h+22−0
@@ -0,0 +1,22 @@
1+/*
2+ * arch/arm/mach-orion5x/include/mach/io.h
3+ *
4+ * This file is licensed under the terms of the GNU General Public
5+ * License version 2. This program is licensed "as is" without any
6+ * warranty of any kind, whether express or implied.
7+ */
8+
9+#ifndef __ASM_ARCH_IO_H
10+#define __ASM_ARCH_IO_H
11+
12+#include <mach/orion5x.h>
13+#include <asm/sizes.h>
14+
15+#define IO_SPACE_LIMIT SZ_2M
16+static inline void __iomem *__io(unsigned long addr)
17+{
18+ return (void __iomem *)(addr + ORION5X_PCIE_IO_VIRT_BASE);
19+}
20+
21+#define __io(a) __io(a)
22+#endif
arch/arm/mach-orion5x/include/mach/orion5x.h+1−0
@@ -82,6 +82,7 @@ · 81 unmodified lines
8282 #define UART1_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE | 0x2100)
8383
8484 #define ORION5X_BRIDGE_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x20000)
85+#define ORION5X_BRIDGE_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x20000)
8586
8687 #define ORION5X_PCI_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x30000)
8788
arch/arm/mach-spear13xx/include/mach/debug-macro.S+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * Debugging macro include header spear13xx machine family
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear13xx/include/mach/dma.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * DMA information for SPEAr13xx machine family
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear13xx/include/mach/generic.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * spear13xx machine family generic header file
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear13xx/include/mach/gpio.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * GPIO macros for SPEAr13xx machine family
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear13xx/include/mach/irqs.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * IRQ helper macros for spear13xx machine family
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear13xx/include/mach/spear.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * spear13xx Machine family specific definition
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear13xx/include/mach/timex.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr3XX machine family specific timex definitions
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear13xx/include/mach/uncompress.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * Serial port stubs for kernel decompress status messages
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear13xx/spear1310.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr1310 machine source file
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear13xx/spear1340.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr1340 machine source file
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear13xx/spear13xx.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr13XX machines common source file
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear3xx/include/mach/debug-macro.S+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * Debugging macro include header spear3xx machine family
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar<viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear3xx/include/mach/generic.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr3XX machine family generic header file
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar<viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear3xx/include/mach/gpio.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * GPIO macros for SPEAr3xx machine family
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar<viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear3xx/include/mach/irqs.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * IRQ helper macros for SPEAr3xx machine family
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear3xx/include/mach/misc_regs.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * Miscellaneous registers definitions for SPEAr3xx machine family
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear3xx/include/mach/spear.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr3xx Machine family specific definition
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear3xx/include/mach/timex.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr3XX machine family specific timex definitions
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear3xx/include/mach/uncompress.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * Serial port stubs for kernel decompress status messages
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear3xx/spear300.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr300 machine source file
55 *
66 * Copyright (C) 2009-2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear3xx/spear310.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr310 machine source file
55 *
66 * Copyright (C) 2009-2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear3xx/spear320.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr320 machine source file
55 *
66 * Copyright (C) 2009-2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear3xx/spear3xx.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr3XX machines common source file
55 *
66 * Copyright (C) 2009-2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear6xx/include/mach/gpio.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * GPIO macros for SPEAr6xx machine family
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-spear6xx/include/mach/misc_regs.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * Miscellaneous registers definitions for SPEAr6xx machine family
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/mach-tegra/reset.c+1−1
@@ -33,7 +33,7 @@ · 32 unmodified lines
3333
3434 static bool is_enabled;
3535
36−static void tegra_cpu_reset_handler_enable(void)
36+static void __init tegra_cpu_reset_handler_enable(void)
3737 {
3838 void __iomem *iram_base = IO_ADDRESS(TEGRA_IRAM_RESET_BASE);
3939 void __iomem *evp_cpu_reset =
arch/arm/mach-ux500/board-mop500.c+1−53
@@ -580,43 +580,12 @@ static void ux500_uart0_reset(void) · 579 unmodified lines
580580 udelay(1);
581581 }
582582
583−/* This needs to be referenced by callbacks */
584−struct pinctrl *u0_p;
585−struct pinctrl_state *u0_def;
586−struct pinctrl_state *u0_sleep;
587−
588−static void ux500_uart0_init(void)
589−{
590− int ret;
591−
592− if (IS_ERR(u0_p) || IS_ERR(u0_def))
593− return;
594−
595− ret = pinctrl_select_state(u0_p, u0_def);
596− if (ret)
597− pr_err("could not set UART0 defstate\n");
598−}
599−
600−static void ux500_uart0_exit(void)
601−{
602− int ret;
603−
604− if (IS_ERR(u0_p) || IS_ERR(u0_sleep))
605− return;
606−
607− ret = pinctrl_select_state(u0_p, u0_sleep);
608− if (ret)
609− pr_err("could not set UART0 idlestate\n");
610−}
611−
612583 static struct amba_pl011_data uart0_plat = {
613584 #ifdef CONFIG_STE_DMA40
614585 .dma_filter = stedma40_filter,
615586 .dma_rx_param = &uart0_dma_cfg_rx,
616587 .dma_tx_param = &uart0_dma_cfg_tx,
617588 #endif
618− .init = ux500_uart0_init,
619− .exit = ux500_uart0_exit,
620589 .reset = ux500_uart0_reset,
621590 };
622591
@@ -638,28 +607,7 @@ static struct amba_pl011_data uart2_plat = { · 15 unmodified lines
638607
639608 static void __init mop500_uart_init(struct device *parent)
640609 {
641− struct amba_device *uart0_device;
642−
643− uart0_device = db8500_add_uart0(parent, &uart0_plat);
644− if (uart0_device) {
645− u0_p = pinctrl_get(&uart0_device->dev);
646− if (IS_ERR(u0_p))
647− dev_err(&uart0_device->dev,
648− "could not get UART0 pinctrl\n");
649− else {
650− u0_def = pinctrl_lookup_state(u0_p,
651− PINCTRL_STATE_DEFAULT);
652− if (IS_ERR(u0_def)) {
653− dev_err(&uart0_device->dev,
654− "could not get UART0 defstate\n");
655− }
656− u0_sleep = pinctrl_lookup_state(u0_p,
657− PINCTRL_STATE_SLEEP);
658− if (IS_ERR(u0_sleep))
659− dev_err(&uart0_device->dev,
660− "could not get UART0 idlestate\n");
661− }
662− }
610+ db8500_add_uart0(parent, &uart0_plat);
663611 db8500_add_uart1(parent, &uart1_plat);
664612 db8500_add_uart2(parent, &uart2_plat);
665613 }
arch/arm/mach-versatile/core.c+3−16
@@ -169,26 +169,13 @@ static struct map_desc versatile_io_desc[] __initdata = { · 168 unmodified lines
169169 .pfn = __phys_to_pfn(VERSATILE_PCI_CFG_BASE),
170170 .length = VERSATILE_PCI_CFG_BASE_SIZE,
171171 .type = MT_DEVICE
172− },
173−#if 0
174− {
175− .virtual = VERSATILE_PCI_VIRT_MEM_BASE0,
176− .pfn = __phys_to_pfn(VERSATILE_PCI_MEM_BASE0),
177− .length = SZ_16M,
178− .type = MT_DEVICE
179172 }, {
180− .virtual = VERSATILE_PCI_VIRT_MEM_BASE1,
181− .pfn = __phys_to_pfn(VERSATILE_PCI_MEM_BASE1),
182− .length = SZ_16M,
183− .type = MT_DEVICE
184− }, {
185− .virtual = VERSATILE_PCI_VIRT_MEM_BASE2,
186− .pfn = __phys_to_pfn(VERSATILE_PCI_MEM_BASE2),
187− .length = SZ_16M,
173+ .virtual = (unsigned long)VERSATILE_PCI_VIRT_MEM_BASE0,
174+ .pfn = __phys_to_pfn(VERSATILE_PCI_MEM_BASE0),
175+ .length = IO_SPACE_LIMIT,
188176 .type = MT_DEVICE
189177 },
190178 #endif
191−#endif
192179 };
193180
194181 void __init versatile_map_io(void)
arch/arm/mach-versatile/include/mach/hardware.h+2−1
@@ -29,8 +29,9 @@ · 28 unmodified lines
2929 */
3030 #define VERSATILE_PCI_VIRT_BASE (void __iomem *)0xe8000000ul
3131 #define VERSATILE_PCI_CFG_VIRT_BASE (void __iomem *)0xe9000000ul
32+#define VERSATILE_PCI_VIRT_MEM_BASE0 (void __iomem *)PCIO_BASE
3233
33−/* macro to get at IO space when running virtually */
34+/* macro to get at MMIO space when running virtually */
3435 #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
3536
3637 #define __io_address(n) ((void __iomem __force *)IO_ADDRESS(n))
arch/arm/mach-versatile/include/mach/io.h+27−0
@@ -0,0 +1,27 @@
1+/*
2+ * arch/arm/mach-versatile/include/mach/io.h
3+ *
4+ * Copyright (C) 2003 ARM Limited
5+ *
6+ * This program is free software; you can redistribute it and/or modify
7+ * it under the terms of the GNU General Public License as published by
8+ * the Free Software Foundation; either version 2 of the License, or
9+ * (at your option) any later version.
10+ *
11+ * This program is distributed in the hope that it will be useful,
12+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+ * GNU General Public License for more details.
15+ *
16+ * You should have received a copy of the GNU General Public License
17+ * along with this program; if not, write to the Free Software
18+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19+ */
20+#ifndef __ASM_ARM_ARCH_IO_H
21+#define __ASM_ARM_ARCH_IO_H
22+
23+#define PCIO_BASE 0xeb000000ul
24+
25+#define __io(a) ((a) + PCIO_BASE)
26+
27+#endif
arch/arm/mach-versatile/pci.c+16−2
@@ -169,11 +169,18 @@ static struct pci_ops pci_versatile_ops = { · 168 unmodified lines
169169 .write = versatile_write_config,
170170 };
171171
172+static struct resource io_port = {
173+ .name = "PCI",
174+ .start = 0,
175+ .end = IO_SPACE_LIMIT,
176+ .flags = IORESOURCE_IO,
177+};
178+
172179 static struct resource io_mem = {
173180 .name = "PCI I/O space",
174181 .start = VERSATILE_PCI_MEM_BASE0,
175182 .end = VERSATILE_PCI_MEM_BASE0+VERSATILE_PCI_MEM_BASE0_SIZE-1,
176− .flags = IORESOURCE_IO,
183+ .flags = IORESOURCE_MEM,
177184 };
178185
179186 static struct resource non_mem = {
@@ -200,6 +207,12 @@ static int __init pci_versatile_setup_resources(struct pci_sys_data *sys) · 20 unmodified lines
200207 "memory region (%d)\n", ret);
201208 goto out;
202209 }
210+ ret = request_resource(&ioport_resource, &io_port);
211+ if (ret) {
212+ printk(KERN_ERR "PCI: unable to allocate I/O "
213+ "port region (%d)\n", ret);
214+ goto out;
215+ }
203216 ret = request_resource(&iomem_resource, &non_mem);
204217 if (ret) {
205218 printk(KERN_ERR "PCI: unable to allocate non-prefetchable "
@@ -218,7 +231,7 @@ static int __init pci_versatile_setup_resources(struct pci_sys_data *sys) · 12 unmodified lines
218231 * the mem resource for this bus
219232 * the prefetch mem resource for this bus
220233 */
221− pci_add_resource_offset(&sys->resources, &io_mem, sys->io_offset);
234+ pci_add_resource_offset(&sys->resources, &io_port, sys->io_offset);
222235 pci_add_resource_offset(&sys->resources, &non_mem, sys->mem_offset);
223236 pci_add_resource_offset(&sys->resources, &pre_mem, sys->mem_offset);
224237
@@ -249,6 +262,7 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys) · 24 unmodified lines
249262
250263 if (nr == 0) {
251264 sys->mem_offset = 0;
265+ sys->io_offset = 0;
252266 ret = pci_versatile_setup_resources(sys);
253267 if (ret < 0) {
254268 printk("pci_versatile_setup: resources... oops?\n");
arch/arm/net/bpf_jit_32.c+5−0
@@ -762,6 +762,11 @@ b_epilogue: · 761 unmodified lines
762762 update_on_xread(ctx);
763763 emit(ARM_MOV_R(r_A, r_X), ctx);
764764 break;
765+ case BPF_S_ANC_ALU_XOR_X:
766+ /* A ^= X */
767+ update_on_xread(ctx);
768+ emit(ARM_EOR_R(r_A, r_A, r_X), ctx);
769+ break;
765770 case BPF_S_ANC_PROTOCOL:
766771 /* A = ntohs(skb->protocol) */
767772 ctx->seen |= SEEN_SKB;
arch/arm/net/bpf_jit_32.h+4−0
@@ -68,6 +68,8 @@ · 67 unmodified lines
6868 #define ARM_INST_CMP_R 0x01500000
6969 #define ARM_INST_CMP_I 0x03500000
7070
71+#define ARM_INST_EOR_R 0x00200000
72+
7173 #define ARM_INST_LDRB_I 0x05d00000
7274 #define ARM_INST_LDRB_R 0x07d00000
7375 #define ARM_INST_LDRH_I 0x01d000b0
@@ -132,6 +134,8 @@ · 58 unmodified lines
132134 #define ARM_CMP_R(rn, rm) _AL3_R(ARM_INST_CMP, 0, rn, rm)
133135 #define ARM_CMP_I(rn, imm) _AL3_I(ARM_INST_CMP, 0, rn, imm)
134136
137+#define ARM_EOR_R(rd, rn, rm) _AL3_R(ARM_INST_EOR, rd, rn, rm)
138+
135139 #define ARM_LDR_I(rt, rn, off) (ARM_INST_LDR_I | (rt) << 12 | (rn) << 16 \
136140 | (off))
137141 #define ARM_LDRB_I(rt, rn, off) (ARM_INST_LDRB_I | (rt) << 12 | (rn) << 16 \
arch/arm/plat-mxc/epit.c+10−1
@@ -50,6 +50,7 @@ · 49 unmodified lines
5050 #include <linux/irq.h>
5151 #include <linux/clockchips.h>
5252 #include <linux/clk.h>
53+#include <linux/err.h>
5354
5455 #include <mach/hardware.h>
5556 #include <asm/mach/time.h>
@@ -201,8 +202,16 @@ static int __init epit_clockevent_init(struct clk *timer_clk) · 145 unmodified lines
201202 return 0;
202203 }
203204
204−void __init epit_timer_init(struct clk *timer_clk, void __iomem *base, int irq)
205+void __init epit_timer_init(void __iomem *base, int irq)
205206 {
207+ struct clk *timer_clk;
208+
209+ timer_clk = clk_get_sys("imx-epit.0", NULL);
210+ if (IS_ERR(timer_clk)) {
211+ pr_err("i.MX epit: unable to get clk\n");
212+ return;
213+ }
214+
206215 clk_prepare_enable(timer_clk);
207216
208217 timer_base = base;
arch/arm/plat-mxc/include/mach/common.h+2−2
@@ -54,8 +54,8 @@ extern void imx50_soc_init(void); · 53 unmodified lines
5454 extern void imx51_soc_init(void);
5555 extern void imx53_soc_init(void);
5656 extern void imx51_init_late(void);
57−extern void epit_timer_init(struct clk *timer_clk, void __iomem *base, int irq);
58−extern void mxc_timer_init(struct clk *timer_clk, void __iomem *, int);
57+extern void epit_timer_init(void __iomem *base, int irq);
58+extern void mxc_timer_init(void __iomem *, int);
5959 extern int mx1_clocks_init(unsigned long fref);
6060 extern int mx21_clocks_init(unsigned long lref, unsigned long fref);
6161 extern int mx25_clocks_init(void);
arch/arm/plat-mxc/time.c+12−12
@@ -58,6 +58,7 @@ · 57 unmodified lines
5858 /* MX31, MX35, MX25, MX5 */
5959 #define V2_TCTL_WAITEN (1 << 3) /* Wait enable mode */
6060 #define V2_TCTL_CLK_IPG (1 << 6)
61+#define V2_TCTL_CLK_PER (2 << 6)
6162 #define V2_TCTL_FRR (1 << 9)
6263 #define V2_IR 0x0c
6364 #define V2_TSTAT 0x08
@@ -280,23 +281,22 @@ static int __init mxc_clockevent_init(struct clk *timer_clk) · 216 unmodified lines
280281 return 0;
281282 }
282283
283−void __init mxc_timer_init(struct clk *timer_clk, void __iomem *base, int irq)
284+void __init mxc_timer_init(void __iomem *base, int irq)
284285 {
285286 uint32_t tctl_val;
287+ struct clk *timer_clk;
286288 struct clk *timer_ipg_clk;
287289
288− if (!timer_clk) {
289− timer_clk = clk_get_sys("imx-gpt.0", "per");
290− if (IS_ERR(timer_clk)) {
291− pr_err("i.MX timer: unable to get clk\n");
292− return;
293− }
294−
295− timer_ipg_clk = clk_get_sys("imx-gpt.0", "ipg");
296− if (!IS_ERR(timer_ipg_clk))
297− clk_prepare_enable(timer_ipg_clk);
290+ timer_clk = clk_get_sys("imx-gpt.0", "per");
291+ if (IS_ERR(timer_clk)) {
292+ pr_err("i.MX timer: unable to get clk\n");
293+ return;
298294 }
299295
296+ timer_ipg_clk = clk_get_sys("imx-gpt.0", "ipg");
297+ if (!IS_ERR(timer_ipg_clk))
298+ clk_prepare_enable(timer_ipg_clk);
299+
300300 clk_prepare_enable(timer_clk);
301301
302302 timer_base = base;
@@ -309,7 +309,7 @@ void __init mxc_timer_init(struct clk *timer_clk, void __iomem *base, int irq) · 6 unmodified lines
309309 __raw_writel(0, timer_base + MXC_TPRER); /* see datasheet note */
310310
311311 if (timer_is_v2())
312− tctl_val = V2_TCTL_CLK_IPG | V2_TCTL_FRR | V2_TCTL_WAITEN | MXC_TCTL_TEN;
312+ tctl_val = V2_TCTL_CLK_PER | V2_TCTL_FRR | V2_TCTL_WAITEN | MXC_TCTL_TEN;
313313 else
314314 tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN;
315315
arch/arm/plat-omap/clock.c+2−0
@@ -461,6 +461,7 @@ static int clk_dbg_show_summary(struct seq_file *s, void *unused) · 460 unmodified lines
461461 struct clk *c;
462462 struct clk *pa;
463463
464+ mutex_lock(&clocks_mutex);
464465 seq_printf(s, "%-30s %-30s %-10s %s\n",
465466 "clock-name", "parent-name", "rate", "use-count");
466467
@@ -469,6 +470,7 @@ static int clk_dbg_show_summary(struct seq_file *s, void *unused) · 2 unmodified lines
469470 seq_printf(s, "%-30s %-30s %-10lu %d\n",
470471 c->name, pa ? pa->name : "none", c->rate, c->usecount);
471472 }
473+ mutex_unlock(&clocks_mutex);
472474
473475 return 0;
474476 }
arch/arm/plat-omap/include/plat/cpu.h+0−33
@@ -252,8 +252,6 @@ IS_AM_SUBCLASS(335x, 0x335) · 251 unmodified lines
252252 * cpu_is_omap2423(): True for OMAP2423
253253 * cpu_is_omap2430(): True for OMAP2430
254254 * cpu_is_omap3430(): True for OMAP3430
255− * cpu_is_omap3505(): True for OMAP3505
256− * cpu_is_omap3517(): True for OMAP3517
257255 */
258256 #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff)
259257
@@ -277,8 +275,6 @@ IS_OMAP_TYPE(2422, 0x2422) · 17 unmodified lines
277275 IS_OMAP_TYPE(2423, 0x2423)
278276 IS_OMAP_TYPE(2430, 0x2430)
279277 IS_OMAP_TYPE(3430, 0x3430)
280−IS_OMAP_TYPE(3505, 0x3517)
281−IS_OMAP_TYPE(3517, 0x3517)
282278
283279 #define cpu_is_omap310() 0
284280 #define cpu_is_omap730() 0
@@ -293,12 +289,6 @@ IS_OMAP_TYPE(3517, 0x3517) · 8 unmodified lines
293289 #define cpu_is_omap2422() 0
294290 #define cpu_is_omap2423() 0
295291 #define cpu_is_omap2430() 0
296−#define cpu_is_omap3503() 0
297−#define cpu_is_omap3515() 0
298−#define cpu_is_omap3525() 0
299−#define cpu_is_omap3530() 0
300−#define cpu_is_omap3505() 0
301−#define cpu_is_omap3517() 0
302292 #define cpu_is_omap3430() 0
303293 #define cpu_is_omap3630() 0
304294
@@ -350,12 +340,6 @@ IS_OMAP_TYPE(3517, 0x3517) · 45 unmodified lines
350340
351341 #if defined(CONFIG_ARCH_OMAP3)
352342 # undef cpu_is_omap3430
353−# undef cpu_is_omap3503
354−# undef cpu_is_omap3515
355−# undef cpu_is_omap3525
356−# undef cpu_is_omap3530
357−# undef cpu_is_omap3505
358−# undef cpu_is_omap3517
359343 # undef cpu_is_ti81xx
360344 # undef cpu_is_ti816x
361345 # undef cpu_is_ti814x
@@ -363,19 +347,6 @@ IS_OMAP_TYPE(3517, 0x3517) · 1 unmodified line
363347 # undef cpu_is_am33xx
364348 # undef cpu_is_am335x
365349 # define cpu_is_omap3430() is_omap3430()
366−# define cpu_is_omap3503() (cpu_is_omap3430() && \
367− (!omap3_has_iva()) && \
368− (!omap3_has_sgx()))
369−# define cpu_is_omap3515() (cpu_is_omap3430() && \
370− (!omap3_has_iva()) && \
371− (omap3_has_sgx()))
372−# define cpu_is_omap3525() (cpu_is_omap3430() && \
373− (!omap3_has_sgx()) && \
374− (omap3_has_iva()))
375−# define cpu_is_omap3530() (cpu_is_omap3430())
376−# define cpu_is_omap3517() is_omap3517()
377−# define cpu_is_omap3505() (cpu_is_omap3517() && \
378− !omap3_has_sgx())
379350 # undef cpu_is_omap3630
380351 # define cpu_is_omap3630() is_omap363x()
381352 # define cpu_is_ti81xx() is_ti81xx()
@@ -424,10 +395,6 @@ IS_OMAP_TYPE(3517, 0x3517) · 42 unmodified lines
424395 #define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (0x1 << 8))
425396 #define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (0x2 << 8))
426397
427−#define OMAP3517_CLASS 0x35170034
428−#define OMAP3517_REV_ES1_0 OMAP3517_CLASS
429−#define OMAP3517_REV_ES1_1 (OMAP3517_CLASS | (0x1 << 8))
430−
431398 #define TI816X_CLASS 0x81600034
432399 #define TI8168_REV_ES1_0 TI816X_CLASS
433400 #define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8))
arch/arm/plat-omap/include/plat/mmc.h+1−3
@@ -172,8 +172,7 @@ struct omap_mmc_platform_data { · 171 unmodified lines
172172 extern void omap_mmc_notify_cover_event(struct device *dev, int slot,
173173 int is_closed);
174174
175−#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \
176− defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
175+#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
177176 void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
178177 int nr_controllers);
179178 void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data);
@@ -185,7 +184,6 @@ static inline void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, · 5 unmodified lines
185184 static inline void omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data)
186185 {
187186 }
188−
189187 #endif
190188
191189 extern int omap_msdi_reset(struct omap_hwmod *oh);
arch/arm/plat-orion/common.c+1−1
@@ -582,7 +582,7 @@ void __init orion_spi_1_init(unsigned long mapbase) · 581 unmodified lines
582582 * Watchdog
583583 ****************************************************************************/
584584 static struct resource orion_wdt_resource =
585− DEFINE_RES_MEM(TIMER_VIRT_BASE, 0x28);
585+ DEFINE_RES_MEM(TIMER_PHYS_BASE, 0x28);
586586
587587 static struct platform_device orion_wdt_device = {
588588 .name = "orion_wdt",
arch/arm/plat-pxa/ssp.c+1−0
@@ -193,6 +193,7 @@ static const struct platform_device_id ssp_id_table[] = { · 192 unmodified lines
193193 { "pxa25x-nssp", PXA25x_NSSP },
194194 { "pxa27x-ssp", PXA27x_SSP },
195195 { "pxa168-ssp", PXA168_SSP },
196+ { "pxa910-ssp", PXA910_SSP },
196197 { },
197198 };
198199
arch/arm/plat-spear/include/plat/debug-macro.S+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * Debugging macro include header for spear platform
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/plat-spear/include/plat/pl080.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * DMAC pl080 definitions for SPEAr platform
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/plat-spear/include/plat/shirq.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr platform shared irq layer header file
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/plat-spear/include/plat/timex.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr platform specific timex definitions
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/plat-spear/include/plat/uncompress.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * Serial port stubs for kernel decompress status messages
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/plat-spear/pl080.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * DMAC pl080 definitions for SPEAr platform
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/plat-spear/restart.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr platform specific restart functions
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/arm/plat-spear/shirq.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr platform shared irq layer source file
55 *
66 * Copyright (C) 2009 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
arch/h8300/kernel/setup.c+10−13
@@ -35,6 +35,7 @@ · 34 unmodified lines
3535 #include <asm/setup.h>
3636 #include <asm/irq.h>
3737 #include <asm/pgtable.h>
38+#include <asm/sections.h>
3839
3940 #if defined(__H8300H__)
4041 #define CPU "H8/300H"
@@ -54,7 +55,6 @@ unsigned long memory_end; · 13 unmodified lines
5455
5556 char __initdata command_line[COMMAND_LINE_SIZE];
5657
57−extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
5858 extern int _ramstart, _ramend;
5959 extern char _target_name[];
6060 extern void h8300_gpio_init(void);
@@ -119,9 +119,9 @@ void __init setup_arch(char **cmdline_p) · 58 unmodified lines
119119 memory_end = CONFIG_BLKDEV_RESERVE_ADDRESS;
120120 #endif
121121
122− init_mm.start_code = (unsigned long) &_stext;
123− init_mm.end_code = (unsigned long) &_etext;
124− init_mm.end_data = (unsigned long) &_edata;
122+ init_mm.start_code = (unsigned long) _stext;
123+ init_mm.end_code = (unsigned long) _etext;
124+ init_mm.end_data = (unsigned long) _edata;
125125 init_mm.brk = (unsigned long) 0;
126126
127127 #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) && defined(CONFIG_GDB_MAGICPRINT)
@@ -134,15 +134,12 @@ void __init setup_arch(char **cmdline_p) · 6 unmodified lines
134134 printk(KERN_INFO "H8/300 series support by Yoshinori Sato <ysato@users.sourceforge.jp>\n");
135135
136136 #ifdef DEBUG
137− printk(KERN_DEBUG "KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x "
138− "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext,
139− (int) &_sdata, (int) &_edata,
140− (int) &_sbss, (int) &_ebss);
141− printk(KERN_DEBUG "KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x "
142− "STACK=0x%06x-0x%06x\n",
143− (int) &_ebss, (int) memory_start,
144− (int) memory_start, (int) memory_end,
145− (int) memory_end, (int) &_ramend);
137+ printk(KERN_DEBUG "KERNEL -> TEXT=0x%p-0x%p DATA=0x%p-0x%p "
138+ "BSS=0x%p-0x%p\n", _stext, _etext, _sdata, _edata, __bss_start,
139+ __bss_stop);
140+ printk(KERN_DEBUG "KERNEL -> ROMFS=0x%p-0x%06lx MEM=0x%06lx-0x%06lx "
141+ "STACK=0x%06lx-0x%p\n", __bss_stop, memory_start, memory_start,
142+ memory_end, memory_end, &_ramend);
146143 #endif
147144
148145 #ifdef CONFIG_DEFAULT_CMDLINE
arch/h8300/mm/init.c+8−9
@@ -36,6 +36,7 @@ · 35 unmodified lines
3636 #include <asm/segment.h>
3737 #include <asm/page.h>
3838 #include <asm/pgtable.h>
39+#include <asm/sections.h>
3940
4041 #undef DEBUG
4142
@@ -123,7 +124,6 @@ void __init mem_init(void) · 81 unmodified lines
123124 int codek = 0, datak = 0, initk = 0;
124125 /* DAVIDM look at setup memory map generically with reserved area */
125126 unsigned long tmp;
126− extern char _etext, _stext, _sdata, _ebss, __init_begin, __init_end;
127127 extern unsigned long _ramend, _ramstart;
128128 unsigned long len = &_ramend - &_ramstart;
129129 unsigned long start_mem = memory_start; /* DAVIDM - these must start at end of kernel */
@@ -142,9 +142,9 @@ void __init mem_init(void) · 12 unmodified lines
142142 /* this will put all memory onto the freelists */
143143 totalram_pages = free_all_bootmem();
144144
145− codek = (&_etext - &_stext) >> 10;
146− datak = (&_ebss - &_sdata) >> 10;
147− initk = (&__init_begin - &__init_end) >> 10;
145+ codek = (_etext - _stext) >> 10;
146+ datak = (__bss_stop - _sdata) >> 10;
147+ initk = (__init_begin - __init_end) >> 10;
148148
149149 tmp = nr_free_pages() << PAGE_SHIFT;
150150 printk(KERN_INFO "Memory available: %luk/%luk RAM, %luk/%luk ROM (%dk kernel code, %dk data)\n",
@@ -178,22 +178,21 @@ free_initmem(void) · 27 unmodified lines
178178 {
179179 #ifdef CONFIG_RAMKERNEL
180180 unsigned long addr;
181− extern char __init_begin, __init_end;
182181 /*
183182 * the following code should be cool even if these sections
184183 * are not page aligned.
185184 */
186− addr = PAGE_ALIGN((unsigned long)(&__init_begin));
185+ addr = PAGE_ALIGN((unsigned long)(__init_begin));
187186 /* next to check that the page we free is not a partial page */
188− for (; addr + PAGE_SIZE < (unsigned long)(&__init_end); addr +=PAGE_SIZE) {
187+ for (; addr + PAGE_SIZE < (unsigned long)__init_end; addr +=PAGE_SIZE) {
189188 ClearPageReserved(virt_to_page(addr));
190189 init_page_count(virt_to_page(addr));
191190 free_page(addr);
192191 totalram_pages++;
193192 }
194193 printk(KERN_INFO "Freeing unused kernel memory: %ldk freed (0x%x - 0x%x)\n",
195− (addr - PAGE_ALIGN((long) &__init_begin)) >> 10,
196− (int)(PAGE_ALIGN((unsigned long)(&__init_begin))),
194+ (addr - PAGE_ALIGN((long) __init_begin)) >> 10,
195+ (int)(PAGE_ALIGN((unsigned long)__init_begin)),
197196 (int)(addr - PAGE_SIZE));
198197 #endif
199198 }
arch/powerpc/kvm/book3s_hv.c+66−30
@@ -268,24 +268,45 @@ static unsigned long do_h_register_vpa(struct kvm_vcpu *vcpu, · 267 unmodified lines
268268 return err;
269269 }
270270
271−static void kvmppc_update_vpa(struct kvm *kvm, struct kvmppc_vpa *vpap)
271+static void kvmppc_update_vpa(struct kvm_vcpu *vcpu, struct kvmppc_vpa *vpap)
272272 {
273+ struct kvm *kvm = vcpu->kvm;
273274 void *va;
274275 unsigned long nb;
276+ unsigned long gpa;
275277
276− vpap->update_pending = 0;
277− va = NULL;
278− if (vpap->next_gpa) {
279− va = kvmppc_pin_guest_page(kvm, vpap->next_gpa, &nb);
280− if (nb < vpap->len) {
281− /*
282− * If it's now too short, it must be that userspace
283− * has changed the mappings underlying guest memory,
284− * so unregister the region.
285− */
278+ /*
279+ * We need to pin the page pointed to by vpap->next_gpa,
280+ * but we can't call kvmppc_pin_guest_page under the lock
281+ * as it does get_user_pages() and down_read(). So we
282+ * have to drop the lock, pin the page, then get the lock
283+ * again and check that a new area didn't get registered
284+ * in the meantime.
285+ */
286+ for (;;) {
287+ gpa = vpap->next_gpa;
288+ spin_unlock(&vcpu->arch.vpa_update_lock);
289+ va = NULL;
290+ nb = 0;
291+ if (gpa)
292+ va = kvmppc_pin_guest_page(kvm, vpap->next_gpa, &nb);
293+ spin_lock(&vcpu->arch.vpa_update_lock);
294+ if (gpa == vpap->next_gpa)
295+ break;
296+ /* sigh... unpin that one and try again */
297+ if (va)
286298 kvmppc_unpin_guest_page(kvm, va);
287− va = NULL;
288− }
299+ }
300+
301+ vpap->update_pending = 0;
302+ if (va && nb < vpap->len) {
303+ /*
304+ * If it's now too short, it must be that userspace
305+ * has changed the mappings underlying guest memory,
306+ * so unregister the region.
307+ */
308+ kvmppc_unpin_guest_page(kvm, va);
309+ va = NULL;
289310 }
290311 if (vpap->pinned_addr)
291312 kvmppc_unpin_guest_page(kvm, vpap->pinned_addr);
@@ -296,20 +317,18 @@ static void kvmppc_update_vpa(struct kvm *kvm, struct kvmppc_vpa *vpap) · 4 unmodified lines
296317
297318 static void kvmppc_update_vpas(struct kvm_vcpu *vcpu)
298319 {
299− struct kvm *kvm = vcpu->kvm;
300−
301320 spin_lock(&vcpu->arch.vpa_update_lock);
302321 if (vcpu->arch.vpa.update_pending) {
303− kvmppc_update_vpa(kvm, &vcpu->arch.vpa);
322+ kvmppc_update_vpa(vcpu, &vcpu->arch.vpa);
304323 init_vpa(vcpu, vcpu->arch.vpa.pinned_addr);
305324 }
306325 if (vcpu->arch.dtl.update_pending) {
307− kvmppc_update_vpa(kvm, &vcpu->arch.dtl);
326+ kvmppc_update_vpa(vcpu, &vcpu->arch.dtl);
308327 vcpu->arch.dtl_ptr = vcpu->arch.dtl.pinned_addr;
309328 vcpu->arch.dtl_index = 0;
310329 }
311330 if (vcpu->arch.slb_shadow.update_pending)
312− kvmppc_update_vpa(kvm, &vcpu->arch.slb_shadow);
331+ kvmppc_update_vpa(vcpu, &vcpu->arch.slb_shadow);
313332 spin_unlock(&vcpu->arch.vpa_update_lock);
314333 }
315334
@@ -800,12 +819,39 @@ static int kvmppc_run_core(struct kvmppc_vcore *vc) · 484 unmodified lines
800819 struct kvm_vcpu *vcpu, *vcpu0, *vnext;
801820 long ret;
802821 u64 now;
803− int ptid, i;
822+ int ptid, i, need_vpa_update;
804823
805824 /* don't start if any threads have a signal pending */
806− list_for_each_entry(vcpu, &vc->runnable_threads, arch.run_list)
825+ need_vpa_update = 0;
826+ list_for_each_entry(vcpu, &vc->runnable_threads, arch.run_list) {
807827 if (signal_pending(vcpu->arch.run_task))
808828 return 0;
829+ need_vpa_update |= vcpu->arch.vpa.update_pending |
830+ vcpu->arch.slb_shadow.update_pending |
831+ vcpu->arch.dtl.update_pending;
832+ }
833+
834+ /*
835+ * Initialize *vc, in particular vc->vcore_state, so we can
836+ * drop the vcore lock if necessary.
837+ */
838+ vc->n_woken = 0;
839+ vc->nap_count = 0;
840+ vc->entry_exit_count = 0;
841+ vc->vcore_state = VCORE_RUNNING;
842+ vc->in_guest = 0;
843+ vc->napping_threads = 0;
844+
845+ /*
846+ * Updating any of the vpas requires calling kvmppc_pin_guest_page,
847+ * which can't be called with any spinlocks held.
848+ */
849+ if (need_vpa_update) {
850+ spin_unlock(&vc->lock);
851+ list_for_each_entry(vcpu, &vc->runnable_threads, arch.run_list)
852+ kvmppc_update_vpas(vcpu);
853+ spin_lock(&vc->lock);
854+ }
809855
810856 /*
811857 * Make sure we are running on thread 0, and that
@@ -838,20 +884,10 @@ static int kvmppc_run_core(struct kvmppc_vcore *vc) · 26 unmodified lines
838884 if (vcpu->arch.ceded)
839885 vcpu->arch.ptid = ptid++;
840886
841− vc->n_woken = 0;
842− vc->nap_count = 0;
843− vc->entry_exit_count = 0;
844− vc->vcore_state = VCORE_RUNNING;
845887 vc->stolen_tb += mftb() - vc->preempt_tb;
846− vc->in_guest = 0;
847888 vc->pcpu = smp_processor_id();
848− vc->napping_threads = 0;
849889 list_for_each_entry(vcpu, &vc->runnable_threads, arch.run_list) {
850890 kvmppc_start_thread(vcpu);
851− if (vcpu->arch.vpa.update_pending ||
852− vcpu->arch.slb_shadow.update_pending ||
853− vcpu->arch.dtl.update_pending)
854− kvmppc_update_vpas(vcpu);
855891 kvmppc_create_dtl_entry(vcpu, vc);
856892 }
857893 /* Grab any remaining hw threads so they can't go into the kernel */
arch/powerpc/platforms/pseries/nvram.c+7−54
@@ -68,9 +68,7 @@ static const char *pseries_nvram_os_partitions[] = { · 67 unmodified lines
6868 };
6969
7070 static void oops_to_nvram(struct kmsg_dumper *dumper,
71− enum kmsg_dump_reason reason,
72− const char *old_msgs, unsigned long old_len,
73− const char *new_msgs, unsigned long new_len);
71+ enum kmsg_dump_reason reason);
7472
7573 static struct kmsg_dumper nvram_kmsg_dumper = {
7674 .dump = oops_to_nvram
@@ -503,28 +501,6 @@ int __init pSeries_nvram_init(void) · 426 unmodified lines
503501 return 0;
504502 }
505503
506−/*
507− * Try to capture the last capture_len bytes of the printk buffer. Return
508− * the amount actually captured.
509− */
510−static size_t capture_last_msgs(const char *old_msgs, size_t old_len,
511− const char *new_msgs, size_t new_len,
512− char *captured, size_t capture_len)
513−{
514− if (new_len >= capture_len) {
515− memcpy(captured, new_msgs + (new_len - capture_len),
516− capture_len);
517− return capture_len;
518− } else {
519− /* Grab the end of old_msgs. */
520− size_t old_tail_len = min(old_len, capture_len - new_len);
521− memcpy(captured, old_msgs + (old_len - old_tail_len),
522− old_tail_len);
523− memcpy(captured + old_tail_len, new_msgs, new_len);
524− return old_tail_len + new_len;
525− }
526−}
527−
528504 /*
529505 * Are we using the ibm,rtas-log for oops/panic reports? And if so,
530506 * would logging this oops/panic overwrite an RTAS event that rtas_errd
@@ -541,27 +517,6 @@ static int clobbering_unread_rtas_event(void) · 10 unmodified lines
541517 NVRAM_RTAS_READ_TIMEOUT);
542518 }
543519
544−/* Squeeze out each line's <n> severity prefix. */
545−static size_t elide_severities(char *buf, size_t len)
546−{
547− char *in, *out, *buf_end = buf + len;
548− /* Assume a <n> at the very beginning marks the start of a line. */
549− int newline = 1;
550−
551− in = out = buf;
552− while (in < buf_end) {
553− if (newline && in+3 <= buf_end &&
554− *in == '<' && isdigit(in[1]) && in[2] == '>') {
555− in += 3;
556− newline = 0;
557− } else {
558− newline = (*in == '\n');
559− *out++ = *in++;
560− }
561− }
562− return out - buf;
563−}
564−
565520 /* Derived from logfs_compress() */
566521 static int nvram_compress(const void *in, void *out, size_t inlen,
567522 size_t outlen)
@@ -619,9 +574,7 @@ static int zip_oops(size_t text_len) · 51 unmodified lines
619574 * partition. If that's too much, go back and capture uncompressed text.
620575 */
621576 static void oops_to_nvram(struct kmsg_dumper *dumper,
622− enum kmsg_dump_reason reason,
623− const char *old_msgs, unsigned long old_len,
624− const char *new_msgs, unsigned long new_len)
577+ enum kmsg_dump_reason reason)
625578 {
626579 static unsigned int oops_count = 0;
627580 static bool panicking = false;
@@ -660,14 +613,14 @@ static void oops_to_nvram(struct kmsg_dumper *dumper, · 32 unmodified lines
660613 return;
661614
662615 if (big_oops_buf) {
663− text_len = capture_last_msgs(old_msgs, old_len,
664− new_msgs, new_len, big_oops_buf, big_oops_buf_sz);
665− text_len = elide_severities(big_oops_buf, text_len);
616+ kmsg_dump_get_buffer(dumper, false,
617+ big_oops_buf, big_oops_buf_sz, &text_len);
666618 rc = zip_oops(text_len);
667619 }
668620 if (rc != 0) {
669− text_len = capture_last_msgs(old_msgs, old_len,
670− new_msgs, new_len, oops_data, oops_data_sz);
621+ kmsg_dump_rewind(dumper);
622+ kmsg_dump_get_buffer(dumper, true,
623+ oops_data, oops_data_sz, &text_len);
671624 err_type = ERR_TYPE_KERNEL_PANIC;
672625 *oops_len = (u16) text_len;
673626 }
arch/sparc/kernel/vio.c+1−1
@@ -443,7 +443,7 @@ static int __init vio_init(void) · 442 unmodified lines
443443 root_vdev = vio_create_one(hp, root, NULL);
444444 err = -ENODEV;
445445 if (!root_vdev) {
446− printk(KERN_ERR "VIO: Coult not create root device.\n");
446+ printk(KERN_ERR "VIO: Could not create root device.\n");
447447 goto out_release;
448448 }
449449
arch/x86/include/asm/pgtable-3level.h+17−13
@@ -47,16 +47,26 @@ static inline void native_set_pte(pte_t *ptep, pte_t pte) · 46 unmodified lines
4747 * they can run pmd_offset_map_lock or pmd_trans_huge or other pmd
4848 * operations.
4949 *
50− * Without THP if the mmap_sem is hold for reading, the
51− * pmd can only transition from null to not null while pmd_read_atomic runs.
52− * So there's no need of literally reading it atomically.
50+ * Without THP if the mmap_sem is hold for reading, the pmd can only
51+ * transition from null to not null while pmd_read_atomic runs. So
52+ * we can always return atomic pmd values with this function.
5353 *
5454 * With THP if the mmap_sem is hold for reading, the pmd can become
55− * THP or null or point to a pte (and in turn become "stable") at any
56− * time under pmd_read_atomic, so it's mandatory to read it atomically
57− * with cmpxchg8b.
55+ * trans_huge or none or point to a pte (and in turn become "stable")
56+ * at any time under pmd_read_atomic. We could read it really
57+ * atomically here with a atomic64_read for the THP enabled case (and
58+ * it would be a whole lot simpler), but to avoid using cmpxchg8b we
59+ * only return an atomic pmdval if the low part of the pmdval is later
60+ * found stable (i.e. pointing to a pte). And we're returning a none
61+ * pmdval if the low part of the pmd is none. In some cases the high
62+ * and low part of the pmdval returned may not be consistent if THP is
63+ * enabled (the low part may point to previously mapped hugepage,
64+ * while the high part may point to a more recently mapped hugepage),
65+ * but pmd_none_or_trans_huge_or_clear_bad() only needs the low part
66+ * of the pmd to be read atomically to decide if the pmd is unstable
67+ * or not, with the only exception of when the low part of the pmd is
68+ * zero in which case we return a none pmd.
5869 */
59−#ifndef CONFIG_TRANSPARENT_HUGEPAGE
6070 static inline pmd_t pmd_read_atomic(pmd_t *pmdp)
6171 {
6272 pmdval_t ret;
@@ -74,12 +84,6 @@ static inline pmd_t pmd_read_atomic(pmd_t *pmdp) · 11 unmodified lines
7484
7585 return (pmd_t) { ret };
7686 }
77−#else /* CONFIG_TRANSPARENT_HUGEPAGE */
78−static inline pmd_t pmd_read_atomic(pmd_t *pmdp)
79−{
80− return (pmd_t) { atomic64_read((atomic64_t *)pmdp) };
81−}
82−#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
8387
8488 static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)
8589 {
arch/x86/platform/mrst/early_printk_mrst.c+5−8
@@ -110,19 +110,16 @@ static struct kmsg_dumper dw_dumper; · 109 unmodified lines
110110 static int dumper_registered;
111111
112112 static void dw_kmsg_dump(struct kmsg_dumper *dumper,
113− enum kmsg_dump_reason reason,
114− const char *s1, unsigned long l1,
115− const char *s2, unsigned long l2)
113+ enum kmsg_dump_reason reason)
116114 {
117− int i;
115+ static char line[1024];
116+ size_t len;
118117
119118 /* When run to this, we'd better re-init the HW */
120119 mrst_early_console_init();
121120
122− for (i = 0; i < l1; i++)
123− early_mrst_console.write(&early_mrst_console, s1 + i, 1);
124− for (i = 0; i < l2; i++)
125− early_mrst_console.write(&early_mrst_console, s2 + i, 1);
121+ while (kmsg_dump_get_line(dumper, true, line, sizeof(line), &len))
122+ early_mrst_console.write(&early_mrst_console, line, len);
126123 }
127124
128125 /* Set the ratio rate to 115200, 8n1, IRQ disabled */
arch/xtensa/Makefile+2−2
@@ -68,8 +68,8 @@ endif · 67 unmodified lines
6868
6969 # Only build variant and/or platform if it includes a Makefile
7070
71−buildvar := $(shell test -a $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/)
72−buildplf := $(shell test -a $(srctree)/arch/xtensa/platforms/$(PLATFORM)/Makefile && echo arch/xtensa/platforms/$(PLATFORM)/)
71+buildvar := $(shell test -e $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/)
72+buildplf := $(shell test -e $(srctree)/arch/xtensa/platforms/$(PLATFORM)/Makefile && echo arch/xtensa/platforms/$(PLATFORM)/)
7373
7474 # Find libgcc.a
7575
arch/xtensa/kernel/vmlinux.lds.S+1−2
@@ -83,7 +83,6 @@ SECTIONS · 82 unmodified lines
8383
8484 _text = .;
8585 _stext = .;
86− _ftext = .;
8786
8887 .text :
8988 {
@@ -112,7 +111,7 @@ SECTIONS · 22 unmodified lines
112111 EXCEPTION_TABLE(16)
113112 /* Data section */
114113
115− _fdata = .;
114+ _sdata = .;
116115 RW_DATA_SECTION(XCHAL_ICACHE_LINESIZE, PAGE_SIZE, THREAD_SIZE)
117116 _edata = .;
118117
arch/xtensa/mm/init.c+7−11
@@ -26,11 +26,7 @@ · 25 unmodified lines
2626
2727 #include <asm/bootparam.h>
2828 #include <asm/page.h>
29−
30−/* References to section boundaries */
31−
32−extern char _ftext, _etext, _fdata, _edata, _rodata_end;
33−extern char __init_begin, __init_end;
29+#include <asm/sections.h>
3430
3531 /*
3632 * mem_reserve(start, end, must_exist)
@@ -197,9 +193,9 @@ void __init mem_init(void) · 160 unmodified lines
197193 reservedpages++;
198194 }
199195
200− codesize = (unsigned long) &_etext - (unsigned long) &_ftext;
201− datasize = (unsigned long) &_edata - (unsigned long) &_fdata;
202− initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
196+ codesize = (unsigned long) _etext - (unsigned long) _stext;
197+ datasize = (unsigned long) _edata - (unsigned long) _sdata;
198+ initsize = (unsigned long) __init_end - (unsigned long) __init_begin;
203199
204200 printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, "
205201 "%ldk data, %ldk init %ldk highmem)\n",
@@ -237,7 +233,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) · 31 unmodified lines
237233
238234 void free_initmem(void)
239235 {
240− free_reserved_mem(&__init_begin, &__init_end);
241− printk("Freeing unused kernel memory: %dk freed\n",
242− (&__init_end - &__init_begin) >> 10);
236+ free_reserved_mem(__init_begin, __init_end);
237+ printk("Freeing unused kernel memory: %zuk freed\n",
238+ (__init_end - __init_begin) >> 10);
243239 }
drivers/ata/pata_arasan_cf.c+2−2
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * Arasan Compact Flash host controller source file
55 *
66 * Copyright (C) 2011 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
@@ -959,7 +959,7 @@ static struct platform_driver arasan_cf_driver = { · 948 unmodified lines
959959
960960 module_platform_driver(arasan_cf_driver);
961961
962−MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>");
962+MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>");
963963 MODULE_DESCRIPTION("Arasan ATA Compact Flash driver");
964964 MODULE_LICENSE("GPL");
965965 MODULE_ALIAS("platform:" DRIVER_NAME);
drivers/base/dd.c+1−1
@@ -100,7 +100,7 @@ static void driver_deferred_probe_add(struct device *dev) · 99 unmodified lines
100100 mutex_lock(&deferred_probe_mutex);
101101 if (list_empty(&dev->p->deferred_probe)) {
102102 dev_dbg(dev, "Added to deferred list\n");
103− list_add(&dev->p->deferred_probe, &deferred_probe_pending_list);
103+ list_add_tail(&dev->p->deferred_probe, &deferred_probe_pending_list);
104104 }
105105 mutex_unlock(&deferred_probe_mutex);
106106 }
drivers/char/hw_random/atmel-rng.c+1−1
@@ -34,7 +34,7 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max, · 33 unmodified lines
3434 u32 *data = buf;
3535
3636 /* data ready? */
37− if (readl(trng->base + TRNG_ODATA) & 1) {
37+ if (readl(trng->base + TRNG_ISR) & 1) {
3838 *data = readl(trng->base + TRNG_ODATA);
3939 /*
4040 ensure data ready is only set again AFTER the next data
drivers/clk/spear/clk-aux-synth.c+1−1
@@ -1,6 +1,6 @@
11 /*
22 * Copyright (C) 2012 ST Microelectronics
3− * Viresh Kumar <viresh.kumar@st.com>
3+ * Viresh Kumar <viresh.linux@gmail.com>
44 *
55 * This file is licensed under the terms of the GNU General Public
66 * License version 2. This program is licensed "as is" without any
drivers/clk/spear/clk-frac-synth.c+1−1
@@ -1,6 +1,6 @@
11 /*
22 * Copyright (C) 2012 ST Microelectronics
3− * Viresh Kumar <viresh.kumar@st.com>
3+ * Viresh Kumar <viresh.linux@gmail.com>
44 *
55 * This file is licensed under the terms of the GNU General Public
66 * License version 2. This program is licensed "as is" without any
drivers/clk/spear/clk-gpt-synth.c+1−1
@@ -1,6 +1,6 @@
11 /*
22 * Copyright (C) 2012 ST Microelectronics
3− * Viresh Kumar <viresh.kumar@st.com>
3+ * Viresh Kumar <viresh.linux@gmail.com>
44 *
55 * This file is licensed under the terms of the GNU General Public
66 * License version 2. This program is licensed "as is" without any
drivers/clk/spear/clk-vco-pll.c+1−1
@@ -1,6 +1,6 @@
11 /*
22 * Copyright (C) 2012 ST Microelectronics
3− * Viresh Kumar <viresh.kumar@st.com>
3+ * Viresh Kumar <viresh.linux@gmail.com>
44 *
55 * This file is licensed under the terms of the GNU General Public
66 * License version 2. This program is licensed "as is" without any
drivers/clk/spear/clk.c+1−1
@@ -1,6 +1,6 @@
11 /*
22 * Copyright (C) 2012 ST Microelectronics
3− * Viresh Kumar <viresh.kumar@st.com>
3+ * Viresh Kumar <viresh.linux@gmail.com>
44 *
55 * This file is licensed under the terms of the GNU General Public
66 * License version 2. This program is licensed "as is" without any
drivers/clk/spear/clk.h+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * Clock framework definitions for SPEAr platform
33 *
44 * Copyright (C) 2012 ST Microelectronics
5− * Viresh Kumar <viresh.kumar@st.com>
5+ * Viresh Kumar <viresh.linux@gmail.com>
66 *
77 * This file is licensed under the terms of the GNU General Public
88 * License version 2. This program is licensed "as is" without any
drivers/clk/spear/spear1310_clock.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr1310 machine clock framework source file
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
drivers/clk/spear/spear1340_clock.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SPEAr1340 machine clock framework source file
55 *
66 * Copyright (C) 2012 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
drivers/clk/spear/spear3xx_clock.c+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * SPEAr3xx machines clock framework source file
33 *
44 * Copyright (C) 2012 ST Microelectronics
5− * Viresh Kumar <viresh.kumar@st.com>
5+ * Viresh Kumar <viresh.linux@gmail.com>
66 *
77 * This file is licensed under the terms of the GNU General Public
88 * License version 2. This program is licensed "as is" without any
drivers/clk/spear/spear6xx_clock.c+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * SPEAr6xx machines clock framework source file
33 *
44 * Copyright (C) 2012 ST Microelectronics
5− * Viresh Kumar <viresh.kumar@st.com>
5+ * Viresh Kumar <viresh.linux@gmail.com>
66 *
77 * This file is licensed under the terms of the GNU General Public
88 * License version 2. This program is licensed "as is" without any
drivers/dma/dw_dmac.c+1−1
@@ -1626,4 +1626,4 @@ module_exit(dw_exit); · 1625 unmodified lines
16261626 MODULE_LICENSE("GPL v2");
16271627 MODULE_DESCRIPTION("Synopsys DesignWare DMA Controller driver");
16281628 MODULE_AUTHOR("Haavard Skinnemoen (Atmel)");
1629−MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>");
1629+MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>");
drivers/dma/imx-sdma.c+4−2
@@ -815,8 +815,6 @@ static int sdma_request_channel(struct sdma_channel *sdmac) · 814 unmodified lines
815815
816816 init_completion(&sdmac->done);
817817
818− sdmac->buf_tail = 0;
819−
820818 return 0;
821819 out:
822820
@@ -927,6 +925,8 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg( · 104 unmodified lines
927925
928926 sdmac->flags = 0;
929927
928+ sdmac->buf_tail = 0;
929+
930930 dev_dbg(sdma->dev, "setting up %d entries for channel %d.\n",
931931 sg_len, channel);
932932
@@ -1027,6 +1027,8 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic( · 94 unmodified lines
10271027
10281028 sdmac->status = DMA_IN_PROGRESS;
10291029
1030+ sdmac->buf_tail = 0;
1031+
10301032 sdmac->flags |= IMX_DMA_SG_LOOP;
10311033 sdmac->direction = direction;
10321034 ret = sdma_load_context(sdmac);
drivers/dma/pl330.c+12−18
@@ -392,6 +392,8 @@ struct pl330_req { · 391 unmodified lines
392392 struct pl330_reqcfg *cfg;
393393 /* Pointer to first xfer in the request. */
394394 struct pl330_xfer *x;
395+ /* Hook to attach to DMAC's list of reqs with due callback */
396+ struct list_head rqd;
395397 };
396398
397399 /*
@@ -461,8 +463,6 @@ struct _pl330_req { · 63 unmodified lines
461463 /* Number of bytes taken to setup MC for the req */
462464 u32 mc_len;
463465 struct pl330_req *r;
464− /* Hook to attach to DMAC's list of reqs with due callback */
465− struct list_head rqd;
466466 };
467467
468468 /* ToBeDone for tasklet */
@@ -1683,7 +1683,7 @@ static void pl330_dotask(unsigned long data) · 1214 unmodified lines
16831683 /* Returns 1 if state was updated, 0 otherwise */
16841684 static int pl330_update(const struct pl330_info *pi)
16851685 {
1686− struct _pl330_req *rqdone;
1686+ struct pl330_req *rqdone, *tmp;
16871687 struct pl330_dmac *pl330;
16881688 unsigned long flags;
16891689 void __iomem *regs;
@@ -1750,7 +1750,10 @@ static int pl330_update(const struct pl330_info *pi) · 60 unmodified lines
17501750 if (active == -1) /* Aborted */
17511751 continue;
17521752
1753− rqdone = &thrd->req[active];
1753+ /* Detach the req */
1754+ rqdone = thrd->req[active].r;
1755+ thrd->req[active].r = NULL;
1756+
17541757 mark_free(thrd, active);
17551758
17561759 /* Get going again ASAP */
@@ -1762,20 +1765,11 @@ static int pl330_update(const struct pl330_info *pi) · 5 unmodified lines
17621765 }
17631766
17641767 /* Now that we are in no hurry, do the callbacks */
1765− while (!list_empty(&pl330->req_done)) {
1766− struct pl330_req *r;
1767−
1768− rqdone = container_of(pl330->req_done.next,
1769− struct _pl330_req, rqd);
1770−
1771− list_del_init(&rqdone->rqd);
1772−
1773− /* Detach the req */
1774− r = rqdone->r;
1775− rqdone->r = NULL;
1768+ list_for_each_entry_safe(rqdone, tmp, &pl330->req_done, rqd) {
1769+ list_del(&rqdone->rqd);
17761770
17771771 spin_unlock_irqrestore(&pl330->lock, flags);
1778− _callback(r, PL330_ERR_NONE);
1772+ _callback(rqdone, PL330_ERR_NONE);
17791773 spin_lock_irqsave(&pl330->lock, flags);
17801774 }
17811775
@@ -2321,7 +2315,7 @@ static void pl330_tasklet(unsigned long data) · 539 unmodified lines
23212315 /* Pick up ripe tomatoes */
23222316 list_for_each_entry_safe(desc, _dt, &pch->work_list, node)
23232317 if (desc->status == DONE) {
2324− if (pch->cyclic)
2318+ if (!pch->cyclic)
23252319 dma_cookie_complete(&desc->txd);
23262320 list_move_tail(&desc->node, &list);
23272321 }
@@ -2539,7 +2533,7 @@ static inline void _init_desc(struct dma_pl330_desc *desc) · 211 unmodified lines
25392533 }
25402534
25412535 /* Returns the number of descriptors added to the DMAC pool */
2542−int add_desc(struct dma_pl330_dmac *pdmac, gfp_t flg, int count)
2536+static int add_desc(struct dma_pl330_dmac *pdmac, gfp_t flg, int count)
25432537 {
25442538 struct dma_pl330_desc *desc;
25452539 unsigned long flags;
drivers/edac/edac_mc.c+1−1
@@ -164,7 +164,7 @@ void *edac_align_ptr(void **p, unsigned size, int n_elems) · 163 unmodified lines
164164 else
165165 return (char *)ptr;
166166
167− r = size % align;
167+ r = (unsigned long)p % align;
168168
169169 if (r == 0)
170170 return (char *)ptr;
drivers/edac/i7core_edac.c+4−11
@@ -1814,12 +1814,6 @@ static int i7core_mce_check_error(struct notifier_block *nb, unsigned long val, · 1813 unmodified lines
18141814 if (mce->bank != 8)
18151815 return NOTIFY_DONE;
18161816
1817−#ifdef CONFIG_SMP
1818− /* Only handle if it is the right mc controller */
1819− if (mce->socketid != pvt->i7core_dev->socket)
1820− return NOTIFY_DONE;
1821−#endif
1822−
18231817 smp_rmb();
18241818 if ((pvt->mce_out + 1) % MCE_LOG_LEN == pvt->mce_in) {
18251819 smp_wmb();
@@ -2116,8 +2110,6 @@ static void i7core_unregister_mci(struct i7core_dev *i7core_dev) · 290 unmodified lines
21162110 if (pvt->enable_scrub)
21172111 disable_sdram_scrub_setting(mci);
21182112
2119− mce_unregister_decode_chain(&i7_mce_dec);
2120−
21212113 /* Disable EDAC polling */
21222114 i7core_pci_ctl_release(pvt);
21232115
@@ -2222,8 +2214,6 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev) · 98 unmodified lines
22222214 /* DCLK for scrub rate setting */
22232215 pvt->dclk_freq = get_dclk_freq();
22242216
2225− mce_register_decode_chain(&i7_mce_dec);
2226−
22272217 return 0;
22282218
22292219 fail0:
@@ -2367,8 +2357,10 @@ static int __init i7core_init(void) · 137 unmodified lines
23672357
23682358 pci_rc = pci_register_driver(&i7core_driver);
23692359
2370− if (pci_rc >= 0)
2360+ if (pci_rc >= 0) {
2361+ mce_register_decode_chain(&i7_mce_dec);
23712362 return 0;
2363+ }
23722364
23732365 i7core_printk(KERN_ERR, "Failed to register device with error %d.\n",
23742366 pci_rc);
@@ -2384,6 +2376,7 @@ static void __exit i7core_exit(void) · 9 unmodified lines
23842376 {
23852377 debugf2("MC: " __FILE__ ": %s()\n", __func__);
23862378 pci_unregister_driver(&i7core_driver);
2379+ mce_unregister_decode_chain(&i7_mce_dec);
23872380 }
23882381
23892382 module_init(i7core_init);
drivers/edac/mpc85xx_edac.c+2−1
@@ -980,7 +980,8 @@ static int __devinit mpc85xx_mc_err_probe(struct platform_device *op) · 979 unmodified lines
980980 layers[1].type = EDAC_MC_LAYER_CHANNEL;
981981 layers[1].size = 1;
982982 layers[1].is_virt_csrow = false;
983− mci = edac_mc_alloc(edac_mc_idx, ARRAY_SIZE(layers), sizeof(*pdata));
983+ mci = edac_mc_alloc(edac_mc_idx, ARRAY_SIZE(layers), layers,
984+ sizeof(*pdata));
984985 if (!mci) {
985986 devres_release_group(&op->dev, mpc85xx_mc_err_probe);
986987 return -ENOMEM;
drivers/edac/sb_edac.c+5−5
@@ -555,7 +555,7 @@ static int get_dimm_config(struct mem_ctl_info *mci) · 554 unmodified lines
555555 pvt->is_close_pg = false;
556556 }
557557
558− pci_read_config_dword(pvt->pci_ta, RANK_CFG_A, &reg);
558+ pci_read_config_dword(pvt->pci_ddrio, RANK_CFG_A, &reg);
559559 if (IS_RDIMM_ENABLED(reg)) {
560560 /* FIXME: Can also be LRDIMM */
561561 debugf0("Memory is registered\n");
@@ -1604,8 +1604,6 @@ static void sbridge_unregister_mci(struct sbridge_dev *sbridge_dev) · 1042 unmodified lines
16041604 debugf0("MC: " __FILE__ ": %s(): mci = %p, dev = %p\n",
16051605 __func__, mci, &sbridge_dev->pdev[0]->dev);
16061606
1607− mce_unregister_decode_chain(&sbridge_mce_dec);
1608−
16091607 /* Remove MC sysfs nodes */
16101608 edac_mc_del_mc(mci->dev);
16111609
@@ -1682,7 +1680,6 @@ static int sbridge_register_mci(struct sbridge_dev *sbridge_dev) · 70 unmodified lines
16821680 goto fail0;
16831681 }
16841682
1685− mce_register_decode_chain(&sbridge_mce_dec);
16861683 return 0;
16871684
16881685 fail0:
@@ -1811,8 +1808,10 @@ static int __init sbridge_init(void) · 122 unmodified lines
18111808
18121809 pci_rc = pci_register_driver(&sbridge_driver);
18131810
1814− if (pci_rc >= 0)
1811+ if (pci_rc >= 0) {
1812+ mce_register_decode_chain(&sbridge_mce_dec);
18151813 return 0;
1814+ }
18161815
18171816 sbridge_printk(KERN_ERR, "Failed to register device with error %d.\n",
18181817 pci_rc);
@@ -1828,6 +1827,7 @@ static void __exit sbridge_exit(void) · 9 unmodified lines
18281827 {
18291828 debugf2("MC: " __FILE__ ": %s()\n", __func__);
18301829 pci_unregister_driver(&sbridge_driver);
1830+ mce_unregister_decode_chain(&sbridge_mce_dec);
18311831 }
18321832
18331833 module_init(sbridge_init);
drivers/extcon/extcon-max8997.c+3−2
@@ -116,8 +116,8 @@ const char *max8997_extcon_cable[] = { · 115 unmodified lines
116116 [5] = "Charge-downstream",
117117 [6] = "MHL",
118118 [7] = "Dock-desk",
119− [7] = "Dock-card",
120− [8] = "JIG",
119+ [8] = "Dock-card",
120+ [9] = "JIG",
121121
122122 NULL,
123123 };
@@ -514,6 +514,7 @@ static int __devexit max8997_muic_remove(struct platform_device *pdev) · 390 unmodified lines
514514
515515 extcon_dev_unregister(info->edev);
516516
517+ kfree(info->edev);
517518 kfree(info);
518519
519520 return 0;
drivers/extcon/extcon_class.c+1−1
@@ -762,7 +762,7 @@ int extcon_dev_register(struct extcon_dev *edev, struct device *dev) · 761 unmodified lines
762762 #if defined(CONFIG_ANDROID)
763763 if (switch_class)
764764 ret = class_compat_create_link(switch_class, edev->dev,
765− dev);
765+ NULL);
766766 #endif /* CONFIG_ANDROID */
767767
768768 spin_lock_init(&edev->lock);
drivers/extcon/extcon_gpio.c+2−0
@@ -125,6 +125,7 @@ static int __devinit gpio_extcon_probe(struct platform_device *pdev) · 124 unmodified lines
125125 if (ret < 0)
126126 goto err_request_irq;
127127
128+ platform_set_drvdata(pdev, extcon_data);
128129 /* Perform initial detection */
129130 gpio_extcon_work(&extcon_data->work.work);
130131
@@ -146,6 +147,7 @@ static int __devexit gpio_extcon_remove(struct platform_device *pdev) · 15 unmodified lines
146147 struct gpio_extcon_data *extcon_data = platform_get_drvdata(pdev);
147148
148149 cancel_delayed_work_sync(&extcon_data->work);
150+ free_irq(extcon_data->irq, extcon_data);
149151 gpio_free(extcon_data->gpio);
150152 extcon_dev_unregister(&extcon_data->edev);
151153 devm_kfree(&pdev->dev, extcon_data);
drivers/gpu/drm/drm_edid.c+1−1
@@ -610,7 +610,7 @@ static bool · 609 unmodified lines
610610 drm_monitor_supports_rb(struct edid *edid)
611611 {
612612 if (edid->revision >= 4) {
613− bool ret;
613+ bool ret = false;
614614 drm_for_each_detailed_block((u8 *)edid, is_rb, &ret);
615615 return ret;
616616 }
drivers/gpu/drm/i915/intel_display.c+1−1
@@ -6558,7 +6558,7 @@ static void intel_setup_outputs(struct drm_device *dev) · 6557 unmodified lines
65586558 if (I915_READ(HDMIC) & PORT_DETECTED)
65596559 intel_hdmi_init(dev, HDMIC);
65606560
6561− if (I915_READ(HDMID) & PORT_DETECTED)
6561+ if (!dpd_is_edp && I915_READ(HDMID) & PORT_DETECTED)
65626562 intel_hdmi_init(dev, HDMID);
65636563
65646564 if (I915_READ(PCH_DP_C) & DP_DETECTED)
drivers/gpu/drm/i915/intel_dp.c+53−7
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232 #include "drm.h"
3333 #include "drm_crtc.h"
3434 #include "drm_crtc_helper.h"
35+#include "drm_edid.h"
3536 #include "intel_drv.h"
3637 #include "i915_drm.h"
3738 #include "i915_drv.h"
@@ -67,6 +68,8 @@ struct intel_dp { · 29 unmodified lines
6768 struct drm_display_mode *panel_fixed_mode; /* for eDP */
6869 struct delayed_work panel_vdd_work;
6970 bool want_panel_vdd;
71+ struct edid *edid; /* cached EDID for eDP */
72+ int edid_mode_count;
7073 };
7174
7275 /**
@@ -371,7 +374,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp, · 298 unmodified lines
371374 int recv_bytes;
372375 uint32_t status;
373376 uint32_t aux_clock_divider;
374− int try, precharge = 5;
377+ int try, precharge;
375378
376379 intel_dp_check_edp(intel_dp);
377380 /* The clock divider is based off the hrawclk,
@@ -391,6 +394,11 @@ intel_dp_aux_ch(struct intel_dp *intel_dp, · 13 unmodified lines
391394 else
392395 aux_clock_divider = intel_hrawclk(dev) / 2;
393396
397+ if (IS_GEN6(dev))
398+ precharge = 3;
399+ else
400+ precharge = 5;
401+
394402 /* Try to wait for any previous AUX channel activity */
395403 for (try = 0; try < 3; try++) {
396404 status = I915_READ(ch_ctl);
@@ -1973,6 +1981,8 @@ intel_dp_probe_oui(struct intel_dp *intel_dp) · 1576 unmodified lines
19731981 if (!(intel_dp->dpcd[DP_DOWN_STREAM_PORT_COUNT] & DP_OUI_SUPPORT))
19741982 return;
19751983
1984+ ironlake_edp_panel_vdd_on(intel_dp);
1985+
19761986 if (intel_dp_aux_native_read_retry(intel_dp, DP_SINK_OUI, buf, 3))
19771987 DRM_DEBUG_KMS("Sink OUI: %02hx%02hx%02hx\n",
19781988 buf[0], buf[1], buf[2]);
@@ -1980,6 +1990,8 @@ intel_dp_probe_oui(struct intel_dp *intel_dp) · 1 unmodified line
19801990 if (intel_dp_aux_native_read_retry(intel_dp, DP_BRANCH_OUI, buf, 3))
19811991 DRM_DEBUG_KMS("Branch OUI: %02hx%02hx%02hx\n",
19821992 buf[0], buf[1], buf[2]);
1993+
1994+ ironlake_edp_panel_vdd_off(intel_dp, false);
19831995 }
19841996
19851997 static bool
@@ -2116,10 +2128,22 @@ intel_dp_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) · 130 unmodified lines
21162128 {
21172129 struct intel_dp *intel_dp = intel_attached_dp(connector);
21182130 struct edid *edid;
2131+ int size;
2132+
2133+ if (is_edp(intel_dp)) {
2134+ if (!intel_dp->edid)
2135+ return NULL;
2136+
2137+ size = (intel_dp->edid->extensions + 1) * EDID_LENGTH;
2138+ edid = kmalloc(size, GFP_KERNEL);
2139+ if (!edid)
2140+ return NULL;
2141+
2142+ memcpy(edid, intel_dp->edid, size);
2143+ return edid;
2144+ }
21192145
2120− ironlake_edp_panel_vdd_on(intel_dp);
21212146 edid = drm_get_edid(connector, adapter);
2122− ironlake_edp_panel_vdd_off(intel_dp, false);
21232147 return edid;
21242148 }
21252149
@@ -2129,9 +2153,17 @@ intel_dp_get_edid_modes(struct drm_connector *connector, struct i2c_adapter *ada · 3 unmodified lines
21292153 struct intel_dp *intel_dp = intel_attached_dp(connector);
21302154 int ret;
21312155
2132− ironlake_edp_panel_vdd_on(intel_dp);
2156+ if (is_edp(intel_dp)) {
2157+ drm_mode_connector_update_edid_property(connector,
2158+ intel_dp->edid);
2159+ ret = drm_add_edid_modes(connector, intel_dp->edid);
2160+ drm_edid_to_eld(connector,
2161+ intel_dp->edid);
2162+ connector->display_info.raw_edid = NULL;
2163+ return intel_dp->edid_mode_count;
2164+ }
2165+
21332166 ret = intel_ddc_get_modes(connector, adapter);
2134− ironlake_edp_panel_vdd_off(intel_dp, false);
21352167 return ret;
21362168 }
21372169
@@ -2321,6 +2353,7 @@ static void intel_dp_encoder_destroy(struct drm_encoder *encoder) · 183 unmodified lines
23212353 i2c_del_adapter(&intel_dp->adapter);
23222354 drm_encoder_cleanup(encoder);
23232355 if (is_edp(intel_dp)) {
2356+ kfree(intel_dp->edid);
23242357 cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
23252358 ironlake_panel_vdd_off_sync(intel_dp);
23262359 }
@@ -2504,11 +2537,14 @@ intel_dp_init(struct drm_device *dev, int output_reg) · 177 unmodified lines
25042537 break;
25052538 }
25062539
2540+ intel_dp_i2c_init(intel_dp, intel_connector, name);
2541+
25072542 /* Cache some DPCD data in the eDP case */
25082543 if (is_edp(intel_dp)) {
25092544 bool ret;
25102545 struct edp_power_seq cur, vbt;
25112546 u32 pp_on, pp_off, pp_div;
2547+ struct edid *edid;
25122548
25132549 pp_on = I915_READ(PCH_PP_ON_DELAYS);
25142550 pp_off = I915_READ(PCH_PP_OFF_DELAYS);
@@ -2576,9 +2612,19 @@ intel_dp_init(struct drm_device *dev, int output_reg) · 61 unmodified lines
25762612 intel_dp_destroy(&intel_connector->base);
25772613 return;
25782614 }
2579− }
25802615
2581− intel_dp_i2c_init(intel_dp, intel_connector, name);
2616+ ironlake_edp_panel_vdd_on(intel_dp);
2617+ edid = drm_get_edid(connector, &intel_dp->adapter);
2618+ if (edid) {
2619+ drm_mode_connector_update_edid_property(connector,
2620+ edid);
2621+ intel_dp->edid_mode_count =
2622+ drm_add_edid_modes(connector, edid);
2623+ drm_edid_to_eld(connector, edid);
2624+ intel_dp->edid = edid;
2625+ }
2626+ ironlake_edp_panel_vdd_off(intel_dp, false);
2627+ }
25822628
25832629 intel_encoder->hot_plug = intel_dp_hot_plug;
25842630
drivers/gpu/drm/radeon/atombios_crtc.c+9−1
@@ -1149,7 +1149,9 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc, · 1148 unmodified lines
11491149 }
11501150
11511151 if (tiling_flags & RADEON_TILING_MACRO) {
1152− if (rdev->family >= CHIP_CAYMAN)
1152+ if (rdev->family >= CHIP_TAHITI)
1153+ tmp = rdev->config.si.tile_config;
1154+ else if (rdev->family >= CHIP_CAYMAN)
11531155 tmp = rdev->config.cayman.tile_config;
11541156 else
11551157 tmp = rdev->config.evergreen.tile_config;
@@ -1177,6 +1179,12 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc, · 21 unmodified lines
11771179 } else if (tiling_flags & RADEON_TILING_MICRO)
11781180 fb_format |= EVERGREEN_GRPH_ARRAY_MODE(EVERGREEN_GRPH_ARRAY_1D_TILED_THIN1);
11791181
1182+ if ((rdev->family == CHIP_TAHITI) ||
1183+ (rdev->family == CHIP_PITCAIRN))
1184+ fb_format |= SI_GRPH_PIPE_CONFIG(SI_ADDR_SURF_P8_32x32_8x16);
1185+ else if (rdev->family == CHIP_VERDE)
1186+ fb_format |= SI_GRPH_PIPE_CONFIG(SI_ADDR_SURF_P4_8x16);
1187+
11801188 switch (radeon_crtc->crtc_id) {
11811189 case 0:
11821190 WREG32(AVIVO_D1VGA_CONTROL, 0);
drivers/gpu/drm/radeon/atombios_encoders.c+3−1
@@ -1926,7 +1926,9 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder, · 1925 unmodified lines
19261926
19271927 if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) {
19281928 r600_hdmi_enable(encoder);
1929− if (ASIC_IS_DCE4(rdev))
1929+ if (ASIC_IS_DCE6(rdev))
1930+ ; /* TODO (use pointers instead of if-s?) */
1931+ else if (ASIC_IS_DCE4(rdev))
19301932 evergreen_hdmi_setmode(encoder, adjusted_mode);
19311933 else
19321934 r600_hdmi_setmode(encoder, adjusted_mode);
drivers/gpu/drm/radeon/evergreen.c+3−0
@@ -1932,6 +1932,9 @@ static void evergreen_gpu_init(struct radeon_device *rdev) · 1931 unmodified lines
19321932 smx_dc_ctl0 |= NUMBER_OF_SETS(rdev->config.evergreen.sx_num_of_sets);
19331933 WREG32(SMX_DC_CTL0, smx_dc_ctl0);
19341934
1935+ if (rdev->family <= CHIP_SUMO2)
1936+ WREG32(SMX_SAR_CTL0, 0x00010000);
1937+
19351938 WREG32(SX_EXPORT_BUFFER_SIZES, (COLOR_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_size / 4) - 1) |
19361939 POSITION_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_pos_size / 4) - 1) |
19371940 SMX_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_smx_size / 4) - 1)));
drivers/gpu/drm/radeon/evergreen_hdmi.c+0−3
@@ -156,9 +156,6 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode · 155 unmodified lines
156156 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
157157 uint32_t offset;
158158
159− if (ASIC_IS_DCE5(rdev))
160− return;
161−
162159 /* Silent, r600_hdmi_enable will raise WARN for us */
163160 if (!dig->afmt->enabled)
164161 return;
drivers/gpu/drm/radeon/evergreend.h+1−0
@@ -503,6 +503,7 @@ · 502 unmodified lines
503503 #define SCRATCH_UMSK 0x8540
504504 #define SCRATCH_ADDR 0x8544
505505
506+#define SMX_SAR_CTL0 0xA008
506507 #define SMX_DC_CTL0 0xA020
507508 #define USE_HASH_FUNCTION (1 << 0)
508509 #define NUMBER_OF_SETS(x) ((x) << 1)
drivers/gpu/drm/radeon/ni.c+5−0
@@ -1303,6 +1303,10 @@ static int cayman_startup(struct radeon_device *rdev) · 1302 unmodified lines
13031303 if (r)
13041304 return r;
13051305
1306+ r = r600_audio_init(rdev);
1307+ if (r)
1308+ return r;
1309+
13061310 return 0;
13071311 }
13081312
@@ -1329,6 +1333,7 @@ int cayman_resume(struct radeon_device *rdev) · 20 unmodified lines
13291333
13301334 int cayman_suspend(struct radeon_device *rdev)
13311335 {
1336+ r600_audio_fini(rdev);
13321337 /* FIXME: we should wait for ring to be empty */
13331338 radeon_ib_pool_suspend(rdev);
13341339 radeon_vm_manager_suspend(rdev);
drivers/gpu/drm/radeon/r600.c+1−0
@@ -1839,6 +1839,7 @@ void r600_gpu_init(struct radeon_device *rdev) · 1838 unmodified lines
18391839 WREG32(PA_CL_ENHANCE, (CLIP_VTX_REORDER_ENA |
18401840 NUM_CLIP_SEQ(3)));
18411841 WREG32(PA_SC_ENHANCE, FORCE_EOV_MAX_CLK_CNT(4095));
1842+ WREG32(VC_ENHANCE, 0);
18421843 }
18431844
18441845
drivers/gpu/drm/radeon/r600_audio.c+1−1
@@ -57,7 +57,7 @@ static bool radeon_dig_encoder(struct drm_encoder *encoder) · 56 unmodified lines
5757 */
5858 static int r600_audio_chipset_supported(struct radeon_device *rdev)
5959 {
60− return (rdev->family >= CHIP_R600 && !ASIC_IS_DCE5(rdev))
60+ return (rdev->family >= CHIP_R600 && !ASIC_IS_DCE6(rdev))
6161 || rdev->family == CHIP_RS600
6262 || rdev->family == CHIP_RS690
6363 || rdev->family == CHIP_RS740;
drivers/gpu/drm/radeon/r600_cs.c+42−0
@@ -2079,6 +2079,48 @@ static int r600_packet3_check(struct radeon_cs_parser *p, · 2078 unmodified lines
20792079 return -EINVAL;
20802080 }
20812081 break;
2082+ case PACKET3_STRMOUT_BASE_UPDATE:
2083+ if (p->family < CHIP_RV770) {
2084+ DRM_ERROR("STRMOUT_BASE_UPDATE only supported on 7xx\n");
2085+ return -EINVAL;
2086+ }
2087+ if (pkt->count != 1) {
2088+ DRM_ERROR("bad STRMOUT_BASE_UPDATE packet count\n");
2089+ return -EINVAL;
2090+ }
2091+ if (idx_value > 3) {
2092+ DRM_ERROR("bad STRMOUT_BASE_UPDATE index\n");
2093+ return -EINVAL;
2094+ }
2095+ {
2096+ u64 offset;
2097+
2098+ r = r600_cs_packet_next_reloc(p, &reloc);
2099+ if (r) {
2100+ DRM_ERROR("bad STRMOUT_BASE_UPDATE reloc\n");
2101+ return -EINVAL;
2102+ }
2103+
2104+ if (reloc->robj != track->vgt_strmout_bo[idx_value]) {
2105+ DRM_ERROR("bad STRMOUT_BASE_UPDATE, bo does not match\n");
2106+ return -EINVAL;
2107+ }
2108+
2109+ offset = radeon_get_ib_value(p, idx+1) << 8;
2110+ if (offset != track->vgt_strmout_bo_offset[idx_value]) {
2111+ DRM_ERROR("bad STRMOUT_BASE_UPDATE, bo offset does not match: 0x%llx, 0x%x\n",
2112+ offset, track->vgt_strmout_bo_offset[idx_value]);
2113+ return -EINVAL;
2114+ }
2115+
2116+ if ((offset + 4) > radeon_bo_size(reloc->robj)) {
2117+ DRM_ERROR("bad STRMOUT_BASE_UPDATE bo too small: 0x%llx, 0x%lx\n",
2118+ offset + 4, radeon_bo_size(reloc->robj));
2119+ return -EINVAL;
2120+ }
2121+ ib[idx+1] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff);
2122+ }
2123+ break;
20822124 case PACKET3_SURFACE_BASE_UPDATE:
20832125 if (p->family >= CHIP_RV770 || p->family == CHIP_R600) {
20842126 DRM_ERROR("bad SURFACE_BASE_UPDATE\n");
drivers/gpu/drm/radeon/r600_hdmi.c+2−5
@@ -322,9 +322,6 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod · 321 unmodified lines
322322 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
323323 uint32_t offset;
324324
325− if (ASIC_IS_DCE5(rdev))
326− return;
327−
328325 /* Silent, r600_hdmi_enable will raise WARN for us */
329326 if (!dig->afmt->enabled)
330327 return;
@@ -483,7 +480,7 @@ void r600_hdmi_enable(struct drm_encoder *encoder) · 152 unmodified lines
483480 uint32_t offset;
484481 u32 hdmi;
485482
486− if (ASIC_IS_DCE5(rdev))
483+ if (ASIC_IS_DCE6(rdev))
487484 return;
488485
489486 /* Silent, r600_hdmi_enable will raise WARN for us */
@@ -543,7 +540,7 @@ void r600_hdmi_disable(struct drm_encoder *encoder) · 53 unmodified lines
543540 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
544541 uint32_t offset;
545542
546− if (ASIC_IS_DCE5(rdev))
543+ if (ASIC_IS_DCE6(rdev))
547544 return;
548545
549546 /* Called for ATOM_ENCODER_MODE_HDMI only */
drivers/gpu/drm/radeon/r600d.h+2−0
@@ -485,6 +485,7 @@ · 484 unmodified lines
485485 #define TC_L2_SIZE(x) ((x)<<5)
486486 #define L2_DISABLE_LATE_HIT (1<<9)
487487
488+#define VC_ENHANCE 0x9714
488489
489490 #define VGT_CACHE_INVALIDATION 0x88C4
490491 #define CACHE_INVALIDATION(x) ((x)<<0)
@@ -1163,6 +1164,7 @@ · 672 unmodified lines
11631164 #define PACKET3_SET_CTL_CONST 0x6F
11641165 #define PACKET3_SET_CTL_CONST_OFFSET 0x0003cff0
11651166 #define PACKET3_SET_CTL_CONST_END 0x0003e200
1167+#define PACKET3_STRMOUT_BASE_UPDATE 0x72 /* r7xx */
11661168 #define PACKET3_SURFACE_BASE_UPDATE 0x73
11671169
11681170
drivers/gpu/drm/radeon/radeon_drv.c+2−1
@@ -58,9 +58,10 @@ · 57 unmodified lines
5858 * 2.14.0 - add evergreen tiling informations
5959 * 2.15.0 - add max_pipes query
6060 * 2.16.0 - fix evergreen 2D tiled surface calculation
61+ * 2.17.0 - add STRMOUT_BASE_UPDATE for r7xx
6162 */
6263 #define KMS_DRIVER_MAJOR 2
63−#define KMS_DRIVER_MINOR 16
64+#define KMS_DRIVER_MINOR 17
6465 #define KMS_DRIVER_PATCHLEVEL 0
6566 int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
6667 int radeon_driver_unload_kms(struct drm_device *dev);
drivers/gpu/drm/radeon/radeon_pm.c+7−3
@@ -801,9 +801,13 @@ static void radeon_dynpm_idle_work_handler(struct work_struct *work) · 800 unmodified lines
801801 int i;
802802
803803 for (i = 0; i < RADEON_NUM_RINGS; ++i) {
804− not_processed += radeon_fence_count_emitted(rdev, i);
805− if (not_processed >= 3)
806− break;
804+ struct radeon_ring *ring = &rdev->ring[i];
805+
806+ if (ring->ready) {
807+ not_processed += radeon_fence_count_emitted(rdev, i);
808+ if (not_processed >= 3)
809+ break;
810+ }
807811 }
808812
809813 if (not_processed >= 3) { /* should upclock */
drivers/gpu/drm/radeon/radeon_prime.c+8−2
@@ -169,11 +169,17 @@ struct dma_buf *radeon_gem_prime_export(struct drm_device *dev, · 168 unmodified lines
169169 struct radeon_bo *bo = gem_to_radeon_bo(obj);
170170 int ret = 0;
171171
172+ ret = radeon_bo_reserve(bo, false);
173+ if (unlikely(ret != 0))
174+ return ERR_PTR(ret);
175+
172176 /* pin buffer into GTT */
173177 ret = radeon_bo_pin(bo, RADEON_GEM_DOMAIN_GTT, NULL);
174− if (ret)
178+ if (ret) {
179+ radeon_bo_unreserve(bo);
175180 return ERR_PTR(ret);
176−
181+ }
182+ radeon_bo_unreserve(bo);
177183 return dma_buf_export(bo, &radeon_dmabuf_ops, obj->size, flags);
178184 }
179185
drivers/gpu/drm/radeon/rv770.c+4−1
@@ -616,6 +616,9 @@ static void rv770_gpu_init(struct radeon_device *rdev) · 615 unmodified lines
616616 ACK_FLUSH_CTL(3) |
617617 SYNC_FLUSH_CTL));
618618
619+ if (rdev->family != CHIP_RV770)
620+ WREG32(SMX_SAR_CTL0, 0x00003f3f);
621+
619622 db_debug3 = RREG32(DB_DEBUG3);
620623 db_debug3 &= ~DB_CLK_OFF_DELAY(0x1f);
621624 switch (rdev->family) {
@@ -792,7 +795,7 @@ static void rv770_gpu_init(struct radeon_device *rdev) · 170 unmodified lines
792795
793796 WREG32(PA_CL_ENHANCE, (CLIP_VTX_REORDER_ENA |
794797 NUM_CLIP_SEQ(3)));
795−
798+ WREG32(VC_ENHANCE, 0);
796799 }
797800
798801 void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc)
drivers/gpu/drm/radeon/rv770d.h+3−0
@@ -211,6 +211,7 @@ · 210 unmodified lines
211211 #define SCRATCH_UMSK 0x8540
212212 #define SCRATCH_ADDR 0x8544
213213
214+#define SMX_SAR_CTL0 0xA008
214215 #define SMX_DC_CTL0 0xA020
215216 #define USE_HASH_FUNCTION (1 << 0)
216217 #define CACHE_DEPTH(x) ((x) << 1)
@@ -310,6 +311,8 @@ · 93 unmodified lines
310311 #define TCP_CNTL 0x9610
311312 #define TCP_CHAN_STEER 0x9614
312313
314+#define VC_ENHANCE 0x9714
315+
313316 #define VGT_CACHE_INVALIDATION 0x88C4
314317 #define CACHE_INVALIDATION(x) ((x)<<0)
315318 #define VC_ONLY 0
drivers/gpu/drm/radeon/si_reg.h+72−0
@@ -30,4 +30,76 @@ · 29 unmodified lines
3030 #define SI_DC_GPIO_HPD_EN 0x65b8
3131 #define SI_DC_GPIO_HPD_Y 0x65bc
3232
33+#define SI_GRPH_CONTROL 0x6804
34+# define SI_GRPH_DEPTH(x) (((x) & 0x3) << 0)
35+# define SI_GRPH_DEPTH_8BPP 0
36+# define SI_GRPH_DEPTH_16BPP 1
37+# define SI_GRPH_DEPTH_32BPP 2
38+# define SI_GRPH_NUM_BANKS(x) (((x) & 0x3) << 2)
39+# define SI_ADDR_SURF_2_BANK 0
40+# define SI_ADDR_SURF_4_BANK 1
41+# define SI_ADDR_SURF_8_BANK 2
42+# define SI_ADDR_SURF_16_BANK 3
43+# define SI_GRPH_Z(x) (((x) & 0x3) << 4)
44+# define SI_GRPH_BANK_WIDTH(x) (((x) & 0x3) << 6)
45+# define SI_ADDR_SURF_BANK_WIDTH_1 0
46+# define SI_ADDR_SURF_BANK_WIDTH_2 1
47+# define SI_ADDR_SURF_BANK_WIDTH_4 2
48+# define SI_ADDR_SURF_BANK_WIDTH_8 3
49+# define SI_GRPH_FORMAT(x) (((x) & 0x7) << 8)
50+/* 8 BPP */
51+# define SI_GRPH_FORMAT_INDEXED 0
52+/* 16 BPP */
53+# define SI_GRPH_FORMAT_ARGB1555 0
54+# define SI_GRPH_FORMAT_ARGB565 1
55+# define SI_GRPH_FORMAT_ARGB4444 2
56+# define SI_GRPH_FORMAT_AI88 3
57+# define SI_GRPH_FORMAT_MONO16 4
58+# define SI_GRPH_FORMAT_BGRA5551 5
59+/* 32 BPP */
60+# define SI_GRPH_FORMAT_ARGB8888 0
61+# define SI_GRPH_FORMAT_ARGB2101010 1
62+# define SI_GRPH_FORMAT_32BPP_DIG 2
63+# define SI_GRPH_FORMAT_8B_ARGB2101010 3
64+# define SI_GRPH_FORMAT_BGRA1010102 4
65+# define SI_GRPH_FORMAT_8B_BGRA1010102 5
66+# define SI_GRPH_FORMAT_RGB111110 6
67+# define SI_GRPH_FORMAT_BGR101111 7
68+# define SI_GRPH_BANK_HEIGHT(x) (((x) & 0x3) << 11)
69+# define SI_ADDR_SURF_BANK_HEIGHT_1 0
70+# define SI_ADDR_SURF_BANK_HEIGHT_2 1
71+# define SI_ADDR_SURF_BANK_HEIGHT_4 2
72+# define SI_ADDR_SURF_BANK_HEIGHT_8 3
73+# define SI_GRPH_TILE_SPLIT(x) (((x) & 0x7) << 13)
74+# define SI_ADDR_SURF_TILE_SPLIT_64B 0
75+# define SI_ADDR_SURF_TILE_SPLIT_128B 1
76+# define SI_ADDR_SURF_TILE_SPLIT_256B 2
77+# define SI_ADDR_SURF_TILE_SPLIT_512B 3
78+# define SI_ADDR_SURF_TILE_SPLIT_1KB 4
79+# define SI_ADDR_SURF_TILE_SPLIT_2KB 5
80+# define SI_ADDR_SURF_TILE_SPLIT_4KB 6
81+# define SI_GRPH_MACRO_TILE_ASPECT(x) (((x) & 0x3) << 18)
82+# define SI_ADDR_SURF_MACRO_TILE_ASPECT_1 0
83+# define SI_ADDR_SURF_MACRO_TILE_ASPECT_2 1
84+# define SI_ADDR_SURF_MACRO_TILE_ASPECT_4 2
85+# define SI_ADDR_SURF_MACRO_TILE_ASPECT_8 3
86+# define SI_GRPH_ARRAY_MODE(x) (((x) & 0x7) << 20)
87+# define SI_GRPH_ARRAY_LINEAR_GENERAL 0
88+# define SI_GRPH_ARRAY_LINEAR_ALIGNED 1
89+# define SI_GRPH_ARRAY_1D_TILED_THIN1 2
90+# define SI_GRPH_ARRAY_2D_TILED_THIN1 4
91+# define SI_GRPH_PIPE_CONFIG(x) (((x) & 0x1f) << 24)
92+# define SI_ADDR_SURF_P2 0
93+# define SI_ADDR_SURF_P4_8x16 4
94+# define SI_ADDR_SURF_P4_16x16 5
95+# define SI_ADDR_SURF_P4_16x32 6
96+# define SI_ADDR_SURF_P4_32x32 7
97+# define SI_ADDR_SURF_P8_16x16_8x16 8
98+# define SI_ADDR_SURF_P8_16x32_8x16 9
99+# define SI_ADDR_SURF_P8_32x32_8x16 10
100+# define SI_ADDR_SURF_P8_16x32_16x16 11
101+# define SI_ADDR_SURF_P8_32x32_16x16 12
102+# define SI_ADDR_SURF_P8_32x32_16x32 13
103+# define SI_ADDR_SURF_P8_32x64_32x32 14
104+
33105 #endif
drivers/gpu/drm/sis/sis_drv.c+1−1
@@ -47,9 +47,9 @@ static int sis_driver_load(struct drm_device *dev, unsigned long chipset) · 46 unmodified lines
4747 if (dev_priv == NULL)
4848 return -ENOMEM;
4949
50+ idr_init(&dev_priv->object_idr);
5051 dev->dev_private = (void *)dev_priv;
5152 dev_priv->chipset = chipset;
52− idr_init(&dev->object_name_idr);
5353
5454 return 0;
5555 }
drivers/gpu/drm/udl/udl_drv.c+14−1
@@ -13,8 +13,21 @@ · 12 unmodified lines
1313
1414 static struct drm_driver driver;
1515
16+/*
17+ * There are many DisplayLink-based graphics products, all with unique PIDs.
18+ * So we match on DisplayLink's VID + Vendor-Defined Interface Class (0xff)
19+ * We also require a match on SubClass (0x00) and Protocol (0x00),
20+ * which is compatible with all known USB 2.0 era graphics chips and firmware,
21+ * but allows DisplayLink to increment those for any future incompatible chips
22+ */
1623 static struct usb_device_id id_table[] = {
17− {.idVendor = 0x17e9, .match_flags = USB_DEVICE_ID_MATCH_VENDOR,},
24+ {.idVendor = 0x17e9, .bInterfaceClass = 0xff,
25+ .bInterfaceSubClass = 0x00,
26+ .bInterfaceProtocol = 0x00,
27+ .match_flags = USB_DEVICE_ID_MATCH_VENDOR |
28+ USB_DEVICE_ID_MATCH_INT_CLASS |
29+ USB_DEVICE_ID_MATCH_INT_SUBCLASS |
30+ USB_DEVICE_ID_MATCH_INT_PROTOCOL,},
1831 {},
1932 };
2033 MODULE_DEVICE_TABLE(usb, id_table);
drivers/gpu/drm/via/via_map.c+1−2
@@ -100,12 +100,11 @@ int via_driver_load(struct drm_device *dev, unsigned long chipset) · 99 unmodified lines
100100 if (dev_priv == NULL)
101101 return -ENOMEM;
102102
103+ idr_init(&dev_priv->object_idr);
103104 dev->dev_private = (void *)dev_priv;
104105
105106 dev_priv->chipset = chipset;
106107
107− idr_init(&dev->object_name_idr);
108−
109108 pci_set_master(dev->pdev);
110109
111110 ret = drm_vblank_init(dev, 1);
drivers/hwmon/applesmc.c+2−2
@@ -215,7 +215,7 @@ static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len) · 214 unmodified lines
215215 int i;
216216
217217 if (send_command(cmd) || send_argument(key)) {
218− pr_warn("%s: read arg fail\n", key);
218+ pr_warn("%.4s: read arg fail\n", key);
219219 return -EIO;
220220 }
221221
@@ -223,7 +223,7 @@ static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len) · 1 unmodified line
223223
224224 for (i = 0; i < len; i++) {
225225 if (__wait_status(0x05)) {
226− pr_warn("%s: read data fail\n", key);
226+ pr_warn("%.4s: read data fail\n", key);
227227 return -EIO;
228228 }
229229 buffer[i] = inb(APPLESMC_DATA_PORT);
drivers/hwmon/coretemp.c+31−2
@@ -191,6 +191,24 @@ static ssize_t show_temp(struct device *dev, · 190 unmodified lines
191191 return tdata->valid ? sprintf(buf, "%d\n", tdata->temp) : -EAGAIN;
192192 }
193193
194+struct tjmax {
195+ char const *id;
196+ int tjmax;
197+};
198+
199+static struct tjmax __cpuinitconst tjmax_table[] = {
200+ { "CPU D410", 100000 },
201+ { "CPU D425", 100000 },
202+ { "CPU D510", 100000 },
203+ { "CPU D525", 100000 },
204+ { "CPU N450", 100000 },
205+ { "CPU N455", 100000 },
206+ { "CPU N470", 100000 },
207+ { "CPU N475", 100000 },
208+ { "CPU 230", 100000 },
209+ { "CPU 330", 125000 },
210+};
211+
194212 static int __cpuinit adjust_tjmax(struct cpuinfo_x86 *c, u32 id,
195213 struct device *dev)
196214 {
@@ -202,6 +220,13 @@ static int __cpuinit adjust_tjmax(struct cpuinfo_x86 *c, u32 id, · 5 unmodified lines
202220 int err;
203221 u32 eax, edx;
204222 struct pci_dev *host_bridge;
223+ int i;
224+
225+ /* explicit tjmax table entries override heuristics */
226+ for (i = 0; i < ARRAY_SIZE(tjmax_table); i++) {
227+ if (strstr(c->x86_model_id, tjmax_table[i].id))
228+ return tjmax_table[i].tjmax;
229+ }
205230
206231 /* Early chips have no MSR for TjMax */
207232
@@ -210,7 +235,8 @@ static int __cpuinit adjust_tjmax(struct cpuinfo_x86 *c, u32 id, · 2 unmodified lines
210235
211236 /* Atom CPUs */
212237
213− if (c->x86_model == 0x1c) {
238+ if (c->x86_model == 0x1c || c->x86_model == 0x26
239+ || c->x86_model == 0x27) {
214240 usemsr_ee = 0;
215241
216242 host_bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0));
@@ -223,6 +249,9 @@ static int __cpuinit adjust_tjmax(struct cpuinfo_x86 *c, u32 id, · 6 unmodified lines
223249 tjmax = 90000;
224250
225251 pci_dev_put(host_bridge);
252+ } else if (c->x86_model == 0x36) {
253+ usemsr_ee = 0;
254+ tjmax = 100000;
226255 }
227256
228257 if (c->x86_model > 0xe && usemsr_ee) {
@@ -772,7 +801,7 @@ MODULE_DEVICE_TABLE(x86cpu, coretemp_ids); · 543 unmodified lines
772801
773802 static int __init coretemp_init(void)
774803 {
775− int i, err = -ENODEV;
804+ int i, err;
776805
777806 /*
778807 * CPUID.06H.EAX[0] indicates whether the CPU has thermal
drivers/hwmon/emc2103.c+8−4
@@ -451,11 +451,15 @@ static ssize_t set_pwm_enable(struct device *dev, struct device_attribute *da, · 450 unmodified lines
451451 data->fan_rpm_control = true;
452452 break;
453453 default:
454− mutex_unlock(&data->update_lock);
455− return -EINVAL;
454+ count = -EINVAL;
455+ goto err;
456456 }
457457
458− read_u8_from_i2c(client, REG_FAN_CONF1, &conf_reg);
458+ result = read_u8_from_i2c(client, REG_FAN_CONF1, &conf_reg);
459+ if (result) {
460+ count = result;
461+ goto err;
462+ }
459463
460464 if (data->fan_rpm_control)
461465 conf_reg |= 0x80;
@@ -463,7 +467,7 @@ static ssize_t set_pwm_enable(struct device *dev, struct device_attribute *da, · 1 unmodified line
463467 conf_reg &= ~0x80;
464468
465469 i2c_smbus_write_byte_data(client, REG_FAN_CONF1, conf_reg);
466−
470+err:
467471 mutex_unlock(&data->update_lock);
468472 return count;
469473 }
drivers/iio/Kconfig+1−2
@@ -8,8 +8,7 @@ menuconfig IIO · 7 unmodified lines
88 help
99 The industrial I/O subsystem provides a unified framework for
1010 drivers for many different types of embedded sensors using a
11− number of different physical interfaces (i2c, spi, etc). See
12− Documentation/iio for more information.
11+ number of different physical interfaces (i2c, spi, etc).
1312
1413 if IIO
1514
drivers/iio/industrialio-core.c+9−7
@@ -661,7 +661,6 @@ static int iio_device_register_sysfs(struct iio_dev *indio_dev) · 660 unmodified lines
661661 * New channel registration method - relies on the fact a group does
662662 * not need to be initialized if it is name is NULL.
663663 */
664− INIT_LIST_HEAD(&indio_dev->channel_attr_list);
665664 if (indio_dev->channels)
666665 for (i = 0; i < indio_dev->num_channels; i++) {
667666 ret = iio_device_add_channel_sysfs(indio_dev,
@@ -725,12 +724,16 @@ static void iio_device_unregister_sysfs(struct iio_dev *indio_dev) · 57 unmodified lines
725724 static void iio_dev_release(struct device *device)
726725 {
727726 struct iio_dev *indio_dev = dev_to_iio_dev(device);
728− cdev_del(&indio_dev->chrdev);
727+ if (indio_dev->chrdev.dev)
728+ cdev_del(&indio_dev->chrdev);
729729 if (indio_dev->modes & INDIO_BUFFER_TRIGGERED)
730730 iio_device_unregister_trigger_consumer(indio_dev);
731731 iio_device_unregister_eventset(indio_dev);
732732 iio_device_unregister_sysfs(indio_dev);
733733 iio_device_unregister_debugfs(indio_dev);
734+
735+ ida_simple_remove(&iio_ida, indio_dev->id);
736+ kfree(indio_dev);
734737 }
735738
736739 static struct device_type iio_dev_type = {
@@ -761,6 +764,7 @@ struct iio_dev *iio_device_alloc(int sizeof_priv) · 24 unmodified lines
761764 dev_set_drvdata(&dev->dev, (void *)dev);
762765 mutex_init(&dev->mlock);
763766 mutex_init(&dev->info_exist_lock);
767+ INIT_LIST_HEAD(&dev->channel_attr_list);
764768
765769 dev->id = ida_simple_get(&iio_ida, 0, 0, GFP_KERNEL);
766770 if (dev->id < 0) {
@@ -778,10 +782,8 @@ EXPORT_SYMBOL(iio_device_alloc); · 11 unmodified lines
778782
779783 void iio_device_free(struct iio_dev *dev)
780784 {
781− if (dev) {
782− ida_simple_remove(&iio_ida, dev->id);
783− kfree(dev);
784− }
785+ if (dev)
786+ put_device(&dev->dev);
785787 }
786788 EXPORT_SYMBOL(iio_device_free);
787789
@@ -902,7 +904,7 @@ void iio_device_unregister(struct iio_dev *indio_dev) · 114 unmodified lines
902904 mutex_lock(&indio_dev->info_exist_lock);
903905 indio_dev->info = NULL;
904906 mutex_unlock(&indio_dev->info_exist_lock);
905− device_unregister(&indio_dev->dev);
907+ device_del(&indio_dev->dev);
906908 }
907909 EXPORT_SYMBOL(iio_device_unregister);
908910 subsys_initcall(iio_init);
drivers/infiniband/core/cma.c+1−1
@@ -1184,7 +1184,7 @@ static void cma_set_req_event_data(struct rdma_cm_event *event, · 1183 unmodified lines
11841184
11851185 static int cma_check_req_qp_type(struct rdma_cm_id *id, struct ib_cm_event *ib_event)
11861186 {
1187− return (((ib_event->event == IB_CM_REQ_RECEIVED) ||
1187+ return (((ib_event->event == IB_CM_REQ_RECEIVED) &&
11881188 (ib_event->param.req_rcvd.qp_type == id->qp_type)) ||
11891189 ((ib_event->event == IB_CM_SIDR_REQ_RECEIVED) &&
11901190 (id->qp_type == IB_QPT_UD)) ||
drivers/infiniband/hw/ocrdma/ocrdma.h+1−0
@@ -61,6 +61,7 @@ struct ocrdma_dev_attr { · 60 unmodified lines
6161 u32 max_inline_data;
6262 int max_send_sge;
6363 int max_recv_sge;
64+ int max_srq_sge;
6465 int max_mr;
6566 u64 max_mr_size;
6667 u32 max_num_mr_pbl;
drivers/infiniband/hw/ocrdma/ocrdma_hw.c+8−10
@@ -990,8 +990,6 @@ static void ocrdma_get_attr(struct ocrdma_dev *dev, · 989 unmodified lines
990990 struct ocrdma_dev_attr *attr,
991991 struct ocrdma_mbx_query_config *rsp)
992992 {
993− int max_q_mem;
994−
995993 attr->max_pd =
996994 (rsp->max_pd_ca_ack_delay & OCRDMA_MBX_QUERY_CFG_MAX_PD_MASK) >>
997995 OCRDMA_MBX_QUERY_CFG_MAX_PD_SHIFT;
@@ -1004,6 +1002,9 @@ static void ocrdma_get_attr(struct ocrdma_dev *dev, · 6 unmodified lines
10041002 attr->max_recv_sge = (rsp->max_write_send_sge &
10051003 OCRDMA_MBX_QUERY_CFG_MAX_SEND_SGE_MASK) >>
10061004 OCRDMA_MBX_QUERY_CFG_MAX_SEND_SGE_SHIFT;
1005+ attr->max_srq_sge = (rsp->max_srq_rqe_sge &
1006+ OCRDMA_MBX_QUERY_CFG_MAX_SRQ_SGE_MASK) >>
1007+ OCRDMA_MBX_QUERY_CFG_MAX_SRQ_SGE_OFFSET;
10071008 attr->max_ord_per_qp = (rsp->max_ird_ord_per_qp &
10081009 OCRDMA_MBX_QUERY_CFG_MAX_ORD_PER_QP_MASK) >>
10091010 OCRDMA_MBX_QUERY_CFG_MAX_ORD_PER_QP_SHIFT;
@@ -1037,18 +1038,15 @@ static void ocrdma_get_attr(struct ocrdma_dev *dev, · 27 unmodified lines
10371038 attr->max_inline_data =
10381039 attr->wqe_size - (sizeof(struct ocrdma_hdr_wqe) +
10391040 sizeof(struct ocrdma_sge));
1040− max_q_mem = OCRDMA_Q_PAGE_BASE_SIZE << (OCRDMA_MAX_Q_PAGE_SIZE_CNT - 1);
1041− /* hw can queue one less then the configured size,
1042− * so publish less by one to stack.
1043− */
10441041 if (dev->nic_info.dev_family == OCRDMA_GEN2_FAMILY) {
1045− dev->attr.max_wqe = max_q_mem / dev->attr.wqe_size;
10461042 attr->ird = 1;
10471043 attr->ird_page_size = OCRDMA_MIN_Q_PAGE_SIZE;
10481044 attr->num_ird_pages = MAX_OCRDMA_IRD_PAGES;
1049− } else
1050− dev->attr.max_wqe = (max_q_mem / dev->attr.wqe_size) - 1;
1051− dev->attr.max_rqe = (max_q_mem / dev->attr.rqe_size) - 1;
1045+ }
1046+ dev->attr.max_wqe = rsp->max_wqes_rqes_per_q >>
1047+ OCRDMA_MBX_QUERY_CFG_MAX_WQES_PER_WQ_OFFSET;
1048+ dev->attr.max_rqe = rsp->max_wqes_rqes_per_q &
1049+ OCRDMA_MBX_QUERY_CFG_MAX_RQES_PER_RQ_MASK;
10521050 }
10531051
10541052 static int ocrdma_check_fw_config(struct ocrdma_dev *dev,
drivers/infiniband/hw/ocrdma/ocrdma_main.c+34−29
@@ -97,13 +97,11 @@ static void ocrdma_build_sgid_mac(union ib_gid *sgid, unsigned char *mac_addr, · 96 unmodified lines
9797 sgid->raw[15] = mac_addr[5];
9898 }
9999
100−static void ocrdma_add_sgid(struct ocrdma_dev *dev, unsigned char *mac_addr,
100+static bool ocrdma_add_sgid(struct ocrdma_dev *dev, unsigned char *mac_addr,
101101 bool is_vlan, u16 vlan_id)
102102 {
103103 int i;
104− bool found = false;
105104 union ib_gid new_sgid;
106− int free_idx = OCRDMA_MAX_SGID;
107105 unsigned long flags;
108106
109107 memset(&ocrdma_zero_sgid, 0, sizeof(union ib_gid));
@@ -115,23 +113,19 @@ static void ocrdma_add_sgid(struct ocrdma_dev *dev, unsigned char *mac_addr, · 5 unmodified lines
115113 if (!memcmp(&dev->sgid_tbl[i], &ocrdma_zero_sgid,
116114 sizeof(union ib_gid))) {
117115 /* found free entry */
118− if (!found) {
119− free_idx = i;
120− found = true;
121− break;
122− }
116+ memcpy(&dev->sgid_tbl[i], &new_sgid,
117+ sizeof(union ib_gid));
118+ spin_unlock_irqrestore(&dev->sgid_lock, flags);
119+ return true;
123120 } else if (!memcmp(&dev->sgid_tbl[i], &new_sgid,
124121 sizeof(union ib_gid))) {
125122 /* entry already present, no addition is required. */
126123 spin_unlock_irqrestore(&dev->sgid_lock, flags);
127− return;
124+ return false;
128125 }
129126 }
130− /* if entry doesn't exist and if table has some space, add entry */
131− if (found)
132− memcpy(&dev->sgid_tbl[free_idx], &new_sgid,
133− sizeof(union ib_gid));
134127 spin_unlock_irqrestore(&dev->sgid_lock, flags);
128+ return false;
135129 }
136130
137131 static bool ocrdma_del_sgid(struct ocrdma_dev *dev, unsigned char *mac_addr,
@@ -167,7 +161,8 @@ static void ocrdma_add_default_sgid(struct ocrdma_dev *dev) · 29 unmodified lines
167161 ocrdma_get_guid(dev, &sgid->raw[8]);
168162 }
169163
170−static int ocrdma_build_sgid_tbl(struct ocrdma_dev *dev)
164+#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
165+static void ocrdma_add_vlan_sgids(struct ocrdma_dev *dev)
171166 {
172167 struct net_device *netdev, *tmp;
173168 u16 vlan_id;
@@ -175,8 +170,6 @@ static int ocrdma_build_sgid_tbl(struct ocrdma_dev *dev) · 1 unmodified line
175170
176171 netdev = dev->nic_info.netdev;
177172
178− ocrdma_add_default_sgid(dev);
179−
180173 rcu_read_lock();
181174 for_each_netdev_rcu(&init_net, tmp) {
182175 if (netdev == tmp || vlan_dev_real_dev(tmp) == netdev) {
@@ -194,10 +187,23 @@ static int ocrdma_build_sgid_tbl(struct ocrdma_dev *dev) · 11 unmodified lines
194187 }
195188 }
196189 rcu_read_unlock();
190+}
191+#else
192+static void ocrdma_add_vlan_sgids(struct ocrdma_dev *dev)
193+{
194+
195+}
196+#endif /* VLAN */
197+
198+static int ocrdma_build_sgid_tbl(struct ocrdma_dev *dev)
199+{
200+ ocrdma_add_default_sgid(dev);
201+ ocrdma_add_vlan_sgids(dev);
197202 return 0;
198203 }
199204
200−#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
205+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) || \
206+defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
201207
202208 static int ocrdma_inet6addr_event(struct notifier_block *notifier,
203209 unsigned long event, void *ptr)
@@ -208,6 +214,7 @@ static int ocrdma_inet6addr_event(struct notifier_block *notifier, · 4 unmodified lines
208214 struct ib_event gid_event;
209215 struct ocrdma_dev *dev;
210216 bool found = false;
217+ bool updated = false;
211218 bool is_vlan = false;
212219 u16 vid = 0;
213220
@@ -233,23 +240,21 @@ static int ocrdma_inet6addr_event(struct notifier_block *notifier, · 19 unmodified lines
233240 mutex_lock(&dev->dev_lock);
234241 switch (event) {
235242 case NETDEV_UP:
236− ocrdma_add_sgid(dev, netdev->dev_addr, is_vlan, vid);
243+ updated = ocrdma_add_sgid(dev, netdev->dev_addr, is_vlan, vid);
237244 break;
238245 case NETDEV_DOWN:
239− found = ocrdma_del_sgid(dev, netdev->dev_addr, is_vlan, vid);
240− if (found) {
241− /* found the matching entry, notify
242− * the consumers about it
243− */
244− gid_event.device = &dev->ibdev;
245− gid_event.element.port_num = 1;
246− gid_event.event = IB_EVENT_GID_CHANGE;
247− ib_dispatch_event(&gid_event);
248− }
246+ updated = ocrdma_del_sgid(dev, netdev->dev_addr, is_vlan, vid);
249247 break;
250248 default:
251249 break;
252250 }
251+ if (updated) {
252+ /* GID table updated, notify the consumers about it */
253+ gid_event.device = &dev->ibdev;
254+ gid_event.element.port_num = 1;
255+ gid_event.event = IB_EVENT_GID_CHANGE;
256+ ib_dispatch_event(&gid_event);
257+ }
253258 mutex_unlock(&dev->dev_lock);
254259 return NOTIFY_OK;
255260 }
@@ -258,7 +263,7 @@ static struct notifier_block ocrdma_inet6addr_notifier = { · 2 unmodified lines
258263 .notifier_call = ocrdma_inet6addr_event
259264 };
260265
261−#endif /* IPV6 */
266+#endif /* IPV6 and VLAN */
262267
263268 static enum rdma_link_layer ocrdma_link_layer(struct ib_device *device,
264269 u8 port_num)
drivers/infiniband/hw/ocrdma/ocrdma_sli.h+4−1
@@ -418,6 +418,9 @@ enum { · 417 unmodified lines
418418
419419 OCRDMA_MBX_QUERY_CFG_MAX_SEND_SGE_SHIFT = 0,
420420 OCRDMA_MBX_QUERY_CFG_MAX_SEND_SGE_MASK = 0xFFFF,
421+ OCRDMA_MBX_QUERY_CFG_MAX_WRITE_SGE_SHIFT = 16,
422+ OCRDMA_MBX_QUERY_CFG_MAX_WRITE_SGE_MASK = 0xFFFF <<
423+ OCRDMA_MBX_QUERY_CFG_MAX_WRITE_SGE_SHIFT,
421424
422425 OCRDMA_MBX_QUERY_CFG_MAX_ORD_PER_QP_SHIFT = 0,
423426 OCRDMA_MBX_QUERY_CFG_MAX_ORD_PER_QP_MASK = 0xFFFF,
@@ -458,7 +461,7 @@ enum { · 34 unmodified lines
458461 OCRDMA_MBX_QUERY_CFG_MAX_WQES_PER_WQ_OFFSET,
459462 OCRDMA_MBX_QUERY_CFG_MAX_RQES_PER_RQ_OFFSET = 0,
460463 OCRDMA_MBX_QUERY_CFG_MAX_RQES_PER_RQ_MASK = 0xFFFF <<
461− OCRDMA_MBX_QUERY_CFG_MAX_WQES_PER_WQ_OFFSET,
464+ OCRDMA_MBX_QUERY_CFG_MAX_RQES_PER_RQ_OFFSET,
462465
463466 OCRDMA_MBX_QUERY_CFG_MAX_CQ_OFFSET = 16,
464467 OCRDMA_MBX_QUERY_CFG_MAX_CQ_MASK = 0xFFFF <<
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c+7−5
@@ -53,7 +53,7 @@ int ocrdma_query_gid(struct ib_device *ibdev, u8 port, · 52 unmodified lines
5353
5454 dev = get_ocrdma_dev(ibdev);
5555 memset(sgid, 0, sizeof(*sgid));
56− if (index > OCRDMA_MAX_SGID)
56+ if (index >= OCRDMA_MAX_SGID)
5757 return -EINVAL;
5858
5959 memcpy(sgid, &dev->sgid_tbl[index], sizeof(*sgid));
@@ -83,8 +83,8 @@ int ocrdma_query_device(struct ib_device *ibdev, struct ib_device_attr *attr) · 23 unmodified lines
8383 IB_DEVICE_SHUTDOWN_PORT |
8484 IB_DEVICE_SYS_IMAGE_GUID |
8585 IB_DEVICE_LOCAL_DMA_LKEY;
86− attr->max_sge = dev->attr.max_send_sge;
87− attr->max_sge_rd = dev->attr.max_send_sge;
86+ attr->max_sge = min(dev->attr.max_send_sge, dev->attr.max_srq_sge);
87+ attr->max_sge_rd = 0;
8888 attr->max_cq = dev->attr.max_cq;
8989 attr->max_cqe = dev->attr.max_cqe;
9090 attr->max_mr = dev->attr.max_mr;
@@ -97,7 +97,7 @@ int ocrdma_query_device(struct ib_device *ibdev, struct ib_device_attr *attr) · 6 unmodified lines
9797 min(dev->attr.max_ord_per_qp, dev->attr.max_ird_per_qp);
9898 attr->max_qp_init_rd_atom = dev->attr.max_ord_per_qp;
9999 attr->max_srq = (dev->attr.max_qp - 1);
100− attr->max_srq_sge = attr->max_sge;
100+ attr->max_srq_sge = attr->max_srq_sge;
101101 attr->max_srq_wr = dev->attr.max_rqe;
102102 attr->local_ca_ack_delay = dev->attr.local_ca_ack_delay;
103103 attr->max_fast_reg_page_list_len = 0;
@@ -2301,8 +2301,10 @@ static bool ocrdma_poll_err_rcqe(struct ocrdma_qp *qp, struct ocrdma_cqe *cqe, · 2197 unmodified lines
23012301 *stop = true;
23022302 expand = false;
23032303 }
2304− } else
2304+ } else {
2305+ *polled = true;
23052306 expand = ocrdma_update_err_rcqe(ibwc, cqe, qp, status);
2307+ }
23062308 return expand;
23072309 }
23082310
drivers/media/video/pms.c+1−0
@@ -29,6 +29,7 @@ · 28 unmodified lines
2929 #include <linux/ioport.h>
3030 #include <linux/init.h>
3131 #include <linux/mutex.h>
32+#include <linux/slab.h>
3233 #include <linux/uaccess.h>
3334 #include <linux/isa.h>
3435 #include <asm/io.h>
drivers/mfd/stmpe-i2c.c+1−1
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 *
77 * License Terms: GNU General Public License, version 2
88 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
9− * Author: Viresh Kumar <viresh.kumar@st.com> for ST Microelectronics
9+ * Author: Viresh Kumar <viresh.linux@gmail.com> for ST Microelectronics
1010 */
1111
1212 #include <linux/i2c.h>
drivers/mfd/stmpe-spi.c+2−2
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * Copyright (C) ST Microelectronics SA 2011
55 *
66 * License Terms: GNU General Public License, version 2
7− * Author: Viresh Kumar <viresh.kumar@st.com> for ST Microelectronics
7+ * Author: Viresh Kumar <viresh.linux@gmail.com> for ST Microelectronics
88 */
99
1010 #include <linux/spi/spi.h>
@@ -146,4 +146,4 @@ module_exit(stmpe_exit); · 135 unmodified lines
146146
147147 MODULE_LICENSE("GPL v2");
148148 MODULE_DESCRIPTION("STMPE MFD SPI Interface Driver");
149−MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>");
149+MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>");
drivers/misc/mei/interrupt.c+1−1
@@ -835,7 +835,7 @@ static int _mei_irq_thread_read(struct mei_device *dev, s32 *slots, · 834 unmodified lines
835835 struct mei_cl *cl,
836836 struct mei_io_list *cmpl_list)
837837 {
838− if ((*slots * sizeof(u32)) >= (sizeof(struct mei_msg_hdr) +
838+ if ((*slots * sizeof(u32)) < (sizeof(struct mei_msg_hdr) +
839839 sizeof(struct hbm_flow_control))) {
840840 /* return the cancel routine */
841841 list_del(&cb_pos->cb_list);
drivers/misc/mei/main.c+5−4
@@ -982,7 +982,7 @@ static int __devinit mei_probe(struct pci_dev *pdev, · 981 unmodified lines
982982 err = request_threaded_irq(pdev->irq,
983983 NULL,
984984 mei_interrupt_thread_handler,
985− 0, mei_driver_name, dev);
985+ IRQF_ONESHOT, mei_driver_name, dev);
986986 else
987987 err = request_threaded_irq(pdev->irq,
988988 mei_interrupt_quick_handler,
@@ -992,7 +992,7 @@ static int __devinit mei_probe(struct pci_dev *pdev, · 3 unmodified lines
992992 if (err) {
993993 dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n",
994994 pdev->irq);
995− goto unmap_memory;
995+ goto disable_msi;
996996 }
997997 INIT_DELAYED_WORK(&dev->timer_work, mei_timer);
998998 if (mei_hw_init(dev)) {
@@ -1023,8 +1023,8 @@ release_irq: · 24 unmodified lines
10231023 mei_disable_interrupts(dev);
10241024 flush_scheduled_work();
10251025 free_irq(pdev->irq, dev);
1026+disable_msi:
10261027 pci_disable_msi(pdev);
1027−unmap_memory:
10281028 pci_iounmap(pdev, dev->mem_addr);
10291029 free_device:
10301030 kfree(dev);
@@ -1101,6 +1101,8 @@ static void __devexit mei_remove(struct pci_dev *pdev) · 70 unmodified lines
11011101
11021102 pci_release_regions(pdev);
11031103 pci_disable_device(pdev);
1104+
1105+ misc_deregister(&mei_misc_device);
11041106 }
11051107 #ifdef CONFIG_PM
11061108 static int mei_pci_suspend(struct device *device)
@@ -1216,7 +1218,6 @@ module_init(mei_init_module); · 109 unmodified lines
12161218 */
12171219 static void __exit mei_exit_module(void)
12181220 {
1219− misc_deregister(&mei_misc_device);
12201221 pci_unregister_driver(&mei_driver);
12211222
12221223 pr_debug("unloaded successfully.\n");
drivers/misc/mei/wd.c+1−1
@@ -341,7 +341,7 @@ static const struct watchdog_ops wd_ops = { · 340 unmodified lines
341341 };
342342 static const struct watchdog_info wd_info = {
343343 .identity = INTEL_AMT_WATCHDOG_ID,
344− .options = WDIOF_KEEPALIVEPING,
344+ .options = WDIOF_KEEPALIVEPING | WDIOF_ALARMONLY,
345345 };
346346
347347 static struct watchdog_device amt_wd_dev = {
drivers/mmc/core/mmc.c+1−1
@@ -1326,7 +1326,7 @@ static int mmc_suspend(struct mmc_host *host) · 1325 unmodified lines
13261326 if (!err)
13271327 mmc_card_set_sleep(host->card);
13281328 } else if (!mmc_host_is_spi(host))
1329− mmc_deselect_cards(host);
1329+ err = mmc_deselect_cards(host);
13301330 host->card->state &= ~(MMC_STATE_HIGHSPEED | MMC_STATE_HIGHSPEED_200);
13311331 mmc_release_host(host);
13321332
drivers/mmc/core/sd.c+4−2
@@ -1075,16 +1075,18 @@ static void mmc_sd_detect(struct mmc_host *host) · 1074 unmodified lines
10751075 */
10761076 static int mmc_sd_suspend(struct mmc_host *host)
10771077 {
1078+ int err = 0;
1079+
10781080 BUG_ON(!host);
10791081 BUG_ON(!host->card);
10801082
10811083 mmc_claim_host(host);
10821084 if (!mmc_host_is_spi(host))
1083− mmc_deselect_cards(host);
1085+ err = mmc_deselect_cards(host);
10841086 host->card->state &= ~MMC_STATE_HIGHSPEED;
10851087 mmc_release_host(host);
10861088
1087− return 0;
1089+ return err;
10881090 }
10891091
10901092 /*
drivers/mmc/core/sdio.c+6−0
@@ -218,6 +218,12 @@ static int sdio_enable_wide(struct mmc_card *card) · 217 unmodified lines
218218 if (ret)
219219 return ret;
220220
221+ if ((ctrl & SDIO_BUS_WIDTH_MASK) == SDIO_BUS_WIDTH_RESERVED)
222+ pr_warning("%s: SDIO_CCCR_IF is invalid: 0x%02x\n",
223+ mmc_hostname(card->host), ctrl);
224+
225+ /* set as 4-bit bus width */
226+ ctrl &= ~SDIO_BUS_WIDTH_MASK;
221227 ctrl |= SDIO_BUS_WIDTH_4BIT;
222228
223229 ret = mmc_io_rw_direct(card, 1, 0, SDIO_CCCR_IF, ctrl, NULL);
drivers/mmc/host/atmel-mci-regs.h+14−0
@@ -140,4 +140,18 @@ · 139 unmodified lines
140140 #define atmci_writel(port,reg,value) \
141141 __raw_writel((value), (port)->regs + reg)
142142
143+/*
144+ * Fix sconfig's burst size according to atmel MCI. We need to convert them as:
145+ * 1 -> 0, 4 -> 1, 8 -> 2, 16 -> 3.
146+ *
147+ * This can be done by finding most significant bit set.
148+ */
149+static inline unsigned int atmci_convert_chksize(unsigned int maxburst)
150+{
151+ if (maxburst > 1)
152+ return fls(maxburst) - 2;
153+ else
154+ return 0;
155+}
156+
143157 #endif /* __DRIVERS_MMC_ATMEL_MCI_H__ */
drivers/mmc/host/atmel-mci.c+7−5
@@ -910,6 +910,7 @@ atmci_prepare_data_dma(struct atmel_mci *host, struct mmc_data *data) · 909 unmodified lines
910910 enum dma_data_direction direction;
911911 enum dma_transfer_direction slave_dirn;
912912 unsigned int sglen;
913+ u32 maxburst;
913914 u32 iflags;
914915
915916 data->error = -EINPROGRESS;
@@ -943,17 +944,18 @@ atmci_prepare_data_dma(struct atmel_mci *host, struct mmc_data *data) · 27 unmodified lines
943944 if (!chan)
944945 return -ENODEV;
945946
946− if (host->caps.has_dma)
947− atmci_writel(host, ATMCI_DMA, ATMCI_DMA_CHKSIZE(3) | ATMCI_DMAEN);
948−
949947 if (data->flags & MMC_DATA_READ) {
950948 direction = DMA_FROM_DEVICE;
951949 host->dma_conf.direction = slave_dirn = DMA_DEV_TO_MEM;
950+ maxburst = atmci_convert_chksize(host->dma_conf.src_maxburst);
952951 } else {
953952 direction = DMA_TO_DEVICE;
954953 host->dma_conf.direction = slave_dirn = DMA_MEM_TO_DEV;
954+ maxburst = atmci_convert_chksize(host->dma_conf.dst_maxburst);
955955 }
956956
957+ atmci_writel(host, ATMCI_DMA, ATMCI_DMA_CHKSIZE(maxburst) | ATMCI_DMAEN);
958+
957959 sglen = dma_map_sg(chan->device->dev, data->sg,
958960 data->sg_len, direction);
959961
@@ -2314,6 +2316,8 @@ static int __init atmci_probe(struct platform_device *pdev) · 1354 unmodified lines
23142316
23152317 platform_set_drvdata(pdev, host);
23162318
2319+ setup_timer(&host->timer, atmci_timeout_timer, (unsigned long)host);
2320+
23172321 /* We need at least one slot to succeed */
23182322 nr_slots = 0;
23192323 ret = -ENODEV;
@@ -2352,8 +2356,6 @@ static int __init atmci_probe(struct platform_device *pdev) · 32 unmodified lines
23522356 }
23532357 }
23542358
2355− setup_timer(&host->timer, atmci_timeout_timer, (unsigned long)host);
2356−
23572359 dev_info(&pdev->dev,
23582360 "Atmel MCI controller at 0x%08lx irq %d, %u slots\n",
23592361 host->mapbase, irq, nr_slots);
drivers/mmc/host/dw_mmc.c+18−18
@@ -418,6 +418,8 @@ static int dw_mci_idmac_init(struct dw_mci *host) · 417 unmodified lines
418418 p->des3 = host->sg_dma;
419419 p->des0 = IDMAC_DES0_ER;
420420
421+ mci_writel(host, BMOD, SDMMC_IDMAC_SWRESET);
422+
421423 /* Mask out interrupts - get Tx & Rx complete only */
422424 mci_writel(host, IDINTEN, SDMMC_IDMAC_INT_NI | SDMMC_IDMAC_INT_RI |
423425 SDMMC_IDMAC_INT_TI);
@@ -615,14 +617,15 @@ static void dw_mci_setup_bus(struct dw_mci_slot *slot) · 191 unmodified lines
615617 u32 div;
616618
617619 if (slot->clock != host->current_speed) {
618− if (host->bus_hz % slot->clock)
620+ div = host->bus_hz / slot->clock;
621+ if (host->bus_hz % slot->clock && host->bus_hz > slot->clock)
619622 /*
620623 * move the + 1 after the divide to prevent
621624 * over-clocking the card.
622625 */
623− div = ((host->bus_hz / slot->clock) >> 1) + 1;
624− else
625− div = (host->bus_hz / slot->clock) >> 1;
626+ div += 1;
627+
628+ div = (host->bus_hz != slot->clock) ? DIV_ROUND_UP(div, 2) : 0;
626629
627630 dev_info(&slot->mmc->class_dev,
628631 "Bus speed (slot %d) = %dHz (slot req %dHz, actual %dHZ"
@@ -939,8 +942,8 @@ static void dw_mci_command_complete(struct dw_mci *host, struct mmc_command *cmd · 310 unmodified lines
939942 mdelay(20);
940943
941944 if (cmd->data) {
942− host->data = NULL;
943945 dw_mci_stop_dma(host);
946+ host->data = NULL;
944947 }
945948 }
946949 }
@@ -1623,7 +1626,6 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) · 676 unmodified lines
16231626 if (pending & (SDMMC_IDMAC_INT_TI | SDMMC_IDMAC_INT_RI)) {
16241627 mci_writel(host, IDSTS, SDMMC_IDMAC_INT_TI | SDMMC_IDMAC_INT_RI);
16251628 mci_writel(host, IDSTS, SDMMC_IDMAC_INT_NI);
1626− set_bit(EVENT_DATA_COMPLETE, &host->pending_events);
16271629 host->dma_ops->complete(host);
16281630 }
16291631 #endif
@@ -1725,7 +1727,8 @@ static void dw_mci_work_routine_card(struct work_struct *work) · 95 unmodified lines
17251727
17261728 #ifdef CONFIG_MMC_DW_IDMAC
17271729 ctrl = mci_readl(host, BMOD);
1728− ctrl |= 0x01; /* Software reset of DMA */
1730+ /* Software reset of DMA */
1731+ ctrl |= SDMMC_IDMAC_SWRESET;
17291732 mci_writel(host, BMOD, ctrl);
17301733 #endif
17311734
@@ -1950,10 +1953,6 @@ int dw_mci_probe(struct dw_mci *host) · 218 unmodified lines
19501953 spin_lock_init(&host->lock);
19511954 INIT_LIST_HEAD(&host->queue);
19521955
1953−
1954− host->dma_ops = host->pdata->dma_ops;
1955− dw_mci_init_dma(host);
1956−
19571956 /*
19581957 * Get the host data width - this assumes that HCON has been set with
19591958 * the correct values.
@@ -1981,10 +1980,11 @@ int dw_mci_probe(struct dw_mci *host) · 21 unmodified lines
19811980 }
19821981
19831982 /* Reset all blocks */
1984− if (!mci_wait_reset(&host->dev, host)) {
1985− ret = -ENODEV;
1986− goto err_dmaunmap;
1987− }
1983+ if (!mci_wait_reset(&host->dev, host))
1984+ return -ENODEV;
1985+
1986+ host->dma_ops = host->pdata->dma_ops;
1987+ dw_mci_init_dma(host);
19881988
19891989 /* Clear the interrupts for the host controller */
19901990 mci_writel(host, RINTSTS, 0xFFFFFFFF);
@@ -2170,14 +2170,14 @@ int dw_mci_resume(struct dw_mci *host) · 179 unmodified lines
21702170 if (host->vmmc)
21712171 regulator_enable(host->vmmc);
21722172
2173− if (host->dma_ops->init)
2174− host->dma_ops->init(host);
2175−
21762173 if (!mci_wait_reset(&host->dev, host)) {
21772174 ret = -ENODEV;
21782175 return ret;
21792176 }
21802177
2178+ if (host->dma_ops->init)
2179+ host->dma_ops->init(host);
2180+
21812181 /* Restore the old value at FIFOTH register */
21822182 mci_writel(host, FIFOTH, host->fifoth_val);
21832183
drivers/mmc/host/mmci.c+14−5
@@ -1216,12 +1216,7 @@ static void mmci_dt_populate_generic_pdata(struct device_node *np, · 1215 unmodified lines
12161216 int bus_width = 0;
12171217
12181218 pdata->gpio_wp = of_get_named_gpio(np, "wp-gpios", 0);
1219− if (!pdata->gpio_wp)
1220− pdata->gpio_wp = -1;
1221−
12221219 pdata->gpio_cd = of_get_named_gpio(np, "cd-gpios", 0);
1223− if (!pdata->gpio_cd)
1224− pdata->gpio_cd = -1;
12251220
12261221 if (of_get_property(np, "cd-inverted", NULL))
12271222 pdata->cd_invert = true;
@@ -1276,6 +1271,12 @@ static int __devinit mmci_probe(struct amba_device *dev, · 48 unmodified lines
12761271 return -EINVAL;
12771272 }
12781273
1274+ if (!plat) {
1275+ plat = devm_kzalloc(&dev->dev, sizeof(*plat), GFP_KERNEL);
1276+ if (!plat)
1277+ return -ENOMEM;
1278+ }
1279+
12791280 if (np)
12801281 mmci_dt_populate_generic_pdata(np, plat);
12811282
@@ -1424,6 +1425,10 @@ static int __devinit mmci_probe(struct amba_device *dev, · 142 unmodified lines
14241425 writel(0, host->base + MMCIMASK1);
14251426 writel(0xfff, host->base + MMCICLEAR);
14261427
1428+ if (plat->gpio_cd == -EPROBE_DEFER) {
1429+ ret = -EPROBE_DEFER;
1430+ goto err_gpio_cd;
1431+ }
14271432 if (gpio_is_valid(plat->gpio_cd)) {
14281433 ret = gpio_request(plat->gpio_cd, DRIVER_NAME " (cd)");
14291434 if (ret == 0)
@@ -1447,6 +1452,10 @@ static int __devinit mmci_probe(struct amba_device *dev, · 17 unmodified lines
14471452 if (ret >= 0)
14481453 host->gpio_cd_irq = gpio_to_irq(plat->gpio_cd);
14491454 }
1455+ if (plat->gpio_wp == -EPROBE_DEFER) {
1456+ ret = -EPROBE_DEFER;
1457+ goto err_gpio_wp;
1458+ }
14501459 if (gpio_is_valid(plat->gpio_wp)) {
14511460 ret = gpio_request(plat->gpio_wp, DRIVER_NAME " (wp)");
14521461 if (ret == 0)
drivers/mmc/host/mxs-mmc.c+1−1
@@ -894,8 +894,8 @@ static struct platform_driver mxs_mmc_driver = { · 893 unmodified lines
894894 .owner = THIS_MODULE,
895895 #ifdef CONFIG_PM
896896 .pm = &mxs_mmc_pm_ops,
897− .of_match_table = mxs_mmc_dt_ids,
898897 #endif
898+ .of_match_table = mxs_mmc_dt_ids,
899899 },
900900 };
901901
drivers/mmc/host/omap.c+10−8
@@ -1300,7 +1300,7 @@ static const struct mmc_host_ops mmc_omap_ops = { · 1299 unmodified lines
13001300 .set_ios = mmc_omap_set_ios,
13011301 };
13021302
1303−static int __init mmc_omap_new_slot(struct mmc_omap_host *host, int id)
1303+static int __devinit mmc_omap_new_slot(struct mmc_omap_host *host, int id)
13041304 {
13051305 struct mmc_omap_slot *slot = NULL;
13061306 struct mmc_host *mmc;
@@ -1485,24 +1485,26 @@ static int __devinit mmc_omap_probe(struct platform_device *pdev) · 178 unmodified lines
14851485 }
14861486
14871487 host->nr_slots = pdata->nr_slots;
1488+ host->reg_shift = (cpu_is_omap7xx() ? 1 : 2);
1489+
1490+ host->mmc_omap_wq = alloc_workqueue("mmc_omap", 0, 0);
1491+ if (!host->mmc_omap_wq)
1492+ goto err_plat_cleanup;
1493+
14881494 for (i = 0; i < pdata->nr_slots; i++) {
14891495 ret = mmc_omap_new_slot(host, i);
14901496 if (ret < 0) {
14911497 while (--i >= 0)
14921498 mmc_omap_remove_slot(host->slots[i]);
14931499
1494− goto err_plat_cleanup;
1500+ goto err_destroy_wq;
14951501 }
14961502 }
14971503
1498− host->reg_shift = (cpu_is_omap7xx() ? 1 : 2);
1499−
1500− host->mmc_omap_wq = alloc_workqueue("mmc_omap", 0, 0);
1501− if (!host->mmc_omap_wq)
1502− goto err_plat_cleanup;
1503−
15041504 return 0;
15051505
1506+err_destroy_wq:
1507+ destroy_workqueue(host->mmc_omap_wq);
15061508 err_plat_cleanup:
15071509 if (pdata->cleanup)
15081510 pdata->cleanup(&pdev->dev);
drivers/mmc/host/sdhci-s3c.c+1−1
@@ -404,7 +404,7 @@ static void sdhci_s3c_setup_card_detect_gpio(struct sdhci_s3c *sc) · 403 unmodified lines
404404 if (sc->ext_cd_irq &&
405405 request_threaded_irq(sc->ext_cd_irq, NULL,
406406 sdhci_s3c_gpio_card_detect_thread,
407− IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
407+ IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
408408 dev_name(dev), sc) == 0) {
409409 int status = gpio_get_value(sc->ext_cd_gpio);
410410 if (pdata->ext_cd_gpio_invert)
drivers/mmc/host/sdhci-spear.c+2−2
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * Support of SDHCI platform devices for spear soc family
55 *
66 * Copyright (C) 2010 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * Inspired by sdhci-pltfm.c
1010 *
@@ -289,5 +289,5 @@ static struct platform_driver sdhci_driver = { · 278 unmodified lines
289289 module_platform_driver(sdhci_driver);
290290
291291 MODULE_DESCRIPTION("SPEAr Secure Digital Host Controller Interface driver");
292−MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>");
292+MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>");
293293 MODULE_LICENSE("GPL v2");
drivers/mmc/host/sdhci.c+2−2
@@ -680,8 +680,8 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd) · 679 unmodified lines
680680 }
681681
682682 if (count >= 0xF) {
683− pr_warning("%s: Too large timeout 0x%x requested for CMD%d!\n",
684− mmc_hostname(host->mmc), count, cmd->opcode);
683+ DBG("%s: Too large timeout 0x%x requested for CMD%d!\n",
684+ mmc_hostname(host->mmc), count, cmd->opcode);
685685 count = 0xE;
686686 }
687687
drivers/mtd/mtdoops.c+4−18
@@ -304,32 +304,17 @@ static void find_next_position(struct mtdoops_context *cxt) · 303 unmodified lines
304304 }
305305
306306 static void mtdoops_do_dump(struct kmsg_dumper *dumper,
307− enum kmsg_dump_reason reason, const char *s1, unsigned long l1,
308− const char *s2, unsigned long l2)
307+ enum kmsg_dump_reason reason)
309308 {
310309 struct mtdoops_context *cxt = container_of(dumper,
311310 struct mtdoops_context, dump);
312− unsigned long s1_start, s2_start;
313− unsigned long l1_cpy, l2_cpy;
314− char *dst;
315−
316− if (reason != KMSG_DUMP_OOPS &&
317− reason != KMSG_DUMP_PANIC)
318− return;
319311
320312 /* Only dump oopses if dump_oops is set */
321313 if (reason == KMSG_DUMP_OOPS && !dump_oops)
322314 return;
323315
324− dst = cxt->oops_buf + MTDOOPS_HEADER_SIZE; /* Skip the header */
325− l2_cpy = min(l2, record_size - MTDOOPS_HEADER_SIZE);
326− l1_cpy = min(l1, record_size - MTDOOPS_HEADER_SIZE - l2_cpy);
327−
328− s2_start = l2 - l2_cpy;
329− s1_start = l1 - l1_cpy;
330−
331− memcpy(dst, s1 + s1_start, l1_cpy);
332− memcpy(dst + l1_cpy, s2 + s2_start, l2_cpy);
316+ kmsg_dump_get_buffer(dumper, true, cxt->oops_buf + MTDOOPS_HEADER_SIZE,
317+ record_size - MTDOOPS_HEADER_SIZE, NULL);
333318
334319 /* Panics must be written immediately */
335320 if (reason != KMSG_DUMP_OOPS)
@@ -375,6 +360,7 @@ static void mtdoops_notify_add(struct mtd_info *mtd) · 39 unmodified lines
375360 return;
376361 }
377362
363+ cxt->dump.max_reason = KMSG_DUMP_OOPS;
378364 cxt->dump.dump = mtdoops_do_dump;
379365 err = kmsg_dump_register(&cxt->dump);
380366 if (err) {
drivers/net/wireless/b43/main.c+1−1
@@ -3767,7 +3767,7 @@ static int b43_switch_band(struct b43_wl *wl, struct ieee80211_channel *chan) · 3766 unmodified lines
37673767 if (prev_status >= B43_STAT_STARTED) {
37683768 err = b43_wireless_core_start(up_dev);
37693769 if (err) {
3770− b43err(wl, "Fatal: Coult not start device for "
3770+ b43err(wl, "Fatal: Could not start device for "
37713771 "selected %s-GHz band\n",
37723772 band_to_string(chan->band));
37733773 b43_wireless_core_exit(up_dev);
drivers/net/wireless/b43legacy/main.c+1−1
@@ -2633,7 +2633,7 @@ static int b43legacy_switch_phymode(struct b43legacy_wl *wl, · 2632 unmodified lines
26332633 if (prev_status >= B43legacy_STAT_STARTED) {
26342634 err = b43legacy_wireless_core_start(up_dev);
26352635 if (err) {
2636− b43legacyerr(wl, "Fatal: Coult not start device for "
2636+ b43legacyerr(wl, "Fatal: Could not start device for "
26372637 "newly selected %s-PHY mode\n",
26382638 phymode_to_string(new_mode));
26392639 b43legacy_wireless_core_exit(up_dev);
drivers/pinctrl/pinctrl-mxs.c+1−1
@@ -137,7 +137,7 @@ static int mxs_dt_node_to_map(struct pinctrl_dev *pctldev, · 136 unmodified lines
137137
138138 free_group:
139139 if (!purecfg)
140− free(group);
140+ kfree(group);
141141 free:
142142 kfree(new_map);
143143 return ret;
drivers/pinctrl/pinctrl-nomadik.c+21−1
@@ -1438,7 +1438,27 @@ static int nmk_pmx_enable(struct pinctrl_dev *pctldev, unsigned function, · 1437 unmodified lines
14381438
14391439 dev_dbg(npct->dev, "enable group %s, %u pins\n", g->name, g->npins);
14401440
1441− /* Handle this special glitch on altfunction C */
1441+ /*
1442+ * If we're setting altfunc C by setting both AFSLA and AFSLB to 1,
1443+ * we may pass through an undesired state. In this case we take
1444+ * some extra care.
1445+ *
1446+ * Safe sequence used to switch IOs between GPIO and Alternate-C mode:
1447+ * - Save SLPM registers (since we have a shadow register in the
1448+ * nmk_chip we're using that as backup)
1449+ * - Set SLPM=0 for the IOs you want to switch and others to 1
1450+ * - Configure the GPIO registers for the IOs that are being switched
1451+ * - Set IOFORCE=1
1452+ * - Modify the AFLSA/B registers for the IOs that are being switched
1453+ * - Set IOFORCE=0
1454+ * - Restore SLPM registers
1455+ * - Any spurious wake up event during switch sequence to be ignored
1456+ * and cleared
1457+ *
1458+ * We REALLY need to save ALL slpm registers, because the external
1459+ * IOFORCE will switch *all* ports to their sleepmode setting to as
1460+ * to avoid glitches. (Not just one port!)
1461+ */
14421462 glitch = (g->altsetting == NMK_GPIO_ALT_C);
14431463
14441464 if (glitch) {
drivers/pinctrl/spear/pinctrl-spear.c+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * Driver for the ST Microelectronics SPEAr pinmux
33 *
44 * Copyright (C) 2012 ST Microelectronics
5− * Viresh Kumar <viresh.kumar@st.com>
5+ * Viresh Kumar <viresh.linux@gmail.com>
66 *
77 * Inspired from:
88 * - U300 Pinctl drivers
drivers/pinctrl/spear/pinctrl-spear.h+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * Driver header file for the ST Microelectronics SPEAr pinmux
33 *
44 * Copyright (C) 2012 ST Microelectronics
5− * Viresh Kumar <viresh.kumar@st.com>
5+ * Viresh Kumar <viresh.linux@gmail.com>
66 *
77 * This file is licensed under the terms of the GNU General Public
88 * License version 2. This program is licensed "as is" without any
drivers/pinctrl/spear/pinctrl-spear1310.c+2−2
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * Driver for the ST Microelectronics SPEAr1310 pinmux
33 *
44 * Copyright (C) 2012 ST Microelectronics
5− * Viresh Kumar <viresh.kumar@st.com>
5+ * Viresh Kumar <viresh.linux@gmail.com>
66 *
77 * This file is licensed under the terms of the GNU General Public
88 * License version 2. This program is licensed "as is" without any
@@ -2192,7 +2192,7 @@ static void __exit spear1310_pinctrl_exit(void) · 2183 unmodified lines
21922192 }
21932193 module_exit(spear1310_pinctrl_exit);
21942194
2195−MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>");
2195+MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>");
21962196 MODULE_DESCRIPTION("ST Microelectronics SPEAr1310 pinctrl driver");
21972197 MODULE_LICENSE("GPL v2");
21982198 MODULE_DEVICE_TABLE(of, spear1310_pinctrl_of_match);
drivers/pinctrl/spear/pinctrl-spear1340.c+2−2
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * Driver for the ST Microelectronics SPEAr1340 pinmux
33 *
44 * Copyright (C) 2012 ST Microelectronics
5− * Viresh Kumar <viresh.kumar@st.com>
5+ * Viresh Kumar <viresh.linux@gmail.com>
66 *
77 * This file is licensed under the terms of the GNU General Public
88 * License version 2. This program is licensed "as is" without any
@@ -1983,7 +1983,7 @@ static void __exit spear1340_pinctrl_exit(void) · 1974 unmodified lines
19831983 }
19841984 module_exit(spear1340_pinctrl_exit);
19851985
1986−MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>");
1986+MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>");
19871987 MODULE_DESCRIPTION("ST Microelectronics SPEAr1340 pinctrl driver");
19881988 MODULE_LICENSE("GPL v2");
19891989 MODULE_DEVICE_TABLE(of, spear1340_pinctrl_of_match);
drivers/pinctrl/spear/pinctrl-spear300.c+2−2
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * Driver for the ST Microelectronics SPEAr300 pinmux
33 *
44 * Copyright (C) 2012 ST Microelectronics
5− * Viresh Kumar <viresh.kumar@st.com>
5+ * Viresh Kumar <viresh.linux@gmail.com>
66 *
77 * This file is licensed under the terms of the GNU General Public
88 * License version 2. This program is licensed "as is" without any
@@ -702,7 +702,7 @@ static void __exit spear300_pinctrl_exit(void) · 693 unmodified lines
702702 }
703703 module_exit(spear300_pinctrl_exit);
704704
705−MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>");
705+MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>");
706706 MODULE_DESCRIPTION("ST Microelectronics SPEAr300 pinctrl driver");
707707 MODULE_LICENSE("GPL v2");
708708 MODULE_DEVICE_TABLE(of, spear300_pinctrl_of_match);
drivers/pinctrl/spear/pinctrl-spear310.c+2−2
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * Driver for the ST Microelectronics SPEAr310 pinmux
33 *
44 * Copyright (C) 2012 ST Microelectronics
5− * Viresh Kumar <viresh.kumar@st.com>
5+ * Viresh Kumar <viresh.linux@gmail.com>
66 *
77 * This file is licensed under the terms of the GNU General Public
88 * License version 2. This program is licensed "as is" without any
@@ -425,7 +425,7 @@ static void __exit spear310_pinctrl_exit(void) · 416 unmodified lines
425425 }
426426 module_exit(spear310_pinctrl_exit);
427427
428−MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>");
428+MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>");
429429 MODULE_DESCRIPTION("ST Microelectronics SPEAr310 pinctrl driver");
430430 MODULE_LICENSE("GPL v2");
431431 MODULE_DEVICE_TABLE(of, SPEAr310_pinctrl_of_match);
drivers/pinctrl/spear/pinctrl-spear320.c+2−2
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * Driver for the ST Microelectronics SPEAr320 pinmux
33 *
44 * Copyright (C) 2012 ST Microelectronics
5− * Viresh Kumar <viresh.kumar@st.com>
5+ * Viresh Kumar <viresh.linux@gmail.com>
66 *
77 * This file is licensed under the terms of the GNU General Public
88 * License version 2. This program is licensed "as is" without any
@@ -3462,7 +3462,7 @@ static void __exit spear320_pinctrl_exit(void) · 3453 unmodified lines
34623462 }
34633463 module_exit(spear320_pinctrl_exit);
34643464
3465−MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>");
3465+MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>");
34663466 MODULE_DESCRIPTION("ST Microelectronics SPEAr320 pinctrl driver");
34673467 MODULE_LICENSE("GPL v2");
34683468 MODULE_DEVICE_TABLE(of, spear320_pinctrl_of_match);
drivers/pinctrl/spear/pinctrl-spear3xx.c+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * Driver for the ST Microelectronics SPEAr3xx pinmux
33 *
44 * Copyright (C) 2012 ST Microelectronics
5− * Viresh Kumar <viresh.kumar@st.com>
5+ * Viresh Kumar <viresh.linux@gmail.com>
66 *
77 * This file is licensed under the terms of the GNU General Public
88 * License version 2. This program is licensed "as is" without any
drivers/pinctrl/spear/pinctrl-spear3xx.h+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * Header file for the ST Microelectronics SPEAr3xx pinmux
33 *
44 * Copyright (C) 2012 ST Microelectronics
5− * Viresh Kumar <viresh.kumar@st.com>
5+ * Viresh Kumar <viresh.linux@gmail.com>
66 *
77 * This file is licensed under the terms of the GNU General Public
88 * License version 2. This program is licensed "as is" without any
drivers/regulator/ab8500.c+11−11
@@ -794,17 +794,17 @@ static __devinit int ab8500_regulator_register(struct platform_device *pdev, · 793 unmodified lines
794794 }
795795
796796 static struct of_regulator_match ab8500_regulator_matches[] = {
797− { .name = "LDO-AUX1", .driver_data = (void *) AB8500_LDO_AUX1, },
798− { .name = "LDO-AUX2", .driver_data = (void *) AB8500_LDO_AUX2, },
799− { .name = "LDO-AUX3", .driver_data = (void *) AB8500_LDO_AUX3, },
800− { .name = "LDO-INTCORE", .driver_data = (void *) AB8500_LDO_INTCORE, },
801− { .name = "LDO-TVOUT", .driver_data = (void *) AB8500_LDO_TVOUT, },
802− { .name = "LDO-USB", .driver_data = (void *) AB8500_LDO_USB, },
803− { .name = "LDO-AUDIO", .driver_data = (void *) AB8500_LDO_AUDIO, },
804− { .name = "LDO-ANAMIC1", .driver_data = (void *) AB8500_LDO_ANAMIC1, },
805− { .name = "LDO-ANAMIC2", .driver_data = (void *) AB8500_LDO_ANAMIC2, },
806− { .name = "LDO-DMIC", .driver_data = (void *) AB8500_LDO_DMIC, },
807− { .name = "LDO-ANA", .driver_data = (void *) AB8500_LDO_ANA, },
797+ { .name = "ab8500_ldo_aux1", .driver_data = (void *) AB8500_LDO_AUX1, },
798+ { .name = "ab8500_ldo_aux2", .driver_data = (void *) AB8500_LDO_AUX2, },
799+ { .name = "ab8500_ldo_aux3", .driver_data = (void *) AB8500_LDO_AUX3, },
800+ { .name = "ab8500_ldo_intcore", .driver_data = (void *) AB8500_LDO_INTCORE, },
801+ { .name = "ab8500_ldo_tvout", .driver_data = (void *) AB8500_LDO_TVOUT, },
802+ { .name = "ab8500_ldo_usb", .driver_data = (void *) AB8500_LDO_USB, },
803+ { .name = "ab8500_ldo_audio", .driver_data = (void *) AB8500_LDO_AUDIO, },
804+ { .name = "ab8500_ldo_anamic1", .driver_data = (void *) AB8500_LDO_ANAMIC1, },
805+ { .name = "ab8500_ldo_amamic2", .driver_data = (void *) AB8500_LDO_ANAMIC2, },
806+ { .name = "ab8500_ldo_dmic", .driver_data = (void *) AB8500_LDO_DMIC, },
807+ { .name = "ab8500_ldo_ana", .driver_data = (void *) AB8500_LDO_ANA, },
808808 };
809809
810810 static __devinit int
drivers/regulator/db8500-prcmu.c+20−20
@@ -452,26 +452,26 @@ static __devinit int db8500_regulator_register(struct platform_device *pdev, · 451 unmodified lines
452452 }
453453
454454 static struct of_regulator_match db8500_regulator_matches[] = {
455− { .name = "db8500-vape", .driver_data = (void *) DB8500_REGULATOR_VAPE, },
456− { .name = "db8500-varm", .driver_data = (void *) DB8500_REGULATOR_VARM, },
457− { .name = "db8500-vmodem", .driver_data = (void *) DB8500_REGULATOR_VMODEM, },
458− { .name = "db8500-vpll", .driver_data = (void *) DB8500_REGULATOR_VPLL, },
459− { .name = "db8500-vsmps1", .driver_data = (void *) DB8500_REGULATOR_VSMPS1, },
460− { .name = "db8500-vsmps2", .driver_data = (void *) DB8500_REGULATOR_VSMPS2, },
461− { .name = "db8500-vsmps3", .driver_data = (void *) DB8500_REGULATOR_VSMPS3, },
462− { .name = "db8500-vrf1", .driver_data = (void *) DB8500_REGULATOR_VRF1, },
463− { .name = "db8500-sva-mmdsp", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SVAMMDSP, },
464− { .name = "db8500-sva-mmdsp-ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SVAMMDSPRET, },
465− { .name = "db8500-sva-pipe", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SVAPIPE, },
466− { .name = "db8500-sia-mmdsp", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SIAMMDSP, },
467− { .name = "db8500-sia-mmdsp-ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SIAMMDSPRET, },
468− { .name = "db8500-sia-pipe", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SIAPIPE, },
469− { .name = "db8500-sga", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SGA, },
470− { .name = "db8500-b2r2-mcde", .driver_data = (void *) DB8500_REGULATOR_SWITCH_B2R2_MCDE, },
471− { .name = "db8500-esram12", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM12, },
472− { .name = "db8500-esram12-ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM12RET, },
473− { .name = "db8500-esram34", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM34, },
474− { .name = "db8500-esram34-ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM34RET, },
455+ { .name = "db8500_vape", .driver_data = (void *) DB8500_REGULATOR_VAPE, },
456+ { .name = "db8500_varm", .driver_data = (void *) DB8500_REGULATOR_VARM, },
457+ { .name = "db8500_vmodem", .driver_data = (void *) DB8500_REGULATOR_VMODEM, },
458+ { .name = "db8500_vpll", .driver_data = (void *) DB8500_REGULATOR_VPLL, },
459+ { .name = "db8500_vsmps1", .driver_data = (void *) DB8500_REGULATOR_VSMPS1, },
460+ { .name = "db8500_vsmps2", .driver_data = (void *) DB8500_REGULATOR_VSMPS2, },
461+ { .name = "db8500_vsmps3", .driver_data = (void *) DB8500_REGULATOR_VSMPS3, },
462+ { .name = "db8500_vrf1", .driver_data = (void *) DB8500_REGULATOR_VRF1, },
463+ { .name = "db8500_sva_mmdsp", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SVAMMDSP, },
464+ { .name = "db8500_sva_mmdsp_ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SVAMMDSPRET, },
465+ { .name = "db8500_sva_pipe", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SVAPIPE, },
466+ { .name = "db8500_sia_mmdsp", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SIAMMDSP, },
467+ { .name = "db8500_sia_mmdsp_ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SIAMMDSPRET, },
468+ { .name = "db8500_sia_pipe", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SIAPIPE, },
469+ { .name = "db8500_sga", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SGA, },
470+ { .name = "db8500_b2r2_mcde", .driver_data = (void *) DB8500_REGULATOR_SWITCH_B2R2_MCDE, },
471+ { .name = "db8500_esram12", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM12, },
472+ { .name = "db8500_esram12_ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM12RET, },
473+ { .name = "db8500_esram34", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM34, },
474+ { .name = "db8500_esram34_ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM34RET, },
475475 };
476476
477477 static __devinit int
drivers/regulator/s5m8767.c+1−1
@@ -451,7 +451,7 @@ static int s5m8767_set_voltage_time_sel(struct regulator_dev *rdev, · 450 unmodified lines
451451
452452 desc = reg_voltage_map[reg_id];
453453
454− if (old_sel < new_sel)
454+ if ((old_sel < new_sel) && s5m8767->ramp_delay)
455455 return DIV_ROUND_UP(desc->step * (new_sel - old_sel),
456456 s5m8767->ramp_delay * 1000);
457457 return 0;
drivers/remoteproc/omap_remoteproc.c+1−1
@@ -182,7 +182,7 @@ static int __devinit omap_rproc_probe(struct platform_device *pdev) · 181 unmodified lines
182182
183183 ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
184184 if (ret) {
185− dev_err(pdev->dev.parent, "dma_set_coherent_mask: %d\n", ret);
185+ dev_err(&pdev->dev, "dma_set_coherent_mask: %d\n", ret);
186186 return ret;
187187 }
188188
drivers/remoteproc/remoteproc_core.c+6−4
@@ -247,7 +247,7 @@ rproc_load_segments(struct rproc *rproc, const u8 *elf_data, size_t len) · 246 unmodified lines
247247 }
248248
249249 if (offset + filesz > len) {
250− dev_err(dev, "truncated fw: need 0x%x avail 0x%x\n",
250+ dev_err(dev, "truncated fw: need 0x%x avail 0x%zx\n",
251251 offset + filesz, len);
252252 ret = -EINVAL;
253253 break;
@@ -934,7 +934,7 @@ static void rproc_resource_cleanup(struct rproc *rproc) · 680 unmodified lines
934934 unmapped = iommu_unmap(rproc->domain, entry->da, entry->len);
935935 if (unmapped != entry->len) {
936936 /* nothing much to do besides complaining */
937− dev_err(dev, "failed to unmap %u/%u\n", entry->len,
937+ dev_err(dev, "failed to unmap %u/%zu\n", entry->len,
938938 unmapped);
939939 }
940940
@@ -1020,7 +1020,7 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw) · 79 unmodified lines
10201020
10211021 ehdr = (struct elf32_hdr *)fw->data;
10221022
1023− dev_info(dev, "Booting fw image %s, size %d\n", name, fw->size);
1023+ dev_info(dev, "Booting fw image %s, size %zd\n", name, fw->size);
10241024
10251025 /*
10261026 * if enabling an IOMMU isn't relevant for this rproc, this is
@@ -1041,8 +1041,10 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw) · 14 unmodified lines
10411041
10421042 /* look for the resource table */
10431043 table = rproc_find_rsc_table(rproc, fw->data, fw->size, &tablesz);
1044− if (!table)
1044+ if (!table) {
1045+ ret = -EINVAL;
10451046 goto clean_up;
1047+ }
10461048
10471049 /* handle fw resources which are required to boot rproc */
10481050 ret = rproc_handle_boot_rsc(rproc, table, tablesz);
drivers/spi/spi-omap2-mcspi.c+2−1
@@ -801,7 +801,7 @@ static int omap2_mcspi_setup(struct spi_device *spi) · 800 unmodified lines
801801 mcspi_dma = &mcspi->dma_channels[spi->chip_select];
802802
803803 if (!cs) {
804− cs = devm_kzalloc(&spi->dev , sizeof *cs, GFP_KERNEL);
804+ cs = kzalloc(sizeof *cs, GFP_KERNEL);
805805 if (!cs)
806806 return -ENOMEM;
807807 cs->base = mcspi->base + spi->chip_select * 0x14;
@@ -842,6 +842,7 @@ static void omap2_mcspi_cleanup(struct spi_device *spi) · 34 unmodified lines
842842 cs = spi->controller_state;
843843 list_del(&cs->node);
844844
845+ kfree(cs);
845846 }
846847
847848 if (spi->chip_select < spi->master->num_chipselect) {
drivers/staging/comedi/drivers.c+5−0
@@ -30,6 +30,7 @@ · 29 unmodified lines
3030 #include <linux/pci.h>
3131 #include <linux/usb.h>
3232 #include <linux/errno.h>
33+#include <linux/kconfig.h>
3334 #include <linux/kernel.h>
3435 #include <linux/sched.h>
3536 #include <linux/fcntl.h>
@@ -981,6 +982,8 @@ void comedi_pci_driver_unregister(struct comedi_driver *comedi_driver, · 945 unmodified lines
981982 }
982983 EXPORT_SYMBOL_GPL(comedi_pci_driver_unregister);
983984
985+#if IS_ENABLED(CONFIG_USB)
986+
984987 static int comedi_old_usb_auto_config(struct usb_interface *intf,
985988 struct comedi_driver *driver)
986989 {
@@ -1043,3 +1046,5 @@ void comedi_usb_driver_unregister(struct comedi_driver *comedi_driver, · 56 unmodified lines
10431046 comedi_driver_unregister(comedi_driver);
10441047 }
10451048 EXPORT_SYMBOL_GPL(comedi_usb_driver_unregister);
1049+
1050+#endif
drivers/staging/gdm72xx/netlink_k.c+1−1
@@ -104,7 +104,7 @@ struct sock *netlink_init(int unit, void (*cb)(struct net_device *dev, u16 type, · 103 unmodified lines
104104
105105 void netlink_exit(struct sock *sock)
106106 {
107− sock_release(sock->sk_socket);
107+ netlink_kernel_release(sock);
108108 }
109109
110110 int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len)
drivers/staging/iio/Documentation/device.txt+0−2
@@ -29,8 +29,6 @@ Then fill in the following: · 28 unmodified lines
2929 * info->driver_module:
3030 Set to THIS_MODULE. Used to ensure correct ownership
3131 of various resources allocate by the core.
32− * info->num_interrupt_lines:
33− Number of event triggering hardware lines the device has.
3432 * info->event_attrs:
3533 Attributes used to enable / disable hardware events.
3634 * info->attrs:
drivers/staging/iio/adc/Kconfig+1−0
@@ -13,6 +13,7 @@ config AD7291 · 12 unmodified lines
1313 config AD7298
1414 tristate "Analog Devices AD7298 ADC driver"
1515 depends on SPI
16+ select IIO_KFIFO_BUF if IIO_BUFFER
1617 help
1718 Say yes here to build support for Analog Devices AD7298
1819 8 Channel ADC with temperature sensor.
drivers/staging/iio/adc/ad7606_core.c+2−1
@@ -235,7 +235,8 @@ static const struct attribute_group ad7606_attribute_group_range = { · 234 unmodified lines
235235 .indexed = 1, \
236236 .channel = num, \
237237 .address = num, \
238− .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, \
238+ .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \
239+ IIO_CHAN_INFO_SCALE_SHARED_BIT, \
239240 .scan_index = num, \
240241 .scan_type = IIO_ST('s', 16, 16, 0), \
241242 }
drivers/staging/omapdrm/omap_fbdev.c+7−3
@@ -208,7 +208,8 @@ static int omap_fbdev_create(struct drm_fb_helper *helper, · 207 unmodified lines
208208 */
209209 ret = omap_gem_get_paddr(fbdev->bo, &paddr, true);
210210 if (ret) {
211− dev_err(dev->dev, "could not map (paddr)!\n");
211+ dev_err(dev->dev,
212+ "could not map (paddr)! Skipping framebuffer alloc\n");
212213 ret = -ENOMEM;
213214 goto fail;
214215 }
@@ -388,8 +389,11 @@ void omap_fbdev_free(struct drm_device *dev) · 173 unmodified lines
388389
389390 fbi = helper->fbdev;
390391
391− unregister_framebuffer(fbi);
392− framebuffer_release(fbi);
392+ /* only cleanup framebuffer if it is present */
393+ if (fbi) {
394+ unregister_framebuffer(fbi);
395+ framebuffer_release(fbi);
396+ }
393397
394398 drm_fb_helper_fini(helper);
395399
drivers/staging/rtl8712/usb_intf.c+2−0
@@ -102,6 +102,8 @@ static struct usb_device_id rtl871x_usb_id_tbl[] = { · 101 unmodified lines
102102 /* - */
103103 {USB_DEVICE(0x20F4, 0x646B)},
104104 {USB_DEVICE(0x083A, 0xC512)},
105+ {USB_DEVICE(0x25D4, 0x4CA1)},
106+ {USB_DEVICE(0x25D4, 0x4CAB)},
105107
106108 /* RTL8191SU */
107109 /* Realtek */
drivers/tty/serial/8250/8250.c+1−1
@@ -3113,7 +3113,7 @@ static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port * · 3112 unmodified lines
31133113
31143114 /**
31153115 * serial8250_register_8250_port - register a serial port
3116− * @port: serial port template
3116+ * @up: serial port template
31173117 *
31183118 * Configure the serial port specified by the request. If the
31193119 * port exists and is in use, it is hung up and unregistered
drivers/tty/serial/amba-pl011.c+41−4
@@ -133,6 +133,10 @@ struct pl011_dmatx_data { · 132 unmodified lines
133133 struct uart_amba_port {
134134 struct uart_port port;
135135 struct clk *clk;
136+ /* Two optional pin states - default & sleep */
137+ struct pinctrl *pinctrl;
138+ struct pinctrl_state *pins_default;
139+ struct pinctrl_state *pins_sleep;
136140 const struct vendor_data *vendor;
137141 unsigned int dmacr; /* dma control reg */
138142 unsigned int im; /* interrupt mask */
@@ -1312,6 +1316,14 @@ static int pl011_startup(struct uart_port *port) · 1173 unmodified lines
13121316 unsigned int cr;
13131317 int retval;
13141318
1319+ /* Optionaly enable pins to be muxed in and configured */
1320+ if (!IS_ERR(uap->pins_default)) {
1321+ retval = pinctrl_select_state(uap->pinctrl, uap->pins_default);
1322+ if (retval)
1323+ dev_err(port->dev,
1324+ "could not set default pins\n");
1325+ }
1326+
13151327 retval = clk_prepare(uap->clk);
13161328 if (retval)
13171329 goto out;
@@ -1420,6 +1432,7 @@ static void pl011_shutdown(struct uart_port *port) · 102 unmodified lines
14201432 {
14211433 struct uart_amba_port *uap = (struct uart_amba_port *)port;
14221434 unsigned int cr;
1435+ int retval;
14231436
14241437 /*
14251438 * disable all interrupts
@@ -1462,6 +1475,14 @@ static void pl011_shutdown(struct uart_port *port) · 36 unmodified lines
14621475 */
14631476 clk_disable(uap->clk);
14641477 clk_unprepare(uap->clk);
1478+ /* Optionally let pins go into sleep states */
1479+ if (!IS_ERR(uap->pins_sleep)) {
1480+ retval = pinctrl_select_state(uap->pinctrl, uap->pins_sleep);
1481+ if (retval)
1482+ dev_err(port->dev,
1483+ "could not set pins to sleep state\n");
1484+ }
1485+
14651486
14661487 if (uap->port.dev->platform_data) {
14671488 struct amba_pl011_data *plat;
@@ -1792,6 +1813,14 @@ static int __init pl011_console_setup(struct console *co, char *options) · 324 unmodified lines
17921813 if (!uap)
17931814 return -ENODEV;
17941815
1816+ /* Allow pins to be muxed in and configured */
1817+ if (!IS_ERR(uap->pins_default)) {
1818+ ret = pinctrl_select_state(uap->pinctrl, uap->pins_default);
1819+ if (ret)
1820+ dev_err(uap->port.dev,
1821+ "could not set default pins\n");
1822+ }
1823+
17951824 ret = clk_prepare(uap->clk);
17961825 if (ret)
17971826 return ret;
@@ -1844,7 +1873,6 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) · 46 unmodified lines
18441873 {
18451874 struct uart_amba_port *uap;
18461875 struct vendor_data *vendor = id->data;
1847− struct pinctrl *pinctrl;
18481876 void __iomem *base;
18491877 int i, ret;
18501878
@@ -1869,11 +1897,20 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) · 18 unmodified lines
18691897 goto free;
18701898 }
18711899
1872− pinctrl = devm_pinctrl_get_select_default(&dev->dev);
1873− if (IS_ERR(pinctrl)) {
1874− ret = PTR_ERR(pinctrl);
1900+ uap->pinctrl = devm_pinctrl_get(&dev->dev);
1901+ if (IS_ERR(uap->pinctrl)) {
1902+ ret = PTR_ERR(uap->pinctrl);
18751903 goto unmap;
18761904 }
1905+ uap->pins_default = pinctrl_lookup_state(uap->pinctrl,
1906+ PINCTRL_STATE_DEFAULT);
1907+ if (IS_ERR(uap->pins_default))
1908+ dev_err(&dev->dev, "could not get default pinstate\n");
1909+
1910+ uap->pins_sleep = pinctrl_lookup_state(uap->pinctrl,
1911+ PINCTRL_STATE_SLEEP);
1912+ if (IS_ERR(uap->pins_sleep))
1913+ dev_dbg(&dev->dev, "could not get sleep pinstate\n");
18771914
18781915 uap->clk = clk_get(&dev->dev, NULL);
18791916 if (IS_ERR(uap->clk)) {
drivers/tty/serial/serial_txx9.c+1−1
@@ -466,7 +466,7 @@ static void serial_txx9_break_ctl(struct uart_port *port, int break_state) · 465 unmodified lines
466466 spin_unlock_irqrestore(&up->port.lock, flags);
467467 }
468468
469−#if defined(CONFIG_SERIAL_TXX9_CONSOLE) || (CONFIG_CONSOLE_POLL)
469+#if defined(CONFIG_SERIAL_TXX9_CONSOLE) || defined(CONFIG_CONSOLE_POLL)
470470 /*
471471 * Wait for transmitter & holding register to empty
472472 */
drivers/watchdog/sp805_wdt.c+2−2
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * Watchdog driver for ARM SP805 watchdog module
55 *
66 * Copyright (C) 2010 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2 or later. This program is licensed "as is" without any
@@ -331,6 +331,6 @@ static struct amba_driver sp805_wdt_driver = { · 320 unmodified lines
331331
332332 module_amba_driver(sp805_wdt_driver);
333333
334−MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>");
334+MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>");
335335 MODULE_DESCRIPTION("ARM SP805 Watchdog Driver");
336336 MODULE_LICENSE("GPL");
fs/btrfs/backref.c+52−42
@@ -179,61 +179,74 @@ static int __add_prelim_ref(struct list_head *head, u64 root_id, · 178 unmodified lines
179179
180180 static int add_all_parents(struct btrfs_root *root, struct btrfs_path *path,
181181 struct ulist *parents, int level,
182− struct btrfs_key *key, u64 time_seq,
182+ struct btrfs_key *key_for_search, u64 time_seq,
183183 u64 wanted_disk_byte,
184184 const u64 *extent_item_pos)
185185 {
186− int ret;
187− int slot = path->slots[level];
188− struct extent_buffer *eb = path->nodes[level];
186+ int ret = 0;
187+ int slot;
188+ struct extent_buffer *eb;
189+ struct btrfs_key key;
189190 struct btrfs_file_extent_item *fi;
190191 struct extent_inode_elem *eie = NULL;
191192 u64 disk_byte;
192− u64 wanted_objectid = key->objectid;
193193
194−add_parent:
195− if (level == 0 && extent_item_pos) {
196− fi = btrfs_item_ptr(eb, slot, struct btrfs_file_extent_item);
197− ret = check_extent_in_eb(key, eb, fi, *extent_item_pos, &eie);
194+ if (level != 0) {
195+ eb = path->nodes[level];
196+ ret = ulist_add(parents, eb->start, 0, GFP_NOFS);
198197 if (ret < 0)
199198 return ret;
200− }
201− ret = ulist_add(parents, eb->start, (unsigned long)eie, GFP_NOFS);
202− if (ret < 0)
203− return ret;
204−
205− if (level != 0)
206199 return 0;
200+ }
207201
208202 /*
209− * if the current leaf is full with EXTENT_DATA items, we must
210− * check the next one if that holds a reference as well.
211− * ref->count cannot be used to skip this check.
212− * repeat this until we don't find any additional EXTENT_DATA items.
203+ * We normally enter this function with the path already pointing to
204+ * the first item to check. But sometimes, we may enter it with
205+ * slot==nritems. In that case, go to the next leaf before we continue.
213206 */
214− while (1) {
215− eie = NULL;
207+ if (path->slots[0] >= btrfs_header_nritems(path->nodes[0]))
216208 ret = btrfs_next_old_leaf(root, path, time_seq);
217− if (ret < 0)
218− return ret;
219− if (ret)
220− return 0;
221209
210+ while (!ret) {
222211 eb = path->nodes[0];
223− for (slot = 0; slot < btrfs_header_nritems(eb); ++slot) {
224− btrfs_item_key_to_cpu(eb, key, slot);
225− if (key->objectid != wanted_objectid ||
226− key->type != BTRFS_EXTENT_DATA_KEY)
227− return 0;
228− fi = btrfs_item_ptr(eb, slot,
229− struct btrfs_file_extent_item);
230− disk_byte = btrfs_file_extent_disk_bytenr(eb, fi);
231− if (disk_byte == wanted_disk_byte)
232− goto add_parent;
212+ slot = path->slots[0];
213+
214+ btrfs_item_key_to_cpu(eb, &key, slot);
215+
216+ if (key.objectid != key_for_search->objectid ||
217+ key.type != BTRFS_EXTENT_DATA_KEY)
218+ break;
219+
220+ fi = btrfs_item_ptr(eb, slot, struct btrfs_file_extent_item);
221+ disk_byte = btrfs_file_extent_disk_bytenr(eb, fi);
222+
223+ if (disk_byte == wanted_disk_byte) {
224+ eie = NULL;
225+ if (extent_item_pos) {
226+ ret = check_extent_in_eb(&key, eb, fi,
227+ *extent_item_pos,
228+ &eie);
229+ if (ret < 0)
230+ break;
231+ }
232+ if (!ret) {
233+ ret = ulist_add(parents, eb->start,
234+ (unsigned long)eie, GFP_NOFS);
235+ if (ret < 0)
236+ break;
237+ if (!extent_item_pos) {
238+ ret = btrfs_next_old_leaf(root, path,
239+ time_seq);
240+ continue;
241+ }
242+ }
233243 }
244+ ret = btrfs_next_old_item(root, path, time_seq);
234245 }
235246
236− return 0;
247+ if (ret > 0)
248+ ret = 0;
249+ return ret;
237250 }
238251
239252 /*
@@ -250,7 +263,6 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info, · 10 unmodified lines
250263 struct btrfs_path *path;
251264 struct btrfs_root *root;
252265 struct btrfs_key root_key;
253− struct btrfs_key key = {0};
254266 struct extent_buffer *eb;
255267 int ret = 0;
256268 int root_level;
@@ -295,11 +307,9 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info, · 38 unmodified lines
295307 goto out;
296308 }
297309
298− if (level == 0)
299− btrfs_item_key_to_cpu(eb, &key, path->slots[0]);
300−
301− ret = add_all_parents(root, path, parents, level, &key, time_seq,
302− ref->wanted_disk_byte, extent_item_pos);
310+ ret = add_all_parents(root, path, parents, level, &ref->key_for_search,
311+ time_seq, ref->wanted_disk_byte,
312+ extent_item_pos);
303313 out:
304314 btrfs_free_path(path);
305315 return ret;
fs/btrfs/ctree.h+7−2
@@ -2755,13 +2755,18 @@ static inline int btrfs_insert_empty_item(struct btrfs_trans_handle *trans, · 2754 unmodified lines
27552755 int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path);
27562756 int btrfs_next_old_leaf(struct btrfs_root *root, struct btrfs_path *path,
27572757 u64 time_seq);
2758−static inline int btrfs_next_item(struct btrfs_root *root, struct btrfs_path *p)
2758+static inline int btrfs_next_old_item(struct btrfs_root *root,
2759+ struct btrfs_path *p, u64 time_seq)
27592760 {
27602761 ++p->slots[0];
27612762 if (p->slots[0] >= btrfs_header_nritems(p->nodes[0]))
2762− return btrfs_next_leaf(root, p);
2763+ return btrfs_next_old_leaf(root, p, time_seq);
27632764 return 0;
27642765 }
2766+static inline int btrfs_next_item(struct btrfs_root *root, struct btrfs_path *p)
2767+{
2768+ return btrfs_next_old_item(root, p, 0);
2769+}
27652770 int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path);
27662771 int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf);
27672772 int __must_check btrfs_drop_snapshot(struct btrfs_root *root,
fs/btrfs/disk-io.c+1−0
@@ -3426,6 +3426,7 @@ int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, · 3425 unmodified lines
34263426 mutex_unlock(&head->mutex);
34273427 btrfs_put_delayed_ref(ref);
34283428
3429+ spin_lock(&delayed_refs->lock);
34293430 continue;
34303431 }
34313432
fs/btrfs/inode.c+2−2
@@ -987,7 +987,7 @@ static noinline void async_cow_start(struct btrfs_work *work) · 986 unmodified lines
987987 async_cow->start, async_cow->end, async_cow,
988988 &num_added);
989989 if (num_added == 0) {
990− iput(async_cow->inode);
990+ btrfs_add_delayed_iput(async_cow->inode);
991991 async_cow->inode = NULL;
992992 }
993993 }
@@ -1023,7 +1023,7 @@ static noinline void async_cow_free(struct btrfs_work *work) · 29 unmodified lines
10231023 struct async_cow *async_cow;
10241024 async_cow = container_of(work, struct async_cow, work);
10251025 if (async_cow->inode)
1026− iput(async_cow->inode);
1026+ btrfs_add_delayed_iput(async_cow->inode);
10271027 kfree(async_cow);
10281028 }
10291029
fs/ceph/addr.c+12−9
@@ -54,7 +54,12 @@ · 53 unmodified lines
5454 (CONGESTION_ON_THRESH(congestion_kb) - \
5555 (CONGESTION_ON_THRESH(congestion_kb) >> 2))
5656
57−
57+static inline struct ceph_snap_context *page_snap_context(struct page *page)
58+{
59+ if (PagePrivate(page))
60+ return (void *)page->private;
61+ return NULL;
62+}
5863
5964 /*
6065 * Dirty a page. Optimistically adjust accounting, on the assumption
@@ -142,10 +147,9 @@ static void ceph_invalidatepage(struct page *page, unsigned long offset) · 81 unmodified lines
142147 {
143148 struct inode *inode;
144149 struct ceph_inode_info *ci;
145− struct ceph_snap_context *snapc = (void *)page->private;
150+ struct ceph_snap_context *snapc = page_snap_context(page);
146151
147152 BUG_ON(!PageLocked(page));
148− BUG_ON(!page->private);
149153 BUG_ON(!PagePrivate(page));
150154 BUG_ON(!page->mapping);
151155
@@ -182,7 +186,6 @@ static int ceph_releasepage(struct page *page, gfp_t g) · 30 unmodified lines
182186 struct inode *inode = page->mapping ? page->mapping->host : NULL;
183187 dout("%p releasepage %p idx %lu\n", inode, page, page->index);
184188 WARN_ON(PageDirty(page));
185− WARN_ON(page->private);
186189 WARN_ON(PagePrivate(page));
187190 return 0;
188191 }
@@ -443,7 +446,7 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc) · 254 unmodified lines
443446 osdc = &fsc->client->osdc;
444447
445448 /* verify this is a writeable snap context */
446− snapc = (void *)page->private;
449+ snapc = page_snap_context(page);
447450 if (snapc == NULL) {
448451 dout("writepage %p page %p not dirty?\n", inode, page);
449452 goto out;
@@ -451,7 +454,7 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc) · 1 unmodified line
451454 oldest = get_oldest_context(inode, &snap_size);
452455 if (snapc->seq > oldest->seq) {
453456 dout("writepage %p page %p snapc %p not writeable - noop\n",
454− inode, page, (void *)page->private);
457+ inode, page, snapc);
455458 /* we should only noop if called by kswapd */
456459 WARN_ON((current->flags & PF_MEMALLOC) == 0);
457460 ceph_put_snap_context(oldest);
@@ -591,7 +594,7 @@ static void writepages_finish(struct ceph_osd_request *req, · 133 unmodified lines
591594 clear_bdi_congested(&fsc->backing_dev_info,
592595 BLK_RW_ASYNC);
593596
594− ceph_put_snap_context((void *)page->private);
597+ ceph_put_snap_context(page_snap_context(page));
595598 page->private = 0;
596599 ClearPagePrivate(page);
597600 dout("unlocking %d %p\n", i, page);
@@ -795,7 +798,7 @@ get_more_pages: · 197 unmodified lines
795798 }
796799
797800 /* only if matching snap context */
798− pgsnapc = (void *)page->private;
801+ pgsnapc = page_snap_context(page);
799802 if (pgsnapc->seq > snapc->seq) {
800803 dout("page snapc %p %lld > oldest %p %lld\n",
801804 pgsnapc, pgsnapc->seq, snapc, snapc->seq);
@@ -984,7 +987,7 @@ retry_locked: · 182 unmodified lines
984987 BUG_ON(!ci->i_snap_realm);
985988 down_read(&mdsc->snap_rwsem);
986989 BUG_ON(!ci->i_snap_realm->cached_context);
987− snapc = (void *)page->private;
990+ snapc = page_snap_context(page);
988991 if (snapc && snapc != ci->i_head_snapc) {
989992 /*
990993 * this page is already dirty in another (older) snap
fs/exec.c+1−1
@@ -819,10 +819,10 @@ static int exec_mmap(struct mm_struct *mm) · 818 unmodified lines
819819 /* Notify parent that we're no longer interested in the old VM */
820820 tsk = current;
821821 old_mm = current->mm;
822− sync_mm_rss(old_mm);
823822 mm_release(tsk, old_mm);
824823
825824 if (old_mm) {
825+ sync_mm_rss(old_mm);
826826 /*
827827 * Make sure that if there is a core dump in progress
828828 * for the old mm, we get out and die instead of going
fs/hfsplus/ioctl.c+7−2
@@ -31,6 +31,7 @@ static int hfsplus_ioctl_bless(struct file *file, int __user *user_flags) · 30 unmodified lines
3131 struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb);
3232 struct hfsplus_vh *vh = sbi->s_vhdr;
3333 struct hfsplus_vh *bvh = sbi->s_backup_vhdr;
34+ u32 cnid = (unsigned long)dentry->d_fsdata;
3435
3536 if (!capable(CAP_SYS_ADMIN))
3637 return -EPERM;
@@ -41,8 +42,12 @@ static int hfsplus_ioctl_bless(struct file *file, int __user *user_flags) · 4 unmodified lines
4142 vh->finder_info[0] = bvh->finder_info[0] =
4243 cpu_to_be32(parent_ino(dentry));
4344
44− /* Bootloader */
45− vh->finder_info[1] = bvh->finder_info[1] = cpu_to_be32(inode->i_ino);
45+ /*
46+ * Bootloader. Just using the inode here breaks in the case of
47+ * hard links - the firmware wants the ID of the hard link file,
48+ * but the inode points at the indirect inode
49+ */
50+ vh->finder_info[1] = bvh->finder_info[1] = cpu_to_be32(cnid);
4651
4752 /* Per spec, the OS X system folder - same as finder_info[0] here */
4853 vh->finder_info[5] = bvh->finder_info[5] =
fs/hfsplus/wrapper.c+1−1
@@ -56,7 +56,7 @@ int hfsplus_submit_bio(struct super_block *sb, sector_t sector, · 55 unmodified lines
5656 DECLARE_COMPLETION_ONSTACK(wait);
5757 struct bio *bio;
5858 int ret = 0;
59− unsigned int io_size;
59+ u64 io_size;
6060 loff_t start;
6161 int offset;
6262
fs/nfs/client.c+0−1
@@ -207,7 +207,6 @@ error_0: · 206 unmodified lines
207207 static void nfs4_shutdown_session(struct nfs_client *clp)
208208 {
209209 if (nfs4_has_session(clp)) {
210− nfs4_deviceid_purge_client(clp);
211210 nfs4_destroy_session(clp->cl_session);
212211 nfs4_destroy_clientid(clp);
213212 }
fs/nfs/direct.c+1−0
@@ -490,6 +490,7 @@ static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq) · 489 unmodified lines
490490 dreq->error = -EIO;
491491 spin_unlock(cinfo.lock);
492492 }
493+ nfs_release_request(req);
493494 }
494495 nfs_pageio_complete(&desc);
495496
fs/nfs/idmap.c+8−5
@@ -57,6 +57,11 @@ unsigned int nfs_idmap_cache_timeout = 600; · 56 unmodified lines
5757 static const struct cred *id_resolver_cache;
5858 static struct key_type key_type_id_resolver_legacy;
5959
60+struct idmap {
61+ struct rpc_pipe *idmap_pipe;
62+ struct key_construction *idmap_key_cons;
63+ struct mutex idmap_mutex;
64+};
6065
6166 /**
6267 * nfs_fattr_init_names - initialise the nfs_fattr owner_name/group_name fields
@@ -310,9 +315,11 @@ static ssize_t nfs_idmap_get_key(const char *name, size_t namelen, · 247 unmodified lines
310315 name, namelen, type, data,
311316 data_size, NULL);
312317 if (ret < 0) {
318+ mutex_lock(&idmap->idmap_mutex);
313319 ret = nfs_idmap_request_key(&key_type_id_resolver_legacy,
314320 name, namelen, type, data,
315321 data_size, idmap);
322+ mutex_unlock(&idmap->idmap_mutex);
316323 }
317324 return ret;
318325 }
@@ -354,11 +361,6 @@ static int nfs_idmap_lookup_id(const char *name, size_t namelen, const char *typ · 35 unmodified lines
354361 /* idmap classic begins here */
355362 module_param(nfs_idmap_cache_timeout, int, 0644);
356363
357−struct idmap {
358− struct rpc_pipe *idmap_pipe;
359− struct key_construction *idmap_key_cons;
360−};
361−
362364 enum {
363365 Opt_find_uid, Opt_find_gid, Opt_find_user, Opt_find_group, Opt_find_err
364366 };
@@ -469,6 +471,7 @@ nfs_idmap_new(struct nfs_client *clp) · 104 unmodified lines
469471 return error;
470472 }
471473 idmap->idmap_pipe = pipe;
474+ mutex_init(&idmap->idmap_mutex);
472475
473476 clp->cl_idmap = idmap;
474477 return 0;
fs/nfs/inode.c+1−1
@@ -1530,7 +1530,6 @@ static inline void nfs4_init_once(struct nfs_inode *nfsi) · 1529 unmodified lines
15301530 nfsi->delegation_state = 0;
15311531 init_rwsem(&nfsi->rwsem);
15321532 nfsi->layout = NULL;
1533− atomic_set(&nfsi->commit_info.rpcs_out, 0);
15341533 #endif
15351534 }
15361535
@@ -1545,6 +1544,7 @@ static void init_once(void *foo) · 8 unmodified lines
15451544 INIT_LIST_HEAD(&nfsi->commit_info.list);
15461545 nfsi->npages = 0;
15471546 nfsi->commit_info.ncommit = 0;
1547+ atomic_set(&nfsi->commit_info.rpcs_out, 0);
15481548 atomic_set(&nfsi->silly_count, 1);
15491549 INIT_HLIST_HEAD(&nfsi->silly_list);
15501550 init_waitqueue_head(&nfsi->waitqueue);
fs/nfs/pnfs.c+9−4
@@ -70,6 +70,10 @@ find_pnfs_driver(u32 id) · 69 unmodified lines
7070
7171 spin_lock(&pnfs_spinlock);
7272 local = find_pnfs_driver_locked(id);
73+ if (local != NULL && !try_module_get(local->owner)) {
74+ dprintk("%s: Could not grab reference on module\n", __func__);
75+ local = NULL;
76+ }
7377 spin_unlock(&pnfs_spinlock);
7478 return local;
7579 }
@@ -80,6 +84,9 @@ unset_pnfs_layoutdriver(struct nfs_server *nfss) · 4 unmodified lines
8084 if (nfss->pnfs_curr_ld) {
8185 if (nfss->pnfs_curr_ld->clear_layoutdriver)
8286 nfss->pnfs_curr_ld->clear_layoutdriver(nfss);
87+ /* Decrement the MDS count. Purge the deviceid cache if zero */
88+ if (atomic_dec_and_test(&nfss->nfs_client->cl_mds_count))
89+ nfs4_deviceid_purge_client(nfss->nfs_client);
8390 module_put(nfss->pnfs_curr_ld->owner);
8491 }
8592 nfss->pnfs_curr_ld = NULL;
@@ -115,10 +122,6 @@ set_pnfs_layoutdriver(struct nfs_server *server, const struct nfs_fh *mntfh, · 29 unmodified lines
115122 goto out_no_driver;
116123 }
117124 }
118− if (!try_module_get(ld_type->owner)) {
119− dprintk("%s: Could not grab reference on module\n", __func__);
120− goto out_no_driver;
121− }
122125 server->pnfs_curr_ld = ld_type;
123126 if (ld_type->set_layoutdriver
124127 && ld_type->set_layoutdriver(server, mntfh)) {
@@ -127,6 +130,8 @@ set_pnfs_layoutdriver(struct nfs_server *server, const struct nfs_fh *mntfh, · 2 unmodified lines
127130 module_put(ld_type->owner);
128131 goto out_no_driver;
129132 }
133+ /* Bump the MDS count */
134+ atomic_inc(&server->nfs_client->cl_mds_count);
130135
131136 dprintk("%s: pNFS module for %u set\n", __func__, id);
132137 return;
fs/nilfs2/gcinode.c+2−0
@@ -191,6 +191,8 @@ void nilfs_remove_all_gcinodes(struct the_nilfs *nilfs) · 190 unmodified lines
191191 while (!list_empty(head)) {
192192 ii = list_first_entry(head, struct nilfs_inode_info, i_dirty);
193193 list_del_init(&ii->i_dirty);
194+ truncate_inode_pages(&ii->vfs_inode.i_data, 0);
195+ nilfs_btnode_cache_clear(&ii->i_btnode_cache);
194196 iput(&ii->vfs_inode);
195197 }
196198 }
fs/nilfs2/segment.c+2−0
@@ -2309,6 +2309,8 @@ nilfs_remove_written_gcinodes(struct the_nilfs *nilfs, struct list_head *head) · 2308 unmodified lines
23092309 if (!test_bit(NILFS_I_UPDATED, &ii->i_state))
23102310 continue;
23112311 list_del_init(&ii->i_dirty);
2312+ truncate_inode_pages(&ii->vfs_inode.i_data, 0);
2313+ nilfs_btnode_cache_clear(&ii->i_btnode_cache);
23122314 iput(&ii->vfs_inode);
23132315 }
23142316 }
fs/pstore/inode.c+1−1
@@ -258,7 +258,7 @@ fail: · 257 unmodified lines
258258 return rc;
259259 }
260260
261−int pstore_fill_super(struct super_block *sb, void *data, int silent)
261+static int pstore_fill_super(struct super_block *sb, void *data, int silent)
262262 {
263263 struct inode *inode;
264264
fs/pstore/platform.c+12−22
@@ -94,20 +94,15 @@ static const char *get_reason_str(enum kmsg_dump_reason reason) · 93 unmodified lines
9494 * as we can from the end of the buffer.
9595 */
9696 static void pstore_dump(struct kmsg_dumper *dumper,
97− enum kmsg_dump_reason reason,
98− const char *s1, unsigned long l1,
99− const char *s2, unsigned long l2)
97+ enum kmsg_dump_reason reason)
10098 {
101− unsigned long s1_start, s2_start;
102− unsigned long l1_cpy, l2_cpy;
103− unsigned long size, total = 0;
104− char *dst;
99+ unsigned long total = 0;
105100 const char *why;
106101 u64 id;
107− int hsize, ret;
108102 unsigned int part = 1;
109103 unsigned long flags = 0;
110104 int is_locked = 0;
105+ int ret;
111106
112107 why = get_reason_str(reason);
113108
@@ -119,30 +114,25 @@ static void pstore_dump(struct kmsg_dumper *dumper, · 5 unmodified lines
119114 spin_lock_irqsave(&psinfo->buf_lock, flags);
120115 oopscount++;
121116 while (total < kmsg_bytes) {
117+ char *dst;
118+ unsigned long size;
119+ int hsize;
120+ size_t len;
121+
122122 dst = psinfo->buf;
123123 hsize = sprintf(dst, "%s#%d Part%d\n", why, oopscount, part);
124124 size = psinfo->bufsize - hsize;
125125 dst += hsize;
126126
127− l2_cpy = min(l2, size);
128− l1_cpy = min(l1, size - l2_cpy);
129−
130− if (l1_cpy + l2_cpy == 0)
127+ if (!kmsg_dump_get_buffer(dumper, true, dst, size, &len))
131128 break;
132129
133− s2_start = l2 - l2_cpy;
134− s1_start = l1 - l1_cpy;
135−
136− memcpy(dst, s1 + s1_start, l1_cpy);
137− memcpy(dst + l1_cpy, s2 + s2_start, l2_cpy);
138−
139130 ret = psinfo->write(PSTORE_TYPE_DMESG, reason, &id, part,
140− hsize + l1_cpy + l2_cpy, psinfo);
131+ hsize + len, psinfo);
141132 if (ret == 0 && reason == KMSG_DUMP_OOPS && pstore_is_mounted())
142133 pstore_new_entry = 1;
143− l1 -= l1_cpy;
144− l2 -= l2_cpy;
145− total += l1_cpy + l2_cpy;
134+
135+ total += hsize + len;
146136 part++;
147137 }
148138 if (in_nmi()) {
fs/pstore/ram.c+3−0
@@ -106,6 +106,8 @@ static ssize_t ramoops_pstore_read(u64 *id, enum pstore_type_id *type, · 105 unmodified lines
106106 time->tv_sec = 0;
107107 time->tv_nsec = 0;
108108
109+ /* Update old/shadowed buffer. */
110+ persistent_ram_save_old(prz);
109111 size = persistent_ram_old_size(prz);
110112 *buf = kmalloc(size, GFP_KERNEL);
111113 if (*buf == NULL)
@@ -184,6 +186,7 @@ static int ramoops_pstore_erase(enum pstore_type_id type, u64 id, · 72 unmodified lines
184186 return -EINVAL;
185187
186188 persistent_ram_free_old(cxt->przs[id]);
189+ persistent_ram_zap(cxt->przs[id]);
187190
188191 return 0;
189192 }
fs/pstore/ram_core.c+17−10
@@ -250,23 +250,24 @@ static void notrace persistent_ram_update(struct persistent_ram_zone *prz, · 249 unmodified lines
250250 persistent_ram_update_ecc(prz, start, count);
251251 }
252252
253−static void __init
254−persistent_ram_save_old(struct persistent_ram_zone *prz)
253+void persistent_ram_save_old(struct persistent_ram_zone *prz)
255254 {
256255 struct persistent_ram_buffer *buffer = prz->buffer;
257256 size_t size = buffer_size(prz);
258257 size_t start = buffer_start(prz);
259− char *dest;
260258
261− persistent_ram_ecc_old(prz);
259+ if (!size)
260+ return;
262261
263− dest = kmalloc(size, GFP_KERNEL);
264− if (dest == NULL) {
262+ if (!prz->old_log) {
263+ persistent_ram_ecc_old(prz);
264+ prz->old_log = kmalloc(size, GFP_KERNEL);
265+ }
266+ if (!prz->old_log) {
265267 pr_err("persistent_ram: failed to allocate buffer\n");
266268 return;
267269 }
268270
269− prz->old_log = dest;
270271 prz->old_log_size = size;
271272 memcpy(prz->old_log, &buffer->data[start], size - start);
272273 memcpy(prz->old_log + size - start, &buffer->data[0], start);
@@ -319,6 +320,13 @@ void persistent_ram_free_old(struct persistent_ram_zone *prz) · 46 unmodified lines
319320 prz->old_log_size = 0;
320321 }
321322
323+void persistent_ram_zap(struct persistent_ram_zone *prz)
324+{
325+ atomic_set(&prz->buffer->start, 0);
326+ atomic_set(&prz->buffer->size, 0);
327+ persistent_ram_update_header_ecc(prz);
328+}
329+
322330 static void *persistent_ram_vmap(phys_addr_t start, size_t size)
323331 {
324332 struct page **pages;
@@ -405,6 +413,7 @@ static int __init persistent_ram_post_init(struct persistent_ram_zone *prz, bool · 80 unmodified lines
405413 " size %zu, start %zu\n",
406414 buffer_size(prz), buffer_start(prz));
407415 persistent_ram_save_old(prz);
416+ return 0;
408417 }
409418 } else {
410419 pr_info("persistent_ram: no valid data in buffer"
@@ -412,8 +421,7 @@ static int __init persistent_ram_post_init(struct persistent_ram_zone *prz, bool · 1 unmodified line
412421 }
413422
414423 prz->buffer->sig = PERSISTENT_RAM_SIG;
415− atomic_set(&prz->buffer->start, 0);
416− atomic_set(&prz->buffer->size, 0);
424+ persistent_ram_zap(prz);
417425
418426 return 0;
419427 }
@@ -448,7 +456,6 @@ struct persistent_ram_zone * __init persistent_ram_new(phys_addr_t start, · 28 unmodified lines
448456 goto err;
449457
450458 persistent_ram_post_init(prz, ecc);
451− persistent_ram_update_header_ecc(prz);
452459
453460 return prz;
454461 err:
fs/xfs/xfs_alloc.c+2−1
@@ -1080,6 +1080,7 @@ restart: · 1079 unmodified lines
10801080 goto restart;
10811081 }
10821082
1083+ xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR);
10831084 trace_xfs_alloc_size_neither(args);
10841085 args->agbno = NULLAGBLOCK;
10851086 return 0;
@@ -2441,7 +2442,7 @@ xfs_alloc_vextent( · 1355 unmodified lines
24412442 DECLARE_COMPLETION_ONSTACK(done);
24422443
24432444 args->done = &done;
2444− INIT_WORK(&args->work, xfs_alloc_vextent_worker);
2445+ INIT_WORK_ONSTACK(&args->work, xfs_alloc_vextent_worker);
24452446 queue_work(xfs_alloc_wq, &args->work);
24462447 wait_for_completion(&done);
24472448 return args->result;
fs/xfs/xfs_aops.c+8−3
@@ -981,10 +981,15 @@ xfs_vm_writepage( · 980 unmodified lines
981981 imap_valid = 0;
982982 }
983983 } else {
984− if (PageUptodate(page)) {
984+ if (PageUptodate(page))
985985 ASSERT(buffer_mapped(bh));
986− imap_valid = 0;
987− }
986+ /*
987+ * This buffer is not uptodate and will not be
988+ * written to disk. Ensure that we will put any
989+ * subsequent writeable buffers into a new
990+ * ioend.
991+ */
992+ imap_valid = 0;
988993 continue;
989994 }
990995
fs/xfs/xfs_buf.c+2−14
@@ -201,14 +201,7 @@ xfs_buf_alloc( · 200 unmodified lines
201201 bp->b_length = numblks;
202202 bp->b_io_length = numblks;
203203 bp->b_flags = flags;
204−
205− /*
206− * We do not set the block number here in the buffer because we have not
207− * finished initialising the buffer. We insert the buffer into the cache
208− * in this state, so this ensures that we are unable to do IO on a
209− * buffer that hasn't been fully initialised.
210− */
211− bp->b_bn = XFS_BUF_DADDR_NULL;
204+ bp->b_bn = blkno;
212205 atomic_set(&bp->b_pin_count, 0);
213206 init_waitqueue_head(&bp->b_waiters);
214207
@@ -567,11 +560,6 @@ xfs_buf_get( · 352 unmodified lines
567560 if (bp != new_bp)
568561 xfs_buf_free(new_bp);
569562
570− /*
571− * Now we have a workable buffer, fill in the block number so
572− * that we can do IO on it.
573− */
574− bp->b_bn = blkno;
575563 bp->b_io_length = bp->b_length;
576564
577565 found:
@@ -772,7 +760,7 @@ xfs_buf_get_uncached( · 194 unmodified lines
772760 int error, i;
773761 xfs_buf_t *bp;
774762
775− bp = xfs_buf_alloc(target, 0, numblks, 0);
763+ bp = xfs_buf_alloc(target, XFS_BUF_DADDR_NULL, numblks, 0);
776764 if (unlikely(bp == NULL))
777765 goto fail;
778766
fs/xfs/xfs_inode_item.c+8−9
@@ -504,6 +504,14 @@ xfs_inode_item_push( · 503 unmodified lines
504504 goto out_unlock;
505505 }
506506
507+ /*
508+ * Stale inode items should force out the iclog.
509+ */
510+ if (ip->i_flags & XFS_ISTALE) {
511+ rval = XFS_ITEM_PINNED;
512+ goto out_unlock;
513+ }
514+
507515 /*
508516 * Someone else is already flushing the inode. Nothing we can do
509517 * here but wait for the flush to finish and remove the item from
@@ -514,15 +522,6 @@ xfs_inode_item_push( · 4 unmodified lines
514522 goto out_unlock;
515523 }
516524
517− /*
518− * Stale inode items should force out the iclog.
519− */
520− if (ip->i_flags & XFS_ISTALE) {
521− xfs_ifunlock(ip);
522− xfs_iunlock(ip, XFS_ILOCK_SHARED);
523− return XFS_ITEM_PINNED;
524− }
525−
526525 ASSERT(iip->ili_fields != 0 || XFS_FORCED_SHUTDOWN(ip->i_mount));
527526 ASSERT(iip->ili_logged == 0 || XFS_FORCED_SHUTDOWN(ip->i_mount));
528527
fs/xfs/xfs_log.c+45−32
@@ -38,13 +38,21 @@ · 37 unmodified lines
3838 kmem_zone_t *xfs_log_ticket_zone;
3939
4040 /* Local miscellaneous function prototypes */
41−STATIC int xlog_commit_record(struct log *log, struct xlog_ticket *ticket,
42− xlog_in_core_t **, xfs_lsn_t *);
41+STATIC int
42+xlog_commit_record(
43+ struct xlog *log,
44+ struct xlog_ticket *ticket,
45+ struct xlog_in_core **iclog,
46+ xfs_lsn_t *commitlsnp);
47+
4348 STATIC xlog_t * xlog_alloc_log(xfs_mount_t *mp,
4449 xfs_buftarg_t *log_target,
4550 xfs_daddr_t blk_offset,
4651 int num_bblks);
47−STATIC int xlog_space_left(struct log *log, atomic64_t *head);
52+STATIC int
53+xlog_space_left(
54+ struct xlog *log,
55+ atomic64_t *head);
4856 STATIC int xlog_sync(xlog_t *log, xlog_in_core_t *iclog);
4957 STATIC void xlog_dealloc_log(xlog_t *log);
5058
@@ -64,8 +72,10 @@ STATIC void xlog_state_switch_iclogs(xlog_t *log, · 13 unmodified lines
6472 int eventual_size);
6573 STATIC void xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog);
6674
67−STATIC void xlog_grant_push_ail(struct log *log,
68− int need_bytes);
75+STATIC void
76+xlog_grant_push_ail(
77+ struct xlog *log,
78+ int need_bytes);
6979 STATIC void xlog_regrant_reserve_log_space(xlog_t *log,
7080 xlog_ticket_t *ticket);
7181 STATIC void xlog_ungrant_log_space(xlog_t *log,
@@ -73,7 +83,9 @@ STATIC void xlog_ungrant_log_space(xlog_t *log, · 1 unmodified line
7383
7484 #if defined(DEBUG)
7585 STATIC void xlog_verify_dest_ptr(xlog_t *log, char *ptr);
76−STATIC void xlog_verify_grant_tail(struct log *log);
86+STATIC void
87+xlog_verify_grant_tail(
88+ struct xlog *log);
7789 STATIC void xlog_verify_iclog(xlog_t *log, xlog_in_core_t *iclog,
7890 int count, boolean_t syncing);
7991 STATIC void xlog_verify_tail_lsn(xlog_t *log, xlog_in_core_t *iclog,
@@ -89,9 +101,9 @@ STATIC int xlog_iclogs_empty(xlog_t *log); · 9 unmodified lines
89101
90102 static void
91103 xlog_grant_sub_space(
92− struct log *log,
93− atomic64_t *head,
94− int bytes)
104+ struct xlog *log,
105+ atomic64_t *head,
106+ int bytes)
95107 {
96108 int64_t head_val = atomic64_read(head);
97109 int64_t new, old;
@@ -115,9 +127,9 @@ xlog_grant_sub_space( · 17 unmodified lines
115127
116128 static void
117129 xlog_grant_add_space(
118− struct log *log,
119− atomic64_t *head,
120− int bytes)
130+ struct xlog *log,
131+ atomic64_t *head,
132+ int bytes)
121133 {
122134 int64_t head_val = atomic64_read(head);
123135 int64_t new, old;
@@ -165,7 +177,7 @@ xlog_grant_head_wake_all( · 41 unmodified lines
165177
166178 static inline int
167179 xlog_ticket_reservation(
168− struct log *log,
180+ struct xlog *log,
169181 struct xlog_grant_head *head,
170182 struct xlog_ticket *tic)
171183 {
@@ -182,7 +194,7 @@ xlog_ticket_reservation( · 10 unmodified lines
182194
183195 STATIC bool
184196 xlog_grant_head_wake(
185− struct log *log,
197+ struct xlog *log,
186198 struct xlog_grant_head *head,
187199 int *free_bytes)
188200 {
@@ -204,7 +216,7 @@ xlog_grant_head_wake( · 15 unmodified lines
204216
205217 STATIC int
206218 xlog_grant_head_wait(
207− struct log *log,
219+ struct xlog *log,
208220 struct xlog_grant_head *head,
209221 struct xlog_ticket *tic,
210222 int need_bytes)
@@ -256,7 +268,7 @@ shutdown: · 45 unmodified lines
256268 */
257269 STATIC int
258270 xlog_grant_head_check(
259− struct log *log,
271+ struct xlog *log,
260272 struct xlog_grant_head *head,
261273 struct xlog_ticket *tic,
262274 int *need_bytes)
@@ -323,7 +335,7 @@ xfs_log_regrant( · 60 unmodified lines
323335 struct xfs_mount *mp,
324336 struct xlog_ticket *tic)
325337 {
326− struct log *log = mp->m_log;
338+ struct xlog *log = mp->m_log;
327339 int need_bytes;
328340 int error = 0;
329341
@@ -389,7 +401,7 @@ xfs_log_reserve( · 59 unmodified lines
389401 bool permanent,
390402 uint t_type)
391403 {
392− struct log *log = mp->m_log;
404+ struct xlog *log = mp->m_log;
393405 struct xlog_ticket *tic;
394406 int need_bytes;
395407 int error = 0;
@@ -465,7 +477,7 @@ xfs_log_done( · 69 unmodified lines
465477 struct xlog_in_core **iclog,
466478 uint flags)
467479 {
468− struct log *log = mp->m_log;
480+ struct xlog *log = mp->m_log;
469481 xfs_lsn_t lsn = 0;
470482
471483 if (XLOG_FORCED_SHUTDOWN(log) ||
@@ -810,6 +822,7 @@ xfs_log_unmount_write(xfs_mount_t *mp) · 338 unmodified lines
810822 void
811823 xfs_log_unmount(xfs_mount_t *mp)
812824 {
825+ cancel_delayed_work_sync(&mp->m_sync_work);
813826 xfs_trans_ail_destroy(mp);
814827 xlog_dealloc_log(mp->m_log);
815828 }
@@ -838,7 +851,7 @@ void · 22 unmodified lines
838851 xfs_log_space_wake(
839852 struct xfs_mount *mp)
840853 {
841− struct log *log = mp->m_log;
854+ struct xlog *log = mp->m_log;
842855 int free_bytes;
843856
844857 if (XLOG_FORCED_SHUTDOWN(log))
@@ -916,7 +929,7 @@ xfs_lsn_t · 71 unmodified lines
916929 xlog_assign_tail_lsn_locked(
917930 struct xfs_mount *mp)
918931 {
919− struct log *log = mp->m_log;
932+ struct xlog *log = mp->m_log;
920933 struct xfs_log_item *lip;
921934 xfs_lsn_t tail_lsn;
922935
@@ -965,7 +978,7 @@ xlog_assign_tail_lsn( · 42 unmodified lines
965978 */
966979 STATIC int
967980 xlog_space_left(
968− struct log *log,
981+ struct xlog *log,
969982 atomic64_t *head)
970983 {
971984 int free_bytes;
@@ -1277,7 +1290,7 @@ out: · 305 unmodified lines
12771290 */
12781291 STATIC int
12791292 xlog_commit_record(
1280− struct log *log,
1293+ struct xlog *log,
12811294 struct xlog_ticket *ticket,
12821295 struct xlog_in_core **iclog,
12831296 xfs_lsn_t *commitlsnp)
@@ -1311,7 +1324,7 @@ xlog_commit_record( · 27 unmodified lines
13111324 */
13121325 STATIC void
13131326 xlog_grant_push_ail(
1314− struct log *log,
1327+ struct xlog *log,
13151328 int need_bytes)
13161329 {
13171330 xfs_lsn_t threshold_lsn = 0;
@@ -1790,7 +1803,7 @@ xlog_write_start_rec( · 472 unmodified lines
17901803
17911804 static xlog_op_header_t *
17921805 xlog_write_setup_ophdr(
1793− struct log *log,
1806+ struct xlog *log,
17941807 struct xlog_op_header *ophdr,
17951808 struct xlog_ticket *ticket,
17961809 uint flags)
@@ -1873,7 +1886,7 @@ xlog_write_setup_copy( · 76 unmodified lines
18731886
18741887 static int
18751888 xlog_write_copy_finish(
1876− struct log *log,
1889+ struct xlog *log,
18771890 struct xlog_in_core *iclog,
18781891 uint flags,
18791892 int *record_cnt,
@@ -1958,7 +1971,7 @@ xlog_write_copy_finish( · 78 unmodified lines
19581971 */
19591972 int
19601973 xlog_write(
1961− struct log *log,
1974+ struct xlog *log,
19621975 struct xfs_log_vec *log_vector,
19631976 struct xlog_ticket *ticket,
19641977 xfs_lsn_t *start_lsn,
@@ -2821,7 +2834,7 @@ _xfs_log_force( · 856 unmodified lines
28212834 uint flags,
28222835 int *log_flushed)
28232836 {
2824− struct log *log = mp->m_log;
2837+ struct xlog *log = mp->m_log;
28252838 struct xlog_in_core *iclog;
28262839 xfs_lsn_t lsn;
28272840
@@ -2969,7 +2982,7 @@ _xfs_log_force_lsn( · 141 unmodified lines
29692982 uint flags,
29702983 int *log_flushed)
29712984 {
2972− struct log *log = mp->m_log;
2985+ struct xlog *log = mp->m_log;
29732986 struct xlog_in_core *iclog;
29742987 int already_slept = 0;
29752988
@@ -3147,7 +3160,7 @@ xfs_log_ticket_get( · 171 unmodified lines
31473160 */
31483161 xlog_ticket_t *
31493162 xlog_ticket_alloc(
3150− struct log *log,
3163+ struct xlog *log,
31513164 int unit_bytes,
31523165 int cnt,
31533166 char client,
@@ -3278,7 +3291,7 @@ xlog_ticket_alloc( · 124 unmodified lines
32783291 */
32793292 void
32803293 xlog_verify_dest_ptr(
3281− struct log *log,
3294+ struct xlog *log,
32823295 char *ptr)
32833296 {
32843297 int i;
@@ -3307,7 +3320,7 @@ xlog_verify_dest_ptr( · 22 unmodified lines
33073320 */
33083321 STATIC void
33093322 xlog_verify_grant_tail(
3310− struct log *log)
3323+ struct xlog *log)
33113324 {
33123325 int tail_cycle, tail_blocks;
33133326 int cycle, space;
fs/xfs/xfs_log_cil.c+11−11
@@ -44,7 +44,7 @@ · 43 unmodified lines
4444 */
4545 static struct xlog_ticket *
4646 xlog_cil_ticket_alloc(
47− struct log *log)
47+ struct xlog *log)
4848 {
4949 struct xlog_ticket *tic;
5050
@@ -72,7 +72,7 @@ xlog_cil_ticket_alloc( · 21 unmodified lines
7272 */
7373 void
7474 xlog_cil_init_post_recovery(
75− struct log *log)
75+ struct xlog *log)
7676 {
7777 log->l_cilp->xc_ctx->ticket = xlog_cil_ticket_alloc(log);
7878 log->l_cilp->xc_ctx->sequence = 1;
@@ -182,7 +182,7 @@ xlog_cil_prepare_log_vecs( · 103 unmodified lines
182182 */
183183 STATIC void
184184 xfs_cil_prepare_item(
185− struct log *log,
185+ struct xlog *log,
186186 struct xfs_log_vec *lv,
187187 int *len,
188188 int *diff_iovecs)
@@ -231,7 +231,7 @@ xfs_cil_prepare_item( · 42 unmodified lines
231231 */
232232 static void
233233 xlog_cil_insert_items(
234− struct log *log,
234+ struct xlog *log,
235235 struct xfs_log_vec *log_vector,
236236 struct xlog_ticket *ticket)
237237 {
@@ -373,7 +373,7 @@ xlog_cil_committed( · 135 unmodified lines
373373 */
374374 STATIC int
375375 xlog_cil_push(
376− struct log *log)
376+ struct xlog *log)
377377 {
378378 struct xfs_cil *cil = log->l_cilp;
379379 struct xfs_log_vec *lv;
@@ -601,7 +601,7 @@ xlog_cil_push_work( · 221 unmodified lines
601601 */
602602 static void
603603 xlog_cil_push_background(
604− struct log *log)
604+ struct xlog *log)
605605 {
606606 struct xfs_cil *cil = log->l_cilp;
607607
@@ -629,7 +629,7 @@ xlog_cil_push_background( · 21 unmodified lines
629629
630630 static void
631631 xlog_cil_push_foreground(
632− struct log *log,
632+ struct xlog *log,
633633 xfs_lsn_t push_seq)
634634 {
635635 struct xfs_cil *cil = log->l_cilp;
@@ -683,7 +683,7 @@ xfs_log_commit_cil( · 47 unmodified lines
683683 xfs_lsn_t *commit_lsn,
684684 int flags)
685685 {
686− struct log *log = mp->m_log;
686+ struct xlog *log = mp->m_log;
687687 int log_flags = 0;
688688 struct xfs_log_vec *log_vector;
689689
@@ -754,7 +754,7 @@ xfs_log_commit_cil( · 64 unmodified lines
754754 */
755755 xfs_lsn_t
756756 xlog_cil_force_lsn(
757− struct log *log,
757+ struct xlog *log,
758758 xfs_lsn_t sequence)
759759 {
760760 struct xfs_cil *cil = log->l_cilp;
@@ -833,7 +833,7 @@ xfs_log_item_in_current_chkpt( · 72 unmodified lines
833833 */
834834 int
835835 xlog_cil_init(
836− struct log *log)
836+ struct xlog *log)
837837 {
838838 struct xfs_cil *cil;
839839 struct xfs_cil_ctx *ctx;
@@ -869,7 +869,7 @@ xlog_cil_init( · 29 unmodified lines
869869
870870 void
871871 xlog_cil_destroy(
872− struct log *log)
872+ struct xlog *log)
873873 {
874874 if (log->l_cilp->xc_ctx) {
875875 if (log->l_cilp->xc_ctx->ticket)
fs/xfs/xfs_log_priv.h+31−15
@@ -19,7 +19,7 @@ · 18 unmodified lines
1919 #define __XFS_LOG_PRIV_H__
2020
2121 struct xfs_buf;
22−struct log;
22+struct xlog;
2323 struct xlog_ticket;
2424 struct xfs_mount;
2525
@@ -352,7 +352,7 @@ typedef struct xlog_in_core { · 326 unmodified lines
352352 struct xlog_in_core *ic_next;
353353 struct xlog_in_core *ic_prev;
354354 struct xfs_buf *ic_bp;
355− struct log *ic_log;
355+ struct xlog *ic_log;
356356 int ic_size;
357357 int ic_offset;
358358 int ic_bwritecnt;
@@ -409,7 +409,7 @@ struct xfs_cil_ctx { · 50 unmodified lines
409409 * operations almost as efficient as the old logging methods.
410410 */
411411 struct xfs_cil {
412− struct log *xc_log;
412+ struct xlog *xc_log;
413413 struct list_head xc_cil;
414414 spinlock_t xc_cil_lock;
415415 struct xfs_cil_ctx *xc_ctx;
@@ -487,7 +487,7 @@ struct xlog_grant_head { · 71 unmodified lines
487487 * overflow 31 bits worth of byte offset, so using a byte number will mean
488488 * that round off problems won't occur when releasing partial reservations.
489489 */
490−typedef struct log {
490+typedef struct xlog {
491491 /* The following fields don't need locking */
492492 struct xfs_mount *l_mp; /* mount point */
493493 struct xfs_ail *l_ailp; /* AIL log is working with */
@@ -553,9 +553,14 @@ extern int xlog_recover_finish(xlog_t *log); · 59 unmodified lines
553553 extern void xlog_pack_data(xlog_t *log, xlog_in_core_t *iclog, int);
554554
555555 extern kmem_zone_t *xfs_log_ticket_zone;
556−struct xlog_ticket *xlog_ticket_alloc(struct log *log, int unit_bytes,
557− int count, char client, bool permanent,
558− xfs_km_flags_t alloc_flags);
556+struct xlog_ticket *
557+xlog_ticket_alloc(
558+ struct xlog *log,
559+ int unit_bytes,
560+ int count,
561+ char client,
562+ bool permanent,
563+ xfs_km_flags_t alloc_flags);
559564
560565
561566 static inline void
@@ -567,9 +572,14 @@ xlog_write_adv_cnt(void **ptr, int *len, int *off, size_t bytes) · 5 unmodified lines
567572 }
568573
569574 void xlog_print_tic_res(struct xfs_mount *mp, struct xlog_ticket *ticket);
570−int xlog_write(struct log *log, struct xfs_log_vec *log_vector,
571− struct xlog_ticket *tic, xfs_lsn_t *start_lsn,
572− xlog_in_core_t **commit_iclog, uint flags);
575+int
576+xlog_write(
577+ struct xlog *log,
578+ struct xfs_log_vec *log_vector,
579+ struct xlog_ticket *tic,
580+ xfs_lsn_t *start_lsn,
581+ struct xlog_in_core **commit_iclog,
582+ uint flags);
573583
574584 /*
575585 * When we crack an atomic LSN, we sample it first so that the value will not
@@ -629,17 +639,23 @@ xlog_assign_grant_head(atomic64_t *head, int cycle, int space) · 53 unmodified lines
629639 /*
630640 * Committed Item List interfaces
631641 */
632−int xlog_cil_init(struct log *log);
633−void xlog_cil_init_post_recovery(struct log *log);
634−void xlog_cil_destroy(struct log *log);
642+int
643+xlog_cil_init(struct xlog *log);
644+void
645+xlog_cil_init_post_recovery(struct xlog *log);
646+void
647+xlog_cil_destroy(struct xlog *log);
635648
636649 /*
637650 * CIL force routines
638651 */
639−xfs_lsn_t xlog_cil_force_lsn(struct log *log, xfs_lsn_t sequence);
652+xfs_lsn_t
653+xlog_cil_force_lsn(
654+ struct xlog *log,
655+ xfs_lsn_t sequence);
640656
641657 static inline void
642−xlog_cil_force(struct log *log)
658+xlog_cil_force(struct xlog *log)
643659 {
644660 xlog_cil_force_lsn(log, log->l_cilp->xc_current_sequence);
645661 }
fs/xfs/xfs_log_recover.c+19−19
@@ -1471,8 +1471,8 @@ xlog_recover_add_item( · 1470 unmodified lines
14711471
14721472 STATIC int
14731473 xlog_recover_add_to_cont_trans(
1474− struct log *log,
1475− xlog_recover_t *trans,
1474+ struct xlog *log,
1475+ struct xlog_recover *trans,
14761476 xfs_caddr_t dp,
14771477 int len)
14781478 {
@@ -1517,8 +1517,8 @@ xlog_recover_add_to_cont_trans( · 38 unmodified lines
15171517 */
15181518 STATIC int
15191519 xlog_recover_add_to_trans(
1520− struct log *log,
1521− xlog_recover_t *trans,
1520+ struct xlog *log,
1521+ struct xlog_recover *trans,
15221522 xfs_caddr_t dp,
15231523 int len)
15241524 {
@@ -1588,8 +1588,8 @@ xlog_recover_add_to_trans( · 63 unmodified lines
15881588 */
15891589 STATIC int
15901590 xlog_recover_reorder_trans(
1591− struct log *log,
1592− xlog_recover_t *trans,
1591+ struct xlog *log,
1592+ struct xlog_recover *trans,
15931593 int pass)
15941594 {
15951595 xlog_recover_item_t *item, *n;
@@ -1642,8 +1642,8 @@ xlog_recover_reorder_trans( · 46 unmodified lines
16421642 */
16431643 STATIC int
16441644 xlog_recover_buffer_pass1(
1645− struct log *log,
1646− xlog_recover_item_t *item)
1645+ struct xlog *log,
1646+ struct xlog_recover_item *item)
16471647 {
16481648 xfs_buf_log_format_t *buf_f = item->ri_buf[0].i_addr;
16491649 struct list_head *bucket;
@@ -1696,7 +1696,7 @@ xlog_recover_buffer_pass1( · 46 unmodified lines
16961696 */
16971697 STATIC int
16981698 xlog_check_buffer_cancelled(
1699− struct log *log,
1699+ struct xlog *log,
17001700 xfs_daddr_t blkno,
17011701 uint len,
17021702 ushort flags)
@@ -2689,9 +2689,9 @@ xlog_recover_free_trans( · 986 unmodified lines
26892689
26902690 STATIC int
26912691 xlog_recover_commit_pass1(
2692− struct log *log,
2693− struct xlog_recover *trans,
2694− xlog_recover_item_t *item)
2692+ struct xlog *log,
2693+ struct xlog_recover *trans,
2694+ struct xlog_recover_item *item)
26952695 {
26962696 trace_xfs_log_recover_item_recover(log, trans, item, XLOG_RECOVER_PASS1);
26972697
@@ -2716,10 +2716,10 @@ xlog_recover_commit_pass1( · 18 unmodified lines
27162716
27172717 STATIC int
27182718 xlog_recover_commit_pass2(
2719− struct log *log,
2720− struct xlog_recover *trans,
2721− struct list_head *buffer_list,
2722− xlog_recover_item_t *item)
2719+ struct xlog *log,
2720+ struct xlog_recover *trans,
2721+ struct list_head *buffer_list,
2722+ struct xlog_recover_item *item)
27232723 {
27242724 trace_xfs_log_recover_item_recover(log, trans, item, XLOG_RECOVER_PASS2);
27252725
@@ -2753,7 +2753,7 @@ xlog_recover_commit_pass2( · 27 unmodified lines
27532753 */
27542754 STATIC int
27552755 xlog_recover_commit_trans(
2756− struct log *log,
2756+ struct xlog *log,
27572757 struct xlog_recover *trans,
27582758 int pass)
27592759 {
@@ -2793,8 +2793,8 @@ out: · 33 unmodified lines
27932793
27942794 STATIC int
27952795 xlog_recover_unmount_trans(
2796− struct log *log,
2797− xlog_recover_t *trans)
2796+ struct xlog *log,
2797+ struct xlog_recover *trans)
27982798 {
27992799 /* Do nothing now */
28002800 xfs_warn(log->l_mp, "%s: Unmount LR", __func__);
fs/xfs/xfs_mount.h+2−2
@@ -53,7 +53,7 @@ typedef struct xfs_trans_reservations { · 52 unmodified lines
5353
5454 #include "xfs_sync.h"
5555
56−struct log;
56+struct xlog;
5757 struct xfs_mount_args;
5858 struct xfs_inode;
5959 struct xfs_bmbt_irec;
@@ -133,7 +133,7 @@ typedef struct xfs_mount { · 73 unmodified lines
133133 uint m_readio_blocks; /* min read size blocks */
134134 uint m_writeio_log; /* min write size log bytes */
135135 uint m_writeio_blocks; /* min write size blocks */
136− struct log *m_log; /* log specific stuff */
136+ struct xlog *m_log; /* log specific stuff */
137137 int m_logbufs; /* number of log buffers */
138138 int m_logbsize; /* size of each log buffer */
139139 uint m_rsumlevels; /* rt summary levels */
fs/xfs/xfs_sync.c+16−16
@@ -386,23 +386,23 @@ xfs_sync_worker( · 385 unmodified lines
386386 * We shouldn't write/force the log if we are in the mount/unmount
387387 * process or on a read only filesystem. The workqueue still needs to be
388388 * active in both cases, however, because it is used for inode reclaim
389− * during these times. Use the s_umount semaphore to provide exclusion
390− * with unmount.
389+ * during these times. Use the MS_ACTIVE flag to avoid doing anything
390+ * during mount. Doing work during unmount is avoided by calling
391+ * cancel_delayed_work_sync on this work queue before tearing down
392+ * the ail and the log in xfs_log_unmount.
391393 */
392− if (down_read_trylock(&mp->m_super->s_umount)) {
393− if (!(mp->m_flags & XFS_MOUNT_RDONLY)) {
394− /* dgc: errors ignored here */
395− if (mp->m_super->s_frozen == SB_UNFROZEN &&
396− xfs_log_need_covered(mp))
397− error = xfs_fs_log_dummy(mp);
398− else
399− xfs_log_force(mp, 0);
400−
401− /* start pushing all the metadata that is currently
402− * dirty */
403− xfs_ail_push_all(mp->m_ail);
404− }
405− up_read(&mp->m_super->s_umount);
394+ if (!(mp->m_super->s_flags & MS_ACTIVE) &&
395+ !(mp->m_flags & XFS_MOUNT_RDONLY)) {
396+ /* dgc: errors ignored here */
397+ if (mp->m_super->s_frozen == SB_UNFROZEN &&
398+ xfs_log_need_covered(mp))
399+ error = xfs_fs_log_dummy(mp);
400+ else
401+ xfs_log_force(mp, 0);
402+
403+ /* start pushing all the metadata that is currently
404+ * dirty */
405+ xfs_ail_push_all(mp->m_ail);
406406 }
407407
408408 /* queue us up again */
fs/xfs/xfs_trace.h+9−9
@@ -32,7 +32,7 @@ struct xfs_da_node_entry; · 31 unmodified lines
3232 struct xfs_dquot;
3333 struct xfs_log_item;
3434 struct xlog_ticket;
35−struct log;
35+struct xlog;
3636 struct xlog_recover;
3737 struct xlog_recover_item;
3838 struct xfs_buf_log_format;
@@ -762,7 +762,7 @@ DEFINE_DQUOT_EVENT(xfs_dqflush_force); · 723 unmodified lines
762762 DEFINE_DQUOT_EVENT(xfs_dqflush_done);
763763
764764 DECLARE_EVENT_CLASS(xfs_loggrant_class,
765− TP_PROTO(struct log *log, struct xlog_ticket *tic),
765+ TP_PROTO(struct xlog *log, struct xlog_ticket *tic),
766766 TP_ARGS(log, tic),
767767 TP_STRUCT__entry(
768768 __field(dev_t, dev)
@@ -830,7 +830,7 @@ DECLARE_EVENT_CLASS(xfs_loggrant_class, · 61 unmodified lines
830830
831831 #define DEFINE_LOGGRANT_EVENT(name) \
832832 DEFINE_EVENT(xfs_loggrant_class, name, \
833− TP_PROTO(struct log *log, struct xlog_ticket *tic), \
833+ TP_PROTO(struct xlog *log, struct xlog_ticket *tic), \
834834 TP_ARGS(log, tic))
835835 DEFINE_LOGGRANT_EVENT(xfs_log_done_nonperm);
836836 DEFINE_LOGGRANT_EVENT(xfs_log_done_perm);
@@ -1664,7 +1664,7 @@ DEFINE_SWAPEXT_EVENT(xfs_swap_extent_before); · 827 unmodified lines
16641664 DEFINE_SWAPEXT_EVENT(xfs_swap_extent_after);
16651665
16661666 DECLARE_EVENT_CLASS(xfs_log_recover_item_class,
1667− TP_PROTO(struct log *log, struct xlog_recover *trans,
1667+ TP_PROTO(struct xlog *log, struct xlog_recover *trans,
16681668 struct xlog_recover_item *item, int pass),
16691669 TP_ARGS(log, trans, item, pass),
16701670 TP_STRUCT__entry(
@@ -1698,7 +1698,7 @@ DECLARE_EVENT_CLASS(xfs_log_recover_item_class, · 27 unmodified lines
16981698
16991699 #define DEFINE_LOG_RECOVER_ITEM(name) \
17001700 DEFINE_EVENT(xfs_log_recover_item_class, name, \
1701− TP_PROTO(struct log *log, struct xlog_recover *trans, \
1701+ TP_PROTO(struct xlog *log, struct xlog_recover *trans, \
17021702 struct xlog_recover_item *item, int pass), \
17031703 TP_ARGS(log, trans, item, pass))
17041704
@@ -1709,7 +1709,7 @@ DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_tail); · 4 unmodified lines
17091709 DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_recover);
17101710
17111711 DECLARE_EVENT_CLASS(xfs_log_recover_buf_item_class,
1712− TP_PROTO(struct log *log, struct xfs_buf_log_format *buf_f),
1712+ TP_PROTO(struct xlog *log, struct xfs_buf_log_format *buf_f),
17131713 TP_ARGS(log, buf_f),
17141714 TP_STRUCT__entry(
17151715 __field(dev_t, dev)
@@ -1739,7 +1739,7 @@ DECLARE_EVENT_CLASS(xfs_log_recover_buf_item_class, · 23 unmodified lines
17391739
17401740 #define DEFINE_LOG_RECOVER_BUF_ITEM(name) \
17411741 DEFINE_EVENT(xfs_log_recover_buf_item_class, name, \
1742− TP_PROTO(struct log *log, struct xfs_buf_log_format *buf_f), \
1742+ TP_PROTO(struct xlog *log, struct xfs_buf_log_format *buf_f), \
17431743 TP_ARGS(log, buf_f))
17441744
17451745 DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_not_cancel);
@@ -1752,7 +1752,7 @@ DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_reg_buf); · 6 unmodified lines
17521752 DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_dquot_buf);
17531753
17541754 DECLARE_EVENT_CLASS(xfs_log_recover_ino_item_class,
1755− TP_PROTO(struct log *log, struct xfs_inode_log_format *in_f),
1755+ TP_PROTO(struct xlog *log, struct xfs_inode_log_format *in_f),
17561756 TP_ARGS(log, in_f),
17571757 TP_STRUCT__entry(
17581758 __field(dev_t, dev)
@@ -1790,7 +1790,7 @@ DECLARE_EVENT_CLASS(xfs_log_recover_ino_item_class, · 31 unmodified lines
17901790 )
17911791 #define DEFINE_LOG_RECOVER_INO_ITEM(name) \
17921792 DEFINE_EVENT(xfs_log_recover_ino_item_class, name, \
1793− TP_PROTO(struct log *log, struct xfs_inode_log_format *in_f), \
1793+ TP_PROTO(struct xlog *log, struct xfs_inode_log_format *in_f), \
17941794 TP_ARGS(log, in_f))
17951795
17961796 DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_recover);
include/asm-generic/bug.h+5−3
@@ -2,7 +2,6 @@ · 1 unmodified line
22 #define _ASM_GENERIC_BUG_H
33
44 #include <linux/compiler.h>
5−#include <linux/kernel.h>
65
76 #ifdef CONFIG_BUG
87
@@ -32,6 +31,9 @@ struct bug_entry { · 23 unmodified lines
3231
3332 #endif /* CONFIG_GENERIC_BUG */
3433
34+#ifndef __ASSEMBLY__
35+#include <linux/kernel.h>
36+
3537 /*
3638 * Don't use BUG() or BUG_ON() unless there's really no way out; one
3739 * example might be detecting data structure corruption in the middle
@@ -61,7 +63,6 @@ struct bug_entry { · 23 unmodified lines
6163 * to provide better diagnostics.
6264 */
6365 #ifndef __WARN_TAINT
64−#ifndef __ASSEMBLY__
6566 extern __printf(3, 4)
6667 void warn_slowpath_fmt(const char *file, const int line,
6768 const char *fmt, ...);
@@ -70,7 +71,6 @@ void warn_slowpath_fmt_taint(const char *file, const int line, unsigned taint, · 2 unmodified lines
7071 const char *fmt, ...);
7172 extern void warn_slowpath_null(const char *file, const int line);
7273 #define WANT_WARN_ON_SLOWPATH
73−#endif
7474 #define __WARN() warn_slowpath_null(__FILE__, __LINE__)
7575 #define __WARN_printf(arg...) warn_slowpath_fmt(__FILE__, __LINE__, arg)
7676 #define __WARN_printf_taint(taint, arg...) \
@@ -203,4 +203,6 @@ extern void warn_slowpath_null(const char *file, const int line); · 126 unmodified lines
203203 # define WARN_ON_SMP(x) ({0;})
204204 #endif
205205
206+#endif /* __ASSEMBLY__ */
207+
206208 #endif
include/asm-generic/pgtable.h+10−0
@@ -484,6 +484,16 @@ static inline int pmd_none_or_trans_huge_or_clear_bad(pmd_t *pmd) · 483 unmodified lines
484484 /*
485485 * The barrier will stabilize the pmdval in a register or on
486486 * the stack so that it will stop changing under the code.
487+ *
488+ * When CONFIG_TRANSPARENT_HUGEPAGE=y on x86 32bit PAE,
489+ * pmd_read_atomic is allowed to return a not atomic pmdval
490+ * (for example pointing to an hugepage that has never been
491+ * mapped in the pmd). The below checks will only care about
492+ * the low part of the pmd with 32bit PAE x86 anyway, with the
493+ * exception of pmd_none(). So the important thing is that if
494+ * the low part of the pmd is found null, the high part will
495+ * be also null or the pmd_none() check below would be
496+ * confused.
487497 */
488498 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
489499 barrier();
include/drm/drm_pciids.h+0−4
@@ -1,7 +1,3 @@
1−/*
2− This file is auto-generated from the drm_pciids.txt in the DRM CVS
3− Please contact dri-devel@lists.sf.net to add new cards to this list
4−*/
51 #define radeon_PCI_IDS \
62 {0x1002, 0x3150, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \
73 {0x1002, 0x3151, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
include/linux/compiler-gcc.h+3−3
@@ -47,9 +47,9 @@ · 46 unmodified lines
4747 */
4848 #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
4949 !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
50−# define inline inline __attribute__((always_inline))
51−# define __inline__ __inline__ __attribute__((always_inline))
52−# define __inline __inline __attribute__((always_inline))
50+# define inline inline __attribute__((always_inline)) notrace
51+# define __inline__ __inline__ __attribute__((always_inline)) notrace
52+# define __inline __inline __attribute__((always_inline)) notrace
5353 #else
5454 /* A lot of inline functions can cause havoc with function tracing */
5555 # define inline inline notrace
include/linux/kmsg_dump.h+38−7
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121 * is passed to the kernel.
2222 */
2323 enum kmsg_dump_reason {
24+ KMSG_DUMP_UNDEF,
2425 KMSG_DUMP_PANIC,
2526 KMSG_DUMP_OOPS,
2627 KMSG_DUMP_EMERG,
@@ -31,23 +32,37 @@ enum kmsg_dump_reason { · 4 unmodified lines
3132
3233 /**
3334 * struct kmsg_dumper - kernel crash message dumper structure
34− * @dump: The callback which gets called on crashes. The buffer is passed
35− * as two sections, where s1 (length l1) contains the older
36− * messages and s2 (length l2) contains the newer.
3735 * @list: Entry in the dumper list (private)
36+ * @dump: Call into dumping code which will retrieve the data with
37+ * through the record iterator
38+ * @max_reason: filter for highest reason number that should be dumped
3839 * @registered: Flag that specifies if this is already registered
3940 */
4041 struct kmsg_dumper {
41− void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason,
42− const char *s1, unsigned long l1,
43− const char *s2, unsigned long l2);
4442 struct list_head list;
45− int registered;
43+ void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason);
44+ enum kmsg_dump_reason max_reason;
45+ bool active;
46+ bool registered;
47+
48+ /* private state of the kmsg iterator */
49+ u32 cur_idx;
50+ u32 next_idx;
51+ u64 cur_seq;
52+ u64 next_seq;
4653 };
4754
4855 #ifdef CONFIG_PRINTK
4956 void kmsg_dump(enum kmsg_dump_reason reason);
5057
58+bool kmsg_dump_get_line(struct kmsg_dumper *dumper, bool syslog,
59+ char *line, size_t size, size_t *len);
60+
61+bool kmsg_dump_get_buffer(struct kmsg_dumper *dumper, bool syslog,
62+ char *buf, size_t size, size_t *len);
63+
64+void kmsg_dump_rewind(struct kmsg_dumper *dumper);
65+
5166 int kmsg_dump_register(struct kmsg_dumper *dumper);
5267
5368 int kmsg_dump_unregister(struct kmsg_dumper *dumper);
@@ -56,6 +71,22 @@ static inline void kmsg_dump(enum kmsg_dump_reason reason) · 2 unmodified lines
5671 {
5772 }
5873
74+static inline bool kmsg_dump_get_line(struct kmsg_dumper *dumper, bool syslog,
75+ const char *line, size_t size, size_t *len)
76+{
77+ return false;
78+}
79+
80+static inline bool kmsg_dump_get_buffer(struct kmsg_dumper *dumper, bool syslog,
81+ char *buf, size_t size, size_t *len)
82+{
83+ return false;
84+}
85+
86+static inline void kmsg_dump_rewind(struct kmsg_dumper *dumper)
87+{
88+}
89+
5990 static inline int kmsg_dump_register(struct kmsg_dumper *dumper)
6091 {
6192 return -EINVAL;
include/linux/mm_types.h+10−0
@@ -57,8 +57,18 @@ struct page { · 56 unmodified lines
5757 };
5858
5959 union {
60+#if defined(CONFIG_HAVE_CMPXCHG_DOUBLE) && \
61+ defined(CONFIG_HAVE_ALIGNED_STRUCT_PAGE)
6062 /* Used for cmpxchg_double in slub */
6163 unsigned long counters;
64+#else
65+ /*
66+ * Keep _count separate from slub cmpxchg_double data.
67+ * As the rest of the double word is protected by
68+ * slab_lock but _count is not.
69+ */
70+ unsigned counters;
71+#endif
6272
6373 struct {
6474
include/linux/mmc/sdhci-spear.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * SDHCI declarations specific to ST SPEAr platform
55 *
66 * Copyright (C) 2010 ST Microelectronics
7− * Viresh Kumar<viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
include/linux/mmc/sdio.h+2−0
@@ -98,7 +98,9 @@ · 97 unmodified lines
9898
9999 #define SDIO_CCCR_IF 0x07 /* bus interface controls */
100100
101+#define SDIO_BUS_WIDTH_MASK 0x03 /* data bus width setting */
101102 #define SDIO_BUS_WIDTH_1BIT 0x00
103+#define SDIO_BUS_WIDTH_RESERVED 0x01
102104 #define SDIO_BUS_WIDTH_4BIT 0x02
103105 #define SDIO_BUS_ECSI 0x20 /* Enable continuous SPI interrupt */
104106 #define SDIO_BUS_SCSI 0x40 /* Support continuous SPI interrupt */
include/linux/nfs_fs_sb.h+1−0
@@ -25,6 +25,7 @@ struct nfs41_impl_id; · 24 unmodified lines
2525 */
2626 struct nfs_client {
2727 atomic_t cl_count;
28+ atomic_t cl_mds_count;
2829 int cl_cons_state; /* current construction state (-ve: init error) */
2930 #define NFS_CS_READY 0 /* ready to be used */
3031 #define NFS_CS_INITING 1 /* busy initialising */
include/linux/pata_arasan_cf_data.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 * Arasan Compact Flash host controller platform data header file
55 *
66 * Copyright (C) 2011 ST Microelectronics
7− * Viresh Kumar <viresh.kumar@st.com>
7+ * Viresh Kumar <viresh.linux@gmail.com>
88 *
99 * This file is licensed under the terms of the GNU General Public
1010 * License version 2. This program is licensed "as is" without any
include/linux/pstore_ram.h+2−0
@@ -69,12 +69,14 @@ struct persistent_ram_zone * __init persistent_ram_new(phys_addr_t start, · 68 unmodified lines
6969 size_t size,
7070 bool ecc);
7171 void persistent_ram_free(struct persistent_ram_zone *prz);
72+void persistent_ram_zap(struct persistent_ram_zone *prz);
7273 struct persistent_ram_zone *persistent_ram_init_ringbuffer(struct device *dev,
7374 bool ecc);
7475
7576 int persistent_ram_write(struct persistent_ram_zone *prz, const void *s,
7677 unsigned int count);
7778
79+void persistent_ram_save_old(struct persistent_ram_zone *prz);
7880 size_t persistent_ram_old_size(struct persistent_ram_zone *prz);
7981 void *persistent_ram_old(struct persistent_ram_zone *prz);
8082 void persistent_ram_free_old(struct persistent_ram_zone *prz);
include/linux/pxa2xx_ssp.h+2−0
@@ -160,7 +160,9 @@ enum pxa_ssp_type { · 159 unmodified lines
160160 PXA25x_SSP, /* pxa 210, 250, 255, 26x */
161161 PXA25x_NSSP, /* pxa 255, 26x (including ASSP) */
162162 PXA27x_SSP,
163+ PXA3xx_SSP,
163164 PXA168_SSP,
165+ PXA910_SSP,
164166 CE4100_SSP,
165167 };
166168
include/linux/spi/pxa2xx_spi.h+1−1
@@ -43,7 +43,7 @@ struct pxa2xx_spi_chip { · 42 unmodified lines
4343 void (*cs_control)(u32 command);
4444 };
4545
46−#ifdef CONFIG_ARCH_PXA
46+#if defined(CONFIG_ARCH_PXA) || defined(CONFIG_ARCH_MMP)
4747
4848 #include <linux/clk.h>
4949 #include <mach/dma.h>
include/linux/vga_switcheroo.h+6−0
@@ -7,8 +7,13 @@ · 6 unmodified lines
77 * vga_switcheroo.h - Support for laptop with dual GPU using one set of outputs
88 */
99
10+#ifndef _LINUX_VGA_SWITCHEROO_H_
11+#define _LINUX_VGA_SWITCHEROO_H_
12+
1013 #include <linux/fb.h>
1114
15+struct pci_dev;
16+
1217 enum vga_switcheroo_state {
1318 VGA_SWITCHEROO_OFF,
1419 VGA_SWITCHEROO_ON,
@@ -71,3 +76,4 @@ static inline int vga_switcheroo_get_client_state(struct pci_dev *dev) { return · 56 unmodified lines
7176
7277
7378 #endif
79+#endif /* _LINUX_VGA_SWITCHEROO_H_ */
kernel/cgroup.c+10−3
@@ -255,12 +255,17 @@ int cgroup_lock_is_held(void) · 254 unmodified lines
255255
256256 EXPORT_SYMBOL_GPL(cgroup_lock_is_held);
257257
258+static int css_unbias_refcnt(int refcnt)
259+{
260+ return refcnt >= 0 ? refcnt : refcnt - CSS_DEACT_BIAS;
261+}
262+
258263 /* the current nr of refs, always >= 0 whether @css is deactivated or not */
259264 static int css_refcnt(struct cgroup_subsys_state *css)
260265 {
261266 int v = atomic_read(&css->refcnt);
262267
263− return v >= 0 ? v : v - CSS_DEACT_BIAS;
268+ return css_unbias_refcnt(v);
264269 }
265270
266271 /* convenient tests for these bits */
@@ -4982,10 +4987,12 @@ EXPORT_SYMBOL_GPL(__css_tryget); · 4715 unmodified lines
49824987 void __css_put(struct cgroup_subsys_state *css)
49834988 {
49844989 struct cgroup *cgrp = css->cgroup;
4990+ int v;
49854991
49864992 rcu_read_lock();
4987− atomic_dec(&css->refcnt);
4988− switch (css_refcnt(css)) {
4993+ v = css_unbias_refcnt(atomic_dec_return(&css->refcnt));
4994+
4995+ switch (v) {
49894996 case 1:
49904997 if (notify_on_release(cgrp)) {
49914998 set_bit(CGRP_RELEASABLE, &cgrp->flags);
kernel/events/core.c+7−3
@@ -253,9 +253,9 @@ perf_cgroup_match(struct perf_event *event) · 252 unmodified lines
253253 return !event->cgrp || event->cgrp == cpuctx->cgrp;
254254 }
255255
256−static inline void perf_get_cgroup(struct perf_event *event)
256+static inline bool perf_tryget_cgroup(struct perf_event *event)
257257 {
258− css_get(&event->cgrp->css);
258+ return css_tryget(&event->cgrp->css);
259259 }
260260
261261 static inline void perf_put_cgroup(struct perf_event *event)
@@ -484,7 +484,11 @@ static inline int perf_cgroup_connect(int fd, struct perf_event *event, · 222 unmodified lines
484484 event->cgrp = cgrp;
485485
486486 /* must be done before we fput() the file */
487− perf_get_cgroup(event);
487+ if (!perf_tryget_cgroup(event)) {
488+ event->cgrp = NULL;
489+ ret = -ENOENT;
490+ goto out;
491+ }
488492
489493 /*
490494 * all events in a group must monitor
kernel/exit.c+13−6
@@ -72,6 +72,18 @@ static void __unhash_process(struct task_struct *p, bool group_dead) · 71 unmodified lines
7272 list_del_rcu(&p->tasks);
7373 list_del_init(&p->sibling);
7474 __this_cpu_dec(process_counts);
75+ /*
76+ * If we are the last child process in a pid namespace to be
77+ * reaped, notify the reaper sleeping zap_pid_ns_processes().
78+ */
79+ if (IS_ENABLED(CONFIG_PID_NS)) {
80+ struct task_struct *parent = p->real_parent;
81+
82+ if ((task_active_pid_ns(parent)->child_reaper == parent) &&
83+ list_empty(&parent->children) &&
84+ (parent->flags & PF_EXITING))
85+ wake_up_process(parent);
86+ }
7587 }
7688 list_del_rcu(&p->thread_group);
7789 }
@@ -643,6 +655,7 @@ static void exit_mm(struct task_struct * tsk) · 565 unmodified lines
643655 mm_release(tsk, mm);
644656 if (!mm)
645657 return;
658+ sync_mm_rss(mm);
646659 /*
647660 * Serialize with any possible pending coredump.
648661 * We must hold mmap_sem around checking core_state
@@ -719,12 +732,6 @@ static struct task_struct *find_new_reaper(struct task_struct *father) · 70 unmodified lines
719732
720733 zap_pid_ns_processes(pid_ns);
721734 write_lock_irq(&tasklist_lock);
722− /*
723− * We can not clear ->child_reaper or leave it alone.
724− * There may by stealth EXIT_DEAD tasks on ->children,
725− * forget_original_parent() must move them somewhere.
726− */
727− pid_ns->child_reaper = init_pid_ns.child_reaper;
728735 } else if (father->signal->has_child_subreaper) {
729736 struct task_struct *reaper;
730737
kernel/pid_namespace.c+20−0
@@ -184,11 +184,31 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns) · 183 unmodified lines
184184 }
185185 read_unlock(&tasklist_lock);
186186
187+ /* Firstly reap the EXIT_ZOMBIE children we may have. */
187188 do {
188189 clear_thread_flag(TIF_SIGPENDING);
189190 rc = sys_wait4(-1, NULL, __WALL, NULL);
190191 } while (rc != -ECHILD);
191192
193+ /*
194+ * sys_wait4() above can't reap the TASK_DEAD children.
195+ * Make sure they all go away, see __unhash_process().
196+ */
197+ for (;;) {
198+ bool need_wait = false;
199+
200+ read_lock(&tasklist_lock);
201+ if (!list_empty(&current->children)) {
202+ __set_current_state(TASK_UNINTERRUPTIBLE);
203+ need_wait = true;
204+ }
205+ read_unlock(&tasklist_lock);
206+
207+ if (!need_wait)
208+ break;
209+ schedule();
210+ }
211+
192212 if (pid_ns->reboot)
193213 current->signal->group_exit_code = pid_ns->reboot;
194214
kernel/printk.c+208−33
@@ -227,10 +227,10 @@ static u32 clear_idx; · 226 unmodified lines
227227 #define LOG_LINE_MAX 1024
228228
229229 /* record buffer */
230−#if !defined(CONFIG_64BIT) || defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS)
230+#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS)
231231 #define LOG_ALIGN 4
232232 #else
233−#define LOG_ALIGN 8
233+#define LOG_ALIGN __alignof__(struct log)
234234 #endif
235235 #define __LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT)
236236 static char __log_buf[__LOG_BUF_LEN] __aligned(LOG_ALIGN);
@@ -414,7 +414,9 @@ static ssize_t devkmsg_read(struct file *file, char __user *buf, · 177 unmodified lines
414414 if (!user)
415415 return -EBADF;
416416
417− mutex_lock(&user->lock);
417+ ret = mutex_lock_interruptible(&user->lock);
418+ if (ret)
419+ return ret;
418420 raw_spin_lock(&logbuf_lock);
419421 while (user->seq == log_next_seq) {
420422 if (file->f_flags & O_NONBLOCK) {
@@ -878,7 +880,9 @@ static int syslog_print(char __user *buf, int size) · 457 unmodified lines
878880 syslog_seq++;
879881 raw_spin_unlock_irq(&logbuf_lock);
880882
881− if (len > 0 && copy_to_user(buf, text, len))
883+ if (len > size)
884+ len = -EINVAL;
885+ else if (len > 0 && copy_to_user(buf, text, len))
882886 len = -EFAULT;
883887
884888 kfree(text);
@@ -909,7 +913,7 @@ static int syslog_print_all(char __user *buf, int size, bool clear) · 24 unmodified lines
909913 /*
910914 * Find first record that fits, including all following records,
911915 * into the user-provided buffer for this dump.
912− */
916+ */
913917 seq = clear_seq;
914918 idx = clear_idx;
915919 while (seq < log_next_seq) {
@@ -919,6 +923,8 @@ static int syslog_print_all(char __user *buf, int size, bool clear) · 3 unmodified lines
919923 idx = log_next(idx);
920924 seq++;
921925 }
926+
927+ /* move first record forward until length fits into the buffer */
922928 seq = clear_seq;
923929 idx = clear_idx;
924930 while (len > size && seq < log_next_seq) {
@@ -929,7 +935,7 @@ static int syslog_print_all(char __user *buf, int size, bool clear) · 4 unmodified lines
929935 seq++;
930936 }
931937
932− /* last message in this dump */
938+ /* last message fitting into this dump */
933939 next_seq = log_next_seq;
934940
935941 len = 0;
@@ -974,6 +980,7 @@ int do_syslog(int type, char __user *buf, int len, bool from_file) · 38 unmodified lines
974980 {
975981 bool clear = false;
976982 static int saved_console_loglevel = -1;
983+ static DEFINE_MUTEX(syslog_mutex);
977984 int error;
978985
979986 error = check_syslog_permissions(type, from_file);
@@ -1000,11 +1007,17 @@ int do_syslog(int type, char __user *buf, int len, bool from_file) · 20 unmodified lines
10001007 error = -EFAULT;
10011008 goto out;
10021009 }
1010+ error = mutex_lock_interruptible(&syslog_mutex);
1011+ if (error)
1012+ goto out;
10031013 error = wait_event_interruptible(log_wait,
10041014 syslog_seq != log_next_seq);
1005− if (error)
1015+ if (error) {
1016+ mutex_unlock(&syslog_mutex);
10061017 goto out;
1018+ }
10071019 error = syslog_print(buf, len);
1020+ mutex_unlock(&syslog_mutex);
10081021 break;
10091022 /* Read/clear last kernel messages */
10101023 case SYSLOG_ACTION_READ_CLEAR:
@@ -2300,48 +2313,210 @@ module_param_named(always_kmsg_dump, always_kmsg_dump, bool, S_IRUGO | S_IWUSR); · 1289 unmodified lines
23002313 * kmsg_dump - dump kernel log to kernel message dumpers.
23012314 * @reason: the reason (oops, panic etc) for dumping
23022315 *
2303− * Iterate through each of the dump devices and call the oops/panic
2304− * callbacks with the log buffer.
2316+ * Call each of the registered dumper's dump() callback, which can
2317+ * retrieve the kmsg records with kmsg_dump_get_line() or
2318+ * kmsg_dump_get_buffer().
23052319 */
23062320 void kmsg_dump(enum kmsg_dump_reason reason)
23072321 {
2308− u64 idx;
23092322 struct kmsg_dumper *dumper;
2310− const char *s1, *s2;
2311− unsigned long l1, l2;
23122323 unsigned long flags;
23132324
23142325 if ((reason > KMSG_DUMP_OOPS) && !always_kmsg_dump)
23152326 return;
23162327
2317− /* Theoretically, the log could move on after we do this, but
2318− there's not a lot we can do about that. The new messages
2319− will overwrite the start of what we dump. */
2328+ rcu_read_lock();
2329+ list_for_each_entry_rcu(dumper, &dump_list, list) {
2330+ if (dumper->max_reason && reason > dumper->max_reason)
2331+ continue;
2332+
2333+ /* initialize iterator with data about the stored records */
2334+ dumper->active = true;
2335+
2336+ raw_spin_lock_irqsave(&logbuf_lock, flags);
2337+ dumper->cur_seq = clear_seq;
2338+ dumper->cur_idx = clear_idx;
2339+ dumper->next_seq = log_next_seq;
2340+ dumper->next_idx = log_next_idx;
2341+ raw_spin_unlock_irqrestore(&logbuf_lock, flags);
2342+
2343+ /* invoke dumper which will iterate over records */
2344+ dumper->dump(dumper, reason);
2345+
2346+ /* reset iterator */
2347+ dumper->active = false;
2348+ }
2349+ rcu_read_unlock();
2350+}
2351+
2352+/**
2353+ * kmsg_dump_get_line - retrieve one kmsg log line
2354+ * @dumper: registered kmsg dumper
2355+ * @syslog: include the "<4>" prefixes
2356+ * @line: buffer to copy the line to
2357+ * @size: maximum size of the buffer
2358+ * @len: length of line placed into buffer
2359+ *
2360+ * Start at the beginning of the kmsg buffer, with the oldest kmsg
2361+ * record, and copy one record into the provided buffer.
2362+ *
2363+ * Consecutive calls will return the next available record moving
2364+ * towards the end of the buffer with the youngest messages.
2365+ *
2366+ * A return value of FALSE indicates that there are no more records to
2367+ * read.
2368+ */
2369+bool kmsg_dump_get_line(struct kmsg_dumper *dumper, bool syslog,
2370+ char *line, size_t size, size_t *len)
2371+{
2372+ unsigned long flags;
2373+ struct log *msg;
2374+ size_t l = 0;
2375+ bool ret = false;
2376+
2377+ if (!dumper->active)
2378+ goto out;
23202379
23212380 raw_spin_lock_irqsave(&logbuf_lock, flags);
2322− if (syslog_seq < log_first_seq)
2323− idx = syslog_idx;
2324− else
2325− idx = log_first_idx;
2381+ if (dumper->cur_seq < log_first_seq) {
2382+ /* messages are gone, move to first available one */
2383+ dumper->cur_seq = log_first_seq;
2384+ dumper->cur_idx = log_first_idx;
2385+ }
2386+
2387+ /* last entry */
2388+ if (dumper->cur_seq >= log_next_seq) {
2389+ raw_spin_unlock_irqrestore(&logbuf_lock, flags);
2390+ goto out;
2391+ }
23262392
2327− if (idx > log_next_idx) {
2328− s1 = log_buf;
2329− l1 = log_next_idx;
2393+ msg = log_from_idx(dumper->cur_idx);
2394+ l = msg_print_text(msg, syslog,
2395+ line, size);
23302396
2331− s2 = log_buf + idx;
2332− l2 = log_buf_len - idx;
2333− } else {
2334− s1 = "";
2335− l1 = 0;
2397+ dumper->cur_idx = log_next(dumper->cur_idx);
2398+ dumper->cur_seq++;
2399+ ret = true;
2400+ raw_spin_unlock_irqrestore(&logbuf_lock, flags);
2401+out:
2402+ if (len)
2403+ *len = l;
2404+ return ret;
2405+}
2406+EXPORT_SYMBOL_GPL(kmsg_dump_get_line);
2407+
2408+/**
2409+ * kmsg_dump_get_buffer - copy kmsg log lines
2410+ * @dumper: registered kmsg dumper
2411+ * @syslog: include the "<4>" prefixes
2412+ * @line: buffer to copy the line to
2413+ * @size: maximum size of the buffer
2414+ * @len: length of line placed into buffer
2415+ *
2416+ * Start at the end of the kmsg buffer and fill the provided buffer
2417+ * with as many of the the *youngest* kmsg records that fit into it.
2418+ * If the buffer is large enough, all available kmsg records will be
2419+ * copied with a single call.
2420+ *
2421+ * Consecutive calls will fill the buffer with the next block of
2422+ * available older records, not including the earlier retrieved ones.
2423+ *
2424+ * A return value of FALSE indicates that there are no more records to
2425+ * read.
2426+ */
2427+bool kmsg_dump_get_buffer(struct kmsg_dumper *dumper, bool syslog,
2428+ char *buf, size_t size, size_t *len)
2429+{
2430+ unsigned long flags;
2431+ u64 seq;
2432+ u32 idx;
2433+ u64 next_seq;
2434+ u32 next_idx;
2435+ size_t l = 0;
2436+ bool ret = false;
2437+
2438+ if (!dumper->active)
2439+ goto out;
2440+
2441+ raw_spin_lock_irqsave(&logbuf_lock, flags);
2442+ if (dumper->cur_seq < log_first_seq) {
2443+ /* messages are gone, move to first available one */
2444+ dumper->cur_seq = log_first_seq;
2445+ dumper->cur_idx = log_first_idx;
2446+ }
2447+
2448+ /* last entry */
2449+ if (dumper->cur_seq >= dumper->next_seq) {
2450+ raw_spin_unlock_irqrestore(&logbuf_lock, flags);
2451+ goto out;
2452+ }
2453+
2454+ /* calculate length of entire buffer */
2455+ seq = dumper->cur_seq;
2456+ idx = dumper->cur_idx;
2457+ while (seq < dumper->next_seq) {
2458+ struct log *msg = log_from_idx(idx);
2459+
2460+ l += msg_print_text(msg, true, NULL, 0);
2461+ idx = log_next(idx);
2462+ seq++;
2463+ }
23362464
2337− s2 = log_buf + idx;
2338− l2 = log_next_idx - idx;
2465+ /* move first record forward until length fits into the buffer */
2466+ seq = dumper->cur_seq;
2467+ idx = dumper->cur_idx;
2468+ while (l > size && seq < dumper->next_seq) {
2469+ struct log *msg = log_from_idx(idx);
2470+
2471+ l -= msg_print_text(msg, true, NULL, 0);
2472+ idx = log_next(idx);
2473+ seq++;
2474+ }
2475+
2476+ /* last message in next interation */
2477+ next_seq = seq;
2478+ next_idx = idx;
2479+
2480+ l = 0;
2481+ while (seq < dumper->next_seq) {
2482+ struct log *msg = log_from_idx(idx);
2483+
2484+ l += msg_print_text(msg, syslog,
2485+ buf + l, size - l);
2486+
2487+ idx = log_next(idx);
2488+ seq++;
23392489 }
2490+
2491+ dumper->next_seq = next_seq;
2492+ dumper->next_idx = next_idx;
2493+ ret = true;
23402494 raw_spin_unlock_irqrestore(&logbuf_lock, flags);
2495+out:
2496+ if (len)
2497+ *len = l;
2498+ return ret;
2499+}
2500+EXPORT_SYMBOL_GPL(kmsg_dump_get_buffer);
23412501
2342− rcu_read_lock();
2343− list_for_each_entry_rcu(dumper, &dump_list, list)
2344− dumper->dump(dumper, reason, s1, l1, s2, l2);
2345− rcu_read_unlock();
2502+/**
2503+ * kmsg_dump_rewind - reset the interator
2504+ * @dumper: registered kmsg dumper
2505+ *
2506+ * Reset the dumper's iterator so that kmsg_dump_get_line() and
2507+ * kmsg_dump_get_buffer() can be called again and used multiple
2508+ * times within the same dumper.dump() callback.
2509+ */
2510+void kmsg_dump_rewind(struct kmsg_dumper *dumper)
2511+{
2512+ unsigned long flags;
2513+
2514+ raw_spin_lock_irqsave(&logbuf_lock, flags);
2515+ dumper->cur_seq = clear_seq;
2516+ dumper->cur_idx = clear_idx;
2517+ dumper->next_seq = log_next_seq;
2518+ dumper->next_idx = log_next_idx;
2519+ raw_spin_unlock_irqrestore(&logbuf_lock, flags);
23462520 }
2521+EXPORT_SYMBOL_GPL(kmsg_dump_rewind);
23472522 #endif
kernel/sys.c+3−3
@@ -2127,9 +2127,6 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, · 2126 unmodified lines
21272127 else
21282128 return -EINVAL;
21292129 break;
2130− case PR_GET_TID_ADDRESS:
2131− error = prctl_get_tid_address(me, (int __user **)arg2);
2132− break;
21332130 default:
21342131 return -EINVAL;
21352132 }
@@ -2147,6 +2144,9 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, · 11 unmodified lines
21472144 case PR_SET_MM:
21482145 error = prctl_set_mm(arg2, arg3, arg4, arg5);
21492146 break;
2147+ case PR_GET_TID_ADDRESS:
2148+ error = prctl_get_tid_address(me, (int __user **)arg2);
2149+ break;
21502150 case PR_SET_CHILD_SUBREAPER:
21512151 me->signal->is_child_subreaper = !!arg2;
21522152 error = 0;
lib/fault-inject.c+4−0
@@ -101,6 +101,10 @@ static inline bool fail_stacktrace(struct fault_attr *attr) · 100 unmodified lines
101101
102102 bool should_fail(struct fault_attr *attr, ssize_t size)
103103 {
104+ /* No need to check any other properties if the probability is 0 */
105+ if (attr->probability == 0)
106+ return false;
107+
104108 if (attr->task_filter && !fail_task(attr, current))
105109 return false;
106110
mm/memblock.c+38−10
@@ -184,7 +184,24 @@ static void __init_memblock memblock_remove_region(struct memblock_type *type, u · 183 unmodified lines
184184 }
185185 }
186186
187−static int __init_memblock memblock_double_array(struct memblock_type *type)
187+/**
188+ * memblock_double_array - double the size of the memblock regions array
189+ * @type: memblock type of the regions array being doubled
190+ * @new_area_start: starting address of memory range to avoid overlap with
191+ * @new_area_size: size of memory range to avoid overlap with
192+ *
193+ * Double the size of the @type regions array. If memblock is being used to
194+ * allocate memory for a new reserved regions array and there is a previously
195+ * allocated memory range [@new_area_start,@new_area_start+@new_area_size]
196+ * waiting to be reserved, ensure the memory used by the new array does
197+ * not overlap.
198+ *
199+ * RETURNS:
200+ * 0 on success, -1 on failure.
201+ */
202+static int __init_memblock memblock_double_array(struct memblock_type *type,
203+ phys_addr_t new_area_start,
204+ phys_addr_t new_area_size)
188205 {
189206 struct memblock_region *new_array, *old_array;
190207 phys_addr_t old_size, new_size, addr;
@@ -222,7 +239,18 @@ static int __init_memblock memblock_double_array(struct memblock_type *type) · 31 unmodified lines
222239 new_array = kmalloc(new_size, GFP_KERNEL);
223240 addr = new_array ? __pa(new_array) : 0;
224241 } else {
225− addr = memblock_find_in_range(0, MEMBLOCK_ALLOC_ACCESSIBLE, new_size, sizeof(phys_addr_t));
242+ /* only exclude range when trying to double reserved.regions */
243+ if (type != &memblock.reserved)
244+ new_area_start = new_area_size = 0;
245+
246+ addr = memblock_find_in_range(new_area_start + new_area_size,
247+ memblock.current_limit,
248+ new_size, sizeof(phys_addr_t));
249+ if (!addr && new_area_size)
250+ addr = memblock_find_in_range(0,
251+ min(new_area_start, memblock.current_limit),
252+ new_size, sizeof(phys_addr_t));
253+
226254 new_array = addr ? __va(addr) : 0;
227255 }
228256 if (!addr) {
@@ -399,7 +427,7 @@ repeat: · 170 unmodified lines
399427 */
400428 if (!insert) {
401429 while (type->cnt + nr_new > type->max)
402− if (memblock_double_array(type) < 0)
430+ if (memblock_double_array(type, obase, size) < 0)
403431 return -ENOMEM;
404432 insert = true;
405433 goto repeat;
@@ -450,7 +478,7 @@ static int __init_memblock memblock_isolate_range(struct memblock_type *type, · 44 unmodified lines
450478
451479 /* we'll create at most two more regions */
452480 while (type->cnt + 2 > type->max)
453− if (memblock_double_array(type) < 0)
481+ if (memblock_double_array(type, base, size) < 0)
454482 return -ENOMEM;
455483
456484 for (i = 0; i < type->cnt; i++) {
@@ -540,9 +568,9 @@ int __init_memblock memblock_reserve(phys_addr_t base, phys_addr_t size) · 83 unmodified lines
540568 * __next_free_mem_range - next function for for_each_free_mem_range()
541569 * @idx: pointer to u64 loop variable
542570 * @nid: nid: node selector, %MAX_NUMNODES for all nodes
543− * @p_start: ptr to phys_addr_t for start address of the range, can be %NULL
544− * @p_end: ptr to phys_addr_t for end address of the range, can be %NULL
545− * @p_nid: ptr to int for nid of the range, can be %NULL
571+ * @out_start: ptr to phys_addr_t for start address of the range, can be %NULL
572+ * @out_end: ptr to phys_addr_t for end address of the range, can be %NULL
573+ * @out_nid: ptr to int for nid of the range, can be %NULL
546574 *
547575 * Find the first free area from *@idx which matches @nid, fill the out
548576 * parameters, and update *@idx for the next iteration. The lower 32bit of
@@ -616,9 +644,9 @@ void __init_memblock __next_free_mem_range(u64 *idx, int nid, · 67 unmodified lines
616644 * __next_free_mem_range_rev - next function for for_each_free_mem_range_reverse()
617645 * @idx: pointer to u64 loop variable
618646 * @nid: nid: node selector, %MAX_NUMNODES for all nodes
619− * @p_start: ptr to phys_addr_t for start address of the range, can be %NULL
620− * @p_end: ptr to phys_addr_t for end address of the range, can be %NULL
621− * @p_nid: ptr to int for nid of the range, can be %NULL
647+ * @out_start: ptr to phys_addr_t for start address of the range, can be %NULL
648+ * @out_end: ptr to phys_addr_t for end address of the range, can be %NULL
649+ * @out_nid: ptr to int for nid of the range, can be %NULL
622650 *
623651 * Reverse of __next_free_mem_range().
624652 */
mm/memcontrol.c+3−3
@@ -1148,7 +1148,7 @@ bool __mem_cgroup_same_or_subtree(const struct mem_cgroup *root_memcg, · 1147 unmodified lines
11481148 {
11491149 if (root_memcg == memcg)
11501150 return true;
1151− if (!root_memcg->use_hierarchy)
1151+ if (!root_memcg->use_hierarchy || !memcg)
11521152 return false;
11531153 return css_is_ancestor(&memcg->css, &root_memcg->css);
11541154 }
@@ -1234,7 +1234,7 @@ int mem_cgroup_inactive_file_is_low(struct lruvec *lruvec) · 79 unmodified lines
12341234
12351235 /**
12361236 * mem_cgroup_margin - calculate chargeable space of a memory cgroup
1237− * @mem: the memory cgroup
1237+ * @memcg: the memory cgroup
12381238 *
12391239 * Returns the maximum amount of memory @mem can be charged with, in
12401240 * pages.
@@ -1508,7 +1508,7 @@ static unsigned long mem_cgroup_reclaim(struct mem_cgroup *memcg, · 267 unmodified lines
15081508
15091509 /**
15101510 * test_mem_cgroup_node_reclaimable
1511− * @mem: the target memcg
1511+ * @memcg: the target memcg
15121512 * @nid: the node ID to be checked.
15131513 * @noswap : specify true here if the user wants flle only information.
15141514 *
mm/memory.c+10−2
@@ -1225,7 +1225,15 @@ static inline unsigned long zap_pmd_range(struct mmu_gather *tlb, · 1224 unmodified lines
12251225 next = pmd_addr_end(addr, end);
12261226 if (pmd_trans_huge(*pmd)) {
12271227 if (next - addr != HPAGE_PMD_SIZE) {
1228− VM_BUG_ON(!rwsem_is_locked(&tlb->mm->mmap_sem));
1228+#ifdef CONFIG_DEBUG_VM
1229+ if (!rwsem_is_locked(&tlb->mm->mmap_sem)) {
1230+ pr_err("%s: mmap_sem is unlocked! addr=0x%lx end=0x%lx vma->vm_start=0x%lx vma->vm_end=0x%lx\n",
1231+ __func__, addr, end,
1232+ vma->vm_start,
1233+ vma->vm_end);
1234+ BUG();
1235+ }
1236+#endif
12291237 split_huge_page_pmd(vma->vm_mm, pmd);
12301238 } else if (zap_huge_pmd(tlb, vma, pmd, addr))
12311239 goto next;
@@ -1366,7 +1374,7 @@ void unmap_vmas(struct mmu_gather *tlb, · 134 unmodified lines
13661374 /**
13671375 * zap_page_range - remove user pages in a given range
13681376 * @vma: vm_area_struct holding the applicable pages
1369− * @address: starting address of pages to zap
1377+ * @start: starting address of pages to zap
13701378 * @size: number of bytes to zap
13711379 * @details: details of nonlinear truncation or shared cache invalidation
13721380 *
mm/mempolicy.c+1−1
@@ -1177,7 +1177,7 @@ static long do_mbind(unsigned long start, unsigned long len, · 1176 unmodified lines
11771177 if (!list_empty(&pagelist)) {
11781178 nr_failed = migrate_pages(&pagelist, new_vma_page,
11791179 (unsigned long)vma,
1180− false, true);
1180+ false, MIGRATE_SYNC);
11811181 if (nr_failed)
11821182 putback_lru_pages(&pagelist);
11831183 }
mm/oom_kill.c+8−9
@@ -184,6 +184,7 @@ unsigned long oom_badness(struct task_struct *p, struct mem_cgroup *memcg, · 183 unmodified lines
184184 const nodemask_t *nodemask, unsigned long totalpages)
185185 {
186186 long points;
187+ long adj;
187188
188189 if (oom_unkillable_task(p, memcg, nodemask))
189190 return 0;
@@ -192,7 +193,8 @@ unsigned long oom_badness(struct task_struct *p, struct mem_cgroup *memcg, · 2 unmodified lines
192193 if (!p)
193194 return 0;
194195
195− if (p->signal->oom_score_adj == OOM_SCORE_ADJ_MIN) {
196+ adj = p->signal->oom_score_adj;
197+ if (adj == OOM_SCORE_ADJ_MIN) {
196198 task_unlock(p);
197199 return 0;
198200 }
@@ -210,14 +212,11 @@ unsigned long oom_badness(struct task_struct *p, struct mem_cgroup *memcg, · 11 unmodified lines
210212 * implementation used by LSMs.
211213 */
212214 if (has_capability_noaudit(p, CAP_SYS_ADMIN))
213− points -= 30 * totalpages / 1000;
215+ adj -= 30;
214216
215− /*
216− * /proc/pid/oom_score_adj ranges from -1000 to +1000 such that it may
217− * either completely disable oom killing or always prefer a certain
218− * task.
219− */
220− points += p->signal->oom_score_adj * totalpages / 1000;
217+ /* Normalize to oom_score_adj units */
218+ adj *= totalpages / 1000;
219+ points += adj;
221220
222221 /*
223222 * Never return 0 for an eligible task regardless of the root bonus and
@@ -366,7 +365,7 @@ static struct task_struct *select_bad_process(unsigned int *ppoints, · 142 unmodified lines
366365
367366 /**
368367 * dump_tasks - dump current memory state of all system tasks
369− * @mem: current's memory controller, if constrained
368+ * @memcg: current's memory controller, if constrained
370369 * @nodemask: nodemask passed to page allocator for mempolicy ooms
371370 *
372371 * Dumps the current memory state of all eligible tasks. Tasks not in the same
mm/page_cgroup.c+2−2
@@ -392,7 +392,7 @@ static struct swap_cgroup *lookup_swap_cgroup(swp_entry_t ent, · 391 unmodified lines
392392
393393 /**
394394 * swap_cgroup_cmpxchg - cmpxchg mem_cgroup's id for this swp_entry.
395− * @end: swap entry to be cmpxchged
395+ * @ent: swap entry to be cmpxchged
396396 * @old: old id
397397 * @new: new id
398398 *
@@ -422,7 +422,7 @@ unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, · 23 unmodified lines
422422 /**
423423 * swap_cgroup_record - record mem_cgroup for this swp_entry.
424424 * @ent: swap entry to be recorded into
425− * @mem: mem_cgroup to be recorded
425+ * @id: mem_cgroup to be recorded
426426 *
427427 * Returns old value at success, 0 at failure.
428428 * (Of course, old value can be 0.)
mm/pagewalk.c+0−1
@@ -162,7 +162,6 @@ static int walk_hugetlb_range(struct vm_area_struct *vma, · 161 unmodified lines
162162
163163 /**
164164 * walk_page_range - walk a memory map's page tables with a callback
165− * @mm: memory map to walk
166165 * @addr: starting address
167166 * @end: ending address
168167 * @walk: set of callbacks to invoke for each level of the tree
mm/percpu-vm.c+0−1
@@ -360,7 +360,6 @@ err_free: · 359 unmodified lines
360360 * @chunk: chunk to depopulate
361361 * @off: offset to the area to depopulate
362362 * @size: size of the area to depopulate in bytes
363− * @flush: whether to flush cache and tlb or not
364363 *
365364 * For each cpu, depopulate and unmap pages [@page_start,@page_end)
366365 * from @chunk. If @flush is true, vcache is flushed before unmapping
net/9p/trans_virtio.c+1−1
@@ -192,10 +192,10 @@ static int pack_sg_list(struct scatterlist *sg, int start, · 191 unmodified lines
192192 s = rest_of_page(data);
193193 if (s > count)
194194 s = count;
195+ BUG_ON(index > limit);
195196 sg_set_buf(&sg[index++], data, s);
196197 count -= s;
197198 data += s;
198− BUG_ON(index > limit);
199199 }
200200
201201 return index-start;
net/ceph/ceph_common.c+0−7
@@ -504,13 +504,6 @@ void ceph_destroy_client(struct ceph_client *client) · 503 unmodified lines
504504 /* unmount */
505505 ceph_osdc_stop(&client->osdc);
506506
507− /*
508− * make sure osd connections close out before destroying the
509− * auth module, which is needed to free those connections'
510− * ceph_authorizers.
511− */
512− ceph_msgr_flush();
513−
514507 ceph_monc_stop(&client->monc);
515508
516509 ceph_debugfs_client_cleanup(client);
net/ceph/messenger.c+4−0
@@ -563,6 +563,10 @@ static void prepare_write_message(struct ceph_connection *con) · 562 unmodified lines
563563 m->hdr.seq = cpu_to_le64(++con->out_seq);
564564 m->needs_out_seq = false;
565565 }
566+#ifdef CONFIG_BLOCK
567+ else
568+ m->bio_iter = NULL;
569+#endif
566570
567571 dout("prepare_write_message %p seq %lld type %d len %d+%d+%d %d pgs\n",
568572 m, con->out_seq, le16_to_cpu(m->hdr.type),
net/ceph/mon_client.c+8−0
@@ -847,6 +847,14 @@ void ceph_monc_stop(struct ceph_mon_client *monc) · 846 unmodified lines
847847
848848 mutex_unlock(&monc->mutex);
849849
850+ /*
851+ * flush msgr queue before we destroy ourselves to ensure that:
852+ * - any work that references our embedded con is finished.
853+ * - any osd_client or other work that may reference an authorizer
854+ * finishes before we shut down the auth subsystem.
855+ */
856+ ceph_msgr_flush();
857+
850858 ceph_auth_destroy(monc->auth);
851859
852860 ceph_msg_put(monc->m_auth);
net/ceph/osd_client.c+6−6
@@ -139,15 +139,15 @@ void ceph_osdc_release_request(struct kref *kref) · 138 unmodified lines
139139
140140 if (req->r_request)
141141 ceph_msg_put(req->r_request);
142− if (req->r_reply)
143− ceph_msg_put(req->r_reply);
144142 if (req->r_con_filling_msg) {
145143 dout("release_request revoking pages %p from con %p\n",
146144 req->r_pages, req->r_con_filling_msg);
147145 ceph_con_revoke_message(req->r_con_filling_msg,
148146 req->r_reply);
149− ceph_con_put(req->r_con_filling_msg);
147+ req->r_con_filling_msg->ops->put(req->r_con_filling_msg);
150148 }
149+ if (req->r_reply)
150+ ceph_msg_put(req->r_reply);
151151 if (req->r_own_pages)
152152 ceph_release_page_vector(req->r_pages,
153153 req->r_num_pages);
@@ -1216,7 +1216,7 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg, · 1062 unmodified lines
12161216 if (req->r_con_filling_msg == con && req->r_reply == msg) {
12171217 dout(" dropping con_filling_msg ref %p\n", con);
12181218 req->r_con_filling_msg = NULL;
1219− ceph_con_put(con);
1219+ con->ops->put(con);
12201220 }
12211221
12221222 if (!req->r_got_reply) {
@@ -2028,7 +2028,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con, · 805 unmodified lines
20282028 dout("get_reply revoking msg %p from old con %p\n",
20292029 req->r_reply, req->r_con_filling_msg);
20302030 ceph_con_revoke_message(req->r_con_filling_msg, req->r_reply);
2031− ceph_con_put(req->r_con_filling_msg);
2031+ req->r_con_filling_msg->ops->put(req->r_con_filling_msg);
20322032 req->r_con_filling_msg = NULL;
20332033 }
20342034
@@ -2063,7 +2063,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con, · 28 unmodified lines
20632063 #endif
20642064 }
20652065 *skip = 0;
2066− req->r_con_filling_msg = ceph_con_get(con);
2066+ req->r_con_filling_msg = con->ops->get(con);
20672067 dout("get_reply tid %lld %p\n", tid, m);
20682068
20692069 out:
scripts/get_maintainer.pl+2−1
@@ -83,6 +83,8 @@ push(@signature_tags, "Signed-off-by:"); · 82 unmodified lines
8383 push(@signature_tags, "Reviewed-by:");
8484 push(@signature_tags, "Acked-by:");
8585
86+my $signature_pattern = "\(" . join("|", @signature_tags) . "\)";
87+
8688 # rfc822 email address - preloaded methods go here.
8789 my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])";
8890 my $rfc822_char = '[\\000-\\377]';
@@ -473,7 +475,6 @@ my @subsystem = (); · 384 unmodified lines
473475 my @status = ();
474476 my %deduplicate_name_hash = ();
475477 my %deduplicate_address_hash = ();
476−my $signature_pattern;
477478
478479 my @maintainers = get_maintainers();
479480
sound/pci/hda/hda_codec.c+37−9
@@ -4393,20 +4393,19 @@ void snd_hda_update_power_acct(struct hda_codec *codec) · 4392 unmodified lines
43934393 codec->power_jiffies += delta;
43944394 }
43954395
4396−/**
4397− * snd_hda_power_up - Power-up the codec
4398− * @codec: HD-audio codec
4399− *
4400− * Increment the power-up counter and power up the hardware really when
4401− * not turned on yet.
4402− */
4403−void snd_hda_power_up(struct hda_codec *codec)
4396+/* Transition to powered up, if wait_power_down then wait for a pending
4397+ * transition to D3 to complete. A pending D3 transition is indicated
4398+ * with power_transition == -1. */
4399+static void __snd_hda_power_up(struct hda_codec *codec, bool wait_power_down)
44044400 {
44054401 struct hda_bus *bus = codec->bus;
44064402
44074403 spin_lock(&codec->power_lock);
44084404 codec->power_count++;
4409− if (codec->power_on || codec->power_transition > 0) {
4405+ /* Return if power_on or transitioning to power_on, unless currently
4406+ * powering down. */
4407+ if ((codec->power_on || codec->power_transition > 0) &&
4408+ !(wait_power_down && codec->power_transition < 0)) {
44104409 spin_unlock(&codec->power_lock);
44114410 return;
44124411 }
@@ -4430,8 +4429,37 @@ void snd_hda_power_up(struct hda_codec *codec) · 17 unmodified lines
44304429 codec->power_transition = 0;
44314430 spin_unlock(&codec->power_lock);
44324431 }
4432+
4433+/**
4434+ * snd_hda_power_up - Power-up the codec
4435+ * @codec: HD-audio codec
4436+ *
4437+ * Increment the power-up counter and power up the hardware really when
4438+ * not turned on yet.
4439+ */
4440+void snd_hda_power_up(struct hda_codec *codec)
4441+{
4442+ __snd_hda_power_up(codec, false);
4443+}
44334444 EXPORT_SYMBOL_HDA(snd_hda_power_up);
44344445
4446+/**
4447+ * snd_hda_power_up_d3wait - Power-up the codec after waiting for any pending
4448+ * D3 transition to complete. This differs from snd_hda_power_up() when
4449+ * power_transition == -1. snd_hda_power_up sees this case as a nop,
4450+ * snd_hda_power_up_d3wait waits for the D3 transition to complete then powers
4451+ * back up.
4452+ * @codec: HD-audio codec
4453+ *
4454+ * Cancel any power down operation hapenning on the work queue, then power up.
4455+ */
4456+void snd_hda_power_up_d3wait(struct hda_codec *codec)
4457+{
4458+ /* This will cancel and wait for pending power_work to complete. */
4459+ __snd_hda_power_up(codec, true);
4460+}
4461+EXPORT_SYMBOL_HDA(snd_hda_power_up_d3wait);
4462+
44354463 #define power_save(codec) \
44364464 ((codec)->bus->power_save ? *(codec)->bus->power_save : 0)
44374465
sound/pci/hda/hda_codec.h+2−0
@@ -1056,10 +1056,12 @@ const char *snd_hda_get_jack_location(u32 cfg); · 1055 unmodified lines
10561056 */
10571057 #ifdef CONFIG_SND_HDA_POWER_SAVE
10581058 void snd_hda_power_up(struct hda_codec *codec);
1059+void snd_hda_power_up_d3wait(struct hda_codec *codec);
10591060 void snd_hda_power_down(struct hda_codec *codec);
10601061 void snd_hda_update_power_acct(struct hda_codec *codec);
10611062 #else
10621063 static inline void snd_hda_power_up(struct hda_codec *codec) {}
1064+static inline void snd_hda_power_up_d3wait(struct hda_codec *codec) {}
10631065 static inline void snd_hda_power_down(struct hda_codec *codec) {}
10641066 #endif
10651067
sound/pci/hda/hda_intel.c+1−1
@@ -1766,7 +1766,7 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) · 1765 unmodified lines
17661766 buff_step);
17671767 snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
17681768 buff_step);
1769− snd_hda_power_up(apcm->codec);
1769+ snd_hda_power_up_d3wait(apcm->codec);
17701770 err = hinfo->ops.open(hinfo, apcm->codec, substream);
17711771 if (err < 0) {
17721772 azx_release_device(azx_dev);
sound/soc/codecs/wm8904.c+12−14
@@ -1863,6 +1863,7 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec, · 1862 unmodified lines
18631863 return ret;
18641864 }
18651865
1866+ regcache_cache_only(wm8904->regmap, false);
18661867 regcache_sync(wm8904->regmap);
18671868
18681869 /* Enable bias */
@@ -1899,14 +1900,8 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec, · 30 unmodified lines
18991900 snd_soc_update_bits(codec, WM8904_BIAS_CONTROL_0,
19001901 WM8904_BIAS_ENA, 0);
19011902
1902−#ifdef CONFIG_REGULATOR
1903− /* Post 2.6.34 we will be able to get a callback when
1904− * the regulators are disabled which we can use but
1905− * for now just assume that the power will be cut if
1906− * the regulator API is in use.
1907− */
1908− codec->cache_sync = 1;
1909−#endif
1903+ regcache_cache_only(wm8904->regmap, true);
1904+ regcache_mark_dirty(wm8904->regmap);
19101905
19111906 regulator_bulk_disable(ARRAY_SIZE(wm8904->supplies),
19121907 wm8904->supplies);
@@ -2084,10 +2079,8 @@ static int wm8904_probe(struct snd_soc_codec *codec) · 171 unmodified lines
20842079 {
20852080 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
20862081 struct wm8904_pdata *pdata = wm8904->pdata;
2087− u16 *reg_cache = codec->reg_cache;
20882082 int ret, i;
20892083
2090− codec->cache_sync = 1;
20912084 codec->control_data = wm8904->regmap;
20922085
20932086 switch (wm8904->devtype) {
@@ -2150,6 +2143,7 @@ static int wm8904_probe(struct snd_soc_codec *codec) · 56 unmodified lines
21502143 goto err_enable;
21512144 }
21522145
2146+ regcache_cache_only(wm8904->regmap, true);
21532147 /* Change some default settings - latch VU and enable ZC */
21542148 snd_soc_update_bits(codec, WM8904_ADC_DIGITAL_VOLUME_LEFT,
21552149 WM8904_ADC_VU, WM8904_ADC_VU);
@@ -2180,14 +2174,18 @@ static int wm8904_probe(struct snd_soc_codec *codec) · 24 unmodified lines
21802174 if (!pdata->gpio_cfg[i])
21812175 continue;
21822176
2183− reg_cache[WM8904_GPIO_CONTROL_1 + i]
2184− = pdata->gpio_cfg[i] & 0xffff;
2177+ regmap_update_bits(wm8904->regmap,
2178+ WM8904_GPIO_CONTROL_1 + i,
2179+ 0xffff,
2180+ pdata->gpio_cfg[i]);
21852181 }
21862182
21872183 /* Zero is the default value for these anyway */
21882184 for (i = 0; i < WM8904_MIC_REGS; i++)
2189− reg_cache[WM8904_MIC_BIAS_CONTROL_0 + i]
2190− = pdata->mic_cfg[i];
2185+ regmap_update_bits(wm8904->regmap,
2186+ WM8904_MIC_BIAS_CONTROL_0 + i,
2187+ 0xffff,
2188+ pdata->mic_cfg[i]);
21912189 }
21922190
21932191 /* Set Class W by default - this will be managed by the Class
sound/soc/codecs/wm8996.c+3−5
@@ -2837,8 +2837,6 @@ static int wm8996_probe(struct snd_soc_codec *codec) · 2836 unmodified lines
28372837 }
28382838 }
28392839
2840− regcache_cache_only(codec->control_data, true);
2841−
28422840 /* Apply platform data settings */
28432841 snd_soc_update_bits(codec, WM8996_LINE_INPUT_CONTROL,
28442842 WM8996_INL_MODE_MASK | WM8996_INR_MODE_MASK,
@@ -3051,7 +3049,6 @@ static int wm8996_remove(struct snd_soc_codec *codec) · 206 unmodified lines
30513049 for (i = 0; i < ARRAY_SIZE(wm8996->supplies); i++)
30523050 regulator_unregister_notifier(wm8996->supplies[i].consumer,
30533051 &wm8996->disable_nb[i]);
3054− regulator_bulk_free(ARRAY_SIZE(wm8996->supplies), wm8996->supplies);
30553052
30563053 return 0;
30573054 }
@@ -3206,14 +3203,15 @@ static __devinit int wm8996_i2c_probe(struct i2c_client *i2c, · 148 unmodified lines
32063203 dev_info(&i2c->dev, "revision %c\n",
32073204 (reg & WM8996_CHIP_REV_MASK) + 'A');
32083205
3209− regulator_bulk_disable(ARRAY_SIZE(wm8996->supplies), wm8996->supplies);
3210−
32113206 ret = wm8996_reset(wm8996);
32123207 if (ret < 0) {
32133208 dev_err(&i2c->dev, "Failed to issue reset\n");
32143209 goto err_regmap;
32153210 }
32163211
3212+ regcache_cache_only(wm8996->regmap, true);
3213+ regulator_bulk_disable(ARRAY_SIZE(wm8996->supplies), wm8996->supplies);
3214+
32173215 wm8996_init_gpio(wm8996);
32183216
32193217 ret = snd_soc_register_codec(&i2c->dev,
sound/soc/pxa/pxa-ssp.c+11−27
@@ -33,7 +33,6 @@ · 32 unmodified lines
3333
3434 #include <mach/hardware.h>
3535 #include <mach/dma.h>
36−#include <mach/audio.h>
3736
3837 #include "../../arm/pxa2xx-pcm.h"
3938 #include "pxa-ssp.h"
@@ -194,7 +193,7 @@ static void pxa_ssp_set_scr(struct ssp_device *ssp, u32 div) · 154 unmodified lines
194193 {
195194 u32 sscr0 = pxa_ssp_read_reg(ssp, SSCR0);
196195
197− if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) {
196+ if (ssp->type == PXA25x_SSP) {
198197 sscr0 &= ~0x0000ff00;
199198 sscr0 |= ((div - 2)/2) << 8; /* 2..512 */
200199 } else {
@@ -212,7 +211,7 @@ static u32 pxa_ssp_get_scr(struct ssp_device *ssp) · 11 unmodified lines
212211 u32 sscr0 = pxa_ssp_read_reg(ssp, SSCR0);
213212 u32 div;
214213
215− if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP)
214+ if (ssp->type == PXA25x_SSP)
216215 div = ((sscr0 >> 8) & 0xff) * 2 + 2;
217216 else
218217 div = ((sscr0 >> 8) & 0xfff) + 1;
@@ -242,7 +241,7 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai, · 23 unmodified lines
242241 break;
243242 case PXA_SSP_CLK_PLL:
244243 /* Internal PLL is fixed */
245− if (cpu_is_pxa25x())
244+ if (ssp->type == PXA25x_SSP)
246245 priv->sysclk = 1843200;
247246 else
248247 priv->sysclk = 13000000;
@@ -266,11 +265,11 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai, · 17 unmodified lines
266265
267266 /* The SSP clock must be disabled when changing SSP clock mode
268267 * on PXA2xx. On PXA3xx it must be enabled when doing so. */
269− if (!cpu_is_pxa3xx())
268+ if (ssp->type != PXA3xx_SSP)
270269 clk_disable(ssp->clk);
271270 val = pxa_ssp_read_reg(ssp, SSCR0) | sscr0;
272271 pxa_ssp_write_reg(ssp, SSCR0, val);
273− if (!cpu_is_pxa3xx())
272+ if (ssp->type != PXA3xx_SSP)
274273 clk_enable(ssp->clk);
275274
276275 return 0;
@@ -294,24 +293,20 @@ static int pxa_ssp_set_dai_clkdiv(struct snd_soc_dai *cpu_dai, · 17 unmodified lines
294293 case PXA_SSP_AUDIO_DIV_SCDB:
295294 val = pxa_ssp_read_reg(ssp, SSACD);
296295 val &= ~SSACD_SCDB;
297−#if defined(CONFIG_PXA3xx)
298− if (cpu_is_pxa3xx())
296+ if (ssp->type == PXA3xx_SSP)
299297 val &= ~SSACD_SCDX8;
300−#endif
301298 switch (div) {
302299 case PXA_SSP_CLK_SCDB_1:
303300 val |= SSACD_SCDB;
304301 break;
305302 case PXA_SSP_CLK_SCDB_4:
306303 break;
307−#if defined(CONFIG_PXA3xx)
308304 case PXA_SSP_CLK_SCDB_8:
309− if (cpu_is_pxa3xx())
305+ if (ssp->type == PXA3xx_SSP)
310306 val |= SSACD_SCDX8;
311307 else
312308 return -EINVAL;
313309 break;
314−#endif
315310 default:
316311 return -EINVAL;
317312 }
@@ -337,10 +332,8 @@ static int pxa_ssp_set_dai_pll(struct snd_soc_dai *cpu_dai, int pll_id, · 19 unmodified lines
337332 struct ssp_device *ssp = priv->ssp;
338333 u32 ssacd = pxa_ssp_read_reg(ssp, SSACD) & ~0x70;
339334
340−#if defined(CONFIG_PXA3xx)
341− if (cpu_is_pxa3xx())
335+ if (ssp->type == PXA3xx_SSP)
342336 pxa_ssp_write_reg(ssp, SSACDD, 0);
343−#endif
344337
345338 switch (freq_out) {
346339 case 5622000:
@@ -365,11 +358,10 @@ static int pxa_ssp_set_dai_pll(struct snd_soc_dai *cpu_dai, int pll_id, · 18 unmodified lines
365358 break;
366359
367360 default:
368−#ifdef CONFIG_PXA3xx
369361 /* PXA3xx has a clock ditherer which can be used to generate
370362 * a wider range of frequencies - calculate a value for it.
371363 */
372− if (cpu_is_pxa3xx()) {
364+ if (ssp->type == PXA3xx_SSP) {
373365 u32 val;
374366 u64 tmp = 19968;
375367 tmp *= 1000000;
@@ -386,7 +378,6 @@ static int pxa_ssp_set_dai_pll(struct snd_soc_dai *cpu_dai, int pll_id, · 10 unmodified lines
386378 val, freq_out);
387379 break;
388380 }
389−#endif
390381
391382 return -EINVAL;
392383 }
@@ -590,10 +581,8 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, · 197 unmodified lines
590581 /* bit size */
591582 switch (params_format(params)) {
592583 case SNDRV_PCM_FORMAT_S16_LE:
593−#ifdef CONFIG_PXA3xx
594− if (cpu_is_pxa3xx())
584+ if (ssp->type == PXA3xx_SSP)
595585 sscr0 |= SSCR0_FPCKE;
596−#endif
597586 sscr0 |= SSCR0_DataSize(16);
598587 break;
599588 case SNDRV_PCM_FORMAT_S24_LE:
@@ -618,9 +607,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, · 18 unmodified lines
618607 * trying and failing a lot; some of the registers
619608 * needed for that mode are only available on PXA3xx.
620609 */
621−
622−#ifdef CONFIG_PXA3xx
623− if (!cpu_is_pxa3xx())
610+ if (ssp->type != PXA3xx_SSP)
624611 return -EINVAL;
625612
626613 sspsp |= SSPSP_SFRMWDTH(width * 2);
@@ -628,9 +615,6 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, · 1 unmodified line
628615 sspsp |= SSPSP_EDMYSTOP(3);
629616 sspsp |= SSPSP_DMYSTOP(3);
630617 sspsp |= SSPSP_DMYSTRT(1);
631−#else
632− return -EINVAL;
633−#endif
634618 } else {
635619 /* The frame width is the width the LRCLK is
636620 * asserted for; the delay is expressed in
sound/soc/tegra/tegra_wm8903.c+13−0
@@ -346,6 +346,17 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd) · 345 unmodified lines
346346 return 0;
347347 }
348348
349+static int tegra_wm8903_remove(struct snd_soc_card *card)
350+{
351+ struct snd_soc_pcm_runtime *rtd = &(card->rtd[0]);
352+ struct snd_soc_dai *codec_dai = rtd->codec_dai;
353+ struct snd_soc_codec *codec = codec_dai->codec;
354+
355+ wm8903_mic_detect(codec, NULL, 0, 0);
356+
357+ return 0;
358+}
359+
349360 static struct snd_soc_dai_link tegra_wm8903_dai = {
350361 .name = "WM8903",
351362 .stream_name = "WM8903 PCM",
@@ -363,6 +374,8 @@ static struct snd_soc_card snd_soc_tegra_wm8903 = { · 11 unmodified lines
363374 .dai_link = &tegra_wm8903_dai,
364375 .num_links = 1,
365376
377+ .remove = tegra_wm8903_remove,
378+
366379 .controls = tegra_wm8903_controls,
367380 .num_controls = ARRAY_SIZE(tegra_wm8903_controls),
368381 .dapm_widgets = tegra_wm8903_dapm_widgets,
sound/usb/6fire/firmware.c+1−1
@@ -209,7 +209,7 @@ static int usb6fire_fw_ezusb_upload( · 208 unmodified lines
209209 int ret;
210210 u8 data;
211211 struct usb_device *device = interface_to_usbdev(intf);
212− const struct firmware *fw = 0;
212+ const struct firmware *fw = NULL;
213213 struct ihex_record *rec = kmalloc(sizeof(struct ihex_record),
214214 GFP_KERNEL);
215215
sound/usb/pcm.c+13−8
@@ -354,17 +354,21 @@ static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt) · 353 unmodified lines
354354 (get_endpoint(alts, 1)->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE &&
355355 get_endpoint(alts, 1)->bSynchAddress != 0 &&
356356 !implicit_fb)) {
357− snd_printk(KERN_ERR "%d:%d:%d : invalid synch pipe\n",
358− dev->devnum, fmt->iface, fmt->altsetting);
357+ snd_printk(KERN_ERR "%d:%d:%d : invalid sync pipe. bmAttributes %02x, bLength %d, bSynchAddress %02x\n",
358+ dev->devnum, fmt->iface, fmt->altsetting,
359+ get_endpoint(alts, 1)->bmAttributes,
360+ get_endpoint(alts, 1)->bLength,
361+ get_endpoint(alts, 1)->bSynchAddress);
359362 return -EINVAL;
360363 }
361364 ep = get_endpoint(alts, 1)->bEndpointAddress;
362− if (get_endpoint(alts, 0)->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE &&
365+ if (!implicit_fb &&
366+ get_endpoint(alts, 0)->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE &&
363367 (( is_playback && ep != (unsigned int)(get_endpoint(alts, 0)->bSynchAddress | USB_DIR_IN)) ||
364− (!is_playback && ep != (unsigned int)(get_endpoint(alts, 0)->bSynchAddress & ~USB_DIR_IN)) ||
365− ( is_playback && !implicit_fb))) {
366− snd_printk(KERN_ERR "%d:%d:%d : invalid synch pipe\n",
367− dev->devnum, fmt->iface, fmt->altsetting);
368+ (!is_playback && ep != (unsigned int)(get_endpoint(alts, 0)->bSynchAddress & ~USB_DIR_IN)))) {
369+ snd_printk(KERN_ERR "%d:%d:%d : invalid sync pipe. is_playback %d, ep %02x, bSynchAddress %02x\n",
370+ dev->devnum, fmt->iface, fmt->altsetting,
371+ is_playback, ep, get_endpoint(alts, 0)->bSynchAddress);
368372 return -EINVAL;
369373 }
370374
@@ -1147,7 +1151,8 @@ static int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substrea · 776 unmodified lines
11471151 return -EINVAL;
11481152 }
11491153
1150−int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream, int cmd)
1154+static int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream,
1155+ int cmd)
11511156 {
11521157 int err;
11531158 struct snd_usb_substream *subs = substream->runtime->private_data;
tools/hv/hv_kvp_daemon.c+7−3
@@ -701,14 +701,18 @@ int main(void) · 700 unmodified lines
701701 pfd.fd = fd;
702702
703703 while (1) {
704+ struct sockaddr *addr_p = (struct sockaddr *) &addr;
705+ socklen_t addr_l = sizeof(addr);
704706 pfd.events = POLLIN;
705707 pfd.revents = 0;
706708 poll(&pfd, 1, -1);
707709
708− len = recv(fd, kvp_recv_buffer, sizeof(kvp_recv_buffer), 0);
710+ len = recvfrom(fd, kvp_recv_buffer, sizeof(kvp_recv_buffer), 0,
711+ addr_p, &addr_l);
709712
710− if (len < 0) {
711− syslog(LOG_ERR, "recv failed; error:%d", len);
713+ if (len < 0 || addr.nl_pid) {
714+ syslog(LOG_ERR, "recvfrom failed; pid:%u error:%d %s",
715+ addr.nl_pid, errno, strerror(errno));
712716 close(fd);
713717 return -1;
714718 }
tools/perf/builtin-stat.c+7−1
@@ -1179,6 +1179,12 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used) · 1178 unmodified lines
11791179 fprintf(stderr, "cannot use both --output and --log-fd\n");
11801180 usage_with_options(stat_usage, options);
11811181 }
1182+
1183+ if (output_fd < 0) {
1184+ fprintf(stderr, "argument to --log-fd must be a > 0\n");
1185+ usage_with_options(stat_usage, options);
1186+ }
1187+
11821188 if (!output) {
11831189 struct timespec tm;
11841190 mode = append_file ? "a" : "w";
@@ -1190,7 +1196,7 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used) · 5 unmodified lines
11901196 }
11911197 clock_gettime(CLOCK_REALTIME, &tm);
11921198 fprintf(output, "# started on %s\n", ctime(&tm.tv_sec));
1193− } else if (output_fd != 2) {
1199+ } else if (output_fd > 0) {
11941200 mode = append_file ? "a" : "w";
11951201 output = fdopen(output_fd, mode);
11961202 if (!output) {
tools/perf/util/header.c+41−7
@@ -1942,7 +1942,6 @@ int perf_file_header__read(struct perf_file_header *header, · 1941 unmodified lines
19421942 else
19431943 return -1;
19441944 } else if (ph->needs_swap) {
1945− unsigned int i;
19461945 /*
19471946 * feature bitmap is declared as an array of unsigned longs --
19481947 * not good since its size can differ between the host that
@@ -1958,14 +1957,17 @@ int perf_file_header__read(struct perf_file_header *header, · 9 unmodified lines
19581957 * file), punt and fallback to the original behavior --
19591958 * clearing all feature bits and setting buildid.
19601959 */
1961− for (i = 0; i < BITS_TO_LONGS(HEADER_FEAT_BITS); ++i)
1962− header->adds_features[i] = bswap_64(header->adds_features[i]);
1960+ mem_bswap_64(&header->adds_features,
1961+ BITS_TO_U64(HEADER_FEAT_BITS));
19631962
19641963 if (!test_bit(HEADER_HOSTNAME, header->adds_features)) {
1965− for (i = 0; i < BITS_TO_LONGS(HEADER_FEAT_BITS); ++i) {
1966− header->adds_features[i] = bswap_64(header->adds_features[i]);
1967− header->adds_features[i] = bswap_32(header->adds_features[i]);
1968− }
1964+ /* unswap as u64 */
1965+ mem_bswap_64(&header->adds_features,
1966+ BITS_TO_U64(HEADER_FEAT_BITS));
1967+
1968+ /* unswap as u32 */
1969+ mem_bswap_32(&header->adds_features,
1970+ BITS_TO_U32(HEADER_FEAT_BITS));
19691971 }
19701972
19711973 if (!test_bit(HEADER_HOSTNAME, header->adds_features)) {
@@ -2091,6 +2093,35 @@ static int read_attr(int fd, struct perf_header *ph, · 119 unmodified lines
20912093 return ret <= 0 ? -1 : 0;
20922094 }
20932095
2096+static int perf_evsel__set_tracepoint_name(struct perf_evsel *evsel)
2097+{
2098+ struct event_format *event = trace_find_event(evsel->attr.config);
2099+ char bf[128];
2100+
2101+ if (event == NULL)
2102+ return -1;
2103+
2104+ snprintf(bf, sizeof(bf), "%s:%s", event->system, event->name);
2105+ evsel->name = strdup(bf);
2106+ if (event->name == NULL)
2107+ return -1;
2108+
2109+ return 0;
2110+}
2111+
2112+static int perf_evlist__set_tracepoint_names(struct perf_evlist *evlist)
2113+{
2114+ struct perf_evsel *pos;
2115+
2116+ list_for_each_entry(pos, &evlist->entries, node) {
2117+ if (pos->attr.type == PERF_TYPE_TRACEPOINT &&
2118+ perf_evsel__set_tracepoint_name(pos))
2119+ return -1;
2120+ }
2121+
2122+ return 0;
2123+}
2124+
20942125 int perf_session__read_header(struct perf_session *session, int fd)
20952126 {
20962127 struct perf_header *header = &session->header;
@@ -2172,6 +2203,9 @@ int perf_session__read_header(struct perf_session *session, int fd) · 75 unmodified lines
21722203
21732204 lseek(fd, header->data_offset, SEEK_SET);
21742205
2206+ if (perf_evlist__set_tracepoint_names(session->evlist))
2207+ goto out_delete_evlist;
2208+
21752209 header->frozen = 1;
21762210 return 0;
21772211 out_errno:
tools/perf/util/include/linux/bitops.h+2−0
@@ -8,6 +8,8 @@ · 7 unmodified lines
88 #define BITS_PER_LONG __WORDSIZE
99 #define BITS_PER_BYTE 8
1010 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
11+#define BITS_TO_U64(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u64))
12+#define BITS_TO_U32(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u32))
1113
1214 #define for_each_set_bit(bit, addr, size) \
1315 for ((bit) = find_first_bit((addr), (size)); \
tools/perf/util/session.c+10−0
@@ -442,6 +442,16 @@ static void perf_tool__fill_defaults(struct perf_tool *tool) · 441 unmodified lines
442442 tool->finished_round = process_finished_round_stub;
443443 }
444444 }
445+
446+void mem_bswap_32(void *src, int byte_size)
447+{
448+ u32 *m = src;
449+ while (byte_size > 0) {
450+ *m = bswap_32(*m);
451+ byte_size -= sizeof(u32);
452+ ++m;
453+ }
454+}
445455
446456 void mem_bswap_64(void *src, int byte_size)
447457 {
tools/perf/util/session.h+1−0
@@ -80,6 +80,7 @@ struct branch_info *machine__resolve_bstack(struct machine *self, · 79 unmodified lines
8080 bool perf_session__has_traces(struct perf_session *self, const char *msg);
8181
8282 void mem_bswap_64(void *src, int byte_size);
83+void mem_bswap_32(void *src, int byte_size);
8384 void perf_event__attr_swap(struct perf_event_attr *attr);
8485
8586 int perf_session__create_kernel_maps(struct perf_session *self);
virt/kvm/assigned-dev.c+1−3
@@ -635,7 +635,6 @@ static int kvm_vm_ioctl_assign_device(struct kvm *kvm, · 634 unmodified lines
635635 int r = 0, idx;
636636 struct kvm_assigned_dev_kernel *match;
637637 struct pci_dev *dev;
638− u8 header_type;
639638
640639 if (!(assigned_dev->flags & KVM_DEV_ASSIGN_ENABLE_IOMMU))
641640 return -EINVAL;
@@ -668,8 +667,7 @@ static int kvm_vm_ioctl_assign_device(struct kvm *kvm, · 26 unmodified lines
668667 }
669668
670669 /* Don't allow bridges to be assigned */
671− pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type);
672− if ((header_type & PCI_HEADER_TYPE) != PCI_HEADER_TYPE_NORMAL) {
670+ if (dev->hdr_type != PCI_HEADER_TYPE_NORMAL) {
673671 r = -EPERM;
674672 goto out_put;
675673 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t