Matt Fleming [Sun, 25 Apr 2010 19:18:41 +0000 (20:18 +0100)]
sh: Use correct mask when comparing PMB DATA array values
Previously we were masking the PMB DATA array values with the value of
__MEMORY_START | PMB_V, which misses some PFN bits off the mask.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Matt Fleming [Sun, 25 Apr 2010 16:29:07 +0000 (17:29 +0100)]
sh: Do not try merging two 128MB PMB mappings
There is a logic error in pmb_merge() that means we will incorrectly try
to merge two 128MB PMB mappings into one mapping. However, 256MB isn't a
valid PMB map size and pmb_merge() will actually drop the second 128MB
mapping.
This patch allows my SDK7786 board to boot when configured with
CONFIG_MEMORY_SIZE=0x10000000.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Matt Fleming [Sat, 24 Apr 2010 12:34:44 +0000 (13:34 +0100)]
sh: Fix zImage load address when CONFIG_32BIT=y
We can't necessarily use the P1SEG region to access RAM when running in
32BIT mode, so use CONFIG_MEMORY_START as the base address.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Matt Fleming [Sat, 24 Apr 2010 12:28:20 +0000 (13:28 +0100)]
sh: Fix address to decompress at when CONFIG_32BIT=y
When running in 32BIT mode the P1SEG region doesn't necessarily provide
a window onto RAM (it depends how the bootloader setup the PMB). The
correct location to place the decompressed kernel is the physical
address of _text.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Matt Fleming [Sat, 24 Apr 2010 10:12:12 +0000 (11:12 +0100)]
sh: Assembly friendly __pa and __va definitions
This patch defines ___pa and ___va which return the physical and virtual
address of an address, respectively. These macros are suitable for
calling from assembly because they don't include the C casts required by
__pa and __va.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Paul Mundt [Wed, 21 Apr 2010 03:20:42 +0000 (12:20 +0900)]
sh: __cpuinit annotate the CPU init path.
All of the regular CPU init path needs to be __cpuinit annotated for CPU
hotplug.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 21 Apr 2010 03:01:06 +0000 (12:01 +0900)]
sh: Tidy CPU probing and fixup section annotations.
This does a detect_cpu_and_cache_system() -> cpu_probe() rename, tidies
up the unused return value, and stuffs it under __cpuinit in preparation
for CPU hotplug.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 21 Apr 2010 02:38:04 +0000 (11:38 +0900)]
sh: hw-breakpoints: Kill off stub unthrottle callback.
This follows the x86 change and kills off the unthrottle stub. As the x86
change killed off the generic callback it isn't used anymore anyways.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Tue, 20 Apr 2010 06:37:23 +0000 (15:37 +0900)]
sh: Zero out aliases counter when using SH-X3 hardware assistance.
This zeroes out the number of cache aliases in the cache info descriptors
when hardware alias avoidance is enabled. This cuts down on the amount of
flushing taken care of by common code, and also permits coherency control
to be disabled for the single CPU and 4k page size case.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Tue, 20 Apr 2010 05:34:15 +0000 (14:34 +0900)]
sh: dwarf unwinder needs linux/module.h.
Previously the struct module definition was pulled in from other headers,
but we want the reference to be explicit. Fixes up randconfig build
issues.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 19 Apr 2010 08:27:17 +0000 (17:27 +0900)]
sh: Enable SH-X3 hardware synonym avoidance handling.
This enables support for the hardware synonym avoidance handling on SH-X3
CPUs for the case where dcache aliases are possible. icache handling is
retained, but we flip on broadcasting of the block invalidations due to
the lack of coherency otherwise on SMP.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 19 Apr 2010 07:27:47 +0000 (16:27 +0900)]
sh: mach-sdk7786: pm_power_off support.
This wires up power-off support for the SDK7786 board.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 15 Apr 2010 04:13:52 +0000 (13:13 +0900)]
sh: intc: IRQ auto-distribution support.
This implements support for hardware-managed IRQ balancing as implemented
by SH-X3 cores (presently only hooked up for SH7786, but can probably be
carried over to other SH-X3 cores, too).
CPUs need to specify their distribution register along with the mask
definitions, as these follow the same format. Peripheral IRQs that don't
opt out of balancing will be automatically distributed at the whim of the
hardware block, while each CPU needs to verify whether it is handling the
IRQ or not, especially before clearing the mask.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Thu, 15 Apr 2010 02:59:28 +0000 (11:59 +0900)]
sh: Disable IRQ balancing for timer and IPI IRQs.
Make sure that the timer IRQs and IPIs aren't enabled for IRQ balancing.
IPIs are disabled as a result of being percpu while the timers simply
disable balancing outright.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Tue, 13 Apr 2010 05:43:03 +0000 (14:43 +0900)]
sh: intc: userimask support.
This adds support for hardware-assisted userspace irq masking for
special priority levels. Due to the SR.IMASK interactivity, only some
platforms implement this in hardware (including but not limited to
SH-4A interrupt controllers, and ARM-based SH-Mobile CPUs). Each CPU
needs to wire this up on its own, for now only SH7786 is wired up as an
example.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Tue, 13 Apr 2010 04:49:54 +0000 (13:49 +0900)]
sh: intc: Tidy up loglevel mismatches.
The printk loglevels are all over the place, make them a bit more
coherent, and add some registration notification while we're at it.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Tue, 13 Apr 2010 01:16:34 +0000 (10:16 +0900)]
sh: intc: Provide sysdev name for intc controllers.
Presently the sysdevs are simply numbered based on the list position,
without having any direct way of figuring out which controller these are
actually mapping to. This provides a name attr for mapping out the chip
name.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Tue, 13 Apr 2010 01:15:56 +0000 (10:15 +0900)]
sh: dmaengine support for SH7786 DMAC0.
Hook up DMAC0 on SH7786.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Wed, 7 Apr 2010 08:08:32 +0000 (17:08 +0900)]
sh: Disable MMUCR_AT for SH-4 nommu.
Presently address translation is default-enabled regardless of whether
CONFIG_MMU is set or not in the SH-4 case, this fixes it up, and also
makes the control init word a bit more readable in the process.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Mon, 5 Apr 2010 03:21:09 +0000 (12:21 +0900)]
Merge branch 'sh/stable-updates'
Linus Torvalds [Sun, 4 Apr 2010 19:14:44 +0000 (12:14 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sunxvr500: Ignore secondary output PCI devices.
sparc64: Implement perf_arch_fetch_caller_regs
sparc64: Update defconfig.
sparc64: Fix array size reported by vmemmap_populate()
sparc: Fix regset register window handling.
drivers/serial/sunsu.c: Correct use after free
Linus Torvalds [Sun, 4 Apr 2010 19:13:10 +0000 (12:13 -0700)]
Merge branch 'perf-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf: Always build the powerpc perf_arch_fetch_caller_regs version
perf: Always build the stub perf_arch_fetch_caller_regs version
perf, probe-finder: Build fix on Debian
perf/scripts: Tuple was set from long in both branches in python_process_event()
perf: Fix 'perf sched record' deadlock
perf, x86: Fix callgraphs of 32-bit processes on 64-bit kernels
perf, x86: Fix AMD hotplug & constraint initialization
x86: Move notify_cpu_starting() callback to a later stage
x86,kgdb: Always initialize the hw breakpoint attribute
perf: Use hot regs with software sched switch/migrate events
perf: Correctly align perf event tracing buffer
Linus Torvalds [Sun, 4 Apr 2010 19:12:31 +0000 (12:12 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: set_cpus_allowed_ptr(): Don't use rq->migration_thread after unlock
sched: Fix proc_sched_set_task()
Linus Torvalds [Sun, 4 Apr 2010 19:12:19 +0000 (12:12 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
ring-buffer: Add missing unlock
tracing: Fix lockdep warning in global_clock()
KAMEZAWA Hiroyuki [Fri, 2 Apr 2010 00:11:29 +0000 (09:11 +0900)]
proc: pagemap: Hold mmap_sem during page walk
In initial design, walk_page_range() was designed just for walking page
table and it didn't require mmap_sem. Now, find_vma() etc.. are used
in walk_page_range() and we need mmap_sem around it.
This patch adds mmap_sem around walk_page_range().
Because /proc/<pid>/pagemap's callback routine use put_user(), we have
to get rid of it to do sane fix.
Changelog: 2010/Apr/2
- fixed start_vaddr and end overflow
Changelog: 2010/Apr/1
- fixed start_vaddr calculation
- removed unnecessary cast.
- removed unnecessary change in smaps.
- use GFP_TEMPORARY instead of GFP_KERNEL
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: San Mehat <san@google.com>
Cc: Brian Swetland <swetland@google.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
[ Fixed kmalloc failure return code as per Matt ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David S. Miller [Sun, 4 Apr 2010 08:12:50 +0000 (01:12 -0700)]
sunxvr500: Ignore secondary output PCI devices.
These just represent the secondary and further heads attached to the
card, and they have different sets of PCI bar registers to map.
So don't try to drive them in the main driver.
Reported-by: Frans van Berckel <fberckel@xs4all.nl>
Tested-by: Frans van Berckel <fberckel@xs4all.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 4 Apr 2010 06:50:59 +0000 (23:50 -0700)]
sparc64: Implement perf_arch_fetch_caller_regs
We provide regs->tstate, regs->tpc, regs->tnpc and
regs->u_regs[UREG_FP].
regs->tstate is necessary for:
user_mode() (via perf_exclude_event())
perf_misc_flags() (via perf_prepare_sample())
regs->tpc is necessary for:
perf_instruction_pointer() (via perf_prepare_sample())
and regs->u_regs[UREG_FP] is necessary for:
perf_callchain() (via perf_prepare_sample())
The regs->tnpc value is provided just to be tidy.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 3 Apr 2010 23:18:32 +0000 (16:18 -0700)]
sparc64: Update defconfig.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 3 Apr 2010 22:49:14 +0000 (15:49 -0700)]
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Ben Hutchings [Sat, 3 Apr 2010 20:58:45 +0000 (13:58 -0700)]
sparc64: Fix array size reported by vmemmap_populate()
vmemmap_populate() attempts to report the used index and total size of
vmemmap_table, but it wrongly shifts the total size so that it is
always shown as 0.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Frederic Weisbecker [Sat, 3 Apr 2010 10:22:05 +0000 (12:22 +0200)]
perf: Always build the powerpc perf_arch_fetch_caller_regs version
Now that software events use perf_arch_fetch_caller_regs() too, we
need the powerpc version to be always built.
Fixes the following build error:
(.text+0x3210): undefined reference to `perf_arch_fetch_caller_regs'
(.text+0x3324): undefined reference to `perf_arch_fetch_caller_regs'
(.text+0x33bc): undefined reference to `perf_arch_fetch_caller_regs'
(.text+0x33ec): undefined reference to `perf_arch_fetch_caller_regs'
(.text+0xd4a0): undefined reference to `perf_arch_fetch_caller_regs'
arch/powerpc/kernel/built-in.o:(.text+0xd528): more undefined references to `perf_arch_fetch_caller_regs' follow
make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2
Reported-by: Michael Ellerman <michael@ellerman.id.au>
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Frederic Weisbecker [Sat, 3 Apr 2010 10:22:05 +0000 (12:22 +0200)]
perf: Always build the stub perf_arch_fetch_caller_regs version
Now that software events use perf_arch_fetch_caller_regs() too, we
need the stub version to be always built in for archs that don't
implement it.
Fixes the following build error in PARISC:
kernel/built-in.o: In function `perf_event_task_sched_out':
(.text.perf_event_task_sched_out+0x54): undefined reference to `perf_arch_fetch_caller_regs'
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Linus Torvalds [Sat, 3 Apr 2010 02:50:11 +0000 (19:50 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
ARM: 5965/1: Fix soft lockup in at91 udc driver
ARM: 6006/1: ARM: Use the correct NOP size in memmove for Thumb-2 kernel builds
ARM: 6005/1: arm: kprobes: fix register corruption with jprobes
ARM: 6003/1: removing compilation warning from pl061.h
ARM: 6001/1: removing compilation warning comming from clkdev.h
ARM: 6000/1: removing compilation warning comming from <asm/irq.h>
ARM: 5999/1: Including device.h and resource.h header files in linux/amba/bus.h
ARM: 5997/1: ARM: Correct the VFPv3 detection
ARM: 5996/1: ARM: Change the mandatory barriers implementation (4/4)
ARM: 5995/1: ARM: Add L2x0 outer_sync() support (3/4)
ARM: 5994/1: ARM: Add outer_cache_fns.sync function pointer (2/4)
ARM: 5993/1: ARM: Move the outer_cache definitions into a separate file (1/4)
Linus Torvalds [Sat, 3 Apr 2010 02:49:50 +0000 (19:49 -0700)]
Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6
* 'merge' of git://git.secretlab.ca/git/linux-2.6:
powerpc/5200: in lpbfifo, flag DMA irqs as enabled after requesting them
powerpc/fsl: add device tree binding for QE firmware
of/flattree: Fix unhandled OF_DT_NOP tag when unflattening the device tree
Linus Torvalds [Sat, 3 Apr 2010 02:48:54 +0000 (19:48 -0700)]
Merge branch 'reiserfs/kill-bkl' of git://git./linux/kernel/git/frederic/random-tracing
* 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
reiserfs: Fix locking BUG during mount failure
Clemens Ladisch [Fri, 2 Apr 2010 16:46:06 +0000 (18:46 +0200)]
PCI quirk: RS780/RS880: disable MSI behind the PCI bridge
The missing initialization of the nb_cntl.strap_msi_enable does not
seem to be the only problem that prevents MSI, so that quirk is not
sufficient to enable MSI on all machines. To be safe, disable MSI
unconditionally for the internal graphics and HDMI audio on these
chipsets.
[rjw: Added the PCI_VENDOR_ID_AI quirk.]
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 3 Apr 2010 02:45:05 +0000 (19:45 -0700)]
Merge branch 'kgdb-fixes' of git://git./linux/kernel/git/jwessel/linux-2.6-kgdb
* 'kgdb-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
kgdb: Turn off tracing while in the debugger
kgdb: use atomic_inc and atomic_dec instead of atomic_set
kgdb: eliminate kgdb_wait(), all cpus enter the same way
kgdbts,sh: Add in breakpoint pc offset for superh
kgdb: have ebin2mem call probe_kernel_write once
Linus Torvalds [Sat, 3 Apr 2010 02:44:42 +0000 (19:44 -0700)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
Freezer: Fix buggy resume test for tasks frozen with cgroup freezer
Freezer: Only show the state of tasks refusing to freeze
Oleg Nesterov [Fri, 2 Apr 2010 16:05:12 +0000 (18:05 +0200)]
tty: release_one_tty() forgets to put pids
release_one_tty(tty) can be called when tty still has a reference
to pgrp/session. In this case we leak the pid.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-and-tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Borislav Petkov [Mon, 29 Mar 2010 16:47:55 +0000 (18:47 +0200)]
perf, probe-finder: Build fix on Debian
Building chokes with:
In file included from /usr/include/gelf.h:53,
from /usr/include/elfutils/libdw.h:53,
from util/probe-finder.h:61,
from util/probe-finder.c:39:
/usr/include/libelf.h:98: error: expected specifier-qualifier-list before 'off64_t'
[...]
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
LKML-Reference: <
20100329164755.GA16034@aftab>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Jason Wessel [Fri, 2 Apr 2010 16:57:18 +0000 (11:57 -0500)]
kgdb: Turn off tracing while in the debugger
The kernel debugger should turn off kernel tracing any time the
debugger is active and restore it on resume.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Jason Wessel [Fri, 2 Apr 2010 19:58:18 +0000 (14:58 -0500)]
kgdb: use atomic_inc and atomic_dec instead of atomic_set
Memory barriers should be used for the kgdb cpu synchronization. The
atomic_set() does not imply a memory barrier.
Reported-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Jason Wessel [Fri, 2 Apr 2010 16:47:02 +0000 (11:47 -0500)]
kgdb: eliminate kgdb_wait(), all cpus enter the same way
This is a kgdb architectural change to have all the cpus (master or
slave) enter the same function.
A cpu that hits an exception (wants to be the master cpu) will call
kgdb_handle_exception() from the trap handler and then invoke a
kgdb_roundup_cpu() to synchronize the other cpus and bring them into
the kgdb_handle_exception() as well.
A slave cpu will enter kgdb_handle_exception() from the
kgdb_nmicallback() and set the exception state to note that the
processor is a slave.
Previously the salve cpu would have called kgdb_wait(). This change
allows the debug core to change cpus without resuming the system in
order to inspect arch specific cpu information.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Jason Wessel [Fri, 2 Apr 2010 16:31:35 +0000 (11:31 -0500)]
kgdbts,sh: Add in breakpoint pc offset for superh
The kgdb test suite mimics the behavior of gdb. For the sh
architecture the pc must be decremented by 2 for software breakpoint.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Jason Wessel [Fri, 2 Apr 2010 16:33:29 +0000 (11:33 -0500)]
kgdb: have ebin2mem call probe_kernel_write once
Rather than call probe_kernel_write() one byte at a time, process the
whole buffer locally and pass the entire result in one go. This way,
architectures that need to do special handling based on the length can
do so, or we only end up calling memcpy() once.
[sonic.zhang@analog.com: Reported original problem and preliminary patch]
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Tom Zanussi [Fri, 2 Apr 2010 04:58:25 +0000 (23:58 -0500)]
perf/scripts: Tuple was set from long in both branches in python_process_event()
This is a fix to the signed/unsigned field handling in the
Python scripting engine, based on a patch from Roel Kluin.
Basically, Python wants to use a PyInt (which is internally a
long) if it can i.e. if the value will fit into that type. If
not, it stores it into a PyLong, which isn't actually a long,
but an arbitrary-precision integer variable.
The code below is similar to to what Python does internally, and
it seems to work as expected on the x86 and x86_64 sytems I
tested it on.
Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Roel Kluin <roel.kluin@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: rostedt@goodmis.org
LKML-Reference: <
1270184305.6422.10.camel@tropicana>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Oleg Nesterov [Tue, 30 Mar 2010 16:58:29 +0000 (18:58 +0200)]
sched: set_cpus_allowed_ptr(): Don't use rq->migration_thread after unlock
Trivial typo fix. rq->migration_thread can be NULL after
task_rq_unlock(), this is why we have "mt" which should be
used instead.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <
20100330165829.GA18284@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Mike Galbraith [Tue, 30 Mar 2010 09:09:53 +0000 (11:09 +0200)]
sched: Fix proc_sched_set_task()
Latencytop clearing sum_exec_runtime via proc_sched_set_task() breaks
task_times(). Other places in kernel use nvcsw and nivcsw, which are
being cleared as well, Clear task statistics only.
Reported-by: Török Edwin <edwintorok@gmail.com>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <
1269940193.19286.14.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Mike Galbraith [Fri, 26 Mar 2010 10:11:33 +0000 (11:11 +0100)]
perf: Fix 'perf sched record' deadlock
perf sched record can deadlock a box should the holder of
handle->data->lock take an interrupt, and then attempt to
acquire an rq lock held by a CPU trying to acquire the
same lock. Disable interrupts.
CPU0 CPU1
sched event with rq->lock held
grab handle->data->lock
spin on handle->data->lock
interrupt
try to grab rq->lock
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Tested-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <
1269598293.6174.8.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Torok Edwin [Wed, 17 Mar 2010 10:07:16 +0000 (12:07 +0200)]
perf, x86: Fix callgraphs of 32-bit processes on 64-bit kernels
When profiling a 32-bit process on a 64-bit kernel, callgraph tracing
stopped after the first function, because it has seen a garbage memory
address (tried to interpret the frame pointer, and return address as a
64-bit pointer).
Fix this by using a struct stack_frame with 32-bit pointers when the
TIF_IA32 flag is set.
Note that TIF_IA32 flag must be used, and not is_compat_task(), because
the latter is only set when the 32-bit process is executing a syscall,
which may not always be the case (when tracing page fault events for
example).
Signed-off-by: Török Edwin <edwintorok@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: x86@kernel.org
Cc: linux-kernel@vger.kernel.org
LKML-Reference: <
1268820436-13145-1-git-send-email-edwintorok@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Peter Zijlstra [Tue, 23 Mar 2010 18:31:15 +0000 (19:31 +0100)]
perf, x86: Fix AMD hotplug & constraint initialization
Commit 3f6da39 ("perf: Rework and fix the arch CPU-hotplug hooks") moved
the amd northbridge allocation from CPUS_ONLINE to CPUS_PREPARE_UP
however amd_nb_id() doesn't work yet on prepare so it would simply bail
basically reverting to a state where we do not properly track node wide
constraints - causing weird perf results.
Fix up the AMD NorthBridge initialization code by allocating from
CPU_UP_PREPARE and installing it from CPU_STARTING once we have the
proper nb_id. It also properly deals with the allocation failing.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
[ robustify using amd_has_nb() ]
Signed-off-by: Stephane Eranian <eranian@google.com>
LKML-Reference: <
1269353485.5109.48.camel@twins>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Peter Zijlstra [Tue, 23 Mar 2010 18:30:52 +0000 (19:30 +0100)]
x86: Move notify_cpu_starting() callback to a later stage
Because we need to have cpu identification things done by the time we run
CPU_STARTING notifiers.
( This init ordering will be relied on by the next fix. )
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <
1269353485.5109.48.camel@twins>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Fri, 2 Apr 2010 17:29:17 +0000 (19:29 +0200)]
Merge branch 'perf/urgent' of git://git./linux/kernel/git/frederic/random-tracing into perf/urgent
Linus Torvalds [Fri, 2 Apr 2010 15:18:02 +0000 (08:18 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: Add NOGET quirk for Quanta Pixart touchscreen
HID: fix oops in gyration_event()
Linus Torvalds [Fri, 2 Apr 2010 14:33:38 +0000 (07:33 -0700)]
Merge branch 'sh/for-2.6.34' of git://git./linux/kernel/git/lethal/sh-2.6
* 'sh/for-2.6.34' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
sh: Fix up the SH-3 build for recent TLB changes.
sh: export return_address() symbol.
sh: Enable the mmu in start_secondary()
sh: Fix FDPIC binary loader
arch/sh/kernel: Use set_cpus_allowed_ptr
sh: Update ecovec_defconfig
USB gadget r8a66597-udc.c: duplicated include
sh: update the TLB replacement counter for entry wiring.
Paul Mundt [Fri, 2 Apr 2010 07:13:27 +0000 (16:13 +0900)]
sh: Fix up the SH-3 build for recent TLB changes.
While the MMUCR.URB and ITLB/UTLB differentiation works fine for all SH-4
and later TLBs, these features are absent on SH-3. This splits out
local_flush_tlb_all() in to SH-4 and PTEAEX copies while restoring the
old SH-3 one, subsequently fixing up the build.
This will probably want some further reordering and tidying in the
future, but that's out of scope at present.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt [Fri, 2 Apr 2010 07:02:33 +0000 (16:02 +0900)]
sh: export return_address() symbol.
This is needed with some of the tracing code built as modules, so provide
the export.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Linus Torvalds [Thu, 1 Apr 2010 16:19:42 +0000 (09:19 -0700)]
Merge branch 'drm-linus' of git://git./linux/kernel/git/airlied/drm-2.6
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (76 commits)
drm/radeon/kms: enable ACPI powermanagement mode on radeon gpus.
drm/radeon/kms: rs400/480 should set common registers.
drm/radeon/kms: add sanity check to wptr.
drm/radeon/kms/evergreen: get DP working
drm/radeon/kms: add hw_i2c module option
drm/radeon/kms: use new pre/post_xfer i2c bit algo hooks
drm/radeon/kms: disable MSI on IGP chips
drm/radeon/kms: display watermark updates (v2)
drm/radeon/kms/dp: disable training pattern on the sink at the end of link training
drm/radeon/kms: minor fixes for eDP with LCD* device tags (v2)
drm/radeon/kms/dp: remove extraneous training complete call
drm/radeon/kms/atom: minor fixes to transmitter setup
drm/radeon/kms: Only restrict BO to visible VRAM size when pinning to VRAM.
drm: fix build error when SYSRQ is disabled
drm/radeon/kms: fix macbookpro connector quirk
drm/radeon/r6xx/r7xx: further safe reg clean up
drm/radeon: bump the UMS driver version for r6xx/r7xx const buffer support
drm/radeon/kms: bump the version for r6xx/r7xx const buffer support
drm/radeon/r6xx/r7xx: CS parser fixes
drm/radeon/kms: fix some typos in r6xx/r7xx hpd setup
...
Fix up MSI-related conflicts in drivers/gpu/drm/radeon/radeon_irq_kms.c
Linus Torvalds [Thu, 1 Apr 2010 16:14:20 +0000 (09:14 -0700)]
Merge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze
* 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze: (35 commits)
microblaze: Support word copying in copy_tofrom_user
microblaze: Print early printk information to log buffer
microblaze: head.S typo fix
microblaze: Use MICROBLAZE_TLB_SIZE in asm code
microblaze: Kconfig Fix - pci
microblaze: Adding likely macros
microblaze: Add .type and .size to ASM functions
microblaze: Fix TLB macros
microblaze: Use instruction with delay slot
microblaze: Remove additional resr and rear loading
microblaze: Change register usage for ESR and EAR
microblaze: Prepare work for optimization in exception code
microblaze: Add DEBUG option
microblaze: Support systems without lmb bram
microblaze: uaccess: Sync strlen, strnlen, copy_to/from_user
microblaze: uaccess: Unify __copy_tofrom_user
microblaze: uaccess: Move functions to generic location
microblaze: uaccess: Fix put_user for noMMU
microblaze: uaccess: Fix get_user macro for noMMU
microblaze: uaccess: fix clear_user for noMMU kernel
...
Linus Torvalds [Thu, 1 Apr 2010 16:13:57 +0000 (09:13 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mjg59/platform-drivers-x86
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
eeepc-wmi: new driver for WMI based hotkeys on Eee PC laptops
asus-laptop: fix warning in asus_handle_init
Oleg Nesterov [Thu, 1 Apr 2010 13:13:57 +0000 (15:13 +0200)]
oom: fix the unsafe usage of badness() in proc_oom_score()
proc_oom_score(task) has a reference to task_struct, but that is all.
If this task was already released before we take tasklist_lock
- we can't use task->group_leader, it points to nowhere
- it is not safe to call badness() even if this task is
->group_leader, has_intersects_mems_allowed() assumes
it is safe to iterate over ->thread_group list.
- even worse, badness() can hit ->signal == NULL
Add the pid_alive() check to ensure __unhash_process() was not called.
Also, use "task" instead of task->group_leader. badness() should return
the same result for any sub-thread. Currently this is not true, but
this should be changed anyway.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michal Simek [Mon, 22 Mar 2010 19:31:26 +0000 (20:31 +0100)]
microblaze: Support word copying in copy_tofrom_user
Word copying is used only for aligned addresses.
Here is space for improving to use any better copying technique.
Look at memcpy implementation.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Wed, 24 Mar 2010 10:07:10 +0000 (11:07 +0100)]
microblaze: Print early printk information to log buffer
If early printk console is not enabled then all messages
are written to log buffer.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Wed, 24 Mar 2010 10:06:23 +0000 (11:06 +0100)]
microblaze: head.S typo fix
I forget to change register name in comments.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Wed, 24 Mar 2010 09:09:17 +0000 (10:09 +0100)]
microblaze: Use MICROBLAZE_TLB_SIZE in asm code
TLB size was hardcoded in asm code. This patch brings ability
to change TLB size only in one place. (mmu.h).
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Tue, 23 Mar 2010 14:46:10 +0000 (15:46 +0100)]
microblaze: Kconfig Fix - pci
I forget to remove pci Kconfig option.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Tue, 23 Mar 2010 14:37:02 +0000 (15:37 +0100)]
microblaze: Adding likely macros
On the base on GCOV analytics is helpful to add likely/unlikely
macros.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Tue, 23 Mar 2010 07:09:32 +0000 (08:09 +0100)]
microblaze: Add .type and .size to ASM functions
Cachegrind analysis need this fix to be able to log asm functions.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 22 Mar 2010 13:54:35 +0000 (14:54 +0100)]
microblaze: Fix TLB macros
To be able to do trace TLB operations.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 22 Mar 2010 19:43:27 +0000 (20:43 +0100)]
microblaze: Use instruction with delay slot
Sync labels.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Fri, 19 Mar 2010 11:50:35 +0000 (12:50 +0100)]
microblaze: Remove additional resr and rear loading
RESR and REAR uses the same regs in whole file.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Fri, 19 Mar 2010 11:44:40 +0000 (12:44 +0100)]
microblaze: Change register usage for ESR and EAR
This change synchronize register usage in code.
ESR = R4
EAR = R3
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 22 Mar 2010 19:37:23 +0000 (20:37 +0100)]
microblaze: Prepare work for optimization in exception code
Any sync branch must follow mts instructions not mfs.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Thu, 18 Mar 2010 06:23:04 +0000 (07:23 +0100)]
microblaze: Add DEBUG option
Disable debug option in asm code.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 15 Mar 2010 07:48:27 +0000 (08:48 +0100)]
microblaze: Support systems without lmb bram
When the system has no lmb bram, main memory should be start from
zero because of microblaze vectors.
DTS fragment could look like:
DDR2_SDRAM: memory@0 {
device_type = "memory";
reg = < 0x0 0x10000000 >;
} ;
Then you have to setup CONFIG_KERNEL_BASE_ADDR=0 which caused
that kernel physical start address will be zero. On reset vector place
will be jump to 0x100 and on 0x100 starts kernel text.
You have to solve how to load the kernel before cpu starts.
Tested with XMD.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 22 Mar 2010 17:49:45 +0000 (18:49 +0100)]
microblaze: uaccess: Sync strlen, strnlen, copy_to/from_user
Last sync.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 22 Mar 2010 17:39:20 +0000 (18:39 +0100)]
microblaze: uaccess: Unify __copy_tofrom_user
Move to generic location.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 22 Mar 2010 17:23:45 +0000 (18:23 +0100)]
microblaze: uaccess: Move functions to generic location
noMMU and MMU use them.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 22 Mar 2010 15:22:41 +0000 (16:22 +0100)]
microblaze: uaccess: Fix put_user for noMMU
Here is small regression on dhrystone tests and I think
that on all benchmarking tests. It is due to better checking
mechanism in put_user macro
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 8 Mar 2010 09:52:24 +0000 (10:52 +0100)]
microblaze: uaccess: Fix get_user macro for noMMU
Use unified version.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 22 Mar 2010 15:02:59 +0000 (16:02 +0100)]
microblaze: uaccess: fix clear_user for noMMU kernel
Previous patches fixed only MMU version and this is the first
patch for noMMU kernel
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 8 Mar 2010 08:38:02 +0000 (09:38 +0100)]
microblaze: uaccess: Fix strncpy_from_user function
Generic implementation for noMMU and MMU version
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 22 Mar 2010 14:56:32 +0000 (15:56 +0100)]
microblaze: uaccess: fix copy_from_user macro
copy_from_user macro also use copy_tofrom_user function
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 22 Mar 2010 14:52:53 +0000 (15:52 +0100)]
microblaze: uaccess: copy_to_user unification
noMMU and MMU kernel will use copy copy_tofrom_user
asm implementation.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 22 Mar 2010 14:46:56 +0000 (15:46 +0100)]
microblaze: uaccess: sync put/get/clear_user macros
Add macro description and resort.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Mon, 22 Mar 2010 14:25:12 +0000 (15:25 +0100)]
microblaze: uaccess: fix put_user and get_user macros
Use FIXUP macros and resort them.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Fri, 5 Mar 2010 17:03:53 +0000 (18:03 +0100)]
microblaze: uaccess: fix __get_user_asm macro
It is used __FIXUP_SECTION and __EX_TABLE_SECTION macros.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Fri, 5 Mar 2010 15:50:01 +0000 (16:50 +0100)]
microblaze: uaccess: fix clean user macro
This is the first patch which does uaccess unification.
I choosed to do several patches to be able to use bisect
in future if any fault happens.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Fri, 5 Mar 2010 14:49:53 +0000 (15:49 +0100)]
microblaze: move noMMU __range_ok function to uaccess.h
The same noMMU and MMU functions should be placed in
one file.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Fri, 5 Mar 2010 14:37:57 +0000 (15:37 +0100)]
microblaze: Move exception_table_entry upward
Just sort to be able remove whole block.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Fri, 5 Mar 2010 14:34:12 +0000 (15:34 +0100)]
microblaze: Remove segment.h
I would like to use asm-generic uaccess.h where are segment
macros defined. This is just first step.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Wed, 3 Mar 2010 16:03:21 +0000 (17:03 +0100)]
microblaze: Remove memset in free_init_pages
We don't need to do it.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Arun Bhanu [Wed, 17 Mar 2010 08:06:04 +0000 (16:06 +0800)]
microblaze: Makefile cleanups
If CONFIG_INITRAMFS_SOURCE is set, "scripts/gen_initramfs_list.sh"
checks if the cpio image exists. Remove the duplicate check from the
Makefile.
Remove the "clean-kernel" variable which is unused in the Makefile and
is not used by the Kbuild.
Signed-off-by: Arun Bhanu <arun@bhanu.net>
Signed-off-by: Michal Simek <monstr@monstr.eu>
Arun Bhanu [Wed, 17 Mar 2010 08:06:03 +0000 (16:06 +0800)]
microblaze: Fix Makefile to delete build generated files
'make clean' does not to delete the following build generated file:
arch/microblaze/boot/linux.bin.ub
'make mrproper' does not to delete the following build generated files:
arch/microblaze/boot/simpleImage.*
Fix the Makefile to delete these build generated files.
See [1] for a discussion on why simpleImage.* files are deleted with 'make
mrproper' and not with 'make clean'.
[1] http://lkml.org/lkml/2010/3/12/96
Signed-off-by: Arun Bhanu <arun@bhanu.net>
Signed-off-by: Michal Simek <monstr@monstr.eu>
Arun Bhanu [Fri, 12 Mar 2010 08:31:40 +0000 (16:31 +0800)]
microblaze: Add a missing single quote to make 'make help' happy
'make ARCH=microblaze help' fails with the following error due to a
missing single quote.
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [help] Error 2
Signed-off-by: Arun Bhanu <arun@bhanu.net>
Signed-off-by: Michal Simek <monstr@monstr.eu>
Steven J. Magnani [Wed, 24 Feb 2010 20:54:15 +0000 (14:54 -0600)]
microblaze: Fix "kstack=" parsing
The "kstack=" command line parameter is not parsed correctly.
All proper values are interpreted as zero.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
Jason Wessel [Tue, 30 Mar 2010 19:05:07 +0000 (14:05 -0500)]
x86,kgdb: Always initialize the hw breakpoint attribute
It is required to call hw_breakpoint_init() on an attr before using it
in any other calls. This fixes the problem where kgdb will sometimes
fail to initialize on x86_64.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: 2.6.33 <stable@kernel.org>
LKML-Reference: <
1269975907-27602-1-git-send-email-jason.wessel@windriver.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Frederic Weisbecker [Mon, 22 Mar 2010 18:40:03 +0000 (19:40 +0100)]
perf: Use hot regs with software sched switch/migrate events
Scheduler's task migration events don't work because they always
pass NULL regs perf_sw_event(). The event hence gets filtered
in perf_swevent_add().
Scheduler's context switches events use task_pt_regs() to get
the context when the event occured which is a wrong thing to
do as this won't give us the place in the kernel where we went
to sleep but the place where we left userspace. The result is
even more wrong if we switch from a kernel thread.
Use the hot regs snapshot for both events as they belong to the
non-interrupt/exception based events family. Unlike page faults
or so that provide the regs matching the exact origin of the event,
we need to save the current context.
This makes the task migration event working and fix the context
switch callchains and origin ip.
Example: perf record -a -e cs
Before:
10.91% ksoftirqd/0 0 [k]
0000000000000000
|
--- (nil)
perf_callchain
perf_prepare_sample
__perf_event_overflow
perf_swevent_overflow
perf_swevent_add
perf_swevent_ctx_event
do_perf_sw_event
__perf_sw_event
perf_event_task_sched_out
schedule
run_ksoftirqd
kthread
kernel_thread_helper
After:
23.77% hald-addon-stor [kernel.kallsyms] [k] schedule
|
--- schedule
|
|--60.00%-- schedule_timeout
| wait_for_common
| wait_for_completion
| blk_execute_rq
| scsi_execute
| scsi_execute_req
| sr_test_unit_ready
| |
| |--66.67%-- sr_media_change
| | media_changed
| | cdrom_media_changed
| | sr_block_media_changed
| | check_disk_change
| | cdrom_open
v2: Always build perf_arch_fetch_caller_regs() now that software
events need that too. They don't need it from modules, unlike trace
events, so we keep the EXPORT_SYMBOL in trace_event_perf.c
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
Frederic Weisbecker [Mon, 22 Mar 2010 23:08:59 +0000 (00:08 +0100)]
perf: Correctly align perf event tracing buffer
The trace event buffer used by perf to record raw sample events
is typed as an array of char and may then not be aligned to 8
by alloc_percpu().
But we need it to be aligned to 8 in sparc64 because we cast
this buffer into a random structure type built by the TRACE_EVENT()
macro to store the traces. So if a random 64 bits field is accessed
inside, it may be not under an expected good alignment.
Use an array of long instead to force the appropriate alignment, and
perform a compile time check to ensure the size in byte of the buffer
is a multiple of sizeof(long) so that its actual size doesn't get
shrinked under us.
This fixes unaligned accesses reported while using perf lock
in sparc 64.
Suggested-by: David Miller <davem@davemloft.net>
Suggested-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
Cc: Steven Rostedt <rostedt@goodmis.org>
Dave Airlie [Wed, 31 Mar 2010 03:41:35 +0000 (13:41 +1000)]
drm/radeon/kms: enable ACPI powermanagement mode on radeon gpus.
Some GPUs have an APM/ACPI PM mode selection switch and some BIOSes
set this to APM. We really want this in ACPI mode for Linux.
Signed-off-by: Dave Airlie <airlied@redhat.com>