powerpc.git
16 years ago[PPP] pppoe: Fill in header directly in __pppoe_xmit
Herbert Xu [Sun, 16 Sep 2007 23:20:21 +0000 (16:20 -0700)]
[PPP] pppoe: Fill in header directly in __pppoe_xmit

This patch removes the hdr variable (which is copied into the skb)
and instead sets the header directly in the skb.

It also uses __skb_push instead of skb_push since we've just checked
using skb_cow for enough head room.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PPP] pppoe: Fix data clobbering in __pppoe_xmit and return value
Herbert Xu [Sun, 16 Sep 2007 23:19:50 +0000 (16:19 -0700)]
[PPP] pppoe: Fix data clobbering in __pppoe_xmit and return value

The function __pppoe_xmit modifies the skb data and therefore it needs
to copy and skb data if it's cloned.

In fact, it currently allocates a new skb so that it can return 0 in
case of error without freeing the original skb.  This is totally wrong
because returning zero is meant to indicate congestion whereupon pppoe
is supposed to wake up the upper layer once the congestion subsides.

This makes sense for ppp_async and ppp_sync but is out-of-place for
pppoe.  This patch makes it always return 1 and free the skb.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PPP] pppoe: Fix skb_unshare_check call position
Herbert Xu [Sun, 16 Sep 2007 23:19:20 +0000 (16:19 -0700)]
[PPP] pppoe: Fix skb_unshare_check call position

The skb_unshare_check call needs to be made before pskb_may_pull,
not after.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Convert bind_addr_list locking to RCU
Vlad Yasevich [Sun, 16 Sep 2007 23:03:28 +0000 (16:03 -0700)]
[SCTP]: Convert bind_addr_list locking to RCU

Since the sctp_sockaddr_entry is now RCU enabled as part of
the patch to synchronize sctp_localaddr_list, it makes sense to
change all handling of these entries to RCU.  This includes the
sctp_bind_addrs structure and it's list of bound addresses.

This list is currently protected by an external rw_lock and that
looks like an overkill.  There are only 2 writers to the list:
bind()/bindx() calls, and BH processing of ASCONF-ACK chunks.
These are already seriealized via the socket lock, so they will
not step on each other.  These are also relatively rare, so we
should be good with RCU.

The readers are varied and they are easily converted to RCU.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Sridhar Samdurala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Add RCU synchronization around sctp_localaddr_list
Vlad Yasevich [Sun, 16 Sep 2007 23:02:12 +0000 (16:02 -0700)]
[SCTP]: Add RCU synchronization around sctp_localaddr_list

sctp_localaddr_list is modified dynamically via NETDEV_UP
and NETDEV_DOWN events, but there is not synchronization
between writer (even handler) and readers.  As a result,
the readers can access an entry that has been freed and
crash the sytem.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Sridhar Samdurala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKT_SCHED]: sch_cbq.c: Shut up uninitialized variable warning
Satyam Sharma [Sun, 16 Sep 2007 21:54:05 +0000 (14:54 -0700)]
[PKT_SCHED]: sch_cbq.c: Shut up uninitialized variable warning

net/sched/sch_cbq.c: In function 'cbq_enqueue':
net/sched/sch_cbq.c:383: warning: 'ret' may be used uninitialized in this function

has been verified to be a bogus case. So let's shut it up.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKTGEN]: srcmac fix
Adit Ranadive [Sun, 16 Sep 2007 21:52:15 +0000 (14:52 -0700)]
[PKTGEN]: srcmac fix

From: Adit Ranadive <adit.262@gmail.com>

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Fix source address selection.
Jiri Kosina [Sun, 16 Sep 2007 21:48:21 +0000 (14:48 -0700)]
[IPV6]: Fix source address selection.

The commit 95c385 broke proper source address selection for cases in which
there is a address which is makred 'deprecated'. The commit mistakenly
changed ifa->flags to ifa_result->flags (probably copy/paste error from a
few lines above) in the 'Rule 3' address selection code.

The patch restores the previous RFC-compliant behavior.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Warn user if cpu is ignored.
David S. Miller [Sun, 16 Sep 2007 21:45:06 +0000 (14:45 -0700)]
[SPARC64]: Warn user if cpu is ignored.

When NR_CPUS is smaller than the cpu probed, let the user
know that the cpu won't be used.

Suggested by Al Viro.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Fix lockdep, particularly on SMP.
David S. Miller [Sun, 16 Sep 2007 18:51:15 +0000 (11:51 -0700)]
[SPARC64]: Fix lockdep, particularly on SMP.

As noted by Al Viro, when we try to call prom_set_trap_table()
in the SMP trampoline code we try to take the PROM call spinlock
which doesn't work because the current thread pointer isn't
valid yet and lockdep depends upon that being correct.

Furthermore, we cannot set the current thread pointer register
because it can't be properly dereferenced until we return from
prom_set_trap_table().  Kernel TLB misses only work after that
call.

So do the PROM call to set the trap table directly instead of
going through the OBP library C code, and thus avoid the lock
altogether.

These calls are guarenteed to be serialized fully.

Since there are now no calls to the prom_set_trap_table{_sun4v}()
library functions, they can be deleted.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Update defconfig.
David S. Miller [Sun, 16 Sep 2007 16:52:36 +0000 (09:52 -0700)]
[SPARC64]: Update defconfig.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoclockevents: prevent stale tick update on offline cpu
Thomas Gleixner [Sun, 16 Sep 2007 13:36:43 +0000 (15:36 +0200)]
clockevents: prevent stale tick update on offline cpu

Taking a cpu offline removes the cpu from the online mask before the
CPU_DEAD notification is done. The clock events layer does the cleanup
of the dead CPU from the CPU_DEAD notifier chain. tick_do_timer_cpu is
used to avoid xtime lock contention by assigning the task of jiffies
xtime updates to one CPU. If a CPU is taken offline, then this
assignment becomes stale. This went unnoticed because most of the time
the offline CPU went dead before the online CPU reached __cpu_die(),
where the CPU_DEAD state is checked. In the case that the offline CPU did
not reach the DEAD state before we reach __cpu_die(), the code in there
goes to sleep for 100ms. Due to the stale time update assignment, the
system is stuck forever.

Take the assignment away when a cpu is not longer in the cpu_online_mask.
We do this in the last call to tick_nohz_stop_sched_tick() when the offline
CPU is on the way to the final play_dead() idle entry.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoclockevents: do not shutdown the oneshot broadcast device
Thomas Gleixner [Sun, 16 Sep 2007 13:36:43 +0000 (15:36 +0200)]
clockevents: do not shutdown the oneshot broadcast device

When a cpu goes offline it is removed from the broadcast masks. If the
mask becomes empty the code shuts down the broadcast device. This is
wrong, because the broadcast device needs to be ready for the online
cpu going idle (into a c-state, which stops the local apic timer).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoclockevents: Enforce oneshot broadcast when broadcast mask is set on resume
Thomas Gleixner [Sun, 16 Sep 2007 13:36:43 +0000 (15:36 +0200)]
clockevents: Enforce oneshot broadcast when broadcast mask is set on resume

The jinxed VAIO refuses to resume without hitting keys on the keyboard
when this is not enforced. It is unclear why the cpu ends up in a lower
C State without notifying the clock events layer, but enforcing the
oneshot broadcast here is safe.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoACPI: Reevaluate C/P/T states when a cpu becomes online
Venkatesh Pallipadi [Sun, 16 Sep 2007 13:36:43 +0000 (15:36 +0200)]
ACPI: Reevaluate C/P/T states when a cpu becomes online

Reevaluate C/P/T states when a cpu becomes online. This avoids
the caching of the broadcast information in the clockevents layer.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Len Brown <len.brown@intel.com>
16 years agotimekeeping: Prevent time going backwards on resume
Thomas Gleixner [Sun, 16 Sep 2007 13:36:43 +0000 (15:36 +0200)]
timekeeping: Prevent time going backwards on resume

Timekeeping resume adjusts xtime by adding the slept time in seconds and
resets the reference value of the clock source (clock->cycle_last).
clock->cycle last is used to calculate the delta between the last xtime
update and the readout of the clock source in __get_nsec_offset(). xtime
plus the offset is the current time. The resume code ignores the delta
which had already elapsed between the last xtime update and the actual
time of suspend. If the suspend time is short, then we can see time
going backwards on resume.

Suspend:
offs_s = clock->read() - clock->cycle_last;
now = xtime + offs_s;
timekeeping_suspend_time = read_rtc();

Resume:
sleep_time = read_rtc() - timekeeping_suspend_time;
xtime.tv_sec += sleep_time;
clock->cycle_last = clock->read();
offs_r = clock->read() - clock->cycle_last;
now = xtime + offs_r;

if sleep_time_seconds == 0 and offs_r < offs_s, then time goes
backwards.

Fix this by storing the offset from the last xtime update and add it to
xtime during resume, when we reset clock->cycle_last:

sleep_time = read_rtc() - timekeeping_suspend_time;
xtime.tv_sec += sleep_time;
xtime += offs_s; /* Fixup xtime offset at suspend time */
clock->cycle_last = clock->read();
offs_r = clock->read() - clock->cycle_last;
now = xtime + offs_r;

Thanks to Marcelo for tracking this down on the OLPC and providing the
necessary details to analyze the root cause.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Tosatti <marcelo@kvack.org>
16 years agotimekeeping: access rtc outside of xtime lock
Thomas Gleixner [Sun, 16 Sep 2007 13:36:43 +0000 (15:36 +0200)]
timekeeping: access rtc outside of xtime lock

Lockdep complains about the access of rtc in timekeeping_suspend
inside the interrupt disabled region of the write locked xtime lock.
Move the access outside.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <johnstul@us.ibm.com>
16 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Sun, 16 Sep 2007 00:35:57 +0000 (17:35 -0700)]
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:
  drivers/net/pcmcia/3c589_cs: fix port configuration switcheroo
  sk98lin: resurrect driver
  ucc_geth: fix compilation
  mv643xx_eth: Fix tx_bytes stats calculation
  As struct iw_point is bi-directional payload, we should copy back the content
  [PATCH] bcm43xx: Fix cancellation of work queue crashes
  spidernet: fix interrupt reason recognition
  ehea: fix last_rx update
  ehea: propagate physical port state
  Fix a lock problem in generic phy code
  sky2: restore multicast list on resume and other ops
  atl1: disable broken 64-bit DMA

16 years agodrivers/net/pcmcia/3c589_cs: fix port configuration switcheroo
Jeff Garzik [Sat, 15 Sep 2007 23:41:43 +0000 (19:41 -0400)]
drivers/net/pcmcia/3c589_cs: fix port configuration switcheroo

10base2 and 10baseT were accidentally switched.

Noticed by Andreas HÃŒbner, forwarded by Alan Cox.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosk98lin: resurrect driver
Stephen Hemminger [Sat, 15 Sep 2007 23:35:14 +0000 (19:35 -0400)]
sk98lin: resurrect driver

This reverts commit e1abecc48938fbe1966ea6e78267fc673fa59295.

The driver works on some hardware that skge doesn't handle yet.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoucc_geth: fix compilation
Anton Vorontsov [Thu, 13 Sep 2007 15:23:33 +0000 (19:23 +0400)]
ucc_geth: fix compilation

Currently qe_bd_t is used in the macro call -- dma_unmap_single,
which is a no-op on PPC32, thus error is hidden today. Starting
with 2.6.24, macro will be replaced by the empty static function,
and erroneous use of qe_bd_t will trigger compilation error.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agomv643xx_eth: Fix tx_bytes stats calculation
Dale Farnsworth [Fri, 14 Sep 2007 18:23:16 +0000 (11:23 -0700)]
mv643xx_eth: Fix tx_bytes stats calculation

Reported by Corey Minyard <cminyard@mvista.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoMerge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linvill...
Jeff Garzik [Sat, 15 Sep 2007 23:29:07 +0000 (19:29 -0400)]
Merge branch 'fixes-jgarzik' of git://git./linux/kernel/git/linville/wireless-2.6 into upstream-fixes

16 years agosparc64 (and others): fix tty_ioctl.c build
Tony Breeds [Sat, 15 Sep 2007 00:03:01 +0000 (17:03 -0700)]
sparc64 (and others): fix tty_ioctl.c build

Add Guards around TIOCSLCKTRMIOS and TIOCGLCKTRMIOS.

Several architectures are still broken.  Put temporary-for-2.6.23 ifdef guards
around the offending code.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by:: Linus Torvalds <torvalds@linux-foundation.org>

16 years ago[IPV4]: Just increment OutDatagrams once per a datagram.
YOSHIFUJI Hideaki [Sat, 15 Sep 2007 00:15:19 +0000 (17:15 -0700)]
[IPV4]: Just increment OutDatagrams once per a datagram.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Just increment OutDatagrams once per a datagram.
YOSHIFUJI Hideaki [Sat, 15 Sep 2007 00:15:01 +0000 (17:15 -0700)]
[IPV6]: Just increment OutDatagrams once per a datagram.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge git://git.linux-xtensa.org/kernel/xtensa-feed
Linus Torvalds [Sat, 15 Sep 2007 00:07:33 +0000 (17:07 -0700)]
Merge git://git.linux-xtensa.org/kernel/xtensa-feed

* git://git.linux-xtensa.org/kernel/xtensa-feed:
  [patch 1/2] Xtensa: enable arbitary tty speed setting ioctls
  [patch 2/2] xtensa console.c: remove duplicate #include
  [XTENSA] Add support for cache-aliasing
  [XTENSA] Add kernel module support
  [XTENSA] Add support for executable/non-executable feature in the mmu
  [XTENSA] Use the generic version of get_order
  [XTENSA] Initialize semaphore_wake_lock
  [XTENSA] Add typecast macro for constants
  [XTENSA] Fix timer instabilities.
  [XTENSA] Fix fadvise64_64
  [XTENSA] Remove extraneous include statement
  [XTENSA] Move string-io functions to io.c from pci.c
  [XTENSA] Move pre-initialized structures to init_task.c
  [XTENSA] Add freestanding option to CFLAGS
  [XTENSA] Add getpgrp system-call to unistd.h
  [XTENSA] add missing system calls
  [XTENSA] fix wrong usage of __init and __initdata in traps.c

16 years ago[IPV6]: Fix unbalanced socket reference with MSG_CONFIRM.
YOSHIFUJI Hideaki [Fri, 14 Sep 2007 23:45:40 +0000 (16:45 -0700)]
[IPV6]: Fix unbalanced socket reference with MSG_CONFIRM.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET_SCHED] protect action config/dump from irqs
Jamal Hadi Salim [Wed, 12 Sep 2007 14:32:59 +0000 (16:32 +0200)]
[NET_SCHED] protect action config/dump from irqs

(with no apologies to C Heston)

On Mon, 2007-10-09 at 21:00 +0800, Herbert Xu wrote:
On Sun, Sep 02, 2007 at 01:11:29PM +0000, Christian Kujau wrote:
> >
> > after upgrading to 2.6.23-rc5 (and applying davem's fix [0]), lockdep
> > was quite noisy when I tried to shape my external (wireless) interface:
> >
> > [ 6400.534545] FahCore_78.exe/3552 just changed the state of lock:
> > [ 6400.534713]  (&dev->ingress_lock){-+..}, at: [<c038d595>]
> > netif_receive_skb+0x2d5/0x3c0
> > [ 6400.534941] but this lock took another, soft-read-irq-unsafe lock in the
> > past:
> > [ 6400.535145]  (police_lock){-.--}
>
> This is a genuine dead-lock.  The police lock can be taken
> for reading with softirqs on.  If a second CPU tries to take
> the police lock for writing, while holding the ingress lock,
> then a softirq on the first CPU can dead-lock when it tries
> to get the ingress lock.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Fix two issues wrt. SO_BINDTODEVICE.
David S. Miller [Fri, 14 Sep 2007 23:41:03 +0000 (16:41 -0700)]
[NET]: Fix two issues wrt. SO_BINDTODEVICE.

1) Comments suggest that setting optlen to zero will unbind
   the socket from whatever device it might be attached to.  This
   hasn't been the case since at least 2.2.x because the first thing
   this function does is return -EINVAL if 'optlen' is less than
   sizeof(int).

   This check also means that passing in a two byte string doesn't
   work so well.  It's almost as if this code was testing with "eth?"
   patterned strings and nothing else :-)

   Fix this by breaking the logic of this facility out into a
   seperate function which validates optlen more appropriately.

   The optlen==0 and small string cases now work properly.

2) We should reset the cached route of the socket after we have made
   the device binding changes, not before.

Reported by Ben Greear.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Fri, 14 Sep 2007 21:04:13 +0000 (14:04 -0700)]
Merge branch 'for-linus' of /linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
  Blackfin arch: fix some bugs in lib/string.h functions found by our string testing modules
  Blackfin arch: fix the aliased write macros
  Blackfin arch: Update/Fix PM support add new pm_ops valid

16 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Fri, 14 Sep 2007 21:02:04 +0000 (14:02 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4567/1: Fix 'Oops - undefined instruction' when CONFIG_VFP=y on non VFP device
  [ARM] realview: disable second GIC on RevB MPCore platforms

16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Fri, 14 Sep 2007 21:00:35 +0000 (14:00 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] 20Kc: Disable use of WAIT instruction.
  [MIPS] Workaround for 4Kc machine check exception
  [MIPS] Malta: Fix off by one bug in interrupt handler.
  [MIPS] No ide_default_io_base() if PCI IDE was not found
  [MIPS] Add #include <linux/profile.h> to arch/mips/kernel/time.c
  [MIPS] N32 needs to use compat_sys_futimesat
  [MIPS] rtlx: Fix build error.
  [MIPS] rtlx: fix int vs. long bug.

16 years agoKVM: MMU: Fix rare oops on guest context switch
Avi Kivity [Fri, 14 Sep 2007 17:26:06 +0000 (20:26 +0300)]
KVM: MMU: Fix rare oops on guest context switch

A guest context switch to an uncached cr3 can require allocation of
shadow pages, but we only recycle shadow pages in kvm_mmu_page_fault().

Move shadow page recycling to mmu_topup_memory_caches(), which is called
from both the page fault handler and from guest cr3 reload.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Fri, 14 Sep 2007 20:59:05 +0000 (13:59 -0700)]
Merge branch 'master' of ssh:///linux/kernel/git/mchehab/v4l-dvb

* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (6220a): fix build error for et61x251 driver
  V4L/DVB (6188): Avoid a NULL pointer dereference during mpeg_open()
  V4L/DVB (6173a): Documentation: Remove reference to dead "cpia_pp=" boot-time option
  V4L/DVB (6148): Fix a warning at saa7191_probe
  V4L/DVB (6147): Pwc: Fix a broken debug message
  V4L/DVB (6144): Fix mux setup for composite sound on AverTV 307
  V4L/DVB (6095): ivtv: fix VIDIOC_G_ENC_INDEX flag handling

16 years agoCorrectly close old nfsd/lockd sockets.
Neil Brown [Fri, 14 Sep 2007 14:28:08 +0000 (10:28 -0400)]
Correctly close old nfsd/lockd sockets.

Commit aaf68cfbf2241d24d46583423f6bff5c47e088b3 added a bias
to sk_inuse, so this test for an unused socket now fails.  So no
sockets get closed because they are old (they might get closed
if the client closed them).

This bug has existed since 2.6.21-rc1.

Thanks to Wolfgang Walter for finding and reporting the bug.

Cc: Wolfgang Walter <wolfgang.walter@studentenwerk.mhn.de>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix kernel buuild with (CONFIG_COMPAT && ! CONFIG_BLOCK)
aherrman@arcor.de [Thu, 13 Sep 2007 23:28:56 +0000 (01:28 +0200)]
Fix kernel buuild with (CONFIG_COMPAT && ! CONFIG_BLOCK)

Commit 02a5e0acb3cb85d80d0fe834e366d38a92bbaa22 ("BLOCK: Hide the
contents of linux/bio.h if CONFIG_BLOCK=n") broke the kernel build for
the CONFIG_COMPAT && !CONFIG_BLOCK case:

    CC      fs/compat_ioctl.o
  In file included from include/linux/raid/md_k.h:19,
                   from include/linux/raid/md.h:54,
                   from fs/compat_ioctl.c:25:
  include/linux/raid/../../../drivers/md/dm-bio-list.h: In bio_list_:
  include/linux/raid/../../../drivers/md/dm-bio-list.h:40: error: dereferencing pointer to incomplete type
  include/linux/raid/../../../drivers/md/dm-bio-list.h: In bio_list_:
  include/linux/raid/../../../drivers/md/dm-bio-list.h:48: error: dereferencing pointer to incomplete type
  include/linux/raid/../../../drivers/md/dm-bio-list.h:51: error: dereferencing pointer to incomplete type
  include/linux/raid/../../../drivers/md/dm-bio-list.h: In bio_list_:
  include/linux/raid/../../../drivers/md/dm-bio-list.h:64: error: dereferencing pointer to incomplete type
  include/linux/raid/../../../drivers/md/dm-bio-list.h: In bio_list_merge_:
  include/linux/raid/../../../drivers/md/dm-bio-list.h:78: error: dereferencing pointer to incomplete type
  include/linux/raid/../../../drivers/md/dm-bio-list.h: In bio_list_:
  include/linux/raid/../../../drivers/md/dm-bio-list.h:90: error: dereferencing pointer to incomplete type
  include/linux/raid/../../../drivers/md/dm-bio-list.h:94: error: dereferencing pointer to incomplete type
  make[1]: *** [fs/compat_ioctl.o] Error 1
  make: *** [fs] Error 2

Signed-off-by: Andreas Herrmann <aherrman@arcor.de>
Acked-By: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoshared tag queue barrier comment
Nick Piggin [Fri, 14 Sep 2007 06:41:12 +0000 (08:41 +0200)]
shared tag queue barrier comment

Should add some comments for the tag barriers (they won't be so important
if we can switch over to the explicit _lock bitops, but for now we should
make it clear).

Jens' original patch said a barrier after the test_and_clear_bit was also
required. I can't see why (and it would prevent the use of the _lock bitop).

Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
--

16 years agoAs struct iw_point is bi-directional payload, we should copy back the content
Masakazu Mokuno [Fri, 14 Sep 2007 18:35:38 +0000 (14:35 -0400)]
As struct iw_point is bi-directional payload, we should copy back the content
on return from ioctl calls

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[PATCH] bcm43xx: Fix cancellation of work queue crashes
Larry Finger [Tue, 4 Sep 2007 19:14:20 +0000 (14:14 -0500)]
[PATCH] bcm43xx: Fix cancellation of work queue crashes

A crash upon booting that is caused by bcm43xx has been reported [1] and
found to be due to a work queue being reinitialized while work on that
queue is still pending. This fix modifies the shutdown of work queues and
prevents periodic work from being requeued during shutdown. With this patch,
no more crashes on reboot were observed by the original reporter. I do not
get that particular failure on my system; however, when running a large
number of ifdown/ifup sequences, my system would kernel panic with the
'caps lock' light blinking at roughly a 1 Hz rate. In addition, there were
infrequent failures in the firmware that resulted in 'IRQ READY TIMEOUT'
errors. With this patch, no more of the first type of failure occur, and
incidence of the second type is greatly reduced.

[1] http://bugzilla.kernel.org/show_bug.cgi?id=8937

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[MIPS] 20Kc: Disable use of WAIT instruction.
Ralf Baechle [Fri, 14 Sep 2007 18:08:43 +0000 (19:08 +0100)]
[MIPS] 20Kc: Disable use of WAIT instruction.

Another issue with 20Kc's WAIT, waiting for more details.  With the
2.6.23 release immindent simply disable the use of WAIT instead of a
more fancy workaround.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Workaround for 4Kc machine check exception
Maciej W. Rozycki [Wed, 23 Aug 2006 13:26:50 +0000 (14:26 +0100)]
[MIPS] Workaround for 4Kc machine check exception

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Malta: Fix off by one bug in interrupt handler.
Ralf Baechle [Thu, 13 Sep 2007 16:36:22 +0000 (17:36 +0100)]
[MIPS] Malta: Fix off by one bug in interrupt handler.

Fairly cosmetic as it would only affect VSMP / SMTC kernels that don't
use vectored interrupts.

Found by Beth.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] No ide_default_io_base() if PCI IDE was not found
Atsushi Nemoto [Tue, 4 Sep 2007 14:02:02 +0000 (23:02 +0900)]
[MIPS] No ide_default_io_base() if PCI IDE was not found

Revert b5438582090406e2ccb4169d9b2df7c9939ae42b and add
no_pci_devices() check to avoid crash due to early calling of
pci_get_class().

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Add #include <linux/profile.h> to arch/mips/kernel/time.c
Yoichi Yuasa [Thu, 13 Sep 2007 04:13:28 +0000 (13:13 +0900)]
[MIPS] Add #include <linux/profile.h> to arch/mips/kernel/time.c

It refer to CPU_PROFILING.

arch/mips/kernel/time.c: In function 'local_timer_interrupt':
arch/mips/kernel/time.c:142: error: implicit declaration of function 'profile_tick'
arch/mips/kernel/time.c:142: error: 'CPU_PROFILING' undeclared (first use in this function)
arch/mips/kernel/time.c:142: error: (Each undeclared identifier is reported only once
arch/mips/kernel/time.c:142: error: for each function it appears in.)

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] N32 needs to use compat_sys_futimesat
Johannes Dickgreber [Wed, 12 Sep 2007 16:22:04 +0000 (18:22 +0200)]
[MIPS] N32 needs to use compat_sys_futimesat

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] rtlx: Fix build error.
Ralf Baechle [Wed, 12 Sep 2007 15:32:54 +0000 (16:32 +0100)]
[MIPS] rtlx: Fix build error.

  CC      arch/mips/kernel/rtlx.o
cc1: warnings being treated as errors
arch/mips/kernel/rtlx.c:59: warning: 'irq' defined but not used
arch/mips/kernel/rtlx.c:60: warning: 'irq_num' defined but not used

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] rtlx: fix int vs. long bug.
Ralf Baechle [Wed, 12 Sep 2007 15:31:12 +0000 (16:31 +0100)]
[MIPS] rtlx: fix int vs. long bug.

  CC      arch/mips/kernel/rtlx.o
arch/mips/kernel/rtlx.c: In function 'rtlx_init':
arch/mips/kernel/rtlx.c:114: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'long unsigned int'

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agoV4L/DVB (6220a): fix build error for et61x251 driver
Linus Torvalds [Fri, 14 Sep 2007 00:09:01 +0000 (21:09 -0300)]
V4L/DVB (6220a): fix build error for et61x251 driver

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6188): Avoid a NULL pointer dereference during mpeg_open()
Steven Toth [Fri, 7 Sep 2007 01:48:35 +0000 (22:48 -0300)]
V4L/DVB (6188): Avoid a NULL pointer dereference during mpeg_open()

Bug: With a hardware encoder board installed as cx88[1] and a
non-encoder boards installed as cx88[0], an OOPS is generated
during cx8802_get_device() called from mpeg_open().

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6173a): Documentation: Remove reference to dead "cpia_pp=" boot-time option
Robert P. J. Day [Mon, 3 Sep 2007 12:35:04 +0000 (09:35 -0300)]
V4L/DVB (6173a): Documentation: Remove reference to dead "cpia_pp=" boot-time option

Since this boot-time option was removed in commit
9ab7e323af9f9efad3e20a14faa4d947adfac381, delete the reference to it.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6148): Fix a warning at saa7191_probe
Mauro Carvalho Chehab [Mon, 3 Sep 2007 15:01:51 +0000 (12:01 -0300)]
V4L/DVB (6148): Fix a warning at saa7191_probe

saa7191.c: In function 'saa7191_probe':
saa7191.c:596: warning: passing argument 3 of
'saa7191_write_block' discards qualifiers from pointer target type

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6147): Pwc: Fix a broken debug message
Jean Delvare [Mon, 3 Sep 2007 14:51:51 +0000 (11:51 -0300)]
V4L/DVB (6147): Pwc: Fix a broken debug message

Commit 85237f202d46d55c1bffe0c5b1aa3ddc0f1dce4d introduced the
following warning (with CONFIG_USB_PWC_DEBUG=y):
drivers/media/video/pwc/pwc-if.c: In function "pwc_video_close":
drivers/media/video/pwc/pwc-if.c:1211: warning: "i" may be used uninitialized in this function

This is true, and can cause a broken debug message to be logged.
Here's a fix.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6144): Fix mux setup for composite sound on AverTV 307
Stas Sergeev [Sun, 2 Sep 2007 06:56:18 +0000 (03:56 -0300)]
V4L/DVB (6144): Fix mux setup for composite sound on AverTV 307

Right now the composite sound input doesn't work on AverTV 307 because of
the wrong mux setup.  The composite sound is routed via an external
4channel multiplexer controlled by GPIO, while the code assumes an internal
multiplexer instead.

Presumably this was a copy/paste error, and noone have ever tested the
functionality.

With the attached patch it works properly, which gives me an ability to
finally watch the cable TV under linux.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6095): ivtv: fix VIDIOC_G_ENC_INDEX flag handling
Hans Verkuil [Thu, 23 Aug 2007 20:48:41 +0000 (17:48 -0300)]
V4L/DVB (6095): ivtv: fix VIDIOC_G_ENC_INDEX flag handling

Due to a documentation bug (the type mask is 3 bits long, not 2) the wrong
frame types were filled in: the B and P frame types were swapped.

This bug also hid a second bug: when a capture is stopped a last entry is
written into the pgm index buffer with internal type 0, denoting the end
of the program. This entry wasn't ignored, instead it was accidentally
returned to the caller as a P frame.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years ago[POWERPC] MPC832x_RDB: Update dts to use SPI1 in QE, register mmc_spi stub
Anton Vorontsov [Thu, 23 Aug 2007 11:36:00 +0000 (15:36 +0400)]
[POWERPC] MPC832x_RDB: Update dts to use SPI1 in QE, register mmc_spi stub

Enabled using SPI controller on the MPC832x RDB board.  We currently use
a modalias of "spidev" as a place holder (replace with "mmc_spie") until
the mmc_spi driver support is merged in.

This gets us the ability to test SPI until then.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] fsl_soc: add support for fsl_spi
Anton Vorontsov [Thu, 23 Aug 2007 11:35:56 +0000 (15:35 +0400)]
[POWERPC] fsl_soc: add support for fsl_spi

Add helper function to setup SPI bus/device information

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 52xx: Fix mpc52xx_uart_of_assign to use correct index
John Rigby [Wed, 23 May 2007 17:30:55 +0000 (11:30 -0600)]
[POWERPC] 52xx: Fix mpc52xx_uart_of_assign to use correct index

Use idx as index into mpc52xx_uart_nodes instead of i

Signed-off-by: John Rigby <jrigby@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 86xx: Fix definition of global-utilites structure
Timur Tabi [Wed, 25 Jul 2007 17:30:33 +0000 (12:30 -0500)]
[POWERPC] 86xx: Fix definition of global-utilites structure

The current definition of struct ccsr_guts in immap_86xx.h was for 85xx.
This patch fixes that and replaces the vague integer types with sized types
of the correct endianness.  The unused struct ccsr_pci is also deleted.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] add clrsetbits macros
Timur Tabi [Thu, 23 Aug 2007 01:07:28 +0000 (20:07 -0500)]
[POWERPC] add clrsetbits macros

This patch adds the clrsetbits_xxx() macros, which are used to set and clear
multiple bits in a single read-modify-write operation.  Specify the bits to
clear in the 'clear' parameter and the bits to set in the 'set' parameter.
These macros can also be used to set a multiple-bit bit pattern using a mask,
by specifying the mask in the 'clear' parameter and the new bit pattern in the
'set' parameter.  There are big-endian and little-endian versions for 8, 16,
32, and 64 bits.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] QE: extern par_io_config_pin and par_io_data_set funcs
Anton Vorontsov [Thu, 23 Aug 2007 11:35:53 +0000 (15:35 +0400)]
[POWERPC] QE: extern par_io_config_pin and par_io_data_set funcs

This is needed to configure and control QE pario pins from the kernel.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[PPC] Add clrbits8 and setbits8.
Scott Wood [Tue, 28 Aug 2007 20:16:49 +0000 (15:16 -0500)]
[PPC] Add clrbits8 and setbits8.

These I/O accessors will be used in code under drivers/,
which is expected to still work in arch/ppc.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Fix modpost warnings from head*.S on ppc32
Kumar Gala [Thu, 13 Sep 2007 20:42:35 +0000 (15:42 -0500)]
[POWERPC] Fix modpost warnings from head*.S on ppc32

We get warnings like the following from the various ppc32 head*.S files:

WARNING: vmlinux.o(.text+0x358): Section mismatch: reference to .init.text:early_init (between 'skpinv' and 'interrupt_base')
WARNING: vmlinux.o(.text+0x380): Section mismatch: reference to .init.text:machine_init (between 'skpinv' and 'interrupt_base')
WARNING: vmlinux.o(.text+0x384): Section mismatch: reference to .init.text:MMU_init (between 'skpinv' and 'interrupt_base')
WARNING: vmlinux.o(.text+0x3aa): Section mismatch: reference to .init.text:start_kernel (between 'skpinv' and 'interrupt_base')
WARNING: vmlinux.o(.text+0x3ae): Section mismatch: reference to .init.text:start_kernel (between 'skpinv' and 'interrupt_base')

Added a .text.head section simliar to what other architectures do since
modpost already excludes this from its warnings.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Add cpu feature for SPE handling
Kumar Gala [Thu, 13 Sep 2007 06:44:20 +0000 (01:44 -0500)]
[POWERPC] Add cpu feature for SPE handling

Make it so that SPE support can be determined at runtime.  This is similiar
to how we handle AltiVec.  This allows us to have SPE support built in and
work on processors with and without SPE.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: Removed PCI exclude of PHB
Kumar Gala [Thu, 13 Sep 2007 03:14:10 +0000 (22:14 -0500)]
[POWERPC] 83xx: Removed PCI exclude of PHB

Now that the generic code doesn't assign resources for Freescale
PHBs we dont have to explicitly exclude it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Move PCI nodes to be sibilings with SOC nodes
Kumar Gala [Wed, 12 Sep 2007 23:23:46 +0000 (18:23 -0500)]
[POWERPC] Move PCI nodes to be sibilings with SOC nodes

Updated the device trees to have the PCI nodes be at the same level as
the SOC node.  This is to make it so that the SOC nodes children address
space is just on chip registers and not other bus memory as well.

Also, for PCIe nodes added a P2P bridge to handle the virtual P2P bridge
that exists in the PHB.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] DTS cleanup
Kumar Gala [Wed, 12 Sep 2007 16:52:31 +0000 (11:52 -0500)]
[POWERPC] DTS cleanup

Removed the following cruft from .dts files:
* 32-bit in cpu node -- doesn't exist in any spec and not used by kernel
* removed built-in (chrp legacy)
* Removed #interrupt-cells in places they don't need to be set
* Fixed ranges on lite5200*
* Removed clock-frequency from i8259 pic node, not sure where this came from
* Removed big-endian from i8259 pic nodes, this was just bogus

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 85xx: Add basic Uniprocessor MPC8572 DS port
Kumar Gala [Tue, 11 Sep 2007 06:25:43 +0000 (01:25 -0500)]
[POWERPC] 85xx: Add basic Uniprocessor MPC8572 DS port

Added basic board port for MPC8572 DS reference platform that is
similiar to the MPC8544/33 DS reference platform in uniprocessor mode.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Handle alignment faults on SPE load/store instructions
Kumar Gala [Fri, 24 Aug 2007 21:42:53 +0000 (16:42 -0500)]
[POWERPC] Handle alignment faults on SPE load/store instructions

This adds code to handle alignment traps generated by the following
SPE (signal processing engine) load/store instructions, by emulating
the instruction in the kernel (as is done for other instructions that
generate alignment traps):

evldd[x]         Vector Load Double Word into Double Word [Indexed]
evldw[x]         Vector Load Double into Two Words [Indexed]
evldh[x]         Vector Load Double into Four Half Words [Indexed]
evlhhesplat[x]   Vector Load Half Word into Half Words Even and Splat [Indexed]
evlhhousplat[x]  Vector Load Half Word into Half Word Odd Unsigned and Splat [Indexed]
evlhhossplat[x]  Vector Load Half Word into Half Word Odd Signed and Splat [Indexed]
evlwhe[x]        Vector Load Word into Two Half Words Even [Indexed]
evlwhou[x]       Vector Load Word into Two Half Words Odd Unsigned (zero-extended) [Indexed]
evlwhos[x]       Vector Load Word into Two Half Words Odd Signed (with sign extension) [Indexed]
evlwwsplat[x]    Vector Load Word into Word and Splat [Indexed]
evlwhsplat[x]    Vector Load Word into Two Half Words and Splat [Indexed]
evstdd[x]        Vector Store Double of Double [Indexed]
evstdw[x]        Vector Store Double of Two Words [Indexed]
evstdh[x]        Vector Store Double of Four Half Words [Indexed]
evstwhe[x]       Vector Store Word of Two Half Words from Even [Indexed]
evstwho[x]       Vector Store Word of Two Half Words from Odd [Indexed]
evstwwe[x]       Vector Store Word of Word from Even [Indexed]
evstwwo[x]       Vector Store Word of Word from Odd [Indexed]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] fsl_soc.c cleanup
Scott Wood [Mon, 20 Aug 2007 16:38:12 +0000 (11:38 -0500)]
[POWERPC] fsl_soc.c cleanup

1. Update the way get_brgfreq() finds things in the device tree.

It now uses names that are less namespace polluting.  The old names
are supported until all boards are converted.

2. "size" is changed from unsigned int to int, to match what
of_get_property() expects.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 85xx: Remove unnecessary loops_per_jiffy initialization code.
Jon Loeliger [Fri, 27 Jul 2007 18:24:45 +0000 (13:24 -0500)]
[POWERPC] 85xx: Remove unnecessary loops_per_jiffy initialization code.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 86xx: Remove unnecessary loops_per_jiffy initialization code.
Jon Loeliger [Fri, 27 Jul 2007 18:24:36 +0000 (13:24 -0500)]
[POWERPC] 86xx: Remove unnecessary loops_per_jiffy initialization code.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] linkstation updates
Guennadi Liakhovetski [Sat, 25 Aug 2007 22:08:11 +0000 (00:08 +0200)]
[POWERPC] linkstation updates

1. Fix RTC type - it is a rs5c372a, not rs5c372b
2. Configure both UART interrupts edge-triggered
3. Add a license header to ls_uart.c
4. Check for running on linkstation in a late_initcall() function. Needed
   for multiplatform builds, even though linkstation doesn't support them
   yet
5. Remove unneeded #include from linkstation.c

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 85xx: Clean up from 85xx_ds rename
Kumar Gala [Fri, 17 Aug 2007 14:26:40 +0000 (09:26 -0500)]
[POWERPC] 85xx: Clean up from 85xx_ds rename

Renamed functions in 85xx_ds from 8544 to 85xx.

Kept an unique machine def/probe for the MPC8544 DS board to
handle some subtle differences between the future board based
on the DS platform.

Also fixed building w/o CONFIG_PCI and minor whitespace fixes.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 85xx: Renamed mpc8544_ds.c to mpc85xx_ds.c
Kumar Gala [Fri, 17 Aug 2007 14:22:09 +0000 (09:22 -0500)]
[POWERPC] 85xx: Renamed mpc8544_ds.c to mpc85xx_ds.c

Renamed the mpc8544_ds.c board code to mpc85xx_ds.c to make it more
generic in prep for other boards based on the same platform.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoucc_geth: kill unused include
Kumar Gala [Thu, 23 Aug 2007 02:49:01 +0000 (21:49 -0500)]
ucc_geth: kill unused include

The ucc_geth_mii code is based on the gianfar_mii code that use to include
ocp.h.  ucc never need this and it causes issues when we want to kill
arch/ppc includes from arch/powerpc.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Thu, 13 Sep 2007 15:43:38 +0000 (08:43 -0700)]
Merge /pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  Revert "usb-storage: implement autosuspend"
  USB: disable autosuspend by default for non-hubs

16 years ago[POWERPC] PS3: Enhance storage probe debug output
Geoff Levand [Wed, 12 Sep 2007 08:43:17 +0000 (18:43 +1000)]
[POWERPC] PS3: Enhance storage probe debug output

Add some more info to the PS3 storage probe debug output.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] PS3: Add new LV1 error codes
Geert Uytterhoeven [Wed, 12 Sep 2007 08:43:16 +0000 (18:43 +1000)]
[POWERPC] PS3: Add new LV1 error codes

Add new error codes that may be returned by the LV1 hypervisor

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] PS3: Fix CONFIG_SMP=n, CONFIG_KEXEC=y build
Jeremy Kerr [Wed, 12 Sep 2007 08:43:15 +0000 (18:43 +1000)]
[POWERPC] PS3: Fix CONFIG_SMP=n, CONFIG_KEXEC=y build

Currently, the ps3 kernel fails to build without smp but with kexec, as
ps3_kexec_cpu_down needs ps3_smp_cleanup_cpu, which isn't defined on UP
kernels. This change adds an empty ps3_smp_cleanup_cpu for UP kernels.

Booted on ps3.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Add workaround for MPICs with broken register reads
Olof Johansson [Fri, 7 Sep 2007 19:13:19 +0000 (05:13 +1000)]
[POWERPC] Add workaround for MPICs with broken register reads

Some versions of PWRficient 1682M have an interrupt controller in which
the first register in each pair for interrupt sources doesn't always
read with the right polarity/sense values.

To work around this, keep a software copy of the register instead.  Since
it's not modified from the mpic itself, it's a feasible solution.  Still,
keep it under a config option to avoid wasting memory on other platforms.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Document and implement an improved flash device binding for powerpc
David Gibson [Fri, 7 Sep 2007 03:23:53 +0000 (13:23 +1000)]
[POWERPC] Document and implement an improved flash device binding for powerpc

This replaces the binding for flash chips in booting-without-of.txt
with an clarified and improved version.  It also makes
drivers/mtd/maps/physmap_of.c recognize this new binding.  Finally it
revises the Ebony device tree source to use the new binding as an
example.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] setup_64.c and prom.c comment cleanup
Linas Vepstas [Thu, 6 Sep 2007 17:47:29 +0000 (03:47 +1000)]
[POWERPC] setup_64.c and prom.c comment cleanup

Grammatical corrections to comments.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] prom.c whitespace cleanup
Linas Vepstas [Thu, 6 Sep 2007 17:46:15 +0000 (03:46 +1000)]
[POWERPC] prom.c whitespace cleanup

Whitespace cleanup: badly indented lines.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] prom_init whitespace cleanup, typo fix
Linas Vepstas [Thu, 6 Sep 2007 17:45:21 +0000 (03:45 +1000)]
[POWERPC] prom_init whitespace cleanup, typo fix

Whitespace cleanup: badly indented lines.
Typo in comment.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Check _PAGE_RW and _PAGE_PRESENT on kernel addresses
Scott Wood [Wed, 5 Sep 2007 22:04:38 +0000 (08:04 +1000)]
[POWERPC] Check _PAGE_RW and _PAGE_PRESENT on kernel addresses

Previously, the TLB miss handlers assumed that pages above KERNELBASE are
always present and read/write.  This assumption is false in the case of
CONFIG_DEBUG_PAGEALLOC.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] bootwrapper: Only print MAC addresses when the node is actually present
Scott Wood [Wed, 5 Sep 2007 19:21:18 +0000 (05:21 +1000)]
[POWERPC] bootwrapper: Only print MAC addresses when the node is actually present

Some firmwares (such as PlanetCore) only provide a base MAC address, and
expect the kernel to set certain bits to generate the addresses for the
other ports.  As such, MAC addresses are generated that may not correspond
to actual hardware.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] bootwrapper: Add get_path()
Scott Wood [Wed, 5 Sep 2007 19:21:12 +0000 (05:21 +1000)]
[POWERPC] bootwrapper: Add get_path()

This will be used by the PlanetCore firmware support to construct
a linux,stdout-path from the serial node that it finds.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] bootwrapper: Add strtoull()
Scott Wood [Wed, 5 Sep 2007 19:21:10 +0000 (05:21 +1000)]
[POWERPC] bootwrapper: Add strtoull()

This will be needed by PlanetCore firmware support.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] bootwrapper: flatdevtree fixes
Scott Wood [Wed, 5 Sep 2007 19:21:04 +0000 (05:21 +1000)]
[POWERPC] bootwrapper: flatdevtree fixes

1. ft_create_node was returning the internal pointer rather than a phandle.
2. ft_find_device_rel was treating a "top" phandle of NULL as an error,
rather than as the root of the tree.  The old, absolute ft_find_device
is removed, and the relative version is renamed to ft_find_device().

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Remove warning in arch/powerpc/kernel/sysfs.c
Olof Johansson [Wed, 5 Sep 2007 02:43:17 +0000 (12:43 +1000)]
[POWERPC] Remove warning in arch/powerpc/kernel/sysfs.c

Fixes:

arch/powerpc/kernel/sysfs.c: In function 'cpu_add_sysdev_attr_group':
arch/powerpc/kernel/sysfs.c:388: warning: ignoring return value of
'sysfs_create_group', declared with attribute warn_unused_result

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Move lowlevel runlatch calls under cpu feature control
Olof Johansson [Wed, 5 Sep 2007 02:42:30 +0000 (12:42 +1000)]
[POWERPC] Move lowlevel runlatch calls under cpu feature control

There's no need to call the runlatch on functions on processors that
don't implement them (CPU_FTR_CTRL).

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Remove unused platform_machine_check()
Olof Johansson [Wed, 5 Sep 2007 02:41:09 +0000 (12:41 +1000)]
[POWERPC] Remove unused platform_machine_check()

Remove leftover cruft from ARCH=ppc.

There are no users of platform_machine_check() in ARCH=powerpc, and none
should be added (they should use ppc_md.machine_check_handler instead).

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pasemi: Move pasemi_idle_init() to late_initcall()
Olof Johansson [Wed, 5 Sep 2007 02:09:45 +0000 (12:09 +1000)]
[POWERPC] pasemi: Move pasemi_idle_init() to late_initcall()

Move pasemi_idle_init() to be a late_initcall instead of being called from
setup_arch().  This way the cpufreq driver has a chance to initialize and
save away the boot time astate before we go to idle for the first time.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pasemi: Print more information at machine check
Olof Johansson [Wed, 5 Sep 2007 02:09:23 +0000 (12:09 +1000)]
[POWERPC] pasemi: Print more information at machine check

Add printout of some SoC error status registers, and dump the SLB contents
for those machine check events where it makes sense.

Since we can't go about and ioremap registers at machine check time,
and we generally want to do as little as possible to print out the
information, pre-build a table of the registers to dump and their address
in the common PCI config space range.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pasemi: Export more SPRs to sysfs when CONFIG_DEBUG_KERNEL=y
Olof Johansson [Wed, 5 Sep 2007 02:09:06 +0000 (12:09 +1000)]
[POWERPC] pasemi: Export more SPRs to sysfs when CONFIG_DEBUG_KERNEL=y

Export some of the implementation-specific registers via sysfs.
Useful when debugging, etc.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pasemi: Add workaround for erratum 5945
Olof Johansson [Wed, 5 Sep 2007 02:08:50 +0000 (12:08 +1000)]
[POWERPC] pasemi: Add workaround for erratum 5945

Erratum 5945 causes some of the registers on the PCIe root ports to
not read correctly.  Do a small dance to avoid this: Write an unused
register, read the value and write it back.  Thankfully this is not in
a hot code path.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pasemi: Add pasemi_pci_getcfgaddr()
Olof Johansson [Wed, 5 Sep 2007 02:08:30 +0000 (12:08 +1000)]
[POWERPC] pasemi: Add pasemi_pci_getcfgaddr()

Add pasemi_pci_getcfgaddr(), to get the remapped address of a specific
config register for a PCI device.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Export new __io{re,un}map_at() symbols
Olof Johansson [Fri, 31 Aug 2007 03:58:51 +0000 (13:58 +1000)]
[POWERPC] Export new __io{re,un}map_at() symbols

Export new __io{re,un}map_at() symbols so modules can use them.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Export virq mapping via debugfs
Michael Ellerman [Tue, 28 Aug 2007 08:47:57 +0000 (18:47 +1000)]
[POWERPC] Export virq mapping via debugfs

This adds a debugfs file "powerpc/virq_mapping", which shows the virtual
to real mapping of irq numbers.  Enable it with CONFIG_VIRQ_DEBUG.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Chen Gong <G.Chen@freescale.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>