openwrt/staging/blogic.git
19 years ago[NET]: Reorder some hot fields of struct net_device
Eric Dumazet [Tue, 27 Sep 2005 22:23:16 +0000 (15:23 -0700)]
[NET]: Reorder some hot fields of struct net_device

Place them on separate cache lines in SMP to lower memory bouncing
between multiple CPU accessing the device.

     - One part is mostly used on receive path (including
       eth_type_trans()) (poll_list, poll, quota, weight, last_rx,
       dev_addr, broadcast)

     - One part is mostly used on queue transmit path (qdisc)
      (queue_lock, qdisc, qdisc_sleeping, qdisc_list, tx_queue_len)

     - One part is mostly used on xmit path (device)
      (xmit_lock, xmit_lock_owner, priv, hard_start_xmit, trans_start)

'features' is placed outside of these hot points, in a location that
may be shared by all cpus (because mostly read)

name_hlist is moved close to name[IFNAMSIZ] to speedup __dev_get_by_name()

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Prefetch dev->qdisc_lock in dev_queue_xmit()
Eric Dumazet [Tue, 27 Sep 2005 22:22:58 +0000 (15:22 -0700)]
[NET]: Prefetch dev->qdisc_lock in dev_queue_xmit()

We know the lock is going to be taken.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Use non-recursive algorithm in skb_copy_datagram_iovec()
Daniel Phillips [Tue, 27 Sep 2005 22:22:35 +0000 (15:22 -0700)]
[NET]: Use non-recursive algorithm in skb_copy_datagram_iovec()

Use iteration instead of recursion.  Fraglists within fraglists
should never occur, so we BUG check this.

Signed-off-by: Daniel Phillips <phillips@istop.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Tue, 27 Sep 2005 20:33:25 +0000 (13:33 -0700)]
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6

19 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 27 Sep 2005 20:32:33 +0000 (13:32 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

19 years ago[PATCH] Make POSIX message queue sys_mq_open() honor umask
Krzysztof Benedyczak [Tue, 27 Sep 2005 20:21:36 +0000 (22:21 +0200)]
[PATCH] Make POSIX message queue sys_mq_open() honor umask

We ignored umask when creating new queues via mq_open (when creating
with open() on mqueue fs it is ok of course).  According to the
specification this a bug.  This trivial patch fixes this.

Signed-off-by: Krzysztof Benedyczak <golbi@mat.uni.torun.pl>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[TG3]: Update driver version and release date.
David S. Miller [Tue, 27 Sep 2005 19:13:38 +0000 (12:13 -0700)]
[TG3]: Update driver version and release date.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: misc. fixes
Michael Chan [Tue, 27 Sep 2005 19:13:10 +0000 (12:13 -0700)]
[TG3]: misc. fixes

Fix interrupt test handler by adding check for IRQ assertion in
PCI_STATE register in addition to the status block updated bit.

Add test for valid ethernet address in tg3_set_mac_addr().

Add tg3_bus_string() to setup the PCI bus speed/width string for all
PCI/PCIX/PCI Express devices. This is used to print the bus type
during init_one().

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: 5780 PHY fixes
Michael Chan [Tue, 27 Sep 2005 19:12:42 +0000 (12:12 -0700)]
[TG3]: 5780 PHY fixes

Fix 5780 PHY related problems:

1. MAC_RX_MODE reset must be done before setting up the MAC_MODE
   register on 5705_PLUS chips or the chip will stop receiving after
   a while. The MAC_RX_MODE reset is needed to prevent intermittently
   losing the first receive packet on serdes chips.

2. Skip MAC loopback test on 5780 because of hardware errata. Normal
   traffic including PHY loopback is not affected by the errata.

3. PHY loopback fails intermittently on 5708S and this is fixed by
   putting the PHY in loopback mode first before programming the MAC
   mode register. A MAC_RX_MODE reset is also added.

4. Return -EINVAL in tg3_nway_reset() if device is in TBI mode. Allow
   nway_reset if 5780S is in parallel detect mode.

5. Add missing PHY IDs in KNOWN_PHY_ID() macro.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NEIGH]: Add debugging check when adding timers.
David S. Miller [Tue, 27 Sep 2005 19:07:44 +0000 (12:07 -0700)]
[NEIGH]: Add debugging check when adding timers.

If we double-add a neighbour entry timer, which should be
impossible but has been reported, dump the current state of
the entry so that we can debug this.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 27 Sep 2005 01:33:26 +0000 (18:33 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

19 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Tue, 27 Sep 2005 01:32:48 +0000 (18:32 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

19 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6
Linus Torvalds [Tue, 27 Sep 2005 01:31:36 +0000 (18:31 -0700)]
Merge /linux/kernel/git/brodo/pcmcia-fixes-2.6

19 years ago[PATCH] missing dependency on arm O= builds
Al Viro [Mon, 26 Sep 2005 06:49:27 +0000 (07:49 +0100)]
[PATCH] missing dependency on arm O= builds

arm maketools needs include/asm-arm in place in the build tree.
On normal builds it's always there, of course, but on O= it's created
(by generic code) too late - when we get to asm-offset.h.

We used to get away with that by accident - creation of
include/asm-arm/arch symlink creates include/asm-arm and it happened
to go before maketools.  However, we did not have such dependency,
so that luck didn't last - now maketools is picked first and we are screwed.

Both the symlink and maketools are prerequisites of the same
target (archprepare).  This fix is obvious - make the latter explicitly
depend on the former and be done with that.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] m32r: more basic __user annotations
Al Viro [Mon, 26 Sep 2005 05:19:28 +0000 (06:19 +0100)]
[PATCH] m32r: more basic __user annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] m32r: set CHECKFLAGS properly
Al Viro [Mon, 26 Sep 2005 05:19:28 +0000 (06:19 +0100)]
[PATCH] m32r: set CHECKFLAGS properly

We do _not_ need "sparse" in sparse arguments ;-)

What we do need is __BIG_ENDIAN__; right now unconditional, when m32r
starts using CPU_LITTLE_ENDIAN, we'll need to adjust.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] m32r: missing __iomem in ioremap() declaration
Al Viro [Mon, 26 Sep 2005 05:19:28 +0000 (06:19 +0100)]
[PATCH] m32r: missing __iomem in ioremap() declaration

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] useless includes of linux/irq.h in arch/i386
Al Viro [Mon, 26 Sep 2005 04:49:44 +0000 (05:49 +0100)]
[PATCH] useless includes of linux/irq.h in arch/i386

Most of these guys are simply not needed (pulled by other stuff
via asm-i386/hardirq.h).  One that is not entirely useless is hilarious -
arch/i386/oprofile/nmi_timer_int.c includes linux/irq.h... as a way to
get linux/errno.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] missing asm/irq.h (cs89x0)
Al Viro [Mon, 26 Sep 2005 04:25:59 +0000 (05:25 +0100)]
[PATCH] missing asm/irq.h (cs89x0)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[SPARC64]: Do not do TLB pre-filling any more.
David S. Miller [Mon, 26 Sep 2005 23:12:18 +0000 (16:12 -0700)]
[SPARC64]: Do not do TLB pre-filling any more.

In order to do it correctly on UltraSPARC-III+ and later we'd
need to add some complicated code to set the TAG access extension
register before loading the TLB.

Since this optimization gives questionable gains, it's best to
just remove it for now instead of adding the fix for Ultra-III+

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SPARC64]: Simplify Spitfire D-cache page flush.
David S. Miller [Mon, 26 Sep 2005 23:06:03 +0000 (16:06 -0700)]
[SPARC64]: Simplify Spitfire D-cache page flush.

It tries to batch up the tag loads and comparisons, and
then the stores.  And this is just complicated instead
of efficient.

Also, make the symbol of the Cheetah version more grepable.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/acme/llc-2.6
David S. Miller [Mon, 26 Sep 2005 22:29:31 +0000 (15:29 -0700)]
Merge /pub/scm/linux/kernel/git/acme/llc-2.6

19 years ago[NETFILTER]: Fix invalid module autoloading by splitting iptable_nat
Harald Welte [Mon, 26 Sep 2005 22:25:11 +0000 (15:25 -0700)]
[NETFILTER]: Fix invalid module autoloading by splitting iptable_nat

When you've enabled conntrack and NAT as a module (standard case in all
distributions), and you've also enabled the new conntrack netlink
interface, loading ip_conntrack_netlink.ko will auto-load iptable_nat.ko.
This causes a huge performance penalty, since for every packet you iterate
the nat code, even if you don't want it.

This patch splits iptable_nat.ko into the NAT core (ip_nat.ko) and the
iptables frontend (iptable_nat.ko).  Threfore, ip_conntrack_netlink.ko will
only pull ip_nat.ko, but not the frontend.  ip_nat.ko will "only" allocate
some resources, but not affect runtime performance.

This separation is also a nice step in anticipation of new packet filters
(nf-hipac, ipset, pkttables) being able to use the NAT core.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[AF_PACKET]: Remove bogus checks added to packet_sendmsg().
David S. Miller [Mon, 26 Sep 2005 22:23:58 +0000 (15:23 -0700)]
[AF_PACKET]: Remove bogus checks added to packet_sendmsg().

These broke existing apps, and the checks are superfluous
as the values being verified aren't even used.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[IPV6]: Fix [Bug 5306] Oops on IPv6 route lookup
Herbert Xu [Mon, 26 Sep 2005 22:10:16 +0000 (15:10 -0700)]
[IPV6]: Fix [Bug 5306] Oops on IPv6 route lookup

> Steps to reproduce:
> 1. Boot Linux, do NOT setup any IPv6 routes
> 2. ip route get 2001::1 (or any unroutable address)

Well caught.  We never set rt6i_idev on ip6_null_entry.
This patch should make the problem go away.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[CONNECTOR]: async connector mode.
Evgeniy Polyakov [Mon, 26 Sep 2005 22:06:50 +0000 (15:06 -0700)]
[CONNECTOR]: async connector mode.

If input message rate from userspace is too high, do not drop them,
but try to deliver using work queue allocation.

Failing there is some kind of congestion control.

It also removes warn_on on this condition, which scares people.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Make sure ctl buffer is aligned properly in sys_sendmsg().
Alex Williamson [Mon, 26 Sep 2005 21:28:02 +0000 (14:28 -0700)]
[NET]: Make sure ctl buffer is aligned properly in sys_sendmsg().

It's on the stack and declared as "unsigned char[]", but pointers
and similar can be in here thus we need to give it an explicit
alignment attribute.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[ARM] 2936/1: ixp4xx default config fixes
Vincent Sanders [Mon, 26 Sep 2005 18:52:57 +0000 (19:52 +0100)]
[ARM] 2936/1: ixp4xx default config fixes

Patch from Vincent Sanders

A recent patch which made IXP4xx mach_desc's depend on config options
had the effect of not building the kernel for several machines it
possibly could be, this patch updates the default config to ensure all
possible machines are built for by default.

Signed-off-by: Vincent Sanders <vince@arm.linux.org.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
19 years ago[ARM] 2935/1: ixp4xx: fix warnings in ixp4xx_set_irq_type
David Vrabel [Mon, 26 Sep 2005 18:52:56 +0000 (19:52 +0100)]
[ARM] 2935/1: ixp4xx: fix warnings in ixp4xx_set_irq_type

Patch from David Vrabel

Signed-off-by: David Vrabel <dvrabel@arcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
19 years agoNTFS: Re-fix sparse warnings in a more correct way, i.e. don't use an enum with
Anton Altaparmakov [Mon, 26 Sep 2005 16:02:41 +0000 (17:02 +0100)]
NTFS: Re-fix sparse warnings in a more correct way, i.e. don't use an enum with
      different types in it but #define the two constants instead.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
19 years ago[ARM] Remove SA_IRQNOMASK
Russell King [Mon, 26 Sep 2005 14:30:20 +0000 (15:30 +0100)]
[ARM] Remove SA_IRQNOMASK

SA_IRQNOMASK is unused, remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
19 years ago[PATCH] pcmcia: fix cross-platform issues with pcmcia module aliases
Kars de Jong [Sun, 25 Sep 2005 12:39:46 +0000 (14:39 +0200)]
[PATCH] pcmcia: fix cross-platform issues with pcmcia module aliases

- Added a missing TO_NATIVE call to scripts/mod/file2alias.c:do_pcmcia_entry()
- Add an alignment attribute to struct pcmcia_device_no to solve an alignment
  issue seen when cross-compiling on x86 for m68k.

Signed-off-by: Kars de Jong <jongk@linux-m68k.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
19 years ago[PATCH] pcmcia: update ID for NinjaATA
Dominik Brodowski [Sat, 17 Sep 2005 09:17:56 +0000 (11:17 +0200)]
[PATCH] pcmcia: update ID for NinjaATA

Christian Zoz reported there are multiple NinjaATA devices all sharing the
second product ID string, but not the first one.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
19 years ago[PATCH] yenta: more ENE bridges
Daniel Ritz [Sun, 25 Sep 2005 06:12:46 +0000 (23:12 -0700)]
[PATCH] yenta: more ENE bridges

Adds better support for the CB-710, CB-712, CB-720 and CB-722 bridges from EnE

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
19 years ago[PATCH] pcmcia: new IDs for serial_cs
Dominik Brodowski [Sun, 25 Sep 2005 06:12:44 +0000 (23:12 -0700)]
[PATCH] pcmcia: new IDs for serial_cs

Add new ID to serial_cs.c; the CIS fimware override is available by the
manufacturer at http://www.sierrawireless.com .  Remember to name the CIS
binary SW_7xx_SER.cis and to put it into /lib/firmware/

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
19 years ago[PATCH] yenta: add support for more TI bridges
Daniel Ritz [Tue, 20 Sep 2005 21:12:17 +0000 (14:12 -0700)]
[PATCH] yenta: add support for more TI bridges

Support some more TI cardbus bridges.  most of them are multifunction
devices which adds 1394 controllers, smartcard readers etc.  this could
also help with the various problems with the XX21 controllers seen on the
linux-pcmcia list.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
19 years ago[PATCH] pcmcia: fix Kconfig dependency
Komuro [Sun, 25 Sep 2005 06:12:40 +0000 (23:12 -0700)]
[PATCH] pcmcia: fix Kconfig dependency

TCIC depends on ISA.  It is used with ISA-bus system only.

Signed-off-by: komurojun-mbn@nifty.com
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
19 years ago[PATCH] yenta: tiny cleanup
Dominik Brodowski [Wed, 7 Sep 2005 23:00:28 +0000 (16:00 -0700)]
[PATCH] yenta: tiny cleanup

pci_set_power_state is not needed, as we call pci_enable_device() somewhere
else.  Also, the resource we write to PCI_BASE_ADDRESS_0 needs to be converted
to bus-centric view first.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
19 years ago[PATCH] yenta: don't mess with bridge control register
Daniel Ritz [Wed, 24 Aug 2005 15:03:23 +0000 (17:03 +0200)]
[PATCH] yenta: don't mess with bridge control register

In interrupt probing (both ISA and PCI) the bridge control register is used
to change interrupt routing to ISA or PCI by changing bit 7.  But this bit
only controls the routing of card functional interrupts, not the CSC
interrupts which are used for interrupt probing.

A bad side effect of messing with this register in yenta_probe_irq() is
that it can lead to irq storms if a card is inserted and already powered by
the BIOS.

Usage in yenta_sock_init() and yenta_config_init() seem to be fishy as well.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
19 years ago[PATCH] yenta: auto-tune EnE bridges for CardBus cards
Daniel Ritz [Mon, 22 Aug 2005 05:29:26 +0000 (22:29 -0700)]
[PATCH] yenta: auto-tune EnE bridges for CardBus cards

Echo Audio cardbus products are known to be incompatible with EnE bridges.
in order to maybe solve the problem a EnE specific test bit has to be set,
another cleared...but other setups have a good chance to break when just
forcing the bits.  so do the whole thingy automatically.

The patch adds a hook in cb_alloc() that allows special tuning for the
different chipsets.  for ene just match the Echo products and set/clear the
test bits, defaults to do the same thing as w/o the patch to not break
working setups.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
19 years agoMerge branch 'master' of /home/src/linux-2.6/
Anton Altaparmakov [Mon, 26 Sep 2005 09:50:29 +0000 (10:50 +0100)]
Merge branch 'master' of /home/src/linux-2.6/

19 years agoNTFS: More $LogFile handling fixes: when chkdsk has been run, it can leave the
Anton Altaparmakov [Mon, 26 Sep 2005 09:48:54 +0000 (10:48 +0100)]
NTFS: More $LogFile handling fixes: when chkdsk has been run, it can leave the
      restart pages in the journal without multi sector transfer protection
      fixups (i.e. the update sequence array is empty and in fact does not
      exist).

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
19 years agoNTFS: Fix the definition of the CHKD ntfs record magic. It had an off by
Anton Altaparmakov [Mon, 26 Sep 2005 09:45:46 +0000 (10:45 +0100)]
NTFS: Fix the definition of the CHKD ntfs record magic.  It had an off by
      two error causing it to be CHKB instead of CHKD.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
19 years ago[SPARC64]: Probe D/I/E-cache config and use.
David S. Miller [Mon, 26 Sep 2005 07:32:17 +0000 (00:32 -0700)]
[SPARC64]: Probe D/I/E-cache config and use.

At boot time, determine the D-cache, I-cache and E-cache size and
line-size.  Use them in cache flushes when appropriate.

This change was motivated by discovering that the D-cache on
UltraSparc-IIIi and later are 64K not 32K, and the flushes done by the
Cheetah error handlers were assuming a 32K size.

There are still some pieces of code that are hard coding things and
will need to be fixed up at some point.

While we're here, fix the D-cache and I-cache parity error handlers
to run with interrupts disabled, and when the trap occurs at trap
level > 1 log the event via a counter displayed in /proc/cpuinfo.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SPARC64]: Add CONFIG_DEBUG_PAGEALLOC support.
David S. Miller [Sun, 25 Sep 2005 23:46:57 +0000 (16:46 -0700)]
[SPARC64]: Add CONFIG_DEBUG_PAGEALLOC support.

The trick is that we do the kernel linear mapping TLB miss starting
with an instruction sequence like this:

ba,pt %xcc, kvmap_load
 xor %g2, %g4, %g5

succeeded by an instruction sequence which performs a full page table
walk starting at swapper_pg_dir.

We first take over the trap table from the firmware.  Then, using this
constant PTE generation for the linear mapping area above, we build
the kernel page tables for the linear mapping.

After this is setup, we patch that branch above into a "nop", which
will cause TLB misses to fall through to the full page table walk.

With this, the page unmapping for CONFIG_DEBUG_PAGEALLOC is trivial.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[ARM] 2934/1: Anubis - fix VA offsets for CPLD registers
Ben Dooks [Sun, 25 Sep 2005 22:04:48 +0000 (23:04 +0100)]
[ARM] 2934/1: Anubis - fix VA offsets for CPLD registers

Patch from Ben Dooks

The VA addresses of the Anubis CPLD registers
confoict with the addresses for the ISA space
maps used by the rest of the s3c2410 architecture

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
19 years ago[SPARC64]: Fix mask formation in tomatillo_wsync_handler()
David S. Miller [Sun, 25 Sep 2005 06:06:14 +0000 (23:06 -0700)]
[SPARC64]: Fix mask formation in tomatillo_wsync_handler()

"1" needs to be "1UL", this is a 64-bit mask we're creating.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER] ip_conntrack: Update event cache when status changes
Harald Welte [Sat, 24 Sep 2005 23:56:08 +0000 (16:56 -0700)]
[NETFILTER] ip_conntrack: Update event cache when status changes

The GRE, SCTP and TCP protocol helpers did not call
ip_conntrack_event_cache() when updating ct->status.  This patch adds
the respective calls.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[IRDA]: *irttp cleanup
Alexey Dobriyan [Sat, 24 Sep 2005 23:55:17 +0000 (16:55 -0700)]
[IRDA]: *irttp cleanup

* Remove useless comment.
* Remove useless assertions.
* Remove useless comparison.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[IRDA]: Fix memory leak in irttp_init()
Alexey Dobriyan [Sat, 24 Sep 2005 23:54:50 +0000 (16:54 -0700)]
[IRDA]: Fix memory leak in irttp_init()

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: Protect neigh_stat_seq_fops by CONFIG_PROC_FS
Amos Waterland [Sat, 24 Sep 2005 23:53:16 +0000 (16:53 -0700)]
[NET]: Protect neigh_stat_seq_fops by CONFIG_PROC_FS

From: Amos Waterland <apw@us.ibm.com>

If CONFIG_PROC_FS is not selected, the compiler emits this warning:

 net/core/neighbour.c:64: warning: `neigh_stat_seq_fops' defined but not used

Which is correct, because neigh_stat_seq_fops is in fact only
initialized and used by code that is protected by CONFIG_PROC_FS.  So
this patch fixes that up.

Signed-off-by: Amos Waterland <apw@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER]: Fix ip[6]t_NFQUEUE Kconfig dependency
Harald Welte [Sat, 24 Sep 2005 23:52:03 +0000 (16:52 -0700)]
[NETFILTER]: Fix ip[6]t_NFQUEUE Kconfig dependency

We have to introduce a separate Kconfig menu entry for the NFQUEUE targets.
They cannot "just" depend on nfnetlink_queue, since nfnetlink_queue could
be linked into the kernel, whereas iptables can be a module.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years agoMerge master.kernel.org:/home/rmk/linux-2.6-ucb
Linus Torvalds [Sat, 24 Sep 2005 20:50:35 +0000 (13:50 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-ucb

19 years agoMerge master.kernel.org:/home/rmk/linux-2.6-serial
Linus Torvalds [Sat, 24 Sep 2005 20:49:37 +0000 (13:49 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-serial

19 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Sat, 24 Sep 2005 20:49:01 +0000 (13:49 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

19 years ago[PATCH] Input: check switch bitmap when matching handlers
Dmitry Torokhov [Sat, 24 Sep 2005 07:02:29 +0000 (02:02 -0500)]
[PATCH] Input: check switch bitmap when matching handlers

The wwitch bitmap was added to input_device_id structure and we should
check it when matching handlers and input devices.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[ARM] Fix compiler warnings for memcpy_toio/memcpy_fromio/memset_io
Russell King [Sat, 24 Sep 2005 09:42:06 +0000 (10:42 +0100)]
[ARM] Fix compiler warnings for memcpy_toio/memcpy_fromio/memset_io

Add 'volatile' to the __iomem pointers for these functions as
per x86.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
19 years ago[MFD] Fix "bious one-bit signed bitfield" errors
Russell King [Sat, 24 Sep 2005 09:24:37 +0000 (10:24 +0100)]
[MFD] Fix "bious one-bit signed bitfield" errors

ucb1x00-ts declared a couple of one-bit 'int' bitfields.
Make them unsigned.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
19 years ago[SERIAL] Remove unused variable in clps711x.c
Russell King [Sat, 24 Sep 2005 09:12:47 +0000 (10:12 +0100)]
[SERIAL] Remove unused variable in clps711x.c

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
19 years agoMerge branch 'upstream' from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Fri, 23 Sep 2005 23:44:52 +0000 (16:44 -0700)]
Merge branch 'upstream' from /linux/kernel/git/jgarzik/libata-dev

19 years agoMerge branch 'upstream-fixes' from master.kernel.org:/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Fri, 23 Sep 2005 23:44:01 +0000 (16:44 -0700)]
Merge branch 'upstream-fixes' from /linux/kernel/git/jgarzik/netdev-2.6

19 years ago[PATCH] skge: fix Yukon-Lite A0 workaround
Stephen Hemminger [Fri, 23 Sep 2005 16:08:30 +0000 (09:08 -0700)]
[PATCH] skge: fix Yukon-Lite A0 workaround

This is one of those workarounds sucked over from sk98lin driver.
The skge driver needs to detect the Yukon-Lite A0 chip properly,
and turn of Rx FIFO Flush.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
19 years agoMerge /spare/repo/linux-2.6/
Jeff Garzik [Fri, 23 Sep 2005 23:03:21 +0000 (19:03 -0400)]
Merge /spare/repo/linux-2.6/

19 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Fri, 23 Sep 2005 21:01:52 +0000 (14:01 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

19 years ago[ARM] Fix context switch with ARMv6 + TLS
Russell King [Fri, 23 Sep 2005 20:49:58 +0000 (21:49 +0100)]
[ARM] Fix context switch with ARMv6 + TLS

We accidentally corrupted the TLS value when clearing out the ARMv6
exclusive monitor.  Avoid doing so.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
19 years ago[PATCH] revert oversized kmalloc check
Andrew Morton [Fri, 23 Sep 2005 20:24:10 +0000 (13:24 -0700)]
[PATCH] revert oversized kmalloc check

As davem points out, this wasn't such a great idea.  There may be some code
which does:

size = 1024*1024;
while (kmalloc(size, ...) == 0)
size /= 2;

which will now explode.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] documentation: sparse no longer uses bk, but git
Harald Welte [Fri, 23 Sep 2005 20:24:10 +0000 (13:24 -0700)]
[PATCH] documentation: sparse no longer uses bk, but git

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ipmi_msghandler: inconsistent spin_lock usage
Hironobu Ishii [Fri, 23 Sep 2005 20:24:08 +0000 (13:24 -0700)]
[PATCH] ipmi_msghandler: inconsistent spin_lock usage

I found an inconsistent spin_lock usage in ipmi_smi_msg_received.

Signed-off-by: Hironobu Ishii <hishii@soft.fujitsu.com>
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64: Fix huge pages MMU mapping bug
Benjamin Herrenschmidt [Fri, 23 Sep 2005 20:24:07 +0000 (13:24 -0700)]
[PATCH] ppc64: Fix huge pages MMU mapping bug

Current kernel has a couple of sneaky bugs in the ppc64 hugetlb code that
cause huge pages to be potentially left stale in the hash table and TLBs
(improperly invalidated), with all the nasty consequences that can have.

One is that we forgot to set the "secondary" bit in the hash PTEs when
hashing a huge page in the secondary bucket (fortunately very rare).

The other one is on non-LPAR machines (like Apple G5s), flush_hash_range()
which is used to flush a batch of PTEs simply did not work for huge pages.
Historically, our huge page code didn't batch, but this was changed without
fixing this routine.  This patch fixes both.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] atyfb c99 fix
Andrew Morton [Fri, 23 Sep 2005 20:24:06 +0000 (13:24 -0700)]
[PATCH] atyfb c99 fix

- fix this:

  drivers/video/aty/xlinit.c: In function `atyfb_xl_init':
  drivers/video/aty/xlinit.c:256: warning: ISO C90 forbids mixed declarations and code

- repair some kooky coding style

- Use ARRAY_SIZE()

Cc: Tom 'spot' Callaway <tcallawa@redhat.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] hisax: remove URB_ASYNC_UNLINK
Karsten Keil [Fri, 23 Sep 2005 20:24:05 +0000 (13:24 -0700)]
[PATCH] hisax: remove URB_ASYNC_UNLINK

usb_unlink_urb is always async now, so URB_ASYNC_UNLINK was removed from
core USB and we must do as well.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years agoMake sure SIGKILL gets proper respect
Linus Torvalds [Fri, 23 Sep 2005 20:22:21 +0000 (13:22 -0700)]
Make sure SIGKILL gets proper respect

Bhavesh P. Davda <bhavesh@avaya.com> noticed that SIGKILL wouldn't
properly kill a process under just the right cicumstances: a stopped
task that already had another signal queued would get the SIGKILL
queued onto the shared queue, and there it would remain until SIGCONT.

This simplifies the signal acceptance logic, and fixes the bug in the
process.

Losely based on an earlier patch by Bhavesh.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[SPARC64]: Mark functions called by paging_init() as __init.
David S. Miller [Fri, 23 Sep 2005 18:59:44 +0000 (11:59 -0700)]
[SPARC64]: Mark functions called by paging_init() as __init.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[SPARC64]: Kill unused variable in setup_arch()
David S. Miller [Fri, 23 Sep 2005 18:54:43 +0000 (11:54 -0700)]
[SPARC64]: Kill unused variable in setup_arch()

'highest_paddr' is set, but never actually used.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[PATCH] cifs: Add support for suspend
Steve French [Wed, 31 Aug 2005 03:10:14 +0000 (20:10 -0700)]
[PATCH] cifs: Add support for suspend

cifsd had been preventing software suspend from completing.

Signed-off-by: pavel@suse.de
Signed-off-by: Steve French <sfrench@us.ibm.com> lightly modified
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] pci: fixup parent subordinate busnr
Ivan Kokshaysky [Fri, 23 Sep 2005 04:06:31 +0000 (21:06 -0700)]
[PATCH] pci: fixup parent subordinate busnr

I believe the change that broke things is introduction of
pci_fixup_parent_subordinate_busnr().

The patch here does two things:
- hunk #1 should fix the problems you've seen when you boot without
  additional "pci" kernel options;
- hunk #2 supposedly fixes boot with "pci=assign-busses" option which
  otherwise hangs Acer TM81xx machines as reported.

Please try this with and without "pci=assign-busses". If it boots,
I'd like to see 'lspci -vvx' for both cases.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years agoMerge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/shaggy/jfs-2.6
Linus Torvalds [Fri, 23 Sep 2005 14:40:53 +0000 (07:40 -0700)]
Merge branch 'for-linus' of /linux/kernel/git/shaggy/jfs-2.6

19 years agoNTFS: Change ntfs_cluster_free() to require a write locked runlist on entry
Anton Altaparmakov [Fri, 23 Sep 2005 10:24:28 +0000 (11:24 +0100)]
NTFS: Change ntfs_cluster_free() to require a write locked runlist on entry
      since we otherwise get into a lock reversal deadlock if a read locked
      runlist is passed in. In the process also change it to take an ntfs
      inode instead of a vfs inode as parameter.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
19 years ago[PATCH] 8390 Tx fix for non i386 machines
Paul Gortmaker [Fri, 23 Sep 2005 09:18:45 +0000 (05:18 -0400)]
[PATCH] 8390 Tx fix for non i386 machines

While this is true, E8390_CMD is zero on i386, and thus there should be no
effect for these machines.  Machines like Mac, Amiga etc. which use Alan's
clever register mapping may have a non-zero E8390_CMD and result in bogus
"transmitter busy" type messages from this bug.

Fixes BUG# 3991.

19 years ago[SCTP]: Fix SCTP_SHUTDOWN notifications.
Sridhar Samudrala [Fri, 23 Sep 2005 06:48:38 +0000 (23:48 -0700)]
[SCTP]: Fix SCTP_SHUTDOWN notifications.

Fix to allow SCTP_SHUTDOWN notifications to be received on 1-1 style
SCTP SOCK_STREAM sockets.

Add SCTP_SHUTDOWN notification to the receive queue before updating
the state of the association.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER] Fix conntrack event cache deadlock/oops
Harald Welte [Fri, 23 Sep 2005 06:46:57 +0000 (23:46 -0700)]
[NETFILTER] Fix conntrack event cache deadlock/oops

This patch fixes a number of bugs.  It cannot be reasonably split up in
multiple fixes, since all bugs interact with each other and affect the same
function:

Bug #1:
The event cache code cannot be called while a lock is held.  Therefore, the
call to ip_conntrack_event_cache() within ip_ct_refresh_acct() needs to be
moved outside of the locked section.  This fixes a number of 2.6.14-rcX
oops and deadlock reports.

Bug #2:
We used to call ct_add_counters() for unconfirmed connections without
holding a lock.  Since the add operations are not atomic, we could race
with another CPU.

Bug #3:
ip_ct_refresh_acct() lost REFRESH events in some cases where refresh
(and the corresponding event) are desired, but no accounting shall be
performed.  Both, evenst and accounting implicitly depended on the skb
parameter bein non-null.   We now re-introduce a non-accounting
"ip_ct_refresh()" variant to explicitly state the desired behaviour.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER] remove unneeded structure definition from conntrack helper
Harald Welte [Fri, 23 Sep 2005 06:45:44 +0000 (23:45 -0700)]
[NETFILTER] remove unneeded structure definition from conntrack helper

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER] Fix sparse endian warnings in pptp helper
Alexey Dobriyan [Fri, 23 Sep 2005 06:45:24 +0000 (23:45 -0700)]
[NETFILTER] Fix sparse endian warnings in pptp helper

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NETFILTER] fix DEBUG statement in PPTP helper
Harald Welte [Fri, 23 Sep 2005 06:44:58 +0000 (23:44 -0700)]
[NETFILTER] fix DEBUG statement in PPTP helper

As noted by Alexey Dobriyan, the DEBUGP statement prints the wrong
callID.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[BRIDGE]: TSO fix in br_dev_queue_push_xmit
Vlad Drukker [Fri, 23 Sep 2005 06:35:34 +0000 (23:35 -0700)]
[BRIDGE]: TSO fix in br_dev_queue_push_xmit

Signed-off-by: Vlad Drukker <vlad@storewiz.com>
Acked-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TCP]: Adjust Reno SACK estimate in tcp_fragment
Herbert Xu [Fri, 23 Sep 2005 06:32:56 +0000 (23:32 -0700)]
[TCP]: Adjust Reno SACK estimate in tcp_fragment

Since the introduction of TSO pcount a year ago, it has been possible
for tcp_fragment() to cause packets_out to decrease.  Prior to that,
tcp_retrans_try_collapse() was the only way for that to happen on the
retransmission path.

When this happens with Reno, it is possible for sasked_out to become
invalid because it is only an estimate and not tied to any particular
packet on the retransmission queue.

Therefore we need to adjust sacked_out as well as left_out in the Reno
case.  The following patch does exactly that.

This bug is pretty difficult to trigger in practice though since you
need a SACKless peer with a retransmission that occurs just as the
cached MTU value expires.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[PATCH] Add dm-snapshot tutorial in Documentation
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:29 +0000 (21:44 -0700)]
[PATCH] Add dm-snapshot tutorial in Documentation

I've recently discovered the real functionality of device-mapper snapshots,
and since they are not well known, I've decided to write some docs for
them.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] NFS: fix client oops when debugging is on
Nick Wilson [Fri, 23 Sep 2005 04:44:28 +0000 (21:44 -0700)]
[PATCH] NFS: fix client oops when debugging is on

nfs_readpage_release() causes an oops while accessing a file with NFS
debugging turned on (echo 32767 > /proc/sys/sunrpc/nfs_debug) and a kernel
built with CONFIG_DEBUG_SLAB.

This patch moves the debugging statement above nfs_release_request() to
avoid accessing freed memory.

Signed-off-by: Nick Wilson <njw@osdl.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Fix bd_claim() error code.
Rob Landley [Fri, 23 Sep 2005 04:44:27 +0000 (21:44 -0700)]
[PATCH] Fix bd_claim() error code.

Problem: In some circumstances, bd_claim() is returning the wrong error
code.

If we try to swapon an unused block device that isn't swap formatted, we
get -EINVAL.  But if that same block device is already mounted, we instead
get -EBUSY, even though it still isn't a valid swap device.

This issue came up on the busybox list trying to get the error message
from "swapon -a" right.  If a swap device is already enabled, we get -EBUSY,
and we shouldn't report this as an error.  But we can't distinguish the two
-EBUSY conditions, which are very different errors.

In the code, bd_claim() returns either 0 or -EBUSY, but in this case busy
means "somebody other than sys_swapon has already claimed this", and
_that_ means this block device can't be a valid swap device.  So return
-EINVAL there.

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ext3: EXT3_DEBUG build fixes
Glauber de Oliveira Costa [Fri, 23 Sep 2005 04:44:26 +0000 (21:44 -0700)]
[PATCH] ext3: EXT3_DEBUG build fixes

Fix some warnings and a build error when EXT3_DEBUG is enabled.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] oss: don't concatenate __FUNCTION__ with strings
Clemens Buchacher [Fri, 23 Sep 2005 04:44:24 +0000 (21:44 -0700)]
[PATCH] oss: don't concatenate __FUNCTION__ with strings

It's deprecated. Use "%s", __FUNCTION__ instead.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] xtensa: remove io_remap_page_range and minor clean-ups
Chris Zankel [Fri, 23 Sep 2005 04:44:23 +0000 (21:44 -0700)]
[PATCH] xtensa: remove io_remap_page_range and minor clean-ups

Remove io_remap_page_range() from all of Linux 2.6.x (as requested and
suggested by Randy Dunlap) and minor clean-ups.

Signed-off-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: replace printk with "stack-friendly" printf - to report console failure
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:22 +0000 (21:44 -0700)]
[PATCH] uml: replace printk with "stack-friendly" printf - to report console failure

User get *a lot* confused when consoles don't work but we don't report
anything.  And, as reported in the comment, using printk to report "your
console doesn't work" isn't likely to go that far.

Fix the problem on the base of this: stack consumption by host printf().  Use
kernel sprintf() and os_write_file, using a wild guess that one page will be
enough for the message, to preallocate the buffer with kmalloc().

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: use GFP_ATOMIC for allocations under spinlocks.
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:21 +0000 (21:44 -0700)]
[PATCH] uml: use GFP_ATOMIC for allocations under spinlocks.

setup_initial_poll is only called with sigio_lock() held, so use appropriate
allocation.

Also, parse_chan() can also be called when holding a spinlock (see line_open()
 -> parse_chan_pair()).

I have sporadic problems (spinlock taken twice, with spinlock debugging on UP)
which could be caused by a sequence like "take spinlock, alloc and go to
sleep, take again the spinlock in the other thread".

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: Fix GFP_ flags usage
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:20 +0000 (21:44 -0700)]
[PATCH] uml: Fix GFP_ flags usage

GFP_ATOMIC | GFP_KERNEL is meaningless and won't work.  Actually it never
worked, even in 2.4.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: avoid fixing faults while atomic
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:20 +0000 (21:44 -0700)]
[PATCH] uml: avoid fixing faults while atomic

Following i386, we should maybe refuse trying to fault in pages when we're
doing atomic operations, because to handle the fault we could need to take
already taken spinlocks.

Also, if we're doing an atomic operation (in the sense of in_atomic()) we're
surely in kernel mode and we're surely going to handle adequately the failed
fault, so it's safe to behave this way.

Currently, on UML SMP is rarely used, and we don't support PREEMPT, so this is
unlikely to create problems right now, but it might in the future.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: run mconsole "sysrq" in process context
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:19 +0000 (21:44 -0700)]
[PATCH] uml: run mconsole "sysrq" in process context

Things are breaking horribly with sysrq called in interrupt context.  I want
to try to fix it, but probably this is simpler.  To tell the truth, sysrq is
normally run in interrupt context, so there shouldn't be any problem.

There's also a warning from the fault handler because it's run in atomic
context (I have a patch for that, only I deferred it).  This is why I'm doing
this.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: fix condition in tlb flush
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:18 +0000 (21:44 -0700)]
[PATCH] uml: fix condition in tlb flush

Avoid setting w = 0 twice.  Spotted this (trivial) thing which is needed for
another patch.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: fix hang in TT mode on fault
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:16 +0000 (21:44 -0700)]
[PATCH] uml: fix hang in TT mode on fault

The current code doesn't handle well general protection faults on the host -
it thinks that cr2 is always the address of a page fault.  While actually, on
general protection faults, that address is not accessible, so we'd better
assume we couldn't satisfy the fault.  Currently instead we think we've fixed
it, so we go back, retry the instruction and fault again endlessly.

This leads to the kernel hanging when doing copy_from_user(dest, -1, ...) in
TT mode, since reading *(-1) causes a GFP, and we don't support kernel
preemption.

Thanks to Luo Xin for testing UML with LTP and reporting the failures he got.

Cc: Luo Xin <luothing@sina.com>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] uml: don't redundantly mark pte as newpage in pte_modify
Paolo 'Blaisorblade' Giarrusso [Fri, 23 Sep 2005 04:44:15 +0000 (21:44 -0700)]
[PATCH] uml: don't redundantly mark pte as newpage in pte_modify

pte_modify marks a page as needing flush, which is redundant because the
resulting PTE is still set with set_pte, which already handles that.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>