]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agosh: fix pci io access for r2d boards
Magnus Damm [Thu, 14 Feb 2008 05:05:57 +0000 (14:05 +0900)]
sh: fix pci io access for r2d boards

Use generic_io_base to point out the pci io window, and make sure the
highest port address used is SH7751_PCI_IO_SIZE - 1.

This patch fixes pci io port access for the r2d boards - CONFIG_8139TOO_PIO
now works as expected. So does the alsa driver for CMI8738.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Katsuya MATSUBARA <matsu@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: fix ioreadN_rep and iowriteN_rep
Magnus Damm [Thu, 14 Feb 2008 04:59:02 +0000 (13:59 +0900)]
sh: fix ioreadN_rep and iowriteN_rep

This patch is a fix to make sure readsN/writesN are used over insN/outsN for
ioreadN_rep/iowriteN_rep.

The current state of the sh io code is that mmio operations like readN/writeN
and ioreadN/iowriteN are unaffected by the value of generic_io_base. This is
different fom port based io like inN/outN which gets adjusted using the value
in generic_io_base.

Without this patch ioreadN_rep/iowriteN_rep get their addresses adjusted.
The address for mmio access is adjusted using generic_io_base. This is wrong.
The ata core code currently crashes if generic_io_base is set.

This patch changes ioreadN_rep/iowriteN_rep to follow the same rules as the
rest of the mmio operations, ie don't adjust using generic_io_base.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Katsuya MATSUBARA <matsu@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: use ctrl_in/out for on chip pci access
Magnus Damm [Thu, 14 Feb 2008 04:52:43 +0000 (13:52 +0900)]
sh: use ctrl_in/out for on chip pci access

This patch makes sure ctrl_inN/outN are used instead of inN/outN for on chip
pci registers. Without this patch addresses may be adjusted using the value
in generic_io_base. This patch makes it possible to set generic_io_base and
have pci without reading and writing all over the place.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Katsuya MATSUBARA <matsu@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Kill off more dead symbols.
Paul Mundt [Wed, 13 Feb 2008 11:28:12 +0000 (20:28 +0900)]
sh: Kill off more dead symbols.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: __uncached_start only on sh32.
Paul Mundt [Wed, 13 Feb 2008 11:18:01 +0000 (20:18 +0900)]
sh: __uncached_start only on sh32.

sh64 doesn't provide __uncached_start, so don't reference it
unconditionally.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: asm/irq.h needs asm/cpu/irq.h.
Paul Mundt [Wed, 13 Feb 2008 11:16:47 +0000 (20:16 +0900)]
sh: asm/irq.h needs asm/cpu/irq.h.

The SH-5 build currently fails when trying to build the i8042 code due
to the missing IRQ definitions. These are provided in asm/cpu/irq.h, so
just include that there to get it building again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agoserial: sh-sci: Fix up SH-5 build.
Paul Mundt [Wed, 13 Feb 2008 11:15:36 +0000 (20:15 +0900)]
serial: sh-sci: Fix up SH-5 build.

asm/hardware.h doesn't exist any more, and the definitions sh-sci.h
depended on are provided through asm/cpu/addrspace.h these days.
Kill off the bogus include.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Get SH-5 caches working again post-unification.
Paul Mundt [Wed, 13 Feb 2008 11:14:10 +0000 (20:14 +0900)]
sh: Get SH-5 caches working again post-unification.

A number of cleanups to get the SH-5 cache management code in line with
the rest of the SH backend.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agomaple: Fix up maple build failure.
Paul Mundt [Wed, 13 Feb 2008 10:44:53 +0000 (19:44 +0900)]
maple: Fix up maple build failure.

maple_devinfo->connector_direction had a typo, fix it up..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Kill off bogus SH_SDK7780_STANDALONE symbol.
Paul Mundt [Wed, 13 Feb 2008 10:37:52 +0000 (19:37 +0900)]
sh: Kill off bogus SH_SDK7780_STANDALONE symbol.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: asm/tlb.h needs linux/pagemap.h for CONFIG_SWAP=n.
Paul Mundt [Wed, 13 Feb 2008 05:09:03 +0000 (14:09 +0900)]
sh: asm/tlb.h needs linux/pagemap.h for CONFIG_SWAP=n.

linux/swap.h really wants to include linux/pagemap.h in order to satisfy
the page_cache_release()/release_pages() definition requirements when
CONFIG_SWAP=n. Unfortunately the code in question contains:

/* only sparc can not include linux/pagemap.h in this file
 * so leave page_cache_release and release_pages undeclared... */
#define free_page_and_swap_cache(page) \
page_cache_release(page)
#define free_pages_and_swap_cache(pages, nr) \
release_pages((pages), (nr), 0);

so it looks like we're stuck with doing it in asm/tlb.h instead, as
others already do (ARM, CRIS, etc.). Grumble.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Tidy include/asm-sh/hp6xx.h
Kristoffer Ericson [Mon, 11 Feb 2008 17:41:49 +0000 (18:41 +0100)]
sh: Tidy include/asm-sh/hp6xx.h

This patch removes defunct. led support functions from hp6xx.h since they are now
added in a proper driver (see commit below). Also adds tabs instead of spaces before comments.

*commit d39a7a63eb3971b1b3cc5c181ed526bf437b1c72

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agomaple: improve detection of attached peripherals
Adrian McMenamin [Mon, 11 Feb 2008 00:25:02 +0000 (00:25 +0000)]
maple: improve detection of attached peripherals

Improve device detection for maple through longer delay

Experience suggests that a much longer delay in setting up the Maple bus
on the Dreamcast leads to better hardware detection.

Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Shut up some trivial build warnings.
Paul Mundt [Tue, 12 Feb 2008 08:02:08 +0000 (17:02 +0900)]
sh: Shut up some trivial build warnings.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Update SH-5 flush_cache_sigtramp() for API changes.
Paul Mundt [Tue, 12 Feb 2008 08:00:39 +0000 (17:00 +0900)]
sh: Update SH-5 flush_cache_sigtramp() for API changes.

Previously this took an explicit range, update this to use the same
behaviour as the rest of the SH parts where we simply flush out a line
from the start address.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Fix up set_fixmap_nocache() for SH-5.
Paul Mundt [Tue, 12 Feb 2008 07:59:30 +0000 (16:59 +0900)]
sh: Fix up set_fixmap_nocache() for SH-5.

This needs a PAGE_KERNEL_NOCACHE definition, as provided by pgtable_32.h.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Fix up pte_mkhuge() build breakage for SH-5.
Paul Mundt [Tue, 12 Feb 2008 07:55:21 +0000 (16:55 +0900)]
sh: Fix up pte_mkhuge() build breakage for SH-5.

Applies the fix from 5b67954e804465a4658dd4da8d52b87a8d1ea00c to
pgtable_64.h.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Disable big endian for SH-5.
Paul Mundt [Tue, 12 Feb 2008 07:48:43 +0000 (16:48 +0900)]
sh: Disable big endian for SH-5.

All SH-5 machines are little endian.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Handle SH7366 CPU in check_bugs().
Paul Mundt [Tue, 12 Feb 2008 07:48:16 +0000 (16:48 +0900)]
sh: Handle SH7366 CPU in check_bugs().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Symbol exports for trapped I/O.
Paul Mundt [Tue, 12 Feb 2008 07:02:02 +0000 (16:02 +0900)]
sh: Symbol exports for trapped I/O.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Clean up whitespace damage in Kconfig.debug.
Paul Mundt [Sat, 9 Feb 2008 10:11:12 +0000 (19:11 +0900)]
sh: Clean up whitespace damage in Kconfig.debug.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Use max_t in io_trapped.
Paul Mundt [Sat, 9 Feb 2008 10:10:52 +0000 (19:10 +0900)]
sh: Use max_t in io_trapped.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: add support for sh7366 processor
Magnus Damm [Fri, 8 Feb 2008 08:31:24 +0000 (17:31 +0900)]
sh: add support for sh7366 processor

This patch adds sh7366 cpu supports. Just the most basic things like interrupt
controller, clocks and serial port are included at this point.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: remove maskreg irq code
Magnus Damm [Fri, 8 Feb 2008 08:23:42 +0000 (17:23 +0900)]
sh: remove maskreg irq code

This patch removes the maskreg irq code since it is not in use anymore.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: fix ptrace copy_from/to_user() compilation error
Magnus Damm [Fri, 8 Feb 2008 08:26:54 +0000 (17:26 +0900)]
sh: fix ptrace copy_from/to_user() compilation error

This patch makes the 32-bit ptrace code compile again.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: trapped io support for highlander V2
Magnus Damm [Thu, 7 Feb 2008 11:23:53 +0000 (20:23 +0900)]
sh: trapped io support for highlander V2

This patch converts the highlander CF device from good old machvec readb/writeb
to the new shiny trapped io.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: trapped io support for r2d V2
Magnus Damm [Thu, 7 Feb 2008 11:21:10 +0000 (20:21 +0900)]
sh: trapped io support for r2d V2

This patch converts the CF device on r2d boards from machvec readb/writeb
to trapped io.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: trapped io support V2
Magnus Damm [Thu, 7 Feb 2008 11:18:21 +0000 (20:18 +0900)]
sh: trapped io support V2

The idea is that we want to get rid of the in/out/readb/writeb callbacks from
the machvec and replace that with simple inline read and write operations to
memory. Fast and simple for most hardware devices (think pci).

Some devices require special treatment though - like 16-bit only CF devices -
so we need to have some method to hook in callbacks.

This patch makes it possible to add a per-device trap generating filter. This
way we can get maximum performance of sane hardware - which doesn't need this
filter - and crappy hardware works but gets punished by a performance hit.

V2 changes things around a bit and replaces io access callbacks with a
simple minimum_bus_width value. In the future we can add stride as well.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: update r2d defconfigs with usb, spi and rtc
Magnus Damm [Thu, 7 Feb 2008 11:08:46 +0000 (20:08 +0900)]
sh: update r2d defconfigs with usb, spi and rtc

Update the defconfigs for r2d-plus and r2d-1 since we now have new drivers
for sm501 usb, spi-over-sci and epson r9701 rtc in mainline.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: use opcode_t and enable unaligned code for sh2a
Magnus Damm [Thu, 7 Feb 2008 11:04:12 +0000 (20:04 +0900)]
sh: use opcode_t and enable unaligned code for sh2a

This patch converts the unaligned access handling code to use opcode_t
instead of u16. While at it, enable unaligned access handling for sh2a.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: add byte support to the sign extension code
Magnus Damm [Thu, 7 Feb 2008 10:58:46 +0000 (19:58 +0900)]
sh: add byte support to the sign extension code

This patch adds byte support to the sign extension code. Unaligned access
traps should never be generated on 8-bit io operations, but we will use this
code for trapped io and we do need byte support there.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: make copy_to/from_user() static inline
Magnus Damm [Thu, 7 Feb 2008 10:50:52 +0000 (19:50 +0900)]
sh: make copy_to/from_user() static inline

This patch changes copy_from_user() and copy_to_user() from macros
into static inline functions. This way we can use them as function
pointers. Also unify the 64 bit and 32 bit versions.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: fix xtime_lock deadlocking.
Peter Zijlstra [Thu, 7 Feb 2008 06:01:26 +0000 (15:01 +0900)]
sh: fix xtime_lock deadlocking.

move update_process_times() out from under xtime_lock.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Add mach-type entries for MigoR and SDK7780.
Paul Mundt [Thu, 7 Feb 2008 04:13:44 +0000 (13:13 +0900)]
sh: Add mach-type entries for MigoR and SDK7780.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: migor board support
Magnus Damm [Wed, 6 Feb 2008 15:38:24 +0000 (00:38 +0900)]
sh: migor board support

This patch adds basic support for the Migo-R board.

Only simple stuff provided by the cpu specific sh7722 code is in place now,
like serial console port, timers and usb gadget. There is also partial support
for the smc91c111 ethernet controller - unfortunately some driver header file
also needs patching (not included here) to make the driver get IRQ sense
information from the platform data.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Wire up new timerfd syscalls.
Paul Mundt [Thu, 7 Feb 2008 04:05:13 +0000 (13:05 +0900)]
sh: Wire up new timerfd syscalls.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agomaple: Drop unused prototypes from linux/maple.h.
Adrian McMenamin [Wed, 6 Feb 2008 23:59:56 +0000 (23:59 +0000)]
maple: Drop unused prototypes from linux/maple.h.

This patch removes the now unneeded registration check variable from
struct maple_device. (This patch assumes the include/linux/maple.h file
has already been patched for whitespace errors by
http://lkml.org/lkml/2008/2/6/327)

Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agomaple: more robust device detection.
Adrian McMenamin [Wed, 6 Feb 2008 23:51:21 +0000 (23:51 +0000)]
maple: more robust device detection.

Replacement second-in-series patch:

This patch fixes up memory leaks and, by delaying initialisation, makes
device detection more robust.

It also makes clearer the difference between struct maple_device and
struct device, as well as cleaning up the interrupt request code
(without changing its function in any way).

Also now removes redundant registration checking.

Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agomaple: fix up whitespace damage.
Adrian McMenamin [Wed, 6 Feb 2008 22:46:21 +0000 (22:46 +0000)]
maple: fix up whitespace damage.

This patch is fundamentally about fixing up the whitespace problems
introduced by my previous patch (that brought the code into mainline). A
second patch will follow that will fix memory leaks. The two need to be
applied sequentially.

Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: break out unaligned sign extension code
Magnus Damm [Wed, 6 Feb 2008 15:02:50 +0000 (00:02 +0900)]
sh: break out unaligned sign extension code

Break out the sign extension code since it's used in multiple places.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: add probe support for new sh7722 cut
Magnus Damm [Wed, 6 Feb 2008 14:57:57 +0000 (23:57 +0900)]
sh: add probe support for new sh7722 cut

This patch adds support for sh7722 devices with prr value 0xa1.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: add sh7722 support to EARLY_SCIF_CONSOLE
Magnus Damm [Wed, 6 Feb 2008 14:54:23 +0000 (23:54 +0900)]
sh: add sh7722 support to EARLY_SCIF_CONSOLE

This patch adds the base address of SCIF0 in the case of sh7722.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: termios ioctl definitions
Alan Cox [Tue, 5 Feb 2008 07:50:25 +0000 (23:50 -0800)]
sh: termios ioctl definitions

These ports are holding up progress and now have been for months. Do the
job for them.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: remove unneeded cast
Stephen Rothwell [Sat, 2 Feb 2008 12:03:47 +0000 (23:03 +1100)]
sh: remove unneeded cast

now that platform_device_register_simple() takes a "const chat *".

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: declared coherent memory support V2 fix
Magnus Damm [Fri, 25 Jan 2008 03:42:48 +0000 (12:42 +0900)]
sh: declared coherent memory support V2 fix

This patch fixes the recently introduced declared coherent memory support.
Without this fix a cached memory area is returned by dma_alloc_coherent() -
unless dma_declare_coherent_memory() has setup a separate area.

This patch makes sure an uncached memory area is returned. With this patch
it is now possible to ping through an rtl8139 interface on r2d-plus.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agocpuidle: Add Documentation
Venkatesh Pallipadi [Thu, 14 Feb 2008 05:16:13 +0000 (00:16 -0500)]
cpuidle: Add Documentation

Documentation for cpuidle infrastructure. (resend)

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI, cpuidle: Clarify C-state description in sysfs
Venkatesh Pallipadi [Tue, 12 Feb 2008 01:46:31 +0000 (17:46 -0800)]
ACPI, cpuidle: Clarify C-state description in sysfs

Add a new sysfs entry under cpuidle states. desc - can be used by driver to
communicate to userspace any specific information about the state.
This helps in identifying the exact hardware C-states behind the ACPI C-state
definition.

Idea is to export this through powertop, which will help to map the C-state
reported by powertop to actual hardware C-state.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: fix suspend regression due to idle update
Venkatesh Pallipadi [Mon, 11 Feb 2008 23:20:27 +0000 (15:20 -0800)]
ACPI: fix suspend regression due to idle update

Earlier patch (bc71bec91f9875ef825d12104acf3bf4ca215fa4) broke
suspend resume on many laptops. The problem was reported by
Carlos R. Mafra and Calvin Walton, who bisected the issue to above patch.

The problem was because, C2 and C3 code were calling acpi_idle_enter_c1
directly, with C2 or C3 as state parameter, while suspend/resume was in
progress. The patch bc71bec started making use of that state information,
assuming that it would always be referring to C1 state. This caused the
problem with suspend-resume as we ended up using C2/C3 state indirectly.

Fix this by adding acpi_idle_suspend check in enter_c1.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoNFS: add missing spkm3 strings to mount option parser
Olga Kornievskaia [Wed, 13 Feb 2008 21:47:06 +0000 (16:47 -0500)]
NFS: add missing spkm3 strings to mount option parser

This patch adds previous missing spkm3 string values that are needed
to parse mount options in the kernel.

16 years agoNFS: remove error field from nfs_readdir_descriptor_t
Jeff Layton [Tue, 12 Feb 2008 11:49:01 +0000 (06:49 -0500)]
NFS: remove error field from nfs_readdir_descriptor_t

The error field in nfs_readdir_descriptor_t is never used outside of the
function in which it is set. Remove the field and change the place that
does use it to use an existing local variable.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years agoNFS: missing spaces in KERN_WARNING
Dan Muntz [Wed, 13 Feb 2008 21:09:35 +0000 (13:09 -0800)]
NFS: missing spaces in KERN_WARNING

The warning message for a v4 server returning various bad sequence-ids is
missing spaces.

Signed-off-by: Dan Muntz <dmuntz@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years agoNFS: Allow text-based mounts via compat_sys_mount
Chuck Lever [Wed, 13 Feb 2008 19:55:17 +0000 (14:55 -0500)]
NFS: Allow text-based mounts via compat_sys_mount

The compat_sys_mount() system call throws EINVAL for text-based NFSv4
mounts.

The text-based mount interface assumes that any mount option blob that
doesn't set the version field to "1" is a C string (ie not a legacy
mount request).  The compat_sys_mount() call treats blobs that don't
set the version field to "1" as an error.  We just relax the check in
compat_sys_mount() a bit to allow C strings to be passed down to the NFSv4
client.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years agoNFS: fix reference counting for NFSv4 callback thread
Jeff Layton [Mon, 11 Feb 2008 15:00:20 +0000 (10:00 -0500)]
NFS: fix reference counting for NFSv4 callback thread

The reference counting for the NFSv4 callback thread stays artificially
high. When this thread comes down, it doesn't properly tear down the
svc_serv, causing a memory leak. In my testing on an older kernel on
x86_64, memory would leak out of the 8k kmalloc slab. So, we're leaking
at least a page of memory every time the thread comes down.

svc_create() creates the svc_serv with a sv_nrthreads count of 1, and
then svc_create_thread() increments that count. Whenever the callback
thread is started it has a sv_nrthreads count of 2. When coming down, it
calls svc_exit_thread() which decrements that count and if it hits 0, it
tears everything down. That never happens here since the count is always
at 2 when the thread exits.

The problem is that nfs_callback_up() should be calling svc_destroy() on
the svc_serv on both success and failure. This is how lockd_up_proto()
handles the reference counting, and doing that here fixes the leak.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years ago[NETFILTER]: make secmark_tg_destroy() static
Adrian Bunk [Thu, 14 Feb 2008 01:41:39 +0000 (17:41 -0800)]
[NETFILTER]: make secmark_tg_destroy() static

This patch makes the needlessly global secmark_tg_destroy() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[INET]: Unexport inet_listen_wlock
Adrian Bunk [Thu, 14 Feb 2008 01:40:25 +0000 (17:40 -0800)]
[INET]: Unexport inet_listen_wlock

This patch removes the no longer used EXPORT_SYMBOL(inet_listen_wlock).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[INET]: Unexport __inet_hash_connect
Adrian Bunk [Thu, 14 Feb 2008 01:39:34 +0000 (17:39 -0800)]
[INET]: Unexport __inet_hash_connect

This patch removes the unused EXPORT_SYMBOL_GPL(__inet_hash_connect).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Thu, 14 Feb 2008 00:23:44 +0000 (16:23 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] gdth: update deprecated pci_find_device
  [SCSI] gdth: scan for scsi devices
  [SCSI] sym53c416: fix module parameters
  [SCSI] lpfc 8.2.5 : Update lpfc driver version to 8.2.5
  [SCSI] lpfc 8.2.5 : Fix buffer leaks
  [SCSI] lpfc 8.2.5 : Miscellaneous discovery Fixes
  [SCSI] lpfc 8.2.5 : Add MSI-X single message support
  [SCSI] lpfc 8.2.5 : Miscellaneous Fixes
  [SCSI] lpfc 8.2.5 : Correct ndlp referencing issues
  [SCSI] update SG_ALL to avoid causing chaining
  [SCSI] aic94xx: fix ABORT_TASK define conflict
  [SCSI] fas216: Use scsi_eh API for REQUEST_SENSE invocation
  [SCSI] ses: fix memory leaks
  [SCSI] aacraid: informational sysfs value corrections
  [SCSI] mpt fusion: Request I/O resources only when required
  [SCSI] aacraid: ignore adapter reset check polarity
  [SCSI] aacraid: add optional MSI support
  [SCSI] mpt fusion: Avoid racing when mptsas and mptcl module are loaded in parallel
  [SCSI] MegaRAID driver management char device moved to misc
  [SCSI] advansys: fix overrun_buf aligned bug

16 years agoLinux Kernel Markers: create modpost file
Mathieu Desnoyers [Wed, 13 Feb 2008 23:03:39 +0000 (15:03 -0800)]
Linux Kernel Markers: create modpost file

This adds some new magic in the MODPOST phase for CONFIG_MARKERS.  Analogous
to the Module.symvers file, the build will now write a Module.markers file
when CONFIG_MARKERS=y is set.  This file lists the name, defining module, and
format string of each marker, separated by \t characters.  This simple text
file can be used by offline build procedures for instrumentation code,
analogous to how System.map and Module.symvers can be useful to have for
kernels other than the one you are running right now.

The strings are made easy to extract by having the __trace_mark macro define
the name and format together in a single array called __mstrtab_* in the
__markers_strings section.  This is straightforward and reliable as long as
the marker structs are always defined by this macro.  It is an unreasonable
amount of hairy work to extract the string pointers from the __markers section
structs, which entails handling a relocation type for every machine under the
sun.

Mathieu :
- Ran through checkpatch.pl

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: David Smith <dsmith@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoLinux Kernel Markers: support multiple probes
Mathieu Desnoyers [Wed, 13 Feb 2008 23:03:37 +0000 (15:03 -0800)]
Linux Kernel Markers: support multiple probes

RCU style multiple probes support for the Linux Kernel Markers.  Common case
(one probe) is still fast and does not require dynamic allocation or a
supplementary pointer dereference on the fast path.

- Move preempt disable from the marker site to the callback.

Since we now have an internal callback, move the preempt disable/enable to the
callback instead of the marker site.

Since the callback change is done asynchronously (passing from a handler that
supports arguments to a handler that does not setup the arguments is no
arguments are passed), we can safely update it even if it is outside the
preempt disable section.

- Move probe arm to probe connection. Now, a connected probe is automatically
  armed.

Remove MARK_MAX_FORMAT_LEN, unused.

This patch modifies the Linux Kernel Markers API : it removes the probe
"arm/disarm" and changes the probe function prototype : it now expects a
va_list * instead of a "...".

If we want to have more than one probe connected to a marker at a given
time (LTTng, or blktrace, ssytemtap) then we need this patch. Without it,
connecting a second probe handler to a marker will fail.

It allow us, for instance, to do interesting combinations :

Do standard tracing with LTTng and, eventually, to compute statistics
with SystemTAP, or to have a special trigger on an event that would call
a systemtap script which would stop flight recorder tracing.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Mike Mason <mmlnx@us.ibm.com>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Cc: David Smith <dsmith@redhat.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopcmcia: ipwireless depends on NETDEVICES
Paul Mundt [Wed, 13 Feb 2008 23:03:36 +0000 (15:03 -0800)]
pcmcia: ipwireless depends on NETDEVICES

ipwireless (added by 099dc4fb62653f6019d78db55fba7a18ef02d65b) is clearly
a net device:

drivers/built-in.o: In function `ipwireless_ppp_start_xmit':
/home/pmundt/devel/git/sh-2.6.25/drivers/char/pcmcia/ipwireless/network.c:165: undefined reference to `skb_under_panic'
/home/pmundt/devel/git/sh-2.6.25/drivers/char/pcmcia/ipwireless/network.c:165: undefined reference to `kfree_skb'
drivers/built-in.o: In function `ipwireless_network_packet_received':
/home/pmundt/devel/git/sh-2.6.25/drivers/char/pcmcia/ipwireless/network.c:377: undefined reference to `__alloc_skb'
/home/pmundt/devel/git/sh-2.6.25/drivers/char/pcmcia/ipwireless/network.c:377: undefined reference to `skb_over_panic'
drivers/built-in.o: In function `ppp_shutdown_interface':
/home/pmundt/devel/git/sh-2.6.25/drivers/net/ppp_generic.c:2517: undefined reference to `unregister_netdev'
/home/pmundt/devel/git/sh-2.6.25/drivers/net/ppp_generic.c:2517: undefined reference to `free_netdev'
[ ... and many more ... ]

select strikes again. ipwireless selects PPP which in turn tries to select
SLHC, both of which are technically "protected" by an if NETDEVICES
in drivers/net/Kconfig. This leads to .config hilarity, with net suddenly
ending up in the SCSI menu:

#
# SCSI device support
#
# CONFIG_SCSI_DMA is not set
# CONFIG_SCSI_NETLINK is not set
CONFIG_PPP=y
# CONFIG_PHONE is not set

Curiously the SLHC select from PPP doesn't seem to happen, as there's no
CONFIG_SLHC=y (only CONFIG_PPP=y gets set) -- Kconfig bug? Caught with a
randconfig.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoSmack: check for 'struct socket' with NULL sk
Ahmed S. Darwish [Wed, 13 Feb 2008 23:03:34 +0000 (15:03 -0800)]
Smack: check for 'struct socket' with NULL sk

There's a small problem with smack and NFS. A similar report was also
sent here: http://lkml.org/lkml/2007/10/27/85

I've also added similar checks in inode_{get/set}security().  Cheating from
SELinux post_create_socket(), it does the same.

[akpm@linux-foundation.org: remove uneeded BUG_ON()]
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Acked-by: Casey Schaufler <casey@schuafler-ca.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoudf: fix udf_add_free_space
Marcin Slusarz [Wed, 13 Feb 2008 23:03:33 +0000 (15:03 -0800)]
udf: fix udf_add_free_space

In commit 742ba02a51c8d0bf5446b154531179760c1ed0a2 (udf: create common
function for changing free space counter) by accident I reversed safety
condition which lead to null pointer dereference in case of media error and
wrong counting of free space in normal situation

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoudf: fix directory offset handling
Jan Kara [Wed, 13 Feb 2008 23:03:33 +0000 (15:03 -0800)]
udf: fix directory offset handling

Patch cleaning up UDF directory offset handling missed modifications in dir.c
(because I've submitted an old version :(). Fix it.

Signed-off-by: Jan Kara <jack@suse.cz>
Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Tested-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoDocumentation: sysctl/kernel.txt: fix documentation reference
Michael Opdenacker [Wed, 13 Feb 2008 23:03:32 +0000 (15:03 -0800)]
Documentation: sysctl/kernel.txt: fix documentation reference

This patch fixes a reference to Documentation/kmod.txt
which was apparently renamed to Documentation/debugging-modules.txt

Signed-off-by: Michael Opdenacker <michael@free-electrons.com>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofs/smbfs/inode.c: fix warning message deprecating smbfs
Sergio Luis [Wed, 13 Feb 2008 23:03:30 +0000 (15:03 -0800)]
fs/smbfs/inode.c: fix warning message deprecating smbfs

Fix the warning message regarding smbfs to

"smbfs is deprecated and will be removed from the 2.6.27 kernel. Please migrate to cifs"

instead of

"smbfs is deprecated and will be removedfrom the 2.6.27 kernel.  Please migrate to cifs"

Signed-off-by: Sergio Luis <sergio@uece.br>
Screwed-up-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Steven French <sfrench@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodocbook: drop z85230 library from kernel-api
Randy Dunlap [Wed, 13 Feb 2008 23:03:29 +0000 (15:03 -0800)]
docbook: drop z85230 library from kernel-api

Drop z85230 support library info from kernel-api since it's duplicated in
the Z85230 book.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoxfs: convert beX_add to beX_add_cpu (new common API)
Marcin Slusarz [Wed, 13 Feb 2008 23:03:29 +0000 (15:03 -0800)]
xfs: convert beX_add to beX_add_cpu (new common API)

remove beX_add functions and replace all uses with beX_add_cpu

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Reviewed-by: Dave Chinner <dgc@sgi.com>
Cc: Timothy Shimmin <tes@sgi.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomoduleparam: fix alpha, ia64 and ppc64 compile failures
Ivan Kokshaysky [Wed, 13 Feb 2008 23:03:26 +0000 (15:03 -0800)]
moduleparam: fix alpha, ia64 and ppc64 compile failures

On alpha, ia64 and ppc64 only relocations to local data can go into
read-only sections. The vast majority of module parameters use the global
generic param_set_*/param_get_* functions, so the 'const' attribute for
struct kernel_param is not only useless, but it also causes compile
failures due to 'section type conflict' in those rare cases where
param_set/get are local functions.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=8964

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodocbook: make a networking book and fix a few errors
Randy Dunlap [Wed, 13 Feb 2008 23:03:25 +0000 (15:03 -0800)]
docbook: make a networking book and fix a few errors

Move networking (core and drivers) docbook to its own networking book.
Fix a few kernel-doc errors in header and source files.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodocbook: sunrpc filenames and notation fixes
Randy Dunlap [Wed, 13 Feb 2008 23:03:23 +0000 (15:03 -0800)]
docbook: sunrpc filenames and notation fixes

Use updated file list for docbook files and
fix kernel-doc warnings in sunrpc:
Warning(linux-2.6.24-git12//net/sunrpc/rpc_pipe.c:689): No description found for parameter 'rpc_client'
Warning(linux-2.6.24-git12//net/sunrpc/rpc_pipe.c:765): No description found for parameter 'flags'
Warning(linux-2.6.24-git12//net/sunrpc/clnt.c:584): No description found for parameter 'tk_ops'
Warning(linux-2.6.24-git12//net/sunrpc/clnt.c:618): No description found for parameter 'bufsize'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodocbook: move pipe and splice to filesystems docbook
Randy Dunlap [Wed, 13 Feb 2008 23:03:23 +0000 (15:03 -0800)]
docbook: move pipe and splice to filesystems docbook

Move pipes and splice docbook to filesystems book.
kernel-api book is huge (10x most other books) & slow to process.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokernel-doc: fix fs/pipe.c notation
Randy Dunlap [Wed, 13 Feb 2008 23:03:22 +0000 (15:03 -0800)]
kernel-doc: fix fs/pipe.c notation

Fix several kernel-doc notation errors in fs/pipe.c.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoparport: section fixup
David Brownell [Wed, 13 Feb 2008 23:03:21 +0000 (15:03 -0800)]
parport: section fixup

Fix section warning for parport_ECP_supported(); it's called from a routine
exported to modules, so it can't be removed with __devinit section pruning.

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>
16 years agoDocumentation: prune redundant SubmitChecklist items
J. Bruce Fields [Wed, 13 Feb 2008 23:03:20 +0000 (15:03 -0800)]
Documentation: prune redundant SubmitChecklist items

Kernel style is mentioned twice, and the git apply trick is a bit redundant
given the checkpatch.pl recommendation (which also checks for bad
whitespace).

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agohugetlb: fix overcommit locking
Nishanth Aravamudan [Wed, 13 Feb 2008 23:03:19 +0000 (15:03 -0800)]
hugetlb: fix overcommit locking

proc_doulongvec_minmax() calls copy_to_user()/copy_from_user(), so we can't
hold hugetlb_lock over the call.  Use a dummy variable to store the sysctl
result, like in hugetlb_sysctl_handler(), then grab the lock to update
nr_overcommit_huge_pages.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Reported-by: Miles Lane <miles.lane@gmail.com>
Cc: Adam Litke <agl@us.ibm.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoSC26XX: missing PORT define in serial_core.h
Thomas Bogendoerfer [Wed, 13 Feb 2008 23:03:17 +0000 (15:03 -0800)]
SC26XX: missing PORT define in serial_core.h

When submitting the driver for inclusion to 2.6.25 I've missed the change to
serial_core.h. This patch fixes this.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFinal removal of FASTCALL()/fastcall
Harvey Harrison [Wed, 13 Feb 2008 23:03:17 +0000 (15:03 -0800)]
Final removal of FASTCALL()/fastcall

All users are gone, remove definitions and comments referring
to them.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoremove final fastcall users
Harvey Harrison [Wed, 13 Feb 2008 23:03:16 +0000 (15:03 -0800)]
remove final fastcall users

fastcall always expands to empty, remove it.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agorcupdate: fix comment
Paul E. McKenney [Wed, 13 Feb 2008 23:03:15 +0000 (15:03 -0800)]
rcupdate: fix comment

This comment caused some consternation during fastcall removal.  Make it
truthful.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoinclude/linux: Remove all users of FASTCALL() macro
Harvey Harrison [Wed, 13 Feb 2008 23:03:15 +0000 (15:03 -0800)]
include/linux: Remove all users of FASTCALL() macro

FASTCALL() is always expanded to empty, remove it.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoxtime_lock vs update_process_times
Peter Zijlstra [Wed, 13 Feb 2008 20:33:16 +0000 (21:33 +0100)]
xtime_lock vs update_process_times

Commit d3d74453c34f8fd87674a8cf5b8a327c68f22e99 ("hrtimer: fixup the
HRTIMER_CB_IRQSAFE_NO_SOFTIRQ fallback") broke several archs, and since
only Russell bothered to merge the fix, and Greg to ACK his arch, I'm
sending this for merger.

I have confirmation that the Alpha bit results in a booting kernel.
That leaves: blackfin, frv, sh and sparc untested.

The deadlock in question was found by Russell:

  IRQ handle
    -> timer_tick() - xtime seqlock held for write
      -> update_process_times()
        -> run_local_timers()
          -> hrtimer_run_queues()
            -> hrtimer_get_softirq_time() - tries to get a read lock

Now, Thomas assures me the fix is trivial, only do_timer() needs to be
done under the xtime_lock, and update_process_times() can savely be
removed from under it.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Greg Ungerer <gerg@uclinux.org>
CC: Richard Henderson <rth@twiddle.net>
CC: Bryan Wu <bryan.wu@analog.com>
CC: David Howells <dhowells@redhat.com>
CC: Paul Mundt <lethal@linux-sh.org>
CC: William Irwin <wli@holomorphy.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoacpi: fix acpi_os_read_pci_configuration() misuse of raw_pci_read()
Linus Torvalds [Wed, 13 Feb 2008 17:56:14 +0000 (09:56 -0800)]
acpi: fix acpi_os_read_pci_configuration() misuse of raw_pci_read()

The raw_pci_read() interface (as the raw_pci_ops->read() before it)
unconditionally fills in a 32-bit integer return value regardless of the
size of the operation requested.

So claiming to take a "void *" is wrong, as is passing in a pointer to
just a byte variable.

Noticed by pageexec when enabling -fstack-protector (which needs other
patches too to actually work, but that's a separate issue).

Acked-by: Len Brown <len.brown@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFRV: Fix up parse error in linker script
David Howells [Wed, 13 Feb 2008 16:10:08 +0000 (16:10 +0000)]
FRV: Fix up parse error in linker script

Fix up parse error in FRV linker script, presumably introduced through changes
to the INIT_TEXT and EXIT_TEXT macros.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Wed, 13 Feb 2008 16:22:41 +0000 (08:22 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  sched: rt-group: refure unrunnable tasks
  sched: rt-group: clean up the ifdeffery
  sched: rt-group: make rt groups scheduling configurable
  sched: rt-group: interface
  sched: rt-group: deal with PI
  sched: fix incorrect irq lock usage in normalize_rt_tasks()
  sched: fair-group: separate tg->shares from task_group_lock
  hrtimer: more hrtimer_init_sleeper() fallout.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
Linus Torvalds [Wed, 13 Feb 2008 16:20:31 +0000 (08:20 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86

* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: pit_clockevent can be static
  x86: EFI runtime code mapping enhancement
  x86: EFI: fix use of unitialized variable and the cache logic
  x86: CPA: fix gbpages support in try_preserve_large_page
  xen: unpin initial Xen pagetable once we're finished with it
  x86/early_ioremap: don't assume we're using swapper_pg_dir
  x86: fixup machine_ops reboot_{32|64}.c unification fallout
  x86: fix sigcontext.h user export

16 years agodrivers/memstick/host/tifm_ms.c breakage
Al Viro [Wed, 13 Feb 2008 03:56:59 +0000 (03:56 +0000)]
drivers/memstick/host/tifm_ms.c breakage

writel(sock + ...) that should've been writel(sock->addr + ...)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodm-raid1 breakage on 64bit
Al Viro [Wed, 13 Feb 2008 03:53:00 +0000 (03:53 +0000)]
dm-raid1 breakage on 64bit

test_and_set_bit() on address of uint32_t is a Bad Idea(tm)...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoHID: add USB IDs for MacBook 3rd generation
Tobias Mueller [Wed, 13 Feb 2008 16:08:04 +0000 (17:08 +0100)]
HID: add USB IDs for MacBook 3rd generation

Add support for Macbook 3rd generation special mappings.

Signed-off-by: Tobias Mueller <Tobias_Mueller@twam.info>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
16 years agoIB/mthca: Convert to use be16_add_cpu()
Marcin Slusarz [Tue, 12 Feb 2008 23:06:08 +0000 (00:06 +0100)]
IB/mthca: Convert to use be16_add_cpu()

replace:

big_endian_variable = cpu_to_beX(beX_to_cpu(big_endian_variable) +
expression_in_cpu_byteorder);

with:

beX_add_cpu(&big_endian_variable, expression_in_cpu_byteorder);

Generated with a semantic patch.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/cxgb3: Fail loopback connections
Steve Wise [Tue, 12 Feb 2008 22:09:29 +0000 (16:09 -0600)]
RDMA/cxgb3: Fail loopback connections

The cxgb3 HW and driver don't support loopback RDMA connections.  So
fail any connection attempt where the destination address is local.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agowmi: (!x & y) strikes again
Al Viro [Wed, 13 Feb 2008 04:03:25 +0000 (04:03 +0000)]
wmi: (!x & y) strikes again

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[SCSI] gdth: update deprecated pci_find_device
Sergio Luis [Tue, 12 Feb 2008 23:48:03 +0000 (20:48 -0300)]
[SCSI] gdth: update deprecated pci_find_device

Fix compilation warning in gdth.c, which was using the deprecated
pci_find_device.

drivers/scsi/gdth.c:645: warning: 'pci_find_device' is deprecated (declared at include/linux/pci.h:495)

Changing it to use pci_get_device, instead.

Signed-off-by: Sergio Luis <sergio@larces.uece.br>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] gdth: scan for scsi devices
Boaz Harrosh [Tue, 12 Feb 2008 17:35:22 +0000 (19:35 +0200)]
[SCSI] gdth: scan for scsi devices

The patch: "gdth: switch to modern scsi host registration"

missed one simple fact when moving a way from scsi_module.c.
That is to call scsi_scan_host() on the probed host.
With this the gdth driver from 2.6.24 is again able to
see drives and boot.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Tested-by: Joerg Dorchain <joerg@dorchain.net>
Tested-by: Stefan Priebe <s.priebe@allied-internet.ag>
Tested-by: Jon Chelton <jchelton@ffpglobal.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agox86: pit_clockevent can be static
Harvey Harrison [Tue, 12 Feb 2008 20:10:27 +0000 (12:10 -0800)]
x86: pit_clockevent can be static

arch/x86/kernel/i8253.c:98:27: warning: symbol 'pit_clockevent' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: EFI runtime code mapping enhancement
Huang, Ying [Wed, 13 Feb 2008 09:22:41 +0000 (17:22 +0800)]
x86: EFI runtime code mapping enhancement

This patch enhances EFI runtime code memory mapping as following:

- Move __supported_pte_mask & _PAGE_NX checking before invoking
  runtime_code_page_mkexec(). This makes it possible for compiler to
  eliminate runtime_code_page_mkexec() on machine without NX support.

- Use set_memory_x/nx in early_mapping_set_exec(). This eliminates the
  duplicated implementation.

This patch has been tested on Intel x86_64 platform with EFI64/32
firmware.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: EFI: fix use of unitialized variable and the cache logic
Thomas Gleixner [Tue, 12 Feb 2008 18:46:48 +0000 (19:46 +0100)]
x86: EFI: fix use of unitialized variable and the cache logic

Andi Kleen pointed out that the cache attribute logic is reverse in
efi_enter_virtual_mode(). This problem alone is harmless as we do not
(yet) do cache attribute conflict resolution. (This bug was not present
in the original EFI submission - I introduced it while fixing up rejects.)

While reviewing this code I noticed a second, worse problem: the use of
uninitialized md->virt_addr.

Fix both problems.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: CPA: fix gbpages support in try_preserve_large_page
Andi Kleen [Wed, 13 Feb 2008 15:20:35 +0000 (16:20 +0100)]
x86: CPA: fix gbpages support in try_preserve_large_page

[ mingo@elte.hu: while gbpages cannot be enabled on mainline currently,
  keep the code uptodate and this fix is easy enough. ]

Use correct page sizes and masks for GB pages in try_preserve_large_page()

This prevents a boot hang on a GB capable system with CONFIG_DIRECT_GBPAGES
enabled.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: unpin initial Xen pagetable once we're finished with it
Jeremy Fitzhardinge [Wed, 13 Feb 2008 15:20:35 +0000 (16:20 +0100)]
xen: unpin initial Xen pagetable once we're finished with it

Unpin the Xen-provided pagetable once we've finished with it, so it
doesn't cause stray references which cause later swapper_pg_dir
pagetable updates to fail.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Tested-by: Jody Belka <knew-linux@pimb.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/early_ioremap: don't assume we're using swapper_pg_dir
Jeremy Fitzhardinge [Wed, 13 Feb 2008 15:20:35 +0000 (16:20 +0100)]
x86/early_ioremap: don't assume we're using swapper_pg_dir

At the early stages of boot, before the kernel pagetable has been
fully initialized, a Xen kernel will still be running off the
Xen-provided pagetables rather than swapper_pg_dir[].  Therefore,
readback cr3 to determine the base of the pagetable rather than
assuming swapper_pg_dir[].

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Tested-by: Jody Belka <knew-linux@pimb.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fixup machine_ops reboot_{32|64}.c unification fallout
Jody Belka [Tue, 12 Feb 2008 23:37:48 +0000 (23:37 +0000)]
x86: fixup machine_ops reboot_{32|64}.c unification fallout

When reboot_32.c and reboot_64.c were unified (commit 4d022e35fd...),
the machine_ops code was broken, leading to xen pvops kernels failing
to properly halt/poweroff/reboot etc. This fixes that up.

Signed-off-by: Jody Belka <knew-linux@pimb.org>
Cc: Miguel Boton <mboton@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>