linux-2.6
16 years ago[DCCP]: Use DEFINE_PROTO_INUSE infrastructure.
David S. Miller [Tue, 6 Nov 2007 07:42:25 +0000 (23:42 -0800)] 
[DCCP]: Use DEFINE_PROTO_INUSE infrastructure.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Use the {DEFINE|REF}_PROTO_INUSE infrastructure
Eric Dumazet [Tue, 6 Nov 2007 07:40:28 +0000 (23:40 -0800)] 
[SCTP]: Use the {DEFINE|REF}_PROTO_INUSE infrastructure

Trivial patch to make "sctcp,sctpv6" protocols uses the fast "inuse
sockets" infrastructure

Each protocol use then a static percpu var, instead of a dynamic one.
This saves some ram and some cpu cycles

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Use the {DEFINE|REF}_PROTO_INUSE infrastructure
Eric Dumazet [Tue, 6 Nov 2007 07:39:51 +0000 (23:39 -0800)] 
[IPV6]: Use the {DEFINE|REF}_PROTO_INUSE infrastructure

Trivial patch to make "tcpv6,udpv6,udplitev6,rawv6" protocols uses the
fast "inuse sockets" infrastructure

Each protocol use then a static percpu var, instead of a dynamic one.
This saves some ram and some cpu cycles

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Use the {DEFINE|REF}_PROTO_INUSE infrastructure
Eric Dumazet [Tue, 6 Nov 2007 07:39:16 +0000 (23:39 -0800)] 
[IPV4]: Use the {DEFINE|REF}_PROTO_INUSE infrastructure

Trivial patch to make "tcp,udp,udplite,raw" protocols uses the fast
"inuse sockets" infrastructure

Each protocol use then a static percpu var, instead of a dynamic one.
This saves some ram and some cpu cycles

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Define infrastructure to keep 'inuse' changes in an efficent SMP/NUMA way.
Eric Dumazet [Tue, 6 Nov 2007 07:38:39 +0000 (23:38 -0800)] 
[NET]: Define infrastructure to keep 'inuse' changes in an efficent SMP/NUMA way.

"struct proto" currently uses an array stats[NR_CPUS] to track change on
'inuse' sockets per protocol.

If NR_CPUS is big, this means we use a big memory area for this.
Moreover, all this memory area is located on a single node on NUMA
machines, increasing memory pressure on the boot node.

In this patch, I tried to :

- Keep a fast !CONFIG_SMP implementation
- Keep a fast CONFIG_SMP implementation for often used protocols
(tcp,udp,raw,...)
- Introduce a NUMA efficient implementation

Some helper macros are defined in include/net/sock.h
These macros take into account CONFIG_SMP

If a "struct proto" is declared without using DEFINE_PROTO_INUSE /
REF_PROTO_INUSE
macros, it will automatically use a default implementation, using a
dynamically allocated percpu zone.
This default implementation will be NUMA efficient, but might use 32/64
bytes per possible cpu
because of current alloc_percpu() implementation.
However it still should be better than previous implementation based on
stats[NR_CPUS] field.

When a "struct proto" is changed to use the new macros, we use a single
static "int" percpu variable,
lowering the memory and cpu costs, still preserving NUMA efficiency.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PPP]: L2TP: Fix oops in transmit and receive paths
James Chapman [Tue, 6 Nov 2007 07:32:37 +0000 (23:32 -0800)] 
[PPP]: L2TP: Fix oops in transmit and receive paths

Changes made on 18-sep to fix skb handling in the pppol2tp driver
broke the transmit and receive paths. Users are only running into this
now because distros are now using 2.6.23 and I must have messed up
when I tested the change.

For receive, we now do our own calculation of how much to pull from
the skb (variable length L2TP header) rather than using
skb_transport_offset(). Also, if the skb isn't a data packet, it must
be passed back to UDP with skb->data pointing to the UDP header.

For transmit, make sure skb->sk is set up because ip_queue_xmit()
needs it.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Clean the ip_sockglue.c from some ugly ifdefs
Pavel Emelyanov [Tue, 6 Nov 2007 05:32:31 +0000 (21:32 -0800)] 
[IPV4]: Clean the ip_sockglue.c from some ugly ifdefs

The #idfed CONFIG_IP_MROUTE is sometimes places inside the if-s,
which looks completely bad. Similar ifdefs inside the functions
looks a bit better, but they are also not recommended to be used.

Provide an ifdef-ed ip_mroute_opt() helper to cleanup the code.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[DECNET]: "addr" module param can't be __initdata
Alexey Dobriyan [Tue, 6 Nov 2007 05:30:11 +0000 (21:30 -0800)] 
[DECNET]: "addr" module param can't be __initdata

sysfs keeps references to module parameters via /sys/module/*/parameters,
so marking them as __initdata can't work.

Steps to reproduce:

modprobe decnet
cat /sys/module/decnet/parameters/addr

BUG: unable to handle kernel paging request at virtual address f88cd410
printing eip: c043dfd1 *pdpt = 0000000000004001 *pde = 0000000004408067 *pte = 0000000000000000
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: decnet sunrpc af_packet ipv6 binfmt_misc dm_mirror dm_multipath dm_mod sbs sbshc fan dock battery backlight ac power_supply parport loop rtc_cmos serio_raw rtc_core rtc_lib button amd_rng sr_mod cdrom shpchp pci_hotplug ehci_hcd ohci_hcd uhci_hcd usbcore
Pid: 2099, comm: cat Not tainted (2.6.24-rc1-b1d08ac064268d0ae2281e98bf5e82627e0f0c56-bloat #6)
EIP: 0060:[<c043dfd1>] EFLAGS: 00210286 CPU: 1
EIP is at param_get_int+0x6/0x20
EAX: c5c87000 EBX: 00000000 ECX: 000080d0 EDX: f88cd410
ESI: f8a108f8 EDI: c5c87000 EBP: 00000000 ESP: c5c97f00
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process cat (pid: 2099, ti=c5c97000 task=c641ee10 task.ti=c5c97000)
Stack: 00000000 f8a108f8 c5c87000 c043db6b f8a108f1 00000124 c043de1a c043db2f
       f88cd410 ffffffff c5c87000 f8a16bc8 f8a16bc8 c043dd69 c043dd54 c5dd5078
       c043dbc8 c5cc7580 c06ee64c c5d679f8 c04c431f c641f480 c641f484 00001000
Call Trace:
 [<c043db6b>] param_array_get+0x3c/0x62
 [<c043de1a>] param_array_set+0x0/0xdf
 [<c043db2f>] param_array_get+0x0/0x62
 [<c043dd69>] param_attr_show+0x15/0x2d
 [<c043dd54>] param_attr_show+0x0/0x2d
 [<c043dbc8>] module_attr_show+0x1a/0x1e
 [<c04c431f>] sysfs_read_file+0x7c/0xd9
 [<c04c42a3>] sysfs_read_file+0x0/0xd9
 [<c048d4b2>] vfs_read+0x88/0x134
 [<c042090b>] do_page_fault+0x0/0x7d5
 [<c048d920>] sys_read+0x41/0x67
 [<c04080fa>] sysenter_past_esp+0x6b/0xc1
 =======================
Code: 00 83 c4 0c c3 83 ec 0c 8b 52 10 8b 12 c7 44 24 04 27 dd 6c c0 89 04 24 89 54 24 08 e8 ea 01 0c 00 83 c4 0c c3 83 ec 0c 8b 52 10 <8b> 12 c7 44 24 04 58 8c 6a c0 89 04 24 89 54 24 08 e8 ca 01 0c
EIP: [<c043dfd1>] param_get_int+0x6/0x20 SS:ESP 0068:c5c97f00

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPv6] SNMP: Restore Udp6InErrors incrementation
Mitsuru Chinen [Tue, 6 Nov 2007 05:29:17 +0000 (21:29 -0800)] 
[IPv6] SNMP: Restore Udp6InErrors incrementation

As the checksum verification is postponed till user calls recv or poll,
the inrementation of Udp6InErrors counter should be also postponed.
Currently, it is postponed in non-blocking operation case. However it
should be postponed in all case like the IPv4 code.

Signed-off-by: Mitsuru Chinen <mitch@linux.vnet.ibm.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Remove /proc/net/stat/*_arp_cache upon module removal
Alexey Dobriyan [Tue, 6 Nov 2007 05:28:13 +0000 (21:28 -0800)] 
[NET]: Remove /proc/net/stat/*_arp_cache upon module removal

neigh_table_init_no_netlink() creates them, but they aren't removed anywhere.

Steps to reproduce:

modprobe clip
rmmod clip
cat /proc/net/stat/clip_arp_cache

BUG: unable to handle kernel paging request at virtual address f89d7758
printing eip: c05a99da *pdpt = 0000000000004001 *pde = 0000000004408067 *pte = 0000000000000000
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: atm af_packet ipv6 binfmt_misc sbs sbshc fan dock battery backlight ac power_supply parport loop rtc_cmos rtc_core rtc_lib serio_raw button k8temp hwmon amd_rng sr_mod cdrom shpchp pci_hotplug ehci_hcd ohci_hcd uhci_hcd usbcore
Pid: 2082, comm: cat Not tainted (2.6.24-rc1-b1d08ac064268d0ae2281e98bf5e82627e0f0c56-bloat #4)
EIP: 0060:[<c05a99da>] EFLAGS: 00210256 CPU: 0
EIP is at neigh_stat_seq_next+0x26/0x3f
EAX: 00000001 EBX: f89d7600 ECX: c587bf40 EDX: 00000000
ESI: 00000000 EDI: 00000001 EBP: 00000400 ESP: c587bf1c
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process cat (pid: 2082, ti=c587b000 task=c5984e10 task.ti=c587b000)
Stack: c06228cc c5313790 c049e5c0 0804f000 c45a7b00 c53137b0 00000000 00000000
       00000082 00000001 00000000 00000000 00000000 fffffffb c58d6780 c049e437
       c45a7b00 c04b1f93 c587bfa0 00000400 0804f000 00000400 0804f000 c04b1f2f
Call Trace:
 [<c049e5c0>] seq_read+0x189/0x281
 [<c049e437>] seq_read+0x0/0x281
 [<c04b1f93>] proc_reg_read+0x64/0x77
 [<c04b1f2f>] proc_reg_read+0x0/0x77
 [<c048907e>] vfs_read+0x80/0xd1
 [<c0489491>] sys_read+0x41/0x67
 [<c04080fa>] sysenter_past_esp+0x6b/0xc1
 =======================
Code: e9 ec 8d 05 00 56 8b 11 53 8b 40 70 8b 58 3c eb 29 0f a3 15 80 91 7b c0 19 c0 85 c0 8d 42 01 74 17 89 c6 c1 fe 1f 89 01 89 71 04 <8b> 83 58 01 00 00 f7 d0 8b 04 90 eb 09 89 c2 83 fa 01 7e d2 31
EIP: [<c05a99da>] neigh_stat_seq_next+0x26/0x3f SS:ESP 0068:c587bf1c

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Consolidate the ip cork destruction in ip6_output.c
Pavel Emelyanov [Tue, 6 Nov 2007 05:04:31 +0000 (21:04 -0800)] 
[IPV6]: Consolidate the ip cork destruction in ip6_output.c

The ip6_push_pending_frames and ip6_flush_pending_frames do the
same things to flush the sock's cork. Move this into a separate
function and save ~100 bytes from the .text

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Consolidate the ip cork destruction in ip_output.c
Pavel Emelyanov [Tue, 6 Nov 2007 05:03:24 +0000 (21:03 -0800)] 
[IPV4]: Consolidate the ip cork destruction in ip_output.c

The ip_push_pending_frames and ip_flush_pending_frames do the
same things to flush the sock's cork. Move this into a separate
function and save ~80 bytes from the .text

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: ebt_arp: fix --arp-gratuitous matching dependence on --arp-ip-{src,dst}
Bart De Schuymer [Tue, 6 Nov 2007 04:59:47 +0000 (20:59 -0800)] 
[NETFILTER]: ebt_arp: fix --arp-gratuitous matching dependence on --arp-ip-{src,dst}

Fix --arp-gratuitous matching dependence on --arp-ip-{src,dst}

Signed-off-by: Bart De Schuymer <bdschuym@pandora.be>
Signed-off-by: Lutz Preßler <Lutz.Pressler@SerNet.DE>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_sockopts list head cleanup
Alexey Dobriyan [Tue, 6 Nov 2007 04:44:06 +0000 (20:44 -0800)] 
[NETFILTER]: nf_sockopts list head cleanup

Code is using knowledge that nf_sockopt_ops::list list_head is first
field in structure by using casts. Switch to list_for_each_entry()
itetators while I am at it.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: remove unneeded rcu_dereference() calls
Patrick McHardy [Tue, 6 Nov 2007 04:43:30 +0000 (20:43 -0800)] 
[NETFILTER]: remove unneeded rcu_dereference() calls

As noticed by Paul McKenney, the rcu_dereference calls in the init path
of NAT modules are unneeded, remove them.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: Clean up Makefile
Jan Engelhardt [Tue, 6 Nov 2007 04:42:54 +0000 (20:42 -0800)] 
[NETFILTER]: Clean up Makefile

Sort matches and targets in the NF makefiles.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: Sort matches/targets in Kbuild file
Jan Engelhardt [Tue, 6 Nov 2007 04:42:16 +0000 (20:42 -0800)] 
[NETFILTER]: Sort matches/targets in Kbuild file

Sort matches and targets in the Kbuild file.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: Copyright/Email update
Jan Engelhardt [Tue, 6 Nov 2007 04:35:56 +0000 (20:35 -0800)] 
[NETFILTER]: Copyright/Email update

Transfer all my copyright over to our company.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: ip{,6}_queue: convert to seq_file interface
Alexey Dobriyan [Tue, 6 Nov 2007 04:33:46 +0000 (20:33 -0800)] 
[NETFILTER]: ip{,6}_queue: convert to seq_file interface

I plan to kill ->get_info which means killing proc_net_create().

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosh: Add a dummy vga.h.
Paul Mundt [Wed, 7 Nov 2007 11:19:30 +0000 (20:19 +0900)] 
sh: Add a dummy vga.h.

We have nothing to do here, but there are continually drivers that
fail to build without it. Stub it in.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agortc: rtc-sh: Zero out tm value for invalid rtc states.
Paul Mundt [Wed, 7 Nov 2007 11:13:24 +0000 (20:13 +0900)] 
rtc: rtc-sh: Zero out tm value for invalid rtc states.

Follows the changes of some of the other RTC drivers. If the tm
value is bogus, just zero it out. Adds some sanity for RTC_RD_TIME.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years ago[SPARC64]: Use "is_power_of_2" macro for simplicity.
Robert P. J. Day [Wed, 7 Nov 2007 10:24:33 +0000 (02:24 -0800)] 
[SPARC64]: Use "is_power_of_2" macro for simplicity.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agocfq: fix IOPRIO_CLASS_IDLE delays
Oleg Nesterov [Wed, 7 Nov 2007 08:46:13 +0000 (09:46 +0100)] 
cfq: fix IOPRIO_CLASS_IDLE delays

After the fresh boot:

ionice -c3 -p $$
echo cfq >> /sys/block/XXX/queue/scheduler
dd if=/dev/XXX of=/dev/null bs=512 count=1

Now dd hangs in D state and the queue is completely stalled for approximately
INITIAL_JIFFIES + CFQ_IDLE_GRACE jiffies. This is because cfq_init_queue()
forgets to initialize cfq_data->last_end_request.

(I guess this patch is not complete, overflow is still possible)

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agocfq: fix IOPRIO_CLASS_IDLE accounting
Oleg Nesterov [Mon, 5 Nov 2007 07:58:05 +0000 (08:58 +0100)] 
cfq: fix IOPRIO_CLASS_IDLE accounting

Spotted by Nick <gentuu@gmail.com>, hopefully can explain the second trace in
http://bugzilla.kernel.org/show_bug.cgi?id=9180.

If ->async_idle_cfqq != NULL cfq_put_async_queues() puts it IOPRIO_BE_NR times
in a loop. Fix this.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agortc: sh-rtc: Handle rtc_device_register() failure properly.
Paul Mundt [Wed, 7 Nov 2007 05:58:09 +0000 (14:58 +0900)] 
rtc: sh-rtc: Handle rtc_device_register() failure properly.

Currently if rtc_device_register() fails we have an IS_ERR() on
the wrong pointer, which causes this to always be skipped. Fix
this up to actually check the right pointer. The return value
was always correct, even though the check was wrong.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Fix heartbeart on Solution Engine series
Nobuhiro Iwamatsu [Wed, 7 Nov 2007 05:56:46 +0000 (14:56 +0900)] 
sh: Fix heartbeart on Solution Engine series

Access size to LED is not added on Solution Engine series.
LED doesn't work. Fixed this problem.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Remove SCI_NPORTS from sh-sci.h
Nobuhiro Iwamatsu [Wed, 7 Nov 2007 05:54:32 +0000 (14:54 +0900)] 
sh: Remove SCI_NPORTS from sh-sci.h

When SH7710 and SH7712 are used, SCI_NPORTS redefined.
Remove it.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years ago[SPARC]: Remove duplicate includes.
Lucas Woods [Tue, 6 Nov 2007 04:22:27 +0000 (20:22 -0800)] 
[SPARC]: Remove duplicate includes.

Signed-off-by: Lucas Woods <woodzy@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosh: Fix up PAGE_KERNEL_PCC() for nommu.
Paul Mundt [Wed, 7 Nov 2007 02:40:24 +0000 (11:40 +0900)] 
sh: Fix up PAGE_KERNEL_PCC() for nommu.

PAGE_KERNEL_PCC() takes two arguments, which weren't reflected in the
nommu case. Fix it up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: hs7751rvoip: Kill off dead IPR IRQ mappings.
Paul Mundt [Wed, 7 Nov 2007 02:39:35 +0000 (11:39 +0900)] 
sh: hs7751rvoip: Kill off dead IPR IRQ mappings.

This is dead code, and doesn't build anyways. Kill it off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: hs7751rvoip: irq.c needs linux/interrupt.h.
Paul Mundt [Wed, 7 Nov 2007 02:38:37 +0000 (11:38 +0900)] 
sh: hs7751rvoip: irq.c needs linux/interrupt.h.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Kill off __{copy,clear}_user_page().
Paul Mundt [Mon, 5 Nov 2007 07:20:42 +0000 (16:20 +0900)] 
sh: Kill off __{copy,clear}_user_page().

Now that copy_to_user_page()/copy_from_user_page() are wired up, we
can drop the old __copy_xxx() implementations. Now that the page
colouring scheme has changed via kmap_coherent(), we can avoid the
flush in these specific helpers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Optimized copy_{to,from}_user_page() for SH-4.
Paul Mundt [Mon, 5 Nov 2007 07:18:16 +0000 (16:18 +0900)] 
sh: Optimized copy_{to,from}_user_page() for SH-4.

This moves copy_{to,from}_user_page() out-of-line on SH-4 and
converts for the kmap_coherent() API. Based on the MIPS
implementation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Wire up clear_user_highpage().
Paul Mundt [Mon, 5 Nov 2007 07:12:32 +0000 (16:12 +0900)] 
sh: Wire up clear_user_highpage().

With the kmap_coherent() API in place, this is trivial to implement,
and lets us avoid the cache flush in certain cases.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Kill off the remaining ST40 cruft.
Paul Mundt [Wed, 7 Nov 2007 02:05:32 +0000 (11:05 +0900)] 
sh: Kill off the remaining ST40 cruft.

The ST40 stuff in-tree hasn't built for some time, and hasn't been
updated for over 3 years. ST maintains their own out-of-tree changes
and rebases occasionally, and that's ultimately where all of the ST40
users go anyways.

In order for the ST40 code to be brought up to date most of the stuff
removed in this changeset would have to be rewritten anyways, so there's
very little benefit in keeping the remnants around either.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosuperhyway: Handle device_register() retval properly.
Paul Mundt [Tue, 6 Nov 2007 09:05:08 +0000 (18:05 +0900)] 
superhyway: Handle device_register() retval properly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: kgdb sysrq depends on magic sysrq.
Paul Mundt [Tue, 6 Nov 2007 08:50:07 +0000 (17:50 +0900)] 
sh: kgdb sysrq depends on magic sysrq.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Add -Werror for clean directories.
Paul Mundt [Tue, 6 Nov 2007 08:35:12 +0000 (17:35 +0900)] 
sh: Add -Werror for clean directories.

Follow the MIPS and sparc64 changes for -Werror instrumentation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Fix up kgdb build with modular sh-sci.
Paul Mundt [Tue, 6 Nov 2007 08:34:33 +0000 (17:34 +0900)] 
sh: Fix up kgdb build with modular sh-sci.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Export __{s,u}divsi3_i4i on all CPUs.
Paul Mundt [Tue, 6 Nov 2007 08:15:57 +0000 (17:15 +0900)] 
sh: Export __{s,u}divsi3_i4i on all CPUs.

Currently these are only being exported for CONFIG_CPU_SH4. This
invariably breaks when building for an SH-3 that includes multiple
targets in multilib.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Fix up kgdb-on-NMI branch target.
Paul Mundt [Tue, 6 Nov 2007 07:59:10 +0000 (16:59 +0900)] 
sh: Fix up kgdb-on-NMI branch target.

This was all reworked some time ago, the old debug_enter was ripped
out with everything going through a debug trap jump table instead.
Kill off the debug_enter target and reference kgdb_handle_exception
directly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: ubc wakeup for SH-4 only.
Paul Mundt [Tue, 6 Nov 2007 06:55:36 +0000 (15:55 +0900)] 
sh: ubc wakeup for SH-4 only.

SH-4A parts generally don't have any use for this, and it requires an
alternate implementation anyways. Leave this as an SH-4 only option,
as that's the only place this has been needed in the past.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Fix compression method when making uImage.
Nobuhiro Iwamatsu [Mon, 5 Nov 2007 21:45:58 +0000 (06:45 +0900)] 
sh: Fix compression method when making uImage.

When uImage is made by using 'make uImage', zImage is used.
If zImage is used, the compression method need not be set.
However, it is set for "gzip" for a compression method.
I corrected to set "none".

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Kill off duplicate includes.
Paul Mundt [Mon, 5 Nov 2007 03:14:17 +0000 (12:14 +0900)] 
sh: Kill off duplicate includes.

Caught by the surprisingly not-entirely-useless 'includecheck'.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: remove PTRACE_O_TRACESYSGOOD from asm/ptrace.h
Mike Frysinger [Sun, 4 Nov 2007 22:47:12 +0000 (07:47 +0900)] 
sh: remove PTRACE_O_TRACESYSGOOD from asm/ptrace.h

The common linux/ptrace.h already defines PTRACE_O_TRACESYSGOOD so there is no
need to have arches do it.  This also keeps glibc-2.7 from breaking since it
has an enum for the PTRACE_O_* flags.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Add SH7705 and other to the support of Solution Engine.
Nobuhiro Iwamatsu [Sun, 4 Nov 2007 22:44:41 +0000 (07:44 +0900)] 
sh: Add SH7705 and other to the support of Solution Engine.

This patch supports Hitachi Solution Engine (SuperH) of SH7705, SH7710,
SH7712, SH7750S and SH7750R.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agofirewire: fw-sbp2: fix refcounting
Stefan Richter [Wed, 7 Nov 2007 00:11:56 +0000 (01:11 +0100)] 
firewire: fw-sbp2: fix refcounting

Since patch "fw-sbp2: use an own workqueue (fix system responsiveness)"
increased parallelism between fw-sbp2 and fw-core, it was possible that
fw-sbp2 didn't release the SCSI device when the FireWire device was
disconnected.

This happened if sbp2_update() ran during sbp2_login(), because a bus
reset occurred during sbp2_login().  The sbp2_login() work would [try
to] reschedule itself because it failed due to the bus reset, and it
would _not_ drop its reference on the target.  However, sbp2_update()
would schedule sbp2_login() too before sbp2_login() rescheduled itself
and hence sbp2_update() would take an additional reference.  And then
we would have one reference too many.

The fix is to _always_ drop the reference when leaving the sbp2_login()
work.  If the sbp2_login() work reschedules itself, it takes a
reference, but only if it wasn't already rescheduled by sbp2_update().

Ditto in the sbp2_reconnect() work.

The resulting code is actually simpler than before:  We _always_ take
a reference when successfully scheduling work.  And we _always_ drop
a reference when leaving a workqueue job.  No exceptions.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years ago[IA64] Clean up /proc/interrupts output
Kenji Kaneshige [Wed, 31 Oct 2007 11:06:13 +0000 (20:06 +0900)] 
[IA64] Clean up /proc/interrupts output

Clean up /proc/interrupts output on the system that has 10 or more
CPUs.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] Disable/re-enable CPE interrupts on Altix
Russ Anderson [Wed, 31 Oct 2007 16:10:38 +0000 (11:10 -0500)] 
[IA64] Disable/re-enable CPE interrupts on Altix

When the CPE handler encounters too many CPEs (such as a solid single
bit memory error), it sets up a polling timer and disables the CPE
interrupt (to avoid excessive overhead logging the stream of single
bit errors).  disable_irq_nosync() calls chip->disable() to provide
a chipset specifiec interface for disabling the interrupt.  This patch
adds the Altix specific support to disable and re-enable the CPE interrupt.

Signed-off-by: Russ Anderson (rja@sgi.com)
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] Clean-up McKinley Errata message
Russ Anderson [Thu, 1 Nov 2007 21:00:04 +0000 (16:00 -0500)] 
[IA64] Clean-up McKinley Errata message

No need to print "McKinley Errata 9 workaround not needed; disabling it"
on every non-McKinley Itanium, which at this point is almost all of them.

Signed-off-by: Russ Anderson (rja@sgi.com)
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] Add gate.lds to list of files ignored by Git
Peter Chubb [Wed, 31 Oct 2007 00:45:50 +0000 (11:45 +1100)] 
[IA64] Add gate.lds to list of files ignored by Git

If you build the kernel `in-place' then do a git update, git
complains about arch/ia64/kernel/gate.lds being modified and
untracked.

Add that (generated) file to a .gitignore file.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years agoocfs2: fix rename vs unlink race
Srinivas Eeda [Wed, 31 Oct 2007 23:49:43 +0000 (16:49 -0700)] 
ocfs2: fix rename vs unlink race

If another node unlinks the destination while ocfs2_rename() is waiting on a
cluster lock, ocfs2_rename() simply logs an error and continues. This causes
a crash because the renaming node is now trying to delete a non-existent
inode. The correct solution is to return -ENOENT.

Signed-off-by: Srinivas Eeda <srinivas.eeda@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years ago[PATCH] Fix possibly too long write in o2hb_setup_one_bio()
Jan Kara [Wed, 10 Oct 2007 14:25:42 +0000 (16:25 +0200)] 
[PATCH] Fix possibly too long write in o2hb_setup_one_bio()

We should subtract start of our IO from PAGE_CACHE_SIZE to get the right
length of the write we want to perform.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2: fix write() performance regression
Mark Fasheh [Thu, 1 Nov 2007 18:37:48 +0000 (11:37 -0700)] 
ocfs2: fix write() performance regression

On file systems which don't support sparse files, Ocfs2_map_page_blocks()
was reading blocks on appending writes. This caused write performance to
suffer dramatically. Fix this by detecting an appending write on a nonsparse
fs and skipping the read.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2: Commit journal on sync writes
Mark Fasheh [Thu, 18 Oct 2007 21:14:45 +0000 (14:14 -0700)] 
ocfs2: Commit journal on sync writes

We're missing a meta data commit for extending sync writes. In thoery, write
could return with the meta data required to read the data uncommitted to
disk. Fix that by detecting an allocating write and forcing a journal commit
in the sync case.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2: Re-order iput in ocfs2_drop_dentry_lock
Mark Fasheh [Thu, 18 Oct 2007 19:36:10 +0000 (12:36 -0700)] 
ocfs2: Re-order iput in ocfs2_drop_dentry_lock

Do this to avoid a theoretical (I haven't seen this in practice) race where
the downconvert thread might drop the dentry lock, allowing a remote unlink
to proceed before dropping the inode locks. This could bounce access to the
orphan dir between nodes.

There doesn't seem to be a need to do the same in ocfs2_dentry_iput() as
that's never called for the last ref drop from the downconvert thread.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years agoocfs2: Create locks at initially requested level
Mark Fasheh [Fri, 5 Oct 2007 19:09:05 +0000 (12:09 -0700)] 
ocfs2: Create locks at initially requested level

If we have not yet created a cluster lock, ocfs2_cluster_lock() will
first create it at NLMODE, and then convert the lock to either PRMODE or
EXMODE (whichever is requested).

Change ocfs2_cluster_lock() to just create the lock at the initially
requested level. ocfs2_locking_ast() handles this case fine, so the only
update required was in setup of locking state. This should reduce the number
of network messages required for a new lock by one, providing an incremental
performance enhancement.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years ago[PATCH] Fix priority mistakes in fs/ocfs2/{alloc.c, dlmglue.c}
Roel Kluin [Fri, 26 Oct 2007 22:20:36 +0000 (00:20 +0200)] 
[PATCH] Fix priority mistakes in fs/ocfs2/{alloc.c, dlmglue.c}

Fixes priority mistakes similar to '!x & y'

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years ago[2.6 patch] make ocfs2_find_entry_el() static
Adrian Bunk [Wed, 24 Oct 2007 16:23:27 +0000 (18:23 +0200)] 
[2.6 patch] make ocfs2_find_entry_el() static

ocfs2_find_entry_el() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
16 years ago[IA64] Fix section mismatch in contig.c version of per_cpu_init()
Tony Luck [Tue, 6 Nov 2007 23:14:45 +0000 (15:14 -0800)] 
[IA64] Fix section mismatch in contig.c version of per_cpu_init()

There is a section mismatch when building CONFIG_FLATMEM=y kernels
that also have CONFIG_HOTPLUG_CPU=y

WARNING: vmlinux.o(.text+0x5a902): Section mismatch: reference to \
.init.text:__alloc_bootmem (between 'per_cpu_init' and 'count_pages')

The issue occurs because per_cpu_init() in mm/contig.c is
marked __cpuinit (which is #define'd to nothing on a hot
plug cpu configuration) call __alloc_bootmem() (which is
an __init function).  The usage is actually safe because
the __alloc_bootmem() is inside an "if (first_time)" test
so that the call is only made while it is still legal to
do so.

But the warning is irritating.  Move the allocation to
find_memory().

Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years agoLinux 2.6.24-rc2 v2.6.24-rc2
Linus Torvalds [Tue, 6 Nov 2007 21:57:46 +0000 (13:57 -0800)] 
Linux 2.6.24-rc2

16 years agoUML: fix defconfig build again
Jeff Dike [Tue, 6 Nov 2007 16:02:50 +0000 (11:02 -0500)] 
UML: fix defconfig build again

Reported by Al Viro.

This fixes it:

     [AC]FLAGS -> KBUILD_[AC]FLAGS conversion in Makefile-i386.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[IA64] Wrong args to memset in efi_gettimeofday()
Li Zefan [Tue, 6 Nov 2007 21:40:39 +0000 (13:40 -0800)] 
[IA64] Wrong args to memset in efi_gettimeofday()

Not sizeof(ptr) ... we meant to say sizeof(*ptr).

Also moved the memset to the error path (the normal path overwrites
every field in the structure anyway) -Tony

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] Remove duplicate includes from ia32priv.h
Lucas Woods [Mon, 5 Nov 2007 20:13:28 +0000 (07:13 +1100)] 
[IA64] Remove duplicate includes from ia32priv.h

Don't need asm/processor.h twice

Signed-off-by: Lucas Woods <woodzy@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] fix number of bytes zeroed by sys_fw_init() in arch/ia64/hp/sim/boot/fw-emu.c
Roel Kluin [Tue, 6 Nov 2007 21:13:53 +0000 (22:13 +0100)] 
[IA64] fix number of bytes zeroed by sys_fw_init() in arch/ia64/hp/sim/boot/fw-emu.c

The sizeof a pointer is constant, we want the sizeof what is pointed to.
Zero out 'sizeof(*efi_systab)' bytes of the efi_system_table_t pointer
'efi_systab' instead.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] Fix perfmon sysctl directory modes
Tony Luck [Tue, 6 Nov 2007 21:20:43 +0000 (13:20 -0800)] 
[IA64] Fix perfmon sysctl directory modes

New sanity checks in sysctl_check_table() complain about a couple
of mode 0755 that should be 0555 in the perfmon code:

sysctl table check failed: /kernel .1 Writable sysctl directory
sysctl table check failed: /kernel/perfmon  Writable sysctl directory

Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
Linus Torvalds [Tue, 6 Nov 2007 15:53:46 +0000 (07:53 -0800)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/ericvh/v9fs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9p: add missing end-of-options record for trans_fd
  9p: return NULL when trans not found
  9p: use copy of the options value instead of original
  9p: fix memory leak in v9fs_get_sb

16 years ago9p: add missing end-of-options record for trans_fd
Latchesar Ionkov [Tue, 6 Nov 2007 14:02:53 +0000 (08:02 -0600)] 
9p: add missing end-of-options record for trans_fd

The list of options that the fd transport accepts is missing end-of-options
marker. This patch adds it.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
16 years ago9p: return NULL when trans not found
Latchesar Ionkov [Tue, 6 Nov 2007 14:02:53 +0000 (08:02 -0600)] 
9p: return NULL when trans not found

v9fs_match_trans function returns arbitrary transport module instead of NULL
when the requested transport is not registered. This patch modifies the
function to return NULL in that case.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
16 years ago9p: use copy of the options value instead of original
Latchesar Ionkov [Tue, 6 Nov 2007 14:02:53 +0000 (08:02 -0600)] 
9p: use copy of the options value instead of original

v9fs_parse_options function uses strsep which modifies the value of the
v9ses->options field. That modified value is later passed to the function
that creates the transport potentially making the transport creation
function to fail.

This patch creates a copy of v9ses->option field that v9fs_parse_options
function uses instead of the original value.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
16 years ago9p: fix memory leak in v9fs_get_sb
Latchesar Ionkov [Tue, 6 Nov 2007 14:02:53 +0000 (08:02 -0600)] 
9p: fix memory leak in v9fs_get_sb

This patch fixes a memory leak in v9fs_get_sb.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
16 years agoMerge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Tue, 6 Nov 2007 01:43:36 +0000 (17:43 -0800)] 
Merge branch 'drm-patches' of /linux/kernel/git/airlied/drm-2.6

* 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm: DRM: fix memset size error
  drm: remove remnants of DRM_COPY_FROM/TO_USER_IOCTL
  drm: remove second forward decleration of drm device struct.

16 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Tue, 6 Nov 2007 01:43:04 +0000 (17:43 -0800)] 
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: handle broken cable reporting
  pata_hpt37x: Fix outstanding bug reports on the HPT374 and 37x cable detect
  ata_piix: Add additional PCI identifier for 40 wire short cable
  pata_serverworks: Fix problem with some drive combinations
  libata: Don't disable dipm with SET FEATURES
  libata and bogus LBA48 drives

16 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Tue, 6 Nov 2007 01:42:41 +0000 (17:42 -0800)] 
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  phylib: Silence driver registration
  phylib: Add ID for Marvell 88E1240
  82596: free nonexistent resource fix
  SUNHME: Fix missing NETIF_F_VLAN_CHALLENGED on PCI happy meals

16 years agodrm: DRM: fix memset size error
Li Zefan [Mon, 5 Nov 2007 02:53:09 +0000 (12:53 +1000)] 
drm: DRM: fix memset size error

The size passing to memset is wrong.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
16 years agodrm: remove remnants of DRM_COPY_FROM/TO_USER_IOCTL
Dave Airlie [Mon, 5 Nov 2007 01:48:34 +0000 (11:48 +1000)] 
drm: remove remnants of DRM_COPY_FROM/TO_USER_IOCTL

This is a bug in the savage driver since I introduced these changes.

Signed-off-by: Dave Airlie <airlied@redhat.com>
16 years agodrm: remove second forward decleration of drm device struct.
Dave Airlie [Mon, 5 Nov 2007 01:36:18 +0000 (11:36 +1000)] 
drm: remove second forward decleration of drm device struct.

Signed-off-by: Dave Airlie <airlied@linux.ie>
16 years agoata_piix: Add additional PCI identifier for 40 wire short cable
Alan Cox [Mon, 5 Nov 2007 22:51:09 +0000 (22:51 +0000)] 
ata_piix: Add additional PCI identifier for 40 wire short cable

Keeping the list in sync with the old IDE driver

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotime: fix inconsistent function names in comments
Li Zefan [Mon, 5 Nov 2007 22:51:10 +0000 (14:51 -0800)] 
time: fix inconsistent function names in comments

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: john stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68knommu: fix pread/pwrite defines
Greg Ungerer [Mon, 5 Nov 2007 22:51:04 +0000 (14:51 -0800)] 
m68knommu: fix pread/pwrite defines

Fix system call defines for system call 180 and 181 to match the underlying
system call table function entries.  System call 180 calls sys_pread64, and
181 calls sys_pwrite64, so make the definitions match.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoeCryptfs: release mutex on hash error path
Michael Halcrow [Mon, 5 Nov 2007 22:51:04 +0000 (14:51 -0800)] 
eCryptfs: release mutex on hash error path

Release the crypt_stat hash mutex on allocation error. Check for error
conditions when doing crypto hash calls.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Reported-by: Kazuki Ohta <kazuki.ohta@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoeCryptfs: increment extent_offset once per loop interation
Michael Halcrow [Mon, 5 Nov 2007 22:51:03 +0000 (14:51 -0800)] 
eCryptfs: increment extent_offset once per loop interation

The extent_offset is getting incremented twice per loop iteration through any
given page.  It should only be getting incremented once.  This bug should only
impact hosts with >4K page sizes.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotelephony: phonedev panics if unregistering device not registered [Bug 9266]
Matti Linnanvuori [Mon, 5 Nov 2007 22:51:02 +0000 (14:51 -0800)] 
telephony: phonedev panics if unregistering device not registered [Bug 9266]

Remove panic from phonedev.  See

http://bugzilla.kernel.org/show_bug.cgi?id=9266

for details (phonedev panics if unregistering device not registered).

Signed-off-by: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomd: fix misapplied patch in raid5.c
Neil Brown [Mon, 5 Nov 2007 22:51:02 +0000 (14:51 -0800)] 
md: fix misapplied patch in raid5.c

commit 4ae3f847e49e3787eca91bced31f8fd328d50496 ("md: raid5: fix
clearing of biofill operations") did not get applied correctly,
presumably due to substantial similarities between handle_stripe5 and
handle_stripe6.

This patch moves the chunk of new code from handle_stripe6 (where it isn't
needed (yet)) to handle_stripe5.

Signed-off-by: Neil Brown <neilb@suse.de>
Cc: "Dan Williams" <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agovirtio/virtcons: fix section mismatch warning
Randy Dunlap [Mon, 5 Nov 2007 22:51:01 +0000 (14:51 -0800)] 
virtio/virtcons: fix section mismatch warning

Make virtcons_probe() __devinit.
Fixes this section warning:

WARNING: vmlinux.o(.text+0x14c10b): Section mismatch: reference to .init.text:hvc_alloc (between 'virtcons_probe' and 'ac_register_board')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agortc: m48t59 fix section mismatch warning
Randy Dunlap [Mon, 5 Nov 2007 22:51:00 +0000 (14:51 -0800)] 
rtc: m48t59 fix section mismatch warning

Change the name of this data to use a name (suffix) that is whitelisted
by MODPOST so that the section warning is fixed (not generated).

WARNING: vmlinux.o(.data+0x1b140): Section mismatch: reference to .init.text:m48t59_rtc_probe (between 'm48t59_rtc_platdrv' and 'm48t59_nvram_attr')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: correctly strip kernel defines from userspace CFLAGS
Jeff Dike [Mon, 5 Nov 2007 22:50:59 +0000 (14:50 -0800)] 
uml: correctly strip kernel defines from userspace CFLAGS

KERNEL_DEFINES needs whitespace trimmed, otherwise the whitespace crunching
done by make fools the patsubst which is used to remove KERNEL_DEFINES from
USER_CFLAGS.

Signed-off-by: Jeff Dike <jdike@linux.intel.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 agouml: fix incompatible types warning in previous SG fix
WANG Cong [Mon, 5 Nov 2007 22:50:59 +0000 (14:50 -0800)] 
uml: fix incompatible types warning in previous SG fix

Fix an incompatible-pointer warning.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.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 agoparide: fix 'and' typo in drivers/block/paride/pt.c
Roel Kluin [Mon, 5 Nov 2007 22:50:58 +0000 (14:50 -0800)] 
paride: fix 'and' typo in drivers/block/paride/pt.c

Fix 'and' typo (PT_WRITE_OK is defined 2)

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofs/afs/vlocation.c: fix off-by-one
Adrian Bunk [Mon, 5 Nov 2007 22:50:57 +0000 (14:50 -0800)] 
fs/afs/vlocation.c: fix off-by-one

This patch fixes an off-by-one error spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
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 agoarm26: remove it again
Hugh Dickins [Mon, 5 Nov 2007 22:50:56 +0000 (14:50 -0800)] 
arm26: remove it again

A tiny vestige of arm26 has appeared: remove it again.

(akpm: someone (tm) needs to remove include/asm-arm26/ too)

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix bitmap_scnlistprintf for empty masks
Andi Kleen [Mon, 5 Nov 2007 22:50:56 +0000 (14:50 -0800)] 
Fix bitmap_scnlistprintf for empty masks

When a bitmap is empty bitmap_scnlistprintf() would leave the buffer
uninitialized.  Set it to an empty string in this case.

I didn't see any in normal kernel callers hitting this, but some custom
debug code of mine did.

Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMissing include file in kallsyms.h
Kamalesh Babulal [Mon, 5 Nov 2007 22:50:55 +0000 (14:50 -0800)] 
Missing include file in kallsyms.h

The Build with randconfig fails with following error with the
2.6.24-rc4-git9

include/linux/kallsyms.h:56: error: `NULL' undeclared (first use in this
function)
include/linux/kallsyms.h:56: error: (Each undeclared identifier is
reported only once
include/linux/kallsyms.h:56: error: for each function it appears in.)
make[2]: *** [arch/powerpc/platforms/cell/spu_callbacks.o] Error 1
make[1]: *** [arch/powerpc/platforms/cell] Error 2
make: *** [arch/powerpc/platforms] Error 2

Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolocal_t Documentation update
Mathieu Desnoyers [Mon, 5 Nov 2007 22:50:54 +0000 (14:50 -0800)] 
local_t Documentation update

Grant Grundler was asking for more detail about correct usage of local
atomic operations and suggested adding the resulting summary to
local_ops.txt.

"Please add a bit more detail. If DaveM is correct (he normally is), then
there must be limits on how the local_t can be used in the kernel process
and interrupt contexts. I'd like those rules spelled out very clearly
since it's easy to get wrong and tracking down such a bug is quite painful."

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoserial: fix compile warning about putc
Yinghai Lu [Mon, 5 Nov 2007 22:50:53 +0000 (14:50 -0800)] 
serial: fix compile warning about putc

drivers/serial/8250_early.c:80: warning: conflicting types for built-in function `putc'

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoi2o: debug messages corrected
Vasily Averin [Mon, 5 Nov 2007 22:50:53 +0000 (14:50 -0800)] 
i2o: debug messages corrected

max_phys_segments and max_sectors were swapped

Signed-off-by: Vasily Averin <vvs@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoDump stack during sysctl registration failure
Alexey Dobriyan [Mon, 5 Nov 2007 22:50:52 +0000 (14:50 -0800)] 
Dump stack during sysctl registration failure

Let's make immediately obvious from where sysctl comes from and messages
itself more noticeable.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoi4l: errors with assignments in if
Roel Kluin [Mon, 5 Nov 2007 22:50:51 +0000 (14:50 -0800)] 
i4l: errors with assignments in if

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolibata: handle broken cable reporting
Alan Cox [Mon, 5 Nov 2007 22:58:58 +0000 (22:58 +0000)] 
libata: handle broken cable reporting

One or two ancient drives predated the cable spec and didn't sent the
valid bits for the field. I had hoped to leave this out of libata as a
piece of historical annoyance but a recent CD drive shows the same bug so
we have to import support for it.

Same concept as Bartlomiej's changes old IDE except that as we have
centralised blacklists we can avoid keeping another private table of stuff

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopata_hpt37x: Fix outstanding bug reports on the HPT374 and 37x cable detect
Alan Cox [Mon, 5 Nov 2007 22:53:38 +0000 (22:53 +0000)] 
pata_hpt37x: Fix outstanding bug reports on the HPT374 and 37x cable detect

- Read frequency correctly
- Correct cable detect handling
- Fix wrong filter test

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>