Commit Graph

44874 Commits (ec64213c4d482ee4d15b34511441eaecdd002adf)

Author SHA1 Message Date
Christoph Hellwig 5cacdb4add Add generic sys_olduname()
Add generic implementations of the old and really old uname system calls.
Note that sh only implements sys_olduname but not sys_oldolduname, but I'm
not going to bother with another ifdef for that special case.

m32r implemented an old uname but never wired it up, so kill it, too.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: James Morris <jmorris@namei.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-12 15:52:32 -08:00
Christoph Hellwig e28cbf2293 improve sys_newuname() for compat architectures
On an architecture that supports 32-bit compat we need to override the
reported machine in uname with the 32-bit value.  Instead of doing this
separately in every architecture introduce a COMPAT_UTS_MACHINE define in
<asm/compat.h> and apply it directly in sys_newuname().

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: James Morris <jmorris@namei.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-12 15:52:32 -08:00
Christoph Hellwig baed7fc9b5 Add generic sys_ipc wrapper
Add a generic implementation of the ipc demultiplexer syscall.  Except for
s390 and sparc64 all implementations of the sys_ipc are nearly identical.

There are slight differences in the types of the parameters, where mips
and powerpc as the only 64-bit architectures with sys_ipc use unsigned
long for the "third" argument as it gets casted to a pointer later, while
it traditionally is an "int" like most other paramters.  frv goes even
further and uses unsigned long for all parameters execept for "ptr" which
is a pointer type everywhere.  The change from int to unsigned long for
"third" and back to "int" for the others on frv should be fine due to the
in-register calling conventions for syscalls (we already had a similar
issue with the generic sys_ptrace), but I'd prefer to have the arch
maintainers looks over this in details.

Except for that h8300, m68k and m68knommu lack an impplementation of the
semtimedop sub call which this patch adds, and various architectures have
gets used - at least on i386 it seems superflous as the compat code on
x86-64 and ia64 doesn't even bother to implement it.

[akpm@linux-foundation.org: add sys_ipc to sys_ni.c]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: James Morris <jmorris@namei.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-12 15:52:32 -08:00
Christoph Hellwig a4679373cf Add generic sys_old_mmap()
Add a generic implementation of the old mmap() syscall, which expects its
argument in a memory block and switch all architectures over to use it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: James Morris <jmorris@namei.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-12 15:52:32 -08:00
Christoph Hellwig 5d0e52830e Add generic sys_old_select()
Add a generic implementation of the old select() syscall, which expects
its argument in a memory block and switch all architectures over to use
it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: James Morris <jmorris@namei.org>
Acked-by: Andreas Schwab <schwab@linux-m68k.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: David Howells <dhowells@redhat.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-12 15:52:32 -08:00
Andrew Clayton 29b2ee5af5 ARM/OMAP: Remove the +x bit from a couple of source files
Remove the +x bit from a couple of source files

Signed-off-by: Andrew Clayton <andrew@digital-domain.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-12 09:16:09 -08:00
Janusz Krzysztofik 0841cb8268 omap: McBSP: Drop unnecessary status/error bit clearing on reg_cacheretrieved register values
The MsBSP register cache will never have any error/status flags set, since
these flags are never written to the reg_cache. So it is kind of not
necessary to clear these flags, which are actually always 0.

In other words, clearing the status/error flags are not necessary, since the
reg_cache will never got these bits set. We can just write back the
register content from the cache as it is when clearing an error condition.

Tested on Amstrad Delta.

Reported-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-12 09:16:09 -08:00
Jack Steiner 8447b360a3 x86, UV: Fix target_cpus() in x2apic_uv_x.c
target_cpu() should initially target all cpus, not just cpu 0.
Otherwise systems with lots of disks can exhaust the interrupt
vectors on cpu 0 if a large number of disks are discovered
before the irq balancer is running.

Note: UV code only...

Signed-off-by: Jack Steiner <steiner@sgi.com>
LKML-Reference: <20100311184328.GA21433@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-12 10:19:29 +01:00
Kevin Hilman aa4b1f6e83 OMAP4: fix temporary hacks that break multi-omap PM
When building for multi-omap, and OMAP4 is enabled, CONFIG_ARCH_OMAP4
will be true and prevent included code from building/running for
OMAP2/3 as well.

This problem exists in io.c where some hwmod/PM/SDRC init code is
prevented from running even on OMAP2/3 when OMAP4 is included in a
multi-OMAP build.

A quick glance suggests that this #ifndef is no longer needed in most
of the cases.  In the remaining cases, the function is wrapped with
"if (cpu_is_omap24xx() || cpu_is_omap34xx())" which will be optimized
out for OMAP4-only builds.

Note that this is only a short-term fix.  Longer-term, OMAP4
needs to create init functions for SDRC and hwmod late-init.

Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 15:55:43 -08:00
Kevin Hilman 54c44fb7df OMAP2: cpu_is_omap2*: fix compile-time removal of unused code
Currently if omap2420 is defined but not omap2430, cpu_is_omap2430()
is still defined as a macro, instead of #define'd to zero.  This
results in conditional cpu_is_omap2430() code still being compiled,
and leads to possible compile/link errors.  In particular for hwmod
init.

To fix, add extra #ifdefs to CPU check macros to ensure that the
is_omap* macros are zero for each OMAP2 if they are not configured
into the kernel.

Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 15:55:43 -08:00
Grazvydas Ignotas 03d5671dde omap3: pandora: add missing i2c3 board_info
This will allow BQ27500 fuel gauge to function.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 15:55:43 -08:00
Aaro Koskinen 8185e46844 omap: mach-omap2/io.c: fix function declarations
Get rid of the following warnings:

	warning: non-ANSI function declaration of function [...]

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 15:55:43 -08:00
Sergio Aguirre f00d649703 omap: Fix gpio_resume_after_retention
For omap4 case, this was wrongly writing GPIO_LEVELDETECTx
registers with OMAP24XX_ offset and OMAP4_ offset.

Bug introduced in commit:

  commit 3f1686a9bf
  Author: Tony Lindgren <tony@atomide.com>
  Date:   Mon Feb 15 09:27:25 2010 -0800

      omap: Fix gpio.c for multi-omap for omap4

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 14:50:01 -08:00
Enric Balletbo i Serra 228893f9d2 omap3: Fix support for the LEDs connected to GPIO outputs on IGEP v2board
Select CONFIG_LEDS_GPIO to enable IGEP v2 LED support and control of supported
LEDs from userspace. Otherwise GPIO LEDs are exported as GPIO 26, 27 and 28 using
the gpiolib framework.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 14:50:00 -08:00
Andrea Gelmini 00df9384cc omap: Checkpatch cleanup for blizzard.h
arch/arm/plat-omap/include/plat/blizzard.h:9:
ERROR: spaces prohibited around that ':' (ctx:WxW)

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 14:50:00 -08:00
Aaro Koskinen 29b9a218d0 omap: pass the reboot command to the boot loader
This patch follows the commit be093beb60
by Russell King:

  OMAP wishes to pass state to the boot loader upon reboot in order
  to instruct it whether to wait for USB-based reflashing or not.
  There is already a facility to do this via the reboot() syscall,
  except we ignore the string passed to machine_restart().

The patch adds the missing parameter to omap1_arch_reset() and
omap_prcm_arch_reset(), and modifies the latter to pass the reboot
command parameter to the boot loader instead of reboot mode (which is
for kernel internal use only and cannot be modified by the userspace).

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 14:50:00 -08:00
Suman Anna 26e4248359 omap2/3/4: mailbox: remove compiler warning
Remove a compiler warning in device-specific
mailbox module.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 14:50:00 -08:00
Thomas Weber 21b9034020 OMAP2: serial.c: Fix number of uarts in early_init
The omap_serial_early_init prints the following errors:

Could not get uart4_ick
Could not get uart4_fck

because all the uarts available in omap_uart[] will be initialized.
Only omap4430 and omap3630 have 4 uarts at the moment.
This patch reduces the number of uarts when cpu is not omap4430 or
omap3630.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 14:50:00 -08:00
Tony Lindgren 9e542f37ce omap: Enable PM_RUNTIME in defconfigs to avoid USB compile errors
While waiting for the related USB patch, fix compile by enabling
it in the defconfigs. As discussed at:

http://thread.gmane.org/gmane.linux.usb.general/27432/focus=4460

Otherwise we'll get errors like:

drivers/usb/core/hcd.c:1892: error: 'pm_wq' undeclared (first use in this function)
drivers/usb/core/hcd.c:1892: error: (Each undeclared identifier is reported only once
drivers/usb/core/hcd.c:1892: error: for each function it appears in.)

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 12:35:07 -08:00
Tony Lindgren 79cf5bff25 omap2: Update n8x0 defconfig to test multi-omap and DMA api changes
Recent DMA API changes broke compile for tusb6010. While
testing the fixes for tusb6010, I had to update the n8x0
defconfig quite a bit. Might as well merge it while at it
to make it more usable as we're using this to test the
multi-omap booting between V6 and V7 ARMs.

Also, anybody using n8x0 with a current kernel will most
likely want to mount root on the MMC instead of the onenand
to keep the Maemo install intact.

Enable I2C, REGULATOR, MMC, MFD, PM, and USB. Also change the root
to /dev/mmcblk0p2 instead of the onenand.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 10:22:39 -08:00
Francisco Alecrim 97b9ad1633 omap2: add USB initialization for tusb6010
Based on Kalle's and Tony's patches. Some variables re-organized
and unused code removed.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Francisco Alecrim <francisco.alecrim@openbossa.org>
[tony@atomide.com: this is needed to fix the related tusb6010 DMA API changes]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 10:22:39 -08:00
Santosh Shilimkar d660f9a26e omap4: Fix build break by moving omap_smc1 into a separate .S
This patch moves omap_smc1 function to a seperate omap44xx-smc.S file
and sets compile flags as -Wa,-march=armv7-a.

This fix was suggested by Tony Lindgren <tony@atomide.com>

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
[tony@atomide.com: otherwise multi-omap build with V6 and V7 breaks]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 09:38:53 -08:00
Felipe Balbi 6f69a1815a omap2/3/4: ehci: avoid compiler error with touchbook
the early_param() call in board-omap3touchbook.c expands to:

static const char __setup_str_early_touchbook_revision[]
	__section(.init.rodata) _aligned(1) = tbr;
[...]

and we have a non-const variable being added to the
same section:

static struct ehci_hcd_omap_platform_data ehci_pdata
__section(.init.rodata);

because of that, gcc generates a section type conflict
which can (and actually should) be avoided by marking
const every variable marked with __initconst.

This patch fixes that for the ehci_hdc_omap_platform_data.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-11 09:32:03 -08:00
Xiao Guangrong 639fe4b12f perf: export perf_trace_regs and perf_arch_fetch_caller_regs
Export perf_trace_regs and perf_arch_fetch_caller_regs since module will
use these.

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
[ use EXPORT_PER_CPU_SYMBOL_GPL() ]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <4B989C1B.2090407@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-11 15:21:29 +01:00
Peter Zijlstra 45e16a6834 perf, x86: Fix hw_perf_enable() event assignment
What happens is that we schedule badly like:

<...>-1987  [019]   280.252808: x86_pmu_start: event-46/1300c0: idx: 0
<...>-1987  [019]   280.252811: x86_pmu_start: event-47/1300c0: idx: 1
<...>-1987  [019]   280.252812: x86_pmu_start: event-48/1300c0: idx: 2
<...>-1987  [019]   280.252813: x86_pmu_start: event-49/1300c0: idx: 3
<...>-1987  [019]   280.252814: x86_pmu_start: event-50/1300c0: idx: 32
<...>-1987  [019]   280.252825: x86_pmu_stop: event-46/1300c0: idx: 0
<...>-1987  [019]   280.252826: x86_pmu_stop: event-47/1300c0: idx: 1
<...>-1987  [019]   280.252827: x86_pmu_stop: event-48/1300c0: idx: 2
<...>-1987  [019]   280.252828: x86_pmu_stop: event-49/1300c0: idx: 3
<...>-1987  [019]   280.252829: x86_pmu_stop: event-50/1300c0: idx: 32
<...>-1987  [019]   280.252834: x86_pmu_start: event-47/1300c0: idx: 1
<...>-1987  [019]   280.252834: x86_pmu_start: event-48/1300c0: idx: 2
<...>-1987  [019]   280.252835: x86_pmu_start: event-49/1300c0: idx: 3
<...>-1987  [019]   280.252836: x86_pmu_start: event-50/1300c0: idx: 32
<...>-1987  [019]   280.252837: x86_pmu_start: event-51/1300c0: idx: 32 *FAIL*

This happens because we only iterate the n_running events in the first
pass, and reset their index to -1 if they don't match to force a
re-assignment.

Now, in our RR example, n_running == 0 because we fully unscheduled, so
event-50 will retain its idx==32, even though in scheduling it will have
gotten idx=0, and we don't trigger the re-assign path.

The easiest way to fix this is the below patch, which simply validates
the full assignment in the second pass.

Reported-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1268311069.5037.31.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-11 15:21:28 +01:00
Peter Zijlstra 85cfabbcd1 perf, ppc: Fix compile error due to new cpu notifiers
Fix:

  arch/powerpc/kernel/perf_event.c:1334: error: 'power_pmu_notifier' undeclared (first use in this function)
  arch/powerpc/kernel/perf_event.c:1334: error: (Each undeclared identifier is reported only once
  arch/powerpc/kernel/perf_event.c:1334: error: for each function it appears in.)
  arch/powerpc/kernel/perf_event.c:1334: error: implicit declaration of function 'power_pmu_notifier'
  arch/powerpc/kernel/perf_event.c:1334: error: implicit declaration of function 'register_cpu_notifier'

Due to commit 3f6da390 (perf: Rework and fix the arch CPU-hotplug hooks).

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-11 15:21:27 +01:00
Mike Travis d6dd692168 x86: Reduce per cpu warning boot up messages
Reduce warning message output to one line only instead of per
cpu.

Signed-of-by: Mike Travis <travis@sgi.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: x86@kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-11 14:27:47 +01:00
Mike Travis 10fb7f1f2d x86: Reduce per cpu MCA boot up messages
Don't write per cpu MCA boot up messages.

Signed-of-by: Mike Travis <travis@sgi.com>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: x86@kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-11 14:27:46 +01:00
Michal Simek 841d6e8c4e microblaze: entry.S use delay slot for return handlers
Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:26:13 +01:00
Michal Simek 8633bebc63 microblaze: Save current task directly
Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:25:54 +01:00
Michal Simek b1d70c62ff microblaze: Simplify entry.S - save/restore r3/r4 - ret_from_trap
There is possible to save r3/r4 at the beggining of user part
before calling handlers and at the end restore it.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:25:30 +01:00
Michal Simek 79bf3a1376 microblaze: PCI early support for noMMU system
Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:16:17 +01:00
Michal Simek 1be53e084a microblaze: Fix dma alloc and free coherent dma functions
We have to use consistent code to be able to do coherent dma
function. In consistent code is used cache inhibit page mapping.
Xilinx reported that there is bug in Microblaze for WB and
d-cache_always use option. Microblaze 7.30.a should be first version
where is this bug removed.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:15:48 +01:00
Michal Simek 3a0d7a4dd5 microblaze: Add consistent code
Remove ancient Kconfig option for consistent code.
MMU uses cache inhibit pages.

noMMU uses UNCACHE SHADOW feature where is used double ram size.
For example:
Physical ram is 256MB and cache are setup to cover the same size.
But if you setup in HW that size is 512MB and cache covers 256MB
than you can use adresses from 256-512MB without caches and
correspond with 0-256MB with cache. That's why I am using
dcache base/high addresses to find out uncache area.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:14:43 +01:00
Michal Simek ae8ee15051 microblaze: pgtable.h: move consistent functions
Consistent functions will be used for noMMU and MMU kernels.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:14:20 +01:00
Michal Simek b8a84059b5 microblaze: Remove ancient Kconfig option for consistent mapping
We don't use CONSISTENT option from Kconfig that's why I am removing them.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:13:34 +01:00
Michal Simek cca5613f02 microblaze: Remove VMALLOC_VMADDR
Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:13:10 +01:00
Michal Simek 22607a2821 microblaze: Add define for ASM_LOOP
It is default option but both options must be measured.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:12:50 +01:00
Michal Simek dcbae4be90 microblaze: Preliminary support for dma drivers
I found several problems for ll_temac driver and on system with WB.
This early fix should fix it. I will clean this patch before I will add
it to mainline

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:10:02 +01:00
Frans Pop 4c912c1a33 microblaze: remove trailing space in messages
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: microblaze-uclinux@itee.uq.edu.au
Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:09:29 +01:00
Michal Simek e786c6ad2b microblaze: Use generic show_mem()
Remove arch-specific show_mem() in favor of the generic version.
It is based on powerpc patch.
bda2fa5355

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:09:12 +01:00
Michal Simek 137d0795a7 microblaze: Change temp register for cmdline
For copy was used r7 register when CONFIG_CMDLINE_BOOL option
is enabled. But r7 stores pointer to fdt that's why machine_early_init
not detect compiled-in DTB.

I also moved kernel PID setup to have TLB init in one block

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:08:55 +01:00
Michal Simek d79f3b06a9 microblaze: Preliminary support for dma drivers
I found several problems for ll_temac driver and on system with WB.
This early fix should fix it. I will clean this patch before I will add
it to mainline

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:08:33 +01:00
Michal Simek 407c1da07d microblaze: Move cache function to cache.c
It is better to have init cache handling on one place.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:07:57 +01:00
Michal Simek 7775379057 microblaze: Add support from PREEMPT
This patch add core PREEMPT support for Microblaze.
I tried to trace it via tracers and I was able to see any output.

I also added low level debug functions to see if that code is called.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:07:32 +01:00
Michal Simek 733cc21831 microblaze: Add support for Xilinx PCI host bridge
This patch is based on powerpc patch
64f1650247

We did some cleanups and removed powerpc parts.
There is one new debug early listing function too.

Exclude function is only in Debug options.

We tested in on custom board.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:05:18 +01:00
Michal Simek a6475c1322 microblaze: Enable PCI, missing files
There are two parts of changes. The first is just enable
PCI in Makefiles and in Kconfig. The second is the rest of
missing files. I didn't want to add it with previous patch
because that patch is too big.

Current Microblaze toolchain has problem with weak symbols
that's why is necessary to apply this changes to be possible
to compile pci support.
Xilinx knows about this problem.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:04:27 +01:00
Michal Simek d3afa58c20 microblaze: Add core PCI files
Add pci-common.h and pci32.c. Files are based on PPC version.
There are removed ppc specific parts and the code was completely
clean.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:03:22 +01:00
Michal Simek 2ed975b43c microblaze: Add pci-bridge.h
Add pci-bridge.h for Microblaze. It is based on powerpc header file.
My changes:
I removed PPC_ prefix from constants
Removed ppc64 specifis parts

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:01:43 +01:00
Michal Simek 830980a0a8 microblaze: Add pci.h
Add pci.h for microblaze. It is based on powerpc pci.h

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:00:43 +01:00
Michal Simek 2ddafeab6f microblaze: io.h include asm-generic/iomap.h
I need to use generic/iomap.h for PCI that's why is necessary
to include it and fix ioport_{map,unmap} functions.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 14:00:09 +01:00
Michal Simek c6ba01a4c7 microblaze: Add irq_create_{of_,}mapping functions
Support function for PCI. We don't use any advance mapping mechanism
that's why implementation is simple.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 13:59:28 +01:00
Michal Simek a84642a339 microblaze: Add {z,}alloc_maybe_bootmem functions
I will need {z,}alloc_maybe_bootmem functions for pci patches

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 13:59:02 +01:00
Michal Simek 2549edd353 microblaze: Implement __dma_sync_page
There is necessary to do some cache handling for dma operations.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 13:58:11 +01:00
Michal Simek ccfe27d700 microblaze: Support DMA
Add DMA support for Microblaze. There are some part of this new feature:
1. Basic DMA support
2. Enable DMA debug option
3. Setup notifier

Ad 1. dma-mapping come from powerpc and x86 version and it is based on
generic dma-mapping-common.h

Ad 2. DMA support debug features which is used in generic file.
For more information please look at Documentation/DMA-API.txt

Ad 3. notifier is very important to setup dma_ops. Without this part
for example ll_temac driver failed because there are no setup dma operations.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11 13:56:29 +01:00
Paul E. McKenney f56e8a0765 x86/mce: Fix RCU lockdep splats
Create an rcu_dereference_check_mce() that checks for RCU-sched
read side and mce_read_mutex being held on update side.  Replace
uses of rcu_dereference() in arch/x86/kernel/cpu/mcheck/mce.c
with this new macro.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <1267830207-9474-3-git-send-email-paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-11 13:38:02 +01:00
Grant Likely acc6a0935e powerpc/52xx: update defconfigs
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-03-10 14:39:50 -07:00
Frederic Weisbecker 5331d7b846 perf: Introduce new perf_fetch_caller_regs() for hot regs snapshot
Events that trigger overflows by interrupting a context can
use get_irq_regs() or task_pt_regs() to retrieve the state
when the event triggered. But this is not the case for some
other class of events like trace events as tracepoints are
executed in the same context than the code that triggered
the event.

It means we need a different api to capture the regs there,
namely we need a hot snapshot to get the most important
informations for perf: the instruction pointer to get the
event origin, the frame pointer for the callchain, the code
segment for user_mode() tests (we always use __KERNEL_CS as
trace events always occur from the kernel) and the eflags
for further purposes.

v2: rename perf_save_regs to perf_fetch_caller_regs as per
Masami's suggestion.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Archs <linux-arch@vger.kernel.org>
2010-03-10 14:39:35 +01:00
Frederic Weisbecker 61e67fb9d3 perf/x86-64: Use frame pointer to walk on irq and process stacks
We were using the frame pointer based stack walker on every
contexts in x86-32, but not in x86-64 where we only use the
seven-league boots on the exception stacks.

Use it also on irq and process stacks. This utterly accelerate
the captures.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-03-10 14:26:40 +01:00
Peter Zijlstra f3d46b2e6f perf, x86: Fix double enable calls
hw_perf_enable() would enable already enabled events.

This causes problems with code that assumes that ->enable/->disable calls
are balanced (like the LBR code does).

What happens is that events that were already running and left in place
would get enabled again.

Avoid this by only enabling new events that match their previous
assignment.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-10 13:22:35 +01:00
Peter Zijlstra 19925ce778 perf, x86: Fix double disable calls
hw_perf_enable() would disable events that were not yet enabled.

This causes problems with code that assumes that ->enable/->disable calls
are balanced (like the LBR code does).

What happens is that we disable newly added counters that match their
previous assignment, even though they are not yet programmed on the
hardware.

Avoid this by only doing the first pass over the existing events.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-10 13:22:33 +01:00
Peter Zijlstra 356e1f2e0a perf, x86: Properly account n_added
Make sure n_added is properly accounted so that we can rely on the value
to reflect the number of added counters. This is needed if its going to
be used for more than a boolean check.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-10 13:22:32 +01:00
Peter Zijlstra 71e2d28280 perf, x86: Avoid double disable on throttle vs ioctl(PERF_IOC_DISABLE)
Calling ioctl(PERF_EVENT_IOC_DISABLE) on a thottled counter would result
in a double disable, cure this by using x86_pmu_{start,stop} for
throttle/unthrottle and teach x86_pmu_stop() to check ->active_mask.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-10 13:22:31 +01:00
Peter Zijlstra c08053e627 perf, x86: Fix x86_pmu_start
pmu::start should undo pmu::stop, make it so.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-10 13:22:30 +01:00
Peter Zijlstra 34538ee77b perf, x86: Use unlocked bitops
There is no concurrency on these variables, so don't use LOCK'ed ops.

As to the intel_pmu_handle_irq() status bit clean, nobody uses that so
remove it all together.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
LKML-Reference: <20100304140100.240023029@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-10 13:22:29 +01:00
Peter Zijlstra aff3d91a91 perf, x86: Change x86_pmu.{enable,disable} calling convention
Pass the full perf_event into the x86_pmu functions so that those may
make use of more than the hw_perf_event, and while doing this, remove the
superfluous second argument.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
LKML-Reference: <20100304140100.165166129@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-10 13:22:28 +01:00
Peter Zijlstra cc2ad4ba87 perf, x86: Remove superfluous arguments to x86_perf_event_update()
The second and third argument to x86_perf_event_update() are superfluous
since they are simple expressions of the first argument. Hence remove
them.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
LKML-Reference: <20100304140100.089468871@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-10 13:22:27 +01:00
Peter Zijlstra 07088edb88 perf, x86: Remove superfluous arguments to x86_perf_event_set_period()
The second and third argument to x86_perf_event_set_period() are
superfluous since they are simple expressions of the first argument.
Hence remove them.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
LKML-Reference: <20100304140100.006500906@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-10 13:22:27 +01:00
Peter Zijlstra 3fb2b8ddcc perf, x86, Do not user perf_disable from NMI context
Explicitly use intel_pmu_{disable,enable}_all() in intel_pmu_handle_irq()
to avoid the NMI race conditions in perf_{disable,enable}

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-10 13:22:26 +01:00
Peter Zijlstra 3f6da39053 perf: Rework and fix the arch CPU-hotplug hooks
Remove the hw_perf_event_*() hotplug hooks in favour of per PMU hotplug
notifiers. This has the advantage of reducing the static weak interface
as well as exposing all hotplug actions to the PMU.

Use this to fix x86 hotplug usage where we did things in ONLINE which
should have been done in UP_PREPARE or STARTING.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
LKML-Reference: <20100305154128.736225361@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-10 13:22:24 +01:00
Peter Zijlstra dc1d628a67 perf: Provide generic perf_sample_data initialization
This makes it easier to extend perf_sample_data and fixes a bug on arm
and sparc, which failed to set ->raw to NULL, which can cause crashes
when combined with PERF_SAMPLE_RAW.

It also optimizes PowerPC and tracepoint, because the struct
initialization is forced to zero out the whole structure.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Jean Pihet <jpihet@mvista.com>
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Jamie Iles <jamie.iles@picochip.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: stable@kernel.org
LKML-Reference: <20100304140100.315416040@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-10 13:22:23 +01:00
Paul Mundt 5b34d1ee1e sh: Export uncached helper symbols.
oprofile and others need to get at these, so provide symbol exports.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-10 16:46:58 +09:00
Paul Mundt 089b43f973 sh: Fix up NUMA build for 29-bit.
pmb_bolt_mapping() is undefined on 29-bit builds, so provide a stub.
This fixes up the NUMA build on platforms lacking PMB support.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-10 16:29:48 +09:00
Tony Lindgren d2197e1e60 omap3: Fix compile for Touch Book early_param
Commit 2b0d8c251b changed ARM to use
the common early_param code. Fix compile for Touch Book accordingly.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-03-09 16:39:58 -08:00
Ingo Molnar 548b841669 Merge commit 'v2.6.34-rc1' into perf/urgent
Conflicts:
	tools/perf/util/probe-event.c

Merge reason: Pick up -rc1 and resolve the conflict as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-03-09 17:11:53 +01:00
Mike Frysinger eb63e5d157 Blackfin: stop cleaning include/asm/asm-offsets.h
The file is no longer generated, so we don't want to clean it.

Reported-by: Vivi Li <vivi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 09:05:20 -05:00
Graf Yang 7998a8787a Blackfin: scale calibration when cpu freq changes
Need to make sure we update the loops_per_jiffy values when we start
changing the core clock.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:53 -05:00
Mike Frysinger f2b0cd61cf Blackfin: eat spurious space in asm/dpmc.h
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:53 -05:00
Robin Getz 2943bff69e Blackfin: fix anomaly 283 handling with exact hardware error
The exact hardware error handling code was added before the workaround
for anomaly 283 which caused the anomaly to be triggered in some cases
(an infinite core stall).  So re-order the code to avoid this.

Reported-by: Andrew Rook <andrew.rook@speakerbus.co.uk>
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:53 -05:00
Michael Hennerich 6ba255f4a8 Blackfin: bf537-stamp: add example ADXL346 orientation resources
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:53 -05:00
Graf Yang 848c51ccee Blackfin: bf537-stamp: add example AD2S1210 IIO resources
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:53 -05:00
Michael Hennerich ae4a8c1903 Blackfin: don't support keypad wakeup from hibernate
The on-chip keypad peripheral requires different registers to be setup
depending on the standby type (standby vs hibernation).  However, since
the power management framework doesn't differentiate between these types,
the driver doesn't know which registers to program and subsequently it
avoids doing so.

Always enabling the keyboard wakeup source causes misbehavior when the
pins are not assigned to the keypad.  If they happen to drive a certain
level, they'll trigger a wake up event which is not wanted.  So until
the aforementioned issue can be sorted out, drop support for the
wakeup source completely.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:53 -05:00
Sonic Zhang ef8873e06e Blackfin: bf537-stamp: add example AD7416 IIO resources
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Michael Hennerich 72fa2e9204 Blackfin: bf537-stamp: add example ADP8860 backlight/led resources
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Sonic Zhang 5f0225948e Blackfin: bf537-stamp: add example AD7414 temp sensor resources
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Barry Song d40bd71f88 Blackfin: rename AD1836 to AD183X in board files
The ASoC codec driver was generalized and renamed, so update the board
resources accordingly.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Graf Yang df6a949b46 Blackfin: bf537-stamp: add example AD2S120x resources
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Michael Hennerich aec59c9113 Blackfin: add support for the on-chip MAC status interrupts
This patch provides infrastructure for MAC Wake-On-Lan and PHYINT use in
phylib.  New Interrupts added:

IRQ_MAC_PHYINT   /* PHY_INT Interrupt */
IRQ_MAC_MMCINT   /* MMC Counter Interrupt */
IRQ_MAC_RXFSINT  /* RX Frame-Status Interrupt */
IRQ_MAC_TXFSINT  /* TX Frame-Status Interrupt */
IRQ_MAC_WAKEDET  /* Wake-Up Interrupt */
IRQ_MAC_RXDMAERR /* RX DMA Direction Error Interrupt */
IRQ_MAC_TXDMAERR /* TX DMA Direction Error Interrupt */
IRQ_MAC_STMDONE  /* Station Mgt. Transfer Done Interrupt */

On BF537/6 the implementation is not straight forward since there are now
two chained chained_handlers.  A cleaner approach would have been to add
latter IRQs to the demux of IRQ_GENERIC_ERROR.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Mike Frysinger b274080145 Blackfin: asm/page.h: pull in asm-generic headers
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Joachim Eastwood f9c29e872b Blackfin: mark gpio lib functions static
Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Cliff Cai c48d767569 Blackfin: bf537-stamp: add example ADAU1361 resources
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Joachim Eastwood 7f4f69f991 Blackfin: GPIO: implement to_irq handler
This makes it possible to support IRQs coming from off-chip GPIO
controllers.

Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Sonic Zhang f8e6dbffa7 Blackfin: bf537-stamp: add example ADP122/ADP150 power regulator resources
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Graf Yang f5f9531c7e Blackfin: bf537-stamp: add example AD2S90 resources
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Sonic Zhang f32792d045 Blackfin: bf537-stamp: add example AD5398 power regulator resources
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Frans Pop 2bc4affe9c Blackfin: remove trailing space in messages
Signed-off-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Michael Hennerich fe5b25c098 Blackfin: bf537-stamp: add example ADS7846 touchscreen resources
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Mike Frysinger ddaebcabbc Blackfin: add support for restart_syscall()
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Mike Frysinger 9e228ee9ea Blackfin: check for bad syscalls after tracing it
We want to report all system calls (even invalid ones) to the tracing
layers, so check the NR only after we've notified.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Mike Frysinger 600482c13d Blackfin: fix single stepping over system calls
On Blackfin systems, the hardware single step exception triggers before
the system call exception, so we need to save this info to process it
later on.  Otherwise, single stepping in userspace misses a few insns
right after the system call.

This is based a bit on the SuperH code added in commit 4b505db9c4.

Reported-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Mike Frysinger e8f263dfd3 Blackfin: initial tracehook support
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Mike Frysinger e50e2f25c5 Blackfin: initial regset support
We don't support core dumps (yet?), but this should make things easier.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Mike Frysinger f2ce48024a Blackfin: simplify PTRACE_{PEEK,POKE}USR in preperation for regset support
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Mike Frysinger 5f09c77d2a Blackfin: simplify SYSCFG code a bit and ignore attempts to change it
We don't want to let user space modify the SYSCFG register arbitrarily as
the settings are system wide (SNEN/CNEN) and can cause misbehavior.  The
only other bit here (SSSTEP) has proper controls via PTRACE_SINGLESTEP.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Christoph Hellwig f5b99627a3 Blackfin: use generic ptrace_resume code
Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT,
PTRACE_KILL and PTRACE_SINGLESTEP.  This implies defining
arch_has_single_step in <asm/ptrace.h> and implementing the
user_enable_single_step and user_disable_single_step functions, which
also causes the breakpoint information to be cleared on fork, which
could be considered a bug fix.

Also the TIF_SYSCALL_TRACE thread flag is now cleared on PTRACE_KILL
which it previously wasn't which is consistent with all architectures
using the modern ptrace code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Barry Song ad6720c0b5 Blackfin: bf537-stamp: add example AD715{0,2}/AD774{5,6,7} IIO resources
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Graf Yang 718340f629 Blackfin: rewrite resync_core_{i,d}cache() SMP logic to avoid per_cpu data
This functions are implicitly called by core functions like cpu_relax(),
and since those functions may be called early on before common code has
initialized the per-cpu data area, we need to tweak the stats gathering.
Now the statistics are maintained in common bss which makes these funcs
safe to use as soon as the C runtime env is setup.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Graf Yang 6c2b7072a7 Blackfin: add support for cpufreq on SMP systems
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Barry Song 3b82790c12 Blackfin: rename AD1938 to AD193X in board files
The ASoC codec driver was generalized and renamed, so update the board
resources accordingly.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Yi Li 7136d9c5e8 Blackfin: add CALLER_ADDR ftrace macros
Since GCC doesn't support __builtin_frame_address(n) where n!=0, add our
own function to walk the stack frame pointers.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Mike Frysinger 652afdc340 Blackfin: move KGDB selection to the way other arches do it
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Graf Yang 64b33a00dc Blackfin: split watchdog definitions into a dedicated header file
This allows things to be shared between the different watchdog sources.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Barry Song 4ab069e535 Blackfin: add dma_disable_irq_nosync() API for irq handlers
Some IRQ handlers need to disable a DMA channel without waiting.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Mike Frysinger 3750411fb7 Blackfin: fix whitespace damage in thread_info.h
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Mike Frysinger b73faf7449 Blackfin: support new ftrace frame pointer semantics
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Mike Frysinger aebfef0324 Blackfin: implement ftrace mcount test
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Barry Song 6388d14eb2 Blackfin: implement ndelay()
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Graf Yang 60ffdb3654 Blackfin: implement nmi_watchdog for SMP on BF561
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Barry Song 726e96561e Blackfin: respect the L1 kconfig optimization in the MPU code
Restore support for CONFIG_EXCPT_IRQ_SYSC_L1 in the MPU CPLB manager.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Barry Song 336746ed8e Blackfin: bf537-stamp/bf527-ezkit: move ASoC SPORT resources to boards file
Rather than declaring pin resources in the drivers, do it in the board.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Barry Song 439b486746 Blackfin: bf548-ezkit: add ASoC CPU DAI resources
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Michael Hennerich f3dec78333 Blackfin: increase NR_IRQS beyond NR on-chip IRQs
This makes room for off-chip IRQ controllers.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Barry Song 5e8d3210b5 Blackfin: fill out the signal si_addr when sending a SIGBUS/SIGSEGV
Some userspace applications use this member in diagnosing crashes.  It
also makes some LTP tests pass (i.e. the Blackfin arch behaves more like
everyone else).

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Mike Frysinger 0531c467da Blackfin: bf537-stamp: move ADF7021 MAC storage into platform resources
Just generate a random MAC on the demo board since the ADF702x lacks
dedicated storage for such things.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Yi Li 441504df6b Blackfin: add support for irqflags tracing
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Harald Krapfenbauer 5aff1642ae Blackfin: tcm-bf518: new board port
Signed-off-by: Harald Krapfenbauer <harald.krapfenbauer@bluetechnix.at>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Barry Song 38e7673f24 Blackfin: bf537-stamp: declare parallel flash as ROM with XIP kernel
When the kernel is executing out of parallel flash (XIP), we can't have
the flash go into an erase/programming cycle, otherwise the instruction
fetching steps fail and everything crashes.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Cliff Cai 29bb3bc0c7 Blackfin: bf527-ezkit/bf537-stamp: add example SSM2602 I2C resources
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Graf Yang c6669c223a Blackfin: fix up mm locking in address dumping
The locking code in the address dumper needs to grab the mm's mmap_sem
so that other CPUs do not get an inconsistent view.  On UP systems this
really wasn't a problem, but it is easy to trigger a race on SMP systems
when another CPU removes a mapping.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Barry Song 7e1082b7db Blackfin: bf533-{ezkit,stamp}: add sound platform devices
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Mike Frysinger 8d0177dbcb Blackfin: kgdb: mark all local funcs/structs static
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Roel Kluin 48a74f9d1b Blackfin: fix decoding of opcodes 41-47 in decode_instruction()
This condition allowed only decoding of opcode 0x0040

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Barry Song d86bfb1600 Blackfin: initial XIP support
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Barry Song aad16f3228 Blackfin: fix initial stack pointer setup
During very early init, the stack pointer is given a slightly incorrect
value (&init_thread_union).  The value is later adjusted to the right one
during early init (&init_thread_union + THREAD_SIZE), but it is used a few
times in between.  While the few functions used don't actually put things
onto the stack (due to optimization), it's best if we simply use the right
value from the start.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Barry Song 8916a1499d Blackfin: fix the section name of init_thread_union
Use the common attribute rather than setting the section name directly.
The common linker script defines expect the newer naming.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Barry Song 6feda3a653 Blackfin: replace harcoded define with proper THREAD_SIZE macro
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Jie Zhang 0afc272cc6 Blackfin: fix relocation errors with large initramfs images
Since we are now discarding .exit.text at runtime instead of link time, we
need to place all .text sections ahead of the .data sections.  Otherwise,
a really large attached initramfs may cause link errors as it pushes the
PC relative relocations behind the limits of the Blackfin ISA (~16meg).
The instructions in the .exit.text are unable to call back into the .text
sections leading to a link failure.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Yi Li cb191718fc Blackfin: try to simplify interrupt ifdef ugliness
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Yi Li 54536c5c6a Blackfin: simplify SMP handling in SRAM code
There is no need to use {get,put}_cpu() when we already have a spinlock to
protect against multiple processors running simultaneously.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Graf Yang 0b39db28b9 Blackfin: SMP: add PM/CPU hotplug support
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Yi Li 0d152c27e3 Blackfin: SMP: make core timers per-cpu clock events for HRT
SMP systems require per-cpu local clock event devices in order to enable
HRT support.  One a BF561, we can use local core timer for this purpose.
Originally, there was one global core-timer clock event device set up for
core A.

To accomplish this feat, we need to split the gptimer0/core timer logic
so that each is a standalone clock event.  There is no requirement that
we only have one clock event source anyways.  Once we have this, we just
define per-cpu clock event devices for each local core timer.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Graf Yang 682f5dc4ed Blackfin: drop cpu_callin_map on SMP systems
Common API already provides functions for managing online CPUs.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Sonic Zhang 0325f25a91 Blackfin: SMP: add support for IRQ affinity
Now that the Blackfin IRQ controller supports this, drivers get the normal
functionality of controlling which CPU to bind IRQs to.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Mike Frysinger 69e1d8a61d Blackfin: unify MMR helpers
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Mike Frysinger f05ede3a94 Blackfin: isram: add unlikely to sanity checks
Don't want the compiler assuming the rare sanity checks are the norm and
optimize for those paths.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Sonic Zhang 0ea19c64e3 Blackfin: update defconfigs
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Michael Hennerich 0f7b468b6e Blackfin: add optimized version of Hamming Weight functions
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Valentin Yakovenkov 252077cf7d Blackfin: bf561-acvilon: save the smsc911x mac address
Signed-off-by: Valentin Yakovenkov <yakovenkov@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Sonic Zhang 7a9cc48907 Blackfin: bf537-stamp: unify duplicated ADP5588 headers
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Mike Frysinger 01218654cd Blackfin: bf537-stamp: change CONFIG_USB_SL811_BFIN_IRQ to IRQ_PF4
The Kconfig option was never mainlined, so replace the define with the
actual pin that it is hooked up to by default.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00