Commit graph

83357 commits

Author SHA1 Message Date
David Brown
f333c13c9e ARM: dts: msm: Fix merge resolution
Commit e45600107b (Merge tag 'msm-cleanup-for-3.11' of
git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm into
next/cleanup) incorrectly resolved a merge conflict, resulting in a
node address that doesn't match the register address.

Fix this node address.

Signed-off-by: David Brown <davidb@codeaurora.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-18 00:29:05 -07:00
Olof Johansson
75d39696d3 Allwinner SoCs platform additions for 3.11
- Various cleanups and documentation updates
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRujoAAAoJEBx+YmzsjxAgNbkQAL/sA7MFT4qqvHOXeNAbF1lX
 tGORTxGZv9cDms+H9oyXsQ2cEmAxKoU9KGBdrM0F/ws+rPvA1xOuqntERGCIoA3z
 K1cynGp7S/V3X+snd4RtYgXf5fs3CtgoYO1yB+vn9gZ8ynS/WVvIqssrjo0jBVBx
 LQmeymjijoDZsxwGtc03ouOhrTqTu9igjYDuHTTaxHWqVsn/d0WWhznRAXyvyuj1
 Efpk8wl794UbPnkKbNBkXLFwL0Pc3cju0Me4qYpF8Od+2YTWdZw2IVODAwDA4S37
 XUVZrEEzc5tO8HFADV1OpJruUlBFRpekFJtS4RtFkDCXsk4srNQJhYUtajVd2uF+
 zeV8v4NtTufX4/Vyc676D5pkujv1G8CmpBIj2jWcj2op/Pk2pNTRDRAlzz0n16uz
 u0KbngfjT+GghNqiFvXHhLpsf7KjhndLb6vfuDamPNleIxDhJWFLbTFzzdxZamOT
 Fh3/YXXRjODS1gILxCaXNKtcBYzaaaZtQWeidmKCEgryCyapupxI3XWrvTIWeV8u
 /WOxqLrDEa4xcuiLMAcWbxZUnAZZZwcH2bfB/YMu8SUgP3COVEmlxrzgZh441c8t
 OUxNGe+lvUFJU2DK6C07PNxyAxtNWXU+6Ej++YW6wUvCyGCJFmiQ7gTTD7VBMFZY
 mYdtRRk8fBhqStaUH3AW
 =96rC
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-core-for-3.11' of git://github.com/mripard/linux into next/cleanup

From Maxime Ripard:
Allwinner SoCs platform additions for 3.11
  - Various cleanups and documentation updates

* tag 'sunxi-core-for-3.11' of git://github.com/mripard/linux:
  ARM: sunxi: irqchip: Update the documentation
  ARM: sunxi: Update datasheet documentation
  ARM: sunxi: Remove init_irq declaration in machine description

Signed-off-by: Olof Johansson <olof@lixom.net>

	#
2013-06-14 18:41:44 -07:00
Olof Johansson
e45600107b Cleanups for MSM for 3.11
These are a handful of cleanups to the MSM tree.  The gpio cleanups
 get us closer to having proper pinmux and gpio support.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJRu1dSAAoJEOa6n1xeVN+CbG4QAMxPKNDgBcX+UHRLMBh5YkbP
 ePoWz8QhQ/OWo3Oef6IBEwA3n2jfSF3hTYnXJI/LqRibL8yCDWKlSI6b52/vZsDg
 r2J4FMiHtBc0Wk+JGhKszdS+eLnljOljz49L5YEMCRglFVMveXqbKeTvbzfaGR6u
 SAJca3roEVo2Vgdf36CnYEHNxHrfK6yMzPVqiVgasPWnst10WguV+dhX9+REwT2p
 kp99U8wBEAp84nb2KzoVwKpzUpWWPcFWiaB1/EE6jB5+d3U0CLBWp+6E12m9tOTU
 L8Hx417zmwV/YvNfVb//SnTnBGYMybXDVlIzRQUuJimPm96SFw1Uw6+0+V+sAv3N
 T7WmyiyZ6UaDyQB1VCQNzIqEOq8qBacRaXH6kxk6T8UW8l08tSuSf/piiSw5wZLD
 6QJ1RFkjrcEulh0DDOcf6Fg34jVk3hjQFF86sBN+JTQfIQ1VBHDLSGuF+RjYk5LW
 gNN5xGuqHjDdbK/HNvMhIF8MN/B64Wm4PsOHRsN5RP9EXVIB5kEGUMwEEEa/jO8m
 rhWUPjFq7nE4BNNvrhKShjxtKJGi5OmYx5GYw189rJ5bzVQH68ZSIAGTh8TySpfB
 N/G82J+bGXz0xq8z81dKRsru+kdv2MkNL9mlJzYNbKhQP64ukD1XMmrWlH8DxtzY
 CPNWs8m5QCI4R1WiaP2W
 =9wS3
 -----END PGP SIGNATURE-----

Merge tag 'msm-cleanup-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm into next/cleanup

From David Brown:
Cleanups for MSM for 3.11

These are a handful of cleanups to the MSM tree.  The gpio cleanups
get us closer to having proper pinmux and gpio support.

* tag 'msm-cleanup-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm:
  mfd: ssbi: Use devm_* and simplify code
  gpio: msm: Add device tree and irqdomain support for gpio-msm-v2
  ARM: msm: Remove gpiomux-v2 and re-organize MSM_GPIOMUX configs
  msm: iomap: Remove unused bases and mappings
  msm: Remove unused file core.h
  ARM: msm: Remove init_irq declaration in machine description

Signed-off-by: Olof Johansson <olof@lixom.net>

Conflicts:
	arch/arm/boot/dts/msm8660-surf.dts
	arch/arm/boot/dts/msm8960-cdp.dts
2013-06-14 18:28:02 -07:00
Olof Johansson
bae994b199 Some minor fixes for MSM for 3.11
I don't expect these to be necessary for stable, since the fixes are
 to recently added code.  The strncpy fix is only in debug code that
 isn't normally compiled or used (and is being removed in upcoming
 patches).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJRu1dtAAoJEOa6n1xeVN+C1JIQAMbo/i20+rRdXutDqwQa+XY7
 TaDi4Ltqb5xE8OOIToJlUeI6pJzWIrM5KvSDLJ6BVd1UYm5BEye/oxI6T95F+aZT
 iND8nD8ZFJAGbUoviw+1WOQVXK8kyZFv7oDqmh5F5NieKD5UNoc0W5r3um0wrZC7
 33QLl7P0sNg9H98IkbnpA8nMmWnrVs7HXPZjRgoEycj+BtLT2yIx7CSANIbBjspz
 CLBpjvOEzG0Qv86jp6FzRS7oSz7AAy2fTIVvHCyrCtvXY8X2CnXuvMk+Ppuby0rN
 M95r3g03gaL4P2fgehp2p3Kg4dBQ05h8dMtdc53/TU8ow1NCXG7OXZ10jm9sBoMw
 K7HUYwV+mkWkpM6DFv0Sf5YEOOr2lVAqnJyDvd3MfihC6QTlOVCvPuYMqYndpDmd
 yOWhS7a4NBanJxXJI9MAR64X36+Zt9VKzKTTn8sMzNZvotMl6tAS03KCNB6NeIGQ
 XmYjTUIkzynw7YFdCwAxVtN8KegsNe2t3tWUyoNWiZbEPOVISl1z7NwsqXS4sJKU
 p7QpqQRGBIw1QMPnbNhLGR4PouTSXK2iNMXjrpcTD85olgzV1K0Za4qFvOdcTZCY
 PeVHfhG1xTGPoXj/UHr5RG4oAswbfLvrtGxp6AAS3yOJt0P6rLZ5BwpqgQdtTScd
 UjmLUYDIUWnF3dSrkAy1
 =XyCL
 -----END PGP SIGNATURE-----

Merge tag 'msm-fix-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm into next/cleanup

From David Brown:
Some minor fixes for MSM for 3.11

I don't expect these to be necessary for stable, since the fixes are
to recently added code.  The strncpy fix is only in debug code that
isn't normally compiled or used (and is being removed in upcoming
patches).

* tag 'msm-fix-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm:
  gpio: msm-v1: Remove errant __devinit to fix compile
  mfd: ssbi: Add MODULE_DEVICE_TABLE
  ARM: dts: msm: Fix bad register addresses
  arch: arm: mach-msm: using strlcpy instead of strncpy

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-14 18:23:23 -07:00
Olof Johansson
777d466d13 Move omap4 over to device tree based booting. This allows us to get rid
a big pile of platform init code for things that are already handled by
 device tree related code. As am33xx is already device tree based, we
 can also remove the same data for am33xx.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRuLcYAAoJEBvUPslcq6Vz5tgQAMSyQh6/pSOJ9U4hr2ygDSk2
 zaXiXCSKEdL3+ADqSpdWalNTS65hNkufrzY49Tu5ChY3ugjbr3fYFYIYuQwYgxOC
 aMhV2FgJyMzH83s3T1WagGsietrcKAxBnHrrdMaaU6YDEf6PZ0X4d5HiIyGU+QZG
 ojIVrqmLecd/IG/zFs7xPEeqJTjCT/HQa6CLX/lcLYQh54PVVv1EAs3S8qn4n8Ef
 ufXH0y4p4t5/BSQsE5E6JTcj87LM40vB0bFPrHlJo/baYhBynCIirjabwwXjCLMl
 R7g3Ms0kqXNhtYawQcatSZjQt8m9gnjgieRNfsaLeSslCRWqOgPyEx0z8F4s0wXc
 EzLsib/lT72xuhhMZyHLYf8LTlQz7tN/Vu1m2pbP5Ailkd79hbYOvi3rotZnu6k7
 oMLaLf5HhvtLxo7ewSmP3BZ8plryA3l+evg6cPSXEv24A26WEgdK3jIwR7Kot4Cd
 ByeXL8Yt/6h+85LJIi0Fr6rk/c2pwpOg2NutfnmYP7QCa1E5at+0WyGyz1NDjSAL
 4zNDhjrpUSeVYr6dNBUUzedGZoo+SnHqzNqE73GIhPDD6gArIiXAffpQPMVBbiNG
 0UvZ4EOBNnOS3cwqEL5gLe5c0GLI/jYL8TOaBPhm2j29vYnOq/e/jmkl4xzg/ad4
 MoNVvZT/+cRxy8w6cAmJ
 =K9EM
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.11/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup

From Tony Lindgren:
Move omap4 over to device tree based booting. This allows us to get rid
a big pile of platform init code for things that are already handled by
device tree related code. As am33xx is already device tree based, we
can also remove the same data for am33xx.

* tag 'omap-for-v3.11/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4: hwmod data: Remove irq entries from mcspi, mmc hwmods
  ARM: OMAP4: hwmod data: add DSS data back
  ARM: OMAP4: hwmod data: Clean up the data file
  ARM: AM33XX: hwmod data: irq, dma and addr info clean up
  ARM: OMAP2+: Remove omap4 ocp2scp pdata
  ARM: OMAP2+: Remove omap4 pdata for USB
  ARM: OMAP2+: Remove omap4 pdata from hsmmc.c
  ARM: OMAP2+: Remove legacy mux data for omap4
  ARM: OMAP2+: Remove board-omap4panda.c
  ARM: OMAP2+: Remove board-4430sdp.c
  ARM: OMAP2+: Legacy support for wl12xx when booted with devicetree

Resolved merge conflict due to a fix for 3.10 (the fix is removed since
the code is no longer used -- data comes from device tree).

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-14 14:28:22 -07:00
Olof Johansson
214099b028 A set of small fixes for omaps for the -rc cycle:
- am7303 iva2 reset PM regression fix
 - am33xx uart2 dma channel fix
 - am33xx gpmc properties fix
 - omap44xx rtc wake-up mux fix for nirq pins
 - omap36xx clock divider restore fix
 
 There's also one tiny non-critical .dts fix for omap5
 timer pwm properties.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRs4AGAAoJEBvUPslcq6VzY6cQANFqjGL1GFzMFazsoinAd5RA
 Su8AzWCah/Ve6pkpqIxNb4tQon8leFYADYwfddf6dOb76r4i9xBD83xTr8J5JMyu
 dGBLtIyOZur2DiRljFwPKPrrZ2JuKcN8OXoKr6MEeh8UsiYBEav0HWgEzfC/SSzH
 5BXYX99TkqSi1Ei7vsZBXKNhjF6l4Orirx0yKnFWqIwmCJgeVMIMEZDgnh1Q7h2p
 9iXUGwGTBwaxdvZjrmrVTWAToy0XkMgQJaIOrYeJvLI8NF9JoGsbkJVLQTr17tzJ
 i9QIImPlgsa8vzFDWly38FT6tuZ3JC3Vq7YM+aEIjRyqOWNhOl9LTTCTOqTA8q0L
 amNGrF00j3fdRTm9XHWf9JN5RyNTSjfrjc1/0ptAnoV6J4tswQaN5Sr4kd8TU3VL
 BDA5MtmlH87WJ3TU8PhnTbrWZVGSymNTTBaF1EuWYMLmxtDr5GRmmZEEBYH1ZGqv
 Pkyr4BqM7+yd0Gjxm+3i37q7QXUnKzN/vop0mXDrfMXA1pHFH80C/sthu8V17fm4
 QB5gCdpfnOtyI8lq49pqURh/3AWnYgX47vtFNMfGh8o+s4KNV9xDX7S9jnL5DXyk
 ththcVRSZnslBooGYlAXfp8DG3XnGFw3ngkHNimU9cLkIMCpr/pyrCWBMKOzJEcR
 sjEvAvY7QKWLJ37ACSed
 =KVcG
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.10/fixes-v3.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup

Pulling in a set of fixes from Tony Lindgren to resolve conflicts with later
cleanup branch:

A set of small fixes for omaps for the -rc cycle:

- am7303 iva2 reset PM regression fix
- am33xx uart2 dma channel fix
- am33xx gpmc properties fix
- omap44xx rtc wake-up mux fix for nirq pins
- omap36xx clock divider restore fix

There's also one tiny non-critical .dts fix for omap5
timer pwm properties.

* tag 'omap-for-v3.10/fixes-v3.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: omap3: clock: fix wrong container_of in clock36xx.c
  ARM: dts: OMAP5: Fix missing PWM capability to timer nodes
  ARM: dts: omap4-panda|sdp: Fix mux for twl6030 IRQ pin and msecure line
  ARM: dts: AM33xx: Fix properties on gpmc node
  arm: omap2: fix AM33xx hwmod infos for UART2
  + Linux 3.10-rc4

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-14 14:26:06 -07:00
Rohit Vaswani
43f68444bc gpio: msm: Add device tree and irqdomain support for gpio-msm-v2
This cleans up the gpio-msm-v2 driver of all the global define usage.
The number of gpios are now defined in the device tree. This enables
adding irqdomain support as well.

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-06-12 14:50:12 -07:00
Rohit Vaswani
eda9dcfa56 ARM: msm: Remove gpiomux-v2 and re-organize MSM_GPIOMUX configs
Remove gpiomux-v2 as it's not being used and make way for future improvements.

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-06-12 13:52:51 -07:00
Sricharan R
09182ab11b ARM: OMAP4: hwmod data: Remove irq entries from mcspi, mmc hwmods
Commit '3b9b10151c6838af52244cec4af41a938bb5b7ec' cleaned up the
data file to remove all irq and dma entries for all hwmods, which
are now populated by DT. But mcspi and mmc irq, dma entries were
retained since MMC, NFS boot was not working. Since it is root caused
to be an issue with only DMA entries [1], irq can be safely removed.

[1] http://www.mail-archive.com/linux-omap@vger.kernel.org/msg90115.html

Signed-off-by: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-06-12 09:41:46 -07:00
Tomi Valkeinen
b38911f347 ARM: OMAP4: hwmod data: add DSS data back
Commit 3b9b10151c (ARM: OMAP4: hwmod data:
Clean up the data file) removes hwmod data for omap4, including DSS
data. DSS has not yet been converted to DT, so the hwmod data is still
needed.

This patch adds back the DSS parts of the hwmod data.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-06-12 06:52:30 -07:00
Tony Lindgren
03c0d27119 More OMAP hwmod and clock fixes for v3.10-rc. Fixes the AM33xx UART2.
Also fixes some CCF-related breakage on OMAP36xx/37xx, affecting DSS
 at the very least.
 
 Basic test logs for this branch are here:
 
 http://www.pwsan.com/omap/testlogs/fixes_b_v3.10-rc/20130606093449/
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRsMp7AAoJEMePsQ0LvSpL9bsP/0gRY5Vb9qXQPEiUz+UqtwBr
 TjugjMmCOlvU8MkHKVI3Cp5qxfvBIsDT7x74AjA6q5E7In3+1njIxLwoa81osgTU
 s97LkjbBo4RuB6G9EWTQCedYLgyyIzqTQA3JCUx46K6E0ERonjf+viPZl3GvYb+Z
 cl9oZYya0DC+5QBJzZlodMu/5JHGpFrqgs505KFovVcxnWCRcZGx3hMH9Be6pSsD
 je24xjpjMWfhTToQMpbW58ZDWSTh5GLnu87blff8C8ojWlwmF+iwfECSZQfrPHCA
 9g1aSsA37DWUB1krOZ1nUUdQ7eP6fjR4lWpz1mNOT5cBlncDqT/2M4lumkjCIsie
 +Nv24xGQwpJRzAyYzJGJqedB1j7i8/HbCVzCkAqJnNCiimW7LKUwDqzHBYiZAhcI
 Gs2/xUDBhLNfjSbGeCj+nnRMP5VpiT2ZEWtk1W+Icld/tG3//7TF3OYm1gzG57Xg
 Dza6uAeO9ZxTZtGkYQtnzwT9Wm19i87ExD9nORclr5vT//uqKWHye9JaddXFL86Z
 oePaTikhZK2HJIUP2JgDYGDB7PBAE9gMJ16JeKd6OfGn8ISJD6TPsuJ8wM98FKXQ
 CRblPO6i0NTOe1Gsfy2Z+9gLZi2HxDLLNcVTnx+V/VXg1Srpjg2ZQ8yLDfOPHFYm
 /IuIiZTq97dmTicqm5dj
 =HWUH
 -----END PGP SIGNATURE-----

Merge tag 'omap-fixes-b-for-3.10-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v3.10/fixes

More OMAP hwmod and clock fixes for v3.10-rc.  Fixes the AM33xx UART2.
Also fixes some CCF-related breakage on OMAP36xx/37xx, affecting DSS
at the very least.

Basic test logs for this branch are here:

http://www.pwsan.com/omap/testlogs/fixes_b_v3.10-rc/20130606093449/
2013-06-07 15:06:18 -07:00
Tony Lindgren
17f545ca17 Merge branch 'dts-fixes-for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt into omap-for-v3.10/fixes 2013-06-07 15:05:36 -07:00
Sricharan R
3b9b10151c ARM: OMAP4: hwmod data: Clean up the data file
- The IO resource information like dma request lines, irq number and
  ocp address space can be populated via dt blob. So such data is stripped
  from OMAP4 SOC hwmod data file.

- The devices which are still missing the device tree bindings,
  address space entries are not removed yet. When such devices add
  the dt bindings, respective address space data can be deleted.

- Also other unnecessary hwmods like firewalls are removed as a part of this.
  Since emif was getting registered only because of this firewalls links,
  the mpu->emif direct link is added now.

The above update, results in reduction of about ~1650 lines of code.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Sricharan R <r.sricharan@ti.com>
Acked-by: Benoit Cousson <benoit.cousson@linaro.org>
Acked-by: Paul Walmsley <paul@pwsan.com>
[tony@atomide.com: updated for omap44xx_usb_phy_and_pll_addrs, dropped
mcspi and mmc changes to avoid regressions on omap4sdp]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-06-07 09:17:15 -07:00
Tony Lindgren
bea6412a99 Merge branch 'am33xx' into omap-for-v3.11/cleanup 2013-06-07 09:12:25 -07:00
Vaibhav Hiremath
49006bfd31 ARM: AM33XX: hwmod data: irq, dma and addr info clean up
AM33XX only supports DT boot mode and with addition of
extracting module resources like, irq, dma and address space
from DT block, so now we can remove duplicate information from
hwmod data file.

This patch cleanups-up/deletes,

     - All references to "omap_hwmod_irq_info" data.
     - All references to "omap_hwmod_dma_info" data.
     - References to "omap_hwmod_addr_space" of the modules
       for which DT node is available with required address
       space information.
     - For the modules where "sysc" field is not applicable,
       we don't need module address space, so remove them as well.
     - The hwmod like firewall etc which are not useful are also
       deleted.

This cleanup gets us around ~1100 LOC of negative diff.
Patch is boot tested on AM335x-EVM along with below modules -
	- Matrix-keypad
	- Volume up/down keys
	- Ethernet
	- RTC
	- WDT

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-06-07 09:12:03 -07:00
Jean-Philippe Francois
a93d8a1cea ARM: omap3: clock: fix wrong container_of in clock36xx.c
omap36xx_pwrdn_clk_enable_with_hsdiv_restore expects the parent hw of
the clock to be a clk_hw_omap. However, looking at cclock3xxx_data.c,
all concerned clock have parent defined as clk_divider.  Fix the
function to use clk_divider.  Tested with 3.9 on dm3730.

Signed-off-by: Jean-Philippe François <jp.francois@cynove.com>
Cc: NeilBrown <neilb@suse.de>
Cc: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2013-06-06 08:48:07 -06:00
Suman Anna
8341613afb ARM: dts: OMAP5: Fix missing PWM capability to timer nodes
OMAP5 has 6 timers (GPTimers 5, 6, 8 to 11) that are capable of PWM.
The PWM capability property is missing from the node definitions of
couple of timers.

Add ti,timer-pwm attribute for timer 5, 6, 8 and 11.

Signed-off-by: Suman Anna <s-anna@ti.com>
[benoit.cousson@linaro.org: Update changelog and subject to highlight
the fix]
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
2013-06-03 14:55:30 +02:00
Kevin Hilman
1e68f43b7d ARM: dts: omap4-panda|sdp: Fix mux for twl6030 IRQ pin and msecure line
Earlier commits ensured proper muxing of pins related to proper
TWL6030 behavior: see commit 265a2bc8 (ARM: OMAP3: TWL4030: ensure
sys_nirq1 is mux'd and wakeup enabled) and commit 1ef43369 (ARM:
OMAP4: TWL: mux sys_drm_msecure as output for PMIC).

However these only fixed legacy boot and not DT boot.  For DT boot,
the default mux values need to be set properly in DT.

Special thanks to Nishanth Menon for the review and catching some
major flaws in earlier versions.

Tested on OMAP4430/Panda and OMAP4460/Panda-ES.

Cc: Nishanth Menon <nm@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
[benoit.cousson@linaro.org: Slightly change the subject to align
board name with file name]
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
2013-06-03 14:55:29 +02:00
Lars Poeschel
00dddcaa51 ARM: dts: AM33xx: Fix properties on gpmc node
The gpmc driver is actually looking for "gpmc,num-cs" and
"gpmc,num-waitpins" properties in DT. The binding doc also states
this.
Correct the properties in the dts to provide the right values for the
gpmc driver.

Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Pekon Gupta <pekon@ti.com>
Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
2013-06-03 14:55:28 +02:00
Thomas Petazzoni
768dc16397 arm: omap2: fix AM33xx hwmod infos for UART2
The UART2 hwmod structure is pointing to the EDMA channels of UART1,
which doesn't look right. This patch fixes this by making the UART2
hwmod structure to a new structure that lists the EDMA channels to be
used by the UART2.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
[paul@pwsan.com: updated to apply]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2013-06-03 03:26:32 -06:00
Linus Torvalds
cc86397392 Merge branch 'for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc fixes from Helge Deller:
 "This patcheset includes fixes for:

   - the PCI/LBA which brings back the stifb graphics framebuffer
     console
   - possible memory overflows in parisc kernel init code
   - parport support on older GSC machines
   - avoids that users by mistake enable PARPORT_PC_SUPERIO on parisc
   - MAINTAINERS file list updates for parisc."

* 'for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: parport0: fix this legacy no-device port driver!
  parport_pc: disable PARPORT_PC_SUPERIO on parisc architecture
  parisc/PCI: lba: fix: convert to pci_create_root_bus() for correct root bus resources (v2)
  parisc/PCI: Set type for LBA bus_num resource
  MAINTAINERS: update parisc architecture file list
  parisc: kernel: using strlcpy() instead of strcpy()
  parisc: rename "CONFIG_PA7100" to "CONFIG_PA7000"
  parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50
  parisc: memory overflow, 'name' length is too short for using
2013-06-02 06:24:54 +09:00
Chen Gang
ea99b1adf2 parisc: kernel: using strlcpy() instead of strcpy()
'boot_args' is an input args, and 'boot_command_line' has a fix length.
So use strlcpy() instead of strcpy() to avoid memory overflow.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Helge Deller <deller@gmx.de>
2013-06-01 14:29:01 +02:00
Paul Bolle
766039022a parisc: rename "CONFIG_PA7100" to "CONFIG_PA7000"
There's a Makefile line setting cflags for CONFIG_PA7100. But that
Kconfig macro doesn't exist. There is a Kconfig symbol PA7000, which
covers both PA7000 and PA7100 processors. So let's use the corresponding
Kconfig macro.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Helge Deller <deller@gmx.de>
2013-06-01 14:28:47 +02:00
Helge Deller
ae249b5fa2 parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50
With CONFIG_DISCONTIGMEM=y and multiple physical memory areas,
cat /proc/kpageflags triggers this kernel bug:

kernel BUG at arch/parisc/include/asm/mmzone.h:50!
CPU: 2 PID: 7848 Comm: cat Tainted: G      D W 3.10.0-rc3-64bit #44
 IAOQ[0]: kpageflags_read0x128/0x238
 IAOQ[1]: kpageflags_read0x12c/0x238
 RP(r2): proc_reg_read0xbc/0x130
Backtrace:
 [<00000000402ca2d4>] proc_reg_read0xbc/0x130
 [<0000000040235bcc>] vfs_read0xc4/0x1d0
 [<0000000040235f0c>] SyS_read0x94/0xf0
 [<0000000040105fc0>] syscall_exit0x0/0x14

kpageflags_read() walks through the whole memory, even if some memory
areas are physically not available. So, we should better not BUG on an
unavailable pfn in pfn_to_nid() but just return the expected value -1 or
0.

Signed-off-by: Helge Deller <deller@gmx.de>
2013-06-01 14:28:35 +02:00
Chen Gang
3f108de96b parisc: memory overflow, 'name' length is too short for using
'path.bc[i]' can be asigned by PCI_SLOT() which can '> 10', so sizeof(6
* "%u:" + "%u" + '\0') may be 21.

Since 'name' length is 20, it may be memory overflow.

And 'path.bc[i]' is 'unsigned char' for printing, we can be sure the
max length of 'name' must be less than 28.

So simplify thinking, we can use 28 instead of 20 directly, and do not
think of whether 'patchc.bc[i]' can '> 100'.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Helge Deller <deller@gmx.de>
2013-06-01 14:27:56 +02:00
Linus Torvalds
aa3ae6de36 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc fixes from Ben Herrenschmidt:
 "Here are a few more fixes for powerpc 3.10.  It's a bit more than I
  would have liked this late in the game but I suppose that's what
  happens with a brand new chip generation coming out.

  A few regression fixes, some last minute fixes for new P8 features
  such as transactional memory,...

  There's also one powerpc KVM patch that I requested that adds two
  missing functions to our in-kernel interrupt controller support which
  is itself a new 3.10 feature.  These are defined by the base
  hypervisor specification.  We didn't implement them originally because
  Linux doesn't use them but they are simple and I'm not comfortable
  having a half-implemented interface in 3.10 and having to deal with
  versionning etc...  later when something starts needing those calls.
  They cannot be emulated in qemu when using in-kernel interrupt
  controller (not enough shared state).

  Just added a last minute patch to fix a typo introducing a breakage in
  our cputable for Power7+ processors, sorry about that, but the
  regression it fixes just hurt me :-)"

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/cputable: Fix typo on P7+ cputable entry
  powerpc/perf: Add missing SIER support
  powerpc/perf: Revert to original NO_SIPR logic
  powerpc/pci: Remove the unused variables in pci_process_bridge_OF_ranges
  powerpc/pci: Remove the stale comments of pci_process_bridge_OF_ranges
  powerpc/pseries: Always enable CONFIG_HOTPLUG_CPU on PSERIES SMP
  powerpc/kvm/book3s: Add support for H_IPOLL and H_XIRR_X in XICS emulation
  powerpc/32bit:Store temporary result in r0 instead of r8
  powerpc/mm: Always invalidate tlb on hpte invalidate and update
  powerpc/pseries: Improve stream generation comments in copypage/user
  powerpc/pseries: Kill all prefetch streams on context switch
  powerpc/cputable: Fix oprofile_cpu_type on power8
  powerpc/mpic: Fix irq distribution problem when MPIC_SINGLE_DEST_CPU
  powerpc/tm: Fix userspace stack corruption on signal delivery for active transactions
  powerpc/tm: Move TM abort cause codes to uapi
  powerpc/tm: Abort on emulation and alignment faults
  powerpc/tm: Update cause codes documentation
  powerpc/tm: Make room for hypervisor in abort cause codes
2013-06-01 20:13:16 +09:00
Olof Johansson
b54338b30e mvebu cleanup for v3.11 (round 3)
- mvebu
     - mark functions in armada-370-xp.c as static
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJRpPQMAAoJEAi3KVZQDZAe2mMH/ivHRhYK47xruZKxSQAUemMG
 a8c9sDKSZK9m4Fca5r3dsx9VaBSLZjbkFm8iykZnukiMEl5wD9gMMinCuUxY01pv
 eY2VOC40yPD0LRQYfFi0CoUxwK2NyetGvALlt3UaBj3v8lTruEjod3JExH7Nnv3h
 DbASwUcNyK9cQAaY1CMgaZTgoXygvZ1CZqU4Vcu78uTl0ob5mK9kEXsXIBdA8Pac
 Ba6ipLNl5fjsZkAUI6KDlgu4dxbMdvi/3IU+AHVpyjqjlPrvCKVeRahdUjRwJS2s
 pToGfzr0i7t5L5JB0MYQiHvxTI6mtEyePsx2wMFUBL29DafYJDrc/3s7wiwN+m0=
 =fHxJ
 -----END PGP SIGNATURE-----

Merge tag 'cleanup-3.11-3' of git://git.infradead.org/users/jcooper/linux into next/cleanup

From Jason Cooper, mvebu cleanup for v3.11.

Signed-off-by: Olof Johansson <olof@lixom.net>

* tag 'cleanup-3.11-3' of git://git.infradead.org/users/jcooper/linux:
  arm: mvebu: mark functions of armada-370-xp.c as static
  ARM: mvebu: Remove init_irq declaration in machine description
  ARM: Orion: Remove redundant init_dma_coherent_pool_size()
2013-05-31 22:28:38 -07:00
Olof Johansson
b0d2804789 Cleanups in various machine definitions
- Patches to remove the .init_irq definition when using irqchip_init
   - Make the ARM core code call debug_ll_io_init when no map_io callback is
     declared
   - Remove the .map_io definition in the various machines using it
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRohiRAAoJEBx+YmzsjxAgwVsQAJz8A2kI1IrnoTGvY0357bYz
 eyF42uN2jzlN92wv/904+65Qjxj+QSKeS6dIbUj5c3yMrdLIrX0FTE779haP/DjL
 g6k5Q7v6HZ8ns10Hoa7MR12mh37Tznl/RVo+twwDYY7SdzfM4/qrT5ff67NWI1bc
 SjxJSfqWBEQDpPZAr/3VGZQxf6dnSs86dfNf9fGWM4Qe+PtJ/umHRnImCHNqdSZe
 whW78C+btUdTf3PXssBKQCkpEY64XTlEhRICr7+K+Xn34JeaGwQm8OK6Gi2L6Fq4
 2KOG+Spw9NQBmX74pyyFIBEyDSmyq6cskjp1Fj1a95nWAj+8MlxQN0/yzHQYjaO8
 VuGY0OzT+3dnG3TCahKPBWr8VClS6TYO0nVuX7DznTn+y6hkpPpOdd+kAg9UkoNN
 4vhJm0ehnSiTiF1UFC1CcqIJohWueCGfztWnlzfjQ06wJv4h6RsjnxhLSpXX2x4T
 dGV0WUvsXYC1PWf3Jp7xqgPVH9thtLAAFG30Zi+yG1EWaUIchZW4JBjQPy375Wdb
 AzEygTVQRd6MhNt5TKxBqlr9IoJlLwFrFNSr45ghNmVe221sdRz8ozShnnjNgBtO
 +Fd9y3L8b8r5AKWotsH98fFctR2ZUrEzK39ohCjUnzAC+HiOf5D/E7OPeItRHAuE
 ewjyGf4VNKHh1hJfViIC
 =sNQl
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc-cleanups-for-3.11' of git://github.com/mripard/linux into next/cleanup

From Maxime Ripard:
Cleanups in various machine definitions
  - Patches to remove the .init_irq definition when using irqchip_init
  - Make the ARM core code call debug_ll_io_init when no map_io callback is
    declared
  - Remove the .map_io definition in the various machines using it

(Some of these go through the platform maintainers, these are the ones who got
explicitly acked and not picked up by anyone else)

Signed-off-by: Olof Johansson <olof@lixom.net>

* tag 'arm-soc-cleanups-for-3.11' of git://github.com/mripard/linux:
  ARM: sunxi: Remove the .map_io function declaration
  ARM: mxs: remove the .map_io declaration
  ARM: highbank: remove the .map_io declaration
  ARM: mmu: Call debug_ll_io_init if no map_io function is specified
  ARM: vt8500: Remove init_irq declaration in machine description
  ARM: virt: Remove init_irq declaration in machine description
  ARM: vexpress: Remove init_irq declaration in machine description
  ARM: sirf: Remove init_irq declaration in machine description
  ARM: spear: Remove init_irq declaration in machine description
  ARM: nomadik: Remove init_irq declaration in machine description
2013-05-31 22:08:11 -07:00
Will Schmidt
badec11b64 powerpc/cputable: Fix typo on P7+ cputable entry
Fix a typo in setting COMMON_USER2_POWER7 bits to .cpu_user_features2
cpu specs table.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 09:30:03 +10:00
Michael Ellerman
58a032c3b1 powerpc/perf: Add missing SIER support
Commit 8f61aa3 "Add support for SIER" missed updates to siar_valid()
and perf_get_data_addr().

In both cases we need to check the SIER instead of mmcra.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:29 +10:00
Michael Ellerman
cbda6aa10b powerpc/perf: Revert to original NO_SIPR logic
This is a revert and then some of commit 860aad7 "Add regs_no_sipr()".
This workaround was only needed on early chip versions.

As before NO_SIPR becomes a static flag of the PMU struct.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:29 +10:00
Kevin Hao
858957ab1e powerpc/pci: Remove the unused variables in pci_process_bridge_OF_ranges
The codes which ever used these two variables have gone. Throw away
them too.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:28 +10:00
Kevin Hao
2798389604 powerpc/pci: Remove the stale comments of pci_process_bridge_OF_ranges
These comments already don't apply to the current code. So just remove
them.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:28 +10:00
Srivatsa S. Bhat
f274ef8747 powerpc/pseries: Always enable CONFIG_HOTPLUG_CPU on PSERIES SMP
Adam Lackorzynski reported the following build failure on
!CONFIG_HOTPLUG_CPU configuration:

  CC      arch/powerpc/kernel/rtas.o
arch/powerpc/kernel/rtas.c: In function ‘rtas_cpu_state_change_mask’:
arch/powerpc/kernel/rtas.c:843:4: error: implicit declaration of function ‘cpu_down’ [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make[1]: *** [arch/powerpc/kernel/rtas.o] Error 1
make: *** [arch/powerpc/kernel] Error 2

The build fails because cpu_down() is defined only under CONFIG_HOTPLUG_CPU.

Looking further, the mobility code in pseries is one of the call-sites which
uses rtas_ibm_suspend_me(), which in turn calls rtas_cpu_state_change_mask().
And the mobility code is unconditionally compiled-in (it does not fall under
any Kconfig option). And commit 120496ac (powerpc: Bring all threads online
prior to migration/hibernation) which introduced this build regression is
critical for the proper functioning of the migration code. So it appears
that the only solution to this problem is to enable CONFIG_HOTPLUG_CPU if
SMP is enabled on PPC_PSERIES platforms. So make that change in the Kconfig.

Reported-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Cc: stable@vger.kernel.org
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:27 +10:00
Paul Mackerras
8e44ddc3f3 powerpc/kvm/book3s: Add support for H_IPOLL and H_XIRR_X in XICS emulation
This adds the remaining two hypercalls defined by PAPR for manipulating
the XICS interrupt controller, H_IPOLL and H_XIRR_X.  H_IPOLL returns
information about the priority and pending interrupts for a virtual
cpu, without changing any state.  H_XIRR_X is like H_XIRR in that it
reads and acknowledges the highest-priority pending interrupt, but it
also returns the timestamp (timebase register value) from when the
interrupt was first received by the hypervisor.  Currently we just
return the current time, since we don't do any software queueing of
virtual interrupts inside the XICS emulation code.

These hcalls are not currently used by Linux guests, but may be in
future.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:27 +10:00
Priyanka Jain
f7b3367774 powerpc/32bit:Store temporary result in r0 instead of r8
Commit a9c4e541ea
"powerpc/kprobe: Complete kprobe and migrate exception frame"
introduced a regression:

While returning from exception handling in case of PREEMPT enabled,
_TIF_NEED_RESCHED bit is checked in TI_FLAGS (thread_info flag) of current
task. Only if this bit is set, it should continue with the process of
calling preempt_schedule_irq() to schedule highest priority task if
available.

Current code assumes that r8 contains TI_FLAGS and check this for
_TIF_NEED_RESCHED, but as r8 is modified in the code which executes before
this check, r8 no longer contains the expected TI_FLAGS information.

As a result check for comparison with _TIF_NEED_RESCHED was failing even if
NEED_RESCHED bit is set in the current thread_info flag. Due to this,
preempt_schedule_irq() and in turn scheduler was not getting called even if
highest priority task is ready for execution.

So, store temporary results in r0 instead of r8 to prevent r8 from getting
modified as subsequent code is dependent on its value.

Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
CC: <stable@vger.kernel.org> [v3.7+]
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:27 +10:00
Aneesh Kumar K.V
0608d69246 powerpc/mm: Always invalidate tlb on hpte invalidate and update
If a hash bucket gets full, we "evict" a more/less random entry from it.
When we do that we don't invalidate the TLB (hpte_remove) because we assume
the old translation is still technically "valid". This implies that when
we are invalidating or updating pte, even if HPTE entry is not valid
we should do a tlb invalidate.

This was a regression introduced by b1022fbd29

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:26 +10:00
Michael Neuling
280a5ba22c powerpc/pseries: Improve stream generation comments in copypage/user
No code changes, just documenting what's happening a little better.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:26 +10:00
Michael Neuling
a515348fc6 powerpc/pseries: Kill all prefetch streams on context switch
On context switch, we should have no prefetch streams leak from one
userspace process to another.  This frees up prefetch resources for the
next process.

Based on patch from Milton Miller.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:25 +10:00
Nishanth Aravamudan
2ac6f427ad powerpc/cputable: Fix oprofile_cpu_type on power8
Maynard informed me that neither the oprofile kernel module nor oprofile
userspace has been updated to support that "legacy" oprofile module
interface for power8, which is indicated by "ppc64/power8." This results
in no samples. The solution is to default to the "timer" type, instead.
The raw entry also should be updated, as "ppc64/ibm-compat-v1" indicates
to oprofile userspace to use "compatibility events" which are obsolete
in ISA 2.07.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:25 +10:00
chenhui zhao
e242114aff powerpc/mpic: Fix irq distribution problem when MPIC_SINGLE_DEST_CPU
For the mpic with a flag MPIC_SINGLE_DEST_CPU, only one bit should be
set in interrupt destination registers.

The code is applicable to 64-bit platforms as well as 32-bit.

Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:24 +10:00
Michael Neuling
2b3f8e87cf powerpc/tm: Fix userspace stack corruption on signal delivery for active transactions
When in an active transaction that takes a signal, we need to be careful with
the stack.  It's possible that the stack has moved back up after the tbegin.
The obvious case here is when the tbegin is called inside a function that
returns before a tend.  In this case, the stack is part of the checkpointed
transactional memory state.  If we write over this non transactionally or in
suspend, we are in trouble because if we get a tm abort, the program counter
and stack pointer will be back at the tbegin but our in memory stack won't be
valid anymore.

To avoid this, when taking a signal in an active transaction, we need to use
the stack pointer from the checkpointed state, rather than the speculated
state.  This ensures that the signal context (written tm suspended) will be
written below the stack required for the rollback.  The transaction is aborted
becuase of the treclaim, so any memory written between the tbegin and the
signal will be rolled back anyway.

For signals taken in non-TM or suspended mode, we use the
normal/non-checkpointed stack pointer.

Tested with 64 and 32 bit signals

Signed-off-by: Michael Neuling <mikey@neuling.org>
Cc: <stable@vger.kernel.org> # v3.9
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:23 +10:00
Michael Neuling
b75c100ef2 powerpc/tm: Move TM abort cause codes to uapi
These cause codes are usable by userspace, so let's export to uapi.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Cc: <stable@vger.kernel.org> # v3.9
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:23 +10:00
Michael Neuling
6ce6c629fd powerpc/tm: Abort on emulation and alignment faults
If we are emulating an instruction inside an active user transaction that
touches memory, the kernel can't emulate it as it operates in transactional
suspend context.  We need to abort these transactions and send them back to
userspace for the hardware to rollback.

We can service these if the user transaction is in suspend mode, since the
kernel will operate in the same suspend context.

This adds a check to all alignment faults and to specific instruction
emulations (only string instructions for now).  If the user process is in an
active (non-suspended) transaction, we abort the transaction go back to
userspace allowing the HW to roll back the transaction and tell the user of the
failure.  This also adds new tm abort cause codes to report the reason of the
persistent error to the user.

Crappy test case here http://neuling.org/devel/junkcode/aligntm.c

Signed-off-by: Michael Neuling <mikey@neuling.org>
Cc: <stable@vger.kernel.org> # v3.9
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:22 +10:00
Michael Neuling
35f7097fce powerpc/tm: Make room for hypervisor in abort cause codes
PAPR carves out 0xff-0xe0 for hypervisor use of transactional memory software
abort cause codes.  Unfortunately we don't respect this currently.

Below fixes this to move our cause codes to below this region.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Cc: <stable@vger.kernel.org> # 3.9 only
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:22 +10:00
Linus Torvalds
fe696b47eb - Module compilation issues (symbol not exported).
- Plug a hole where user space can bring the kernel down.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.9 (GNU/Linux)
 
 iQIcBAABAgAGBQJRqLxuAAoJEGvWsS0AyF7xeqoP/0aq848/C5mZRD0vhC3NzHLk
 Zkzwt1uGn4SF/kFoliITPhmkpGEBaLnoE3WA/7uinb7GpeSzfRTx6LNqNf4H0mvT
 K2NCB6BA4l2ve/x1IJ5NmV44ODMG8kxyTZlJBWJ7QQKf3a+q8pjatP4N621bbkZx
 1aNrT+IaNeDpZt6g07nhb+8+XN3qy5NzjlsRKNxF93Nnr4BCxLVPq+NxcHbr+FHl
 87M1hfTljhCnO4GP5OkUSIZppaPqAfVAOc0Y8B6ivbcVaCyNY9eRnb6rl60SJpBJ
 6yhL2BzwtllkFtnoKjBViJglQWHwFlO0nI8A9DzzO986nNLKX3ks9cBXIlqhpRfR
 Y4ZWVoDRIl6mw9oOVngfRO6mxXv0AdIkXbYxSYIzYGxA8TWTvGX5gcAHoX142+E2
 +qqoSpkkaXMrZ6slR1hHfZ2QlzuRs+Xq06Mte0IWCA3pa6c0skDQd9WkjaCRu6Gu
 072CUzBy4bxucFTIBtJanhNKtOmTa4F+W548QgsEcuhvg0mwksaabowdMlVzn9FR
 ttgb84VRA3VywHn5rRQRmPVUKxxUEjP0dcc6zELRwT9TgTdOaxDd7sPg43Odo4rS
 WnplZPLOnGNR/x94qNxbql3O4qRaIv2R36C3DfnUv01cqqrJI2Y6mruC8kJAm7TW
 QsrN64qznqKbmOJqIpPx
 =bsjQ
 -----END PGP SIGNATURE-----

Merge tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64

Pull arm64 fixes from Catalin Marinas:
 - Module compilation issues (symbol not exported).
 - Plug a hole where user space can bring the kernel down.

* tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
  arm64: don't kill the kernel on a bad esr from el0
  arm64: treat unhandled compat el0 traps as undef
  arm64: Do not report user faults for handled signals
  arm64: kernel: compiling issue, need 'EXPORT_SYMBOL(clear_page)'
2013-06-01 06:45:10 +09:00
Stephen Boyd
28ba472bd3 ARM: dts: msm: Fix bad register addresses
Some bad copy/paste got in as well as too many zeroes. Fix
everything up so that the registers after the @ sign are
consistent with the first reg property.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-05-31 08:46:29 -07:00
Chen Gang
ad8c373c9a arch: arm: mach-msm: using strlcpy instead of strncpy
For NULL terminated string, need always be sure of ended by zero.

Or the next 'ptr' in 'for' looping may cause issue.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-05-31 08:46:09 -07:00
Rohit Vaswani
1a56e4b23d msm: iomap: Remove unused bases and mappings
QGIC_DIST and QGIC_CPU bases are now unused as they are
obtained from device tree. Remove the static iomappings.

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-05-31 08:39:50 -07:00
Rohit Vaswani
6ff9bbf22d msm: Remove unused file core.h
Commit be2109e13f removed the usage
of core.h. Remove the file as well.

    commit be2109e13f
    Author: David Brown <davidb@codeaurora.org>
    Date:   Wed Sep 12 16:01:40 2012 -0700

        ARM: msm: Move core.h contents into common.h

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
[davidb: Clarify commit text with mentioned commit]
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-05-31 08:38:58 -07:00