]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agogro: Add page frag support
Herbert Xu [Mon, 5 Jan 2009 00:13:40 +0000 (16:13 -0800)]
gro: Add page frag support

This patch allows GRO to merge page frags (skb_shinfo(skb)->frags)
in one skb, rather than using the less efficient frag_list.

It also adds a new interface, napi_gro_frags to allow drivers
to inject page frags directly into the stack without allocating
an skb.  This is intended to be the GRO equivalent for LRO's
lro_receive_frags interface.

The existing GSO interface can already handle page frags with
or without an appended frag_list so nothing needs to be changed
there.

The merging itself is rather simple.  We store any new frag entries
after the last existing entry, without checking whether the first
new entry can be merged with the last existing entry.  Making this
check would actually be easy but since no existing driver can
produce contiguous frags anyway it would just be mental masturbation.

If the total number of entries would exceed the capacity of a
single skb, we simply resort to using frag_list as we do now.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agogro: Use gso_size to store MSS
Herbert Xu [Mon, 5 Jan 2009 00:13:19 +0000 (16:13 -0800)]
gro: Use gso_size to store MSS

In order to allow GRO packets without frag_list at all, we need to
store the MSS in the packet itself.  The obvious place is gso_size.
The only thing to watch out for is if the packet ends up not being
GRO then we need to clear gso_size before pushing the packet into
the stack.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agostarfire: use request_firmware()
Jaswinder Singh Rajput [Mon, 5 Jan 2009 00:12:11 +0000 (16:12 -0800)]
starfire: use request_firmware()

Firmware blob is big endian

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agofirmware: convert tg3 driver to request_firmware()
Jaswinder Singh Rajput [Mon, 5 Jan 2009 00:11:25 +0000 (16:11 -0800)]
firmware: convert tg3 driver to request_firmware()

Firmware blob looks like this...
        u8 firmware_major
        u8 firmware_minor
        u8 firmware_fix
        u8 pad
        __be32 start_address
        __be32 length (total, including BSS sections to be zeroed)
        data... (in __be32 words, which is native for the firmware)

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agofirmware: convert acenic driver to request_firmware()
Jaswinder Singh [Mon, 5 Jan 2009 00:09:40 +0000 (16:09 -0800)]
firmware: convert acenic driver to request_firmware()

We store the firmware in its native big-endian form now, so the loop in
ace_copy() is modified to use be32_to_cpup() when writing it out.

We can forget the BSS,SBSS sections of the firmware, since we were
clearing all the device's RAM anyway. And the text,rodata,data sections
can all be loaded as a single chunk since they're contiguous (give or
take a few dozen bytes in between).

Signed-off-by: Jaswinder Singh <jaswinder@infradead.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoipv6: Fix sporadic sendmsg -EINVAL when sending to multicast groups.
David S. Miller [Mon, 5 Jan 2009 00:04:39 +0000 (16:04 -0800)]
ipv6: Fix sporadic sendmsg -EINVAL when sending to multicast groups.

Thanks to excellent diagnosis by Eduard Guzovsky.

The core problem is that on a network with lots of active
multicast traffic, the neighbour cache can fill up.  If
we try to allocate a new route and thus neighbour cache
entry, the bog-standard GC attempt the neighbour layer does
in ineffective because route entries hold a reference
to the existing neighbour entries and GC can only liberate
entries with no references.

IPV4 already has a way to handle this, by doing a route cache
GC in such situations (when neigh attach returns -ENOBUFS).

So simply mimick this on the ipv6 side.

Tested-by: Eduard Guzovsky <eguzovsky@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agobzip2/lzma: make config machinery an arch configurable
H. Peter Anvin [Sun, 4 Jan 2009 23:41:25 +0000 (15:41 -0800)]
bzip2/lzma: make config machinery an arch configurable

Impact: Bug fix (we should not show this menu on irrelevant architectures)

Make the config machinery to drive the gzip/bzip2/lzma selection
dependent on the architecture advertising HAVE_KERNEL_* so that we
don't display this for architectures where it doesn't matter.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agobzip2/lzma: handle failures from bzip2 and lzma correctly
H. Peter Anvin [Sun, 4 Jan 2009 23:10:40 +0000 (15:10 -0800)]
bzip2/lzma: handle failures from bzip2 and lzma correctly

Impact: Bug fix

If bzip2 or lzma fails (for example, if they aren't installed on the
system), we need to propagate the failure out to "make".  However,
they were masked by being followed by a semicolon.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agobzip2/lzma: x86 kernel compression support
Alain Knaff [Sun, 4 Jan 2009 21:46:17 +0000 (22:46 +0100)]
bzip2/lzma: x86 kernel compression support

Impact: Replaces x86 kernel decompressor with new code

This is the third part of the bzip2/lzma patch

The bzip patch is based on an idea by Christian Ludwig, includes support for
compressing the kernel with bzip2 or lzma rather than gzip. Both
compressors give smaller sizes than gzip.  Lzma's decompresses faster
than bzip2.

It also supports ramdisks and initramfs' compressed using these two
compressors.

The functionality has been successfully used for a couple of years by
the udpcast project

This version applies to "tip" kernel 2.6.28

This part contains:
- support for new bzip2 and lzma kernel compression for x86

Signed-off-by: Alain Knaff <alain@knaff.lu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agobzip2/lzma: use a table to search for initramfs compression formats
H. Peter Anvin [Sun, 4 Jan 2009 22:42:52 +0000 (14:42 -0800)]
bzip2/lzma: use a table to search for initramfs compression formats

Impact: Code simplification

Instead of open-coding testing for initramfs compression formats, use
a table.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agobzip2/lzma: config and initramfs support for bzip2/lzma decompression
Alain Knaff [Sun, 4 Jan 2009 21:46:17 +0000 (22:46 +0100)]
bzip2/lzma: config and initramfs support for bzip2/lzma decompression

Impact: New code for initramfs decompression, new features

This is the second part of the bzip2/lzma patch

The bzip patch is based on an idea by Christian Ludwig, includes support for
compressing the kernel with bzip2 or lzma rather than gzip. Both
compressors give smaller sizes than gzip.  Lzma's decompresses faster
than bzip2.

It also supports ramdisks and initramfs' compressed using these two
compressors.

The functionality has been successfully used for a couple of years by
the udpcast project

This version applies to "tip" kernel 2.6.28

This part contains:
- support for new compressions (bzip2 and lzma) in initramfs and
old-style ramdisk
- config dialog for kernel compression (but new kernel compressions
not yet supported)

Signed-off-by: Alain Knaff <alain@knaff.lu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agobzip2/lzma: library support for gzip, bzip2 and lzma decompression
Alain Knaff [Sun, 4 Jan 2009 21:46:16 +0000 (22:46 +0100)]
bzip2/lzma: library support for gzip, bzip2 and lzma decompression

Impact: Replaces inflate.c with a wrapper around zlib_inflate; new library code

This is the first part of the bzip2/lzma patch

The bzip patch is based on an idea by Christian Ludwig, includes support for
compressing the kernel with bzip2 or lzma rather than gzip. Both
compressors give smaller sizes than gzip.  Lzma's decompresses faster
than bzip2.

It also supports ramdisks and initramfs' compressed using these two
compressors.

The functionality has been successfully used for a couple of years by
the udpcast project

This version applies to "tip" kernel 2.6.28

This part contains:
- changed inflate.c to accomodate rest of patch
- implementation of bzip2 compression (not used at this stage yet)
- implementation of lzma compression (not used at this stage yet)
- Makefile routines to support bzip2 and lzma kernel compression

Signed-off-by: Alain Knaff <alain@knaff.lu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
17 years agoMAINTAINERS: update sparc maintainer
Sam Ravnborg [Sun, 4 Jan 2009 23:47:49 +0000 (15:47 -0800)]
MAINTAINERS: update sparc maintainer

Reflect the current situation where David Miller
is the sparc maintainer.

I have tried to contact Bill on following adresses:

    wli@holomorphy.com
    wlirwin@us.ibm.com

with no success and Bill has not been active on the
sparclinux mailing list for a long time.

As sparc and sparc64 are unified I unified the two entries
in the MAINTAINERS file too.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc: unify ipcbuf.h
Sam Ravnborg [Sun, 4 Jan 2009 23:44:22 +0000 (15:44 -0800)]
sparc: unify ipcbuf.h

The ony difference is the size of the mode.
sparc has extra padding to compensate for this.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agofirewire: reorder struct fw_card for better cache efficiency
Stefan Richter [Sat, 29 Nov 2008 18:00:56 +0000 (19:00 +0100)]
firewire: reorder struct fw_card for better cache efficiency

topology_map is by far the largest member in struct fw_card.  Move it to
the very end of the struct so that card pointer dereferences have better
chances to hit the CPU cache.

This requires to increase the topology_map backing store to the size
specified in IEEE 1394, i.e. 256 rather than 255 quadlets.  Otherwise
the topology_map response handler may access invalid memory.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agofirewire: fix resetting of bus manager retry counter
Stefan Richter [Sat, 29 Nov 2008 17:56:47 +0000 (18:56 +0100)]
firewire: fix resetting of bus manager retry counter

An earlier change, maybe long ago, removed the copying of self_id_count
into card->self_id_count.  Since then each bus reset cleared
card->bm_retries even when it shouldn't.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agofirewire: improve refcounting of fw_card
Jay Fenlason [Sat, 29 Nov 2008 16:44:57 +0000 (17:44 +0100)]
firewire: improve refcounting of fw_card

Take a reference to the card whenever fw_card_bm_work() is scheduled on
that card and release it when the work is done.  This allows us to
remove the cancel_delayed_work_sync() in fw_core_remove_card().

Signed-off-by: Jay Fenlason <fenlason@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (patch update)
17 years agofirewire: typo in comment
Jay Fenlason [Wed, 22 Oct 2008 19:59:42 +0000 (15:59 -0400)]
firewire: typo in comment

Signed-off-by: Jay Fenlason <fenlason@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agofirewire: fix small memory leak at module removal
Stefan Richter [Mon, 24 Nov 2008 19:40:00 +0000 (20:40 +0100)]
firewire: fix small memory leak at module removal

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agofirewire: fw-sbp2: remove unnecessary locking
Stefan Richter [Sun, 26 Oct 2008 10:04:20 +0000 (11:04 +0100)]
firewire: fw-sbp2: remove unnecessary locking

What was I thinking when I added sbp2_set_generation()?  Its locking did
nothing (except for implicitly providing the necessary barrier between
node IDs update and generation update).

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1934: dv1394: interrupt enabling/disabling broken on big-endian
Harvey Harrison [Sat, 13 Dec 2008 23:21:29 +0000 (15:21 -0800)]
ieee1934: dv1394: interrupt enabling/disabling broken on big-endian

After annotating the frame structs, this was left:
drivers/ieee1394/dv1394.c:2113:23: warning: invalid assignment: |=
drivers/ieee1394/dv1394.c:2113:23:    left side has type restricted __le32
drivers/ieee1394/dv1394.c:2113:23:    right side has type int
drivers/ieee1394/dv1394.c:2121:24: warning: invalid assignment: &=
drivers/ieee1394/dv1394.c:2121:24:    left side has type restricted __le32
drivers/ieee1394/dv1394.c:2121:24:    right side has type int
drivers/ieee1394/dv1394.c:2123:24: warning: invalid assignment: |=
drivers/ieee1394/dv1394.c:2123:24:    left side has type restricted __le32
drivers/ieee1394/dv1394.c:2123:24:    right side has type int

Which looks like a real bug on a big-endian arch as it would set/clear
the wrong bit.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Bill Fink writes:

I finally got a chance to test the patch on my kernel, and live DV
viewing using xine still worked fine.  Although I admit to being
mystified how it works both before and after the patch, since the
cpu_to_le32() calls that were added should result in byte swapping on
PPC that wasn't being done before.  I guess that either the code paths
involved aren't actually being triggered by my xine DV viewing, or
there's some fortuitous palindromic setting of bits.

Tested-by: Bill Fink <billfink@mindspring.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: dv1394: annotate frame input/output structs as little endian
Harvey Harrison [Sat, 13 Dec 2008 23:20:39 +0000 (15:20 -0800)]
ieee1394: dv1394: annotate frame input/output structs as little endian

No Functional changes.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: trivial sparse annotations
Harvey Harrison [Sat, 13 Dec 2008 23:03:06 +0000 (15:03 -0800)]
ieee1394: eth1394: trivial sparse annotations

Mostly annotations of ether_type as a be16.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: mark bus_info_data as a __be32 array
Harvey Harrison [Sat, 13 Dec 2008 23:02:34 +0000 (15:02 -0800)]
ieee1394: mark bus_info_data as a __be32 array

Two access functions get_max_rom and set_hw_config_rom are
changed to take __be32 as well.  Only bus_info_data was
ever passed in so this is OK.  All other uses of bus_info_data
treated it as a be32 value already.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: replace CSR_SET_BUS_INFO_GENERATION macro
Harvey Harrison [Sat, 13 Dec 2008 23:02:21 +0000 (15:02 -0800)]
ieee1394: replace CSR_SET_BUS_INFO_GENERATION macro

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: pcilynx: trivial endian annotation
Harvey Harrison [Sat, 13 Dec 2008 23:01:50 +0000 (15:01 -0800)]
ieee1394: pcilynx: trivial endian annotation

bus_info_block was treated as a be32 everywhere, annotate
as such.  Removes plenty of sparse warnings.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: ignore nonzero Bus_Info_Block.max_rom, fetch config ROM in quadlets
Stefan Richter [Sat, 13 Dec 2008 22:12:06 +0000 (23:12 +0100)]
ieee1394: ignore nonzero Bus_Info_Block.max_rom, fetch config ROM in quadlets

It is already known that buggy firmwares exist which report a bogus
link_spd in their config ROM bus info block.  We now got the first
report of a bogus max_rom too (Freecom FireWire Hard Drive 1TB,
http://bugzilla.kernel.org/show_bug.cgi?id=12206).

I suspect other OSs only use quadlet reads to fetch the config ROM,
otherwise the firmware authors would have noticed their mistake.
Hence limit ieee1394's config ROM fetching routine to quadlets as the
safe minimum regardless of what the bus info block says.

This will potentially slow the bus reset handling by nodemgr somewhat
down.  But most existing devices support only quadlet reads anyway,
hence there will often be no actual difference to before this change.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: consolidate uses of IEEE1934_BUSID_MAGIC
Harvey Harrison [Sat, 13 Dec 2008 05:57:50 +0000 (21:57 -0800)]
ieee1394: consolidate uses of IEEE1934_BUSID_MAGIC

Move the definition out of nodemgr.h and use it in csr.c/pcilynx.c

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: ohci1394: flush MMIO writes before delay in initialization
Stefan Richter [Sat, 6 Dec 2008 16:35:59 +0000 (17:35 +0100)]
ieee1394: ohci1394: flush MMIO writes before delay in initialization

and replace busy-wait by msleep.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: ohci1394: pass error codes from request_irq through
Stefan Richter [Sat, 6 Dec 2008 16:35:20 +0000 (17:35 +0100)]
ieee1394: ohci1394: pass error codes from request_irq through

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: ohci1394: don't leave interrupts enabled during suspend/resume
Frans Pop [Sat, 6 Dec 2008 14:36:47 +0000 (15:36 +0100)]
ieee1394: ohci1394: don't leave interrupts enabled during suspend/resume

On my HP 2510p I get the following in dmesg during near the end of most
resumes from suspend to RAM:

irq 19: nobody cared (try booting with the "irqpoll" option)
Pid: 0, comm: swapper Not tainted 2.6.28-rc7 #67
Call Trace:
 <IRQ>  [<ffffffffa00ee9e1>] ? ohci_irq_handler+0x60/0x7e9 [ohci1394]
 [<ffffffff8026aa4d>] __report_bad_irq+0x38/0x87
 [<ffffffff8026abaa>] note_interrupt+0x10e/0x174
 [<ffffffff8026b262>] handle_fasteoi_irq+0xa7/0xd1
 [<ffffffff8020eb87>] do_IRQ+0x73/0xe4
 [<ffffffff8020c626>] ret_from_intr+0x0/0xa
 <EOI>  [<ffffffffa0012606>] ? acpi_idle_enter_bm+0x26b/0x2b2 [processor]
 [<ffffffffa00125fc>] ? acpi_idle_enter_bm+0x261/0x2b2 [processor]
 [<ffffffff8024f30f>] ? notifier_call_chain+0x33/0x5b
 [<ffffffff803b9c64>] ? cpuidle_idle_call+0x8c/0xc4
 [<ffffffff8020b312>] ? cpu_idle+0x4a/0x9a
 [<ffffffff8042c5c8>] ? rest_init+0x5c/0x5e
handlers:
[<ffffffffa00ee981>] (ohci_irq_handler+0x0/0x7e9 [ohci1394])
Disabling IRQ #19

There also seems to be an interrupt storm during suspend/resume when this
happens:
 19:      99968         33   IO-APIC-fasteoi   ohci1394

This patch gets rid of both issues and makes the resume as a whole
significantly faster.

Signed-off-by: Frans Pop <elendil@planet.nl>
As was pointed out in http://lkml.org/lkml/2008/12/6/127, this does not
fix the cause of the interrupt storm.  However, since the source of the
interrupts could not be determined yet, we make the system at least more
usable with this change.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: mark all hpsb_address_ops instances as const
Stefan Richter [Wed, 26 Nov 2008 00:35:21 +0000 (01:35 +0100)]
ieee1394: mark all hpsb_address_ops instances as const

These are never modified.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: replace a GFP_ATOMIC by GFP_KERNEL allocation
Stefan Richter [Wed, 26 Nov 2008 00:34:55 +0000 (01:34 +0100)]
ieee1394: replace a GFP_ATOMIC by GFP_KERNEL allocation

All callers of hpsb_register_addrspace() can sleep.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agomodule: convert to stop_machine_create/destroy.
Heiko Carstens [Mon, 22 Dec 2008 11:36:31 +0000 (12:36 +0100)]
module: convert to stop_machine_create/destroy.

The module code relies on a non-failing stop_machine call. So we create
the kstop threads in advance and with that make sure the call won't fail.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agostop_machine: introduce stop_machine_create/destroy.
Heiko Carstens [Mon, 22 Dec 2008 11:36:30 +0000 (12:36 +0100)]
stop_machine: introduce stop_machine_create/destroy.

Introduce stop_machine_create/destroy. With this interface subsystems
that need a non-failing stop_machine environment can create the
stop_machine machine threads before actually calling stop_machine.
When the threads aren't needed anymore they can be killed with
stop_machine_destroy again.

When stop_machine gets called and the threads aren't present they
will be created and destroyed automatically. This restores the old
behaviour of stop_machine.

This patch also converts cpu hotplug to the new interface since it
is special: cpu_down calls __stop_machine instead of stop_machine.
However the kstop threads will only be created when stop_machine
gets called.

Changing the code so that the threads would be created automatically
on __stop_machine is currently not possible: when __stop_machine gets
called we hold cpu_add_remove_lock, which is the same lock that
create_rt_workqueue would take. So the workqueue needs to be created
before the cpu hotplug code locks cpu_add_remove_lock.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agoparisc: fix module loading failure of large kernel modules
Helge Deller [Thu, 1 Jan 2009 21:25:30 +0000 (22:25 +0100)]
parisc: fix module loading failure of large kernel modules

On 32bit (and sometimes 64bit) and with big kernel modules like xfs or
ipv6 the relocation types R_PARISC_PCREL17F and R_PARISC_PCREL22F may
fail to reach their PLT stub if we only create one big stub array for
all sections at the beginning of the core or init section.

With this patch we now instead add individual PLT stub entries
directly in front of the code sections where the stubs are actually
called. This reduces the distance between the PCREL location and the
stub entry so that the relocations can be fulfilled.

While calculating the final layout of the kernel module in memory, the
kernel module loader calls arch_mod_section_prepend() to request the
to be reserved amount of memory in front of each individual section.

Tested with 32- and 64bit kernels.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agomodule: fix module loading failure of large kernel modules for parisc
Helge Deller [Wed, 31 Dec 2008 11:31:18 +0000 (12:31 +0100)]
module: fix module loading failure of large kernel modules for parisc

When creating the final layout of a kernel module in memory, allow the
module loader to reserve some additional memory in front of a given section.
This is currently only needed for the parisc port which needs to put the
stub entries there to fulfill the 17/22bit PCREL relocations with large
kernel modules like xfs.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (renamed fn)
17 years agomodule: fix warning of unused function when !CONFIG_PROC_FS
Jianjun Kong [Mon, 8 Dec 2008 06:26:29 +0000 (14:26 +0800)]
module: fix warning of unused function when !CONFIG_PROC_FS

Fix this warning:
kernel/module.c:824: warning: â€˜print_unload_info’ defined but not used
print_unload_info() just was used when CONFIG_PROC_FS was defined.
This patch mark print_unload_info() inline to solve the problem.

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
CC: Ingo Molnar <mingo@elte.hu>
CC: Américo Wang <xiyou.wangcong@gmail.com>
17 years agokernel/module.c: compare symbol values when marking symbols as exported in /proc...
Tim Abbott [Mon, 5 Jan 2009 14:40:10 +0000 (08:40 -0600)]
kernel/module.c: compare symbol values when marking symbols as exported in /proc/kallsyms.

When there are two symbols in a module with the same name, one of which is
exported, both will be marked as exported in /proc/kallsyms.  There aren't
any instances of this in the current kernel, but it is easy to construct a
simple module with two compilation units that exhibits the problem.

$ objdump -j .text -t testmod.ko | grep foo
00000000 l     F .text 00000032 foo
00000080 g     F .text 00000001 foo
$ sudo insmod testmod.ko
$ grep "T foo" /proc/kallsyms
c28e8000 T foo [testmod]
c28e8080 T foo [testmod]

Fix this by comparing the symbol values once we've found the exported
symbol table entry matching the symbol name.  Tested using Ksplice:

$ ksplice-create --patch=this_commit.patch --id=bar .
$ sudo ksplice-apply ksplice-bar.tar.gz
Done!
$ grep "T foo" /proc/kallsyms
c28e8080 T foo [testmod]

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agoremove CONFIG_KMOD
Johannes Berg [Tue, 8 Jul 2008 17:00:26 +0000 (19:00 +0200)]
remove CONFIG_KMOD

Now that nothing depends on it any more, remove CONFIG_KMOD.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agoMerge branch 'master' of git://git.infradead.org/users/pcmoore/lblnet-2.6_next into...
James Morris [Sun, 4 Jan 2009 21:56:01 +0000 (08:56 +1100)]
Merge branch 'master' of git://git.infradead.org/users/pcmoore/lblnet-2.6_next into next

17 years agortc: add alarm/update irq interfaces
Alessandro Zummo [Sun, 4 Jan 2009 20:00:54 +0000 (12:00 -0800)]
rtc: add alarm/update irq interfaces

Add standard interfaces for alarm/update irqs enabling.  Drivers are no
more required to implement equivalent ioctl code as rtc-dev will provide
it.

UIE emulation should now be handled correctly and will work even for those
RTC drivers who cannot be configured to do both UIE and AIE.

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofs: symlink write_begin allocation context fix
Nick Piggin [Sun, 4 Jan 2009 20:00:53 +0000 (12:00 -0800)]
fs: symlink write_begin allocation context fix

With the write_begin/write_end aops, page_symlink was broken because it
could no longer pass a GFP_NOFS type mask into the point where the
allocations happened.  They are done in write_begin, which would always
assume that the filesystem can be entered from reclaim.  This bug could
cause filesystem deadlocks.

The funny thing with having a gfp_t mask there is that it doesn't really
allow the caller to arbitrarily tinker with the context in which it can be
called.  It couldn't ever be GFP_ATOMIC, for example, because it needs to
take the page lock.  The only thing any callers care about is __GFP_FS
anyway, so turn that into a single flag.

Add a new flag for write_begin, AOP_FLAG_NOFS.  Filesystems can now act on
this flag in their write_begin function.  Change __grab_cache_page to
accept a nofs argument as well, to honour that flag (while we're there,
change the name to grab_cache_page_write_begin which is more instructive
and does away with random leading underscores).

This is really a more flexible way to go in the end anyway -- if a
filesystem happens to want any extra allocations aside from the pagecache
ones in ints write_begin function, it may now use GFP_KERNEL (rather than
GFP_NOFS) for common case allocations (eg.  ocfs2_alloc_write_ctxt, for a
random example).

[kosaki.motohiro@jp.fujitsu.com: fix ubifs]
[kosaki.motohiro@jp.fujitsu.com: fix fuse]
Signed-off-by: Nick Piggin <npiggin@suse.de>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: <stable@kernel.org> [2.6.28.x]
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[ Cleaned up the calling convention: just pass in the AOP flags
  untouched to the grab_cache_page_write_begin() function.  That
  just simplifies everybody, and may even allow future expansion of the
  logic.   - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoviafb: fix crashes due to 4k stack overflow
Bruno Prémont [Sun, 4 Jan 2009 21:11:54 +0000 (13:11 -0800)]
viafb: fix crashes due to 4k stack overflow

The function viafb_cursor() uses 2 stack-variables of CURSOR_SIZE bits;
CURSOR_SIZE is defined as (8 * 1024).  Using up twice 1k on stack is too
much for 4k-stack (though it works with 8k-stacks).  Make those two
variables kzalloc'ed to preserve stack space.

Also merge the whole lot of local struct's in viafb_ioctl into a union so
the stack usage gets minimized here as well.  (struct's are only accessed
in their indicidual IOCTL case) This second part is only compile-tested as
I know of no userspace app using the IOCTLs.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Cc: <JosephChan@via.com.tw>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofs: introduce bgl_lock_ptr()
Pekka Enberg [Sun, 4 Jan 2009 20:00:48 +0000 (12:00 -0800)]
fs: introduce bgl_lock_ptr()

As suggested by Andreas Dilger, introduce a bgl_lock_ptr() helper in
<linux/blockgroup_lock.h> and add separate sb_bgl_lock() helpers to
filesystem specific header files to break the hidden dependency to
struct ext[234]_sb_info.

Also, while at it, convert the macros to static inlines to try make up
for all the times I broke Andrew Morton's tree.

Acked-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agospi.h uses/needs device.h
Randy Dunlap [Sun, 4 Jan 2009 20:00:47 +0000 (12:00 -0800)]
spi.h uses/needs device.h

Include header files as used/needed:

  In file included from drivers/leds/leds-dac124s085.c:16:
  include/linux/spi/spi.h:66: error: field 'dev' has incomplete type
  include/linux/spi/spi.h: In function 'to_spi_device':
  include/linux/spi/spi.h:100: warning: type defaults to 'int' in declaration of '__mptr'
  ...

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agovmalloc.c: fix flushing in vmap_page_range()
Adam Lackorzynski [Sun, 4 Jan 2009 20:00:46 +0000 (12:00 -0800)]
vmalloc.c: fix flushing in vmap_page_range()

The flush_cache_vmap in vmap_page_range() is called with the end of the
range twice.  The following patch fixes this for me.

Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agocgroups: fix a race between cgroup_clone and umount
Li Zefan [Sun, 4 Jan 2009 20:00:45 +0000 (12:00 -0800)]
cgroups: fix a race between cgroup_clone and umount

The race is calling cgroup_clone() while umounting the ns cgroup subsys,
and thus cgroup_clone() might access invalid cgroup_fs, or kill_sb() is
called after cgroup_clone() created a new dir in it.

The BUG I triggered is BUG_ON(root->number_of_cgroups != 1);

  ------------[ cut here ]------------
  kernel BUG at kernel/cgroup.c:1093!
  invalid opcode: 0000 [#1] SMP
  ...
  Process umount (pid: 5177, ti=e411e000 task=e40c4670 task.ti=e411e000)
  ...
  Call Trace:
   [<c0493df7>] ? deactivate_super+0x3f/0x51
   [<c04a3600>] ? mntput_no_expire+0xb3/0xdd
   [<c04a3ab2>] ? sys_umount+0x265/0x2ac
   [<c04a3b06>] ? sys_oldumount+0xd/0xf
   [<c0403911>] ? sysenter_do_call+0x12/0x31
  ...
  EIP: [<c0456e76>] cgroup_kill_sb+0x23/0xe0 SS:ESP 0068:e411ef2c
  ---[ end trace c766c1be3bf944ac ]---

Cc: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoaudit: validate comparison operations, store them in sane form
Al Viro [Tue, 16 Dec 2008 10:59:26 +0000 (05:59 -0500)]
audit: validate comparison operations, store them in sane form

Don't store the field->op in the messy (and very inconvenient for e.g.
audit_comparator()) form; translate to dense set of values and do full
validation of userland-submitted value while we are at it.

->audit_init_rule() and ->audit_match_rule() get new values now; in-tree
instances updated.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agoclean up audit_rule_{add,del} a bit
Al Viro [Mon, 15 Dec 2008 06:50:28 +0000 (01:50 -0500)]
clean up audit_rule_{add,del} a bit

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agomake sure that filterkey of task,always rules is reported
Al Viro [Tue, 16 Dec 2008 08:51:22 +0000 (03:51 -0500)]
make sure that filterkey of task,always rules is reported

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agoaudit rules ordering, part 2
Al Viro [Mon, 15 Dec 2008 06:17:50 +0000 (01:17 -0500)]
audit rules ordering, part 2

Fix the actual rule listing; add per-type lists _not_ used for matching,
with all exit,... sitting on one such list.  Simplifies "do something
for all rules" logics, while we are at it...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agofixing audit rule ordering mess, part 1
Al Viro [Mon, 15 Dec 2008 04:45:27 +0000 (23:45 -0500)]
fixing audit rule ordering mess, part 1

Problem: ordering between the rules on exit chain is currently lost;
all watch and inode rules are listed after everything else _and_
exit,never on one kind doesn't stop exit,always on another from
being matched.

Solution: assign priorities to rules, keep track of the current
highest-priority matching rule and its result (always/never).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agoaudit_update_lsm_rules() misses the audit_inode_hash[] ones
Al Viro [Sun, 14 Dec 2008 17:04:02 +0000 (12:04 -0500)]
audit_update_lsm_rules() misses the audit_inode_hash[] ones

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agosanitize audit_log_capset()
Al Viro [Sun, 4 Jan 2009 19:52:57 +0000 (14:52 -0500)]
sanitize audit_log_capset()

* no allocations
* return void
* don't duplicate checked for dummy context

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agosanitize audit_fd_pair()
Al Viro [Sun, 14 Dec 2008 09:57:47 +0000 (04:57 -0500)]
sanitize audit_fd_pair()

* no allocations
* return void

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agosanitize audit_mq_open()
Al Viro [Sun, 14 Dec 2008 09:02:26 +0000 (04:02 -0500)]
sanitize audit_mq_open()

* don't bother with allocations
* don't do double copy_from_user()
* don't duplicate parts of check for audit_dummy_context()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agosanitize AUDIT_MQ_SENDRECV
Al Viro [Sun, 14 Dec 2008 08:46:48 +0000 (03:46 -0500)]
sanitize AUDIT_MQ_SENDRECV

* logging the original value of *msg_prio in mq_timedreceive(2)
  is insane - the argument is write-only (i.e. syscall always
  ignores the original value and only overwrites it).
* merge __audit_mq_timed{send,receive}
* don't do copy_from_user() twice
* don't mess with allocations in auditsc part
* ... and don't bother checking !audit_enabled and !context in there -
  we'd already checked for audit_dummy_context().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agosanitize audit_mq_notify()
Al Viro [Wed, 10 Dec 2008 12:16:12 +0000 (07:16 -0500)]
sanitize audit_mq_notify()

* don't copy_from_user() twice
* don't bother with allocations
* don't duplicate parts of audit_dummy_context()
* make it return void

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agosanitize audit_mq_getsetattr()
Al Viro [Wed, 10 Dec 2008 11:58:59 +0000 (06:58 -0500)]
sanitize audit_mq_getsetattr()

* get rid of allocations
* make it return void
* don't duplicate parts of audit_dummy_context()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agosanitize audit_ipc_set_perm()
Al Viro [Wed, 10 Dec 2008 08:47:15 +0000 (03:47 -0500)]
sanitize audit_ipc_set_perm()

* get rid of allocations
* make it return void
* simplify callers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agosanitize audit_ipc_obj()
Al Viro [Wed, 10 Dec 2008 08:40:06 +0000 (03:40 -0500)]
sanitize audit_ipc_obj()

* get rid of allocations
* make it return void
* simplify callers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agosanitize audit_socketcall
Al Viro [Wed, 10 Dec 2008 08:16:51 +0000 (03:16 -0500)]
sanitize audit_socketcall

* don't bother with allocations
* now that it can't fail, make it return void

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agodon't reallocate buffer in every audit_sockaddr()
Al Viro [Wed, 10 Dec 2008 00:50:34 +0000 (19:50 -0500)]
don't reallocate buffer in every audit_sockaddr()

No need to do that more than once per process lifetime; allocating/freeing
on each sendto/accept/etc. is bloody pointless.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agox86: irqinit_64.c init_ISA_irqs should be static
Jaswinder Singh Rajput [Tue, 30 Dec 2008 15:40:13 +0000 (21:10 +0530)]
x86: irqinit_64.c init_ISA_irqs should be static

Signed-off-by: Jaswinder Singh <jaswinder@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoDocumentation/x86/boot.txt: payload length was changed to payload_length
Baodong Chen [Sat, 3 Jan 2009 04:37:06 +0000 (12:37 +0800)]
Documentation/x86/boot.txt: payload length was changed to payload_length

Signed-off-by: Baodong Chen <[email]chenbdchenbd@gmail.com[email]>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: setup_percpu.c fix style problems
Jaswinder Singh Rajput [Sun, 4 Jan 2009 11:34:26 +0000 (17:04 +0530)]
x86: setup_percpu.c fix style problems

Impact: cleanup

Fix:

 WARNING: Use #include <linux/smp.h> instead of <asm/smp.h>
 WARNING: Use #include <linux/percpu.h> instead of <asm/percpu.h>
 WARNING: Use #include <linux/topology.h> instead of <asm/topology.h>
 WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
 ERROR: spaces required around that '?' (ctx:VxW)
 ERROR: spaces required around that ':' (ctx:VxV)

 total: 2 errors, 4 warnings

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: irqinit_64.c fix style problems
Jaswinder Singh Rajput [Sun, 4 Jan 2009 11:06:25 +0000 (16:36 +0530)]
x86: irqinit_64.c fix style problems

Impact: cleanup, fix style problems

Fix:

 WARNING: Use #include <linux/acpi.h> instead of <asm/acpi.h>
 WARNING: Use #include <linux/io.h> instead of <asm/io.h>
 WARNING: Use #include <linux/delay.h> instead of <asm/delay.h>

 total: 0 errors, 3 warnings

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: irqinit_32.c fix style problems
Jaswinder Singh Rajput [Sun, 4 Jan 2009 11:05:17 +0000 (16:35 +0530)]
x86: irqinit_32.c fix style problems

Impact: cleanup

Fix:

 WARNING: Use #include <linux/io.h> instead of <asm/io.h>
 WARNING: Use #include <linux/delay.h> instead of <asm/delay.h>
 ERROR: trailing whitespace
 WARNING: externs should be avoided in .c files
 ERROR: space required after that ',' (ctx:VxV)
 WARNING: space prohibited between function name and open parenthesis '('

 total: 2 errors, 4 warnings

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: i8259.c fix style problems
Jaswinder Singh Rajput [Sun, 4 Jan 2009 11:03:52 +0000 (16:33 +0530)]
x86: i8259.c fix style problems

Impact: cleanup

Fix:

 WARNING: Use #include <linux/acpi.h> instead of <asm/acpi.h>
 WARNING: Use #include <linux/io.h> instead of <asm/io.h>
 WARNING: Use #include <linux/delay.h> instead of <asm/delay.h>
 ERROR: code indent should use tabs where possible

 total: 1 errors, 3 warnings

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: irq_32.c fix style problems
Jaswinder Singh Rajput [Sun, 4 Jan 2009 11:02:36 +0000 (16:32 +0530)]
x86: irq_32.c fix style problems

Impact: cleanup

Fix:

 WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
 ERROR: "(foo*)" should be "(foo *)"
 ERROR: space required after that ',' (ctx:VxV)

total: 5 errors, 1 warnings

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cleanup remaining cpumask_t ops in smpboot code
Mike Travis [Sun, 4 Jan 2009 13:18:03 +0000 (05:18 -0800)]
x86: cleanup remaining cpumask_t ops in smpboot code

Impact: use new cpumask API to reduce memory and stack usage

Allocate the following local cpumasks based on the number of cpus that
are present.  References will use new cpumask API.  (Currently only
modified for x86_64, x86_32 continues to use the *_map variants.)

    cpu_callin_mask
    cpu_callout_mask
    cpu_initialized_mask
    cpu_sibling_setup_mask

Provide the following accessor functions:

    struct cpumask *cpu_sibling_mask(int cpu)
    struct cpumask *cpu_core_mask(int cpu)

Other changes are when setting or clearing the cpu online, possible
or present maps, use the accessor functions.

Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agocpumask: update pci_bus_show_cpuaffinity to use new cpumask API
Mike Travis [Sun, 4 Jan 2009 13:18:02 +0000 (05:18 -0800)]
cpumask: update pci_bus_show_cpuaffinity to use new cpumask API

Impact: use new cpumask API to reduce stack usage

Replace the local cpumask_t variable with a pointer to the
const cpumask that needs to be printed.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agocpumask: update local_cpus_show to use new cpumask API
Mike Travis [Sun, 4 Jan 2009 13:18:01 +0000 (05:18 -0800)]
cpumask: update local_cpus_show to use new cpumask API

Impact: use new cpumask API to reduce stack usage

Replace the local cpumask_t variable with a pointer to the
const cpumask that needs to be printed.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoia64: cpumask fix for is_affinity_mask_valid()
Mike Travis [Sun, 4 Jan 2009 13:18:00 +0000 (05:18 -0800)]
ia64: cpumask fix for is_affinity_mask_valid()

Impact: cleanup

The function prototype should use 'struct cpumask *' to declare
cpumask arguments (instead of cpumask_var_t).

Note: arch/ia64/kernel/irq.c still had the following "old cpumask_t" usages:

105: cpumask_t mask = CPU_MASK_NONE;
107: cpu_set(cpu_logical_id(hwid), mask);
110:                 irq_desc[irq].affinity = mask;

... replaced with a simple "cpumask_of(cpu_logical_id(hwid))".

161: new_cpu = any_online_cpu(cpu_online_map);
194: time_keeper_id = first_cpu(cpu_online_map);

... replaced with cpu_online_mask refs.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agomfd: Fix section mismatch in da903x
Mark Brown [Sun, 4 Jan 2009 14:31:49 +0000 (15:31 +0100)]
mfd: Fix section mismatch in da903x

The subdevice removal functions are marked __devexit but are referenced
from the error handling path when probing so are needed even when
__devexit functions are removed.

Signed-off-by: Mark Brown <broonie@sirena.org.uk>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
17 years agogetrusage: RUSAGE_THREAD should return ru_utime and ru_stime
KOSAKI Motohiro [Sat, 3 Jan 2009 20:40:37 +0000 (05:40 +0900)]
getrusage: RUSAGE_THREAD should return ru_utime and ru_stime

Impact: task stats regression fix

Original getrusage(RUSAGE_THREAD) implementation can return ru_utime and
ru_stime. But commit "f06febc: timers: fix itimer/many thread hang" broke it.

this patch restores it.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: ioport.c fix style problems
Jaswinder Singh Rajput [Sun, 4 Jan 2009 10:59:32 +0000 (16:29 +0530)]
x86: ioport.c fix style problems

Impact: cleanup

Fix:

 ERROR: "foo * bar" should be "foo *bar"

total: 2 errors, 0 warnings

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: time_64.c fix style problems
Jaswinder Singh Rajput [Sun, 4 Jan 2009 10:58:22 +0000 (16:28 +0530)]
x86: time_64.c fix style problems

Impact: cleanup

Fix:

 WARNING: Use #include <linux/nmi.h> instead of <asm/nmi.h>

total: 0 errors, 1 warnings

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: time_32.c fix style problems
Jaswinder Singh Rajput [Sun, 4 Jan 2009 10:56:52 +0000 (16:26 +0530)]
x86: time_32.c fix style problems

Impact: cleanup

Fix:

 ERROR: space prohibited after that open parenthesis '('
 ERROR: space prohibited before that close parenthesis ')'

total: 4 errors, 0 warnings

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: irq_64.c fix style problems
Jaswinder Singh Rajput [Sun, 4 Jan 2009 10:55:19 +0000 (16:25 +0530)]
x86: irq_64.c fix style problems

Impact: cleanup, fix style problems, more readable

Fix:

 WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
 WARNING: Use #include <linux/smp.h> instead of <asm/smp.h>
 ERROR: code indent should use tabs where possible

 total: 9 errors, 2 warnings

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: irq.c fix style problems
Jaswinder Singh Rajput [Sun, 4 Jan 2009 10:52:17 +0000 (16:22 +0530)]
x86: irq.c fix style problems

Impact: cleanup

Fix:

 WARNING: Use #include <linux/smp.h> instead of <asm/smp.h>

 total: 0 errors, 1 warnings

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: traps.c fix style problems
Jaswinder Singh Rajput [Sun, 4 Jan 2009 10:50:40 +0000 (16:20 +0530)]
x86: traps.c fix style problems

Impact: cleanup

Fix:

 WARNING: Use #include <linux/nmi.h> instead of <asm/nmi.h>
 WARNING: Use #include <linux/smp.h> instead of <asm/smp.h>
 WARNING: Use #include <linux/io.h> instead of <asm/io.h>

 total: 0 errors, 3 warnings

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: process_32.c fix style problems
Jaswinder Singh Rajput [Sun, 4 Jan 2009 10:48:56 +0000 (16:18 +0530)]
x86: process_32.c fix style problems

Impact: cleanup

Fix:

 WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
 WARNING: Use #include <linux/io.h> instead of <asm/io.h>
 WARNING: Use #include <linux/kdebug.h> instead of <asm/kdebug.h>
 WARNING: Use #include <linux/smp.h> instead of <asm/smp.h>
 ERROR: "foo * bar" should be "foo *bar"
 ERROR: trailing whitespace
 ERROR: spaces required around that ':' (ctx:WxO)
 ERROR: spaces required around that ':' (ctx:OxW)

 total: 7 errors, 4 warnings

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: apic.c fix style problems
Jaswinder Singh Rajput [Sun, 4 Jan 2009 10:46:25 +0000 (16:16 +0530)]
x86: apic.c fix style problems

Impact: cleanup

Fix:

 WARNING: Use #include <linux/smp.h> instead of <asm/smp.h>
 WARNING: Use #include <linux/nmi.h> instead of <asm/nmi.h>
 WARNING: Use #include <linux/timex.h> instead of <asm/timex.h>
 WARNING: line over 80 characters
 ERROR: else should follow close brace '}'

 total: 2 errors, 4 warnings

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: rename mpc_config_oemtable to mpc_oemtable
Jaswinder Singh Rajput [Sat, 3 Jan 2009 10:22:54 +0000 (15:52 +0530)]
x86: rename mpc_config_oemtable to mpc_oemtable

Impact: cleanup, solve 80 columns wrap problems

mpc_config_oemtable should be renamed to mpc_oemtable.

The reason: the 'c' in MPC already means 'config' -
no need to repeat that in the type name.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: rename mpc_config_lintsrc to mpc_lintsrc
Jaswinder Singh Rajput [Sat, 3 Jan 2009 10:21:54 +0000 (15:51 +0530)]
x86: rename mpc_config_lintsrc to mpc_lintsrc

Impact: cleanup, solve 80 columns wrap problems

mpc_config_lintsrc should be renamed to mpc_lintsrc.

The reason: the 'c' in MPC already means 'config' -
no need to repeat that in the type name.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: rename mpc_config_intsrc to mpc_intsrc
Jaswinder Singh Rajput [Sat, 3 Jan 2009 10:20:52 +0000 (15:50 +0530)]
x86: rename mpc_config_intsrc to mpc_intsrc

Impact: cleanup, solve 80 columns wrap problems

mpc_config_intsrc should be renamed to mpc_intsrc.

The reason: the 'c' in MPC already means 'config' -
no need to repeat that in the type name.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: rename mpc_config_ioapic to mpc_ioapic
Jaswinder Singh Rajput [Sat, 3 Jan 2009 10:19:57 +0000 (15:49 +0530)]
x86: rename mpc_config_ioapic to mpc_ioapic

Impact: cleanup, solve 80 columns wrap problems

mpc_config_ioapic should be renamed to mpc_ioapic.

The reason: the 'c' in MPC already means 'config' -
no need to repeat that in the type name.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: rename mpc_config_processor to mpc_cpu
Jaswinder Singh Rajput [Sat, 3 Jan 2009 10:18:52 +0000 (15:48 +0530)]
x86: rename mpc_config_processor to mpc_cpu

Impact: cleanup, solve 80 columns wrap problems

mpc_config_processor should be renamed to mpc_cpu.

The reason: the 'c' in MPC already means 'config' -
no need to repeat that in the type name.

Plus 'processor' is a lot longer than 'cpu' - so we try to use 'cpu' in all
type names, as much as possible.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: rename mpc_config_bus to mpc_bus
Jaswinder Singh Rajput [Sat, 3 Jan 2009 10:17:32 +0000 (15:47 +0530)]
x86: rename mpc_config_bus to mpc_bus

Impact: cleanup, solve 80 columns wrap problems

mpc_config_bus should be renamed to mpc_bus.
The reason: the 'c' in MPC already means 'config' -
no need to repeat that in the type name.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: rename mp_config_table to mpc_table
Jaswinder Singh Rajput [Sat, 3 Jan 2009 10:16:57 +0000 (15:46 +0530)]
x86: rename mp_config_table to mpc_table

Impact: cleanup, solve 80 columns wrap problems

mp_config_table should be renamed to mpc_table.
The reason: the 'c' in MPC already means 'config' -
no need to repeat that in the type name.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoswiotlb: Don't include linux/swiotlb.h twice in lib/swiotlb.c
Jesper Juhl [Fri, 2 Jan 2009 23:16:03 +0000 (00:16 +0100)]
swiotlb: Don't include linux/swiotlb.h twice in lib/swiotlb.c

There's no point in including the linux/swiotlb.h header twice in
lib/swiotlb.c - this patch gets rid of the unneeded include.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agomfd: move drivers/i2c/chips/menelaus.c to drivers/mfd
David Brownell [Mon, 22 Dec 2008 11:18:02 +0000 (12:18 +0100)]
mfd: move drivers/i2c/chips/menelaus.c to drivers/mfd

ove the menelaus driver from drivers/i2c/chips to drivers/mfd
since it's more of a multi-function device than anything else,
and since Jean is trying to vanish drivers/i2c/chips ASAP.

One way to think of these chips are as the PMIC family most
used with OMAP2 generation chips.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
17 years agomfd: move drivers/i2c/chips/tps65010.c to drivers/mfd
David Brownell [Mon, 22 Dec 2008 11:16:27 +0000 (12:16 +0100)]
mfd: move drivers/i2c/chips/tps65010.c to drivers/mfd

Move the tps65010 driver from drivers/i2c/chips to drivers/mfd
since it's more of a multi-function device than anything else,
and since Jean is trying to vanish drivers/i2c/chips ASAP.

One way to think of these chips are as the PMIC family most
used with OMAP1 generation chips.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
17 years agomfd: dm355evm msp430 driver
David Brownell [Mon, 22 Dec 2008 11:05:27 +0000 (12:05 +0100)]
mfd: dm355evm msp430 driver

Basic MFD framework for the MSP430 microcontroller firmware used
on the dm355evm board:

 - Provides an interface for other drivers: register read/write
   utilities, and register declarations.

 - Directly exports:
     * Many signals through the GPIO framework
         + LEDs
         + SW6 through gpio sysfs
 + NTSC/nPAL jumper through gpio sysfs
 + ... more could be added later, e.g. MMC signals
     * Child devices:
+ LEDs, via leds-gpio child (and default triggers)
+ RTC, via rtc-dm355evm child device
+ Buttons and IR control, via dm355evm_keys

 - Supports power-off system call.  Use the reset button to power
   the board back up; the power supply LED will be on, but the
   MSP430 waits to re-activate the regulators.

 - On probe() this:
     * Announces firmware revision
     * Turns off the banked LEDs
     * Exports the resources noted above
     * Hooks the power-off support
     * Muxes tvp5146 -or- imager for video input

Unless the new tvp514x driver (tracked for mainline) is configured,
this assumes that some custom imager driver handles video-in.

This completely ignores the registers reporting the output voltages
on the various power supplies.  Someone could add a hwmon interface
if that seems useful.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
17 years agomfd: Add missing break from wm3850-core
Mark Brown [Thu, 18 Dec 2008 22:20:14 +0000 (23:20 +0100)]
mfd: Add missing break from wm3850-core

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
17 years agomfd: Add WM8351 support
Mark Brown [Thu, 18 Dec 2008 22:12:28 +0000 (23:12 +0100)]
mfd: Add WM8351 support

The WM8351 is a WM8350 variant. As well as register default changes the
WM8351 has fewer voltage and current regulators than the WM8350.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
17 years agomfd: Support configurable numbers of DCDCs and ISINKs on WM8350
Mark Brown [Thu, 18 Dec 2008 22:12:16 +0000 (23:12 +0100)]
mfd: Support configurable numbers of DCDCs and ISINKs on WM8350

Some WM8350 variants have fewer DCDCs and ISINKs. Identify these at
probe and refuse to use the absent DCDCs when running on these chips.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
17 years agomfd: Handle missing WM8350 platform data
Mark Brown [Thu, 18 Dec 2008 22:12:08 +0000 (23:12 +0100)]
mfd: Handle missing WM8350 platform data

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>