safe/jmp/linux-2.6
13 years agoS5PV210: DMA: Add platform devices for PL330 DMACs
Jassi Brar [Tue, 18 May 2010 02:59:34 +0000 (11:59 +0900)]
S5PV210: DMA: Add platform devices for PL330 DMACs

Samsung's Soc S5PV210 has three PL330 DMACs. First is dedicated for
Memory->Memory data transfer while the other two meant for data
transfer with peripherals.
Define and add latter two PL330 DMACs as platform devices on the
S5PV210 platform.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoS5P6442: DMA: Add platform devices for PL330 DMACs
Jassi Brar [Tue, 18 May 2010 02:59:27 +0000 (11:59 +0900)]
S5P6442: DMA: Add platform devices for PL330 DMACs

Samsung's Soc S5P6442 has two PL330 DMACs. First is dedicated for
Memory->Memory data transfer while the second is meant for data
transfer with peripherals.
Define and add the peripheral PL330 DMAC as platform device on the
S5P6442 platform.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoS5P6440: DMA: Add platform devices for PL330 DMACs
Jassi Brar [Tue, 18 May 2010 02:59:20 +0000 (11:59 +0900)]
S5P6440: DMA: Add platform devices for PL330 DMACs

Samsung's Soc S5P6440 has one PL330 DMAC.
Define and add the PL330 DMAC as platform device on the
S5P6440 platform.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoS3C: DMA: Add api driver for PL330
Jassi Brar [Tue, 18 May 2010 02:59:06 +0000 (11:59 +0900)]
S3C: DMA: Add api driver for PL330

Latest Samsung SoCs have one or more PL330 as their DMACs. This patch
implements the S3C DMA API for PL330 core driver.

The design has been kept as generic as possible while keeping effort to
add support for new SoCs to the minimum possible level.

Some of the salient features of this driver are:-
 o  Automatic scheduling of client requests onto DMAC if more than
    one DMAC can reach the peripheral. Factors, such as current load
    and number of exclusive but inactive peripherals that are
    supported by the DMAC, are used to decide suitability of a DMAC
    for a particular client.
 o  CIRCULAR buffer option is supported.
 o  The driver scales transparently with the number of DMACs and total
    peripherals in the platform, since all peripherals are added to
    the peripheral pool and DMACs to the controller pool.

For most conservative use of memory, smallest driver size and best
performance, we don't employ legacy data structures of the S3C DMA API.
That should not have any affect since those data structures are completely
invisible to the DMA clients.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: SAMSUNG: Move RTC device definitions in plat-samsung
Atul Dahiya [Tue, 18 May 2010 05:58:56 +0000 (14:58 +0900)]
ARM: SAMSUNG: Move RTC device definitions in plat-samsung

This patch moves RTC device definitions from mach-s3c64xx
to plat-samsung, to enable the other SoCs to use same device
definition.

Signed-off-by: Atul Dahiya <atul.dahiya@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: remove 'select GENERIC_TIME'
Russell King [Tue, 18 May 2010 07:17:56 +0000 (08:17 +0100)]
ARM: remove 'select GENERIC_TIME'

GENERIC_TIME is now enabled by default, so 'select GENERIC_TIME'
is redundant.  Remove them.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agosh64: provide a stub per_cpu_trap_init() definition.
Paul Mundt [Tue, 18 May 2010 06:23:48 +0000 (15:23 +0900)]
sh64: provide a stub per_cpu_trap_init() definition.

This is needed to fix up the build at the moment. Gradually this will be
reworked to follow the 32-bit initialization path and deal with delayed
VBR initialization.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosh: fix up CONFIG_KEXEC=n build.
Paul Mundt [Tue, 18 May 2010 05:53:23 +0000 (14:53 +0900)]
sh: fix up CONFIG_KEXEC=n build.

The reserve_crashkernel() definition is in asm/kexec.h which is only
dragged in via linux/kexec.h if CONFIG_KEXEC is set. Just switch over to
asm/kexec.h unconditionally to fix up the build.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoARM: SAMSUNG: Moving ADC device definition to plat-samsung.
Naveen Krishna [Thu, 13 May 2010 13:06:36 +0000 (22:06 +0900)]
ARM: SAMSUNG: Moving ADC device definition to plat-samsung.

This patch moves ADC device definition to plat-samsung.
Because that is generic to the S3C64XX and S5P Series SoCs.

Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: h1940: framebuffer configuration fix
Mike Solovyev [Wed, 12 May 2010 11:38:00 +0000 (15:38 +0400)]
ARM: h1940: framebuffer configuration fix

Seems like a typo, wrong setup leads to broken image on ipaq screen.

Signed-off-by: Mike Solovyev <ms@sk.2-ch.org>
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agostop_machine: Move local variable closer to the usage site in cpu_stop_cpu_callback()
Ingo Molnar [Mon, 17 May 2010 22:17:44 +0000 (00:17 +0200)]
stop_machine: Move local variable closer to the usage site in cpu_stop_cpu_callback()

This addresses the following compiler warning:

 kernel/stop_machine.c: In function 'cpu_stop_cpu_callback':
 kernel/stop_machine.c:297: warning: unused variable 'work'

Cc: Tejun Heo <tj@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <tip-3fc1f1e27a5b807791d72e5d992aa33b668a6626@git.kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agox86, hweight: Use a 32-bit popcnt for __arch_hweight32()
H. Peter Anvin [Mon, 17 May 2010 22:13:23 +0000 (15:13 -0700)]
x86, hweight: Use a 32-bit popcnt for __arch_hweight32()

Use a 32-bit popcnt instruction for __arch_hweight32(), even on
x86-64.  Even though the input register will *usually* be
zero-extended due to the standard operation of the hardware, it isn't
necessarily so if the input value was the result of truncating a
64-bit operation.

Note: the POPCNT32 variant used on x86-64 has a technically
unnecessary REX prefix to make it five bytes long, the same as a CALL
instruction, therefore avoiding an unnecessary NOP.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Borislav Petkov <borislav.petkov@amd.com>
LKML-Reference: <alpine.LFD.2.00.1005171443060.4195@i5.linux-foundation.org>

13 years agoperf tools: Add mode to build without newt support
Arnaldo Carvalho de Melo [Mon, 17 May 2010 21:18:11 +0000 (18:18 -0300)]
perf tools: Add mode to build without newt support

make NO_NEWT=1

Will avoid building the newt (tui) support.

Suggested-by: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agocifs: fix noserverino handling when unix extensions are enabled
Jeff Layton [Mon, 17 May 2010 11:18:58 +0000 (07:18 -0400)]
cifs: fix noserverino handling when unix extensions are enabled

The uniqueid field sent by the server when unix extensions are enabled
is currently used sometimes when it shouldn't be. The readdir codepath
is correct, but most others are not. Fix it.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agoperf symbols: symbol inconsistency message should be done only at verbose=1
Arnaldo Carvalho de Melo [Mon, 17 May 2010 20:57:59 +0000 (17:57 -0300)]
perf symbols: symbol inconsistency message should be done only at verbose=1

That happened for an old perf.data file that had no fake MMAP events for
the kernel modules, but even then it should warn once for each module,
not one time for every symbol in every module not found.

Reported-by: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agocifs: don't update uniqueid in cifs_fattr_to_inode
Jeff Layton [Mon, 17 May 2010 11:18:57 +0000 (07:18 -0400)]
cifs: don't update uniqueid in cifs_fattr_to_inode

We use this value to find an inode within the hash bucket, so we can't
change this without re-hashing the inode. For now, treat this value
as immutable.

Eventually, we should probably use an inode number change on a path
based operation to indicate that the lookup cache is invalid, but that's
a bit more code to deal with.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agocifs: always revalidate hardlinked inodes when using noserverino
Jeff Layton [Mon, 17 May 2010 18:51:49 +0000 (14:51 -0400)]
cifs: always revalidate hardlinked inodes when using noserverino

The old cifs_revalidate logic always revalidated hardlinked inodes.
This hack allowed CIFS to pass some connectathon tests when server inode
numbers aren't used (basic test7, in particular).

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Mon, 17 May 2010 20:54:29 +0000 (13:54 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/geert/linux-m68k

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: amiga - Floppy platform device conversion
  m68k: amiga - Sound platform device conversion
  m68k: amiga - Frame buffer platform device conversion
  m68k: amiga - Zorro host bridge platform device conversion
  m68k: amiga - Zorro bus modalias support
  platform: Make platform resource input parameters const
  m68k: invoke oom-killer from page fault
  serial167: Kill unused variables
  m68k: Implement generic_find_next_{zero_,}le_bit()
  m68k: hp300 - Checkpatch cleanup
  m68k: Remove trailing spaces in messages
  m68k: Simplify param.h by using <asm-generic/param.h>
  m68k: Remove BKL from rtc implementations

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs
Linus Torvalds [Mon, 17 May 2010 20:53:35 +0000 (13:53 -0700)]
Merge git://git./linux/kernel/git/joern/logfs

* git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs:
  logfs: handle powerfail on NAND flash
  logfs: handle errors from get_mtd_device()
  logfs: remove unused variable
  logfs: fix sync
  logfs: fix compile failure
  logfs: initialize li->li_refcount
  logfs: commit reservations under space pressure
  logfs: survive logfs_buf_recover read errors
  logfs: Close i_ino reuse race
  logfs: fix logfs_seek_hole()
  logfs: Return -EINVAL if filesystem image doesn't match
  LogFS: Fix typo in b6349ac8
  logfs: testing the wrong variable

13 years agoMerge branch 'bkl/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic...
Linus Torvalds [Mon, 17 May 2010 20:48:10 +0000 (13:48 -0700)]
Merge branch 'bkl/core' of git://git./linux/kernel/git/frederic/random-tracing

* 'bkl/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
  ptrace: Cleanup useless header
  ptrace: kill BKL in ptrace syscall

13 years agoperf tui: Add explicit -lslang option
Arnaldo Carvalho de Melo [Mon, 17 May 2010 19:42:37 +0000 (16:42 -0300)]
perf tui: Add explicit -lslang option

At least on rawhide using -lnewt is not enough if we use SLang routines
directly, so add an explicit -lslang since we use SLang routines.

Reported-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agom68k: amiga - Floppy platform device conversion
Geert Uytterhoeven [Sun, 5 Apr 2009 11:02:13 +0000 (13:02 +0200)]
m68k: amiga - Floppy platform device conversion

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
13 years agom68k: amiga - Sound platform device conversion
Geert Uytterhoeven [Sun, 5 Apr 2009 10:59:54 +0000 (12:59 +0200)]
m68k: amiga - Sound platform device conversion

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
13 years agom68k: amiga - Frame buffer platform device conversion
Geert Uytterhoeven [Sun, 5 Apr 2009 10:45:56 +0000 (12:45 +0200)]
m68k: amiga - Frame buffer platform device conversion

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
13 years agom68k: amiga - Zorro host bridge platform device conversion
Geert Uytterhoeven [Sun, 5 Apr 2009 10:40:41 +0000 (12:40 +0200)]
m68k: amiga - Zorro host bridge platform device conversion

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
13 years agom68k: amiga - Zorro bus modalias support
Geert Uytterhoeven [Tue, 18 Nov 2008 20:13:53 +0000 (21:13 +0100)]
m68k: amiga - Zorro bus modalias support

Add Amiga Zorro bus modalias and uevent support

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
13 years agoplatform: Make platform resource input parameters const
Geert Uytterhoeven [Wed, 28 Jan 2009 20:01:02 +0000 (21:01 +0100)]
platform: Make platform resource input parameters const

Make the platform resource input parameters of platform_device_add_resources()
and platform_device_register_simple() const, as the resources are copied and
never modified.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agom68k: invoke oom-killer from page fault
Nick Piggin [Thu, 22 Apr 2010 16:06:20 +0000 (02:06 +1000)]
m68k: invoke oom-killer from page fault

As explained in commit 1c0fe6e3bd, we want to call the architecture independent
oom killer when getting an unexplained OOM from handle_mm_fault, rather than
simply killing current.

Cc: linux-m68k@lists.linux-m68k.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-arch@vger.kernel.org
Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: David Rientjes <rientjes@google.com>
[Geert] Kill 2 introduced compiler warnings
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
13 years agoserial167: Kill unused variables
Geert Uytterhoeven [Wed, 14 Apr 2010 16:48:50 +0000 (18:48 +0200)]
serial167: Kill unused variables

commits 638157bc1461f6718eeca06bedd9a09cf1f35c36 ("serial167: prepare to push
BKL down into drivers") and 4165fe4ef7305609a96c7f248cefb9c414d0ede5 ("tty:
Fix up char drivers request_room usage") removed code without removing the
corresponding variables:

| drivers/char/serial167.c: In function 'cd2401_rx_interrupt':
| drivers/char/serial167.c:630: warning: unused variable 'len'
| drivers/char/serial167.c: In function 'cy_ioctl':
| drivers/char/serial167.c:1531: warning: unused variable 'val'

Remove the variables to kill the warnings.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
13 years agoperf options: Type check all the remaining OPT_ variants
Arnaldo Carvalho de Melo [Mon, 17 May 2010 19:22:41 +0000 (16:22 -0300)]
perf options: Type check all the remaining OPT_ variants

OPT_SET_INT was renamed to OPT_SET_UINT since the only use in these
tools is to set something that has an enum type, that is builtin
compatible with unsigned int.

Several string constifications were done to make OPT_STRING require a
const char * type.

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoperf options: Type check OPT_BOOLEAN and fix the offenders
Arnaldo Carvalho de Melo [Mon, 17 May 2010 18:51:10 +0000 (15:51 -0300)]
perf options: Type check OPT_BOOLEAN and fix the offenders

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agom68k: Implement generic_find_next_{zero_,}le_bit()
Geert Uytterhoeven [Sun, 28 Feb 2010 12:06:27 +0000 (13:06 +0100)]
m68k: Implement generic_find_next_{zero_,}le_bit()

linux-next:
fs/udf/balloc.c: In function 'udf_bitmap_new_block':
fs/udf/balloc.c:274: error: implicit declaration of function 'generic_find_next_le_bit'

Convert ext2_find_next_{zero_,}bit() into generic_find_next_{zero_,}le_bit(),
and wrap the ext2_find_next_{zero_,}bit() around the latter.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
13 years agom68k: hp300 - Checkpatch cleanup
Andrea Gelmini [Sat, 27 Feb 2010 16:51:33 +0000 (17:51 +0100)]
m68k: hp300 - Checkpatch cleanup

arch/m68k/hp300/time.h:2: WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
13 years agom68k: Remove trailing spaces in messages
Frans Pop [Sat, 6 Feb 2010 17:47:11 +0000 (18:47 +0100)]
m68k: Remove trailing spaces in messages

Signed-off-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
13 years agom68k: Simplify param.h by using <asm-generic/param.h>
Robert P. J. Day [Thu, 31 Dec 2009 20:35:44 +0000 (15:35 -0500)]
m68k: Simplify param.h by using <asm-generic/param.h>

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
13 years agom68k: Remove BKL from rtc implementations
Thomas Gleixner [Thu, 15 Oct 2009 08:42:21 +0000 (08:42 +0000)]
m68k: Remove BKL from rtc implementations

m68k does not support SMP. The access to the rtc is already serialized
with local_irq_save/restore which is sufficient on UP.

The open() protection in arch/m68k/mvme16x/rtc.c is not pretty but
sufficient on UP and safe w/o the BKL.

open() in arch/m68k/bvme6000/rtc.c can do with the same atomic logic
as arch/m68k/mvme16x/rtc.c

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
13 years agoperf options: Check v type in OPT_U?INTEGER
Arnaldo Carvalho de Melo [Mon, 17 May 2010 18:39:16 +0000 (15:39 -0300)]
perf options: Check v type in OPT_U?INTEGER

To avoid problems like the one fixed by Stephane Eranian in 3de29ca, now
we'll got this instead:

bench/sched-messaging.c:259: error: negative width in bit-field ‘<anonymous>’
bench/sched-messaging.c:261: error: negative width in bit-field ‘<anonymous>’

Which is rather cryptic, but is how BUILD_BUG_ON_ZERO works, so kernel
hackers should be already used to this.

With it in place found some problems, fixed by changing the affected
variables to sensible types or changed some OPT_INTEGER to OPT_UINTEGER.

Next csets will go thru converting each of the remaining OPT_ so that
review can be made easier by grouping changes per type per patch.

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoperf options: Introduce OPT_UINTEGER
Arnaldo Carvalho de Melo [Mon, 17 May 2010 18:30:00 +0000 (15:30 -0300)]
perf options: Introduce OPT_UINTEGER

For unsigned int options to be parsed, next patches will make use of it.

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agox86, hpet: Add reference to chipset erratum documentation for disable-hpet-msi-quirk
Andreas Herrmann [Mon, 17 May 2010 16:43:24 +0000 (18:43 +0200)]
x86, hpet: Add reference to chipset erratum documentation for disable-hpet-msi-quirk

(At the moment the "SB700 Family Product Errata" document is available
at http://support.amd.com/us/Embedded_TechDocs/46837.pdf)

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20100517164324.GB10254@alberich.amd.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
13 years agoMerge branch 'devel-stable' into devel
Russell King [Mon, 17 May 2010 16:24:04 +0000 (17:24 +0100)]
Merge branch 'devel-stable' into devel

Conflicts:
arch/arm/Kconfig
arch/arm/include/asm/system.h
arch/arm/mm/Kconfig

13 years agoMerge branch 'devel-pmu' into devel
Russell King [Mon, 17 May 2010 16:21:23 +0000 (17:21 +0100)]
Merge branch 'devel-pmu' into devel

13 years agoARM: 6136/1: ARCH_REQUIRE_GPIOLIB selects GENERIC_GPIO
Hartley Sweeten [Mon, 17 May 2010 16:18:10 +0000 (17:18 +0100)]
ARM: 6136/1: ARCH_REQUIRE_GPIOLIB selects GENERIC_GPIO

The ARCH_REQUIRE_GPIOLIB config option will select GPIOLIB which
in turn will select GENERIC_GPIO.  Because of this, there is no
reason to do the select GENERIC_GPIO in arch/arm/Kconfig for the
architectures that have ARCH_REQUIRE_GPIOLIB.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoperf tui: Add workaround for slang < 2.1.4
Arnaldo Carvalho de Melo [Mon, 17 May 2010 15:25:09 +0000 (12:25 -0300)]
perf tui: Add workaround for slang < 2.1.4

Older versions of the slang library didn't used the 'const' specifier,
causing problems with modern compilers of this kind:

util/newt.c:252: error: passing argument 1 of ‘SLsmg_printf’ discards
qualifiers from pointer target type

Fix it by using some wrappers that when needed const the affected
parameters back to plain (char *).

Reported-by: Lin Ming <ming.m.lin@intel.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Lin Ming <ming.m.lin@intel.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <20100517145421.GD29052@ghostprotocols.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoperf record: Fix bug mismatch with -c option definition
Stephane Eranian [Mon, 17 May 2010 15:20:43 +0000 (12:20 -0300)]
perf record: Fix bug mismatch with -c option definition

The -c option defines the user requested sampling period. It was implemented
using an unsigned int variable but the type of the option was OPT_LONG. Thus,
the option parser was overwriting memory belonging to other variables, namely
the mmap_pages leading to a zero page sampling buffer. The bug was exposed only
when compiling at -O0, probably because the compiler was padding variables at
higher optimization levels.

This patch fixes this problem by declaring user_interval as u64. This also
avoids wrap-around issues for large period on 32-bit systems.

Commiter note:

Made it use OPT_U64(user_interval) after implementing OPT_U64 in the
previous patch.

Cc: David S. Miller <davem@davemloft.net>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <4bf11ae9.e88cd80a.06b0.ffffa8e3@mx.google.com>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoperf options: Introduce OPT_U64
Arnaldo Carvalho de Melo [Mon, 17 May 2010 15:16:48 +0000 (12:16 -0300)]
perf options: Introduce OPT_U64

We have things like user_interval (-c/--count) in 'perf record' that
needs this.

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoatomic_t: Remove volatile from atomic_t definition
Anton Blanchard [Mon, 17 May 2010 04:34:57 +0000 (14:34 +1000)]
atomic_t: Remove volatile from atomic_t definition

When looking at a performance problem on PowerPC, I noticed some awful code
generation:

c00000000051fc98:       3b 60 00 01     li      r27,1
...
c00000000051fca0:       3b 80 00 00     li      r28,0
...
c00000000051fcdc:       93 61 00 70     stw     r27,112(r1)
c00000000051fce0:       93 81 00 74     stw     r28,116(r1)
c00000000051fce4:       81 21 00 70     lwz     r9,112(r1)
c00000000051fce8:       80 01 00 74     lwz     r0,116(r1)
c00000000051fcec:       7d 29 07 b4     extsw   r9,r9
c00000000051fcf0:       7c 00 07 b4     extsw   r0,r0

c00000000051fcf4:       7c 20 04 ac     lwsync
c00000000051fcf8:       7d 60 f8 28     lwarx   r11,0,r31
c00000000051fcfc:       7c 0b 48 00     cmpw    r11,r9
c00000000051fd00:       40 c2 00 10     bne-    c00000000051fd10
c00000000051fd04:       7c 00 f9 2d     stwcx.  r0,0,r31
c00000000051fd08:       40 c2 ff f0     bne+    c00000000051fcf8
c00000000051fd0c:       4c 00 01 2c     isync

We create two constants, write them out to the stack, read them straight back
in and sign extend them. What a mess.

It turns out this bad code is a result of us defining atomic_t as a
volatile int.

We removed the volatile attribute from the powerpc atomic_t definition years
ago, but commit ea435467500612636f8f4fb639ff6e76b2496e4b (atomic_t: unify all
arch definitions) added it back in.

To dig up an old quote from Linus:

> The fact is, volatile on data structures is a bug. It's a wart in the C
> language. It shouldn't be used.
>
> Volatile accesses in *code* can be ok, and if we have "atomic_read()"
> expand to a "*(volatile int *)&(x)->value", then I'd be ok with that.
>
> But marking data structures volatile just makes the compiler screw up
> totally, and makes code for initialization sequences etc much worse.

And screw up it does :)

With the volatile removed, we see much more reasonable code generation:

c00000000051f5b8:       3b 60 00 01     li      r27,1
...
c00000000051f5c0:       3b 80 00 00     li      r28,0
...

c00000000051fc7c:       7c 20 04 ac     lwsync
c00000000051fc80:       7c 00 f8 28     lwarx   r0,0,r31
c00000000051fc84:       7c 00 d8 00     cmpw    r0,r27
c00000000051fc88:       40 c2 00 10     bne-    c00000000051fc98
c00000000051fc8c:       7f 80 f9 2d     stwcx.  r28,0,r31
c00000000051fc90:       40 c2 ff f0     bne+    c00000000051fc80
c00000000051fc94:       4c 00 01 2c     isync

Six instructions less.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoatomic_t: Cast to volatile when accessing atomic variables
Anton Blanchard [Mon, 17 May 2010 04:33:53 +0000 (14:33 +1000)]
atomic_t: Cast to volatile when accessing atomic variables

In preparation for removing volatile from the atomic_t definition, this
patch adds a volatile cast to all the atomic read functions.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoARM: 6074/1: oprofile: convert from sysdev to platform device
Will Deacon [Fri, 30 Apr 2010 10:38:39 +0000 (11:38 +0100)]
ARM: 6074/1: oprofile: convert from sysdev to platform device

This is a reworking of an original patch posted by Aaro Koskinen:

oprofile does not work with PM, because sysdev_suspend() is done with
interrupts disabled and oprofile needs a mutex. Implementing oprofile
as a platform device solves this problem.

Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6073/1: oprofile: remove old files and update KConfig
Will Deacon [Fri, 30 Apr 2010 10:37:51 +0000 (11:37 +0100)]
ARM: 6073/1: oprofile: remove old files and update KConfig

Enable hardware perf-events if CPU_HAS_PMU and select
HAVE_OPROFILE if HAVE_PERF_EVENTS. If no hardware support
is present, OProfile will fall back to timer mode.

This patch also removes the old OProfile drivers in favour
of the code implemented by perf.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6072/1: oprofile: use perf-events framework as backend
Will Deacon [Fri, 30 Apr 2010 10:36:54 +0000 (11:36 +0100)]
ARM: 6072/1: oprofile: use perf-events framework as backend

There are currently two hardware performance monitoring subsystems in
the kernel for ARM: OProfile and perf-events. This creates the
following problems:

1.) Duplicate PMU accessor code. Inevitable code drift may lead to
bugs in one framework that are fixed in the other.

2.) Locking issues. OProfile doesn't reprogram hardware counters
between profiling runs if the events to be monitored have not been
changed. This means that other profiling frameworks cannot use the
counters if OProfile is in use.

3.) Due to differences in the two frameworks, it may not be possible to
compare the results obtained by OProfile with those obtained by perf.

This patch removes the OProfile PMU driver code and replaces it with
calls to perf, therefore solving the issues mentioned above.

The only userspace-visible change is the lack of SCU counter support
for 11MPCore. This is currently unsupported by OProfile userspace tools anyway and therefore shouldn't cause any problems.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Jamie Iles <jamie.iles@picochip.com>
Cc: Jean Pihet <jpihet@mvista.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6071/1: perf-events: allow modules to query the number of hardware counters
Will Deacon [Fri, 30 Apr 2010 10:34:26 +0000 (11:34 +0100)]
ARM: 6071/1: perf-events: allow modules to query the number of hardware counters

For OProfile to initialise oprofilefs correctly, it needs to know
the number of counters it can represent.

This patch adds a function to the ARM perf-events backend to return
the number of hardware counters available for the current PMU.

Cc: Jamie Iles <jamie.iles@picochip.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6070/1: perf-events: add support for xscale PMUs
Will Deacon [Fri, 30 Apr 2010 10:33:33 +0000 (11:33 +0100)]
ARM: 6070/1: perf-events: add support for xscale PMUs

The perf-events framework for ARM only supports v6 and v7 cores.

This patch adds support for xscale v1 and v2 PMUs to perf, based on the
OProfile drivers in arch/arm/oprofile/op_model_xscale.c

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6069/1: perf-events: use numeric ID to identify PMU
Will Deacon [Fri, 30 Apr 2010 10:32:44 +0000 (11:32 +0100)]
ARM: 6069/1: perf-events: use numeric ID to identify PMU

The ARM perf-events framework provides support for a number of different
PMUs using struct arm_pmu. The char *name field of this struct can be
used to identify the PMU, but this is cumbersome if used outside of perf.

This patch replaces the name string for a PMU with an enum, which holds
a unique ID for the PMU being represented. This ID can be used to index
an array of names within perf, so no functionality is lost. The presence
of the ID field, allows other kernel subsystems [currently oprofile] to
use their own mappings for the PMU name.

Cc: Jean Pihet <jpihet@mvista.com>
Acked-by: Jamie Iles <jamie.iles@picochip.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6064/1: pmu: register IRQs at runtime
Will Deacon [Thu, 29 Apr 2010 16:13:24 +0000 (17:13 +0100)]
ARM: 6064/1: pmu: register IRQs at runtime

The current PMU infrastructure for ARM requires that the IRQs for the PMU
device are fixed at compile time and are selected based on the ARCH_ or MACH_ flags. This has the disadvantage of tying the Kernel down to a
particular board as far as profiling is concerned.

This patch replaces the compile-time IRQ registration with a runtime mechanism which allows the IRQs to be registered with the framework as
a platform_device.

A further advantage of this change is that there is scope for registering
different types of performance counters in the future by changing the id
of the platform_device and attaching different resources to it.

Acked-by: Jamie Iles <jamie.iles@picochip.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoMerge branches 'at91', 'bcmring', 'ep93xx', 'iop', 'misc', 'nomadik', 'omap', 'pxa...
Russell King [Mon, 17 May 2010 10:52:31 +0000 (11:52 +0100)]
Merge branches 'at91', 'bcmring', 'ep93xx', 'iop', 'misc', 'nomadik', 'omap', 'pxa', 'spear' and 'versatile' into devel

Conflicts:
arch/arm/Makefile
arch/arm/common/Makefile
arch/arm/mm/Kconfig

13 years agoARM: Optionally allow ARMv6 to use 'normal, bufferable' memory for DMA
Russell King [Sat, 15 May 2010 10:02:43 +0000 (11:02 +0100)]
ARM: Optionally allow ARMv6 to use 'normal, bufferable' memory for DMA

Provide a configuration option to allow the ARMv6 to use normal
bufferable memory for coherent DMA.  This option is forced to 'y'
for ARMv7, and offered as a configuration option on ARMv6.

Enabling this option requires drivers to have the necessary barriers
to ensure that data in DMA coherent memory is visible prior to the
DMA operation commencing.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years ago[S390] drivers/s390/char: Use kmemdup
Julia Lawall [Mon, 17 May 2010 08:00:23 +0000 (10:00 +0200)]
[S390] drivers/s390/char: Use kmemdup

Use kmemdup when some other buffer is immediately copied into the
allocated region.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
statement S;
@@

-  to = \(kmalloc\|kzalloc\)(size,flag);
+  to = kmemdup(from,size,flag);
   if (to==NULL || ...) S
-  memcpy(to, from, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] drivers/s390/char: Use kstrdup
Julia Lawall [Mon, 17 May 2010 08:00:22 +0000 (10:00 +0200)]
[S390] drivers/s390/char: Use kstrdup

Use kstrdup when the goal of an allocation is copy a string into the
allocated region.  Additionally drop the now unused variable len.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to;
expression flag,E1,E2;
statement S;
@@

-  to = kmalloc(strlen(from) + 1,flag);
+  to = kstrdup(from, flag);
   ... when != \(from = E1 \| to = E1 \)
   if (to==NULL || ...) S
   ... when != \(from = E2 \| to = E2 \)
-  strcpy(to, from);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] debug: enable exception-trace debug facility
Heiko Carstens [Mon, 17 May 2010 08:00:21 +0000 (10:00 +0200)]
[S390] debug: enable exception-trace debug facility

The exception-trace facility on x86 and other architectures prints
traces to dmesg whenever a user space application crashes.
s390 has such a feature since ages however it is called
userprocess_debug and is enabled differently.
This patch makes sure that whenever one of the two procfs files

/proc/sys/kernel/userprocess_debug
/proc/sys/debug/exception-trace

is modified the contents of the second one changes as well.
That way we keep backwards compatibilty but also support the same
interface like other architectures do.
Besides that the output of the traces is improved since it will now
also contain the corresponding filename of the vma (when available)
where the process caused a fault or trap.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] s390_hypfs: Add new attributes
Michael Holzheu [Mon, 17 May 2010 08:00:20 +0000 (10:00 +0200)]
[S390] s390_hypfs: Add new attributes

In order to access the data of the hypfs diagnose calls from user
space also in binary form, this patch adds two new attributes in
debugfs:
 * z/VM: s390_hypfs/d2fc_bin
 * LPAR: s390_hypfs/d204_bin

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] qdio: remove API wrappers
Jan Glauber [Mon, 17 May 2010 08:00:19 +0000 (10:00 +0200)]
[S390] qdio: remove API wrappers

Remove qdio API wrappers used by qeth and replace them by calling the
appropriate functions directly.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] qdio: set correct bit in dsci
Jan Glauber [Mon, 17 May 2010 08:00:18 +0000 (10:00 +0200)]
[S390] qdio: set correct bit in dsci

The state change indicator is bit 7 not bit 0 of the dsci. Use the
correct bit for setting the indicator.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] qdio: dont convert timestamps to microseconds
Jan Glauber [Mon, 17 May 2010 08:00:17 +0000 (10:00 +0200)]
[S390] qdio: dont convert timestamps to microseconds

Don't convert timestamps to microseconds, use timestamps returned by
get_clock() directly.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] qdio: remove memset hack
Jan Glauber [Mon, 17 May 2010 08:00:16 +0000 (10:00 +0200)]
[S390] qdio: remove memset hack

Remove memset hack that relied on the layout of struct qdio_q
to avoid deletion of the slib pointer.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] qdio: prevent starvation on PCI devices
Jan Glauber [Mon, 17 May 2010 08:00:15 +0000 (10:00 +0200)]
[S390] qdio: prevent starvation on PCI devices

If adapter interrupts are not available and traditional IO interrupts
are used for qdio the inbound tasklet continued to run if new data
arrived. That could possibly block other tasklets scheduled on the
same CPU. If new data arrives schedule the tasklet again instead of
directly processing the new data.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] qdio: count number of qdio interrupts
Jan Glauber [Mon, 17 May 2010 08:00:14 +0000 (10:00 +0200)]
[S390] qdio: count number of qdio interrupts

Add missing increment for the qdio interrupt counter.

Signed-off-by: Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] user space fault: report fault before calling do_exit
Heiko Carstens [Mon, 17 May 2010 08:00:13 +0000 (10:00 +0200)]
[S390] user space fault: report fault before calling do_exit

Report user space faults before calling do_exit, since do_exit does
not return and therefore we will never see the fault message on the
console.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] topology: expose core identifier
Heiko Carstens [Mon, 17 May 2010 08:00:12 +0000 (10:00 +0200)]
[S390] topology: expose core identifier

Provide a topology_core_id define which makes sure that the contents of
/sys/devices/system/cpu/cpuX/topology/core_id
indeed do contain the core id and not always 0.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] dasd: remove uid from devmap
Stefan Haberland [Mon, 17 May 2010 08:00:11 +0000 (10:00 +0200)]
[S390] dasd: remove uid from devmap

Remove the duplicate of the DASD uid from the devmap structure.
Use the uid from the device private structure instead.
This also removes a lockdep warning complaining about a possible
SOFTIRQ-safe -> SOFTIRQ-unsafe lock order.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] dasd: add dynamic pav toleration
Stefan Haberland [Mon, 17 May 2010 08:00:10 +0000 (10:00 +0200)]
[S390] dasd: add dynamic pav toleration

For base Parallel Access Volume (PAV) there is a fixed mapping of
base and alias devices. With dynamic PAV this mapping can be changed
so that an alias device is used with another base device.
This patch enables the DASD device driver to tolerate dynamic PAV
changes.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] vdso: add missing vdso_install target
Hendrik Brueckner [Mon, 17 May 2010 08:00:09 +0000 (10:00 +0200)]
[S390] vdso: add missing vdso_install target

Add missing vdso_install target to install the unstripped vdso images
into $(MODLIB)/vdso/.  These files are helpful when containing
additional debugging information.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] vdso: remove redundant check for CONFIG_64BIT
Christoph Egger [Mon, 17 May 2010 08:00:08 +0000 (10:00 +0200)]
[S390] vdso: remove redundant check for CONFIG_64BIT

This is a check for CONFIG_64BIT inside a block that is only active when
CONFIG_64BIT is set. So the check is actually useless and potentially
irritating.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] avoid default_llseek in s390 drivers
Martin Schwidefsky [Mon, 17 May 2010 08:00:07 +0000 (10:00 +0200)]
[S390] avoid default_llseek in s390 drivers

Use nonseekable_open for a couple of s390 device drivers. This avoids
the use of default_llseek function which has a dependency on the BKL.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] vmcp: disallow modular build
Heiko Carstens [Mon, 17 May 2010 08:00:06 +0000 (10:00 +0200)]
[S390] vmcp: disallow modular build

Change the tristate Kbuild option into a bool option so that the module
is either builtin or not available at all.
There have been too many cases where people were missing the 'vmcp'
device node and unable to send z/VM CP commands. So let's make sure
that on distros it will always be present.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] add breaking event address for user space
Martin Schwidefsky [Mon, 17 May 2010 08:00:05 +0000 (10:00 +0200)]
[S390] add breaking event address for user space

Copy the last breaking event address from the lowcore to a new
field in the thread_struct on each system entry. Add a new
ptrace request PTRACE_GET_LAST_BREAK and a new utrace regset
REGSET_LAST_BREAK to query the last breaking event.

This is useful for debugging wild branches in user space code.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] virtualization aware cpu measurement
Carsten Otte [Mon, 17 May 2010 08:00:04 +0000 (10:00 +0200)]
[S390] virtualization aware cpu measurement

Use the SPP instruction to set a tag on entry to / exit of the virtual
machine context. This allows the cpu measurement facility to distinguish
the samples from the host and the different guests.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
13 years ago[S390] idle time accounting vs. machine checks
Martin Schwidefsky [Mon, 17 May 2010 08:00:03 +0000 (10:00 +0200)]
[S390] idle time accounting vs. machine checks

A machine check can interrupt the i/o and external interrupt handler
anytime. If the machine check occurs while the interrupt handler is
waking up from idle vtime_start_cpu can get executed a second time
and the int_clock / async_enter_timer values in the lowcore get
clobbered. This can confuse the cpu time accounting.
To fix this problem two changes are needed. First the machine check
handler has to use its own copies of int_clock and async_enter_timer,
named mcck_clock and mcck_enter_timer. Second the nested execution
of vtime_start_cpu has to be prevented. This is done in s390_idle_check
by checking the wait bit in the program status word.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] improve irq tracing code in entry[64].S
Martin Schwidefsky [Mon, 17 May 2010 08:00:02 +0000 (10:00 +0200)]
[S390] improve irq tracing code in entry[64].S

The system call path in entry[64].S is run with interrupts enabled.
Remove the irq tracing check from the system call exit code. If a
program check interrupted a context enabled for interrupts do a
call to trace_irq_off_caller in the program check handler before
branching to the system call exit code.
Restructure the system call and io interrupt return code to avoid
avoid the lpsw[e] to disable machine checks.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] cleanup sysc_work and io_work code
Martin Schwidefsky [Mon, 17 May 2010 08:00:01 +0000 (10:00 +0200)]
[S390] cleanup sysc_work and io_work code

Cleanup the #ifdef mess at io_work in entry[64].S and streamline the
TIF work code of the system call and io exit path.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] More cleanup for struct _lowcore
Martin Schwidefsky [Mon, 17 May 2010 08:00:00 +0000 (10:00 +0200)]
[S390] More cleanup for struct _lowcore

Remove cpu_id from lowcore and replace addr_t with __u64.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years agoMerge branch 'for-rmk/2635' of git://git.fluff.org/bjdooks/linux into devel-stable
Russell King [Mon, 17 May 2010 07:49:25 +0000 (08:49 +0100)]
Merge branch 'for-rmk/2635' of git://git.fluff.org/bjdooks/linux into devel-stable

13 years agoS3C: DMA: Change argument of s3c2410_dma_devconfig
Jassi Brar [Mon, 17 May 2010 01:35:29 +0000 (10:35 +0900)]
S3C: DMA: Change argument of s3c2410_dma_devconfig

All other functions have the channel argument of type 'unsigned int'
the s3c2410_dma_devconfig also accept the same value as argument but
treat it as type 'int'. Remove this anomaly by make it 'unsigned int'.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agox86, mrst: add nop functions to x86_init mpparse functions
Jacob Pan [Fri, 14 May 2010 21:41:20 +0000 (14:41 -0700)]
x86, mrst: add nop functions to x86_init mpparse functions

Moorestown does not have BIOS provided MP tables, we can save some time
by avoiding scaning of these tables. e.g.
[    0.000000] Scan SMP from c0000000 for 1024 bytes.
[    0.000000] Scan SMP from c009fc00 for 1024 bytes.
[    0.000000] Scan SMP from c00f0000 for 65536 bytes.
[    0.000000] Scan SMP from c00bfff0 for 1024 bytes.

Searching EBDA with the base at 0x40E will also result in random pointer
deferencing within 1MB. This can be a problem in Lincroft if the pointer
hits VGA area and VGA mode is not enabled.

Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
LKML-Reference: <1273873281-17489-8-git-send-email-jacob.jun.pan@linux.intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
13 years agox86, mrst, pci: return 0 for non-present pci bars
Jacob Pan [Fri, 14 May 2010 21:41:14 +0000 (14:41 -0700)]
x86, mrst, pci: return 0 for non-present pci bars

Moorestown PCI code has special handling of devices with fixed BARs. In
case of BAR sizing writes, we need to update the fake PCI MMCFG space with real
size decode value.

When a BAR is not present, we need to return 0 instead of ~0. ~0 will be
treated as device error per bugzilla 12006.

Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
LKML-Reference: <1273873281-17489-2-git-send-email-jacob.jun.pan@linux.intel.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
13 years agoARM: S5PV210: Add sclk clocks of type 'struct clksrc_clk' clock
Thomas Abraham [Mon, 17 May 2010 00:39:03 +0000 (09:39 +0900)]
ARM: S5PV210: Add sclk clocks of type 'struct clksrc_clk' clock

Add sclk clocks of type 'struct clksrc_clk' clock. The 'group2' of
clock clock sources is also added. This patch also changes the the
'id' member value of the uclk1 clock for instance instance 0 since
there are 4 instances of the uclk1 clock.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Add sclk_audio and sclk_spdif clocks.
Thomas Abraham [Mon, 17 May 2010 00:39:00 +0000 (09:39 +0900)]
ARM: S5PV210: Add sclk_audio and sclk_spdif clocks.

Add the sclk_audio(0/1/2) clocks and sclk_spdif clock of type
'struct clksrc_clk' clock. Also, add clk_pcmcdclk(0/1/2) clocks
of type 'struct clk' clock.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Add sclk_dac, sclk_mixer and sclk_hdmi clocks
Thomas Abraham [Mon, 17 May 2010 00:38:57 +0000 (09:38 +0900)]
ARM: S5PV210: Add sclk_dac, sclk_mixer and sclk_hdmi clocks

Add sclk_dac, sclk_mixer and sclk_hdmi clocks. These clocks
are of type 'struct clksrc_clk' and so have a corresponding
clock list. These clocks are also added to the list of
clocks to be registered at boot time.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Add new system clocks
Thomas Abraham [Mon, 17 May 2010 00:38:55 +0000 (09:38 +0900)]
ARM: S5PV210: Add new system clocks

This patch adds the following system clocks.

1. clk_sclk_hdmiphy
2. clk_sclk_usbphy0
3. clk_sclk_usbphy1
4. sclk_dmc (dram memory controller clock)
5. sclk_onenand

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Add support for VPLL
Thomas Abraham [Mon, 17 May 2010 00:38:52 +0000 (09:38 +0900)]
ARM: S5PV210: Add support for VPLL

This patch adds the following.

1. Adds 'clk_sclk_hdmi27m' clock to represent the HDMI 27MHz clock.
2. Adds 'clk_vpllsrc; clock of type clksrc_clk to represent the
   input clock for VPLL.
3. Adds 'clk_sclk_vpll' clock of type clksrc_clk to represent the
   output of the MUX_VPLL mux.
4. Add clk_sclk_hdmi27m, clk_vpllsrc and clk_sclk_vpll to the list
   of clocks to be registered.
5. Adds boot time print of 'clk_sclk_vpll' clock rate.
6. Adds 'clk_fout_vpll' clock to plat-s5p such that it is reusable
   on other s5p platforms.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Remove usage of clk_p66 and add clk_pclk_psys clock
Thomas Abraham [Mon, 17 May 2010 00:38:50 +0000 (09:38 +0900)]
ARM: S5PV210: Remove usage of clk_p66 and add clk_pclk_psys clock

The clk_p83 clock, which is the PCLK clock for PSYS domain, is of
type 'struct clk' whereas on S5PV210, this clock is suitable to be
of type clksrc_clk clock (since it has a clock divider). So this
patch replaces the 'struct clk' type clock to 'struct clksrc_clk'
type clock for the PCLK PSYS clock.

This patch modifies the following.

1. Removes definitions and usage of 'clk_p66' clock.
2. Adds 'clk_pclk_psys' clock which is of type 'struct clksrc_clk'.
3. Replaces all usage of clk_p66 with clk_pclk_psys clock.
4. Adds clk_pclk_psys into list of clocks to be registered.
5. Removes the sys_clks array since it is no longer required.
   Also the registration of clocks in sys_clks is also removed.
6. Remove the 'GET_DIV' as it is no longer required.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Remove usage of clk_p83 and add clk_pclk_dsys clock\
Thomas Abraham [Mon, 17 May 2010 00:38:48 +0000 (09:38 +0900)]
ARM: S5PV210: Remove usage of clk_p83 and add clk_pclk_dsys clock\

The clk_p83 clock, which is the PCLK clock for DSYS domain, is of
type 'struct clk' whereas on S5PV210, this clock is suitable to be
of type clksrc_clk clock (since it has a clock divider). So this
patch replaces the 'struct clk' type clock to 'struct clksrc_clk'
type clock for the PCLK DSYS clock.

This patch modifies the following.

1. Remove definitions and usage of 'clk_p83' clock.
2. Adds 'clk_pclk_dsys' clock which is of type 'struct clksrc_clk'.
3. Replace all usage of clk_p83 with clk_pclk_dsys clock.
4. Adds clk_pclk_dsys into list of clocks to be registered.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Fix clk_get_rate issue with the clk_h100 clock
Thomas Abraham [Mon, 17 May 2010 00:38:44 +0000 (09:38 +0900)]
ARM: S5PV210: Fix clk_get_rate issue with the clk_h100 clock

The clk_h100 clock represents the IMEM clock for the MSYS domain.
This clock rate of this clock is always half of the hclk_msys clock.
There is an issue when getting the clock rate of the clk_h100 clock
(clock get_rate hclk_h100 always returns clock rate that is equal to
the hclk_msys clock rate).

This patch modifies the following.

1. Moves the definition of the clk_h100 clock into the 'init_clocks'
   list with the appropriate parent, ctrlbit, enable and ops fields.

2. The name of the clock is changed from 'clk_h100' to 'hclk_imem'
   to represent more clearly that is represents the IMEM clock in
   the MSYS domain.

3. The function to get the clock rate of the hclk_imem clock is added.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Remove usage of clk_p100 and add clk_pclk_msys clock
Thomas Abraham [Mon, 17 May 2010 00:38:42 +0000 (09:38 +0900)]
ARM: S5PV210: Remove usage of clk_p100 and add clk_pclk_msys clock

The clk_p100 clock, which is the PCLK clock for MSYS domain, is of
type 'struct clk' whereas on S5PV210, this clock is suitable to be
of type clksrc_clk clock (since it has a choice of clock source
and a pre-divider). So this patch replaces the 'struct clk' type
clock to 'struct clksrc_clk' type clock for the PCLK MSYS clock.

This patch modifies the following.

1. Remove definitions and usage of 'clk_p100' clock.
2. Adds 'clk_pclk_msys' clock which is of type 'struct clksrc_clk'.
3. Replace all usage of clk_p100 with clk_pclk_msys clock.
4. Adds clk_pclk_msys into list of clocks to be registered.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Remove usage of clk_h133 and add clk_hclk_psys clock
Thomas Abraham [Mon, 17 May 2010 00:38:40 +0000 (09:38 +0900)]
ARM: S5PV210: Remove usage of clk_h133 and add clk_hclk_psys clock

The clk_h133 clock, which is the HCLK clock for PSYS domain, is of
type 'struct clk' whereas on S5PV210, this clock is suitable to be
of type clksrc_clk clock (since it has a choice of clock source
and a pre-divider). So this patch replaces the 'struct clk' type
clock to 'struct clksrc_clk' type clock for the HCLK PSYS clock.

This patch modifies the following.

1. Remove definitions and usage of 'clk_h133' clock.
2. Adds 'clk_hclk_psys' clock which is of type 'struct clksrc_clk'.
3. Replace all usage of clk_h133 with clk_hclk_psys clock.
4. Adds clk_hclk_psys into list of clocks to be registered.
5. Removes the clock rate calculation of hclk133 and replaces
   it with code that derives the HCLK PSYS clock rate from
   the clk_hclk_psys clock.
6. Modify printing of the system clock rates.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Remove usage of clk_h166 and add clk_hclk_dsys clock
Thomas Abraham [Mon, 17 May 2010 00:38:37 +0000 (09:38 +0900)]
ARM: S5PV210: Remove usage of clk_h166 and add clk_hclk_dsys clock

The clk_h166 clock, which is the HCLK clock for DSYS domain, is of
type 'struct clk' whereas on S5PV210, this clock is suitable to be
of type clksrc_clk clock (since it has a choice of clock source
and a pre-divider). So this patch replaces the 'struct clk' type
clock to 'struct clksrc_clk' type clock for the HCLK DSYS clock.

This patch modifies the following.

1. Remove definitions and usage of 'clk_h166' clock.

2. Adds 'clk_sclk_a2m' clock which is one of possible parent clock
   sources for the DSYS HCLK clock.

3. Adds 'clk_hclk_dsys' clock which is of type 'struct clksrc_clk'.

4. Replace all usage of clk_h166 with clk_hclk_dsys clock.

5. Adds clk_sclk_a2m and clk_hclk_dsys into list of clocks to
   be registered.

6. Removes the clock rate calculation of hclk166 and replaces
   it with code that derives the HCLK DSYS clock rate from
   the clk_hclk_dsys clock.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Remove usage of clk_h200 clock and add clk_hclk_msys clock
Thomas Abraham [Mon, 17 May 2010 00:38:34 +0000 (09:38 +0900)]
ARM: S5PV210: Remove usage of clk_h200 clock and add clk_hclk_msys clock

The clk_h200 represents the HCLK for the MSYS domain. This clock
is of type 'struct clk' but on V210, it is more suitable to be of
type 'struct clksrc_clk' (since it is a divided version of the
armclk). The replacement clock is renamed as clk_hclk_msys to
indicate that it represents the HCLK for MSYS domain.

This patch modifies the following.

1. Removes the usage of the clk_h200 clock.
2. Adds the new clock 'clk_hclk_msys'.
3. Adds clk_hclk_msys to the list of sysclks to be registered.
4. Modifies the hclk_msys clock rate calculation procedure to
   be based on the new clk_hclk_msys clock.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Add armclk of clksrc_clk clock type
Thomas Abraham [Mon, 17 May 2010 00:38:31 +0000 (09:38 +0900)]
ARM: S5PV210: Add armclk of clksrc_clk clock type

This patch modifies the following.

1. Adds arm clock 'clk_armclk' of type clksrc_clk clock type.
2. Adds arm clock to the list of system clocks 'sysclks' for
   registering it along with other system clocks.
3. Modifies the armclk clock rate calculation procedure to be
   based on the new clk_armclk clock.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Rearrange assignment of clock for fout apll/mpll/epll clocks
Thomas Abraham [Mon, 17 May 2010 00:38:28 +0000 (09:38 +0900)]
ARM: S5PV210: Rearrange assignment of clock for fout apll/mpll/epll clocks

The assignment of clock rates for fout apll/mpll/epll is moved further
up in the s5pv210_setup_clocks function because the subsequent patches
require the clock rate of fout clocks to be setup.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Register apll/mpll/epll clksrc_clk clocks
Thomas Abraham [Mon, 17 May 2010 00:38:12 +0000 (09:38 +0900)]
ARM: S5PV210: Register apll/mpll/epll clksrc_clk clocks

This patch modifies the following.

1. Registers the mout_apll clksrc_clk clock.

2. The mout_mpll and mout_epll clocks were registered as 'struct clk'
   types and then their parents were setup using the s3c_set_clksrc
   function. This patch reduces the two steps into one by registering
   the mout_mpll and mout_epll clocks using the s3c_register_clksrc
   function.

3. As per point 2 above, the init_parents array is no longer required.
   So the mout clocks are now put together in a new array named 'sysclks'.
   The sysclks array will list the system level clocks and more
   clocks will be added to it in the subsequent patches.

4. The clks array is left empty because of the movement of mpll and epll
   clocks into the sysclks array. It is not deleted since subsequent
   patches will add clocks into this array.

Signed-off-by: Thomas Abraham <thomas.ab <at> samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim <at> samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S5PV210: Rearrange the system clock definitions
Thomas Abraham [Mon, 17 May 2010 00:38:01 +0000 (09:38 +0900)]
ARM: S5PV210: Rearrange the system clock definitions

The system clock definitions are currently defined below the
peripheral clock definitions in the V210 clock code. For the V210
clock updates that follow this patch, it is required that the
system clock definitions such as the mout_apll and mout_mpll be
defined prior to the device clock definitions. This patch
re-arranges the system clock defintions for the clock updates that
follow this patch.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>