Anton Blanchard [Tue, 7 Dec 2010 14:36:05 +0000 (14:36 +0000)]
powerpc: iommu: Add device name to iommu error printks
Right now its difficult to see which device is running out of iommu space:
iommu_alloc failed, tbl
c00000076e096660 vaddr
c000000768806600 npages 1
Use dev_info() so we get the device name and location:
ipr 0000:00:01.0: iommu_alloc failed, tbl
c00000076e096660 vaddr
c000000768806600 npages 1
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Michael Ellerman [Sun, 28 Nov 2010 18:26:36 +0000 (18:26 +0000)]
powerpc: Record vma->phys_addr in ioremap()
The vmalloc code can track the physical address of a vma, when the
vma is used for ioremap, if set it is displayed in /proc/vmallocinfo.
Because get_vm_area_caller() doesn't know it's being called for
ioremap() it's up to the arch code to set the phys_addr. A bunch
of other arch's do this, I'm not sure why powerpc doesn't?
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Andreas Schwab [Sun, 28 Nov 2010 06:33:14 +0000 (06:33 +0000)]
powerpc: Update compat_arch_ptrace
Update compat_arch_ptrace to follow recent changes in
PTRACE_GET_DEBUGREG and the addition of
PPC_PTRACE_{GETHWDBGINFO|{SET|DEL}HWDEBUG}. The latter three can be
forwarded to arch_ptrace unchanged.
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Andreas Schwab [Sat, 27 Nov 2010 14:24:53 +0000 (14:24 +0000)]
powerpc: Fix PPC_PTRACE_SETHWDEBUG on PPC_BOOK3S
Properly set the DABR_TRANSLATION/DABR_DATA_READ/DABR_DATA_READ bits in
the dabr when setting the debug register via PPC_PTRACE_SETHWDEBUG. Also
don't reject trigger type of PPC_BREAKPOINT_TRIGGER_READ.
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Heiko Schocher [Mon, 22 Nov 2010 21:30:33 +0000 (21:30 +0000)]
powerpc/time: printk time stamp init not correct
problem:
I see sometimes on my mpc5200 based board such printk timing
information:
[ 0.000000] NR_IRQS:512 nr_irqs:512 16
[ 0.000000] MPC52xx PIC is up and running!
[ 0.000000] clocksource: timebase mult[79364d9] shift[22] registered
[ 0.000000] console [ttyPSC0] enabled
[ 130.300633] pid_max: default: 32768 minimum: 301
[ 130.305647] Mount-cache hash table entries: 512
[ 130.315818] NET: Registered protocol family 16
reason:
if the tbu not starts from 0 when linux boots, boot_tb
maybe could not store the real 64 bit tbu value, because
boot_tp is only a 32 bit unsigned long.
solution:
change boot_tb to u64
[BenH: Made it u64 instead of unsigned long long]
Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Sonny Rao [Thu, 18 Nov 2010 00:39:23 +0000 (00:39 +0000)]
powerpc: Minor cleanups for machdep.h
Remove stale declaration of setup_pci_ptrs, aparently from ppc before 2.4.0
Remove #ifdef around struct existance delcaration
Fix spelling of "linear"
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Sonny Rao <sonnyrao@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Sonny Rao [Thu, 18 Nov 2010 00:35:07 +0000 (00:35 +0000)]
Powerpc: separate CONFIG_RELOCATABLE from CONFIG_CRASHDUMP in boot code
Fix head_64.S so that we can build a relocatable kernel
that isn't necessarily a crash-dump kernel
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Sonny Rao <sonnyrao@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Anton Blanchard [Wed, 8 Dec 2010 00:55:03 +0000 (00:55 +0000)]
powerpc: Fix incorrect comment about interrupt stack allocation
We now allow interrupt stacks anywhere in the first segment which can be
256M or 1TB. Fix the comment.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Anton Blanchard [Tue, 7 Dec 2010 19:58:17 +0000 (19:58 +0000)]
powerpc: Hardcode popcnt instructions for old assemblers
The popcnt instructions went into binutils relatively recently. As with a
number of other instructions, create macros and hardcode them.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Thu, 9 Dec 2010 04:24:01 +0000 (15:24 +1100)]
powerpc/pseries: Pass phb only to iommu_table_setparms_lpar
iommu_table_setparms_lpar needs either the phb or the subbusnumber
(not both), pass the phb to make it similar to iommu_table_setparms.
Note: In cases where a caller was passing bus->number previously to
iommu_table_setparms_lpar() rather than phb->bus->number, this can lead
to a different value in tbl->it_busno. The only example of this was the
removed pci_dma_dev_setup_pSeriesLP(), removed in "ppc/iommu: remove
unneeded pci_dma_dev_setup_pSeriesLP".
[BenH: You updated only one of the two callers. Fixed that for you]
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Nishanth Aravamudan [Tue, 26 Oct 2010 17:35:15 +0000 (17:35 +0000)]
powerpc/pseries: Do not need to check for dma_window == NULL
The block in pci_dma_dev_setup_pSeriesLP for dma_window == NULL can be
removed because we will only teminate the loop if we had already allocated
a iommu table for that node or we found a window. While there may be
no window for the device, the intresting part is if we are reusing a
table or creating it for the first device under it.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Nishanth Aravamudan [Tue, 26 Oct 2010 17:35:14 +0000 (17:35 +0000)]
powerpc/pseries: Checking for pdn->parent is redundant
The device tree root is never a pci bus, and will not have a
PCI_DN(pdn), so the check for PCI_DN added in
650f7b3b2f0ead0673e90452cf3dedde97c537ba makes the check for pdn->parent
redundant and it can be removed.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Nishanth Aravamudan [Tue, 26 Oct 2010 17:35:13 +0000 (17:35 +0000)]
powerpc/pseries: Do not search for dma-window property on dlpar remove
The iommu_table pointer in the pci auxiliary struct of device_node has
not been used by the iommu ops since the dma refactor of
12d04eef927bf61328af2c7cbe756c96f98ac3bf, however this code still uses
it to find tables for dlpar. By only setting the PCI_DN iommu_table
pointer on nodes with dma window properties, we will be able to quickly
find the node for later checks, and can remove the table without looking
for the the dma window property on dlpar remove.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Nishanth Aravamudan [Mon, 18 Oct 2010 07:27:04 +0000 (07:27 +0000)]
powerpc/iommu: Use coherent_dma_mask for alloc_coherent
The IOMMU code has been passing the dma-mask instead of the
coherent_dma_mask to the iommu allocator. Coherent allocations should
be made using the coherent_dma_mask.
Also update the vio code to ensure the coherent_dma_mask is set. Without
this change drivers, such as ibmvscsi, fail to load with the corrected
dma_iommu_alloc_coherent().
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Thu, 9 Dec 2010 03:36:59 +0000 (14:36 +1100)]
Merge remote branch 'jwb/next' into next
Benjamin Herrenschmidt [Thu, 9 Dec 2010 03:36:38 +0000 (14:36 +1100)]
Merge branch 'nvram' into next
Jim Keniston [Thu, 11 Nov 2010 18:54:27 +0000 (18:54 +0000)]
powerpc/nvram: Handle partition names >= 12 chars
The name field in the nvram_header can be < 12 chars, null-terminated,
or 12 chars without the null. Handle this safely.
Signed-off-by: Jim Keniston <jkenisto@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Jim Keniston [Thu, 11 Nov 2010 18:54:22 +0000 (18:54 +0000)]
powerpc/nvram: Fix NVRAM partition list setup
Simplify creation and use of the NVRAM partition list.
Signed-off-by: Jim Keniston <jkenisto@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Mon, 2 Aug 2010 00:51:25 +0000 (10:51 +1000)]
powerpc/nvram: Rename ppc64,linux partition to ibm,rtas-log
I'm not aware of any userspace tool accessing it by its name anyways,
it's read back by the kernel itself on the next boot to get back
older log entries
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Mon, 2 Aug 2010 01:18:09 +0000 (11:18 +1000)]
powerpc/nvram: Move the log partition stuff to pseries
The nvram log partition stuff currently in nvram_64.c is really
pseries specific. It isn't actually used on anything else (despite
the fact that we ran the code to setup the partition on anything
except powermac) and the log format is specific to pseries RTAS
implementation. So move it where it belongs
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Mon, 2 Aug 2010 00:13:56 +0000 (10:13 +1000)]
powerpc/nvram: Change nvram_setup_partition() to use new helper
This changes the function to use nvram_find_partition() instead
of doing the lookup "by hand". It also makes some of the logic
clearer and prints out more useful diagnostic information.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Mon, 2 Aug 2010 00:01:58 +0000 (10:01 +1000)]
powerpc/nvram: Add nvram_find_partition()
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Thu, 29 Jul 2010 08:19:59 +0000 (18:19 +1000)]
powerpc/nvram: Improve partition removal
Existing code is nasty, has bugs etc... rewrite the function
more simply, and make it take the signature and optional
name of the partitions to remove as arguments, thus making
it a more generic utility.
We also try to remove a log partition that we find and is too
small rather than creating a duplicate.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Thu, 29 Jul 2010 07:38:55 +0000 (17:38 +1000)]
powerpc/nvram: Shuffle code around in nvram_create_partition()
This error log stuff is really pseries specific. As a first step we move
the initialization of these variables to the caller of
nvram_create_partition(), which is also slightly reorganized so we
setup the free partition before we clear the new partition, so the
chance of an error during clear leaving us with invalid headers
is lessened.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Thu, 29 Jul 2010 07:22:34 +0000 (17:22 +1000)]
powerpc/nvram: Completely clear a new partition
When creating a partition, we clear it entirely rather than
just the first two words since the previous code was rather
specific to the pseries log partition format.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Thu, 29 Jul 2010 07:21:17 +0000 (17:21 +1000)]
powerpc/nvram: Ensure that the partition header/block size is right
Use BUILD_BUG_ON to ensure the structure representing a partition
header have the right size.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Thu, 29 Jul 2010 08:18:44 +0000 (18:18 +1000)]
powerpc/nvram: nvram_create_partitions() now uses bytes
This converts nvram_create_partition() to use a size in bytes
rather than blocks. It does the appropriate alignment internally
The size passed is also the data size (ie. doesn't include the
header anymore).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Thu, 29 Jul 2010 05:28:20 +0000 (15:28 +1000)]
powerpc/nvram: More flexible nvram_create_partition()
Replace nvram_create_os_partition() with a variant that takes
the partition name, signature and size as arguments.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Benjamin Herrenschmidt [Thu, 29 Jul 2010 04:45:24 +0000 (14:45 +1000)]
powerpc/nvram: Move things out of asm/nvram.h
This moves a bunch of definitions out of asm/nvram.h to the files
that use them or just outright remove completely unused stuff.
We leave the partition signatures definitions, they will be useful
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Peter Zijlstra [Fri, 26 Nov 2010 14:38:45 +0000 (15:38 +0100)]
powerpc: Use call_rcu_sched() for pagetables
PowerPC relies on IRQ-disable to guard against RCU quiecent states,
use the appropriate RCU call version.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Victor Gallardo [Fri, 8 Oct 2010 10:25:44 +0000 (10:25 +0000)]
powerpc/4xx: Add Canyonlands suspend and idle support
- Add Clock Power Management (CPM) node to dts tree
- Add idle-doze entry in CPM node
- Add standby entry in CPM node
- Add PM and SUSPEND support by default in defconfig
- Remove UART2 and UART3 as they are unused, this will
allow CPM to put unused-units (UART2 and UART3) to sleep.
Signed-off-by: Victor Gallardo <vgallardo@apm.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Victor Gallardo [Fri, 8 Oct 2010 10:26:13 +0000 (10:26 +0000)]
powerpc/4xx: Add Kilauea suspend and idle support
- Add Clock Power Management (CPM) node to dts tree
- Add idle-doze entry in CPM node
- Add standby entry in CPM node
- Add PM and SUSPEND support by default in defconfig
- Add NO_HZ and CONFIG_HIGH_RES_TIMERS support by
default in defconfig
Signed-off-by: Victor Gallardo <vgallardo@apm.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Victor Gallardo [Fri, 8 Oct 2010 10:25:27 +0000 (10:25 +0000)]
powerpc/4xx: Add suspend and idle support
Add suspend/resume support for 4xx compatible CPUs.
See /sys/power/state for available power states configured in.
Add two different idle states (idle-wait and idle-doze) controlled via sysfs.
Default is idle-wait.
cat /sys/devices/system/cpu/cpu0/idle
[wait] doze
To save additional power, use idle-doze.
echo doze > /sys/devices/system/cpu/cpu0/idle
cat /sys/devices/system/cpu/cpu0/idle
wait [doze]
Signed-off-by: Victor Gallardo <vgallardo@apm.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Stephen Rothwell [Thu, 18 Nov 2010 15:06:17 +0000 (15:06 +0000)]
powerpc: Remove second definition of STACK_FRAME_OVERHEAD
Since STACK_FRAME_OVERHEAD is defined in asm/ptrace.h and that
is ASSEMBER safe, we can just include that instead of going via
asm-offsets.h.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Michael Neuling [Wed, 17 Nov 2010 18:52:45 +0000 (18:52 +0000)]
powerpc/mm: Avoid avoidable void* pointer
Change pgdir from a void to real type. Having this as a void is
stupid and has already caused 1 bug.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Michael Neuling [Wed, 17 Nov 2010 18:52:44 +0000 (18:52 +0000)]
powerpc: Add POWER7+ cputable entry
This adds the POWER7+ cputable entry for the PVR 0x004a0000. Rest is
the same as vanilla POWER7.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Michael Neuling [Wed, 17 Nov 2010 18:52:43 +0000 (18:52 +0000)]
powerpc: Remove POWER6 oprofile workarounds for POWER7
These are not needed on POWER7 so remove them.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Michael Neuling [Wed, 17 Nov 2010 18:52:42 +0000 (18:52 +0000)]
powerpc: Remove unneeded cpu_setup/restore from POWER7 cputable entry
These are not needed so just remove them
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Jesse Larrew [Tue, 9 Nov 2010 13:24:48 +0000 (13:24 +0000)]
powerpc: Add VPHN firmware feature
This simple patch adds the firmware feature for VPHN to the firmware
features bitmask.
Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Michael Ellerman [Mon, 8 Nov 2010 17:31:36 +0000 (17:31 +0000)]
powerpc: Consolidate obj-y assignments
No need to have three of them.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Jesper Juhl [Thu, 4 Nov 2010 13:29:40 +0000 (13:29 +0000)]
powerpc/iseries: Remove unused mf_getSrcHistory function and caller.
On Tue, 2 Nov 2010, Michael Ellerman wrote:
> On Mon, 2010-11-01 at 22:20 +0100, Jesper Juhl wrote:
> > Hi Stephen,
> >
> > On Tue, 2 Nov 2010, Stephen Rothwell wrote:
> >
> > > On Mon, 1 Nov 2010 21:06:23 +0100 (CET) Jesper Juhl <jj@chaosbits.net> wrote:
> > > >
> > > > Remove unused function 'mf_getSrcHistory' (that will never be used ever
> > > > according to Stephen Rothwell).
> > > >
> > > > Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> > >
> > > Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > >
> >
> > Ok, so if you are the (unofficial) iSeries maintainer and you don't merge
> > the patch somewhere that'll eventually go up-stream, but just ACK it
> > (thank you for that btw), then where do I send it to get it merged?
>
> Here. ie. linuxppc-dev.
>
> But, while you're removing it you should remove the #if 0'ed callsite as
> well, see mf_src_proc_show() in that file. :)
>
Done. See patch below.
Remove unused function 'mf_getSrcHistory' (that will never be used
ever according to Stephen Rothwell) and also remove most of (under 'if
0') code from mf_src_proc_show() where the function was called.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Jesper Juhl [Sat, 30 Oct 2010 08:10:41 +0000 (08:10 +0000)]
powerpc/cell: Use vzalloc rather than vmalloc and memset in spu_alloc_lscsa_std
Hi,
We can get rid of a memset in
arch/powerpc/platforms/cell/spufs/lscsa_alloc.c::spu_alloc_lscsa_std() by
using vzalloc() rather than vmalloc()+memset().
Completely untested patch below since I have no hardware nor tools to
compile this.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Nishanth Aravamudan [Tue, 26 Oct 2010 17:35:12 +0000 (17:35 +0000)]
powerpc: Add memory_hotplug_max()
Add a function to get the maximum address that can be hotplug added.
This is needed to calculate the size of the tce table needed to cover
all memory in 1:1 mode.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Nishanth Aravamudan [Tue, 26 Oct 2010 17:35:11 +0000 (17:35 +0000)]
powerpc/macio: Ensure all dma routines get copied over
Also add a comment to dev_archdata, indicating that changes there need
to be verified against the driver code.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Nishanth Aravamudan [Mon, 18 Oct 2010 07:27:03 +0000 (07:27 +0000)]
powerpc/pseries: iommu cleanup
No need to initialize per-cpu pointer to NULL, it is the default.
Direct dma ops and no setup are the defaults, no need to set for
iommu-off.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Nishanth Aravamudan [Mon, 18 Oct 2010 07:27:02 +0000 (07:27 +0000)]
powerpc/dart: iommu table cleanup
No need to set the device tree device_node pci node iommu pointer, its
only used for dlpar remove.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Nishanth Aravamudan [Mon, 18 Oct 2010 07:27:01 +0000 (07:27 +0000)]
powerpc/cell: Beat dma ops cleanup
direct_dma_ops is the default pci dma ops.
No need to call a function to get the pci dma ops, we know they are the
dma_direct_ops.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Nishanth Aravamudan [Mon, 18 Oct 2010 07:27:00 +0000 (07:27 +0000)]
powerpc/pasemi: Clean up pasemi iommu table initializations
No need for empty helpers with iommu off, the ppc_md hooks are optional.
The direct_dma_ops are the default pci_dma_ops, so no need to set in the
them iommu off case.
No need to set the device tree device_node pci node iommu pointer, its
only used for dlpar remove.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Nishanth Aravamudan [Mon, 18 Oct 2010 07:26:59 +0000 (07:26 +0000)]
powerpc/vio: Use dma ops helpers
Use the set_dma_ops helper. Instead of modifying vio_dma_mapping_ops,
just create a trivial wrapper for dma_supported.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tracey Dent [Fri, 15 Oct 2010 17:30:48 +0000 (17:30 +0000)]
powerpc/ps3: Replace the use of <module>-objs with <module>-y
Changed <module>-objs to <module>-y in Makefile.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Srikanth Krishnakar [Thu, 14 Oct 2010 04:03:35 +0000 (04:03 +0000)]
rtc-cmos.c : Fix warning on PowerPC
The following warning is seen while compilation of PowerPC kernel:
CC drivers/rtc/rtc-cmos.o
drivers/rtc/rtc-cmos.c:697:2: warning: #warning Assuming 128 bytes
of RTC+NVRAM address space, not 64 bytes.
Fix it by adding defined(__powerpc__).
Signed-off-by: Srikanth Krishnakar <skrishna@mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Vaidyanathan Srinivasan [Wed, 6 Oct 2010 08:37:09 +0000 (08:37 +0000)]
powerpc: Add support for new hcall H_BEST_ENERGY
Create sysfs interface to export data from H_BEST_ENERGY hcall
that can be used by administrative tools on supported pseries
platforms for energy management optimizations.
sys/device/system/cpu/pseries_(de)activate_hint_list and
sys/device/system/cpu/cpuN/pseries_(de)activate_hint will provide
hints for activation and deactivation of cpus respectively.
These hints are abstract number given by the hypervisor based
on the extended knowledge the hypervisor has regarding the
system topology and resource mappings.
The activate and the deactivate sysfs entry is for the two
distinct operations that we could do for energy savings. When
we have more capacity than required, we could deactivate few
core to save energy. The choice of the core to deactivate
will be based on /sys/devices/system/cpu/deactivate_hint_list.
The comma separated list of cpus (cores) will be the preferred
choice. If we have to activate some of the deactivated cores,
then /sys/devices/system/cpu/activate_hint_list will be used.
The per-cpu file
/sys/device/system/cpu/cpuN/pseries_(de)activate_hint further
provide more fine grain information by exporting the value of
the hint itself.
Added new driver module
arch/powerpc/platforms/pseries/pseries_energy.c
under new config option CONFIG_PSERIES_ENERGY
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Vaidyanathan Srinivasan [Wed, 6 Oct 2010 08:36:59 +0000 (08:36 +0000)]
powerpc: Cleanup APIs for cpu/thread/core mappings
These APIs take logical cpu number as input
Change cpu_first_thread_in_core() to cpu_first_thread_sibling()
Change cpu_last_thread_in_core() to cpu_last_thread_sibling()
These APIs convert core number (index) to logical cpu/thread numbers
Add cpu_first_thread_of_core(int core)
Changed cpu_thread_to_core() to cpu_core_index_of_thread(int cpu)
The goal is to make 'threads_per_core' accessible to the
pseries_energy module. Instead of making an API to read
threads_per_core, this is a higher level wrapper function to
convert from logical cpu number to core number.
The current APIs cpu_first_thread_in_core() and
cpu_last_thread_in_core() returns logical CPU number while
cpu_thread_to_core() returns core number or index which is
not a logical CPU number. The new APIs are now clearly named to
distinguish 'core number' versus first and last 'logical cpu
number' in that core.
The new APIs cpu_{first,last}_thread_sibling() work on
logical cpu numbers. While cpu_first_thread_of_core() and
cpu_core_index_of_thread() work on core index.
Example usage: (4 threads per core system)
cpu_first_thread_sibling(5) = 4
cpu_last_thread_sibling(5) = 7
cpu_core_index_of_thread(5) = 1
cpu_first_thread_of_core(1) = 4
cpu_core_index_of_thread() is used in cpu_to_drc_index() in the
module and cpu_first_thread_of_core() is used in
drc_index_to_cpu() in the module.
Make API changes to few callers. Export symbols for use in modules.
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
FUJITA Tomonori [Fri, 1 Oct 2010 11:12:54 +0000 (11:12 +0000)]
powerpc: enable ARCH_DMA_ADDR_T_64BIT with ARCH_PHYS_ADDR_T_64BIT
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Will Schmidt [Tue, 28 Sep 2010 15:33:12 +0000 (15:33 +0000)]
powerpc/pseries: Add kernel parameter to disable batched hcalls
This introduces a pair of kernel parameters that can be used to disable
the MULTITCE and BULK_REMOVE h-calls.
By default, those hcalls are enabled, active, and good for throughput
and performance. The ability to disable them will be useful for some of
the PREEMPT_RT related investigation and work occurring on Power.
Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
cc: Olof Johansson <olof@lixom.net>
cc: Anton Blanchard <anton@samba.org>
cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Lennert Buytenhek [Tue, 21 Sep 2010 23:22:40 +0000 (23:22 +0000)]
powerpc: Fix two typos in Documentation/powerpc/booting-without-of.txt
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Joe Perches [Mon, 13 Sep 2010 09:47:42 +0000 (09:47 +0000)]
drivers/char/hvc_vio: Use static const char arrays
Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Christian Dietrich [Mon, 6 Sep 2010 04:36:12 +0000 (04:36 +0000)]
powerpc: Removing undead ifdef __KERNEL__
The __KERNEL__ ifdef isn't necessary at this point, because it is
checked in an outer ifdef level already and has no effect here.
Signed-off-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Anton Blanchard [Tue, 24 Aug 2010 14:23:44 +0000 (14:23 +0000)]
powerpc/kdump: Override crash_free_reserved_phys_range to avoid freeing RTAS
The crashkernel region will almost always overlap RTAS. If we free the
crashkernel region via "echo 0 > /sys/kernel/kexec_crash_size" then we will
free RTAS and the machine will crash in confusing and exciting ways.
Override crash_free_reserved_phys_range and check for overlap with RTAS.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Anton Blanchard [Thu, 12 Aug 2010 16:28:09 +0000 (16:28 +0000)]
powerpc: Add support for popcnt instructions
POWER5 added popcntb, and POWER7 added popcntw and popcntd. As a first step
this patch does all the work out of line, but it would be nice to implement
them as inlines with an out of line fallback.
The performance issue with hweight was noticed when disabling SMT on a large
(192 thread) POWER7 box. The patch improves that testcase by about 8%.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Linus Torvalds [Mon, 29 Nov 2010 00:27:19 +0000 (16:27 -0800)]
Un-inline get_pipe_info() helper function
This avoids some include-file hell, and the function isn't really
important enough to be inlined anyway.
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 28 Nov 2010 22:09:57 +0000 (14:09 -0800)]
Export 'get_pipe_info()' to other users
And in particular, use it in 'pipe_fcntl()'.
The other pipe functions do not need to use the 'careful' version, since
they are only ever called for things that are already known to be pipes.
The normal read/write/ioctl functions are called through the file
operations structures, so if a file isn't a pipe, they'd never get
called. But pipe_fcntl() is special, and called directly from the
generic fcntl code, and needs to use the same careful function that the
splice code is using.
Cc: Jens Axboe <jaxboe@fusionio.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 28 Nov 2010 21:56:09 +0000 (13:56 -0800)]
Rename 'pipe_info()' to 'get_pipe_info()'
.. and change it to take the 'file' pointer instead of an inode, since
that's what all users want anyway.
The renaming is preparatory to exporting it to other users. The old
'pipe_info()' name was too generic and is already used elsewhere, so
before making the function public we need to use a more specific name.
Cc: Jens Axboe <jaxboe@fusionio.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 28 Nov 2010 20:25:02 +0000 (12:25 -0800)]
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: Fix the software context switch counter
perf, x86: Fixup Kconfig deps
x86, perf, nmi: Disable perf if counters are not accessible
perf: Fix inherit vs. context rotation bug
Linus Torvalds [Sun, 28 Nov 2010 20:24:20 +0000 (12:24 -0800)]
Merge branch 'fwnet' of git://git./linux/kernel/git/ieee1394/linux1394-2.6
* 'fwnet' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: net: throttle TX queue before running out of tlabels
firewire: net: replace lists by counters
firewire: net: fix memory leaks
firewire: net: count stats.tx_packets and stats.tx_bytes
Linus Torvalds [Sat, 27 Nov 2010 20:42:15 +0000 (12:42 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (30 commits)
ALSA: hda - Use ALC_INIT_DEFAULT for really default initialization
ASoC: Fix resource reclaim for osk5912
ASoC: tlv320aic3x - fix variable may be used uninitialized warning
ASoC: davinci-vcif - fix a memory leak
ASoC: phycore-ac97: fix resource leak
ASoC: imx-ssi: fix resource leak
ASoC: simone: fix resource leak in simone_init error path
ASoC: sam9g20_wm8731: fix resource leak in at91sam9g20ek_init error path
ASoC: snd-soc-
afeb9260: remove unneeded platform_device_del in error path
ASoC: pcm030-audio-fabric: fix resource leak in pcm030_fabric_init error path
ASoC: efika-audio-fabric: fix resource leak in efika_fabric_init error path
ASoC: Call snd_soc_unregister_dais instead of snd_soc_unregister_dai in sh4_soc_dai_remove
ASoC: fix SND_PXA2XX_LIB Kconfig warning
ALSA: hda - Fix ALC660-VD/ALC861-VD capture/playback mixers
ALSA: HDA: Add an extra DAC for Realtek ALC887-VD
ASoC: nuc900-ac97: fix a memory leak
ASoC: Return proper error for omap3pandora_soc_init
ASoC: wm8961 - clear WM8961_MCLKDIV bit for freq <=
16500000
ASoC: wm8961 - clear WM8961_DACSLOPE bit for normal mode
ALSA: hda - Fix Acer 7730G support
...
Linus Torvalds [Fri, 26 Nov 2010 22:30:30 +0000 (07:30 +0900)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
NFS: Ensure we return the dirent->d_type when it is known
NFS: Correct the array bound calculation in nfs_readdir_add_to_array
NFS: Don't ignore errors from nfs_do_filldir()
NFS: Fix the error handling in "uncached_readdir()"
NFS: Fix a page leak in uncached_readdir()
NFS: Fix a page leak in nfs_do_filldir()
NFS: Assume eof if the server returns no readdir records
NFS: Buffer overflow in ->decode_dirent() should not be fatal
Pure nfs client performance using odirect.
SUNRPC: Fix an infinite loop in call_refresh/call_refreshresult
Linus Torvalds [Fri, 26 Nov 2010 22:30:08 +0000 (07:30 +0900)]
Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6
* 'linux-next' of git://git.infradead.org/ubi-2.6:
UBI: release locks in check_corruption
Linus Torvalds [Fri, 26 Nov 2010 22:29:20 +0000 (07:29 +0900)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
posix-cpu-timers: Rcu_read_lock/unlock protect find_task_by_vpid call
Linus Torvalds [Fri, 26 Nov 2010 22:28:47 +0000 (07:28 +0900)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
dmar, x86: Use function stubs when CONFIG_INTR_REMAP is disabled
x86-64: Fix and clean up AMD Fam10 MMCONF enabling
x86: UV: Address interrupt/IO port operation conflict
x86: Use online node real index in calulate_tbl_offset()
x86, asm: Fix binutils 2.15 build failure
Linus Torvalds [Fri, 26 Nov 2010 22:28:17 +0000 (07:28 +0900)]
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 symbols: Remove incorrect open-coded container_of()
perf record: Handle restrictive permissions in /proc/{kallsyms,modules}
x86/kprobes: Prevent kprobes to probe on save_args()
irq_work: Drop cmpxchg() result
perf: Fix owner-list vs exit
x86, hw_nmi: Move backtrace_mask declaration under ARCH_HAS_NMI_WATCHDOG
tracing: Fix recursive user stack trace
perf,hw_breakpoint: Initialize hardware api earlier
x86: Ignore trap bits on single step exceptions
tracing: Force arch_local_irq_* notrace for paravirt
tracing: Fix module use of trace_bprintk()
Linus Torvalds [Fri, 26 Nov 2010 22:27:54 +0000 (07:27 +0900)]
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: Fix idle balancing
sched: Fix volanomark performance regression
Linus Torvalds [Fri, 26 Nov 2010 22:26:48 +0000 (07:26 +0900)]
Merge branch 'for-linus' of git://git390.marist.edu/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] qdio: free indicator after reset is finished
[S390] nmi: fix clock comparator revalidation
Linus Torvalds [Fri, 26 Nov 2010 22:17:50 +0000 (07:17 +0900)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
cciss: fix build for PROC_FS disabled
block: fix amiga and atari floppy driver compile warning
blk-throttle: Fix calculation of max number of WRITES to be dispatched
ioprio: grab rcu_read_lock in sys_ioprio_{set,get}()
xen/blkfront: cope with backend that fail empty BLKIF_OP_WRITE_BARRIER requests
xen/blkfront: Implement FUA with BLKIF_OP_WRITE_BARRIER
xen/blkfront: change blk_shadow.request to proper pointer
xen/blkfront: map REQ_FLUSH into a full barrier
Linus Torvalds [Fri, 26 Nov 2010 22:17:16 +0000 (07:17 +0900)]
Merge branch 'rmobile-fixes-for-linus' of git://git./linux/kernel/git/lethal/sh-2.6
* 'rmobile-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
ARM: mach-shmobile: clock-sh7372: remove bogus pllc2 clock toggling.
ARM: mach-shmobile: clock-sh7372: remove unnecessary fsi clocks
ARM: mach-shmobile: clock-sh7372: modify error code
ARM: mach-shmobile: ap4evb: FSI clock use proper process for ak4642
ARM: mach-shmobile: ap4evb: FSI clock use proper process for HDMI
ARM: mach-shmobile: clock-sh7372: remove fsidiv bogus disable
ARM: mach-shmobile: sh7372 USB0/IIC1 MSTP fix
Linus Torvalds [Fri, 26 Nov 2010 22:16:29 +0000 (07:16 +0900)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cjb/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
mmc: sdhci: 8-bit bus width changes
mmc: sdio: fix runtime PM anomalies by introducing MMC_CAP_POWER_OFF_CARD
mmc: sdio: fix nasty oops in mmc_sdio_detect
mmc: omap4: hsmmc: Fix improper card detection while booting
mmc: fix rmmod race for hosts using card-detection polling
mmc: sdhci: Fix crash on boot with C0 stepping Moorestown platforms
mmc: sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35
mmc: sdhci-esdhc-imx: fix timeout on i.MX's sdhci
mmc: sdhci: Properly enable SDIO IRQ wakeups
mmc: ushc: Return proper error code for ushc_probe()
mmc: Fix printing of card DDR type
Linus Torvalds [Fri, 26 Nov 2010 22:15:25 +0000 (07:15 +0900)]
Merge branch 's5p-fixes-for-linus' of git://git./linux/kernel/git/kgene/linux-samsung
* 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
ARM: S5PV210: Fix sysdev related warning messages
ARM: S3C24XX: Fix UART3 submask on S3C2416 and S3C2443
ARM: S3C24XX: Fix Demux error in UART3 irqs on S3C2443 and S3C2416
ARM: S3C64XX: fix uart clock setup for mini6410/real6410
ARM: S3C24XX: Fix wrong s3c_gpio_cfgpull
ARM: S3C2410: Adapt h1940-bluetooth to gpiolib changes
Linus Torvalds [Fri, 26 Nov 2010 22:14:00 +0000 (07:14 +0900)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
nilfs2: fix typo in comment of nilfs_dat_move function
nilfs2: nilfs_iget_for_gc() returns ERR_PTR
Takashi Iwai [Fri, 26 Nov 2010 16:17:42 +0000 (17:17 +0100)]
Merge branch 'fix/asoc' into for-linus
Takashi Iwai [Fri, 26 Nov 2010 16:11:18 +0000 (17:11 +0100)]
ALSA: hda - Use ALC_INIT_DEFAULT for really default initialization
When SKU assid gives no valid bits for 0x38, the driver didn't take
any action, so far. This resulted in the missing initialization for
external amps, etc, thus the silent output in the end.
Especially users hit this problem on ALC888 newly since 2.6.35,
where the driver doesn't force to use ALC_INIT_DEFAULT any more.
This patch sets the default initialization scheme to use
ALC_INIT_DEFAULT when no valid bits are set for SKU assid.
Reference:
https://bugzilla.redhat.com/show_bug.cgi?id=657388
Reported-and-tested-by: Kyle McMartin <kyle@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Peter Zijlstra [Fri, 26 Nov 2010 12:49:04 +0000 (13:49 +0100)]
perf: Fix the software context switch counter
Stephane noticed that because the perf_sw_event() call is inside the
perf_event_task_sched_out() call it won't get called unless we
have a per-task counter.
Reported-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Peter Zijlstra [Tue, 16 Nov 2010 20:49:01 +0000 (21:49 +0100)]
perf, x86: Fixup Kconfig deps
This leads to a Kconfig dep inversion, x86 selects PERF_EVENT (due to
a hw_breakpoint dep) but doesn't unconditionally provide
HAVE_PERF_EVENT.
(This can cause build failures on M386/M486 kernel .config's.)
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <
20101117222055.
982965150@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Don Zickus [Mon, 22 Nov 2010 21:55:23 +0000 (16:55 -0500)]
x86, perf, nmi: Disable perf if counters are not accessible
In a kvm virt guests, the perf counters are not emulated. Instead they
return zero on a rdmsrl. The perf nmi handler uses the fact that crossing
a zero means the counter overflowed (for those counters that do not have
specific interrupt bits). Therefore on kvm guests, perf will swallow all
NMIs thinking the counters overflowed.
This causes problems for subsystems like kgdb which needs NMIs to do its
magic. This problem was discovered by running kgdb tests.
The solution is to write garbage into a perf counter during the
initialization and hopefully reading back the same number. On kvm
guests, the value will be read back as zero and we disable perf as
a result.
Reported-by: Jason Wessel <jason.wessel@windriver.com>
Patch-inspired-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <
1290462923-30734-1-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Thomas Gleixner [Wed, 24 Nov 2010 09:05:55 +0000 (10:05 +0100)]
perf: Fix inherit vs. context rotation bug
It was found that sometimes children of tasks with inherited events had
one extra event. Eventually it turned out to be due to the list rotation
no being exclusive with the list iteration in the inheritance code.
Cure this by temporarily disabling the rotation while we inherit the events.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Randy Dunlap [Mon, 22 Nov 2010 20:48:34 +0000 (12:48 -0800)]
dmar, x86: Use function stubs when CONFIG_INTR_REMAP is disabled
The stubs for CONFIG_INTR_REMAP disabled need to be functions
instead of values to eliminate build warnings.
arch/x86/kernel/apic/apic.c: In function 'lapic_suspend':
arch/x86/kernel/apic/apic.c:2060:3: warning: statement with no effect
arch/x86/kernel/apic/apic.c: In function 'lapic_resume':
arch/x86/kernel/apic/apic.c:2137:3: warning: statement with no effect
Reported-and-Tested-by: Fabio Comolli <fabio.comolli@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
LKML-Reference: <
20101122124834.
74429004.randy.dunlap@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Axel Lin [Wed, 24 Nov 2010 14:24:01 +0000 (22:24 +0800)]
ASoC: Fix resource reclaim for osk5912
In current implementation, there are resources leak in the error path.
This patch properly reclaims the allocated resources in the error path.
Also adds a missing clk_put in osk_soc_exit.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 24 Nov 2010 14:40:59 +0000 (22:40 +0800)]
ASoC: tlv320aic3x - fix variable may be used uninitialized warning
If aic3x_read failed , val is used uninitialized.
Fix it by initializing val to 0.
This patch fixes below compile warning:
sound/soc/codecs/tlv320aic3x.c: In function 'aic3x_get_gpio':
sound/soc/codecs/tlv320aic3x.c:1183: warning: 'val' may be used uninitialized in this function
sound/soc/codecs/tlv320aic3x.c: In function 'aic3x_headset_detected':
sound/soc/codecs/tlv320aic3x.c:1211: warning: 'val' may be used uninitialized in this function
sound/soc/codecs/tlv320aic3x.c: In function 'aic3x_button_pressed':
sound/soc/codecs/tlv320aic3x.c:1219: warning: 'val' may be used uninitialized in this function
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 25 Nov 2010 03:33:14 +0000 (11:33 +0800)]
ASoC: davinci-vcif - fix a memory leak
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 25 Nov 2010 07:14:03 +0000 (15:14 +0800)]
ASoC: phycore-ac97: fix resource leak
Fix imx_phycore_init() error path and imx_phycore_exit() to properly free
allocated resources.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 25 Nov 2010 07:13:09 +0000 (15:13 +0800)]
ASoC: imx-ssi: fix resource leak
Fix imx_ssi_probe() error path and imx_ssi_remove() to properly free
allocated resources.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 25 Nov 2010 07:12:30 +0000 (15:12 +0800)]
ASoC: simone: fix resource leak in simone_init error path
Fix the error path to properly free allocated resources.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 25 Nov 2010 07:11:03 +0000 (15:11 +0800)]
ASoC: sam9g20_wm8731: fix resource leak in at91sam9g20ek_init error path
Fix the error path to properly free allocated resources.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 25 Nov 2010 02:44:59 +0000 (10:44 +0800)]
ASoC: snd-soc-
afeb9260: remove unneeded platform_device_del in error path
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 25 Nov 2010 07:08:31 +0000 (15:08 +0800)]
ASoC: pcm030-audio-fabric: fix resource leak in pcm030_fabric_init error path
Add missing platform_device_put() if platform_device_add() failed.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 25 Nov 2010 07:07:25 +0000 (15:07 +0800)]
ASoC: efika-audio-fabric: fix resource leak in efika_fabric_init error path
Add missing platform_device_put() if platform_device_add() failed.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 25 Nov 2010 09:23:55 +0000 (17:23 +0800)]
ASoC: Call snd_soc_unregister_dais instead of snd_soc_unregister_dai in sh4_soc_dai_remove
We call snd_soc_register_dais() in sh4_soc_dai_probe(),
thus we should call snd_soc_unregister_dais() in sh4_soc_dai_remove().
Otherwise, we got "too many arguments to function 'snd_soc_unregister_dai'"
error message.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Dmitry Artamonow [Wed, 24 Nov 2010 21:46:15 +0000 (00:46 +0300)]
ASoC: fix SND_PXA2XX_LIB Kconfig warning
Fix following warning observed when SND_PXA2XX_SOC is set and SND_ARM isn't:
warning: (SND_PXA2XX_AC97 && SOUND && !M68K && SND && SND_ARM && ARCH_PXA ||
SND_PXA2XX_SOC && SOUND && !M68K && SND && SND_SOC && ARCH_PXA) selects
SND_PXA2XX_LIB which has unmet direct dependencies (SOUND && !M68K && SND &&
SND_ARM)
Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jan Glauber [Thu, 25 Nov 2010 08:52:46 +0000 (09:52 +0100)]
[S390] qdio: free indicator after reset is finished
The qdio device indicator is freed before the device is notified that
the indicator is reset. This sequence contains a race when the freed
indicator is used by a new device while the reset of the indicator is
still pending. Do the reset operation before freeing the indicator to
avoid that potential race.
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Heiko Carstens [Thu, 25 Nov 2010 08:52:45 +0000 (09:52 +0100)]
[S390] nmi: fix clock comparator revalidation
On each machine check all registers are revalidated. The save area for
the clock comparator however only contains the upper most seven bytes
of the former contents, if valid.
Therefore the machine check handler uses a store clock instruction to
get the current time and writes that to the clock comparator register
which in turn will generate an immediate timer interrupt.
However within the lowcore the expected time of the next timer
interrupt is stored. If the interrupt happens before that time the
handler won't be called. In turn the clock comparator won't be
reprogrammed and therefore the interrupt condition stays pending which
causes an interrupt loop until the expected time is reached.
On NOHZ machines this can result in unresponsive machines since the
time of the next expected interrupted can be a couple of days in the
future.
To fix this just revalidate the clock comparator register with the
expected value.
In addition the special handling for udelay must be changed as well.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Herton Ronaldo Krzesinski [Thu, 25 Nov 2010 02:08:01 +0000 (00:08 -0200)]
ALSA: hda - Fix ALC660-VD/ALC861-VD capture/playback mixers
The mixer nids passed to alc_auto_create_input_ctls are wrong: 0x15 is
a pin, and 0x09 is the ADC on both ALC660-VD/ALC861-VD. Thus with
current code, input playback volume/switches and input source mixer
controls are not created, and recording doesn't work. Select correct
mixers, 0x0b (input playback mixer) and 0x22 (capture source mixer).
Reference: https://qa.mandriva.com/show_bug.cgi?id=61159
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>