Commit graph

74895 commits

Author SHA1 Message Date
Tony Lindgren dc843280c9 ARM: OMAP: Merge plat/multi.h into plat/cpu.h
This is private to cpu.h and no other places should
need to include it and we can drop the include
in mach-omap2/io.c.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-18 16:13:41 -07:00
Tony Lindgren 2a296c8f89 ARM: OMAP: Make plat/omap_hwmod.h local to mach-omap2
Let's make omap_hwmod local to mach-omap2 for
ARM common zImage support.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-18 16:05:55 -07:00
Richard Kuo e1858b2a21 Hexagon: Copyright marking changes
Code Aurora Forum (CAF) is becoming a part of Linux Foundation Labs.

Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2012-10-18 17:07:21 -05:00
David Howells 3ed8d11585 UAPI: (Scripted) Disintegrate arch/hexagon/include/asm
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2012-10-18 17:07:19 -05:00
Jussi Kivilinna 32bec973a8 crypto: aesni - fix XTS mode on x86-32, add wrapper function for asmlinkage aesni_enc()
Calling convention for internal functions and 'asmlinkage' functions is
different on x86-32. Therefore do not directly cast aesni_enc as XTS tweak
function, but use wrapper function in between. Fixes crash with "XTS +
aesni_intel + x86-32" combination.

Cc: stable@vger.kernel.org
Reported-by: Krzysztof Kolasa <kkolasa@winsoft.pl>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-18 14:01:33 -07:00
Will Deacon 8f34a1da35 arm64: ptrace: use HW_BREAKPOINT_EMPTY type for disabled breakpoints
If a debugger tries to zero a hardware debug control register, the
kernel will try to infer both the type and length of the breakpoint
in order to sanity-check against the requested regset type. This will
fail because the encoding will appear as a zero-length breakpoint.

This patch changes the control register setting so that disabled
breakpoints are treated as HW_BREAKPOINT_EMPTY and no further
sanity-checking is required.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2012-10-18 20:15:34 +01:00
Will Deacon 7797d17c59 arm64: ptrace: make structure padding explicit for debug registers
The user_hwdebug_state structure contains implicit padding to conform to
the alignment requirements of the AArch64 ABI (namely that aggregates
must be aligned to their most aligned member).

This patch fixes the ptrace functions operating on struct
user_hwdebug_state so that the padding is handled correctly.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2012-10-18 20:15:31 +01:00
Catalin Marinas 16dd46bb78 arm64: No need to set the x0-x2 registers in start_thread()
For historical reasons, ARM used to set r0-r2 in start_thread() to the
first values on the user stack when starting a new user application. The
same logic has been inherited in AArch64. The x0 register is overridden
by the sys_execve() return value so it's always zero on success. The x1
and x2 registers are ignored by AArch64 and EABI AArch32 applications,
so we can safely remove the register setting for both native and compat
user space.

This also fixes a potential fault with the kernel accessing user space
stack directly.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
2012-10-18 20:14:01 +01:00
Catalin Marinas f71a1a4266 arm64: Ignore memory blocks below PHYS_OFFSET
According to Documentation/arm64/booting.txt, the kernel image must be
loaded at a pre-defined offset from the start of RAM so that the kernel
can calculate PHYS_OFFSET based on this address. If the DT contains
memory blocks below this PHYS_OFFSET, report them and ignore the
corresponding memory range.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2012-10-18 20:14:00 +01:00
Catalin Marinas c60b0c2817 arm64: Fix the update_vsyscall() prototype
With commit 576094b7 (time: Introduce new GENERIC_TIME_VSYSCALL) the old
update_vsyscall() prototype is no longer available. This patch updates
the arm64 port.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: John Stultz <john.stultz@linaro.org>
2012-10-18 20:14:00 +01:00
Catalin Marinas fea2acaa5c arm64: Select MODULES_USE_ELF_RELA
With commit 786d35d4 (make most arch asm/module.h files use
asm-generic/module.h) arm64 needs to enable MODULES_USE_ELF_RELA for
loadable modules.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Will Deacon <Will.Deacon@arm.com>
2012-10-18 20:11:54 +01:00
Linus Torvalds d63e210ef1 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS fixes from Ralf Baechle:
 "Random small fixes across the MIPS code."

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: CMP: Fix physical core number calculation logic
  MIPS: JZ4740: Forward declare struct uart_port in header.
  MIPS: JZ4740: Fix '#include guard' in serial.h
  MIPS: hugetlbfs: Fix hazard between tlb write and pagemask restoration.
  MIPS: Restore pagemask after dumping the TLB.
  MIPS: Hugetlbfs: Handle huge pages correctly in pmd_bad()
  MIPS: R5000: Fix TLB hazard handling.
  MIPS: tlbex: Deal with re-definition of label
  MIPS: Make __{,n,u}delay declarations match definitions and generic delay.h
2012-10-18 11:49:39 -07:00
Linus Torvalds a0a6a39ecb Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc fixes from Benjamin Herrenschmidt:
 "Here are a handful of powerpc related fixes."

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  cpuidle/powerpc: Fix snooze state problem in the cpuidle design on pseries.
  cpuidle/powerpc: Fix smt_snooze_delay functionality.
  cpuidle/powerpc: Fix target residency initialisation in pseries cpuidle
  powerpc: Build fix for powerpc KVM
  Revert "powerpc/perf: Use pmc_overflow() to detect rolled back events"
2012-10-18 11:48:48 -07:00
Linus Torvalds ec351832bc Sound fixes for 3.7-rc2
Significant changes are:
 - A regression fix for the new HD-audio LPIB delay counting,
   VGA-switcheroo race fix
 - ASoC ams-delta fix for the broken driver loading
 
 Otherwise a collection of mostly small / trivial fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJQgArvAAoJEGwxgFQ9KSmk91wP/2VHQ7GVshkiVCcBeRo57X3Z
 4Lmt8tEm55swC/issMhRYmzFiRHQHpwEfYhXHfntjxqI9siDRGaqoFoGosV68BPp
 wXA2vdcbYoZ2yxxhZbwqjzOWHkM45HM/NL6l2PGVdsn69KMNLom8TK2aMqZvy0k0
 S/kCbsNlgKLglsfXDhId8ITofC/mqTp/6PV+LKslJeFaK9jdqWYsQMjDlcOObP+Q
 vpHe++8BqbhYg3N8SwQKO7RDwlr9JqDaMJTVci8jkMHu0+fmUOCqXWTcOW+x49zD
 YI7rdYL8Mfsv+nsn3VAg0c/ulbFOqaFzse6LvgGbzAMl1lI4dm5aCxwOsHKn6ake
 VUkUqSui5saYaacBSEA4SXE10RfGUHPNjWb6sasFxGvw2ShFajcIMCt34BIieUFz
 yv7D8sagRmJVmnMlZuuGmqrf2FK7bWKhrfOodGesyBwHtmU7AYnZnU9HSjROsIo9
 yn53kt9NRFsy2l5CVLDGz4fDbqv9w9NZV6L+7rCReityNdWTaxlV60n8qMION/dq
 8hVX2J030kY2MqUQ+XXfj1Hje6lYjVW+TW/2KfMYABz1CJ4ZJjaF8uwTo5DUoEdv
 4Pumx7sYEMkaEUD8EIsRnoaNBXVTYNbtwnmlt1jlDMfZReVboIWzwjKmsC6Ug/ge
 hhKKAAO0KODOZyuj9cxE
 =bW/T
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Significant changes are:
   - A regression fix for the new HD-audio LPIB delay counting,
     VGA-switcheroo race fix
   - ASoC ams-delta fix for the broken driver loading

  Otherwise a collection of mostly small / trivial fixes."

* tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: emu10k1: add chip details for E-mu 1010 PCIe card
  ALSA: hda - Always check array bounds in alc_get_line_out_pfx
  ASoC: bells: Correct typo in sub speaker DAI name for WM5110
  ALSA: hda - Stop LPIB delay counting on broken hardware
  ALSA: hda - Fix registration race of VGA switcheroo
  ALSA: hda - Clean up superfluous position_fix list entries
  ALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new()
  ASoC: codecs: da9055: Minor improvement in ALC calibration process
  ASoC: dmaengine: Correct Makefile when sound is built as module
  ASoC: fsi: don't reschedule DMA from an atomic context
  ASoC: fix documentation in soc-jack
  ARM: pxa: Fix build error caused by sram.h rename
  ASoC: wm2200: Fix non-inverted OUT2 mute control
  ASoC: wm2200: Use rev A register patches on rev B
  ASoC: bells: Correct typo in sub speaker DAI name for WM5110
  ASoC: ams-delta: Convert to use snd_soc_register_card()
  ASoC: omap-mcpdm: Remove OMAP revision check
  ASoC: Fix wrong include for McPDM
  ASoC: omap-abe-twl6040: Fix typo of Vibrator
  ASoC: twl6040: Fix Stream DAPM mapping
2012-10-18 11:47:07 -07:00
Michael Walle 1243163494 ARM: kirkwood: fix buttons on lsxl boards
Change event type to switch for the power and autopower switches.
Additionally, this patch aligns the keycodes with the other linkstation
boards already supported by linux.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-18 17:07:23 +00:00
Michael Walle a54841e552 ARM: kirkwood: fix LEDs names for lsxl boards
Don't use the specific board name in a the common device tree include file.
Instead use the common name 'lsxl'.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-18 17:07:14 +00:00
Jason Gunthorpe 1e9c06fb2b ARM: Kirkwood: fix disabling CACHE_FEROCEON_L2
Move the CACHE_FEROCEON_L2 test to kirkwood_l2_init, since linking
fails on the reference to feroceon_l2_init.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-18 17:04:24 +00:00
jerin jacob 0cc40dac86 MIPS: CMP: Fix physical core number calculation logic
The CPUNum Field in EBase register is 10bit wide, so after 1 bit right
shift, the mask value should be 0x1ff.

Signed-off-by: jerin jacob <jerinjacobk@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4420/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-10-18 11:45:41 +02:00
Olof Johansson 327f81c455 Depends:
- Based against v3.7-rc1
  - Latest changes to arch/arm/mm/cache-tauros2.c
     c2b7e05 ARM: cache: add dt support for tauros2 cache
 
 Misc. fixes for latest changes to mach-dove/
 Fixes build breakage for mach-dove
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJQfutwAAoJEAi3KVZQDZAeJlYH/2n8rEqGCrZuU16XVl3Hwc5q
 mUkF0PexHDnGGNrgfOEAIaouG3rCTVVdj+NTqnz3gK8jaJHF06tfhpwZaxymDFzW
 m4Lt45IuDvU5jEuCBm1IDHWHLro/73YepZJJRt9yAwI1DdWAhUBYLS8cd7fIoLAJ
 th0TI7PObmHRVlY2mS+ByuU5wnqV5mJMMPN6oU4RzO91rNuhoQRm8WvjzEs+tSfU
 GluD05p/bm3dL9Aq6146h80CZn3W4SVIKeS2l/GdQV6bqaIUvsp0F3xfzggcrcLF
 rZxOom72BgnEzA1enu+adJwKY8dHxOAZ4Iuf4HUXI5DKVfVCOrmJmWfp0mS8oyc=
 =RP8E
 -----END PGP SIGNATURE-----

Merge tag 'mvebu_dove_late_fixes_for_v3.7' of git://git.infradead.org/users/jcooper/linux into fixes

From Jason Cooper:

Misc. fixes for latest changes to mach-dove/
Fixes build breakage for mach-dove

* tag 'mvebu_dove_late_fixes_for_v3.7' of git://git.infradead.org/users/jcooper/linux:
  ARM: dove: Add crypto engine to DT
  ARM: dove: Remove watchdog from DT
  ARM: dove: Restructure SoC device tree descriptor
  ARM: dove: Fix clock names of sata and gbe
  ARM: dove: Fix tauros2 device tree init
  ARM: dove: Add pcie clock support
2012-10-17 17:09:37 -07:00
Olof Johansson b5beb20d03 A boot problem fix for am33xx beaglebone caused by GPMC,
a regression fix for local timer, and a clockdomain locking fix.
 Also few minor fixes for boot time and sparse warnings.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQftwiAAoJEBvUPslcq6Vz0nAQANzNA5Ek5QOE3h77u+fUeYr2
 +zCltDpJdv5ICTYPTbHeckrnaVqK+0udV/Z98iJ4jlraslfAwaIdIx9WDXc+VVic
 grBhROiHx6OsqK0+hpkPM75RiYNJsVBzQ1BY5hdvJwVTiu7GnM+5KcKKPGEr52QA
 ugZmweaJZ5/8flqJKzmVkmYA0EtKcwBEM3YUvYHhIZDol96ec9LX2FT1bUo33duz
 fRq0uZvYgpSSVCiWedt74rzc4oYddMtIiYeQLLTz4bxsMjjgJT1zTEOlJ8TM5Ijl
 XGdwoC9pBhM6vjCGcS2tyUrA3483LvT8ngL8SX3HkrkKus2sdMEtmotskB5xSGSQ
 al9kMBu9EbJE/1I6AG15pUhP6SB+AiRwFOrBZbaavVbeA9b+KykxuYAUyhj/pEQj
 AaC+u46QlhqT4LX2sQPEhosJLRMNucFfs/dkoLM451YzcSA4SEDbHcoxMJMEqpNo
 iLzAuZJygGJlMqJ1OvLNTs86e+3rwZ0jS2T/7M6TUhjoiyUVXPIJooredlq+DTGT
 g6/sQfpqXqcl99a3snzvnS0VjmfSpErg31TD2hPBmmSCG0cw/24vDDHrDACKazzF
 bcCU/2kEfIH/IOKdSvHmIAlhGIFu6aj2HzxTyoOBdH8DMm44pGzasabZ/m9hBU8i
 AFJh28CYM2++pmHmkUF9
 =4meh
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.7-rc1/fixes-take5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

From Tony Lindgren:

A boot problem fix for am33xx beaglebone caused by GPMC,
a regression fix for local timer, and a clockdomain locking fix.
Also few minor fixes for boot time and sparse warnings.

* tag 'omap-for-v3.7-rc1/fixes-take5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Allow kernel to boot even if GPMC fails to reserve memory
  ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable
  ARM: OMAP4: devices: fixup OMAP4 DMIC platform device error message
  ARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fck
  ARM: OMAP: resolve sparse warning concerning debug_card_init()
  ARM: OMAP4: Fix twd_local_timer_register regression
2012-10-17 17:05:25 -07:00
Olof Johansson b08d48414e ARM: tegra: fixes for 3.7-rc2
This branch contains a couple small fixes for Tegra for 3.7.
 
 * A fix for another clock rate calculation overflow
 * A revert of a change that removed the "timer" clock on Tegra, coupled
   with a fix for the confusing symbol name clash that triggered it.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJQfzn3AAoJEMzrak5tbycxAOEQAIWu3M+9SeKD68QE3yVSuyBL
 zKAQc5/aZINZxVpR54d8ywIJ7XlLkYatYvniv3x9tyiQ9VZ9b+G63NGHyolAFEjE
 4wOWpJ0UmKdEIkJIGTqiFoAifzSjRaoSZcB7Mu+HpY+COKcYeey6riPqNo8KtNTp
 u01qUg1iTwLiNHq79A/4LGs0XcVLDnsVK3xxuNYSeCGBRHXaAYeJgk6BmUJ6WMKv
 0lKdlGOQN5qKcwvJUkP6fqigcmAJ12MD1MLEDOAPh230h7tUzPLOqydcqPQG6E7M
 zQyiRzJBqxO/tbEkc3ZPaPAjgRARlU92PSqIcg4XTnr7B+TmBkgsfUS7L8n+1lXx
 UvPh4cmfj9QAjelwZkxqYU6AtKsLRXUijGfV/BWaHoUvfd/9Sz3VlL5octkLrKfl
 EzXJ7fG4nX9DRoszAEGAHl9Pv60bcdg0lMiHbY6Ot+AJPLccZqz9MkRTs/GLBhZq
 btxq3zi66pw1SX8MVH2Yn5fO6ZxXtOz1XnypAd/T3oBcuxPGkQqULXTLpmThPDYV
 OILg67mHHpzdF1LVLTZoRBateGFyiwTWpy8ChVTSepriUzdfbyT2fZwvo4n0ryY9
 lN2xzuuo+4upw2GWFT1+mJ8dpsA7MDo3TwTdIlSLzuN7gSW59U9C5zpJYDFXMscK
 C4FYIKmUra9G7dQC3xBr
 =Cjt7
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-3.7-fixes-for-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into fixes

From Stephen Warren: ARM: tegra: fixes for 3.7-rc2

This branch contains a couple small fixes for Tegra for 3.7.

* A fix for another clock rate calculation overflow
* A revert of a change that removed the "timer" clock on Tegra, coupled
  with a fix for the confusing symbol name clash that triggered it.

* tag 'tegra-for-3.7-fixes-for-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra:
  ARM: tegra: add tegra_timer clock
  ARM: tegra: rename tegra system timer
  ARM: tegra30: clk: Fix output_rate overflow

Signed-off-by: Olof Johansson <olof@lixom.net>
2012-10-17 17:04:42 -07:00
Deepthi Dharwar 83dac59409 cpuidle/powerpc: Fix snooze state problem in the cpuidle design on pseries.
Earlier without cpuidle framework on pseries, the native arch
idle routine comprised of both snooze and nap
states.  smt_snooze_delay variable was used to delay
the idle process entry to deeper idle state like  nap.
With the coming of cpuidle, this arch specific idle was replaced
by two different idle routines, one for supporting snooze and other
for nap. This enabled addition of more
low level idle states on pseries in the future.

On adopting the generic cpuidle framework for POWER systems,
the decision of which idle state to choose from,  given a predicted
idle time is taken by the menu governor based on
target_residency and  exit_latency of the idle states.
target_residency is the minimum time to be resident in that idle state.
Exit_latency is time taken to exit out of idle state.
Deeper the idle state, both the target residency and exit latency
would be higher.

In the current design, smt_snooze_delay is used as target_residency
for the  snooze state which is incorrect, as it is not the
minimum but the maximum duration to be in snooze state.
This would  result in the governor in taking bad decision,
as presently target_residency of nap < target_residency of snooze
inspite of nap being deeper idle state.

This patch aims to fix this problem by replacing the smt_snooze_delay loop
in snooze state, with the need_resched()  as the governor is aware of
entry and exit of various idle transitions based on which
next idle time prediction.

The governor is intelligent enough to determine the idle state the needs to
be transitioned to and maintains a whole of heuristics including
io load, previous idle states predictions etc for the same, based on
which idle state entry decision is taken.

With this fix, of setting target_residency of snooze to 0
					     nap to smt_snooze_delay
if the predicted idle time is less
than smt_snooze_delay (target_residency of nap)
value governor would pick snooze state, else nap. This adhers to the
previous native idle design.

Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-10-18 10:57:25 +11:00
Deepthi Dharwar 8ea959a17f cpuidle/powerpc: Fix smt_snooze_delay functionality.
smt_snooze_delay was designed to  delay idle loop's nap entry
in the native idle code before it got  ported over to use as part of
the cpuidle framework.

A -ve value  assigned to smt_snooze_delay should result in
busy looping, in other words disabling the entry to nap state.

	- https://lists.ozlabs.org/pipermail/linuxppc-dev/2010-May/082450.html

This particular functionality can be achieved currently by
echo 1 > /sys/devices/system/cpu/cpu*/state1/disable
but it is broken when one assigns -ve value to  the smt_snooze_delay
variable either via sysfs entry or ppc64_cpu util.

This patch aims to fix this, by disabling nap state when smt_snooze_delay
variable is set to -ve value.

Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-10-18 10:57:24 +11:00
Deepthi Dharwar 817deb05df cpuidle/powerpc: Fix target residency initialisation in pseries cpuidle
Remove the redundant target residency initialisation in pseries_cpuidle_driver_init().
This is currently over-writing the residency time updated as part of the static
table, resulting in  all the idle states having the same target
residency of 100us which is incorrect. This may result in the menu governor making
wrong state decisions.

Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-10-18 10:57:24 +11:00
Aneesh Kumar K.V ce236ab576 powerpc: Build fix for powerpc KVM
Fix build failure for powerpc KVM by adding missing VPN_SHIFT definition
and the ';'

arch/powerpc/kvm/book3s_32_mmu_host.c: In function 'kvmppc_mmu_map_page':
arch/powerpc/kvm/book3s_32_mmu_host.c:176: error: 'VPN_SHIFT' undeclared (first use in this function)
arch/powerpc/kvm/book3s_32_mmu_host.c:176: error: (Each undeclared identifier is reported only once
arch/powerpc/kvm/book3s_32_mmu_host.c:176: error: for each function it appears in.)
arch/powerpc/kvm/book3s_32_mmu_host.c:178: error: expected ';' before 'next_pteg'
arch/powerpc/kvm/book3s_32_mmu_host.c:190: error: label 'next_pteg' used but not defined
make[1]: *** [arch/powerpc/kvm/book3s_32_mmu_host.o] Error 1

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-10-18 10:37:52 +11:00
Benjamin Herrenschmidt 72523d8082 Revert "powerpc/perf: Use pmc_overflow() to detect rolled back events"
This reverts commit 813312110b.

This revert was requested by the author of the patch as it seems
to cause system hangs with some low frequency events
2012-10-18 10:36:11 +11:00
Linus Torvalds 985c9e615a UAPI fixes 2012-10-17
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAUH60qBOxKuMESys7AQKQkw/+OB9DOP86qLEpNBNt5Ue4Ee8G6F6oj32M
 eUIH71iD9HWVbEsWwwhXZmZcGOJzLbfX4cN2FIiFl4Jxxj3NwDE7GJMRY2sOBp+q
 SYrUVahcpHM4CDaFX6778pSAicM7cb7F5FyPPF7C0y39bor/Znm9SMmP83oyYcwo
 smYO6NVl3Qi9b0xlHIYLE3BadO7SIGHt5crqDqZMNue1jiTox/4lliIIGer4rr3q
 NaJjW2P19pG+ok0HNzHmhBKp+wpila9+TgQHsZjE+u6DizGsxxq6fiPi6A8EWAA/
 mEPJQW73qeNA/kzEwjmvEoVNoOd+X3kT+cpaMegKT4BQdLyi6LtAlhw5RMXLPucd
 KvmYTFxcMxxNlQbD28hCdm1kTj6cOaZS96bpz4mwYXMOlljLyi49XEceh7G9ue1S
 0fOds/maCLPNcxyThcrP12pIn3Ou9ZpL7UjQKvNeZirVed25hi2lkbza9UeRRYRu
 y13ELZKges9I2BQ3moMOSZ7TnUGepP8ohnVJnE8w7hegrz2L7WkNPdbuYEV5lqoP
 jJVtf5pjvjhLAGUPvzWWgH2sbV12U+Fi35A5+YELoqd+OXU/gCSU1YeeeotAFdst
 gka9HloiYQHSWLbj/1SXUo058WI6/dNwZcj1KznJrBkk87V48SM4BPsZ4zbt7nww
 19Fr3cD7YMY=
 =UV14
 -----END PGP SIGNATURE-----

Merge tag 'uapi-fixes-20121017' of git://git.infradead.org/users/dhowells/linux-headers

Pull misc UAPI fixes from David Howells:
 "They do a number of things:

  (1) Import a patch from Catalin Marinas to extend the generic-y in
      Kbuild facility to uapi directories.

  (2) Make arch/tile's ucontext.h file use (1) and remove the header-y
      line from the kernel internal side of things.

  (3) Remove some now-empty conditional bits from include/linux/Kbuild.
      The contents got moved to the UAPI side of things along with new
      conditionals.

  (4) Deal with now-empty files:

     (a) Empty Kbuild files under include/ get removed.

     (b) Empty Kbuild files under arch/ get comments to hold them as
         they are likely to end up with generic-y or genhdr-y lines.
         Deleting them appears to work if we want to go that route.

     (c) Put a comment into uapi/asm-generic/kvm_para.h to prevent the
         patch program from deleting that, and made the arches with
         empty kvm_para.h uapi files use that instead of having their
         own files.

     (d) Put comments into four other empty uapi/ headers to prevent the
         patch program from deleting them.

  A question: Is this the right way to deal with the now-empty Kbuild
  files?

  The ones under include/ are unlikely to be used - even for generated
  files, I think - so getting rid of them is probably okay.  Once all
  the bits are in, we can probably remove all the Kbuild files under
  include/ that aren't also under include/uapi/.

  The ones under arch/ are more of an issue because of the potential for
  generic-y and genhdr-y."

* tag 'uapi-fixes-20121017' of git://git.infradead.org/users/dhowells/linux-headers:
  UAPI: Make arch/sparc/include/uapi/asm/sigcontext.h non-empty
  UAPI: Make arch/sh/include/uapi/asm/hw_breakpoint.h non-empty
  UAPI: Make arch/mn10300/include/uapi/asm/setup.h non-empty
  UAPI: Put a comment into uapi/asm-generic/kvm_para.h and use it from arches
  UAPI: The tile arch uses the generic ucontext.h file
  UAPI: Place comments in empty arch Kbuilds to make them non-empty
  UAPI: Remove empty non-UAPI Kbuild files
  UAPI: Remove empty conditionals from include/linux/Kbuild
  UAPI: Make uapi/linux/irqnr.h non-empty
  uapi: Allow automatic generation of uapi/asm/ header files
2012-10-17 13:40:22 -07:00
Linus Torvalds ccbfddb78c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc fixes from David Miller:
 "Two sparc64 perf bug fixes and add a sysrq facility so I can diagnose
  these kinds of problems more quickly in the future."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Fix bit twiddling in sparc_pmu_enable_event().
  sparc64: Add global PMU register dumping via sysrq.
  sparc64: Like x86 we should check current->mm during perf backtrace generation.
2012-10-17 12:40:44 -07:00
Tony Lindgren 25c7d49ed4 ARM: OMAP: Make omap_device local to mach-omap2
Let's make omap_device local to mach-omap2 for
ARM common zImage support.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 12:08:40 -07:00
Tony Lindgren 622297fdec ARM: OMAP: Make plat/sram.h local to plat-omap
We can move this from plat to be local to plat-omap
for common ARM zImage support.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 12:04:34 -07:00
Tony Lindgren a8f7445c7b ARM: OMAP: Move plat/led.h to include/linux/platform_data
We need to move this away from plat for ARM common
zImage support.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 12:03:18 -07:00
Tony Lindgren e6a6e5ad17 ARM: OMAP: Make plat/common.h local to mach-omap1 and mach-omap2
We cannot keep this in plat/common.h for common zImage support.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 11:58:54 -07:00
Tony Lindgren 3a8761c027 ARM: OMAP: Split plat-omap/i2c.c into mach-omap1 and mach-omap2
There's no need to keep the device related things in the
common i2c.c as omap2+ is using hwmod. Split the code to
mach-omap1 and mach-omap2 parts and only leave common
code to plat-omap/i2c.c.

Note that as omap1 only has one i2c controller, we can
now remove the old device related macros.

Reviewed-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 11:36:50 -07:00
Tony Lindgren 8599e7c587 ARM: OMAP2+: Make board-zoom.h local
This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 11:36:46 -07:00
Tony Lindgren 54b693d467 ARM: OMAP1: Move plat/tc.h to mach/tc.h for omap1
We cannot keep this in plat as it causes problems
with the ARM single zImage support.

Cc: Felipe Balbi <balbi@ti.com>
Cc: linux-pcmcia@lists.infradead.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 11:36:40 -07:00
Tony Lindgren 4c98dc6b8e ARM: OMAP: Make plat/fpga.h local to arch/arm/plat-omap
There's no need to have this file in plat/fpga.h. We can
make it local to plat-omap replacing fpga_read/write
functions directly with readb/writeb as that's how
they are already defined in fpga.h.

Note that 2420 based H4 is also using the fpga, so let's
keep the led support around in plat-omap until we flip
over mach-omap2 to device tree.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: Felipe Balbi <balbi@ti.com>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 11:36:37 -07:00
Daniel J Blueman 21c5e50e15 x86, amd, mce: Avoid NULL pointer reference on CPU northbridge lookup
When booting on a federated multi-server system (NumaScale), the
processor Northbridge lookup returns NULL; add guards to prevent this
causing an oops.

On those systems, the northbridge is accessed through MMIO and the
"normal" northbridge enumeration in amd_nb.c doesn't work since we're
generating the northbridge ID from the initial APIC ID and the last
is not unique on those systems. Long story short, we end up without
northbridge descriptors.

Signed-off-by: Daniel J Blueman <daniel@numascale-asia.com>
Cc: stable@vger.kernel.org # 3.6
Link: http://lkml.kernel.org/r/1349073725-14093-1-git-send-email-daniel@numascale-asia.com
[ Boris: beef up commit message ]
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2012-10-17 11:25:32 -07:00
Tony Lindgren 6832c95599 Merge branch 'omap-for-v3.8/cleanup-headers-dss' into omap-for-v3.8/cleanup-headers
Conflicts:
	arch/arm/mach-omap2/board-omap3logic.c
	arch/arm/mach-omap2/gpmc.c
	drivers/media/platform/omap/omap_vout.c
	drivers/media/platform/omap/omap_vout_vrfb.c
2012-10-17 11:21:34 -07:00
Tony Lindgren 46cddc01aa Merge branch 'omap-for-v3.8/cleanup-headers-mmc' into omap-for-v3.8/cleanup-headers
Conflicts:
	arch/arm/mach-omap1/devices.c
	arch/arm/mach-omap2/omap_hwmod_33xx_data.c
	arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
	drivers/mmc/host/omap.c
2012-10-17 11:13:42 -07:00
Tony Lindgren 99f0b8d6b0 Merge branch 'omap-for-v3.8/cleanup-headers-gpmc' into omap-for-v3.8/cleanup-headers
Conflicts:
	arch/arm/mach-omap2/board-3430sdp.c
	arch/arm/mach-omap2/board-h4.c
	arch/arm/mach-omap2/board-rx51-peripherals.c
	arch/arm/mach-omap2/board-rx51.c
	arch/arm/mach-omap2/pm34xx.c
	drivers/mtd/nand/omap2.c
	drivers/mtd/onenand/omap2.c
2012-10-17 11:07:18 -07:00
Jacob Shin 1bbbbe779a x86: Exclude E820_RESERVED regions and memory holes above 4 GB from direct mapping.
On systems with very large memory (1 TB in our case), BIOS may report a
reserved region or a hole in the E820 map, even above the 4 GB range. Exclude
these from the direct mapping.

[ hpa: this should be done not just for > 4 GB but for everything above the legacy
  region (1 MB), at the very least.  That, however, turns out to require significant
  restructuring.  That work is well underway, but is not suitable for rc/stable. ]

Cc: stable@kernel.org   # > 2.6.32
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Link: http://lkml.kernel.org/r/1319145326-13902-1-git-send-email-jacob.shin@amd.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2012-10-17 10:59:39 -07:00
Sebastian Hesselbarth a458926e16 ARM: dove: Add crypto engine to DT
Make use of DT support for the crypto engine on dove and remove
the obsolete init call.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-17 17:20:01 +00:00
Sebastian Hesselbarth dfdc16fa78 ARM: dove: Remove watchdog from DT
The watchdog on dove requires an interrupt that is not yet
available on DT. Therefore, the watchdog DT node is removed
until the corresponding chained intc is available.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-17 17:19:58 +00:00
Sebastian Hesselbarth 138ee96048 ARM: dove: Restructure SoC device tree descriptor
This patch adds proper ranges for all mapped addresses within
dove SoC and moves the interrupt controller node inside the simple-bus
node.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-17 17:19:55 +00:00
Sebastian Hesselbarth 3fbcd3d0a0 ARM: dove: Fix clock names of sata and gbe
This patch fixes wrong clock names of lately added clock gates
for sata and gbe (mv64xx_eth).

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-17 17:19:52 +00:00
Sebastian Hesselbarth fd57c65cbc ARM: dove: Fix tauros2 device tree init
During the review process of dove DT patches, Tauros2 cache
init call was changed and DT support added. This patch fixes
the call to Tauros2 init and adds a DT node. Moreover, plat/irq.h
include was missing from mach-dove/common.c.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-17 17:19:50 +00:00
Sebastian Hesselbarth 529b89ef7f ARM: dove: Add pcie clock support
As dove now has clock gating control ensure pcie ports grab their
clocks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-17 17:19:47 +00:00
Paul Walmsley 3e6ece13d9 ARM: OMAP: move plat-omap/include/plat/sdrc.h into mach-omap2/sdrc.h
Remove arch/arm/plat-omap/include/plat/sdrc.h by folding its contents
into arch/arm/mach-omap2/sdrc.h.  The objective is to assist Tony in
cleaning out arch/arm/plat-omap/, as his upstreams request.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
[tony@atomide.com: updated to remove rotate macros]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 10:18:37 -07:00
Tony Lindgren 1d81aea146 Merge remote-tracking branch 'tomi/3.8/vrfb-conversion' into omap-for-v3.8/cleanup-headers-dss 2012-10-17 09:51:57 -07:00
Jon Hunter 8119024ef7 ARM: OMAP2+: Allow kernel to boot even if GPMC fails to reserve memory
Currently, if the GPMC driver fails to reserve memory when probed we will
call BUG() and the kernel will not boot. Instead of calling BUG(), return
an error from probe and allow kernel to boot.

Boot tested on AM335x beagle bone board and OMAP4430 Panda board.

V2 changes:
- Ensure that clock and memory resources are released on error.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 09:01:14 -07:00
Tero Kristo 64e29fd5ed ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable
Previously the code only acquired spinlock after increasing / decreasing
the usecount value, which is wrong. This leaves a small window where
a task switch may occur between the check of the usecount and the actual
wakeup / sleep of the domain. Fixed by moving the spinlock locking before
the usecount access. Left the usecount as atomic_t if someone wants an
easy access to the parameter through atomic_read.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 09:00:31 -07:00
Olof Johansson 69648ae885 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes
From Simon Horman:
"Please consider the following fix for the KZM-A9-GT board for 3.7.
 They both resolve fallout from recent IOMEM() changes."

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: r8a7779: use __iomem pointers for MMIO
  ARM: shmobile: armadillo800eva: __io abuse cleanup
2012-10-17 08:08:22 -07:00
Ralf Baechle a12265400c MIPS: JZ4740: Forward declare struct uart_port in header.
As suggested by Geert Uytterhoeven <geert@linux-m68k.org>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Antony Pavlov <antonynpavlov@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: Lars-Peter Clausen <lars@metafoo.de>
2012-10-17 17:00:50 +02:00
Antony Pavlov a40b012f76 MIPS: JZ4740: Fix '#include guard' in serial.h
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: Lars-Peter Clausen <lars@metafoo.de>
Patchwork: https://patchwork.linux-mips.org/patch/4424/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-10-17 16:58:51 +02:00
Arnd Bergmann 5276b6877e ARM: s3c: mark s3c2440_clk_add as __init_refok
s3c2440_clk_add is a subsys_interface method and calls clkdev_add_table,
which is marked as __init. The modpost script complains about this
because we must not call an __init function from a function in the .text
section, and we cannot reference an __init function from a subsys_interface
pointer.

I have verified that the only code path into s3c2440_clk_add() is
from "int __init s3c2440_init(void)", so s3c2440_clk_add can be marked
__init_refok instead.

Without this patch, building mini2440_defconfig results in:

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

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Ben Dooks <ben-linux@fluff.org>
2012-10-17 15:27:29 +02:00
Takashi Iwai c95d947f1f ASoC: Fixes for v3.7
Nothing too exciting except for the ams-delta change which is relatively
 lerge due to the fact that the driver loading had been totally broken as
 the driver needed a newer API to function.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQfoIaAAoJELSic+t+oim9uWcP/jZDrx8YlG1zjDqTiZ3jSL4Q
 K+s2992epyA6CgqagpcReyofExEGIitQ0rArT6++ViTAISnysZ9wFS/GbGsFDd5j
 b0m2zZMJFNhnLOD83djYeubSdP17d9WAfI7CbPzn4skSBFx8WIjt7Ti9++eHqrMd
 gxhHBRmNSAsa5FiA69Acf1BW0HgaW8JyzPMOEz5d5BRhoJ233z3GJ6UUawxQ2c4l
 cbSt66Bs19gOkiIiPbqEDRs6JBalJnbxAjDqkwsFZU1Lq/1fUJ3CsZ/TsR/rkaY0
 RL+32So1CpMqmFKNSJ26Tqwzi7xGkGeTW/o/nYGhvloITKx1jbdHOOA+BfAGDagW
 Rc/CY2HbG5o+2rrPDWs4aM7xwh56UIoftww500Oeq+4+Pu+rmEpxuvu2ewjqcLv3
 MZia9mDTXiOg7ETCLDweCLh3JRrAJZqSkyAkTtTmcx7GPiCa2lu8ns3F1+vA6CGR
 jOx3SoX7KDfh99xZOR2AdpsPqce3VqVx4EnQ9zrDiGKik9QGwp37e7KaeUPCMAVP
 Y4XcmIx94KKUjyBO2wZgTuXjPHZcZWtCSUdhxrb1Ohf/2IQpFf8jic1nknCA5k/M
 77BNhmijxha2zfVBvglLTUKJLa2eExxM53m71rjrrF31f4jpwUX+VjAgVP5thXDG
 4mFnuX+KN6sWumFFY1X1
 =lEIC
 -----END PGP SIGNATURE-----

Merge tag 'asoc-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v3.7

Nothing too exciting except for the ams-delta change which is relatively
lerge due to the fact that the driver loading had been totally broken as
the driver needed a newer API to function.
2012-10-17 14:09:15 +02:00
David Howells bb2bab1774 UAPI: Make arch/sparc/include/uapi/asm/sigcontext.h non-empty
arch/sparc/include/uapi/asm/sigcontext.h was emitted by the UAPI disintegration
script as an empty file because the parent file had no UAPI stuff in it,
despite being marked with "header-y".

Unfortunately, the patch program deletes resultant empty files when applying a
kernel patch.

So just stick a comment in there as a placeholder.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: David S. Miller <davem@davemloft.net>
cc: sparclinux@vger.kernel.org
2012-10-17 12:32:35 +01:00
David Howells 588be3004d UAPI: Make arch/sh/include/uapi/asm/hw_breakpoint.h non-empty
arch/sh/include/uapi/asm/hw_breakpoint.h was emitted by the UAPI disintegration
script as an empty file because the parent file had no UAPI stuff in it,
despite being marked with "header-y".

Unfortunately, the patch program deletes resultant empty files when applying a
kernel patch.

So just stick a comment in there as a placeholder.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Paul Mundt <lethal@linux-sh.org>
cc: linux-sh@vger.kernel.org
2012-10-17 12:32:35 +01:00
David Howells 11b8d2460c UAPI: Make arch/mn10300/include/uapi/asm/setup.h non-empty
arch/mn10300/include/uapi/asm/setup.h was emitted by the UAPI disintegration
script as an empty file because the parent file had no UAPI stuff in it,
despite being marked with "header-y".

Unfortunately, the patch program deletes resultant empty files when applying a
kernel patch.

So just stick a comment in there as a placeholder.

Signed-off-by: David Howells <dhowells@redhat.com>
2012-10-17 12:32:35 +01:00
David Howells 0420c87e64 UAPI: Put a comment into uapi/asm-generic/kvm_para.h and use it from arches
Make uapi/asm-generic/kvm_para.h non-empty by addition of a comment to stop
the patch program from deleting it when it creates it.

Then delete empty arch-specific uapi/asm/kvm_para.h files and tell the Kbuild
files to use the generic instead.

Should this perhaps instead be a #warning or #error that the facility is
unsupported on this arch?

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Arnd Bergmann <arnd@arndb.de>
cc: Avi Kivity <avi@redhat.com>
cc: Marcelo Tosatti <mtosatti@redhat.com>
cc: kvm@vger.kernel.org
2012-10-17 12:32:07 +01:00
David Howells e4522fcb5a UAPI: The tile arch uses the generic ucontext.h file
Move the header-y and generic-y lines for ucontext.h from
arch/tile/include/asm/Kbuild to the uapi/ Kbuild as the asm-generic variant is
used.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Chris Metcalf <cmetcalf@tilera.com>
2012-10-17 12:31:16 +01:00
David Howells 4c7b279c1a UAPI: Place comments in empty arch Kbuilds to make them non-empty
Place comments in:

	arch/mips/include/asm/Kbuild
	arch/tile/include/arch/Kbuild

to make them non-empty so that the patch program doesn't remove them when it
reduces them to nothing.

Possibly they should be just deleted, but it's possible that they'll acquire
generic-y or genhdr-y lines in future, so I'm keeping them around for the
moment.

Note that MIPS will compile happily if the file is deleted instead.  I haven't
tested TILE, but I suspect it will be the same there.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Ralf Baechle <ralf@linux-mips.org>
cc: Chris Metcalf <cmetcalf@tilera.com>
2012-10-17 12:31:16 +01:00
Tomi Valkeinen 8c05a41224 OMAP: SDRC: remove VRFB code
Now that VRFB driver handles its registers independently, we can remove
the VRFB related code from OMAP's sdrc.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
2012-10-17 12:11:12 +03:00
Tomi Valkeinen 6a1c9f6d19 OMAP: move arch/arm/plat-omap/include/plat/vrfb.h
Now that vrfb driver is not omap dependent anymore, we can move vrfb.h
from arch/arm/plat-omap/include/plat to include/video/omapvrfb.h.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Vaibhav Hiremath <hvaibhav@ti.com>
2012-10-17 12:11:12 +03:00
Tomi Valkeinen 406c8563a7 OMAP: VRFB: convert vrfb to platform device
This patch converts vrfb library into a platform device, in an effort to
remove omap dependencies.

The platform device is registered in arch/arm/plat-omap/fb.c and
assigned resources depending on whether running on omap2 or omap3.

The vrfb driver will parse those resources and use them to access vrfb
configuration registers and the vrfb virtual rotation areas.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
2012-10-17 12:09:35 +03:00
Linus Torvalds 8d2b6b3ae2 SuperH updates for 3.7-rc2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEUEABECAAYFAlB7pNUACgkQGkmNcg7/o7jjUgCgoki88QEhqCSwo7oHwTTKc101
 K0gAli6kneoMMHfO9w9dMlGz78EI5FQ=
 =JEFo
 -----END PGP SIGNATURE-----

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

Pull SuperH updates from Paul Mundt.

The bulk of this is the UAPI disintegration for SH.

* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
  sh: Fix up more fallout from pointless ARM __iomem churn.
  sh: Wire up kcmp syscall.
  UAPI: (Scripted) Disintegrate arch/sh/include/asm
2012-10-16 19:24:00 -07:00
Linus Torvalds 90a24a4a7e Merge branch 'frv' (FRV patches from David Howells)
Merge emailed FRV fixes from David Howells.

* frv:
  FRV: Fix linux/elf-fdpic.h
  FRV: Fix const sections change
  FRV: Fix incorrect symbol in copy_thread()
  FRV: Fix VLIW packing constraint violation in entry.S
2012-10-16 18:49:22 -07:00
Andi Kleen b4b5087173 FRV: Fix const sections change
Add __pminitconst to fix the build, otherwise the following error can occur:

  arch/frv/kernel/setup.c:187:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
  arch/frv/kernel/setup.c:386:2: error: 'clock_cmodes' undeclared (first use in this function)
  arch/frv/kernel/setup.c:571:6: error: 'clock_cmodes' undeclared (first use in this function)
  make[2]: *** [arch/frv/kernel/setup.o] Error 1

http://kisskb.ellerman.id.au/kisskb/buildresult/7344691/

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-16 18:49:15 -07:00
David Howells ce7bfc7cde FRV: Fix incorrect symbol in copy_thread()
Fix an incorrect symbol in copy_thread():

  arch/frv/kernel/process.c: In function 'copy_thread':
  arch/frv/kernel/process.c:197: error: 'chilregs' undeclared (first use in this function)
  arch/frv/kernel/process.c:197: error: (Each undeclared identifier is reported only once
  arch/frv/kernel/process.c:197: error: for each function it appears in.)

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@ZenIV.linux.org.uk>
cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-16 18:49:15 -07:00
David Howells 819e1c53ac FRV: Fix VLIW packing constraint violation in entry.S
Fix VLIW packing constraint violation in entry.S:

  arch/frv/kernel/entry.S: Assembler messages:
  arch/frv/kernel/entry.S:871: Error: VLIW packing constraint violation

When packing CALLL with OR, CALLL must go in the first slot.  The
instructions are executed simultaneously, so it doesn't matter which way
round they're packed from that point of view.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-16 18:49:15 -07:00
Linus Torvalds afe594c791 A number of pinctrl fixes for the v3.7 series:
- duplicate includes, section markup, code mishaps
 - erroneous return value in errorpath on the bcm2835 driver
 - remove an unused sirf function that was causing build errors
 - multiple-platform compilation stubs and a missed code review
   comment fixup on the nomadik pin controller
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJQfU3LAAoJEEEQszewGV1ziNMP/0xVHJE9i1b4yZ76RAQe3ZxM
 fk9LhPnfixxD3ZJ9U69hPN2jDusBWYu2nWkelD62r6TZp0kSMFHccNYghn3s3tgB
 AjITpdAu5junF15tdyyVIf+zr4uUmvF4DwuqaOyNGjzNOBCkYejurl1UP0fa1MTJ
 vO45nTvx8AG9rBwx3TMNEoj2cIxP+ciB30zmP4W3tq6YqrDUxxl/eXhQx/Hd+nUN
 Z77RrdiMfX6eF44qcJ6NPZdqB3LnD4VN1M+No+YuQGJjUDa39IvBGmIsLHzg7Fq9
 d5sfQzX9gLT+GyNM1bGaJp8PLZPy3Tqc8oHpMtl2+z+giSoPshpJYZr8vCISFkhM
 /y7OCduA87mMy8iIQ4Dn+K5ZBYF/E7CRaVwU7WFeByPArVydqjQZnyPD/KD3gL95
 msVvzqYBbfYhMXrTouVkS2tgJBCwGMFLbIztAoehO29rVGSWTWXP3SWmgJaoutAw
 qnmcd/BOFc9dqPDl8eJ04KnC45pREkYXdDqRdhEMLiG207O38RIh/tW+MKn9Uck9
 LVm1zNTFlcdsaE8lvxhqZ/YOY4EJphw+jRmvPG6k6c4kOT0F8cWIwTPOw44Pofai
 8TpzQB6c2pYVOyifPShi4SD7j00oCkPfVQXUqvIzde+CLXuI9rW9Xj1y8WCn40dG
 NouCqnebQsyNEPhDXGCR
 =vBpq
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl-fixes-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pinctrl fixes from Linus Walleij:
 "A number of pinctrl fixes for the v3.7 series:
   - duplicate includes, section markup, code mishaps
   - erroneous return value in errorpath on the bcm2835 driver
   - remove an unused sirf function that was causing build errors
   - multiple-platform compilation stubs and a missed code review
     comment fixup on the nomadik pin controller"

* tag 'pinctrl-fixes-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl/nomadik: always use the simple irqdomain
  pinctrl/nomadik: provide stubs for legacy Nomadik
  pinctrl: remove duplicated include from pinctrl-xway.c
  pinctrl: sirf: remove sirfsoc_gpio_set_pull function
  pinctrl: fix return value in bcm2835_pinctrl_probe()
  pinctrl: remove duplicated include from pinctrl-bcm2835.c
  pinctrl: bcm2835: Use existing pointer to struct device
  pinctrl: samsung: use __devinit section for init code
2012-10-16 18:10:26 -07:00
Ralf Baechle fb944c9ba3 MIPS: hugetlbfs: Fix hazard between tlb write and pagemask restoration.
On some CPU the write to pagemask might complete before the TLB write
instruction reads from the pagemask register.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-10-17 01:01:21 +02:00
Ralf Baechle 01422ff491 MIPS: Restore pagemask after dumping the TLB.
Or bad things might happen if the last TLB entry isn't a basic size page.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-10-17 01:01:20 +02:00
Ralf Baechle 344afa6550 MIPS: Hugetlbfs: Handle huge pages correctly in pmd_bad()
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-10-17 01:01:12 +02:00
Sebastien Guiriec 49c58e8202 ARM: OMAP4: devices: fixup OMAP4 DMIC platform device error message
Correct DMIC hwmod lockup error message and replace printk() by
pr_err().

Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-16 14:05:50 -07:00
Benoit Cousson a2e5b90b08 ARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fck
The GPMC code has been converted to a driver by the following commit:

 commit da49687397
 Author: Afzal Mohammed <afzal@ti.com>
 Date:   Sun Sep 23 17:28:25 2012 -0600

   ARM: OMAP2+: gpmc: minimal driver support

It now requests a clock with con-id "fck" otherwise the probe will fails.

[    0.342010] omap-gpmc omap-gpmc: error: clk_get
[    0.346771] omap-gpmc: probe of omap-gpmc failed with error -2

Add the "omap-gmpc" dev-id and fck con-id to the already existing
gmpc-fck dummy clock.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-16 14:05:50 -07:00
Paul Walmsley 3fca4eba96 ARM: OMAP: resolve sparse warning concerning debug_card_init()
Commit 801475ccb2 ("ARM: OMAP: move
debug_card_init() function") results in the following new sparse
warning:

arch/arm/plat-omap/debug-devices.c:71:12: warning: symbol 'debug_card_init' was not declared. Should it be static?

Fix by implementing Tony's suggestion to add a "sideways include" to the
new location of the debug-devices.h file in arch/arm/mach-omap2/.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-16 14:05:50 -07:00
David Howells 70c1674f62 UAPI: (Scripted) Disintegrate arch/parisc/include/asm
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
2012-10-16 21:28:05 +01:00
David Howells e1141355e0 Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6.git/ 2012-10-16 21:28:01 +01:00
Ralf Baechle 359187d647 MIPS: R5000: Fix TLB hazard handling.
R5000 and the Nevada CPUs (RM5230, RM5231, RM5260, RM5261, RM5270 and
RM5271) are basically the same CPU core and all are documented to require
two instructions separating a write to c0_pagemask, c0_entryhi, c0_entrylo0,
c0_entrylo1 or c0_index.

So far we were only providing on cycle before / after a TLBR/TLBWI
for R5000 but 3 cycles before and 1 cycles after for the Nevadas.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-10-16 22:22:23 +02:00
Ralf Baechle 02a5417751 MIPS: tlbex: Deal with re-definition of label
The microassembler used in tlbex.c does not notice if a label is redefined
resulting in relocations against such labels silently missrelocated.
The issues exists since commit add6eb04776db4189ea89f596cbcde31b899be9d
[Synthesize TLB exception handlers at runtime.] in 2.6.10 and went unnoticed
for so long because the relocations for the affected branches got computed
to do something *almost* sensible.

The issue affects R4000, R4400, QED/IDT RM5230, RM5231, RM5260, RM5261,
RM5270 and RM5271 processors.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-10-16 22:21:27 +02:00
David Daney 5210edcd52 MIPS: Make __{,n,u}delay declarations match definitions and generic delay.h
At some recent point arch/mips/include/asm/delay.h has started being
included into csrc-octeon.c where the __?delay() functions are defined.
This causes a compile failure due to conflicting declarations and
definitions of the functions.

It turns out that the generic definitions in arch/mips/lib/delay.c also
conflict.

Proposed fix: Declare the functions to take unsigned long parameters
just like asm-generic (and x86) does.  Update __delay to agree
(__ndelay and __udelay need no change).

Bonus: Get rid of 'inline' from __delay() definition, as it is globally
visible, and the compiler should be making this decision itself (it does
in fact inline the function without being told to).

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4354/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-10-16 22:20:03 +02:00
David S. Miller e793d8c674 sparc64: Fix bit twiddling in sparc_pmu_enable_event().
There was a serious disconnect in the logic happening in
sparc_pmu_disable_event() vs. sparc_pmu_enable_event().

Event disable is implemented by programming a NOP event into the PCR.

However, event enable was not reversing this operation.  Instead, it
was setting the User/Priv/Hypervisor trace enable bits.

That's not sparc_pmu_enable_event()'s job, that's what
sparc_pmu_enable() and sparc_pmu_disable() do .

The intent of sparc_pmu_enable_event() is clear, since it first clear
out the event type encoding field.  So fix this by OR'ing in the event
encoding rather than the trace enable bits.

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-16 13:05:25 -07:00
Tony Lindgren 3f216ef3f4 ARM: OMAP4: Fix twd_local_timer_register regression
Commit 7d7e1eba (ARM: OMAP2+: Prepare for irqs.h removal)
changed the interrupts to allow enabling sparse IRQ, but
accidentally added the omap3 INTC base to the local IRQ.
This causes the following:

twd: can't register interrupt 45 (-22)
twd_local_timer_register failed -22

The right fix is to not add any base, as it is a local
timer. For the OMAP44XX_IRQ_LOCALWDT we had defined earlier
there are no users, so no need to fix that.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-16 11:19:16 -07:00
Sivaram Nair bf88ef8835 ARM: tegra: add tegra_timer clock
This undoes commit 20f4665 "ARM: tegra: remove tegra_timer from
tegra_list_clks" by bringing back the tegra_timer clock. tegra_timer is
indeed a clock (hidden by the PERIPH_CLK macro) which should be added
to the tegra_list_clks.

The above commit caused tegra_init_timer() failing to get the clk
reference.

Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
[swarren: added the reverted commit's subject to this patch description]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-10-16 11:15:05 -06:00
Sivaram Nair f2ef412d58 ARM: tegra: rename tegra system timer
The timer variable is renamed to avoid confusion and symbol name clash
with the tegra_timer clock.

Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-10-16 11:14:40 -06:00
Mark Zhang 786621308c ARM: tegra30: clk: Fix output_rate overflow
Change the type of variable from "unsigned long" to "u64".
This avoids the overflow while clock rate calculating.

Signed-off-by: Mark Zhang <markz@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-10-16 11:14:34 -06:00
Shawn Guo 3d76f9f5d3 ARM: dts: imx6q-arm2: move NANDF_CS pins out of 'hog'
Commit 9e3c0066 (ARM: dts: imx6q-arm2: add pinctrl for uart and enet)
defines NANDF_CS pins as gpio in 'hog', assuming these two pins are
always used by usdhc3 in gpio mode as card-detection and
write-protection on ARM2 board.  But it's not true.  These pins are
shared by usdhc3 and gpmi-nand.  We should have the pins functional
for gpmi-nand when usdhc3 is disabled.

Move the pins out of 'hog', so that pins only work in gpio mode as CD
and WP when usdhc3 is enabled, and otherwise they are available for
gpmi-nand.

Reported-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-10-16 10:07:04 -07:00
David S. Miller 916ca14aaf sparc64: Add global PMU register dumping via sysrq.
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-16 09:34:01 -07:00
Sachin Kamat 086e47b6c9 arm64: Remove duplicate inclusion of mmu_context.h in smp.c
asm/mmu_context.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2012-10-16 17:17:45 +01:00
Peter Zijlstra 20b279ddb3 perf: Require exclude_guest to use PEBS - kernel side enforcement
Intel PEBS in VT-x context uses the DS address as a guest linear
address, even though its programmed by the host as a host linear
address. This either results in guest memory corruption and or the
hardware faulting and 'crashing' the virtual machine.  Therefore we have
to disable PEBS on VT-x enter and re-enable on VT-x exit, enforcing a
strict exclude_guest.

This patch enforces exclude_guest kernel side.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Avi Kivity <avi@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Robert Richter <robert.richter@amd.com>
Link: http://lkml.kernel.org/r/1347569955-54626-3-git-send-email-dsahern@gmail.com
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-10-16 12:43:58 -03:00
Tomi Valkeinen acd18af93a OMAPDSS: add omapdss_version
Add new enum, omapdss_version, that is used to tell which DSS hardware
version the SoC has. This enum is initialized during platform init, and
passed in the platform data to omapdss driver.

Note that the versions are not "continuous", that is, you cannot check
if the version is less or greater than something, but you need to check
for exact version match. In other words, this is invalid:

/* test if DSS is 3630 or earlier */
if (ver <= OMAPDSS_VER_OMAP3630)
	...

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-16 13:43:56 +03:00
Max Filippov 795ca178c4 xtensa: Use Kbuild infrastructure to handle asm-generic headers
Use Kbuild infrastructure to handle the asm-generic headers
and remove the wrapper headers that call them.

This only affects headers that do nothing but include the generic
equivalent. It does not touch any header that does a little more.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-15 21:49:50 -07:00
David Howells 83596729ad UAPI: (Scripted) Disintegrate arch/xtensa/include/asm
UAPI: (Scripted) Disintegrate arch/xtensa/include/asm

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-15 21:48:53 -07:00
Max Filippov 4ded6282ca xtensa: fix unaligned usermode access
- correct use of .config #define name;
      CONFIG_UNALIGNED_USER ---> CONFIG_XTENSA_UNALIGNED_USER

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Pete Delaney <piet@tensilica.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-15 21:48:41 -07:00
Max Filippov bc5378fcba xtensa: reorganize SR referencing
- reference SRs by names where possible, not by numbers;
- get rid of __stringify around SR names where possible;
- remove unneeded SR names from asm/regs.h;
- add SREG_ prefix to remaining SR names;

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-15 21:48:08 -07:00
Max Filippov f4349b6e01 xtensa: fix boot parameters parsing
Boot parameter tags with handlers are ignored like this:

	[    0.000000] Ignoring tag 0x00001003
	[    0.000000] Ignoring tag 0x00001001
	[    0.000000] Ignoring tag 0x00001004

because neither tagtable entries nor tag handlers appear in the vmlinux.

Fix tagtable definition attributes so that tag entries are not dropped.

Fix end of memory bank calculation in parse_tag_mem: it is intended to
round down to page size, but instead did something strange leading to
hang right after boot.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-15 21:43:15 -07:00
Marc Gauthier 1bbedc3a7b xtensa: fix missing return in do_page_fault for SIGBUS case
Signed-off-by: Marc Gauthier <marc@tensilica.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-15 21:42:52 -07:00
Marc Gauthier 84ed30538b xtensa: copy_thread with CLONE_VM must not copy live parent AR windows
When doing a fork (new VM), the new task has a mirror image of the
parent's stack, so keeps the same live register windows etc.
However when doing a clone with CLONE_VM, keeping the same VM
(eg. when creating a new thread), the child starts afresh on a new
stack -- it cannot share any part of the parent stack.  It
especially cannot have the same live AR windows as the parent,
otherwise it will overwrite the parent stack on overflow, likely
causing corruption.  (and so it did...)

Effectively, the register windows need to be spilled.
Turns out it's much easier to simply not copy parent register
windows when CLONE_VM is set.

Signed-off-by: Marc Gauthier <marc@tensilica.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-15 21:42:27 -07:00
Chris Zankel eae8a416af xtensa: fix memmove(), bcopy(), and memcpy().
- fix memmove to correctly handle overlapping src and dst;
- fix memcpy loop ending conditions from signed '<=' to '!=';
- modify bcopy to call memmove;

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-15 21:41:19 -07:00