firefly-linux-kernel-4.4.55.git
16 years agoMove tty lookup/reopen to caller
Sukadev Bhattiprolu [Mon, 13 Oct 2008 09:42:49 +0000 (10:42 +0100)]
Move tty lookup/reopen to caller

Move tty_driver_lookup_tty() and tty_reopen() from tty_init_dev()
into tty_open() (one of the two callers of tty_init_dev()).  These
calls are not really required in ptmx_open(), the other caller,
since ptmx_open() would be setting up a new tty.

Changelog[v2]:
- remove the lookup and reopen calls from ptmx_open
- merge with recent changes to ttydev tree

Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: extract the pty init time special cases
Alan Cox [Mon, 13 Oct 2008 09:42:39 +0000 (10:42 +0100)]
tty: extract the pty init time special cases

The majority of the remaining init_dev code is pty special cases. We
refactor this code into the driver->install method.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Finish fixing up the init_dev interface to use ERR_PTR
Alan Cox [Mon, 13 Oct 2008 09:42:29 +0000 (10:42 +0100)]
tty: Finish fixing up the init_dev interface to use ERR_PTR

Original suggestion and proposal from Sukadev Bhattiprolu.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: More driver operations
Alan Cox [Mon, 13 Oct 2008 09:42:19 +0000 (10:42 +0100)]
tty: More driver operations

We have the lookup operation abstracted which is nice for pty cleanup but
we really want to abstract the add/remove entries as well so that we can
pull the pty code out of the tty core and create a clear defined interface
for the tty driver table.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: kref the tty driver object
Alan Cox [Mon, 13 Oct 2008 09:42:09 +0000 (10:42 +0100)]
tty: kref the tty driver object

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Clean up the tty_init_dev changes further
Alan Cox [Mon, 13 Oct 2008 09:42:00 +0000 (10:42 +0100)]
tty: Clean up the tty_init_dev changes further

Fix up the naming, style and extract some bits of code into the driver
specific code

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Move parts of tty_init_dev into new functions
Sukadev Bhattiprolu [Mon, 13 Oct 2008 09:41:51 +0000 (10:41 +0100)]
tty: Move parts of tty_init_dev into new functions

Move the 'find-tty' and 'fast-track-open' parts of init_dev() to
separate functions.

Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Remove more special casing and out of place code
Alan Cox [Mon, 13 Oct 2008 09:41:42 +0000 (10:41 +0100)]
tty: Remove more special casing and out of place code

Carry on pushing code out of tty_io when it belongs to other drivers. I'm
not 100% happy with some of this and it will be worth revisiting some of the
exports later when the restructuring work is done.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: shutdown method
Alan Cox [Mon, 13 Oct 2008 09:41:30 +0000 (10:41 +0100)]
tty: shutdown method

Right now there are various drivers that try to use tty->count to know when
they get the final close. Aristeau Rozanski showed while debugging the vt
sysfs race that this isn't entirely safe.

Instead of driver side tricks to work around this introduce a shutdown which
is called when the tty is being destructed. This also means that the shutdown
method is tied into the refcounting.

Use this to rework the console close/sysfs logic.

Remove lots of special case code from the tty core code. The pty code can now
have a shutdown() method that replaces the special case hackery in the tree
free up paths.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agovt: remove bogus lock dropping
Alan Cox [Mon, 13 Oct 2008 09:41:16 +0000 (10:41 +0100)]
vt: remove bogus lock dropping

For hysterical raisins the vt layer drops and retakes locks in the write
method. This is a left over from the days when user/kernel data was passed
directly to the tty not pre-buffered.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopty: If the administrator creates a device for a ptmx slave we should not error
Alan Cox [Mon, 13 Oct 2008 09:41:03 +0000 (10:41 +0100)]
pty: If the administrator creates a device for a ptmx slave we should not error

The open path for ptmx slaves is via the ptmx device. Opening them any
other way is not allowed. Vegard Nossum found that previously this was not
the case and mknod foo c 128 42; cat foo would produce nasty diagnostics

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Fix abusers of current->sighand->tty
Alan Cox [Mon, 13 Oct 2008 09:40:53 +0000 (10:40 +0100)]
tty: Fix abusers of current->sighand->tty

Various people outside the tty layer still stick their noses in behind the
scenes. We need to make sure they also obey the locking and referencing rules.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Redo current tty locking
Alan Cox [Mon, 13 Oct 2008 09:40:43 +0000 (10:40 +0100)]
tty: Redo current tty locking

Currently it is sometimes locked by the tty mutex and sometimes by the
sighand lock. The latter is in fact correct and now we can hand back referenced
objects we can fix this up without problems around sleeping functions.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: the vhangup syscall is racy
Alan Cox [Mon, 13 Oct 2008 09:40:30 +0000 (10:40 +0100)]
tty: the vhangup syscall is racy

We now have the infrastructure to sort this out but rather than teaching
the syscall tty lock rules we move the hard work into a tty helper

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomxser: Switch to kref tty
Alan Cox [Mon, 13 Oct 2008 09:40:19 +0000 (10:40 +0100)]
mxser: Switch to kref tty

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agostallion: Use krefs
Alan Cox [Mon, 13 Oct 2008 09:40:07 +0000 (10:40 +0100)]
stallion: Use krefs

Use tty_port_init and krefs in the stallion drivers to protect us from devices
going away underneath us. As with the other drives some rearranging is done to
pass the tty structure down properly on the user side.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: kref usage for isicom and moxa
Alan Cox [Mon, 13 Oct 2008 09:39:58 +0000 (10:39 +0100)]
tty: kref usage for isicom and moxa

Rather than blindly keep taking krefs we reorder the code in a few places
to pass the tty down to the right place (which is important as from the user
side it is not the case that tty == port->tty in all situations). For the irq
and related paths use the krefs to stop the tty being freed under us.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: usb-serial krefs
Alan Cox [Mon, 13 Oct 2008 09:39:46 +0000 (10:39 +0100)]
tty: usb-serial krefs

Use kref in the USB serial drivers so that we don't free tty structures
from under the URB receive handlers as has historically been the case if
you were unlucky. This also gives us a framework for general tty drivers to
use tty_port objects and refcount.

Contains two err->dev_err changes merged together to fix clashes in the
-next tree.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Move tty_write_message out of kernel/printk
Alan Cox [Mon, 13 Oct 2008 09:39:23 +0000 (10:39 +0100)]
tty: Move tty_write_message out of kernel/printk

This is pure tty code so put it in the tty layer where it can be with the
locking relevant material it uses

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Make get_current_tty use a kref
Alan Cox [Mon, 13 Oct 2008 09:39:13 +0000 (10:39 +0100)]
tty: Make get_current_tty use a kref

We now return a kref covered tty reference. That ensures the tty structure
doesn't go away when you have a return from get_current_tty. This is not
enough to protect you from most of the resources being freed behind your
back - yet.

[Updated to include fixes for SELinux problems found by Andrew Morton and
 an s390 leak found while debugging the former]

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: compare the tty winsize
Alan Cox [Mon, 13 Oct 2008 09:39:01 +0000 (10:39 +0100)]
tty: compare the tty winsize

We always use the real tty one for stuff so the pty one should not be
compared. As we propagate window changes to both it doesn't currently
matter but will when we tidy up the pty termios logic a bit more

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Termios locking - sort out real_tty confusions and lock reads
Alan Cox [Mon, 13 Oct 2008 09:38:46 +0000 (10:38 +0100)]
tty: Termios locking - sort out real_tty confusions and lock reads

This moves us towards sanity and should mean our termios locking is now
complete and comprehensive.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Add termiox
Alan Cox [Mon, 13 Oct 2008 09:38:18 +0000 (10:38 +0100)]
tty: Add termiox

We need a way to describe the various additional modes and flow control
features that random weird hardware shows up and software such as wine
wants to emulate as Windows supports them.

TCGETX/TCSETX and the termiox ioctl are a SYS5 extension that we might as
well adopt. This patches adds the structures and the basic ioctl interfaces
when the TCGETX etc defines are added for an architecture. Drivers wishing
to use this stuff need to add new methods.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: ipw need reworking
Alan Cox [Mon, 13 Oct 2008 09:38:07 +0000 (10:38 +0100)]
tty: ipw need reworking

This came in via another tree and unfortunately is rather broken on
the tty side. Comment the apparent locking problems for someone who knows
the driver to look at.

Fix the termios and other ioctl handling. The driver was calling the wrong
methods for what it wanted to do but the right ones existed so its a simple
fix up.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Cris has a nice RS485 ioctl so we should steal it
Alan Cox [Mon, 13 Oct 2008 09:37:48 +0000 (10:37 +0100)]
tty: Cris has a nice RS485 ioctl so we should steal it

JP Tosoni observed:

"About a RS485 ioctl: could you consider the attached files which are
 already in the Linux kernel (in include/asm-cris).  They define a
 TIOCSERSETRS485 (ioctl.h), and the data structure (rs485.h)
 with allows to specify timings. Sounds just like what we want ?"

and he's right: sort of. Rework the structure to use flag bits and make the
time delay a fixed sized field so we don't get 32/64bit problems. Add the ioctls
to x86 so that people know what to add to their platform of choice.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: use krefs to protect driver module counts
Alan Cox [Mon, 13 Oct 2008 09:37:36 +0000 (10:37 +0100)]
tty: use krefs to protect driver module counts

The tty layer keeps driver module counts that are used so the driver knows
when it can be unloaded. For obvious reasons we want to tie that to the
refcounting properly.

At this point the driver side itself isn't refcounted nicely but we can do
that later and kref the drivers.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Add a kref count
Alan Cox [Mon, 13 Oct 2008 09:37:26 +0000 (10:37 +0100)]
tty: Add a kref count

Introduce a kref to the tty structure and use it to protect the tty->signal
tty references. For now we don't introduce it for anything else.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopps: Reserve a line discipline number for PPS
Alan Cox [Mon, 13 Oct 2008 09:37:17 +0000 (10:37 +0100)]
pps: Reserve a line discipline number for PPS

Add a new line discipline for "pulse per second" devices connected to
a serial port.

Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Split tty_port into its own file
Alan Cox [Mon, 13 Oct 2008 09:37:07 +0000 (10:37 +0100)]
tty: Split tty_port into its own file

Not much in it yet but this will grow a lot

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: split the buffering from tty_io
Alan Cox [Mon, 13 Oct 2008 09:36:58 +0000 (10:36 +0100)]
tty: split the buffering from tty_io

The two are basically independent chunks of code so lets split them up for
readability and sanity. It also makes the API boundaries much clearer.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: small cleanups and note bugs to be dealt with by uml authors...
Alan Cox [Mon, 13 Oct 2008 09:36:49 +0000 (10:36 +0100)]
uml: small cleanups and note bugs to be dealt with by uml authors...

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: move tioclinux from a special case
Alan Cox [Mon, 13 Oct 2008 09:36:40 +0000 (10:36 +0100)]
tty: move tioclinux from a special case

Right now we have ifdefs and hooks in the core ioctl handler for TIOCLINUX
and then test if its a console. This is brain dead. Instead call the
tioclinux helper from the relevant driver ioctl methods.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoserial: allow 8250 to be used on sparc
David Miller [Mon, 13 Oct 2008 09:36:31 +0000 (10:36 +0100)]
serial: allow 8250 to be used on sparc

This requires three changes:

1) Remove !SPARC restriction in Kconfig.

2) Move Sparc specific serial drivers before 8250, so that serial
   console devices don't change names on us, even if 8250 finds
   devices.

3) Since the Sparc specific serial drivers try to use the
   same major/minor device namespace as 8250, some coordination
   is necessary.  Use the sunserial_*() layer routines to allocate
   minor number space within TTY_MAJOR when CONFIG_SPARC.

   This has no effect on other platforms.

Thanks to Josip Rodin for bringing up this issue and testing
plus debugging various revisions of this patch.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago8250: remove a few inlines of dubious value
Will Newton [Mon, 13 Oct 2008 09:36:21 +0000 (10:36 +0100)]
8250: remove a few inlines of dubious value

Remove some inlines from various functions that are called once, are too
big to inline, or are called only from slow path code.  This saves around
300 bytes of code for me.

Signed-off-by: Will Newton <will.newton@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoserial_8250: pci_enable_device fail is not fully handled
Alan Cox [Mon, 13 Oct 2008 09:36:11 +0000 (10:36 +0100)]
serial_8250: pci_enable_device fail is not fully handled

<rmk> talking about leaks - I noticed that the 'check return of
pci_enable_dev()' in the 8250 pci resume function finally made it in
despite my objections against it (causing stuff in higher levels to
leak).

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoftdi: A few errors are err() that should be debug which causes much spewage
Alan Cox [Mon, 13 Oct 2008 09:36:00 +0000 (10:36 +0100)]
ftdi: A few errors are err() that should be debug which causes much spewage

Fixes #10783

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agousb: fix pl2303 initialization
Jason Wessel [Mon, 13 Oct 2008 09:35:51 +0000 (10:35 +0100)]
usb: fix pl2303 initialization

This patch removes the private check for the termios_initialized for
the pl2303 usb driver.  It forced the baud to 9600 on the first call
to pl2303_set_termios()

Based on the tty changes in the 2.6.27 kernel, the termios passed to
the *_set_termios functions is always populated the first time.

This means there is no need to privately initialize the settings the
first time, and doing so will not allow the use of the kernel
parameter "console=ttyUSB0,115200" as an example.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoserial-make-uart_ports-ioport-unsigned-long-fix
Andrew Morton [Mon, 13 Oct 2008 09:35:42 +0000 (10:35 +0100)]
serial-make-uart_ports-ioport-unsigned-long-fix

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agonozomi: Fix close on error
Alan Cox [Mon, 13 Oct 2008 09:35:33 +0000 (10:35 +0100)]
nozomi: Fix close on error

Nozomi assumes the close method isn't called if open errors. The tty layer
is different to other drives in this respect however. Pointed out by Denis J
Barrow.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoserial: Make uart_port's ioport "unsigned long".
David Miller [Mon, 13 Oct 2008 09:35:23 +0000 (10:35 +0100)]
serial: Make uart_port's ioport "unsigned long".

Otherwise the top 32-bits of the resource value get chopped
off on 64-bit systems, and the resulting I/O accesses go to
random places.

Thanks to testing and debugging by Josip Rodin, which helped
track this down.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoaudit: Handle embedded NUL in TTY input auditing
Miloslav Trmac [Mon, 13 Oct 2008 09:35:15 +0000 (10:35 +0100)]
audit: Handle embedded NUL in TTY input auditing

Data read from a TTY can contain an embedded NUL byte (e.g. after
pressing Ctrl-2, or sent to a PTY).  After the previous patch, the data
would be logged only up to the first NUL.

This patch modifies the AUDIT_TTY record to always use the hexadecimal
format, which does not terminate at the first NUL byte.  The vast
majority of recorded TTY input data will contain either ' ' or '\n', so
the hexadecimal format would have been used anyway.

Signed-off-by: Miloslav Trmac <mitr@redhat.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoip2: avoid add_timer with pending timer
Akinobu Mita [Mon, 13 Oct 2008 09:35:05 +0000 (10:35 +0100)]
ip2: avoid add_timer with pending timer

add_timer() is not supposed to be called when the timer is pending.
ip2 driver attempts to avoid that condition by setting and resetting
a flag (TimerOn) in timer function. But there is some gap between
add_timer() and setting TimerOn.

This patch fix this problem by using mod_timer() and remove TimerOn
which has been unnecessary by this change.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoip2: init/deinit cleanup
Jiri Slaby [Mon, 13 Oct 2008 09:34:56 +0000 (10:34 +0100)]
ip2: init/deinit cleanup

Cleanup of module_init/exit:
- mostly whitespace
- remove empty functions
- replace c++ comments
- remove useless prints (module loaded, unloaded)
- mark the calls as __exit and __init
- use break; and return; to save some indent levels after it
- note resource leakage

It's still mess, but now it's readable.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoip2: fix sparse warnings
Jiri Slaby [Mon, 13 Oct 2008 09:34:45 +0000 (10:34 +0100)]
ip2: fix sparse warnings

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoip2: cleanup globals
Jiri Slaby [Mon, 13 Oct 2008 09:34:36 +0000 (10:34 +0100)]
ip2: cleanup globals

- do not init .bss zeroed data to zero again (by memset or
  explicit assignment)
- use char [] instead of char * for string constants

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: merge ip2main and ip2base
Jiri Slaby [Mon, 13 Oct 2008 09:34:27 +0000 (10:34 +0100)]
Char: merge ip2main and ip2base

It's pretty useless to have one setup() function separated along with
module_init() which only calls a function from ip2main anyway. Get rid
of ip2base.

Remove also checks of always-true now.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: sx, fix io unmapping
Jiri Slaby [Mon, 13 Oct 2008 09:34:18 +0000 (10:34 +0100)]
Char: sx, fix io unmapping

board->base is increased for CF cards after mapping. Use board->base2
for unmapping the region, since it holds the original/correct address.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades. remove bogus iomap
Jiri Slaby [Mon, 13 Oct 2008 09:34:09 +0000 (10:34 +0100)]
Char: cyclades. remove bogus iomap

readl/writel are not expected to accept iomap return value. Replace
bogus mapping by standard ioremap.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix oti6858 debug level
Scott Ashcroft [Mon, 13 Oct 2008 09:34:00 +0000 (10:34 +0100)]
Fix oti6858 debug level

For some reason the oti6858 driver undefines and redefines the dbg
macro. This makes it spew debugging messages at KERN_INFO instead of
KERN_DEBUG.

This patch removes the undef and define making the driver log like every
other USB serial driver.

Signed-off-by: Scott Ashcroft <scott.ashcroft@talk21.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoBlackfin Serial Driver: Fix bug - request UART2/3 peripheral mapped interrupts in...
Sonic Zhang [Mon, 13 Oct 2008 09:33:51 +0000 (10:33 +0100)]
Blackfin Serial Driver: Fix bug - request UART2/3 peripheral mapped interrupts in PIO mode

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoBlackfin Serial Driver: Fix bug - ircp fails on sir over Blackfin UART
Graf Yang [Mon, 13 Oct 2008 09:33:42 +0000 (10:33 +0100)]
Blackfin Serial Driver: Fix bug - ircp fails on sir over Blackfin UART

We now use the sir_dev/irtty_sir/uart/bfin_serial drivers framework
to monitor the TX status.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoBlackfin Serial Driver: Fix bug - Don't call tx_stop in tx_transfer.
Sonic Zhang [Mon, 13 Oct 2008 09:33:33 +0000 (10:33 +0100)]
Blackfin Serial Driver: Fix bug - Don't call tx_stop in tx_transfer.

Disable irq and return immediately.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoBlackfin Serial Driver: Remove useless stop
Sonic Zhang [Mon, 13 Oct 2008 09:33:25 +0000 (10:33 +0100)]
Blackfin Serial Driver: Remove useless stop

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoBlackfin Serial Driver: move common variables out of serial headers and into the...
Mike Frysinger [Mon, 13 Oct 2008 09:33:16 +0000 (10:33 +0100)]
Blackfin Serial Driver: move common variables out of serial headers and into the serial driver

move common variables out of serial headers and into the serial driver and
rename "nr_ports" to "nr_active_ports" so as to easily differentiate
between BFIN_UART_NR_PORTS (the # of available) and nr_ports (the # of enabled)

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoBlackfin Serial Driver: trim trailing whitespace -- no functional changes
Mike Frysinger [Mon, 13 Oct 2008 09:33:06 +0000 (10:33 +0100)]
Blackfin Serial Driver: trim trailing whitespace -- no functional changes

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoBlackfin Serial Driver: Fix bug - should suspend/resume/remove all uart ports.
Sonic Zhang [Mon, 13 Oct 2008 09:32:44 +0000 (10:32 +0100)]
Blackfin Serial Driver: Fix bug - should suspend/resume/remove all uart ports.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoBlackfin Serial Driver: use __initdata for data, not __init
Mike Frysinger [Mon, 13 Oct 2008 09:32:35 +0000 (10:32 +0100)]
Blackfin Serial Driver: use __initdata for data, not __init

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoepca: call tty_port_init
Alan Cox [Mon, 13 Oct 2008 09:32:09 +0000 (10:32 +0100)]
epca: call tty_port_init

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocoldfire: scheduled SERIAL_COLDFIRE removal
Adrian Bunk [Mon, 13 Oct 2008 09:31:59 +0000 (10:31 +0100)]
coldfire: scheduled SERIAL_COLDFIRE removal

This patch contains the scheduled removal of the obsolete
SERIAL_COLDFIRE driver.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/char/hvc_console.c: adjust call to put_tty_driver
Julia Lawall [Mon, 13 Oct 2008 09:31:49 +0000 (10:31 +0100)]
drivers/char/hvc_console.c: adjust call to put_tty_driver

The call to put_tty_driver is out of place and is applied to the wrong
argument.

The function enclosing the patched code calls alloc_tty_driver and stores
the result in drv.  Subsequently, there are two occurrences of error
handling code, one making a goto to put_tty and one making a goto to
stop_thread.  At the point of the first one the assignment hvc_driver = drv
has not yet been executed, and from inspecting the rest of the file it
seems that hvc_driver would be NULL.  Thus the current call to
put_tty_driver is useless, and one applied to drv is needed.  The goto
stop_thread is in the error handling code for a call to
tty_register_driver, but the error cases in tty_register_driver do not free
its argument, so it should be done here.  Thus, I have moved the put_tty
label after the stop_thread label, so that put_tty_driver is called in both
cases.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
expression E,f;
position p1,p2,p3;
identifier l;
statement S;
@@

x = alloc_tty_driver@p1(...)
...
if (x == NULL) S
... when != E = x
    when != put_tty_driver(x)
goto@p2 l;
... when != E = x
    when != f(...,x,...)
    when any
(
return \(0\|x\);
|
return@p3 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
p3 << r.p3;
@@

print "%s: call on line %s not freed or saved before return on line %s via line %s" % (p1[0].file,p1[0].line,p3[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/serial/crisv10.c: add missing put_tty_driver
Julia Lawall [Mon, 13 Oct 2008 09:31:37 +0000 (10:31 +0100)]
drivers/serial/crisv10.c: add missing put_tty_driver

alloc_tty_driver is called at the beginning of the function containing the
lines of code shown in the patch.  Thus, put_tty_driver is needed before
returning in the error handling code.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@nr exists@
local idexpression x;
expression E,f;
position p1,p2,p3;
identifier l;
statement S;
@@

x = alloc_tty_driver@p1(...)
...
if (x == NULL) S
... when != E = x
    when != put_tty_driver(x)
    when != goto l;
(
return \(0\|x\);
|
return@p3 ...;
)

@script:python@
p1 << nr.p1;
p3 << nr.p3;
@@

print "%s: call on line %s not freed or saved before return on line %s" % (p1[0].file,p1[0].line,p3[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMN10300: MEI are renaming themselves to Panasonic
David Howells [Mon, 13 Oct 2008 09:42:44 +0000 (10:42 +0100)]
MN10300: MEI are renaming themselves to Panasonic

MEI are renaming themselves to Panasonic, so update the MAINTAINERS
record for the MN10300 arch.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMAINTAINERS: remove colon from headings
Randy Dunlap [Sun, 12 Oct 2008 23:11:58 +0000 (16:11 -0700)]
MAINTAINERS: remove colon from headings

Remove ending ':' from some of the Topic lines for consistency.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMAINTAINERS: add F: and acronyms
Randy Dunlap [Sun, 12 Oct 2008 23:11:45 +0000 (16:11 -0700)]
MAINTAINERS: add F: and acronyms

Add F: definition since it is being used.

Expand acronyms or add them so that users of MAINTAINERS file can find
entries more easily.

Correct driver spelling.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMAINTAINERS: alpha sort
Randy Dunlap [Sun, 12 Oct 2008 23:11:31 +0000 (16:11 -0700)]
MAINTAINERS: alpha sort

Sorted case-insensitive (sort -f).
Groups that begin with ARM, INTEL, etc. not sorted.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Sun, 12 Oct 2008 23:10:29 +0000 (16:10 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: fix kconfig typo and extra whitespace
  ext4: fix build failure without procfs
  ext4: add an option to control error handling on file data
  jbd2: don't dirty original metadata buffer on abort
  ext4: add checks for errors from jbd2
  jbd2: fix error handling for checkpoint io
  jbd2: abort when failed to log metadata buffers

16 years agoext4: fix kconfig typo and extra whitespace
Jan Engelhardt [Sun, 12 Oct 2008 19:53:01 +0000 (15:53 -0400)]
ext4: fix kconfig typo and extra whitespace

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
16 years agoext4: fix build failure without procfs
Alexander Beregalov [Sun, 12 Oct 2008 21:27:49 +0000 (17:27 -0400)]
ext4: fix build failure without procfs

fs/ext4/super.c: In function 'ext4_fill_super':
fs/ext4/super.c:2226: error: 'ext4_ui_proc_fops' undeclared (first use
in this function)
fs/ext4/super.c:2226: error: (Each undeclared identifier is reported
only once
fs/ext4/super.c:2226: error: for each function it appears in.)

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Sun, 12 Oct 2008 19:42:29 +0000 (12:42 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] cifs: remove pointless lock and unlock of GlobalMid_Lock in header_assemble

16 years agoFix Kconfig dependency for WM97xx battery driver
Linus Torvalds [Sun, 12 Oct 2008 19:37:16 +0000 (12:37 -0700)]
Fix Kconfig dependency for WM97xx battery driver

It needs the WM97xx touchscreen driver to be compiled in, not as a
module.  And it cannot itself be a module, due to some unfortunate
interactions with platform data.

Reported-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'x86-core-v2-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 12 Oct 2008 19:04:59 +0000 (12:04 -0700)]
Merge branch 'x86-core-v2-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

This merges in:

  x86/build, x86/microcode, x86/spinlocks, x86/memory-corruption-check,
  x86/early-printk, x86/xsave, x86/quirks, x86/setup, x86/signal,
  core/signal, x86/urgent, x86/xen

* 'x86-core-v2-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (142 commits)
  x86: make processor type select depend on CONFIG_EMBEDDED
  x86: extend processor type select help text
  x86, amd-iommu: propagate PCI device enabling error
  warnings: fix arch/x86/kernel/io_apic_64.c
  warnings: fix arch/x86/kernel/early_printk.c
  x86, fpu: check __clear_user() return value
  x86: memory corruption check - cleanup
  x86: ioperm user_regset
  xen: do not reserve 2 pages of padding between hypervisor and fixmap.
  xen: use spin_lock_nest_lock when pinning a pagetable
  x86: xsave: set FP, SSE bits in the xsave header in the user sigcontext
  x86: xsave: fix error condition in save_i387_xstate()
  x86: SB450: deprioritize DMI quirks
  x86: SB450: skip IRQ0 override if it is not routed to INT2 of IOAPIC
  x86: replace a magic number with a named constant in the VESA boot code
  x86 setup: remove IMAGE_OFFSET
  x86 setup: remove DEF_INITSEG and DEF_SETUPSEG
  Revert "x86: fix ghost EDD devices in /sys again"
  x86 setup: fix ghost entries under /sys/firmware/edd take 3
  x86: signal: remove indent in restore_sigcontext()
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6
Linus Torvalds [Sun, 12 Oct 2008 19:00:23 +0000 (12:00 -0700)]
Merge git://git./linux/kernel/git/hskinnemoen/avr32-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
  avr32: Fix build failures in board code
  avr32: Allow selecting multiple pins at once
  avr32: Minor pm_power_off cleanup
  avr32: Implement {read,write}[bwl]_be
  avr32: Replace static clock list with dynamic linked list
  avr32: Use platform_driver_probe for pdc platform driver
  avr32: Use platform_driver_probe for pio platform driver
  avr32: Provide a way to deselect pins in the portmux
  ngw100: export J15 through sysfs
  avr32: Allow fine-grained control over LCDC pins
  avr32: added mem kernel command line option support
  Add kernel support for oprofile callgraphs on AVR32
  avr32: use the new byteorder headers

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Sun, 12 Oct 2008 18:51:57 +0000 (11:51 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (24 commits)
  MMC: Use timeout values from CSR
  MMC: CSD and CID timeout values
  sdhci: 'scratch' may be used uninitialized
  mmc: explicitly mention SDIO support in Kconfig
  mmc: remove redundant "depends on"
  Fix comment in include/linux/mmc/host.h
  sdio: high-speed support
  mmc_block: hard code 512 byte block size
  sdhci: force high speed capability on some controllers
  mmc_block: filter out PC requests
  mmc_block: indicate strict ordering
  mmc_block: inform block layer about sector count restriction
  sdio: give sdio irq thread a host specific name
  sdio: make sleep on error interruptable
  sdhci: reduce card detection delay
  sdhci: let the controller wait for busy state to end
  atmel-mci: Add missing flush_dcache_page() in PIO transfer code
  atmel-mci: Don't overwrite error bits when NOTBUSY is set
  atmel-mci: Add experimental DMA support
  atmel-mci: support multiple mmc slots
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Sun, 12 Oct 2008 18:51:32 +0000 (11:51 -0700)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] orion5x_wdt.c: add spinlocking
  [WATCHDOG] Orion: add hardware watchdog support
  [WATCHDOG] omap_wdt.c: cleanup a bit omap_wdt.c
  [WATCHDOG] omap_wdt.c: another ioremap() fix
  [WATCHDOG] omap_wdt.c: sync linux-omap changes
  [WATCHDOG] Add AT91SAM9X watchdog
  [WATCHDOG] Add driver for winbond w83697ug/uf watchdog feature
  [WATCHDOG] add watchdog driver IT8716 IT8726 IT8712J/K

16 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 12 Oct 2008 18:50:37 +0000 (11:50 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: fix early panic on amd64 due to typo in supported CPU section
  x86, early_ioremap: fix fencepost error
  x86: avoid dereferencing beyond stack + THREAD_SIZE

16 years agoprovide generic_block_fiemap() only with BLOCK=y
Adrian Bunk [Sun, 12 Oct 2008 04:15:19 +0000 (07:15 +0300)]
provide generic_block_fiemap() only with BLOCK=y

This fixes the following compile error with CONFIG_BLOCK=n caused by
commit 68c9d702bb72f367f3b148963ec6cf5e07ff7f65 ("generic block based
fiemap implementation"):

    CC      fs/ioctl.o
  fs/ioctl.c: In function 'generic_block_fiemap':
  fs/ioctl.c:249: error: storage size of 'tmp' isn't known
  fs/ioctl.c:272: error: invalid application of 'sizeof' to incomplete type 'struct buffer_head'
  fs/ioctl.c:280: error: implicit declaration of function 'buffer_mapped'
  fs/ioctl.c:249: warning: unused variable 'tmp'
  make[2]: *** [fs/ioctl.o] Error 1

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Josef Bacik <jbacik@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoadd key_revoke() dummy for KEYS=n
Adrian Bunk [Sun, 12 Oct 2008 04:10:50 +0000 (07:10 +0300)]
add key_revoke() dummy for KEYS=n

This fixes the following build error with CONFIG_KEYS=n, caused by
commit dfd15c46a6c2cafb006183c0c14f07e59eee4ac0 ("cifs: explicitly
revoke SPNEGO key after session setup"):

    CC [M]  fs/cifs/sess.o
  fs/cifs/sess.c: In function 'CIFS_SessSetup':
  fs/cifs/sess.c:628: error: implicit declaration of function 'key_revoke'
  make[3]: *** [fs/cifs/sess.o] Error 1

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6
Linus Torvalds [Sun, 12 Oct 2008 18:40:55 +0000 (11:40 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-next-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6: (180 commits)
  leo: disable cursor when leaving graphics mode
  cg6: disable cursor when leaving graphics mode
  sparc32: sun4m interrupt mask cleanup
  drivers/rtc/Kconfig: don't build rtc-cmos.o on sparc32
  sparc: arch/sparc/kernel/pmc.c -- extra #include?
  sparc32: Add more extensive documentation of sun4m interrupts.
  sparc32: Kill irq_rcvreg from sun4m_irq.c
  sparc32: Delete master_l10_limit.
  sparc32: Use PROM device probing for sun4c timers.
  sparc32: Use PROM device probing for sun4c interrupt register.
  sparc32: Delete claim_ticker14().
  sparc32: Stop calling claim_ticker14() from sun4c_irq.c
  sparc32: Kill clear_profile_irq btfixup entry.
  sparc32: Call sun4m_clear_profile_irq() directly from sun4m_smp.c
  sparc32: Remove #if 0'd code from sun4c_irq.c
  sparc32: Remove some SMP ifdefs in sun4d_irq.c
  sparc32: Use PROM infrastructure for probing and mapping sun4d timers.
  sparc32: Use PROM device probing for sun4m irq registers.
  sparc32: Use PROM device probing for sun4m timer registers.
  sparc: Fix user_regset 'n' field values.
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sun, 12 Oct 2008 18:40:34 +0000 (11:40 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  smc911x: Fix external PHY detection
  e1000: allow VLAN devices to use TSO and CSUM offload
  gre: Initialise rtnl_link tunnel parameters properly
  ipvs: Add proper dependencies on IP_VS, and fix description header line.

16 years agoFix RTC wakealarm sysfs interface breakage.
Linus Torvalds [Sun, 12 Oct 2008 18:30:08 +0000 (11:30 -0700)]
Fix RTC wakealarm sysfs interface breakage.

Commit ed458df4d2470adc02762a87a9ad665d0b1a2bd4 ("PnP: move
pnpacpi/pnpbios_init to after PCI init") moved the PnP RTC discovery
later, and now the ACPI RTC glue code doesn't find it any more, breaking
the RTC wakealarm sysfs interfaces, as reported by Rafael.

This really is fairly messy, and we have several annoying ordering
constraints here - the PnP code that sets up the RTC resources wants to
run after the PCI resources have to be registered, which in turn needs
to run after ACPI has at least enumerated the root PCI buses etc.  Our
initcall ordering is not fine-grained enough to make this all painless.

So this moves the ACPI RTC glue ("acpi_rtc_init()") down to a regular
module call, which fixes the problem Rafael has.  The reason this isn't
wonderful is that we really should do acpi_rtc_init before we do the
rtc_cmos init, and now those two are in the same module_init() section.

Which happens to work, but only because drivers/rtc is linked after
drivers/acpi.  In other words, we still have a very subtle ordering
issue here. Grr.

Reported-and-tested-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoavr32: Fix build failures in board code
Haavard Skinnemoen [Sun, 12 Oct 2008 14:02:46 +0000 (16:02 +0200)]
avr32: Fix build failures in board code

Fix a few instances of board code breakage introduced by the atmel-mci
platform interface changes.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agoavr32: Allow selecting multiple pins at once
Julien May [Wed, 24 Sep 2008 08:30:47 +0000 (10:30 +0200)]
avr32: Allow selecting multiple pins at once

at32_select_periph() now takes an u32 bitmask rather than a single pin.
This allows to set multiple pins at once.

Signed-off-by: Alex Raimondi <mailinglist@miromico.ch>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agoMerge branches 'x86/xen', 'x86/build', 'x86/microcode', 'x86/mm-debug-v2', 'x86/memor...
Ingo Molnar [Sun, 12 Oct 2008 13:50:02 +0000 (15:50 +0200)]
Merge branches 'x86/xen', 'x86/build', 'x86/microcode', 'x86/mm-debug-v2', 'x86/memory-corruption-check', 'x86/early-printk', 'x86/xsave', 'x86/ptrace-v2', 'x86/quirks', 'x86/setup', 'x86/spinlocks' and 'x86/signal' into x86/core-v2

16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen...
Haavard Skinnemoen [Sun, 12 Oct 2008 13:44:33 +0000 (15:44 +0200)]
Merge branch 'master' of git://git./linux/kernel/git/hskinnemoen/atmel-mci-2.6.28

16 years agox86: make processor type select depend on CONFIG_EMBEDDED
Ingo Molnar [Sun, 12 Oct 2008 13:40:45 +0000 (15:40 +0200)]
x86: make processor type select depend on CONFIG_EMBEDDED

deselecting one of the CPU type CONFIG_CPU_SUP_* config options
can render a kernel unbootable. Make sure this option is only
available if CONFIG_EMBEDDED is enabled.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: extend processor type select help text
Ingo Molnar [Sun, 12 Oct 2008 13:36:24 +0000 (15:36 +0200)]
x86: extend processor type select help text

extend the help text of the CONFIG_CPU_SUP_* config options to
express what it does and what effects it has.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years ago[CIFS] cifs: remove pointless lock and unlock of GlobalMid_Lock in header_assemble
Jeff Layton [Sun, 12 Oct 2008 13:34:11 +0000 (13:34 +0000)]
[CIFS] cifs: remove pointless lock and unlock of GlobalMid_Lock in header_assemble

We lock GlobalMid_Lock in header_assemble and then immediately unlock it
again without doing anything. Not sure what this was intended to do, but
remove it.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
16 years agox86, amd-iommu: propagate PCI device enabling error
Ingo Molnar [Sun, 12 Oct 2008 13:24:53 +0000 (15:24 +0200)]
x86, amd-iommu: propagate PCI device enabling error

propagate an error in enabling the PCI device.

Also eliminates this warning:

 arch/x86/kernel/amd_iommu_init.c: In function ‘init_iommu_one’:
 arch/x86/kernel/amd_iommu_init.c:726: warning: ignoring return value of ‘pci_enable_device’, declared with attribute warn_unused_result

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agowarnings: fix arch/x86/kernel/io_apic_64.c
Ingo Molnar [Sun, 12 Oct 2008 13:22:22 +0000 (15:22 +0200)]
warnings: fix arch/x86/kernel/io_apic_64.c

fix:

 arch/x86/kernel/io_apic_64.c: In function ‘print_local_APIC’:
 arch/x86/kernel/io_apic_64.c:1284: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
 arch/x86/kernel/io_apic_64.c:1285: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘long unsigned int’

We want to print the two halves of 'icr' at 32 bit width.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agowarnings: fix arch/x86/kernel/early_printk.c
Ingo Molnar [Wed, 27 Aug 2008 08:37:14 +0000 (10:37 +0200)]
warnings: fix arch/x86/kernel/early_printk.c

fix warning:

  arch/x86/kernel/early_printk.c:993: warning: ‘enable_debug_console’ defined but not used

Eliminate dead code.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, fpu: check __clear_user() return value
Ingo Molnar [Mon, 18 Aug 2008 10:59:32 +0000 (12:59 +0200)]
x86, fpu: check __clear_user() return value

fix warning:

  arch/x86/kernel/xsave.c: In function ‘save_i387_xstate’:
  arch/x86/kernel/xsave.c:98: warning: ignoring return value of ‘__clear_user’, declared with attribute warn_unused_result

check the return value and act on it. We should not be ignoring faults
at this point.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'linus' into x86/xsave
Ingo Molnar [Sun, 12 Oct 2008 13:17:14 +0000 (15:17 +0200)]
Merge branch 'linus' into x86/xsave

16 years agox86: memory corruption check - cleanup
Ingo Molnar [Sun, 12 Oct 2008 13:06:29 +0000 (15:06 +0200)]
x86: memory corruption check - cleanup

Move the prototypes from the generic kernel.h header to the more
appropriate include/asm-x86/bios_ebda.h header file.

Also, remove the check from the power management code - this is a
pure x86 matter for now.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'linus' into x86/memory-corruption-check
Ingo Molnar [Sun, 12 Oct 2008 13:05:39 +0000 (15:05 +0200)]
Merge branch 'linus' into x86/memory-corruption-check

16 years agoMerge branches 'core/signal' and 'x86/spinlocks' into x86/xen
Ingo Molnar [Sun, 12 Oct 2008 11:20:25 +0000 (13:20 +0200)]
Merge branches 'core/signal' and 'x86/spinlocks' into x86/xen

Conflicts:
include/asm-x86/spinlock.h

16 years agoMerge branch 'x86/signal' into core/signal
Ingo Molnar [Sun, 12 Oct 2008 11:17:07 +0000 (13:17 +0200)]
Merge branch 'x86/signal' into core/signal

16 years agoMerge branch 'linus' into x86/signal
Ingo Molnar [Sun, 12 Oct 2008 10:49:27 +0000 (12:49 +0200)]
Merge branch 'linus' into x86/signal

Conflicts:
arch/x86/kernel/signal_64.c

16 years agoMerge branch 'linus' into x86/quirks
Ingo Molnar [Sun, 12 Oct 2008 10:43:21 +0000 (12:43 +0200)]
Merge branch 'linus' into x86/quirks

Conflicts:
arch/x86/kernel/early-quirks.c

16 years agoMerge branch 'linus' into x86/spinlocks
Ingo Molnar [Sun, 12 Oct 2008 10:39:30 +0000 (12:39 +0200)]
Merge branch 'linus' into x86/spinlocks

Done to prevent this failure of an Octopus merge:

 Added arch/arm/include/asm/byteorder.h in both, but differently.
 ERROR: Merge conflict in arch/arm/include/asm/byteorder.h
 Auto-merging include/asm-x86/spinlock.h
 ERROR: Merge conflict in include/asm-x86/spinlock.h
 fatal: merge program failed

16 years agoMerge branch 'linus' into x86/xen
Ingo Molnar [Sun, 12 Oct 2008 10:35:23 +0000 (12:35 +0200)]
Merge branch 'linus' into x86/xen

Conflicts:
arch/x86/kernel/cpu/common.c
arch/x86/kernel/process_64.c
arch/x86/xen/enlighten.c