Commit Graph

66597 Commits

Author SHA1 Message Date
David S. Miller e0adb9902f sparc32: Add -Av8 to assembler command line.
Newer version of binutils are more strict about specifying the
correct options to enable certain classes of instructions.

The sparc32 build is done for v7 in order to support sun4c systems
which lack hardware integer multiply and divide instructions.

So we have to pass -Av8 when building the assembler routines that
use these instructions and get patched into the kernel when we find
out that we have a v8 capable cpu.

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-13 18:19:51 -07:00
Ryan Mallon a6de3df4f1 ep93xx: Remove unnecessary includes of ep93xx-regs.h
Remove the include of ep93xx-regs.h from files which no longer need
it, notably include/mach/hardware.h.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
2012-03-14 11:43:13 +11:00
Ryan Mallon 9aeec63e04 ep93xx: Move EP93XX_SYSCON defines to SoC private header
The EP93XX_SYSCON defines are now no longer needed outside of the
EP93xx SoC core code, so they can be moved to a private header.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
2012-03-14 11:43:11 +11:00
Ryan Mallon c444dc0765 ep93xx: Move crunch code to mach-ep93xx directory
The crunch code in arch/arm/kernel is specific to the EP93xx. Move it
to the mach-ep93xx directory. This removes the need for the
EP93XX_SYSCON defines to be exported to arch/arm/kernel.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
2012-03-14 11:43:10 +11:00
Ryan Mallon 999c53fb22 ep93xx: Make syscon access functions private to SoC
The syscon access functions are no longer used outside of the core
EP93xx code. Move their definitions into the SoC code.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
2012-03-14 11:43:06 +11:00
Ryan Mallon 08932d8196 ep93xx: Configure GPIO ports in core code
Move the pinmux setting of the EP93xx GPIOs to the core code. This
removes the need for the GPIO driver to have access to the system
controller registers.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
2012-03-14 11:42:30 +11:00
Ryan Mallon a05baf335b ep93xx: Move peripheral defines to local SoC header
Move the AHB/APB peripheral defines to local SoC header since they are
only needed by the core SoC code. The UART defines are not moved
because they are used by the mach/uncompress.h header.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2012-03-14 11:42:27 +11:00
H Hartley Sweeten 73303d1292 ep93xx: Convert the watchdog driver into a platform device.
Convert the ep93xx watchdog driver into a platform device and
remove it's dependency on <mach/hardware.h>.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2012-03-14 11:41:11 +11:00
Ryan Mallon 0fd1958050 ep93xx: Use ioremap for backlight driver
The ep93xx backlight driver uses a single register within the
framebuffer's register space. Currently the backlight driver uses a
static IO mapping for the register since the memory cannot be
requested by both drivers.

Convert the static mapping to use ioremap so that we can remove the
dependency on mach/hardware.h. To do so, we need remove the
request_mem_region from both the backlight and framebuffer drivers,
since whichever driver is loaded second will fail with -EBUSY
otherwise.

A proper fix is still required, and a FIXME comment has been added to
both drivers.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
2012-03-14 11:41:10 +11:00
Ryan Mallon 2ae18b471d ep93xx: Move GPIO defines to gpio-ep93xx.h
Move the GPIO related defines out of ep93xx-regs.h and into
gpio-ep93xx.h where they belong.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
2012-03-14 11:41:09 +11:00
Ryan Mallon f15855bfaa ep93xx: Don't use system controller defines in audio drivers
Both the Snapper CL15 and EDB93xx audio drivers set the same audio
configuration in ep93xx_i2s_acquire. Remove the arguments to
ep93xx_i2s_acquire so that the audio drivers no longer need the
EP93XX_SYSCON defines exported.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
2012-03-14 11:41:08 +11:00
Ryan Mallon 258249ec0e ep93xx: Move PHYS_BASE defines to local SoC header file
The PHYS_BASE defines in arch/arm/mach-ep93xx/include/mach-ep93xx-regs.h are
only used in the SoC code. Move the defines to a local header file.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
2012-03-14 11:41:02 +11:00
Olof Johansson ae0b82504e Merge branch 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/renesas into next/soc
* 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/renesas: (234 commits)
  ARM: shmobile: remove additional __io() macro use
  ARM: mach-shmobile: default to no earlytimer
  ARM: mach-shmobile: r8a7779 and Marzen timer rework
  ARM: mach-shmobile: r8a7740 and Bonito timer rework
  ARM: mach-shmobile: sh73a0, AG5EVM and Kota2 timer rework
  ARM: mach-shmobile: sh7372, AP4EVB and Mackerel timer rework
  ARM: mach-shmobile: sh7377 and G4EVM timer rework
  ARM: mach-shmobile: sh7367 and G3EVM timer rework
  ARM: mach-shmobile: add shmobile_earlytimer_init()
  ARM: mach-shmobile: Move sh7372 AP4EVB external clk setup
  ARM: mach-shmobile: Move sh7372 Mackerel external clk setup
  ARM: mach-shmobile: rename clk_init() to shmobile_clk_init()
  ARM: mach-shmobile: r8a7779 L2 cache support
  ARM: mach-shmobile: r8a7779 map_io and init_early update
  ARM: mach-shmobile: r8a7740 map_io and init_early update
  ARM: mach-shmobile: sh73a0 map_io and init_early update
  ARM: mach-shmobile: sh7372 map_io and init_early update
  ARM: mach-shmobile: sh7377 map_io and init_early update
  ARM: mach-shmobile: sh7367 map_io and init_early update
  sh: remove clk_ops
  ...

  (includes an update to v3.3-rc7)

Conflicts:
	arch/arm/mach-omap2/id.c
2012-03-13 17:38:09 -07:00
Linus Torvalds 69539ab100 Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Pull arch/tile update from Chris Metcalf
 "These include a couple of queued-up minor bug fixes from the
  community, a fix to unbreak the sysfs hooks in tile, and syncing up
  the defconfigs."

Ugh.  defconfigs updates without "make minconfig".  Tons of ugly
pointless lines there, I suspect.

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: Use set_current_blocked() and block_sigmask()
  arch/tile: misplaced parens near likely
  arch/tile: sync up the defconfig files to the tip
  arch/tile: Fix up from commit 8a25a2fd12
2012-03-13 17:06:02 -07:00
Arnd Bergmann a6e2401946 ARM: shmobile: remove additional __io() macro use
setup-r8a7779.c has grown a new user of the __io() macro. Rob Herring's
PIO cleanup series already gets rid of all other uses in shmobile, so
we should ensure that this one gets removed as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-14 01:05:42 +01:00
Linus Torvalds 0a49aecaf4 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar.

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf record: Fix buffer overrun bug in tracepoint_id_to_path()
  perf/x86: Fix local vs remote memory events for NHM/WSM
2012-03-13 17:04:50 -07:00
Olof Johansson 6307e41825 Merge branch 'next/devel-samsung-dma' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/drivers
* 'next/devel-samsung-dma' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: add support DMA for EXYNOS4X12 SoC
  ARM: EXYNOS: Add apb_pclk clkdev entry for mdma1
  ARM: EXYNOS: Enable MDMA driver
  (includes dependent base of samsung/cleanup-exynos-clock)
2012-03-13 16:22:20 -07:00
Olof Johansson f3d88244db Merge branch 'next/devel-samsung-mmc' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/drivers
* 'next/devel-samsung-mmc' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: SAMSUNG: change the name from s3c-sdhci to exynos4-sdhci
  mmc: sdhci-s3c: add platform data for the second capability
  ARM: SAMSUNG: support the second capability for samsung-soc
2012-03-13 16:20:12 -07:00
Olof Johansson c77ef89862 Merge branch 'next/board-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/boards
* 'next/board-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (32 commits)
  ARM: EXYNOS: support Exynos4210-bus Devfreq driver on Nuri board
  ARM: EXYNOS: Register JPEG on nuri
  ARM: EXYNOS: Register JPEG on universal_c210
  ARM: S5PV210: Enable JPEG on SMDKV210
  ARM: S5PV210: Add JPEG board definition
  ARM: EXYNOS: Enable JPEG on Origen
  ARM: EXYNOS: Enable JPEG on SMDKV310
  ARM: EXYNOS: Add __init attribute to universal_camera_init()
  ARM: EXYNOS: Add __init attribute to nuri_camera_init()
  ARM: S5PV210: Enable FIMC on SMDKC110
  ARM: S5PV210: Enable FIMC on SMDKV210
  ARM: S5PV210: Enable MFC on SMDKC110
  ARM: S5PV210: Enable MFC on SMDKV210
  ARM: EXYNOS: Enable G2D on SMDKV310
  ARM: S3C64XX: Supply platform data for SPI on Cragganmore
  ARM: S3C64XX: Add some more Cragganmore module IDs to the table
  ARM: EXYNOS: Add missing FIMC media device to Origen
  ARM: EXYNOS: Add missing FIMC media device to SMDKV310
  ARM: S5PV210: Add missing FIMC media device to Aquila
  ARM: SAMSUNG: Add support for S5K6AAFX camera on Nuri board
  ...
2012-03-13 16:10:35 -07:00
Fabio Estevam 5ec65ee589 ASoC: mx27vis-aic32x4: Convert it to platform driver
Convert mx27vis-aic32x4 to platform driver.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-13 23:09:59 +00:00
Olof Johansson e3643b77de Merge branch 'next/cleanup-exynos-clock' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup
* 'next/cleanup-exynos-clock' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: Add clock register addresses for EXYNOS4X12 bus devfreq driver
  ARM: EXYNOS: add clock registers for exynos4x12-cpufreq
  PM / devfreq: update the name of EXYNOS clock registers that were omitted
  PM / devfreq: update the name of EXYNOS clock register
  ARM: EXYNOS: change the prefix S5P_ to EXYNOS4_ for clock
  ARM: EXYNOS: use static declaration on regarding clock
  ARM: EXYNOS: replace clock.c for other new EXYNOS SoCs
  (includes an update to v3.3-rc6)
2012-03-13 16:08:06 -07:00
Olof Johansson 5353ec2cd1 Merge branch 'fix-smsc911x-regulator' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
From Tony Lindgren:

"Here's one more kernel panic fix that I dropped from last weeks
fixes as it was still being discussed.

This is a fix for the regression caused by fixing an earlier
regression for smsc911x fixed regulators :(

Turns out that we have more than one smsc911x on some boards,
and the earlier fix causes a kernel panic for board trying to
register second smsc911x instance, even if the second smsc911x
is on an add-on board that is not connected.

Note that the boards with second smsc911x will also need to be
patched later on to provide their own regulators."

* 'fix-smsc911x-regulator' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: gpmc-smsc911x: only register regulator for first instance
2012-03-13 15:49:00 -07:00
Matt Fleming ad09233835 tile: Use set_current_blocked() and block_sigmask()
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block
is pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f2
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate
code across architectures. In the past some architectures got this
code wrong, so using this helper function should stop that from
happening again.

Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-03-13 16:42:05 -04:00
Thomas Gleixner df8d291f28 Merge branch 'linus' into irq/core
Reason: Get upstream fixes integrated before further modifications.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-03-13 16:35:16 +01:00
Salman Qazi 9993bc635d sched/x86: Fix overflow in cyc2ns_offset
When a machine boots up, the TSC generally gets reset.  However,
when kexec is used to boot into a kernel, the TSC value would be
carried over from the previous kernel.  The computation of
cycns_offset in set_cyc2ns_scale is prone to an overflow, if the
machine has been up more than 208 days prior to the kexec.  The
overflow happens when we multiply *scale, even though there is
enough room to store the final answer.

We fix this issue by decomposing tsc_now into the quotient and
remainder of division by CYC2NS_SCALE_FACTOR and then performing
the multiplication separately on the two components.

Refactor code to share the calculation with the previous
fix in __cycles_2_ns().

Signed-off-by: Salman Qazi <sqazi@google.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Turner <pjt@google.com>
Cc: john stultz <johnstul@us.ibm.com>
Link: http://lkml.kernel.org/r/20120310004027.19291.88460.stgit@dungbeetle.mtv.corp.google.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-03-13 16:27:51 +01:00
Ingo Molnar 47258cf3c4 Linux 3.3-rc7
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPW8yUAAoJEHm+PkMAQRiGhFIH/RGUPxGmUkJv8EP5I4HDA4dJ
 c6/PrzZCHs8rxzYzvn7ojXqZGXTOAA5ZgS9A6LkJ2sxMFvgMnkpFi6B4CwMzizS3
 vLWo/HNxbiTCNGFfQrhQB8O58uNI8wOBa87lrQfkXkDqN0cFhdjtIxeY1BD9LXIo
 qbWysGxCcZhJWHapsQ3NZaVJQnIK5vA/+mhyYP4HzbcHI3aWnbIEZ8GQKeY28Ch0
 +pct5UQBjZavV5SujaW0Xd65oIiycm8XHAQw6FxQy//DfaabauWgFteR162Q/oew
 xxUBDOHF3nO1bdteHHaYqxig0j1MbIHsqxTnE/neR8UryF04//1SFF7DYuY/1pg=
 =SV5V
 -----END PGP SIGNATURE-----

Merge tag 'v3.3-rc7' into sched/core

Merge reason: merge back final fixes, prepare for the merge window.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-03-13 16:26:52 +01:00
Michael Holzheu c6da39f26c [S390] kernel: Pass correct stack for smp_call_ipl_cpu()
Currently pcpu_devices->panic_stack is passed to pcpu_delegate() in
smp_call_ipl_cpu(). This is wrong because pcpu_delegate() expects
the bottom (high address) of the stack and pcpu_devices->panic_stack
points to the top (low address). We now pass the bottom of the stack
which is pcpu_devices->panic_stack + PAGE_SIZE.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-13 11:26:23 -04:00
Marc Zyngier d45785929f ARM: local timers: make the runtime registration interface mandatory
Remove all traces of the compile-time local timer interface,
and make the runtime selection mandatory.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:45:55 +00:00
Marc Zyngier 5ca709c16d ARM: local timers: convert MSM to runtime registration interface
Convert the MSM timers to the runtime registration interface.

Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: David Brown <davidb@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:45:55 +00:00
Marc Zyngier a8cb6041d0 ARM: local timers: convert exynos to runtime registration interface
Convert the Exynos MCT timers to the runtime registration interface.
Tested on Origen.

Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:45:54 +00:00
Marc Zyngier 9248510469 ARM: smp_twd: remove old local timer interface
Now that all users of the previous local timer interface
have been converted to the runtime registration API, make
this interface the only one supported for this driver.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:45:54 +00:00
Marc Zyngier 58458e0327 ARM: imx6q: convert to twd_local_timer_register() interface
Add support for the new smp_twd runtime registration interface
to the imx6q platforms, and remove the old compile-time support.

The imx6q DTS file is updated to match the TWD DT documentation.
Also present in this patch a DTS fix to the timer interrupt routing
(the PPI connection uses bits [15:8]) and trigger (rising edge).

Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:45:53 +00:00
Marc Zyngier 7ac9b9eb33 ARM: highbank: convert to twd_local_timer_register() interface
Add support for the new smp_twd runtime registration interface
to the highbank platforms, and remove the old compile-time support.

The highbank DTS file is updated to match the TWD DT documentation
and fixes the timer trigger (rising edge).

Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:45:52 +00:00
Marc Zyngier 08efd6ca6f ARM: ux500: convert to twd_local_timer_register() interface
Add support for the new smp_twd runtime registration interface
to the ux500 platforms, and remove the old compile-time support.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:45:33 +00:00
Marc Zyngier 4200b16d58 ARM: shmobile: convert to twd_local_timer_register() interface
Add support for the new smp_twd runtime registration interface
to the shmobile platforms, and remove the old compile-time support.

Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:30:31 +00:00
Marc Zyngier 1fcf3a6edd ARM: tegra: convert to twd_local_timer_register() interface
Add support for the new smp_twd runtime registration interface
to the tegra platforms, and remove the old compile-time support.
Tested on Harmony.

Acked-by: Stephen Warren <swarren@nvidia.com>
Cc: Colin Cross <ccross@android.com>
Cc: Olof Johansson <olof@lixom.net>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:30:30 +00:00
Marc Zyngier 7c380f273c ARM: plat-versatile: convert to twd_local_timer_register() interface
Add support for the new smp_twd runtime registration interface
to the RealView/VE platforms, and remove the old compile-time support.
Tested on EB11MP.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:29:58 +00:00
Marc Zyngier a45c983f85 ARM: OMAP4: convert to twd_local_timer_register() interface
Add support for the new smp_twd runtime registration interface
to the OMAP4 platforms, and remove the old compile-time support.
Tested on Panda.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:27:52 +00:00
Marc Zyngier d8e0364364 ARM: smp_twd: add device tree support
Add bindings to support DT discovery of the ARM Timer Watchdog
(aka TWD). Only the timer side is converted by this patch.

Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:27:51 +00:00
Marc Zyngier 81e46f7b6d ARM: smp_twd: add runtime registration support
Add support for the new registration interface to smp_twd.
Platforms can populate a struct twd_local_timer with MMIO
and IRQ resources, and then call twd_local_timer_register()
to have the timer registered with the core.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:27:50 +00:00
Marc Zyngier 0ef330e10d ARM: local timers: introduce a new registration interface
In order to switch to a runtime selectable local timer,
add a registration interface that timer drivers can use to
register to the core.

local_timer_setup() and local_timer_stop() are made weak symbols
in order not to break existing setups.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:27:50 +00:00
Marc Zyngier abde710ca8 ARM: smp_twd: make local_timer_stop a symbol instead of a #define
When CONFIG_HAVE_ARM_TWD is selected, local_timer_stop is a #define,
while all other local timers are using a real function.

Convert it to an alias of twd_timer_stop, as it helps converting
all local timers to another internal API in a sane way.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-03-13 13:27:49 +00:00
Mehnert 1dde9f75b6 iomux-mx25.h slew rate adjusted for LCD __LD pins
For some reason (sadly i don't identifying the patch right now)
two LCD data lines configured PAD_CTL_SRE_SLOW (wrong slew rate)
since Kernel 3.1. MX25_PAD_GPIO_E__LD16 and MX25_PAD_GPIO_F__LD17
This results in an fauly behaviour and strange color effects.

To ensure that all LCD data pins configured with the proper slew rate,
this patch changes to IOMUX define of all LCD __LDxx pins to PAD_CTL_SRE_FAST.

This problem may affect other mx25 platforms like mx25pdk. Sadly i can't test
it. Of course this problem shouldn't occur when you done your LCD muxing
correctly in the bootloader.

Best regards,
Torsten

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-13 13:57:07 +01:00
Arnd Bergmann a2821146e6 Merge branch 'vexpress/timer' into next/timer
* vexpress/timer:
  ARM: versatile: Map local timers using Device Tree when possible
  ARM: vexpress: Get rid of MMIO_P2V
2012-03-13 11:53:09 +00:00
Arnd Bergmann 69adb983ce Merge branch 'ux500/timers' into next/timer
* ux500/timers:
  ARM: plat-nomadik: modernize MTU timer
  ARM: plat-nomadik: handle clocking properly
  ARM: plat-nomadik: get rid of global mtu base pointer
2012-03-13 11:52:58 +00:00
Linus Torvalds 212ad2f5f9 SuperH fixes for 3.3-rc.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAk9dltgACgkQGkmNcg7/o7joMQCgnQlwX1MKLNvKtvxvzz7biF48
 aigAoLELf2MGKHFs/yMilS/NMZTJR3Pd
 =ttKa
 -----END PGP SIGNATURE-----

Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh

Pull SuperH fixes from Paul Mundt.

* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
  sh-sci / PM: Avoid deadlocking runtime PM
  sh: fix up the ubc clock definition for sh7785.
  sh: add parameter for RSPI in clock-sh7757
  sh: Fix sh2a vbr table for more than 255 irqs
2012-03-12 22:50:20 -07:00
Linus Torvalds a10a854365 SH/R-Mobile fixes for 3.3-rc.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAk9dlvwACgkQGkmNcg7/o7jooQCgyKYhMoe5mACOy0jI1temge8S
 inUAnRUWKbqKC8c7HDUV5GzbCeps0ccI
 =5hsb
 -----END PGP SIGNATURE-----

Merge tag 'rmobile-for-linus' of git://github.com/pmundt/linux-sh

Pull SH/R-Mobile fixes from Paul Mundt.

* tag 'rmobile-for-linus' of git://github.com/pmundt/linux-sh:
  ARM: mach-shmobile: ap4evb: fixup fsi2_ak4643_info typo
  ARM: mach-shmobile: mackerel: Reserve DMA memory for the frame buffer
  ARM: mach-shmobile: Fix ag5evm compilation by including linux/videodev2.h
  ARM: mach-shmobile: Fix bonito compile breakage
2012-03-12 22:47:20 -07:00
Suresh Siddha 73d63d038e x86/ioapic: Add register level checks to detect bogus io-apic entries
With the recent changes to clear_IO_APIC_pin() which tries to
clear remoteIRR bit explicitly, some of the users started to see
"Unable to reset IRR for apic .." messages.

Close look shows that these are related to bogus IO-APIC entries
which return's all 1's for their io-apic registers. And the
above mentioned error messages are benign. But kernel should
have ignored such io-apic's in the first place.

Check if register 0, 1, 2 of the listed io-apic are all 1's and
ignore such io-apic.

Reported-by: Álvaro Castillo <midgoon@gmail.com>
Tested-by: Jon Dufresne <jon@jondufresne.org>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: yinghai@kernel.org
Cc: kernel-team@fedoraproject.org
Cc: Josh Boyer <jwboyer@redhat.com>
Cc: <stable@kernel.org>
Link: http://lkml.kernel.org/r/1331577393.31585.94.camel@sbsiddha-desk.sc.intel.com
[ Performed minor cleanup of affected code. ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-03-13 05:52:02 +01:00
Benjamin Herrenschmidt aba0eb84c8 Merge branch 'eeh' into next 2012-03-13 10:15:35 +11:00
Linus Walleij 51dddfe839 ARM: u300: configure some pins as an example
To show how the pin configuration is used on the U300, let's
include some configs for two GPIO pins.

ChangeLog v1->v2:
- Provide a better example, set the clock return pin to pull-up
  and set the card detect pin to high impedance.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-03-12 22:49:03 +01:00
Laurent Pinchart c241a0e0c2 arm: mach-shmobile: Constify sh_mobile_meram_cfg structures
The structures, passed to the sh_mobile_lcdcfb driver through platform
data, are read only by the driver. Make them const.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:41:13 +01:00
Laurent Pinchart b0a49d98fa arm: mach-shmobile: Don't set MERAM ICB numbers in platform data
The marker and cache ICBs are now allocated automatically, there's no
need to specify them manually anymore.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:41:11 +01:00
Laurent Pinchart 974d250be2 fbdev: sh_mobile_meram: Use genalloc to manage MERAM allocation
Instead of requiring the users to hardcode MERAM allocation in platform
data, allocate blocks at runtime using genalloc.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:41:10 +01:00
Laurent Pinchart e71504d579 arm: mach-shmobile: Split MERAM resources into regs and meram
The MERAM resource currently combines both the registers space and the
MERAM space. Only the register space needs to be ioremapped, split the
resource to make that possible.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:41:07 +01:00
Laurent Pinchart 93ff259846 fbdev: sh_mobile_lcdc: Rename (lcd|num)_cfg (lcd|num)_modes
The struct sh_mobile_lcdc_chan_cfg platform data contains a list of
video modes. Name the lcd_cfg and num_cfg fields to reflect that they
describe video modes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:40:55 +01:00
Laurent Pinchart afaad83b9c fbdev: sh_mobile_lcdc: Merge board_cfg and lcd_size_cfg into panel_cfg
Update board code accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:40:50 +01:00
Laurent Pinchart 43059b0f46 fbdev: sh_mobile_lcdc: Move brightness ops to sh_mobile_lcdc_bl_info
Update board code accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:40:49 +01:00
Laurent Pinchart 018882aa66 fbdev: sh_mobile_lcdc: Remove board configuration board_data field
The field is unused, remove it. Update board code accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:40:49 +01:00
Laurent Pinchart e2543c5ab2 arm: mach-shmobile: Don't initialize the hdmi_info lcd_chan field
The field is unused and will be removed. Don't initialize it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:40:47 +01:00
Laurent Pinchart a1022adbdf arm: mach-shmobile: Add LCDC tx_dev field to platform data
Make sure the transmitter devices get registered before the associated
LCDC devices.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:40:46 +01:00
Laurent Pinchart 134d22eb58 sh_mobile_hdmi: Remove platform data lcd_dev field
The field is used to print debug messages only. Remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-03-12 22:40:44 +01:00
Magnus Damm 2854903ad1 ARM: mach-shmobile: default to no earlytimer
Now when all SoCs and boards are converted to use
shmobile_earlytimer_init(), change the default behavior
of shmobile_timer.init() from using early timer to
do nothing which is suitable for upcoming DT support.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:46 +01:00
Magnus Damm df27a2d8f1 ARM: mach-shmobile: r8a7779 and Marzen timer rework
Move the SoC specific timer code from Marzen board code
to r8a7779 setup code. This makes is possible to share
the SoC specific timer code across boards and it also
removes the need for a board specific timer structure.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:46 +01:00
Magnus Damm 23e5bc03e3 ARM: mach-shmobile: r8a7740 and Bonito timer rework
Copy the SoC specific timer code from Bonito board code
to r8a7740 setup code. This makes is possible to share
the SoC specific timer code across boards. The Bonito
specific timer setup code tied to the FPGA is kept as-is.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:45 +01:00
Magnus Damm 3be26fdba8 ARM: mach-shmobile: sh73a0, AG5EVM and Kota2 timer rework
Move the SoC specific timer code from AG5EVM and Kota2
to sh73a0 setup code. This makes is possible to share
the SoC specific timer code across boards and it also
removes the need for a board specific timer structure.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:45 +01:00
Magnus Damm 17254bffd6 ARM: mach-shmobile: sh7372, AP4EVB and Mackerel timer rework
Move the SoC specific timer code from AP4EVB and Mackerel
to sh7372 setup code. This makes is possible to share
the SoC specific timer code across boards and it also
removes the need for a board specific timer structure.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:45 +01:00
Magnus Damm 03f7beeff4 ARM: mach-shmobile: sh7377 and G4EVM timer rework
Move the SoC specific timer code from G4EVM board code
to sh7377 setup code. This makes is possible to share
the SoC specific timer code across boards and it also
removes the need for a board specific timer structure.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:44 +01:00
Magnus Damm 9e8de440da ARM: mach-shmobile: sh7367 and G3EVM timer rework
Move the SoC specific timer code from G3EVM board code
to sh7367 setup code. This makes is possible to share
the SoC specific timer code across boards and it also
removes the need for a board specific timer structure.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:44 +01:00
Magnus Damm 08ad42fb77 ARM: mach-shmobile: add shmobile_earlytimer_init()
Add shmobile_earlytimer_init() that can be used to
enable the earlytimer probing from the SoC code.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:44 +01:00
Magnus Damm e3b0161b3c ARM: mach-shmobile: Move sh7372 AP4EVB external clk setup
Move the board specific external clock setting for sh7372 AP4EVB
from machine_desc->sys_timer->init() to machine_desc->init_machine().

This is ground work for shmobile timer code consolidation.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:43 +01:00
Magnus Damm 12bb16d230 ARM: mach-shmobile: Move sh7372 Mackerel external clk setup
Move the board specific external clock setting for sh7372 Mackerel
from machine_desc->sys_timer->init() to machine_desc->init_machine().

This is ground work for shmobile timer code consolidation.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:43 +01:00
Magnus Damm 6b6a4c067c ARM: mach-shmobile: rename clk_init() to shmobile_clk_init()
Rename clk_init() to shmobile_clk_init() to avoid a potential
future name space collision with the common clock framework.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:43 +01:00
Magnus Damm 8bac13f591 ARM: mach-shmobile: r8a7779 L2 cache support
L2 Cache support for r8a7779. Settings taken from
out-of-tree kernel patches by Kouei Abe.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:42 +01:00
Magnus Damm 3e353b875b ARM: mach-shmobile: r8a7779 map_io and init_early update
Update the r8a7779 SoC and the Marzen board to make use of
the functions r8a7779_map_io() and r8a7779_add_early_devices().

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:42 +01:00
Magnus Damm d3ab722148 ARM: mach-shmobile: r8a7740 map_io and init_early update
Update the r8a7740 SoC and the Bonito board to make use of
the functions r8a7740_map_io() and r8a7740_add_early_devices().

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:42 +01:00
Magnus Damm 50e15c34f0 ARM: mach-shmobile: sh73a0 map_io and init_early update
Update the sh73a0 SoC and the AG5EVM and Kota2 boards to make use
of the functions sh73a0_map_io() and sh73a0_add_early_devices().

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:41 +01:00
Magnus Damm 5d7220ec00 ARM: mach-shmobile: sh7372 map_io and init_early update
Update the sh7372 SoC and the AP4EVB and Mackerel boards to make use
of the functions sh7372_map_io() and sh7372_add_early_devices().

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:41 +01:00
Magnus Damm bfc46f3ef8 ARM: mach-shmobile: sh7377 map_io and init_early update
Update the sh7377 SoC and the G4EVM board to make use of the
functions sh7377_map_io() and sh7377_add_early_devices().

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:41 +01:00
Magnus Damm 237caf9e6b ARM: mach-shmobile: sh7367 map_io and init_early update
Update the sh7367 SoC and the G3EVM board to make use of the
functions sh7367_map_io() and sh7367_add_early_devices().

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:40 +01:00
Magnus Damm c953efdbb1 sh: board sh_clk_ops rename
Convert remaining sh board code to use sh_clk_ops.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:12 +01:00
Magnus Damm 2e679b0b7a sh: sh5 sh_clk_ops rename
Convert sh5 to use sh_clk_ops.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:12 +01:00
Magnus Damm 33cb61a400 sh: sh4a sh_clk_ops rename
Convert sh4a SoCs to use sh_clk_ops.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:12 +01:00
Magnus Damm 3b8744156d sh: sh4 sh_clk_ops rename
Convert sh4 SoCs to use sh_clk_ops.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:11 +01:00
Magnus Damm 43ebacd00a sh: sh3 sh_clk_ops rename
Convert sh3 SoCs to use sh_clk_ops.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:11 +01:00
Magnus Damm 4ad2c06155 sh: sh2a sh_clk_ops rename
Convert sh2a SoCs to use sh_clk_ops.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:11 +01:00
Magnus Damm 71984236d6 sh: sh2 sh_clk_ops rename
Convert sh2 to use sh_clk_ops.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:10 +01:00
Magnus Damm d6ef333b62 sh: sh header sh_clk_ops rename
Convert the sh include asm/clock.h to use sh_clk_ops.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:10 +01:00
Magnus Damm ae8d194902 ARM: mach-shmobile: r8a7779 sh_clk_ops rename
Convert r8a7779 to use sh_clk_ops.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:10 +01:00
Magnus Damm d9f8670df8 ARM: mach-shmobile: r8a7740 sh_clk_ops rename
Convert r8a7740 to use sh_clk_ops.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:09 +01:00
Magnus Damm 7bcda508bf ARM: mach-shmobile: sh73a0 sh_clk_ops rename
Convert sh73a0 to use sh_clk_ops.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:09 +01:00
Magnus Damm 628f4561ce ARM: mach-shmobile: sh7372 sh_clk_ops rename
Convert sh7372 to use sh_clk_ops.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:09 +01:00
Magnus Damm 9c8c7abc25 ARM: mach-shmobile: sh7377 sh_clk_ops rename
Convert sh7377 to use sh_clk_ops.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:08 +01:00
Magnus Damm 79ff312103 ARM: mach-shmobile: sh7367 sh_clk_ops rename
Convert sh7367 to use sh_clk_ops.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-12 22:19:07 +01:00
Uwe Kleine-König 30c766bdec ARM: davinci: DA850: move da850_register_pm to .init.text
All callers (board-mityomapl138.c and board-da850-evm.c) use it in
__init functions only.

This fixes:

	WARNING: vmlinux.o(.text+0xd664): Section mismatch in reference from the function da850_register_pm() to the function .init.text:da8xx_get_mem_ctlr()
	The function da850_register_pm() references
	the function __init da8xx_get_mem_ctlr().
	This is often because da850_register_pm lacks a __init
	annotation or the annotation of da8xx_get_mem_ctlr is wrong.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2012-03-13 02:11:33 +05:30
Uwe Kleine-König d870df6827 ARM: davinci: cpufreq: fix compiler warning
This fixes:
	arch/arm/mach-davinci/cpufreq.c: In function davinci_target:
	arch/arm/mach-davinci/cpufreq.c:98: warning: passing argument 2 of dev_printk from incompatible pointer type

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2012-03-13 01:24:14 +05:30
Ingo Molnar bea95c152d Merge branch 'perf/hw-branch-sampling' into perf/core
Merge reason: The 'perf record -b' hardware branch sampling feature is ready for upstream.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-03-12 20:47:05 +01:00
Peter Zijlstra f9b4eeb809 perf/x86: Prettify pmu config literals
I got somewhat tired of having to decode hex numbers..

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Stephane Eranian <eranian@google.com>
Cc: Robert Richter <robert.richter@amd.com>
Link: http://lkml.kernel.org/n/tip-0vsy1sgywc4uar3mu1szm0rg@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-03-12 20:44:54 +01:00
Ingo Molnar 35239e23c6 Merge branch 'perf/urgent' into perf/core
Merge reason: We are going to queue up a dependent patch.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-03-12 20:44:11 +01:00
Peter Zijlstra 87e24f4b67 perf/x86: Fix local vs remote memory events for NHM/WSM
Verified using the below proglet.. before:

[root@westmere ~]# perf stat -e node-stores -e node-store-misses ./numa 0
remote write

 Performance counter stats for './numa 0':

         2,101,554 node-stores
         2,096,931 node-store-misses

       5.021546079 seconds time elapsed

[root@westmere ~]# perf stat -e node-stores -e node-store-misses ./numa 1
local write

 Performance counter stats for './numa 1':

           501,137 node-stores
               199 node-store-misses

       5.124451068 seconds time elapsed

After:

[root@westmere ~]# perf stat -e node-stores -e node-store-misses ./numa 0
remote write

 Performance counter stats for './numa 0':

         2,107,516 node-stores
         2,097,187 node-store-misses

       5.012755149 seconds time elapsed

[root@westmere ~]# perf stat -e node-stores -e node-store-misses ./numa 1
local write

 Performance counter stats for './numa 1':

         2,063,355 node-stores
               165 node-store-misses

       5.082091494 seconds time elapsed

#define _GNU_SOURCE

#include <sched.h>
#include <stdio.h>
#include <errno.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <dirent.h>
#include <signal.h>
#include <unistd.h>
#include <numaif.h>
#include <stdlib.h>

#define SIZE (32*1024*1024)

volatile int done;

void sig_done(int sig)
{
	done = 1;
}

int main(int argc, char **argv)
{
	cpu_set_t *mask, *mask2;
	size_t size;
	int i, err, t;
	int nrcpus = 1024;
	char *mem;
	unsigned long nodemask = 0x01; /* node 0 */
	DIR *node;
	struct dirent *de;
	int read = 0;
	int local = 0;

	if (argc < 2) {
		printf("usage: %s [0-3]\n", argv[0]);
		printf("  bit0 - local/remote\n");
		printf("  bit1 - read/write\n");
		exit(0);
	}

	switch (atoi(argv[1])) {
	case 0:
		printf("remote write\n");
		break;
	case 1:
		printf("local write\n");
		local = 1;
		break;
	case 2:
		printf("remote read\n");
		read = 1;
		break;
	case 3:
		printf("local read\n");
		local = 1;
		read = 1;
		break;
	}

	mask = CPU_ALLOC(nrcpus);
	size = CPU_ALLOC_SIZE(nrcpus);
	CPU_ZERO_S(size, mask);

	node = opendir("/sys/devices/system/node/node0/");
	if (!node)
		perror("opendir");
	while ((de = readdir(node))) {
		int cpu;

		if (sscanf(de->d_name, "cpu%d", &cpu) == 1)
			CPU_SET_S(cpu, size, mask);
	}
	closedir(node);

	mask2 = CPU_ALLOC(nrcpus);
	CPU_ZERO_S(size, mask2);
	for (i = 0; i < size; i++)
		CPU_SET_S(i, size, mask2);
	CPU_XOR_S(size, mask2, mask2, mask); // invert

	if (!local)
		mask = mask2;

	err = sched_setaffinity(0, size, mask);
	if (err)
		perror("sched_setaffinity");

	mem = mmap(0, SIZE, PROT_READ|PROT_WRITE,
			MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
	err = mbind(mem, SIZE, MPOL_BIND, &nodemask, 8*sizeof(nodemask), MPOL_MF_MOVE);
	if (err)
		perror("mbind");

	signal(SIGALRM, sig_done);
	alarm(5);

	if (!read) {
		while (!done) {
			for (i = 0; i < SIZE; i++)
				mem[i] = 0x01;
		}
	} else {
		while (!done) {
			for (i = 0; i < SIZE; i++)
				t += *(volatile char *)(mem + i);
		}
	}

	return 0;
}

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: <stable@kernel.org>
Link: http://lkml.kernel.org/n/tip-tq73sxus35xmqpojf7ootxgs@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-03-12 20:43:41 +01:00
Peter Zijlstra 5fbd036b55 sched: Cleanup cpu_active madness
Stepan found:

CPU0		CPUn

_cpu_up()
  __cpu_up()

		boostrap()
		  notify_cpu_starting()
		  set_cpu_online()
		  while (!cpu_active())
		    cpu_relax()

<PREEMPT-out>

smp_call_function(.wait=1)
  /* we find cpu_online() is true */
  arch_send_call_function_ipi_mask()

  /* wait-forever-more */

<PREEMPT-in>
		  local_irq_enable()

  cpu_notify(CPU_ONLINE)
    sched_cpu_active()
      set_cpu_active()

Now the purpose of cpu_active is mostly with bringing down a cpu, where
we mark it !active to avoid the load-balancer from moving tasks to it
while we tear down the cpu. This is required because we only update the
sched_domain tree after we brought the cpu-down. And this is needed so
that some tasks can still run while we bring it down, we just don't want
new tasks to appear.

On cpu-up however the sched_domain tree doesn't yet include the new cpu,
so its invisible to the load-balancer, regardless of the active state.
So instead of setting the active state after we boot the new cpu (and
consequently having to wait for it before enabling interrupts) set the
cpu active before we set it online and avoid the whole mess.

Reported-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1323965362.18942.71.camel@twins
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-03-12 20:43:15 +01:00
roel cf8c1dafe1 arch/tile: misplaced parens near likely
Parentheses were missing.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-03-12 15:32:18 -04:00
Chris Metcalf 7ed725cf5d arch/tile: sync up the defconfig files to the tip
This was inspired by mchehab@redhat.com's observation that we
didn't have EDAC configured on by default in both files.  In addition,
we were setting INITRAMFS_SOURCE to a non-empty string, which isn't
a very common default and required editing to do test builds.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-03-12 15:32:12 -04:00
Chris Metcalf 688b4db0d9 arch/tile: Fix up from commit 8a25a2fd12
This was Kay Siever's bombing to convert 'cpu' to a regular subsystem.
The change left a bogus second argument to sysfs_create_file().

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-03-12 15:31:37 -04:00
Greg Kroah-Hartman f7a0d426f3 Merge 3.3-rc7 into usb-next
This resolves the conflict with drivers/usb/host/ehci-fsl.h that
happened with changes in Linus's and this branch at the same time.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-12 09:13:31 -07:00
Peter Ujfalusi 3ead4679e5 ARM: OMAP: Remove CONFIG_OMAP_MCBSP references
The McBSP driver stack has been moved to ASoC. The CONFIG_OMAP_MCBSP will
be removed since the CONFIG_SND_OMAP_SOC_MCBSP will trigger to build the
McBSP (audio) drivers.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:24 +00:00
Peter Ujfalusi 33cec39904 ARM/ASoC: OMAP McBSP: Move remainig defines from arch to ASoC header
Clock signal muxing, and functional clock related defines are only needed
in ASoC drivers.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Mark Brown <broonoie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:23 +00:00
Peter Ujfalusi 40c0764b18 ARM: OMAP2+: McBSP: Correct CLKR/FSR clock source mux configuration
On OMAP2/3 McBSP1 port has 6 pin setup, while on OMAP4 the port is McBSP4.
Implement the CLKR/FSR clock mux selection for OMAP4, and make sure that
we add the correct callback for the correct port across supported OMAP
versions.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:23 +00:00
Peter Ujfalusi 20456242e8 ARM: OMAP: Do not register omap-mcbsp-dai device
The driver for omap-mcbsp-dai no longer exist since it has been merged with
the omap-mcbsp driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:20 +00:00
Peter Ujfalusi 45656b44f6 ASoC: omap-mcbsp: Create a single driver for McBSP
The OMAP McBSP driver stack used to contain two different
drivers. One of them was used as kind low-level access to
the IP, while the other driver was the ASoC DAI driver.
There were global, shared structures, in different places,
the McBSP instances are reffered with id numbers (sometimes
0 based, in other cases 1 based id numbers).

Create one single driver for OMAP McBSP with name: omap-mcbsp.
Convert the old omap-mcbsp driver initially to be a library
for the omap-mcbsp DAI driver. With this change we can get rid
of all global variables, structures.

Further cleanup is coming...

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:19 +00:00
Peter Ujfalusi 219f43164e ASoC: OMAP: McBSP: Consolidate plat/mcbsp.h content
Move most of the content of the plat/mcbsp.h header file under
sound/soc/omap/ to help further cleanups.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:19 +00:00
Peter Ujfalusi 71e822e9dc OMAP: mcbsp: Move core driver under sound/soc/omap
In order to consolidate the McBSP driver move it out from
arch/arm/plat-omap directory under sound/soc/omap/

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:19 +00:00
Peter Ujfalusi 0210dc4eaf ARM: OMAP: mcbsp: Convert core driver to proper platform driver
Convert the plat-omap/mcbsp.c driver to be proper platform driver.
Remove the omap_mcbsp_init function call which was called from
mach-omap1/2/mcbsp.c to register the platform driver for the just
created platform device in the same function.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:19 +00:00
Peter Ujfalusi 0324e02a07 OMAP4: panda: Correct cpu version check for 4430
The cpu_is_omap4430() macro always return with 0. Use the correct
cpu_is_omap443x() to check for Panda revision.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12 13:34:19 +00:00
Michael Holzheu f5bfa159d2 [S390] Ensure that vmcore_info pointer is never accessed directly
Because the vmcore_info pointer is not 8 byte aligned it never should
not be accessed directly. The reason is that the compiler assumes that
64 bit pointer are always double word aligned. To ensure save access,
the vmcore_info type in struct lowcore is changed from u64 to an u8[8]
array and a comment is added.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-11 11:59:30 -04:00
Heiko Carstens ddadfa8d27 [S390] stack dump: fix indentation in output
The first line of a stack dump has a wrong (no) indentation.
Just fix this after more than 10 years.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-11 11:59:29 -04:00
Michael Holzheu 4857d4bbe9 [S390] kernel: Add OS info memory interface
In order to allow kdump based stand-alone dump, some information
has to be passed from the old kernel to the new dump kernel. This
is done via a the struct "os_info" that contains the following fields:
 * crashkernel base and size
 * reipl block
 * vmcoreinfo
 * init function
A pointer to os_info is stored at a well known storage location
and the whole structure as well as all fields are secured with
checksums.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-11 11:59:29 -04:00
Matt Fleming ad252ffa2a [S390] Use block_sigmask()
Use the new helper function introduced in commit 5e6292c0f2
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate
code across architectures.

In the past some architectures got this code wrong, so using this
helper function should stop that from happening again.

Cc: Oleg Nesterov <oleg@redhat.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: linux-s390@vger.kernel.org
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-11 11:59:29 -04:00
Michael Holzheu 3ab121ab18 [S390] kernel: Add z/VM LGR detection
Currently the following mechanisms are available to move active
Linux on System z instances between machines:
* z/VM 6.2 SSI (Single System Image)
* Suspend/resume
For moving Linux instances in this patch the term LGR (Linux Guest
Relocation) is used. Because such an operation is critical, it
should be detectable from Linux. With this patch for both, a live
system and a kernel dump, the information about LGRs is accessible.
To identify a guest, stsi and stfle data is used. A new function
lgr_info_log() compares the current data (lgr_info_cur) with the
last recorded one (lgr_info_last). In case the two data sets differ,
lgr_info_cur is logged to the "lgr" s390dbf.

The following trigger points call lgr_info_log():
* panic
* die
* kdump
* LGR timer
* PSW restart
* QDIO recovery
* resume

This patch also changes the s390dbf hex_ascii view. Now only printable ASCII
characters are shown.

Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-11 11:59:29 -04:00
Heiko Carstens fde15c3a3a [S390] irq: external interrupt code passing
The external interrupt handlers have a parameter called ext_int_code.
Besides the name this paramter does not only contain the ext_int_code
but in addition also the "cpu address" (POP) which caused the external
interrupt.
To make the code a bit more obvious pass a struct instead so the called
function can easily distinguish between external interrupt code and
cpu address. The cpu address field however is named "subcode" since
some external interrupt sources do not pass a cpu address but a
different parameter (or none at all).

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-11 11:59:29 -04:00
Heiko Carstens 2215011dd9 [S390] irq: set __ARCH_IRQ_EXIT_IRQS_DISABLED
Set __ARCH_IRQ_EXIT_IRQS_DISABLED in order to optimize irq_exit() a
bit, since we call __do_softirq() instead of do_softirq().
This saves several needless checks, pointless interrupt disabling
and an extra branch.
If do_softirq() gets called from process context we still switch to
the async stack.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-11 11:59:28 -04:00
Michael Holzheu b43445ff6c [S390] Use copy_to_absolute_zero() instead of "stura/sturg"
Use the new copy_to_absolute_zero() function instead of manual "stura"
and "sturg" to make the code shorter and more readable.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-11 11:59:28 -04:00
Martin Schwidefsky 4c1051e37a [S390] rework idle code
Whenever the cpu loads an enabled wait PSW it will appear as idle to the
underlying host system. The code in default_idle calls vtime_stop_cpu
which does the necessary voodoo to get the cpu time accounting right.
The udelay code just loads an enabled wait PSW. To correct this rework
the vtime_stop_cpu/vtime_start_cpu logic and move the difficult parts
to entry[64].S, vtime_stop_cpu can now be called from anywhere and
vtime_start_cpu is gone. The correction of the cpu time during wakeup
from an enabled wait PSW is done with a critical section in entry[64].S.
As vtime_start_cpu is gone, s390_idle_check can be removed as well.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-11 11:59:28 -04:00
Martin Schwidefsky 8b646bd759 [S390] rework smp code
Define struct pcpu and merge some of the NR_CPUS arrays into it, including
__cpu_logical_map, current_set and smp_cpu_state. Split smp related
functions to those operating on physical cpus and the functions operating
on a logical cpu number. Make the functions for physical cpus use a
pointer to a struct pcpu. This hides the knowledge about cpu addresses in
smp.c, entry[64].S and swsusp_asm64.S, thus remove the sigp.h header.

The PSW restart mechanism is used to start secondary cpus, calling a
function on an online cpu, calling a function on the ipl cpu, and for
the nmi signal. Replace the different assembler functions with a
single function restart_int_handler. The new entry point calls a function
whose pointer is stored in the lowcore of the target cpu and it can wait
for the source cpu to stop. This covers all existing use cases.

Overall the code is now simpler and there are ~380 lines less code.

Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-11 11:59:28 -04:00
Martin Schwidefsky 7e180bd802 [S390] rename lowcore field
The 16 bit value at the lowcore location with offset 0x84 is the
cpu address that is associated with an external interrupt. Rename
the field from cpu_addr to ext_cpu_addr to make that clear.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-11 11:59:27 -04:00
Michael Holzheu 4fdf7f432c [S390] Fix gcc 4.6.0 compile warning
With gcc 4.6.0 we get a false compile warning:

 arch/s390/kernel/setup.c: In function 'setup_arch':
 arch/s390/kernel/setup.c:767:3: warning: 'msg' may be used
            uninitialized in this function [-Wuninitialized]
 arch/s390/kernel/setup.c:753:8: note: 'msg' was declared here

This patch makes gcc quiet.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-11 11:59:27 -04:00
Jaehoon Chung f5cca86448 ARM: SAMSUNG: change the name from s3c-sdhci to exynos4-sdhci
Thomas Arbrahams's patchset have changed the device name in sdhci-s3c.c
(mmc: sdhci-s3c: Rework platform data and add device tree support)
But didn't change the regulator_consumer name.
So maybe didn't initialize the mmc/sd card for exynos4.

This patch is fixed that (based-on linux-samsung for-next branch)

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 23:40:37 -08:00
Jaehoon Chung 25419010a8 ARM: SAMSUNG: support the second capability for samsung-soc
In mmc, there are capabilities and use the host_caps.
That capability is expressed with bit[0:31].
But now..already filled the bit[0:31]...
so we need to denote with the other capability field.
(if we want to use the cache, powerclass, etc for eMMC..
 this field is necessary)

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <Kyungmin.park@samsung.com>
Acked-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 23:40:28 -08:00
Boojin Kim efd9960b0e ARM: EXYNOS: add support DMA for EXYNOS4X12 SoC
Signed-off-by: Boojin Kim <boojin.kim@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:51:20 -08:00
Tushar Behera 8f7b13218b ARM: EXYNOS: Add apb_pclk clkdev entry for mdma1
Amba core assumes the pclk to be named as apb_pclk. During device probe,
it tries to get that clock and enable that. When PM_RUNTIME is enabled,
dma clock is not explicitly enabled in pl330_probe, which causes device
probe to fail. Adding a clkdev entry for apb_pclk for mdma1 fixes the
problem.

This patch fixes following runtime error.

dma-pl330 dma-pl330.2: PERIPH_ID 0x0, PCELL_ID 0x0 !
dma-pl330: probe of dma-pl330.2 failed with error -22

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:51:12 -08:00
Boojin Kim 9ed76e0336 ARM: EXYNOS: Enable MDMA driver
This patch adds MDMA platform data and enables
MDMA for DMA memcpy operation for EXYNOS SoCs.

Signed-off-by: Boojin Kim <boojin.kim@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:51:07 -08:00
MyungJoo Ham bae82bdfb1 ARM: EXYNOS: support Exynos4210-bus Devfreq driver on Nuri board
Support varying voltages:
- GPIODVS for Buck2 is removed.
- Voltage ragne for Buck2 is widen.

Support Buck2 regulator for Exynos4210-bus devfreq driver:
- Added device name for buck2 regulator
- Added exynos4210-busfreq platform device fro Nuri board.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:32:32 -08:00
Andrzej Pietrasiewicz 72bce7b10a ARM: EXYNOS: Register JPEG on nuri
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:32:31 -08:00
Andrzej Pietrasiewicz 95e874cb41 ARM: EXYNOS: Register JPEG on universal_c210
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:32:30 -08:00
Sachin Kamat 156d264b19 ARM: S5PV210: Enable JPEG on SMDKV210
Enables JPEG support on SMDKV210 board.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:32:30 -08:00
Sachin Kamat 89b96198ec ARM: S5PV210: Add JPEG board definition
Adds JPEG board definition to S5PV210 machine

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:32:28 -08:00
Sachin Kamat 965a330dd5 ARM: EXYNOS: Enable JPEG on Origen
Enables JPEG support on Origen board.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:32:27 -08:00
Sachin Kamat 9fbe8c7a48 ARM: EXYNOS: Enable JPEG on SMDKV310
Enables JPEG support on SMDKV310 board.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:32:27 -08:00
Tushar Behera 6325fc403f ARM: EXYNOS: Add __init attribute to universal_camera_init()
s3c_set_platdata() is defined with __init attribute, hence all functions
referencing this function should also be defined with __init attribute.

universal_camera_init() is referenced only in '__init universal_machine_init()',
thus this change won't put any additional constraint on the usage of
universal_camera_init().

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:32:26 -08:00
Tushar Behera fdaf130838 ARM: EXYNOS: Add __init attribute to nuri_camera_init()
s3c_set_platdata() is defined with __init attribute, hence all functions
referencing this function should also be defined with __init attribute.

nuri_camera_init() is referenced only in '__init nuri_machine_init()', thus
this change won't put any additional constraint on the usage of
nuri_camera_init().

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:32:25 -08:00
Sachin Kamat 4106589fa2 ARM: S5PV210: Enable FIMC on SMDKC110
Enable FIMC 0,1,2 and media device (md) on SMDKC110 board.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:32:23 -08:00
Sachin Kamat 859e10c03f ARM: S5PV210: Enable FIMC on SMDKV210
Enable FIMC 0,1,2 and media device(md) on SMDKV210 board.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:32:23 -08:00
Sachin Kamat 6ff5d257ce ARM: S5PV210: Enable MFC on SMDKC110
Add MFC support on SMDKC110 board.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:32:22 -08:00
Sachin Kamat c7bf01df60 ARM: S5PV210: Enable MFC on SMDKV210
Add MFC support on SMDKV210 board.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:32:21 -08:00
Sachin Kamat b3421f97b3 ARM: EXYNOS: Enable G2D on SMDKV310
This patch enables G2D support on SMDKV310 board.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:32:20 -08:00
MyungJoo Ham 44b2cef5ae ARM: EXYNOS: Add clock register addresses for EXYNOS4X12 bus devfreq driver
EXYNOS4212/4412 memory bus devfreq driver requires some register
addresses that were not defined with EXYNOS4210 support.
This patch adds the required register addresses and shift/mask data.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:30:32 -08:00
Jaecheol Lee d074de8ef5 ARM: EXYNOS: add clock registers for exynos4x12-cpufreq
Signed-off-by: Jaecheol Lee <jc.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:30:27 -08:00
Kukjin Kim a855039ee4 ARM: EXYNOS: change the prefix S5P_ to EXYNOS4_ for clock
This patch changes prefix of the clk register from S5P_ to
EXYNOS4_ for new EXYNOS SoCs such as EXYNOS5 and adds prefix
exynos4_ on clk declarations.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:29:01 -08:00
Kukjin Kim b1d6c5b26d ARM: EXYNOS: use static declaration on regarding clock
This patch uses static declaration struct which is not
used in other file and re-arrange with group in header
file.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:28:34 -08:00
Kukjin Kim ce9c00eea1 ARM: EXYNOS: replace clock.c for other new EXYNOS SoCs
This patch changes the name of clock.c to clock-exynos4.c for other
EXYNOS series such as EXYNOS5. And since the header file of clock
is used only in arch/arm/mach-exynos, moves it in the local directory.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 22:28:09 -08:00
Kukjin Kim c15a04338b Merge branch 'next/cleanup-use-static' into next/cleanup-exynos-clock 2012-03-10 22:21:36 -08:00
Olof Johansson f7c8faedf9 Merge branch 'next/devel-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/soc
* 'next/devel-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: fix cycle count for periodic mode of clock event timers
  ARM: EXYNOS: add support JPEG
  ARM: EXYNOS: Add DMC1, allow PPMU access for DMC
  ARM: SAMSUNG: Correct MIPI-CSIS io memory resource definition
  ARM: SAMSUNG: fix __init attribute on regarding s3c_set_platdata()
  ARM: SAMSUNG: Add __init attribute to samsung_bl_set()
  ARM: S5PV210: Add usb otg phy control
  ARM: S3C64XX: Add usb otg phy control
  ARM: EXYNOS: Enable l2 configuration through device tree
  ARM: EXYNOS: remove useless code to save/restore L2
  ARM: EXYNOS: save L2 settings during bootup
  ARM: S5P: add L2 early resume code
  ARM: EXYNOS: Add support AFTR mode on EXYNOS4210
  ARM: SAMSUNG: use spin_lock_irqsave() in clk_{enable,disable}
  ARM: S3C64XX: Define some additional always off clocks
  ARM: S3C64XX: Reduce residency requirement for cpuidle WFI mode
  ARM: SAMSUNG: Add a callback 'notify_after' for PWM backlight control
  ARM: SAMSUNG: add G2D to plat-s5p and mach-exynos
  ARM: S3C64XX: Gate some more clocks by default
  ARM: S3C64XX: Add basic cpuidle driver
2012-03-10 09:51:26 -08:00
Konrad Rzeszutek Wilk 73c154c60b xen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it.
For the hypervisor to take advantage of the MWAIT support it needs
to extract from the ACPI _CST the register address. But the
hypervisor does not have the support to parse DSDT so it relies on
the initial domain (dom0) to parse the ACPI Power Management information
and push it up to the hypervisor. The pushing of the data is done
by the processor_harveset_xen module which parses the information that
the ACPI parser has graciously exposed in 'struct acpi_processor'.

For the ACPI parser to also expose the Cx states for MWAIT, we need
to expose the MWAIT capability (leaf 1). Furthermore we also need to
expose the MWAIT_LEAF capability (leaf 5) for cstate.c to properly
function.

The hypervisor could expose these flags when it traps the XEN_EMULATE_PREFIX
operations, but it can't do it since it needs to be backwards compatible.
Instead we choose to use the native CPUID to figure out if the MWAIT
capability exists and use the XEN_SET_PDC query hypercall to figure out
if the hypervisor wants us to expose the MWAIT_LEAF capability or not.

Note: The XEN_SET_PDC query was implemented in c/s 23783:
"ACPI: add _PDC input override mechanism".

With this in place, instead of
 C3 ACPI IOPORT 415
we get now
 C3:ACPI FFH INTEL MWAIT 0x20

Note: The cpu_idle which would be calling the mwait variants for idling
never gets set b/c we set the default pm_idle to be the hypercall variant.

Acked-by: Jan Beulich <JBeulich@suse.com>
[v2: Fix missing header file include and #ifdef]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-03-10 12:44:44 -05:00
Konrad Rzeszutek Wilk cc7335b2f6 xen/setup/pm/acpi: Remove the call to boot_option_idle_override.
We needed that call in the past to force the kernel to use
default_idle (which called safe_halt, which called xen_safe_halt).

But set_pm_idle_to_default() does now that, so there is no need
to use this boot option operand.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-03-10 12:44:09 -05:00
Olof Johansson c454f81350 Merge branch 'board' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/boards
* 'board' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP: add minimal support for Nokia RM-696
  ARM: OMAP: enable Bluetooth on the PandaBoard
  ARM: OMAP: pandora: add support for backlight and poweroff
  ARM: OMAP4: board-4430sdp: don't initialize value that is never used
  ARM: OMAP3: cm-t3517: add EMAC support
  ARM: OMAP: move generic EMAC init to separate file
  ARM: OMAP3: RX-51: add explicit mux configuration of tsc2005 control gpios
  ARM: OMAP: Add omap_reserve functionality

  (includes sync-up to 3.3-rc6)
2012-03-10 09:15:30 -08:00
Olof Johansson 04cc7bc61c Merge branch 'sr' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/drivers
* 'sr' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP3+: SmartReflex: fix error handling
  ARM: OMAP3+: SmartReflex: fix the use of debugfs_create_* API
  ARM: OMAP3+: SmartReflex: micro-optimization for sanity check
  ARM: OMAP3+: SmartReflex: misc cleanups
  ARM: OMAP3+: SmartReflex: move late_initcall() closer to its argument
  ARM: OMAP3+: SmartReflex: add missing platform_set_drvdata()
  ARM: OMAP3+: hwmod: add SmartReflex IRQs
  ARM: OMAP3+: SmartReflex: clear ERRCONFIG_VPBOUNDINTST only on a need
  ARM: OMAP3+: SmartReflex: Fix status masking in ERRCONFIG register
  ARM: OMAP3+: SmartReflex: Add a shutdown hook
  ARM: OMAP3+: SmartReflex Class3: disable errorgen before disable VP
  ARM: OMAP3+: SmartReflex: fix err interrupt disable sequence
  ARM: OMAP3+: SmartReflex: use voltage domain name in device attributes
  ARM: OMAP2+: Fix devexit for smartreflex when CONFIG_HOTPLUG is not set
  ARM: OMAP2+: Fix zoom LCD backlight if TWL_CORE is not selected
  ARM: OMAP2+: Fix board_mux section type conflict when OMAP_MUX is not set
  ARM: OMAP2+: Fix OMAP_HDQ_BASE build error
  ARM: OMAP2+: Fix Kconfig dependencies for USB_ARCH_HAS_EHCI
  ARM: OMAP2+: I2C: always compile I2C reset code, even if I2C driver is not built
2012-03-10 09:13:28 -08:00
Olof Johansson cdc3df6f44 Merge branch 'dt-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt
* 'dt-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  arm/dts: mt_ventoux: very basic support for TeeJet Mt.Ventoux board
  ARM: OMAP2+: Remove extra ifdefs for board-generic
  ARM: OMAP2+: Fix build error when only ARCH_OMAP2/3 or 4 is selected
  ARM: OMAP2+: board-generic: Use of_irq_init API
  arm/dts: OMAP3: Add interrupt-controller bindings for INTC
  ARM: OMAP2/3: intc: Add DT support for TI interrupt controller
2012-03-10 09:11:31 -08:00
Olof Johansson 86ca5b6fef Merge branch 'uart' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup
* 'uart' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: remove some orphan function declarations.
  ARM: OMAP2+: UART: remove unused fields in omap_uart_state.
2012-03-10 09:10:21 -08:00
Olof Johansson e65bc8918f Merge branch 'cleanup-pm' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup
* 'cleanup-pm' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: PM: share some suspend-related functions across OMAP2, 3, 4
  ARM: OMAP2+: omap_device: call all suspend, resume callbacks when OMAP_DEVICE_NO_IDLE_ON_SUSPEND is set
  ARM: OMAP: omap_device: remove omap_device_parent
  ARM: OMAP2+: PM debug: fix the use of debugfs_create_* API
  ARM: OMAP2+: PM: share clkdms_setup() across OMAP2, 3, 4
  ARM: OMAP2+: PM: clean up omap_set_pwrdm_state()
  ARM: OMAP3: PM: remove superfluous calls to pwrdm_clear_all_prev_pwrst()
  ARM: OMAP: convert omap_device_build() and callers to __init
  ARM: OMAP2+: Mark omap_hsmmc_init and omap_mux related functions as __init
  ARM: OMAP2+: Split omap2_hsmmc_init() to properly support I2C GPIO pins
  ARM: OMAP: omap_device: Expose omap_device_{alloc, delete, register}
  ARM: OMAP: Fix build error when mmc_omap is built as module
  ARM: OMAP: Fix kernel panic with HSMMC when twl4030_gpio is a module
2012-03-10 09:08:09 -08:00
Olof Johansson 1ad4fb2f7c Merge branch 'ams-delta' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/boards
* 'ams-delta' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ASoC: OMAP: ams-delta: drop .set_bias_level callback
  ARM: OMAP1: ams-delta: update the modem to use regulator API
  ARM: OMAP1: ams-delta: set up regulator over modem reset GPIO pin
  ARM: OMAP1: ams-delta: clean up init data section assignments
  ARM: OMAP1: ams-delta: fix incorrect section tags
2012-03-10 09:04:14 -08:00
Olof Johansson 74c46469a5 Merge branch 'fixes-non-critical-part3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/fixes-non-critical
* 'fixes-non-critical-part3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Fix build for omap4 only builds with missing include of linux/bug.h
  ARM: OMAP2+: Fix section warnings for hsmmc_init_one
2012-03-10 08:56:58 -08:00
Changhwan Youn 4d2e4d7f2c ARM: EXYNOS: fix cycle count for periodic mode of clock event timers
EXYNOS SOC series use MCT for kernel timer and MCT has two types of
clock event timers, which are mct-comp and mct-tick.
Because the clock rate of each event timer is diffent from the other,
this patch fixes cycles_per_jiffy for each timer's periodic mode.

Signed-off-by: Changhwan Youn <chaos.youn@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 07:26:59 -08:00
Andrzej Pietrasiewicz 3dbe6d4cac ARM: EXYNOS: add support JPEG
This patch adds platform_device, clock, map for JPEG

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 07:26:58 -08:00
MyungJoo Ham 2bde0b08ca ARM: EXYNOS: Add DMC1, allow PPMU access for DMC
- Add DMC1
- Enlarge address space for DMC from 4k to 64k so that PPMU registers
  may be accessed.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 07:26:57 -08:00
Sylwester Nawrocki 75ac7284c9 ARM: SAMSUNG: Correct MIPI-CSIS io memory resource definition
The resources size is increased to 16KB to also include the non-image packet
data buffers (CSIS_PKTDATAn). The 4KiB region is only sufficient when the
driver is not using the packet data buffers.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 07:26:56 -08:00
Tushar Behera eff4c58dac ARM: SAMSUNG: fix __init attribute on regarding s3c_set_platdata()
s3c_set_platdata() is defined with __init attribute, hence all functions
referencing this function should also be defined with __init attribute.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10 07:25:08 -08:00
Kirill A. Shutemov 026abc3332 gma500: initial medfield merge
We need to merge this ahead of some of the cleanup because a lot of needed
cleanup spans both new and old chips. If we try and clean up and the merge
we end up fighting ourselves.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
[With a load of the cleanup stuff folded in, register stuff reworked sanely]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-10 13:05:48 +00:00
David S. Miller b2d3298e09 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-09 14:34:20 -08:00
Thomas Gleixner a7f4255f90 x86: Derandom delay_tsc for 64 bit
Commit f0fbf0abc0 ("x86: integrate delay functions") converted
delay_tsc() into a random delay generator for 64 bit.  The reason is
that it merged the mostly identical versions of delay_32.c and
delay_64.c.  Though the subtle difference of the result was:

 static void delay_tsc(unsigned long loops)
 {
-	unsigned bclock, now;
+	unsigned long bclock, now;

Now the function uses rdtscl() which returns the lower 32bit of the
TSC. On 32bit that's not problematic as unsigned long is 32bit. On 64
bit this fails when the lower 32bit are close to wrap around when
bclock is read, because the following check

       if ((now - bclock) >= loops)
       	  	break;

evaluated to true on 64bit for e.g. bclock = 0xffffffff and now = 0
because the unsigned long (now - bclock) of these values results in
0xffffffff00000001 which is definitely larger than the loops
value. That explains Tvortkos observation:

"Because I am seeing udelay(500) (_occasionally_) being short, and
 that by delaying for some duration between 0us (yep) and 491us."

Make those variables explicitely u32 again, so this works for both 32
and 64 bit.

Reported-by: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org # >= 2.6.27
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-09 12:43:27 -08:00
Greg Kroah-Hartman 263a5c8e16 Merge 3.3-rc6 into driver-core-next
This was done to resolve a conflict in the drivers/base/cpu.c file.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 12:35:53 -08:00
John W. Linville 74dd1521d0 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2012-03-09 14:57:30 -05:00
Dmitry Torokhov b675b3667f Merge commit 'v3.3-rc6' into next 2012-03-09 10:55:17 -08:00
Tushar Behera 4db17215da ARM: SAMSUNG: Add __init attribute to samsung_bl_set()
s3c_set_platdata() is defined with __init attribute, hence all functions
referencing this function should also be defined with __init attribute.

samsung_bl_set() is referenced only in '__init xxx_machine_init()' functions,
thus this change won't put any additional constraint on the usage of
samsung_bl_set().

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-09 08:03:13 -08:00
Joonyoung Shim 7f471ee8be ARM: S5PV210: Add usb otg phy control
This patch supports to control usb otg phy of S5PV210. Based on
setup-usb-phy.c of S3C64XX.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
[Test HW: GONI S5PC110]
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-09 07:31:34 -08:00
Joonyoung Shim 99f6e1f50c ARM: S3C64XX: Add usb otg phy control
This patch supports to control usb otg phy of S3C64XX. Currently, the
driver for usb otg controls usb otg phy but it can be removed by this
patch.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
[Rebased on the newest git/kgene/linux-samsung #for-next]
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Mark Brown<broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-09 07:31:30 -08:00
Linus Torvalds 0ab5d757db Fix for C6X KSTK_EIP and KSTK_ESP macros.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPV41FAAoJEOiN4VijXeFPsuEQAJDPafvpu9KEqSV/TOGKyelu
 rQk94tvHSVuGeAZiFpjjzQ/u0ofGNOxBqwbVnQjHwt6ameWX9VOxjbR4ZzdF5h9i
 1KbeapNIOKjebHUAf2Sh5mO8MkY8TcTFUzFBk5rOhP8BpNKfpFgfVFxh6JZVFo/b
 7a0kokAFoH24XQXAx4GK11uNE697fQqfcqyxqZ3lRhZ6jtEiIjMkUeRFgLy/G6gE
 Xo3H03ETawbJWzl4PXOiYNFH1Xf3DhT1VM7hLJVuPIrB3KT2oBweGQGn2DKextXe
 /4WE3XwGr9euHbJcJ7c5P0Gu2P76QDhLjgjz/hQfJdMfkD4ZsH0/VrLdTDs5AWOT
 WgzJg40WUDWgL7GuJgL+pCjt6pGszQq5EXGwakHesJU6zT4xZu9NyxChoTzyZdjW
 HIx3NJe5JaeCv0hKpmHlSaaJMXiYKWwKs1d3GOiAKP84AvQlqdsV3UyPCFRNCKNv
 cO2lkkC6pdHnGlJezmNxXqYZaaHwFsbTIcmOLiNlb8B2Q1uttsm3cbS0AReosdC8
 5PLGlvEbXfe/MURrquorpGMKEq5DjnbNdwHx5RcUh/882hZEieDbGVO6R6vApTy2
 dDR5vVhaOfcc86ST0WFLRrjUfqzPUGxBrMvGDn7pwKHlKC5h9IWOptTB/nSgJGuf
 7kCcp9qpXff8fvP2l4/A
 =2BoN
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming

Pull C6X fix from Mark Salter:
 "Fix for C6X KSTK_EIP and KSTK_ESP macros."

* tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
  C6X: fix KSTK_EIP and KSTK_ESP macros
2012-03-09 07:27:38 -08:00
Linus Torvalds 0cacaf51a0 IOMMU fixes for Linux v3.3-rc6
Two fixes are queued up. The first is an additional fix for the OMAP
 initialization order issue and the second patch fixes a possible section
 mismatch which can lead to a kernel crash in the AMD IOMMU driver when
 suspend/resume is used and the compiler has not inlined the
 iommu_set_device_table function.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPWgA/AAoJECvwRC2XARrj7voQAN6evWicqjRDiXQgEC3muQFU
 OrA/Jz/i7+pHEYXcsTt0xHLb8juZNJAdkJjToB+oz7i/7D+TYRmJe+QRNkVmw7Ld
 d3DbUSUi9B3agvGblosKV3DYM8By1vTn9Gy2GNatW1yPuo5o4FHK2ePC5sn8Z/8z
 qwTZZnmvqluz7frNiw6Y3bNOqLd46z+9thUOoKmRn/fo3vKCOOVvb85yu1m/uqy6
 Dmpn6ep0w53jK29ZTKWcL8PW0YrLTEfszhMcVshFT+Y7GVSGnSxwgSh1fnZm/WL6
 z11L57dI0+7RS/z+cw+ko7ymIloV2v4ABRArMPIoLgbIQT0lidDNSqOQnPvWaBek
 MwdLL8W64lt2h4T7bLhDNRSDggWCX+EJYlk87O4hJYt4n57c3yT55z2+BGdoFivZ
 tzPshNWN4KVDMZCU6sTvzvz6eErwvro5wlVM2WxDVfXTxn6UTblP5uIQDGb2zVA9
 G95kK/OlK/s+giwOSOKxtR62livKEAuJ2Croa5LsdJnLdCo6ipvIz9cuAG6eij2W
 tulJQUN3FZr288iUAOPQ9xj6hWYM9RXqoYBxAHAvgYgGuirj9E6hjk/fL0y6XGQk
 jcg0bCdJjh2RzsLZR0eeslybtlrvUsBWYCPYCAAmRjUYHwZ6s822aO7qh0VnrFuQ
 csH09+3B0twvJ+ZRJibN
 =PZDd
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-v3.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull two IOMMU fixes from Joerg Roedel:
 "The first is an additional fix for the OMAP initialization order issue
  and the second patch fixes a possible section mismatch which can lead
  to a kernel crash in the AMD IOMMU driver when suspend/resume is used
  and the compiler has not inlined the iommu_set_device_table function."

* tag 'iommu-fixes-v3.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  x86/amd: iommu_set_device_table() must not be __init
  ARM: OMAP: fix iommu, not mailbox
2012-03-09 07:26:25 -08:00
Amit Daniel Kachhap 6cdeddcc81 ARM: EXYNOS: Enable l2 configuration through device tree
This patch enables calling generic l2 setup functions if device tree is used.

Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-09 07:04:51 -08:00
Amit Daniel Kachhap d0341c61a2 ARM: EXYNOS: remove useless code to save/restore L2
Following the merge of CPU PM notifiers and L2 resume code, this patch
removes useless code to save and restore L2 registers.

This is now automatically covered by suspend calls which integrated
CPU PM notifiers and new sleep code that allows to resume L2 before MMU
is turned on.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-09 07:04:50 -08:00
Amit Daniel Kachhap b756a50f7f ARM: EXYNOS: save L2 settings during bootup
This patch adds code to save L2 register configuration at boot, and
later used to resume L2 before MMU is enabled in suspend and cpuidle
resume paths.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-09 07:04:50 -08:00
Amit Daniel Kachhap 7c6035b63b ARM: S5P: add L2 early resume code
This patch adds code to resume L2 before MMU is enabled in
suspend and cpuidle resume paths. s3c_cpu_resume is moved to the
data section with appropriate comments.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-09 07:04:49 -08:00
Amit Daniel Kachhap 67173ca492 ARM: EXYNOS: Add support AFTR mode on EXYNOS4210
This patch adds support AFTR(ARM OFF TOP RUNNING) mode in
cpuidle driver. L2 cache keeps their data in this mode.
This patch ports the code to the latest interfaces to
save/restore CPU state inclusive of CPU PM notifiers, l2
resume and cpu_suspend/resume.

Signed-off-by: Jaecheol Lee <jc.lee@samsung.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org>
[kgene.kim@samsung.com: fixed for non-smp as per Tushar's pointing out]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-09 07:04:43 -08:00
Tony Lindgren 001b7f3ecd ARM: OMAP2+: Fix compile error when FB_OMAP2 is not set
Otherwise we will get:

arch/arm/plat-omap/fb.c:101: error: expected ‘)’ before ‘*’ token

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-03-09 09:53:21 +02:00
Benjamin Herrenschmidt 7230c56441 powerpc: Rework lazy-interrupt handling
The current implementation of lazy interrupts handling has some
issues that this tries to address.

We don't do the various workarounds we need to do when re-enabling
interrupts in some cases such as when returning from an interrupt
and thus we may still lose or get delayed decrementer or doorbell
interrupts.

The current scheme also makes it much harder to handle the external
"edge" interrupts provided by some BookE processors when using the
EPR facility (External Proxy) and the Freescale Hypervisor.

Additionally, we tend to keep interrupts hard disabled in a number
of cases, such as decrementer interrupts, external interrupts, or
when a masked decrementer interrupt is pending. This is sub-optimal.

This is an attempt at fixing it all in one go by reworking the way
we do the lazy interrupt disabling from the ground up.

The base idea is to replace the "hard_enabled" field with a
"irq_happened" field in which we store a bit mask of what interrupt
occurred while soft-disabled.

When re-enabling, either via arch_local_irq_restore() or when returning
from an interrupt, we can now decide what to do by testing bits in that
field.

We then implement replaying of the missed interrupts either by
re-using the existing exception frame (in exception exit case) or via
the creation of a new one from an assembly trampoline (in the
arch_local_irq_enable case).

This removes the need to play with the decrementer to try to create
fake interrupts, among others.

In addition, this adds a few refinements:

 - We no longer  hard disable decrementer interrupts that occur
while soft-disabled. We now simply bump the decrementer back to max
(on BookS) or leave it stopped (on BookE) and continue with hard interrupts
enabled, which means that we'll potentially get better sample quality from
performance monitor interrupts.

 - Timer, decrementer and doorbell interrupts now hard-enable
shortly after removing the source of the interrupt, which means
they no longer run entirely hard disabled. Again, this will improve
perf sample quality.

 - On Book3E 64-bit, we now make the performance monitor interrupt
act as an NMI like Book3S (the necessary C code for that to work
appear to already be present in the FSL perf code, notably calling
nmi_enter instead of irq_enter). (This also fixes a bug where BookE
perfmon interrupts could clobber r14 ... oops)

 - We could make "masked" decrementer interrupts act as NMIs when doing
timer-based perf sampling to improve the sample quality.

Signed-off-by-yet: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

v2:

- Add hard-enable to decrementer, timer and doorbells
- Fix CR clobber in masked irq handling on BookE
- Make embedded perf interrupt act as an NMI
- Add a PACA_HAPPENED_EE_EDGE for use by FSL if they want
  to retrigger an interrupt without preventing hard-enable

v3:

 - Fix or vs. ori bug on Book3E
 - Fix enabling of interrupts for some exceptions on Book3E

v4:

 - Fix resend of doorbells on return from interrupt on Book3E

v5:

 - Rebased on top of my latest series, which involves some significant
rework of some aspects of the patch.

v6:
 - 32-bit compile fix
 - more compile fixes with various .config combos
 - factor out the asm code to soft-disable interrupts
 - remove the C wrapper around preempt_schedule_irq

v7:
 - Fix a bug with hard irq state tracking on native power7
2012-03-09 13:25:06 +11:00
Linus Torvalds bfcfaa77bd vfs: use 'unsigned long' accesses for dcache name comparison and hashing
Ok, this is hacky, and only works on little-endian machines with goo
unaligned handling.  And even then only with CONFIG_DEBUG_PAGEALLOC
disabled, since it can access up to 7 bytes after the pathname.

But it runs like a bat out of hell.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-08 18:08:44 -08:00
Linus Torvalds 9f8050c4f9 Last minute fixes for 3.3
One samsung build fix due to a mis-applied patch, and a small set of OMAP fixes.
 This should be the last from arm-soc for 3.3, hopefully.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPWQktAAoJEIwa5zzehBx3OK4P/i3+nTB2WW8i8ll8pTHybSAj
 YuQGOtsvJDCkZQ6tIgMahNH/Pr2Q2gFe6cjP/akbWWCfUvOl36ZAl9NYY8eexoco
 ZGkMEXfhgtAsVepzEF1/64lwOgrh+AikzlL0q0tA2FmClcAejwFE7ht6zPcwFgJj
 9lmR201/6OLc+qkmvrKRbmpO+eYZUVuQ4cOEMOxebXZN/tn5S/R2QWC3+PkUMbWz
 7bngLHjO97legI0SGzfaKOx/02y/4hIDSybIPDOKDuXi1jUJlkrmnP09sQQLYdKN
 uxu56mn+vUPCIGNwmE1/ufSneM8pZEAHaRkUjFOrxtsdGKVsxFz1vyJ3OAQHd8FU
 WU+fKOew/Jf+jRpApydKWJ0yOdyTZIVqncvWpFs1RlmAVKPE96M8IL9oUZaV8rgJ
 c9XUCvDFF0OuZQyMoacSzbVfcAy9SE/f7fNXLUpI9rEriYfY5waCXcQrYGwjRtmD
 j2iY0pyaU72i7mtTbcsInPZ/bZ7gO+D1MmFl9WzduLWDJoGHJVcUyC1+YrJjoGF3
 ggplns12qTtdgfiqTKV2I5qf2nHHbk8kmhII1fkYPZwdG2enKhV+r5Oth3zKPVXF
 oOD8YnjACuad05YdkpzQL2DSaiGtPVAXHP4xMN9ktNPSJHwx19HNDiTKex6oxcZf
 Dki+FinbRiFYUP/O91Xe
 =PLTM
 -----END PGP SIGNATURE-----

Merge tag 'fixes-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull last minute fixes from Olof Johansson:
 "One samsung build fix due to a mis-applied patch, and a small set of
  OMAP fixes.  This should be the last from arm-soc for 3.3, hopefully."

* tag 'fixes-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: S3C2440: Fixed build error for s3c244x
  ARM: OMAP2+: Fix module build errors with CONFIG_OMAP4_ERRATA_I688
  ARM: OMAP: id: Add missing break statement in omap3xxx_check_revision
  ARM: OMAP2+: Remove apply_uV constraints for fixed regulator
  ARM: OMAP: irqs: Fix NR_IRQS value to handle PRCM interrupts
2012-03-08 17:32:42 -08:00
Linus Torvalds ee0849c911 Minor bug fixes and documentation updates for v3.3-rc5
Fixes up a duplicate #include, adds an empty implementation of
 of_find_compatible_node() and make git ignore .dtb files.  And fix
 up bus name on OF described PHYs.  Nothing exciting here.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPWPvsAAoJEEFnBt12D9kB8QsP/2e6jv7CQ/wUhihzw126Y8yi
 4HLG3ByJ382/c3LXg3juC+WfMvlpqEa0yqhikFKgIsm7cNbv7PkPS583pujdSXo0
 IRykiT3Q9+XbO7L+9C88miYIQT8+IT/AjIjfuRwlP4gLPNUJhknpYhYOc09YzwOp
 zhheeGVyeyTay+beQXip8gOEq2dYEl4IKsItagCBZfkDvj3Y8yDwTlP7f2j0FYZi
 uODa3NFKE4uc0U2chtro0Vt87TRfbnIQ93SbvEWyQBWMEbPqT3l1Q94AeFGubCLj
 RX910WvurCE4evzo2ZJzXPt9gPEyGIgtMGbjh+cENfT5/wNB2HWk1ftKnss5yEjp
 WmcbwWKwXPwRPc5EpRdgabBCRgouCZghtcnJpkoXKSwbEt/nj3no8GOZXQnv+rSL
 Ga0BSk1jJYC9DRpaIrLvdxXZF7vy1nug8fgU9ALi2R0gTmN+k6tHlLh60EWMSCBF
 YCXv3fUd9IVJfOYsu4qMk0Pu40pW9rDc698Nxiep7C0iNhlddq8fiHTwB3DdoinC
 iYmz+wEdDDp/68qY/mguXXtr5GAFSz1PUOwSJkh2zW6LnBDEv1djfhoA+5gwZX2v
 I1IwfNHMn/XAEuhOFWMo9CejB0rDoBhigwucH8EilbIdBYVCCEtYaubO/Gq6HmId
 h7hx9sWjrwF9HY0N9EHX
 =/fxH
 -----END PGP SIGNATURE-----

Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6

Pull minor devicetree bug fixes and documentation updates from Grant Likely:
 "Fixes up a duplicate #include, adds an empty implementation of
  of_find_compatible_node() and make git ignore .dtb files.  And fix up
  bus name on OF described PHYs.  Nothing exciting here."

* tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6:
  doc: dt: Fix broken reference in gpio-leds documentation
  of/mdio: fix fixed link bus name
  of/fdt.c: asm/setup.h included twice
  of: add picochip vendor prefix
  dt: add empty of_find_compatible_node function
  ARM: devicetree: Add .dtb files to arch/arm/boot/.gitignore
2012-03-08 17:24:27 -08:00
Gavin Shan 3780444c4f powerpc/eeh: pseries platform config space access in EEH
With the original EEH implementation, the access to config space of
the corresponding PCI device is done by RTAS sensitive function. That
depends on pci_dn heavily. That would limit EEH extension to other
platforms like powernv because other platforms might have different
ways to access PCI config space.

The patch splits those functions used to access PCI config space
and implement them in platform related EEH component. It would be
helpful to support EEH on multiple platforms simutaneously in future.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:39:51 +11:00
Gavin Shan e575f8db1e powerpc/eeh: Introduce struct eeh_stats for EEH
With the original EEH implementation, the EEH global statistics
are maintained by individual global variables. That makes the
code a little hard to maintain.

The patch introduces extra struct eeh_stats for the EEH global
statistics so that it can be maintained in collective fashion.

It's the rework on the corresponding v5 patch. According to
the comments from David Laight, the EEH global statistics have
been changed for a litte bit so that they have fixed-type of
"u64". Also, the format used to print them has been changed to
"%llu" based on David's suggestion. Also, the output format of
EEH global statistics should be kept as intacted according to
Michael's suggestion that there might be tools parsing them.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:39:49 +11:00
Gavin Shan 54793d0ef1 powerpc/eeh: Replace pci_dn with eeh_dev for EEH on pSeries
The pci_dn has been replaced with eeh_dev. In order to comply with
the rule, the EEH platform implementation on pSeries should also
be adjusted for a little bit so that it will depend on eeh_dev instead
of pci_dn.

The patch replaces pci_dn with eeh_dev. The corresponding information
will be retrieved from eeh_dev instead of pci_dn.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:39:48 +11:00
Gavin Shan 40a7cd9219 powerpc/eeh: Replace pci_dn with eeh_dev for EEH aux components
The original EEH implementation is heavily depending on struct pci_dn.
We have to put EEH related information to pci_dn. Actually, we could
split struct pci_dn so that the EEH sensitive information to form an
individual struct, then EEH looks more independent.

The patch replaces pci_dn with eeh_dev for EEH aux components like
event and driver. Also, the eeh_event struct has been adjusted for
a little bit since eeh_dev has linked the associated FDT (Flat Device
Tree) node and PCI device. It's not necessary for eeh_event struct to
trace FDT node and PCI device. We can just simply to trace eeh_dev in
eeh_event.

The patch also renames function pcid_name() to eeh_pcid_name(), which
should be missed in the previous patch where the EEH aux components
have been cleaned up.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:39:46 +11:00
Gavin Shan f631acd3e9 powerpc/eeh: Replace pci_dn with eeh_dev for EEH core
The original EEH implementation is heavily depending on struct pci_dn.
We have to put EEH related information to pci_dn. Actually, we could
split struct pci_dn so that the EEH sensitive information to form an
individual struct, then EEH looks more independent.

The patch replaces pci_dn with eeh_dev for EEH core.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:39:44 +11:00
Gavin Shan d50a7d4c6f powerpc/eeh: Replace pci_dn with eeh_dev for EEH address cache
With original EEH implementation, struct pci_dn is used while building
PCI I/O address cache, which helps on searching the corresponding
PCI device according to the given physical I/O address. Besides, pci_dn
is associated with the corresponding PCI device while building its
I/O cache.

The patch replaces struct pci_dn with struct eeh_dev so that EEH address
cache won't depend on struct pci_dn. That will help EEH to become an
independent module in future. Besides, the binding of eeh_dev and PCI
device is done while building PCI device I/O cache.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:39:42 +11:00
Gavin Shan 44da8edc6a powerpc/eeh: Replace pci_dn with eeh_dev for EEH sysfs
With original EEH implementation, all EEH related statistics have
been put into struct pci_dn. We've introduced struct eeh_dev to
replace struct pci_dn in EEH core components, including EEH sysfs
component.

The patch shows EEH statistics from struct eeh_dev instead of struct
pci_dn in EEH sysfs component. Besides, it also fixed the EEH device
retrieval from PCI device, which was introduced by the previous patch
in the series of patch.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:39:40 +11:00
Gavin Shan eb740b5f3e powerpc/eeh: Introduce EEH device
Original EEH implementation depends on struct pci_dn heavily. However,
EEH shouldn't depend on that actually because EEH needn't share much
information with other PCI components. That's to say, EEH should have
worked independently.

The patch introduces struct eeh_dev so that EEH core components needn't
be working based on struct pci_dn in future. Also, struct pci_dn, struct
eeh_dev instances are created in dynamic fasion and the binding with EEH
device, OF node, PCI device is implemented as well.

The EEH devices are created after PHBs are detected and initialized, but
PCI emunation hasn't started yet. Apart from that, PHB might be created
dynamically through DLPAR component and the EEH devices should be creatd
as well. Another case might be OF node is created dynamically by DR
(Dynamic Reconfiguration), which has been defined by PAPR. For those OF
nodes created by DR, EEH devices should be also created accordingly. The
binding between EEH device and OF node is done while the EEH device is
initially created.

The binding between EEH device and PCI device should be done after PCI
emunation is done. Besides, PCI hotplug also needs the binding so that
the EEH devices could be traced from the newly coming PCI buses or PCI
devices.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:39:29 +11:00
Gavin Shan def9d83da4 powerpc/eeh: Cleanup function names in EEH aux components
The patch does some cleanup on the function names of EEH
aux components. Currently, only couple of function names from
eeh_cache have been adjusted so that:

        * The function name has prefix "eeh_addr_cache".
        * Move around pci_addr_cache_build() in the header file
          to reflect function call sequence.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:11:37 +11:00
Gavin Shan 29f8bf1b7f powerpc/pseries: Cleanup comments in EEH aux components
There're several EEH aux components and the patch does some cleanup
for them so that they look more clean.

        * Duplicated comments have been removed from the header file.
        * Comments have been reorganized so that it looks more clean.
        * The leading comments of functions are adjusted for a little
          bit so that the result of "make pdfdocs" would be more
          unified.
        * Function calls "xxx ()" has been replaced by "xxx()".

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:11:20 +11:00
Gavin Shan 1823fbf119 powerpc/eeh: pseries platform EEH configure bridge
In order to enable particular PCI device, which has been included
in the parent PE. The involved PCI bridges should be enabled explicitly
if there has. On pSeries platform, there're dedicated RTAS calls
to fulfil the purpose.

The patch implements the function of configuring PCI bridges through
the dedicated RTAS calls. Besides, the function has been abstracted
by struct eeh_ops::configure_bridge so that the EEH core components
could support multiple platforms in future.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:11:11 +11:00
Gavin Shan 8d633291b4 powerpc/eeh: pseries platform EEH error log retrieval
On RTAS compliant pSeries platform, one dedicated RTAS call has
been introduced to retrieve EEH temporary or permanent error log.

The patch implements the function of retriving EEH error log through
RTAS call. Besides, it has been abstracted by struct eeh_ops::get_log
so that EEH core components could support multiple platforms in future.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:11:01 +11:00
Gavin Shan 2652481f75 powerpc/eeh: pseries platform EEH reset PE
On RTAS compliant pSeries platform, there is a dedicated RTAS call
(ibm,set-slot-reset) to reset the specified PE. Furthermore, two
types of resets are supported: hot and fundamental. the type of
reset is to be used actually depends on the included PCI device's
requirements.

The patch implements resetting PE on pSeries platform through RTAS
call. Besides, it has been abstracted through struct eeh_ops::reset
so that EEH core components could support multiple platforms in future.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:10:49 +11:00
Gavin Shan b0e5f742f1 powerpc/eeh: pseries platform EEH wait PE state
On pSeries platform, the PE state might be temporarily unavailable.
In that case, the firmware will return the corresponding wait time.
That means the kernel has to wait for appropriate time in order to
get the PE state.

The patch does the implementation for that. Besides, the function
has been abstracted through struct eeh_ops::wait_state so that EEH core
components could support multiple platforms in future.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:10:39 +11:00
Gavin Shan eb594a4754 powerpc/eeh: pseries platform PE state retrieval
On pSeries platform, there're 2 dedicated RTAS calls introduced to
retrieve the corresponding PE's state: ibm,read-slot-reset-state and
ibm,read-slot-reset-state2.

The patch implements the retrieval of PE's state according to the
given PE address. Besides, the implementation has been abstracted by
struct eeh_ops::get_state so that EEH core components could support
multiple platforms in future.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:10:26 +11:00
Gavin Shan c8c29b38fb powerpc/eeh: pseries platform EEH PE address retrieval
There're 2 types of addresses used for EEH operations. The first
one would be BDF (Bus/Device/Function) address which is retrieved
from the reg property of the corresponding FDT node. Another one
is PE address that should be enquired from firmware through RTAS
call on pSeries platform. When issuing EEH operation, the PE address
has precedence over BDF address.

The patch implements retrieving PE address according to the given
BDF address on pSeries platform. Also, the struct eeh_early_enable_info
has been removed since the information can be figured out from
dn->pdn->phb->buid directly and that simplifies the code.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:10:09 +11:00
Gavin Shan 8fb8f70902 powerpc/eeh: pseries platform EEH operations
There're 4 EEH operations that are covered by the dedicated RTAS
call <ibm,set-eeh-option>: enable or disable EEH, enable MMIO and
enable DMA. At early stage of system boot, the EEH would be tried
to enable on PCI device related device node. MMIO and DMA for
particular PE should be enabled when doing recovery on EEH errors
so that the PE could function properly again.

The patch implements it and abstract that through struct
eeh_ops::set_eeh. It would be help for EEH to support multiple
platforms in future.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:09:49 +11:00
Gavin Shan e2af155c2a powerpc/eeh: pseries platform EEH initialization
The platform specific EEH operations have been abstracted by
struct eeh_ops. The individual platroms, including pSeries, needs
doing necessary initialization before the platform dependent EEH
operations work properly.

The patch is addressing that and do necessary platform initialization
for pSeries platform. More specificly, it will figure out the tokens
of EEH related RTAS calls.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:09:36 +11:00
Gavin Shan aa1e6374ae powerpc/eeh: Platform dependent EEH operations
EEH has been implemented on RTAS-compliant pSeries platform.
That's to say, the EEH operations will be implemented through RTAS
calls eventually. The situation limited feasible extension on EEH.
In order to support EEH on multiple platforms like pseries and powernv
simutaneously. We have to split the platform dependent EEH options
up out of current implementation.

The patch addresses supporting EEH on multiple platforms. The pseries
platform dependent EEH operations will be abstracted by struct eeh_ops.
EEH core components will be built based on the registered EEH operations.
With the mechanism, what the individual platform needs to do is implement
platform dependent EEH operations.

For now, the pseries platform is covered under the mechanism. That means
we have to think about other platforms to support EEH, like powernv.
Besides, we only have framework for the mechanism and we have to implement
it for pseries platform later.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:08:54 +11:00
Gavin Shan cce4b2d243 powerpc/eeh: Cleanup function names in the EEH core
The EEH has been implemented on pSeries platform. The original
code looks a little bit nasty. The patch does cleanup on the
current EEH implementation so that it looks more clean.

        * Try adding prefix "eeh" for functions.
        * Some function names have been adjusted so that they looks
          shorter and meaningful.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:08:37 +11:00
Gavin Shan cb3bc9d0de powerpc/eeh: Cleanup comments in the EEH core
The EEH has been implemented on pSeries platform. The original
code looks a little bit nasty. The patch does cleanup on the
current EEH implementation so that it looks more clean.

        * Duplicated comments have been removed from the corresponding
          header files.
        * Comments have been reorganized so that it looks more clean.
        * The leading comments of functions are adjusted for a little
          bit so that the result of "make pdfdocs" would be more
          unified.
        * Function definitions and calls have unified format as "xxx()".
          That means the format "xxx ()" has been replaced by "xxx()".
        * There're multiple functions implemented for resetting PE. The
          position of those functions have been move around so that they
          are adjacent to each other to reflect their relationship.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 11:08:11 +11:00
Benjamin Herrenschmidt d9ada91ae2 powerpc: Replace mfmsr instructions with load from PACA kernel_msr field
On 64-bit, the mfmsr instruction can be quite slow, slower
than loading a field from the cache-hot PACA, which happens
to already contain the value we want in most cases.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 10:55:20 +11:00
Benjamin Herrenschmidt 9424fabf86 powerpc: Fix 64-bit BookE FP unavailable exceptions
We were using CR0.EQ after EXCEPTION_COMMON, hoping it still
contained whether we came from userspace or kernel space.

However, under some circumstances, EXCEPTION_COMMON will
call C code and clobber non-volatile registers, so we really
need to re-load the previous MSR from the stackframe and
re-test.

While there, invert the condition to make the fast path more
obvious and remove the BUG_OPCODE which was a debugging
leftover and call .ret_from_except as we should.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 10:55:18 +11:00
Benjamin Herrenschmidt 990118c84b powerpc: Fix register clobbering when accumulating stolen time
When running under a hypervisor that supports stolen time accounting,
we may call C code from the macro EXCEPTION_PROLOG_COMMON in the
exception entry path, which clobbers CR0.

However, the FPU and vector traps rely on CR0 indicating whether we
are coming from userspace or kernel to decide what to do.

So we need to restore that value after the C call

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 10:55:16 +11:00
Benjamin Herrenschmidt 7ac21cd465 powerpc/xmon: Add display of soft & hard irq states
Also use local_paca instead of get_paca() to avoid getting into
the smp_processor_id() debugging code from the debugger

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 10:55:14 +11:00
Benjamin Herrenschmidt 9be72573a8 powerpc: Add support for page fault retry and fatal signals
Other architectures such as x86 and ARM have been growing
new support for features like retrying page faults after
dropping the mm semaphore to break contention, or being
able to return from a stuck page fault when a SIGKILL is
pending.

This refactors our implementation of do_page_fault() to
move the error handling out of line in a way similar to
x86 and adds support for those two features.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 10:55:12 +11:00
Benjamin Herrenschmidt 9f2f79e3a3 powerpc: Disable interrupts in 64-bit kernel FP and vector faults
If we get a floating point, altivec or vsx unavaible interrupt in
kernel, we trigger a kernel error. There is no point preserving
the interrupt state, in fact, that can even make debugging harder
as the processor state might change (we may even preempt) between
taking the exception and landing in a debugger.

So just make those 3 disable interrupts unconditionally.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

v2: On BookE only disable when hitting the kernel unavailable
    path, otherwise it will fail to restore softe as
    fast_exception_return doesn't do it.
2012-03-09 10:55:10 +11:00
Benjamin Herrenschmidt a546498f3b powerpc: Call do_page_fault() with interrupts off
We currently turn interrupts back to their previous state before
calling do_page_fault(). This can be annoying when debugging as
a bad fault will potentially have lost some processor state before
getting into the debugger.

We also end up calling some generic code with interrupts enabled
such as notify_page_fault() with interrupts enabled, which could
be unexpected.

This changes our code to behave more like other architectures,
and make the assembly entry code call into do_page_faults() with
interrupts disabled. They are conditionally re-enabled from
within do_page_fault() in the same spot x86 does it.

While there, add the might_sleep() test in the case of a successful
trylock of the mmap semaphore, again like x86.

Also fix a bug in the existing assembly where r12 (_MSR) could get
clobbered by C calls (the DTL accounting in the exception common
macro and DISABLE_INTS) in some cases.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

v2. Add the r12 clobber fix
2012-03-09 10:55:08 +11:00
Benjamin Herrenschmidt 1b70117924 powerpc: Improve behaviour of irq tracing on 64-bit exception entry
Some exceptions would unconditionally disable interrupts on entry,
which is fine, but calling lockdep every time not only adds more
overhead than strictly needed, but also means we get quite a few
"redudant" disable logged, which makes it hard to spot the really
bad ones.

So instead, split the macro used by the exception code into a
normal one and a separate one used when CONFIG_TRACE_IRQFLAGS is
enabled, and make the later skip th tracing if interrupts were
already disabled.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 10:55:06 +11:00
Benjamin Herrenschmidt 1421ae0b29 powerpc: Improve 64-bit syscall entry/exit
We unconditionally hard enable interrupts. This is unnecessary as
syscalls are expected to always be called with interrupts enabled.

While at it, we add a WARN_ON if that is not the case and
CONFIG_TRACE_IRQFLAGS is enabled (we don't want to add overhead
to the fast path when this is not set though).

Thus let's remove the enabling (and associated irq tracing) from
the syscall entry path. Also on Book3S, replace a few mfmsr
instructions with loads of PACAMSR from the PACA, which should be
faster & schedule better.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 10:55:04 +11:00
Benjamin Herrenschmidt fe1952fc0a powerpc: Rework runlatch code
This moves the inlines into system.h and changes the runlatch
code to use the thread local flags (non-atomic) rather than
the TIF flags (atomic) to keep track of the latch state.

The code to turn it back on in an asynchronous interrupt is
now simplified and partially inlined.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 10:55:02 +11:00
Benjamin Herrenschmidt 7450f6f03e powerpc: Use the same interrupt prolog for perfmon as other interrupts
The perfmon interrupt is the sole user of a special variant of the
interrupt prolog which differs from the one used by external and timer
interrupts in that it saves the non-volatile GPRs and doesn't turn the
runlatch on.

The former is unnecessary and the later is arguably incorrect, so
let's clean that up by using the same prolog. While at it we rename
that prolog to use the _ASYNC prefix.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 10:55:00 +11:00
Benjamin Herrenschmidt 4f8cf36f48 powerpc: Remove legacy iSeries bits from assembly files
This removes the various bits of assembly in the kernel entry,
exception handling and SLB management code that were specific
to running under the legacy iSeries hypervisor which is no
longer supported.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 10:54:59 +11:00
Stephen Rothwell b078766026 powerpc: clean up vio.c
This cleans up vio.c after the removal of the legacy iSeries platform.
It also removes some no longer referenced include files.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 10:35:23 +11:00
Stephen Rothwell 8ee3e0d696 powerpc: Remove the main legacy iSerie platform code
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-09 10:35:11 +11:00
Jiri Slaby 5dd5bc40f3 TTY: pdc_cons, use tty_port
Instead of digging a tty out of the tty_driver struct, which is not
defined to work, use tty_port properly. This includes proper tty
refcounting even though there is no possible race currently. But we
will need tty_port for tty buffers in the future anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:51:13 -08:00
Jiri Slaby 0b479d54ae TTY: pdc_cons, fix open vs pdc_console_tty_driver race
Assign the pointer to pdc_console_tty_driver (a tty_driver) earlier.
Otherwise the timer may dereference NULL.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:51:13 -08:00
Jiri Slaby 52b762f7a9 TTY: pdc_cons, fix open vs timer race
The timer is initialized too late. tty->open may fire an invalid
timer. So initialize the timer earlier using DEFINE_TIMER.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:51:13 -08:00
Jiri Slaby e380a81e34 TTY: pdc_cons, fix racy tty test
The tty->count test in the timer was racy. Let's remove the test and
properly delete the timer and wait for the body to finish using _sync
version of del_timer.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:51:13 -08:00
Jiri Slaby 6e9ebcfa20 TTY: simserial, final cleanup
* remove pointless checks (tty cannot be NULL at that points)
* fix some printks (use __func__, print text directly w/o using global
  strings)
* remove some empty lines

This is the last patch for simserial. Overall, the driver is 400 lines
shorter. Being now at 560 lines.

It was tested using ski with a busybox userspace.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:28 -08:00
Jiri Slaby f66279cd7d TTY: simserial, reindent some code
Make the code to conform to the standard. Also make it readable.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:28 -08:00
Jiri Slaby 8b91633056 TTY: simserial, fix includes
Use headers from linux/* instead of asm/. Remove declaration of
console_drivers, it's in linux/console.h already.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:28 -08:00
Jiri Slaby adb636fe08 TTY: simserial, remove useless comments
Or the obsolete ones like:
   "Let's have a little bit of fun"
I have never had fun with software. For fun, one needs hard-ware.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:28 -08:00
Jiri Slaby 458cd31a4c TTY: simserial, use tty_port_hangup
Convert shutdown to be tty_port_operations->shutdown. Then we can use
tty_port_hangup. (And we have to use tty_port_close.)

This means we no longer touch ASYNC_INITIALIZED, TTY_IO_ERROR. Also we
do not need to do any peculiar TTY logic in the file now.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:28 -08:00
Jiri Slaby 9aead90a7f TTY: simserial, use tty_port_open
So now we convert startup to be ->activate of tty_port. This means we
no longer care about INITIALIZED and TTY_IO_ERROR flags.

After we have ->activate much of the code may go as it duplicates what
tty_port_open does. In this case tty_port_open adds block_til_ready to
the path. But we do not define carrier hooks, so it is a noop.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:27 -08:00
Jiri Slaby 3a5c242324 TTY: simserial, properly refcount tty_port->tty
So that we will not be surprised in the ISR anymore.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:27 -08:00
Jiri Slaby 78e74d778a TTY: simserial, use tty_port_close_start
I.e. remove more copied bloat.

The only change is that we wait_until_sent now. Which is what we
really should do.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:27 -08:00
Jiri Slaby 3734303045 TTY: simserial, use tty_port_close_end
The code is identical except locking. But added locks to protect
counts do not hurt here. Rather the contrary.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:27 -08:00
Jiri Slaby 2fcd5caf6d TTY: simserial, remove some tty ops
All ->start, ->stop and ->wait_until_sent are empty and need not be
defined. The time to remove them is now.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:27 -08:00
Jiri Slaby 7f32f8dd34 TTY: simserial, define local tty_port pointer
And use it to make the code more readable.

Since tport doesn't conflict with port anymore and there are not many
tport accessors left, do also s/\<tport\>/port/g.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:27 -08:00
Jiri Slaby 3c4782dcd9 TTY: simserial no longer needs serialP
Let's do a spin-off of serial_state structure with only needed
elements.

And remove serialP crap from includes.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:27 -08:00
Jiri Slaby 98e3a9e6dd TTY: simserial, stop using serial_state->{line,icount}
* instead of line, use tty->index or an iterator
* icount is not made public, only the tx path increments it

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:26 -08:00
Jiri Slaby d88405d44f TTY: simserial, remove tmp_buf
It is totally unused.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:26 -08:00
Jiri Slaby fd2d7a6e60 TTY: simserial, remove static initialization
We do not use any of the preinitialized rs_state members for something
real. So there is no need to initialize them. At the places we used
them for printing, just print the values.

And since only one port is supported, get rid of the loop. This
simplifies simrs_init a heap. Thus we can handle fail paths in a
standard way without panicing.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:26 -08:00
Jiri Slaby 01bd730d92 TTY: amiserial/simserial, use flags from tty_port
This changes flags' type to ulong which is appropriate for all the
set/clear_bits performed in the drivers..

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:30:51 -08:00
Jiri Slaby 12c8035435 TTY: amiserial/simserial, use count from tty_port
Nothing special. Just remove count from serial_state and change all
users to use tty_port.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:30:51 -08:00
Jiri Slaby 799be6ff2f TTY: amiserial/simserial, use close delays from tty_port
Note that previously simserial set the delay to 0. So we preserve
that. BUT, is it correct?

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:30:50 -08:00
Jiri Slaby 87758791c9 TTY: amiserial/simserial, use tty_port
Add tty_port to serial_state and start using common tty port members
from tty_port in amiserial and simserial. The rest will follow one by
one.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:30:50 -08:00
Jiri Slaby 5e99d54587 TTY: simserial, pass tty down to functions
This avoids pain with tty refcounting and touching tty_port in the
future. It allows us to remove some state->tty tests because the tty
passed down to them can never be NULL.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:30:50 -08:00
Jiri Slaby 916b765675 TTY: serialP, merge serial_state and async_struct
This is the final step to get rid of the one of the structures.  A
further cleanup will follow. And I struct serial_state deserves cease
to exist after a switch to tty_port too.

While changing the lines, it removes also pointless tty->driver_data
casts.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:28:48 -08:00
Jiri Slaby 2f8c521a1d TTY: simserial, remove IRQ_T
We do not set ASYNC_SHARE_IRQ anywhere. And since IRQF_DISABLED is a
noop, pass zero to request_irq directly instead of this ugly macro.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:27:57 -08:00
Jiri Slaby 964105b501 TTY: simserial, remove support of shared interrupts
It never worked there. The ISR was never written for that kind of
stuff. So remove all that crap with a hash of linked lists and pass
the pointer directly to the ISR.

BTW this answers the question there:
  * I don't know exactly why they don't use the dev_id opaque data
  * pointer instead of this extra lookup table

-> Because they thought they will support more devices bound to a
single interrupt w/o IRQF_SHARED. They would need exactly the hash
there.

What I don't understand is rebinding of the interrupt in the shutdown
path. They perhaps meant to do just synchronize_irq? In any case, this
is all gone and free_irq there properly.

By removing the hash we save some bits (exactly NR_IRQS * 8 bytes of
.bss and over a kilo of .text):
before:
   text    data     bss     dec     hex filename
  19600     320    8227   28147    6df3 ../a/ia64/arch/ia64/hp/sim/simserial.o
after:
   text    data     bss     dec     hex filename
  18568     320      28   18916    49e4 ../a/ia64/arch/ia64/hp/sim/simserial.o

Note that a shared interrupt could not work too. request_irq requires
data parameter to be non-NULL. So the whole IRQ_T exercise was
pointless.

Finally, this helps us remove another two members of async_struct :).

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:27:57 -08:00
Jiri Slaby d852256389 TTY: simserial/amiserial, use one instance of other members
This means:
* close_delay
* closing_wait
* line
* port
* xmit_fifo_size

This actually fixes a bug in amiserial. It initializes one and uses
the other of the close delays. Yes, duplicating structure members is
evil.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:27:17 -08:00
Jiri Slaby 979b6d8976 TTY: simserial, use only one copy of async flags
The same as for amiserial. Use only one instance of the flags.

Also remove them from async_struct now. Nobody else uses them.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:27:17 -08:00
Jiri Slaby 9e12dd5fce simserial, bail out when request_irq fails
Without this, the code succeeds when the port is opened by root and we
get unwanted interrupts storm on the first key stroke.

Instead of that, tell the user we failed and that we won't continue. I
suppose, the code was copied from the serial layer where we may want
to change the irq number, so we must allow open even of the failing
port. This is not the case for this driver at all.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:26:31 -08:00
Jiri Slaby 6efb6b77ff hpsim, initialize chip for assigned irqs
Currently, when assign_irq_vector is called and the irq connected in
the simulator, the irq is not ready. request_irq will return ENOSYS
immediately. It is because the irq chip is unset.

Hence set the chip properly to irq_type_hp_sim. And make sure this is
done from both users of simulated interrupts.

Also we have to set handler here, otherwise we end up in
handle_bad_int resulting in spam in logs and no irqs handled. We use
handle_simple_irq as these are SW interrupts that need no ACK or
anything.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:26:30 -08:00
Jiri Slaby 035cfe5ac5 simserial, include some headers
And remove declarations which are already in the headers.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:26:30 -08:00
Jiri Slaby 0745d19abc hpsim, fix SAL handling in fw-emu
The switch-cases of SAL_FREQ_BASE generate non-relocatable code. The
same as for the ifs one level upper. This causes oopses early in boot
because the kernel jumps to the hell instead of the offset in sal
callback.

So use ifs here for SAL_FREQ_BASE decision too.

Isn't there any compiler directive or settings to solve that cleanly?

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:26:30 -08:00
Jiri Slaby c5f0508b99 TTY: amiserial, remove tasklet for tty_wakeup
tty_wakeup is safe to be called from all contexts. No need to schedule
a tasklet for that. Let's call it directly like in other drivers.

This allows us to kill another member of async_struct structure. (If
we remove the dummy uses in simserial.)

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:48:42 -08:00
Jiri Slaby 9c8efecc91 TTY: serialP, remove unused material
First, remove unused macro and rs_multiport_struct structure. Nobody
uses them at all.

Further, the 2 drivers (they are below) which use the rest of
structures from serialP.h (async_struct and serial_state) do not use
all the members. Remove the members:
* which are unused or
* which are only initialized and never used for something real.

Everybody should avoid the structures with a looong distance.

Finally, remove the ALPHA kludge MCR quirks. They are 1:1 copy from
8250.h. No need to redefine them here.

The 2 promised users of the structures:
arch/ia64/hp/sim/simserial.c
drivers/tty/amiserial.c

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:48:42 -08:00
Jiri Slaby 11ba8899f9 TTY: remove serialP.h inclusion from some files
All of them do not use the ugly interface defined in that header.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:47:02 -08:00
Jiri Slaby 885f8b0f8a TTY: iss/console, use tty_port
Even though the port is not used for anything real there yet, this
will change as tty buffers will be in tty_port in the near future. So
the port will be needed in all drivers.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:47:01 -08:00
Jiri Slaby c9ddb1d6e2 XTENSA: iss/console, fix potential deadlock
If the timer ticks while we are holding the spinlock, the system
deadlocks. It is due to synchronous del_timer.

So to fix that, use spinlocks that properly disable bottom halves.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:47:01 -08:00
Jiri Slaby 86e7e87463 XTENSA: iss/console, use setup_timer
Use setup_timer instead of explicit assignments.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:47:01 -08:00
Jiri Slaby 410235fd4d TTY: remove unneeded tty->index checks
Checking if tty->index is in bounds is not needed. The tty has the
index set in the initial open. This is done in get_tty_driver. And it
can be only in interval <0,driver->num).

So remove the tests which check exactly this interval. Some are
left untouched as they check against the current backing device count.
(Leaving apart that the check is racy in most of the cases.)

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:42:21 -08:00
Jiri Slaby 54089d4cdc TTY: srmcons, convert to use tty_port
This is needed because the tty buffer will become a tty_port member
later. That will help us to wipe out most of the races and checks for
the tty pointer in hot paths.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:42:21 -08:00
Jiri Slaby ee024d494a ALPHA: srmcons, fix racy singleton structure
The test and the assignment were racy. Make it really a singleton.
This is achieved by one global variable initialized at the module
init.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:42:21 -08:00
Jiri Slaby 5e88e6c4e8 ALPHA: srmcons, use timer functions
It makes the code more readable. We move the setup to the allocation
location because we need to initialize timers only once.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:42:21 -08:00
Jiri Slaby 2f16669d32 TTY: remove re-assignments to tty_driver members
All num, magic and owner are set by alloc_tty_driver. No need to
re-set them on each allocation site.

pti driver sets something different to what it passes to
alloc_tty_driver. It is not a bug, since we don't use the lines
parameter in any way. Anyway this is fixed, and now we do the right
thing.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:37:58 -08:00
Olof Johansson c66fcfa938 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Fix module build errors with CONFIG_OMAP4_ERRATA_I688
  ARM: OMAP: id: Add missing break statement in omap3xxx_check_revision
  ARM: OMAP2+: Remove apply_uV constraints for fixed regulator
  ARM: OMAP: irqs: Fix NR_IRQS value to handle PRCM interrupts
2012-03-08 10:56:12 -08:00
Tony Lindgren 4647ca5761 ARM: OMAP2+: Fix build for omap4 only builds with missing include of linux/bug.h
Found few more with randconfig generated .configs:

In file included from arch/arm/mach-omap2/prm-regbits-34xx.h:17,
                 from arch/arm/mach-omap2/vc.c:18:
arch/arm/mach-omap2/prm2xxx_3xxx.h: In function ‘omap2_prm_read_mod_reg’:
arch/arm/mach-omap2/prm2xxx_3xxx.h:239: error: implicit declaration of function ‘WARN’

In file included from arch/arm/mach-omap2/powerdomain44xx.c:22:
arch/arm/mach-omap2/prm2xxx_3xxx.h: In function ‘omap2_prm_read_mod_reg’:
arch/arm/mach-omap2/prm2xxx_3xxx.h:239: error: implicit declaration of function ‘WARN’

This is because omap2_prm functions are currently just stubs for
omap4 only builds.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-03-08 10:48:12 -08:00
Olof Johansson 990b07d952 Merge branch 'regulator' of git://github.com/hzhuang1/linux into next/drivers
* 'regulator' of git://github.com/hzhuang1/linux: (2 commits)
  regulator: Remove bq24022 regulator driver
  pxa: magician/hx4700: Convert to gpio-regulator from bq24022

  (plus update to v3.3-rc6)
2012-03-08 09:33:44 -08:00
Olof Johansson a58f67e70a Merge branch 'dt' of git://github.com/hzhuang1/linux into next/dt
* 'dt' of git://github.com/hzhuang1/linux: (6 commits)
  Document: devicetree: add OF documents for arch-mmp
  ARM: dts: append DTS file of pxa168
  ARM: mmp: append OF support on pxa168
  ARM: mmp: enable rtc clk in pxa168
  i2c: pxa: add OF support
  serial: pxa: add OF support

  (plus update to v3.3-rc6)
2012-03-08 09:27:07 -08:00
Olof Johansson acf346084b i.MX35/5 AIPS setup
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABCAAGBQJPV8fjAAoJEPFlmONMx+ezqucP/RbHPlXDted2trH1KXdstHI3
 5C/7DKPXB13n0TxbE3uMUWXjkQF5Y3sXPU8Cpdt2VUTmViRJTl8qpfmJQzZNx63U
 joq034p3gf9l82jw5/pguusDNdz04FEINORGqlfz/XdQvG42qtzi3pvhyJdA8Jnt
 wjvtHYVh9bvjxSO8ICtX5y8VSg1dSLLVjWXLUXoWAF8CI2dRJiPwaRVGgC0TFbVz
 l+Oi3ZEWvqYqbELLnNHlk4/PV3D5/4WUZxG3+YKViokCShKBv9NmtfV3Zp2+WNxZ
 w+2ZfXguSC0r7q7+0ZJC42U3svaD02FgU+4xWSK+whmW15rmm9HH33/sA5vXoLNW
 rvL5UyE/TO7dP7Vt0ocO0+ovjl3w3l7FgXqRxEoPOkinUeiAHfe5zFs/HSqhe+Za
 Kb+YOnQpwxVPZLiYl2LrGfaYTpFa6adD0Y+EZRPvj85Tb2WmquU+G+abdK4y0Qbz
 P3HDnA9G5+L1tw6ves2b+KYNVAdoiKD0FGBAmJI6WUAu1W+cQjTAXRpRonNADm2n
 Rei9TNlxLrOcd/j+yEuWTU9edGORDZPh/nJCKDcgqO7NygGQ41+FvUcdJuAq1fLk
 qW5iRMRimUVSLuzjN9136nEB4gUgr+2AcxKBw4CGX0hLNAaz/ObpP55qn53Wln/B
 O7h+iAXfcrEJojt5hzU9
 =a6Ra
 -----END PGP SIGNATURE-----

Merge tag 'imx35-imx5-aips-setup' of git://git.pengutronix.de/git/imx/linux-2.6 into next/soc

i.MX35/5 AIPS setup

Includes sync up to 3.3-rc6

* tag 'imx35-imx5-aips-setup' of git://git.pengutronix.de/git/imx/linux-2.6:
  ARM: mx35: Setup the AIPS registers
  ARM: mx5: Use common function for configuring AIPS
2012-03-08 09:20:29 -08:00
Kukjin Kim 48546cc0a5 ARM: S3C2440: Fixed build error for s3c244x
Fixed following:
arch/arm/mach-s3c2440/s3c244x.c: In function 's3c244x_restart':
arch/arm/mach-s3c2440/s3c244x.c:209: error: expected declaration or statement at end of input
make[1]: *** [arch/arm/mach-s3c24xx/s3c244x.o] Error 1
make: *** [arch/arm/mach-s3c24xx] Error 2

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-03-08 08:57:29 -08:00
Olof Johansson d60d506e6b Merge branch 'next/cleanup-s3c24xx' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup
* 'next/cleanup-s3c24xx' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (24 commits)
  ARM: S3C24XX: remove call to s3c24xx_setup_clocks
  ARM: S3C24XX: add get_rate for clk_p on S3C2416/2443
  ARM: S3C24XX: add get_rate for clk_h on S3C2416/2443
  ARM: S3C24XX: remove XXX_setup_clocks method from S3C2443
  ARM: S3C24XX: remove obsolete S3C2416_DMA option
  ARM: S3C24XX: Reuse S3C2443 dma for S3C2416
  ARM: S3C24XX: Fix indentation of dma-s3c2443
  ARM: S3C24XX: Move device setup files to mach directory
  ARM: S3C24XX: Consolidate Simtec extensions
  ARM: S3C24XX: move simtec-specific code to mach directory
  ARM: S3C24XX: Move common-smdk code to mach directory
  ARM: S3C24XX: Move s3c2443-clock.c to mach-s3c24xx
  ARM: s3c2410_defconfig: update s3c2410_defconfig
  ARM: S3C2443: move mach-s3c2443/* into mach-s3c24xx/
  ARM: S3C2440: move mach-s3c2440/* into mach-s3c24xx/
  ARM: S3C2416: move mach-s3c2416/* into mach-s3c24xx/
  ARM: S3C2412: move mach-s3c2412/* into mach-s3c24xx/
  ARM: S3C2410: move mach-s3c2410/* into mach-s3c24xx/
  ARM: S3C24XX: change the ARCH_S3C2410 to ARCH_S3C24XX
  ARM: S3C2410: move s3c2410_baseclk_add to clock.h
  ...
2012-03-08 08:53:14 -08:00
Jan Beulich a240ada241 x86: Include probe_roms.h in probe_roms.c
... to ensure that declarations and definitions are in sync.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Link: http://lkml.kernel.org/r/4F5888F902000078000770F1@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-03-08 10:57:35 +01:00
Jan Beulich c7e23289a6 x86/32: Print control and debug registers for kerenel context
While for a user mode register dump it may be reasonable to skip
those (albeit x86-64 doesn't do so), for kernel mode dumps these
should be printed to make sure all information possibly
necessary for analysis is available.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Link: http://lkml.kernel.org/r/4F58889202000078000770E7@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-03-08 10:57:35 +01:00
Jan Beulich 0d2bf4899d x86: Tighten dependencies of CPU_SUP_*_32
Building in support for either of these CPUs is pointless when
e.g. M686 was selected (since such a kernel would use cmov
instructions, which aren't available on these older CPUs).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Link: http://lkml.kernel.org/r/4F58875A02000078000770E0@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-03-08 10:57:34 +01:00
Tony Lindgren 6028505c29 ARM: OMAP2+: Fix section warnings for hsmmc_init_one
Otherwise we can get the following error depending on
the compiler:

WARNING: arch/arm/mach-omap2/built-in.o(.text+0xafe0):
Section mismatch in reference from the function omap_hsmmc_init_one()
to the function .init.text:omap_hsmmc_pdata_init()
The function omap_hsmmc_init_one() references
the function __init omap_hsmmc_pdata_init().
This is often because omap_hsmmc_init_one lacks a __init
annotation or the annotation of omap_hsmmc_pdata_init is wrong.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-03-07 20:03:44 -08:00
Tony Lindgren d9a5f4dd43 ARM: OMAP2+: Fix build issues with missing include of linux/bug.h
Otherwise we can get the following if bug.h is not included from kernel.h:

arch/arm/mach-omap2/powerdomain-common.c:
In function 'omap2_pwrdm_get_mem_bank_onstate_mask':
arch/arm/mach-omap2/powerdomain-common.c:64:3: error:
implicit declaration of function 'WARN_ON' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-03-07 17:29:34 -08:00
Olof Johansson 269f6a93f6 Merge branch 'fixes-non-critical-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/fixes-non-critical
* 'fixes-non-critical-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP3+: PM: VP: fix integer truncation error
  ARM: OMAP2+: PM: fix wakeupgen warning when hotplug disabled
  ARM: OMAP2+: PM: fix section mismatch with omap2_init_processor_devices()
  ARM: OMAP2: Fix section warning for n8x0 when CONFIG_MMC_OMAP is not set
  ARM: OMAP2+: Fix omap24xx_io_desc warning if SoC subtypes are not selected
  ARM: OMAP1: Fix section mismatch for omap1_init_early()
  ARM: OMAP1: Fix typo in lcd_dma.c
  ARM: OMAP: mailbox: trivial whitespace fix
  ARM: OMAP: Remove definition cpu_is_omap4430()
  ARM: OMAP2+: included some headers twice
  ARM: OMAP: clock.c: included linux/debugfs.h twice
  ARM: OMAP: don't build hwspinlock in vain
  ARM: OMAP2+: ads7846_init: put gpio_pendown into pdata if it's provided
  ARM: omap: pandora: fix usbhs platform data
  ARM: OMAP: sram: Add am33xx SRAM support (minimal)
  ARM: OMAP2+: id: Add am33xx SoC type detection
  ARM: OMAP2+: GPMC: Export gpmc_enable_hwecc and gpmc_calculate_ecc
  ARM: OMAP: dmtimer: fix missing content/correction in low-power mode support
2012-03-07 15:02:47 -08:00
Olof Johansson 62f3834359 Merge branch 'next/cleanup-use-static' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup
* 'next/cleanup-use-static' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: SAMSUNG: use static declaration when it is not used in other files
  ARM: S5PV210: use static declaration when it is not used in other files
  ARM: S5PC100: use static declaration when it is not used in other files
  ARM: S5P64X0: use static declaration when it is not used in other files
  ARM: S3C64XX: use static declaration when it is not used in other files
  ARM: S3C24XX: use static declaration when it is not used in other files
  ARM: EXYNOS: use static declaration when it is not used in other files
2012-03-07 14:45:28 -08:00
Dmitry Artamonow 795d5fd4b8 arm/tegra: add timeout to PCIe PLL lock detection loop
Tegra PCIe driver waits for PLL to lock using busy loop.
If PLL fails to lock for some reason, this leads to silent lockup
while booting (as PCIe code is not modular).

Fix by adding timeout, so if PLL doesn't lock in a couple
of seconds, just PCIe driver fails and machine continues to boot.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-03-07 14:39:55 -08:00
Dmitry Artamonow 448b98047c arm/tegra: fix harmony pinmux for PCIe
Commit 6e96aca397 (arm/tegra: Harmony PCIe: Don't touch pinmux)
removed runtime tri-state toggling for PCIe related pinmux groups,
but it seems that the fact that all of them are tri-state by default
has been overlooked. Change defaults for these groups to TEGRA_TRI_NORMAL.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-03-07 14:39:34 -08:00
Stephen Warren 0a25893597 ARM: tegra: update defconfig
Refresh tegra_defconfig:

New options enabled:
* PERF_EVENTS
* Tegra EMC scaling
* Support for all 4 CPUs on Tegra30
* AUTO_ZRELADDR for unified Tegra20+Tegra30 images
* CPU_FREQ/CPU_IDLE
* BLK_DEV_SR
* INPUT_EVDEV
* Regulators, including fixed, GPIO, TPS6586x
* Audio for Tegra+ALC5632 (for Paz00/Toshiba AC100)
* NVEC (staging, for Paz00/Toshiba AC100)
* IOMMU for Tegra20's GART and Tegra30's SMMU
* TEGRA_AES
* ext4, for trim support on SD/eMMC

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-03-07 14:38:49 -08:00
Olof Johansson 4d02be5a65 Merge branch 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup
* 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Fix build error after merge
2012-03-07 14:05:29 -08:00
Olof Johansson 412fe6b3a1 Merge branch 'fixes-non-critical' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/fixes-non-critical
* 'fixes-non-critical' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  Revert "ARM: OMAP2+: Fix multiple randconfig errors with SOC_OMAP and SOC_OMAP_NOOP"
2012-03-07 14:05:13 -08:00
Fabio Estevam 38bb3630bc ARM: mx35: Setup the AIPS registers
Setup the AIPS registers on mx35.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-07 21:29:57 +01:00
Fabio Estevam aa6a9fa1f2 ARM: mx5: Use common function for configuring AIPS
Now that a common imx_set_aips() function is available, use it on mx51 and mx53.

This lets the code smaller and cleaner.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-07 21:29:57 +01:00
Tony Lindgren 2b43e4e586 ARM: OMAP2+: Fix build error after merge
Commit 9890ce44 (ARM: get rid of asm/irq.h in asm/prom.h)
removed include of asm/irq.h in asm/prom.h. This commit
together with recent omap cleanup to remove io.h causes
build breakage:

arrch/arm/mach-omap2/control.c: In function 'omap3_ctrl_write_boot_mode':
arch/arm/mach-omap2/control.c:238: error:
'OMAP343X_CTRL_BASE' undeclared (first use in this function)
...

Fix this by including hardware.h directly where needed
instead of relying on asm/irq.h in asm/prom.h.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-03-07 09:03:03 -08:00
Linus Torvalds 4f262acfde Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM updates from Russell King.

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: 7358/1: perf: add PMU hotplug notifier
  ARM: 7357/1: perf: fix overflow handling for xscale2 PMUs
  ARM: 7356/1: perf: check that we have an event in the PMU IRQ handlers
  ARM: 7355/1: perf: clear overflow flag when disabling counter on ARMv7 PMU
  ARM: 7354/1: perf: limit sample_period to half max_period in non-sampling mode
  ARM: ecard: ensure fake vma vm_flags is setup
  ARM: 7346/1: errata: fix PL310 erratum #753970 workaround selection
  ARM: 7345/1: errata: update workaround for A9 erratum #743622
  ARM: 7348/1: arm/spear600: fix one-shot timer
  ARM: 7339/1: amba/serial.h: Include types.h for resolving dependency of type bool
2012-03-07 08:33:03 -08:00
Mark Salter 4cd7c0a03e C6X: fix KSTK_EIP and KSTK_ESP macros
There was a latent typo in the C6X KSTK_EIP and KSTK_ESP macros which
caused a problem with a new patch which used them. The broken definitions
were of the form:

  #define KSTK_FOO(tsk) (task_pt_regs(task)->foo)

Note the use of task vs tsk. This actually worked before because the
only place in the kernel which used these macros passed in a local
pointer named task.

Signed-off-by: Mark Salter <msalter@redhat.com>
2012-03-07 11:28:22 -05:00
Ingo Molnar a5c2edf576 Fix a RCU warning in MCE code
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAk9XRdIACgkQnVKoplY/kJOqKACeKlU+J9C4VbMUnHJkbO7BA9nc
 5w0An2bjAuFxHXQ7TJicEz3UrxJDuP7Y
 =KSvy
 -----END PGP SIGNATURE-----

Merge tag 'mce-fix-for-3.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras into x86/urgent

Fix a reproducible RCU warning in the MCE code

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-03-07 14:44:35 +01:00
Mark Brown 6f04247ba8 ARM: S3C64XX: Supply platform data for SPI on Cragganmore
Having to specify the platform data explicitly like this even though it
is provided as a default doesn't feel entirely elegant but there we are.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-07 04:27:50 -08:00
Mark Brown f73dc3db4f ARM: S3C64XX: Add some more Cragganmore module IDs to the table
Just IDs for diagnostics, nothing is actually supported. Not all of
these have board numbers assigned yet, these will be updated as the
numbers are assigned.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-07 04:13:20 -08:00
Kukjin Kim 60571f98d2 Merge branch 'topic/cleanup-use-static' into next/cleanup-use-static
Conflicts:
	arch/arm/mach-exynos/dma.c
	arch/arm/mach-s5p64x0/dma.c
	arch/arm/mach-s5pc100/dma.c
	arch/arm/mach-s5pv210/dma.c
2012-03-07 03:34:41 -08:00
Srivatsa S. Bhat b11e3d782b x86, mce: Fix rcu splat in drain_mce_log_buffer()
While booting, the following message is seen:

[   21.665087] ===============================
[   21.669439] [ INFO: suspicious RCU usage. ]
[   21.673798] 3.2.0-0.0.0.28.36b5ec9-default #2 Not tainted
[   21.681353] -------------------------------
[   21.685864] arch/x86/kernel/cpu/mcheck/mce.c:194 suspicious rcu_dereference_index_check() usage!
[   21.695013]
[   21.695014] other info that might help us debug this:
[   21.695016]
[   21.703488]
[   21.703489] rcu_scheduler_active = 1, debug_locks = 1
[   21.710426] 3 locks held by modprobe/2139:
[   21.714754]  #0:  (&__lockdep_no_validate__){......}, at: [<ffffffff8133afd3>] __driver_attach+0x53/0xa0
[   21.725020]  #1:
[   21.725323] ioatdma: Intel(R) QuickData Technology Driver 4.00
[   21.733206]  (&__lockdep_no_validate__){......}, at: [<ffffffff8133afe1>] __driver_attach+0x61/0xa0
[   21.743015]  #2:  (i7core_edac_lock){+.+.+.}, at: [<ffffffffa01cfa5f>] i7core_probe+0x1f/0x5c0 [i7core_edac]
[   21.753708]
[   21.753709] stack backtrace:
[   21.758429] Pid: 2139, comm: modprobe Not tainted 3.2.0-0.0.0.28.36b5ec9-default #2
[   21.768253] Call Trace:
[   21.770838]  [<ffffffff810977cd>] lockdep_rcu_suspicious+0xcd/0x100
[   21.777366]  [<ffffffff8101aa41>] drain_mcelog_buffer+0x191/0x1b0
[   21.783715]  [<ffffffff8101aa78>] mce_register_decode_chain+0x18/0x20
[   21.790430]  [<ffffffffa01cf8db>] i7core_register_mci+0x2fb/0x3e4 [i7core_edac]
[   21.798003]  [<ffffffffa01cfb14>] i7core_probe+0xd4/0x5c0 [i7core_edac]
[   21.804809]  [<ffffffff8129566b>] local_pci_probe+0x5b/0xe0
[   21.810631]  [<ffffffff812957c9>] __pci_device_probe+0xd9/0xe0
[   21.816650]  [<ffffffff813362e4>] ? get_device+0x14/0x20
[   21.822178]  [<ffffffff81296916>] pci_device_probe+0x36/0x60
[   21.828061]  [<ffffffff8133ac8a>] really_probe+0x7a/0x2b0
[   21.833676]  [<ffffffff8133af23>] driver_probe_device+0x63/0xc0
[   21.839868]  [<ffffffff8133b01b>] __driver_attach+0x9b/0xa0
[   21.845718]  [<ffffffff8133af80>] ? driver_probe_device+0xc0/0xc0
[   21.852027]  [<ffffffff81339168>] bus_for_each_dev+0x68/0x90
[   21.857876]  [<ffffffff8133aa3c>] driver_attach+0x1c/0x20
[   21.863462]  [<ffffffff8133a64d>] bus_add_driver+0x16d/0x2b0
[   21.869377]  [<ffffffff8133b6dc>] driver_register+0x7c/0x160
[   21.875220]  [<ffffffff81296bda>] __pci_register_driver+0x6a/0xf0
[   21.881494]  [<ffffffffa01fe000>] ? 0xffffffffa01fdfff
[   21.886846]  [<ffffffffa01fe047>] i7core_init+0x47/0x1000 [i7core_edac]
[   21.893737]  [<ffffffff810001ce>] do_one_initcall+0x3e/0x180
[   21.899670]  [<ffffffff810a9b95>] sys_init_module+0xc5/0x220
[   21.905542]  [<ffffffff8149bc39>] system_call_fastpath+0x16/0x1b

Fix this by using ACCESS_ONCE() instead of rcu_dereference_check_mce()
over mcelog.next. Since the access to each entry is controlled by the
->finished field, ACCESS_ONCE() should work just fine. An rcu_dereference
is unnecessary here.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Suggested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
2012-03-07 11:44:29 +01:00
Heiko Stuebner 2e5ac94366 ARM: S3C24XX: remove call to s3c24xx_setup_clocks
As the clocks can calculate their rate themself now, there is no
need to set it statically.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-07 02:00:05 -08:00
Heiko Stuebner 9edc12a1a9 ARM: S3C24XX: add get_rate for clk_p on S3C2416/2443
Currently the rate of clk_p is calculated once and set through the
s3c24xx_setup_clocks call. As the clk_p is a child of clk_h we can
evaluate its divider and calculate the rate in get_rate.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-07 02:00:04 -08:00
Heiko Stuebner b681bfcf48 ARM: S3C24XX: add get_rate for clk_h on S3C2416/2443
Currently the rate of clk_h is calculated once and set through the
s3c24xx_setup_clocks call. As the clk_h is a child of the prediv
we can evaluate its divider and calculate the rate in get_rate.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-07 02:00:04 -08:00
Heiko Stuebner 7d9811f11f ARM: S3C24XX: remove XXX_setup_clocks method from S3C2443
s3c2443_common_setup_clocks is always called through
s3c2443_common_init_clocks, so there is no need to call it separately.
It was also called twice through this separate call.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-07 02:00:04 -08:00
Heiko Stuebner 714cc3a574 ARM: S3C24XX: remove obsolete S3C2416_DMA option
The S3C2416 now reuses the dma selection of the S3C2443.
Therefore it is not necessary to keep the S3C2416_DMA option around.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-07 01:53:23 -08:00
Heiko Stuebner 46cdaba11d ARM: S3C24XX: Reuse S3C2443 dma for S3C2416
The dma controller is similar in S3C2443 and S3C2416 and has also
the same register layout with the same REQSEL-bits in the source
select.

The only small difference is the SIO channel of the S3C2443 for the
non-hsmmc controller which is not present on S3C2416/2450 and
second spi channel which is not present on the S3C2416.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-07 01:53:17 -08:00