Paul Mackerras [Fri, 18 Apr 2008 03:33:43 +0000 (13:33 +1000)]
Merge branch 'master' of git://git./linux/kernel/git/jk/spufs
Kumar Gala [Wed, 16 Apr 2008 13:19:36 +0000 (23:19 +1000)]
[POWERPC] Remove unused machine call outs
When we moved to arch/powerpc we actively tried to avoid using the
ppc_md.setup_io_mappings(). Currently no board ports use it so let's
remove it to avoid any new boards using it.
Also, remove early_serial_map() since we don't even have a call out for
it in arch/powerpc.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Michael Ellerman [Wed, 16 Apr 2008 03:51:49 +0000 (13:51 +1000)]
[POWERPC] Always add preferred consoles in platforms/pseries/lpar.c
There is logic in platforms/peries/lpars.c which checks if the user has
specified a console on the command line, and refrains from adding a
preferred console entry for the hvc/hvsi console if they have.
This trips up if you use "netconsole=foo" on the command line, and has
the result that you get _only_ the netconsole, because the hvc device is
never added as a preferred console. Worse still if you get the netconsole
configuration wrong somehow, you end up with no console at all.
As it turns out we don't need to worry about checking the command line.
If the user has specified "console=foo", then foo will be set as the
preferred console when the command line is parsed in start_kernel(), much
later than the pseries code, and so the latter setting will take effect.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Michael Ellerman [Wed, 16 Apr 2008 03:51:48 +0000 (13:51 +1000)]
[POWERPC] Move prototype for find_udbg_vterm() into a header file
Move the prototype for find_udbg_vterm() into pseries.h, removing
it from setup.c.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Manish Ahuja [Fri, 11 Apr 2008 23:31:52 +0000 (09:31 +1000)]
[POWERPC] pseries/phyp dump: Reserve a variable amount of space at boot
This changes the way we calculate how much space to reserve for the
pHyp dump. Currently we reserve 256MB only. With this change, the
code first checks to see if an amount has been specified on the boot
command line with the "phyp_dump_reserve_size" option, and if so, uses
that much.
Otherwise it computes 5% of total ram and rounds it down to a multiple
of 256MB, and uses the larger of that or 256MB.
This is for large systems with a lot of memory (10GB or more). The
aim is to have more space available for the kernel on reboot on
machines with more resources. Although the dump will be collected
pretty fast and the memory released really early on allowing the
machine to have the full memory available, this alleviates any issues
that can be caused by having way too little memory on very very large
systems during those few minutes.
Signed-off-by: Manish Ahuja <mahuja@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Tue, 15 Apr 2008 19:52:30 +0000 (05:52 +1000)]
[POWERPC] Cleanup pgtable-ppc32.h
* Removed defines KERNEL_PGD_PTRS & USER_PGD_PTRS since they aren't
used anywhere
* Changed pmd_page macro to use pfn_to_page so we get proper behavior
if ARCH_PFN_OFFSET is set as well if we use a different memory model
on ppc32.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Tue, 15 Apr 2008 19:52:29 +0000 (05:52 +1000)]
[POWERPC] bootwrapper: Use physical address in PHDR for uImage
Now that we properly set the physical address in the program header of the
vmlinux ELF we can extract it to properly set the load and entry point for
u-boot uImages. Before we always hard coded the load & entry point to 0.
However there are situations that the kernel may be built with a non-zero
physical address.
We use objdump to extract the PHDR. We assume that there is only one
PHDR in the vmlinux of type LOAD.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Tue, 15 Apr 2008 19:52:28 +0000 (05:52 +1000)]
[POWERPC] Update linker script to properly set physical addresses
We can set LOAD_OFFSET and use the AT attribute on sections and the
linker will properly set the physical address of the LOAD program
header for us.
This allows us to know how the PHYSICAL_START the user configured a
kernel with by just looking at the resulting vmlinux ELF.
This is pretty much stolen from how x86 does things in their linker
scripts.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Tue, 15 Apr 2008 19:52:27 +0000 (05:52 +1000)]
[POWERPC] Move phys_addr_t definition into asm/types.h
Moved phys_addr_t out of mmu-*.h and into asm/types.h so we can use it in
places that before would have caused recursive includes.
For example to use phys_addr_t in <asm/page.h> we would have included
<asm/mmu.h> which would have possibly included <asm/mmu-hash64.h> which
includes <asm/page.h>. Wheeee recursive include.
CONFIG_PHYS_64BIT is a bit counterintuitive in light of ppc64 systems
and thus the config option is only used for ppc32 systems with >32-bit
physical addresses (44x, 85xx, 745x, etc.).
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Tue, 15 Apr 2008 19:52:26 +0000 (05:52 +1000)]
[POWERPC] Clean up some linker and symbol usage
* PAGE_OFFSET is not always the start of code, use _stext instead.
* grab PAGE_SIZE and KERNELBASE from asm/page.h like ppc64 does. Makes the
code a bit more common and provide a single place to manipulate the
defines for things like kdump.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Tue, 15 Apr 2008 19:52:25 +0000 (05:52 +1000)]
[POWERPC] Rename __initial_memory_limit to __initial_memory_limit_addr
We always use __initial_memory_limit as an address so rename it
to be clear.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Tue, 15 Apr 2008 19:52:24 +0000 (05:52 +1000)]
[POWERPC] Use lowmem_end_addr to limit lmb allocations on ppc32
Now that we have a proper variable that is the address of the top
of low memory we can use it to limit the lmb allocations.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Tue, 15 Apr 2008 19:52:23 +0000 (05:52 +1000)]
[POWERPC] 85xx: Cleanup TLB initialization
* Determine the RPN we are running the kernel at runtime rather
than using compile time constant for initial TLB
* Cleanup adjust_total_lowmem() to respect memstart_addr and
be a bit more clear on variables that are sizes vs addresses.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Tue, 15 Apr 2008 19:52:22 +0000 (05:52 +1000)]
[POWERPC] Introduce lowmem_end_addr to distinguish from total_lowmem
total_lowmem represents the amount of low memory, not the physical
address that low memory ends at. If the start of memory is at 0 it
happens that total_lowmem can be used as both the size and the address
that lowmem ends at (or more specifically one byte beyond the end).
To make the code a bit more clear and deal with the case when the start of
memory isn't at physical 0, we introduce lowmem_end_addr that represents
one byte beyond the last physical address in the lowmem region.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Tue, 15 Apr 2008 19:52:21 +0000 (05:52 +1000)]
[POWERPC] Remove and replace uses of PPC_MEMSTART with memstart_addr
A number of users of PPC_MEMSTART (40x, ppc_mmu_32) can just always
use 0 as we don't support booting these kernels at non-zero physical
addresses since their exception vectors must be at 0 (or 0xfffx_xxxx).
For the sub-arches that support relocatable interrupt vectors
(book-e), it's reasonable to have memory start at a non-zero physical
address. For those cases use the variable memstart_addr instead of
the #define PPC_MEMSTART since the only uses of PPC_MEMSTART are for
initialization and in the future we can set memstart_addr at runtime
to have a relocatable kernel.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Tue, 15 Apr 2008 19:52:20 +0000 (05:52 +1000)]
[POWERPC] Provide access to arch/powerpc include path on ppc64
There does not appear to be any reason that we shouldn't just have
-Iarch/$(ARCH) on both ppc32 and ppc64 builds.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Tue, 15 Apr 2008 19:52:19 +0000 (05:52 +1000)]
[POWERPC] Remove Kconfig option BOOT_LOAD
Nothing appears to use BOOT_LOAD so remove it as a configurable option.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Adrian Bunk [Mon, 14 Apr 2008 14:19:42 +0000 (00:19 +1000)]
[POWERPC] Add MODULE_LICENSE to powerpc/sysdev/rtc_cmos_setup.c
This adds the missing MODULE_LICENSE("GPL").
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
David Woodhouse [Sun, 13 Apr 2008 16:52:38 +0000 (02:52 +1000)]
[POWERPC] Efika: Really, don't pretend to be CHRP
Fedora 9 works on Efika without the separate 'device-tree supplement',
thanks to the kernel's own fixups. With one exception -- because 'CHRP'
still appears on the 'machine:' line in /proc/cpuinfo, the installer
misdetects the platform and misconfigures yaboot, putting it into a PReP
boot partition instead of in the /boot filesystem where the Efika's
firmware could find it.
The kernel's fixups for Efika already correct one instance of 'chrp', in
the 'device_type' property. This fixes it in the 'CODEGEN,description'
property too, since that's what's exposed to userspace in /proc/cpuinfo.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Jochen Friedrich [Fri, 11 Apr 2008 19:22:35 +0000 (05:22 +1000)]
[POWERPC] i2c: OF helpers for the i2c API
This implements various helpers to support OF bindings for the i2c
API.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Anton Vorontsov [Fri, 11 Apr 2008 13:06:36 +0000 (23:06 +1000)]
[POWERPC] Implement support for the GPIO LIB API
This implements support for the GPIO LIB API. Two calls are still
unimplemented though: irq_to_gpio and gpio_to_irq.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Anton Vorontsov [Fri, 11 Apr 2008 13:06:45 +0000 (23:06 +1000)]
[POWERPC] OF helpers for the GPIO API
This implements various helpers to support OF bindings for the GPIO
LIB API.
Previously this was PowerPC specific, but it seems this code isn't
arch-dependent anyhow, so let's place it into of/.
SPARC will not see this addition yet, real hardware seem to not use
GPIOs at all. But this might change:
http://www.leox.org/docs/faq_MLleon.html
"16-bit I/O port" sounds promising. :-)
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Benjamin Herrenschmidt [Wed, 9 Apr 2008 07:21:34 +0000 (17:21 +1000)]
[POWERPC] properly declare onstack completion in iseries veth
The iSeries veth driver uses an on-stack struct completion that
it initializes using the COMPLETION_INITIALIZER instead of
COMPLETION_INITIALIZER_ONSTACK macro, causing problems with
lockdep.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Benjamin Herrenschmidt [Wed, 9 Apr 2008 07:21:28 +0000 (17:21 +1000)]
[POWERPC] Fixup softirq preempt count
This fixes the handling of the preempt count when switching
interrupt stacks so that HW interrupt properly get the softirq
mask copied over from the previous stack.
It also initializes the softirq stack preempt_count to 0 instead
of SOFTIRQ_OFFSET, like x86, as __do_softirq() does the increment,
and we hit some lockdep checks if we have it twice.
That means we do run for a little while off the softirq stack
with the preempt-count set to 0, which could be deadly if we
try to take a softirq at that point, however we do so with
interrupts disabled, so I think we are ok.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Benjamin Herrenschmidt [Wed, 9 Apr 2008 07:21:26 +0000 (17:21 +1000)]
[POWERPC] Initialize paca->current earlier
Currently, we initialize the "current" pointer in the PACA (which
is used by the "current" macro in the kernel) before calling
setup_system(). That means that early_setup() is called with
current still "NULL" which is -not- a good idea. It happens to
work so far but breaks with lockdep when early code calls printk.
This changes it so that all PACAs are statically initialized with
__current pointing to the init task. For non-0 CPUs, this is fixed
up before use.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Ishizaki Kou [Mon, 17 Mar 2008 10:05:18 +0000 (21:05 +1100)]
[POWERPC] hvcbeat: Fix buffer manipulation
This fixes a potential bug at drivers/char/hvc_beat.c.
- hvc_put_term_char routine will decrement "rest" variable twice,
and forget to advance "buf" pointer by "nlen" bytes.
This bug was not hit previously because the output handler in
drivers/char/hvc_console.c splits given output into 16 bytes
at maximum.
Reported-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Ishizaki Kou [Fri, 14 Mar 2008 12:19:34 +0000 (23:19 +1100)]
[POWERPC] celleb: Coding style cleanup
Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Wed, 16 Apr 2008 21:45:35 +0000 (07:45 +1000)]
Merge branch 'for-2.6.26' of /linux/kernel/git/olof/pasemi
Jerone Young [Fri, 11 Apr 2008 19:03:33 +0000 (05:03 +1000)]
[POWERPC] 4xx: Add idle wait support for 44x platforms
This changes the cpu_idle loop for 44x platforms to utilize the Wait Enable
feature of the CPU. This helps virtulization solutions know when the guest
Linux kernel is in an idle state.
A command line option called "idle" is also added to allow people to change
the idle loop back to the original variation. This is done by setting
"idle=spin" on the kernel command line.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Josh Boyer [Tue, 15 Apr 2008 15:05:53 +0000 (10:05 -0500)]
[POWERPC] 4xx: Add ppc40x_defconfig
Add a multi-board PowerPC 40x defconfig file
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Josh Boyer [Sun, 6 Apr 2008 13:01:21 +0000 (08:01 -0500)]
[POWERPC] 4xx: Reorganize 4xx defconfigs
Board specific defconfigs are useful, however with the ability to do
multi-board defconfigs they aren't needed in the top level configs directory.
Move the 4xx board specific defconfigs to individual directories under
arch/powerpc/configs.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Paul Mackerras [Sat, 12 Apr 2008 05:20:59 +0000 (15:20 +1000)]
[LMB] Restructure allocation loops to avoid unsigned underflow
There is a potential bug in __lmb_alloc_base where we subtract `size'
from the base address of a reserved region without checking whether
the subtraction could wrap around and produce a very large unsigned
value. In fact it probably isn't possible to hit the bug in practice
since it would only occur in the situation where we can't satisfy the
allocation request and there is a reserved region starting at 0.
This fixes the potential bug by breaking out of the loop when we get
to the point where the base of the reserved region is less than the
size requested. This also restructures the loop to be a bit easier to
follow.
The same logic got copied into lmb_alloc_nid_unreserved, so this makes
a similar change there. Here the bug is more likely to be hit because
the outer loop (in lmb_alloc_nid) goes through the memory regions in
increasing order rather than decreasing order as __lmb_alloc_base
does, and we are therefore more likely to hit the case where we are
testing against a reserved region with a base address of 0.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Sat, 12 Apr 2008 05:20:59 +0000 (15:20 +1000)]
[LMB] Fix some whitespace and other formatting issues, use pr_debug
This makes no semantic changes. It fixes the whitespace and formatting
a bit, gets rid of a local DBG macro and uses the equivalent pr_debug
instead, and restructures one while loop that had a function call and
assignment in the condition to be a bit more readable. Some comments
about functions being called with relocation disabled were also removed
as they would just be confusing to most readers now that the code is
in lib/.
Signed-off-by: Paul Mackerras <paulus@samba.org>
David S. Miller [Mon, 24 Mar 2008 09:50:48 +0000 (20:50 +1100)]
[LMB] Add lmb_alloc_nid()
A variant of lmb_alloc() that tries to allocate memory on a specified
NUMA node 'nid' but falls back to normal lmb_alloc() if that fails.
The caller provides a 'nid_range' function pointer which assists the
allocator. It is given args 'start', 'end', and pointer to integer
'this_nid'.
It places at 'this_nid' the NUMA node id that corresponds to 'start',
and returns the end address within 'start' to 'end' at which memory
assosciated with 'nid' ends.
This callback allows a platform to use lmb_alloc_nid() in just
about any context, even ones in which early_pfn_to_nid() might
not be working yet.
This function will be used by the NUMA setup code on sparc64, and also
it can be used by powerpc, replacing it's hand crafted
"careful_allocation()" function in arch/powerpc/mm/numa.c
If x86 ever converts it's NUMA support over to using the LMB helpers,
it can use this too as it has something entirely similar.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Stephen Rothwell [Mon, 14 Apr 2008 02:08:47 +0000 (12:08 +1000)]
[POWERPC] replace asm/of_device.h with linux/of_device.h in macio.h
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Stephen Rothwell [Mon, 14 Apr 2008 02:00:47 +0000 (12:00 +1000)]
[POWERPC] remove include of asm/of_device.h from pmi.h
pmi.h does not diectly reference anything in of_device.h and of the two
files that include asm/pmi.h, one includes of_device.h and the other
includes of_platform.h (which includes of_device.h).
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Stephen Rothwell [Thu, 10 Apr 2008 06:44:30 +0000 (16:44 +1000)]
[POWERPC] iSeries: Localise and constify some iSeries data
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Stephen Rothwell [Thu, 10 Apr 2008 06:43:47 +0000 (16:43 +1000)]
[POWERPC] iSeries: Make iseries_reg_save private to iSeries
Now that we have the alpaca, the reg_save_ptr is no longer needed in the
paca. Eradicate all global uses of it and make it static in the iSeries
lpardata.c
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Stephen Rothwell [Thu, 10 Apr 2008 06:39:18 +0000 (16:39 +1000)]
[POWERPC] iSeries: Use alternate paca structure for booting
The iSeries HV only needs the first two fields of the paca statically
initialised, so create an alternate paca that contains only those and
switch to our real paca immediately after boot.
This is in order to make the 1024 cpu patches easier since they will no
longer have to statically initialise the pacas for iSeries.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Dale Farnsworth [Mon, 7 Apr 2008 22:13:10 +0000 (08:13 +1000)]
[POWERPC] prpmc2800 needs a dtbImage
The prpmc2800 platform requires a zImage formatted file with an
embedded dtb file. Rename the requested boot image file to
dtbImage.prpmc2800.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Dale Farnsworth [Mon, 7 Apr 2008 22:12:07 +0000 (08:12 +1000)]
[POWERPC] Document the mv64x60 device tree bindings
Add the device tree bindings for the Marvell mv64x60 series of
system controller chips in booting-without-of.text.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Dale Farnsworth [Mon, 7 Apr 2008 22:11:27 +0000 (08:11 +1000)]
[POWERPC] mv643xx_eth: Prepare to support multiple silicon blocks
The mv643xx_eth driver is being modified to support multiple instances
of the ethernet silicon block on the same platform. Each block contains
a single register bank containing the registers for up to three ports
interleaved within that bank. This patch updates the PowerPC OF to
platform_device glue code to support multiple silicon blocks, each
with up to three ethernet ports. The main difference is that we now
allow multiple mv64x60_shared platform_devices to be registered and
we provide each port platform_device with a pointer to its associated
shared platform_device. The pointer will not be used until the
mv643xx_eth driver changes are committed.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Acked-by: Mark Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Mark A. Greer [Mon, 7 Apr 2008 22:10:34 +0000 (08:10 +1000)]
[POWERPC] prpmc2800: Clean up dts properties
Remove several unused (or software config only) properties.
Rename marvel node to "system-controller". Also, rename the
"block-index" property to "cell-index" to conform to current
practice.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Dale Farnsworth [Mon, 7 Apr 2008 22:09:51 +0000 (08:09 +1000)]
[POWERPC] mv64x60: Remove device tree absolute path references
Replace several device node absolute path lookups in the mv64x60
bootwrapper code with lookups by compatible or device_type
properties.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Mark A. Greer [Mon, 7 Apr 2008 22:09:03 +0000 (08:09 +1000)]
[POWERPC] mv64x60: Fix FDT compatible names: mv64x60 => mv64360
Compatible names should refer to a specific version of the hardware,
without wildcards. Change each instance of mv64x60 to mv64360, which
is the oldest version we currently support.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Dale Farnsworth [Mon, 7 Apr 2008 22:08:06 +0000 (08:08 +1000)]
[POWERPC] prpmc2800: Fix frequencies in prpmc2800.dts
After the conversion to dts v1 format, seeing the frequencies
in decimal made it obvious that some of them had been
incorrectly truncated. This fixes them. Note that the PCI
frequency comes from a different source and is documented
as 66MHz, so it was left at
66000000.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Mark A. Greer [Mon, 7 Apr 2008 22:07:08 +0000 (08:07 +1000)]
[POWERPC] prpmc2800: Convert DTS to v1 and add labels
Update the prpmc2800 DTS file to version 1 and add labels.
I verified that there was no change in the resulting dtb file.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Stephen Rothwell [Fri, 11 Apr 2008 01:11:56 +0000 (11:11 +1000)]
[POWERPC] Fix MAX_ORDER config problem
The allyesconfig (among others) build was giving this:
In file included from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from include/linux/percpu.h:5,
from include2/asm/time.h:18,
from include2/asm/cputime.h:26,
from include/linux/sched.h:67,
from
arch/powerpc/kernel/asm-offsets.c:17:
include/linux/mmzone.h:791:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
Kconfig options are order depenendent, so move the setting of
FORCE_MAX_ZONEORDER to after the setting of PPC_64K_PAGES. Also add an
explicit !PPC_64K_PAGES.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Mon, 14 Apr 2008 03:59:02 +0000 (13:59 +1000)]
[POWERPC] Fix handling of unrecoverable SLB miss interrupts
If an SLB miss interrupt happens while the RI bit of MSR is zero, we
can't just return, because RI being zero indicates that SRR0/SRR1
potentially had live values in them, and the process of taking an
interrupt overwrites them.
This should never happen, but if it does, we try to print a nice oops
message. That doesn't work, however, because the code at unrecov_slb
assumes that the MMU has been turned on, but we call it with the MMU
off (and have done so since the SLB miss handler was rewritten to run
without turning the MMU on) -- except on iSeries, where everything runs
with the MMU on.
This fixes it by adding the necessary code to turn the MMU on if
necessary.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Mon, 14 Apr 2008 11:11:02 +0000 (21:11 +1000)]
Merge branch 'linux-2.6'
Linus Torvalds [Fri, 11 Apr 2008 20:32:29 +0000 (13:32 -0700)]
Linux 2.6.25-rc9
Linus Torvalds [Fri, 11 Apr 2008 20:24:16 +0000 (13:24 -0700)]
Merge branch 'docs' of git://git.lwn.net/linux-2.6
* 'docs' of git://git.lwn.net/linux-2.6:
Add additional examples in Documentation/spinlocks.txt
Move sched-rt-group.txt to scheduler/
Documentation: move rpc-cache.txt to filesystems/
Documentation: move nfsroot.txt to filesystems/
Spell out behavior of atomic_dec_and_lock() in kerneldoc
Fix a typo in highres.txt
Fixes to the seq_file document
Fill out information on patch tags in SubmittingPatches
Add the seq_file documentation
Mark Fasheh [Thu, 10 Apr 2008 20:55:21 +0000 (13:55 -0700)]
Add additional examples in Documentation/spinlocks.txt
Checkpatch will throw an error if code doesn't use the correct initializers
for static spinlocks:
ERROR: Use of SPIN_LOCK_UNLOCKED is deprecated: see Documentation/spinlocks.txt
This is fine, but Documentation/spinlocks.txt isn't very clear on how to
_use_ the new initializers for static variables. To save people time in the
future, I added two small examples of how to fix old-style static
initializers to be more lockdep friendly.
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
J. Bruce Fields [Mon, 7 Apr 2008 20:39:38 +0000 (16:39 -0400)]
Move sched-rt-group.txt to scheduler/
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
J. Bruce Fields [Mon, 7 Apr 2008 19:59:04 +0000 (15:59 -0400)]
Documentation: move rpc-cache.txt to filesystems/
This file is nfs-related. (Maybe Documentation/filesystems/ would
benefit from a separate nfs/ directory at some point.)
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
J. Bruce Fields [Mon, 7 Apr 2008 19:59:03 +0000 (15:59 -0400)]
Documentation: move nfsroot.txt to filesystems/
Documentation/ is a little large, and filesystems/ seems an obvious
place for this file.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
J. Bruce Fields [Mon, 7 Apr 2008 19:59:05 +0000 (15:59 -0400)]
Spell out behavior of atomic_dec_and_lock() in kerneldoc
A little more detail here wouldn't hurt.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Heiko Carstens [Fri, 11 Apr 2008 11:46:54 +0000 (13:46 +0200)]
Fix "$(AS) -traditional" compile breakage caused by asmlinkage_protect
git commit
54a015104136974262afa4b8ddd943ea70dec8a2 ("asmlinkage_protect
replaces prevent_tail_call") causes this build failure on s390:
AS arch/s390/kernel/entry64.o
In file included from arch/s390/kernel/entry64.S:14:
include/linux/linkage.h:34: error: syntax error in macro parameter list
make[1]: *** [arch/s390/kernel/entry64.o] Error 1
make: *** [arch/s390/kernel] Error 2
and some other architectures. The reason is that some architectures add
the "-traditional" flag to the invocation of $(AS), which disables
variadic macro argument support.
So just surround the new define with an #ifndef __ASSEMBLY__ to prevent
any side effects on asm code.
Cc: Roland McGrath <roland@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Fri, 11 Apr 2008 15:10:51 +0000 (08:10 -0700)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
i2c-tiny-usb: New VID/PID pair
i2c-davinci: Fix lost interrupt
i2c-ibm_iic: Fast mode parm desc fixup
Linus Torvalds [Fri, 11 Apr 2008 15:10:24 +0000 (08:10 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
[NETNS][IPV6] tcp - assign the netns for timewait sockets
[IPV4]: Fix byte value boundary check in do_ip_getsockopt().
BNX2X: Correct bringing chip out of reset
[NETFILTER]: nf_nat: autoload IPv4 connection tracking
[NETFILTER]: xt_hashlimit: fix mask calculation
[XFRM]: xfrm_user: fix selector family initialization
rt61pci: rt61pci_beacon_update do not free skb twice
ssb-mipscore: Fix interrupt vectors
ssb-pcicore: Fix IRQ TPS flag handling
mac80211: use short_preamble mode from capability if ERP IE not present
[NET]: Undo code bloat in hot paths due to print_mac().
[TCP]: Don't allow FRTO to take place while MTU is being probed
[TCP]: tcp_simple_retransmit can cause S+L
[TCP]: Fix NewReno's fast rexmit/recovery problems with GSOed skb
[TCP]: Restore 2.6.24 mark_head_lost behavior for newreno/fack
nl80211: fix STA AID bug
b43legacy: fix bcm4303 crash
iwlwifi: fix n-band association problem
ipw2200: set MAC address on radiotap interface
libertas: fix mode initialization problem
Linus Torvalds [Fri, 11 Apr 2008 15:09:57 +0000 (08:09 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC]: Fix several regset and ptrace bugs.
Davide Libenzi [Fri, 11 Apr 2008 04:29:29 +0000 (21:29 -0700)]
signalfd: fix for incorrect SI_QUEUE user data reporting
Michael Kerrisk found out that signalfd was not reporting back user data
pushed using sigqueue:
http://groups.google.com/group/linux.kernel/msg/
9397cab8551e3123
The following patch makes signalfd report back the ssi_ptr and ssi_int members
of the signalfd_siginfo structure.
Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Acked-by: Michael Kerrisk <mtk.manpages@googlemail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bjorn Helgaas [Fri, 11 Apr 2008 04:29:28 +0000 (21:29 -0700)]
pnp: increase number of devices supported per protocol
Increase the PNP "number of devices" limit. We currently use an unsigned
char, which limits us to 256 devices per protocol. This patch changes that to
an unsigned int.
Not all backends can take advantage of this: we limit ISAPNP to 10 devices in
isapnp_cfg_begin(), and PNPBIOS is limited to 256 devices because the BIOS
interfaces use a one-byte device node number.
But there is no limit on the number of PNPACPI devices we may have. Large HP
Integrity machines have more than 256, which causes the current "unsigned char
number" to wrap around. This causes errors like this:
pnp: PnP ACPI init
kobject_add failed for 00:00 with -EEXIST, don't try to register things with the same name in the same directory.
Call Trace:
[<
a000000100010720>] show_stack+0x40/0xa0
[<
a0000001000107b0>] dump_stack+0x30/0x60
[<
a0000001001dbdf0>] kobject_add+0x290/0x2c0
[<
a0000001002bfd40>] device_add+0x160/0x860
[<
a0000001002c0470>] device_register+0x30/0x60
[<
a00000010026ba70>] __pnp_add_device+0x130/0x180
[<
a00000010026bb70>] pnp_add_device+0xb0/0xe0
[<
a0000001007f2730>] pnpacpi_add_device+0x510/0x5a0
[<
a0000001007f2810>] pnpacpi_add_device_handler+0x50/0x80
This patch increases the limit to fix this PNPACPI problem. It should not
have any adverse effect on ISAPNP or PNPBIOS because their limits are still
enforced in the backends.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dan Williams [Fri, 11 Apr 2008 04:29:27 +0000 (21:29 -0700)]
md: close a livelock window in handle_parity_checks5
If a failure is detected after a parity check operation has been initiated,
but before it completes handle_parity_checks5 will never quiesce operations on
the stripe.
Explicitly handle this case by "canceling" the parity check, i.e. clear the
STRIPE_OP_CHECK flags and queue the stripe on the handle list again to refresh
any non-uptodate blocks.
Kernel versions >= 2.6.23 are susceptible.
Cc: <stable@kernel.org>
Cc: NeilBrown <neilb@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mike Pagano [Fri, 11 Apr 2008 04:29:26 +0000 (21:29 -0700)]
cciss: error: implicit declaration of function 'sg_init_table'
This patch adds the missing include directive <linux/scatterlist.h> to the
cciss.c source file. Â This was discovered by our release team when building
the kernel for the Alpha architecture.
Errors were found as references to functions 'sg_init_table' and 'sg_page' do
not exist without the include for Alpha.
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kay Sievers [Fri, 11 Apr 2008 04:29:25 +0000 (21:29 -0700)]
rtc: fix platform driver hotplug/coldplug
Since
43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is
prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable RTC
platform drivers, to re-enable module auto loading.
[dbrownell@users.sourceforge.net: more drivers, minor fix]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg KH <greg@kroah.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kay Sievers [Fri, 11 Apr 2008 04:29:23 +0000 (21:29 -0700)]
watchdog: fix platform driver hotplug/coldplug
Since
43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is
prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable watchdog
drivers, to re-enable auto loading.
[dbrownell@users.sourceforge.net: more drivers; registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kay Sievers [Fri, 11 Apr 2008 04:29:22 +0000 (21:29 -0700)]
usb host: fix platform driver hotplug/coldplug
Since
43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is
prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable USB HCDs,
to allow re-enable auto loading.
[dbrownell@users.sourceforge.net: more drivers; registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kay Sievers [Fri, 11 Apr 2008 04:29:21 +0000 (21:29 -0700)]
usb gadget: fix platform driver hotplug/coldplug
Since
43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is
prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable usb
peripheral drivers, to re-eable module auto loading.
[dbrownell@users.sourceforge.net: registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kay Sievers [Fri, 11 Apr 2008 04:29:20 +0000 (21:29 -0700)]
spi: fix platform driver hotplug/coldplug
Since
43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is
prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable SPI
platform drivers, to allow module auto loading.
[dbrownell@users.sourceforge.net: more drivers: registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Davide Libenzi [Fri, 11 Apr 2008 04:29:19 +0000 (21:29 -0700)]
eventfd/kaio integration fix
Jeff Roberson discovered a race when using kaio eventfd based notifications.
When it occurs it can lead tomissed wakeups and hung userspace.
This patch fixes the race by moving the notification inside the spinlocked
section of kaio. The operation is safe since eventfd spinlock and kaio one
are unrelated.
Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Zach Brown <zach.brown@oracle.com>
Cc: Jeff Roberson <jroberson@chesapeake.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Fri, 11 Apr 2008 04:29:18 +0000 (21:29 -0700)]
rtc: rtc-s35390a.c needs the bitreverse library
rtc-s35390a uses BITREVERSE functions so it needs to select that config symbol
to ensure that the functions are built.
drivers/built-in.o: In function `s35390a_set_datetime':
linux-2.6.25-rc8-git7/drivers/rtc/rtc-s35390a.c:144: undefined reference to `byte_rev_table'
drivers/built-in.o: In function `s35390a_get_datetime':
linux-2.6.25-rc8-git7/drivers/rtc/rtc-s35390a.c:163: undefined reference to `byte_rev_table'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Menage [Fri, 11 Apr 2008 04:29:16 +0000 (21:29 -0700)]
cgroups: include hierarchy ids in /proc/<pid>/cgroup
Extend the /proc/<pid>/cgroup file to include the appropriate hierarchy ID on
each line.
Currently this ID isn't really needed since a hierarchy can be completely
identified by the set of subsystems bound to it, but this is likely to change
in the near future in order to support stateless subsystems and
merging/rebinding of subsystems. Getting this change into 2.6.25 reduces the
need for an API change later.
Signed-off-by: Paul Menage <menage@google.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Till Harbaum [Fri, 11 Apr 2008 10:07:05 +0000 (12:07 +0200)]
i2c-tiny-usb: New VID/PID pair
I have recently bought some USB PIDs from EZPrototypes for my USB projects
and one will be for the i2c-tiny-usb. I have not yet started to use the new
one in the official i2c-tiny-usb firmware since i think it makes sense to get
the change into the kernel before releasing a modified firmware.
This patch adds support for the EZPrototypes USB vid/pid pair used in later
i2c-tiny-usb firmware versions (avrusb v1.06 and up, usbtiny v2.06 and up).
Signed-off-by: Till Harbaum <Till@Harbaum.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Troy Kisky [Fri, 11 Apr 2008 10:07:05 +0000 (12:07 +0200)]
i2c-davinci: Fix lost interrupt
DAVINCI_I2C_STR_REG is a write 1 to clear register,
so don't use a read/modify/write cycle.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Paul Mundt [Fri, 11 Apr 2008 10:07:04 +0000 (12:07 +0200)]
i2c-ibm_iic: Fast mode parm desc fixup
Noticed this when grepping for fast mode module params, the i2c-ibm_iic
driver was using a non-existent variable for MODULE_PARM_DESC. Fix it up
to reflect what it's actually supposed to be describing.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Daniel Lezcano [Fri, 11 Apr 2008 03:53:10 +0000 (20:53 -0700)]
[NETNS][IPV6] tcp - assign the netns for timewait sockets
Copy the network namespace from the socket to the timewait socket.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Acked-by: Mark Lord <mlord@pobox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Fri, 11 Apr 2008 00:35:23 +0000 (17:35 -0700)]
Add commentary about the new "asmlinkage_protect()" macro
It's really a pretty ugly thing to need, and some day it will hopefully
be obviated by teaching gcc about the magic calling conventions for the
low-level system call code, but in the meantime we can at least add big
honking comments about why we need these insane and strange macros.
I took my comments from my version of the macro, but I ended up deciding
to just pick Roland's version of the actual code instead (with his
prettier syntax that uses vararg macros). Thus the previous two commits
that actually implement it.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roland McGrath [Thu, 10 Apr 2008 22:38:45 +0000 (15:38 -0700)]
asmlinkage_protect sys_io_getevents
Use asmlinkage_protect in sys_io_getevents, because GCC for i386 with
CONFIG_FRAME_POINTER=n can decide to clobber an argument word on the
stack, i.e. the user struct pt_regs. Here the problem is not a tail
call, but just the compiler's use of the stack when it inlines and
optimizes the body of the called function. This seems to avoid it.
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roland McGrath [Thu, 10 Apr 2008 22:37:38 +0000 (15:37 -0700)]
asmlinkage_protect replaces prevent_tail_call
The prevent_tail_call() macro works around the problem of the compiler
clobbering argument words on the stack, which for asmlinkage functions
is the caller's (user's) struct pt_regs. The tail/sibling-call
optimization is not the only way that the compiler can decide to use
stack argument words as scratch space, which we have to prevent.
Other optimizations can do it too.
Until we have new compiler support to make "asmlinkage" binding on the
compiler's own use of the stack argument frame, we have work around all
the manifestations of this issue that crop up.
More cases seem to be prevented by also keeping the incoming argument
variables live at the end of the function. This makes their original
stack slots attractive places to leave those variables, so the compiler
tends not clobber them for something else. It's still no guarantee, but
it handles some observed cases that prevent_tail_call() did not.
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Venki Pallipadi [Thu, 10 Apr 2008 16:49:58 +0000 (09:49 -0700)]
x86: Simplify cpu_idle_wait
This patch also resolves hangs on boot:
http://lkml.org/lkml/2008/2/23/263
http://bugzilla.kernel.org/show_bug.cgi?id=10093
The bug was causing once-in-few-reboots 10-15 sec wait during boot on
certain laptops.
Earlier commit
40d6a146629b98d8e322b6f9332b182c7cbff3df added
smp_call_function in cpu_idle_wait() to kick cpus that are in tickless
idle. Looking at cpu_idle_wait code at that time, code seemed to be
over-engineered for a case which is rarely used (while changing idle
handler).
Below is a simplified version of cpu_idle_wait, which just makes a dummy
smp_call_function to all cpus, to make them come out of old idle handler
and start using the new idle handler. It eliminates code in the idle
loop to handle cpu_idle_wait.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Harvey Harrison [Thu, 10 Apr 2008 20:38:23 +0000 (13:38 -0700)]
lzo: fix typo in decompressor
Shift of a LE value seems strange, probably meant to shift the cpu-order
variable as in the prvious section of the switch statement.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Howells [Thu, 10 Apr 2008 15:11:05 +0000 (16:11 +0100)]
FRV: Don't make smp_{r, w, }mb() interpolate MEMBAR when CONFIG_SMP=n [try #2]
Don't make smp_{r,w,}mb() interpolate a MEMBAR instruction when CONFIG_SMP=n as
SMP memory barries on UP systems should interpolate a compiler barrier only.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Howells [Thu, 10 Apr 2008 15:11:00 +0000 (16:11 +0100)]
FRV: Make NOMMU-mode work with base addresses other than 0xC0000000 [try #2]
Make NOMMU-mode work with base addresses other than 0xC0000000 by:
(1) Giving the code that sets up the protection registers the right address
in __sdram_base. Rather than being hard coded to 0xC0000000, the value
of __page_offset is obtained from the linker script.
(2) Eliminate the check in __switch_to() that verifies the current thread
info is in the 0xCxxxxxxx region.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Howells [Thu, 10 Apr 2008 15:10:55 +0000 (16:10 +0100)]
FRV: Add support for emulation of userspace atomic ops [try #2]
Use traps 120-126 to emulate atomic cmpxchg32, xchg32, and XOR-, OR-, AND-, SUB-
and ADD-to-memory operations for userspace.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Howells [Thu, 10 Apr 2008 15:10:50 +0000 (16:10 +0100)]
FRV: Move STACK_TOP_MAX up [try #2]
Move STACK_TOP_MAX up so that we don't try moving the stack above it as that
causes setup_arg_pages() to malfunction.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Howells [Thu, 10 Apr 2008 15:10:45 +0000 (16:10 +0100)]
FRV: Handle update_mmu_cache() being called when current->mm is NULL [try #2]
Handle update_mmu_cache() being called when current->mm is NULL.
We cache static TLB mappings for the current page table in DAMPR4 and DAMPR5
on the theory that the next data lookup is likely to be in the same general
region, and thus is likely to be mapped by the same page table. However, we
can't get this information if we can't access the appropriate mm_struct.
If current->mm is NULL, we just clear the cache in the knowledge that the TLB
miss handlers will load it.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 10 Apr 2008 20:39:29 +0000 (13:39 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
[XFS] Ensure "both" features2 slots are consistent
[XFS] Fix superblock features2 field alignment problem
[XFS] remove shouting-indirection macros from xfs_sb.h
Linus Torvalds [Thu, 10 Apr 2008 20:39:07 +0000 (13:39 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
cfq-iosched: do not leak ioc_data across iosched switches
splice: fix infinite loop in generic_file_splice_read()
Roman Zippel [Wed, 9 Apr 2008 15:44:07 +0000 (17:44 +0200)]
HFS+: fix unlink of links
Some time ago while attempting to handle invalid link counts, I botched
the unlink of links itself, so this patch fixes this now correctly, so
that only the link count of nodes that don't point to links is ignored.
Thanks to Vlado Plaga <rechner@vlado-do.de> to notify me of this
problem.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David S. Miller [Thu, 10 Apr 2008 08:29:36 +0000 (01:29 -0700)]
[IPV4]: Fix byte value boundary check in do_ip_getsockopt().
This fixes kernel bugzilla 10371.
As reported by M.Piechaczek@osmosys.tv, if we try to grab a
char sized socket option value, as in:
unsigned char ttl = 255;
socklen_t len = sizeof(ttl);
setsockopt(socket, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, &len);
getsockopt(socket, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, &len);
The ttl returned will be wrong on big-endian, and on both little-
endian and big-endian the next three bytes in userspace are written
with garbage.
It's because of this test in do_ip_getsockopt():
if (len < sizeof(int) && len > 0 && val>=0 && val<255) {
It should allow a 'val' of 255 to pass here, but it doesn't so it
copies a full 'int' back to userspace.
On little-endian that will write the correct value into the location
but it spams on the next three bytes in userspace. On big endian it
writes the wrong value into the location and spams the next three
bytes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Fabio Checconi [Thu, 10 Apr 2008 06:28:01 +0000 (08:28 +0200)]
cfq-iosched: do not leak ioc_data across iosched switches
When switching scheduler from cfq, cfq_exit_queue() does not clear
ioc->ioc_data, leaving a dangling pointer that can deceive the following
lookups when the iosched is switched back to cfq. The pattern that can
trigger that is the following:
- elevator switch from cfq to something else;
- module unloading, with elv_unregister() that calls cfq_free_io_context()
on ioc freeing the cic (via the .trim op);
- module gets reloaded and the elevator switches back to cfq;
- reallocation of a cic at the same address as before (with a valid key).
To fix it just assign NULL to ioc_data in __cfq_exit_single_io_context(),
that is called from the regular exit path and from the elevator switching
code. The only path that frees a cic and is not covered is the error handling
one, but cic's freed in this way are never cached in ioc_data.
Signed-off-by: Fabio Checconi <fabio@gandalf.sssup.it>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Eric Sandeen [Thu, 10 Apr 2008 02:19:34 +0000 (12:19 +1000)]
[XFS] Ensure "both" features2 slots are consistent
Since older kernels may look in the sb_bad_features2 slot for flags,
rather than zeroing it out on fixup, we should make it equal to the
sb_features2 value.
Also, if the ATTR2 flag was not found prior to features2 fixup, it was not
set in the mount flags, so re-check after the fixup so that the current
session will use the feature.
Also fix up the comments to reflect these changes.
SGI-PV: 980085
SGI-Modid: xfs-linux-melb:xfs-kern:30778a
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
David Chinner [Thu, 6 Mar 2008 02:45:50 +0000 (13:45 +1100)]
[XFS] Fix superblock features2 field alignment problem
Due to the xfs_dsb_t structure not being 64 bit aligned, the last field of
the on-disk superblock can vary in location This causes problems when the
filesystem gets moved to a different platform, or there is a 32 bit
userspace and 64 bit kernel.
This patch detects the defect at mount time, logs a warning such as:
XFS: correcting sb_features alignment problem
in dmesg and corrects the problem so that everything is OK. it also
blacklists the bad field in the superblock so it does not get used for
something else later on.
SGI-PV: 977636
SGI-Modid: xfs-linux-melb:xfs-kern:30539a
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Eric Sandeen [Thu, 6 Mar 2008 02:44:28 +0000 (13:44 +1100)]
[XFS] remove shouting-indirection macros from xfs_sb.h
Remove macro-to-small-function indirection from xfs_sb.h, and remove some
which are completely unused.
SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30528a
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Jens Axboe [Thu, 10 Apr 2008 06:24:25 +0000 (08:24 +0200)]
splice: fix infinite loop in generic_file_splice_read()
There's a quirky loop in generic_file_splice_read() that could go
on indefinitely, if the file splice returns 0 permanently (and not
just as a temporary condition). Get rid of the loop and pass
back -EAGAIN correctly from __generic_file_splice_read(), so we
handle that condition properly as well.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
David S. Miller [Thu, 10 Apr 2008 02:39:25 +0000 (19:39 -0700)]
[SPARC]: Fix several regset and ptrace bugs.
1) ptrace should pass 'current' to task_user_regset_view()
2) When fetching general registers using a 64-bit view, and
the target is 32-bit, we have to convert.
3) Skip the whole register window get/set code block if
the user isn't asking to access anything in there.
Otherwise we have problems if the user doesn't have
an address space setup. Fetching ptrace register is
still valid at such a time, and ptrace does not try
to access the register window area of the regset.
Signed-off-by: David S. Miller <davem@davemloft.net>
Steven Rostedt [Wed, 9 Apr 2008 23:04:07 +0000 (19:04 -0400)]
pop previous section in alternative.c
gcc expects all toplevel assembly to return to the original section type.
The code in alteranative.c does not do this. This caused some strange bugs
in sched-devel where code would end up in the .rodata section and when
the kernel sets the NX bit on all .rodata, the kernel would crash when
executing this code.
This patch adds a .previous marker to return the code back to the
original section.
Credit goes to Andrew Pinski for telling me it wasn't a gcc bug but a
bug in the toplevel asm code in the kernel. ;-)
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 10 Apr 2008 01:36:12 +0000 (18:36 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/selinux-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
SELinux: don't BUG if fs reuses a superblock
Eric Paris [Wed, 9 Apr 2008 18:08:35 +0000 (14:08 -0400)]
SELinux: don't BUG if fs reuses a superblock
I (wrongly) assumed that nfs_xdev_get_sb() would not ever share a superblock
and so cloning mount options would always be correct. Turns out that isn't
the case and we could fall over a BUG_ON() that wasn't a BUG at all. Since
there is little we can do to reconcile different mount options this patch
just leaves the sb alone and the first set of options wins.
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: James Morris <jmorris@namei.org>