]> Git Repo - linux.git/log
linux.git
16 years agoserial: 8250: fix shared interrupts issues with SMP and RT kernels
Anton Vorontsov [Tue, 22 Jul 2008 10:21:07 +0000 (11:21 +0100)]
serial: 8250: fix shared interrupts issues with SMP and RT kernels

With SMP kernels _irqsave spinlock disables only local interrupts, while
the shared serial interrupt could be assigned to the CPU that is not
currently starting up the serial port.

This might cause issues because serial8250_startup() routine issues
IRQ-triggering operations before registering the port in the IRQ chain
(though, this is fine to do and done explicitly because we don't want to
process any interrupts on the port startup).

With RT kernels and preemptable hardirqs, _irqsave spinlock does not
disable local hardirqs, and the bug could be reproduced much easily:

$ cat /dev/ttyS0 &
$ cat /dev/ttyS1
irq 42: nobody cared (try booting with the "irqpoll" option)
Call Trace:
[C0475EB0] [C0008A98] show_stack+0x4c/0x1ac (unreliable)
[C0475EF0] [C004BBD4] __report_bad_irq+0x34/0xb8
[C0475F10] [C004BD38] note_interrupt+0xe0/0x308
[C0475F50] [C004B09C] thread_simple_irq+0xdc/0x104
[C0475F70] [C004B3FC] do_irqd+0x338/0x3c8
[C0475FC0] [C00398E0] kthread+0xf8/0x100
[C0475FF0] [C0011FE0] original_kernel_thread+0x44/0x60
handlers:
[<c02112c4>] (serial8250_interrupt+0x0/0x138)
Disabling IRQ #42

After this, all serial ports on the given IRQ are non-functional.

To fix the issue we should explicitly disable shared IRQ before
issuing any IRQ-triggering operations.

I also changed spin_lock_irqsave to the ordinary spin_lock, since it
seems to be safe: chain does not contain new port (yet), thus nobody
will interfere us from the ISRs.

Signed-off-by: Anton Vorontsov <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoFix the epca driver to permit epca_setup() to be invoked from the kernel cmdline
David Howells [Tue, 22 Jul 2008 10:20:45 +0000 (11:20 +0100)]
Fix the epca driver to permit epca_setup() to be invoked from the kernel cmdline

Fix the epca driver to call epca_setup() if digiepca=xxx is included on the
command line and the epca driver is built in.

epca_setup() used to be called from init/main.c in 2.2 kernels, but somewhere
along the way that call was removed but not replaced.

Signed-off-by: David Howells <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoChar: mxser, add CP-102UF support
Jiri Slaby [Tue, 22 Jul 2008 10:20:34 +0000 (11:20 +0100)]
Char: mxser, add CP-102UF support

Add support for CP-102UF moxa card (update to 1.12 original driver) and
increment this driver version.

(Somewhat reworked by [email protected] to merge in with other patches)

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agospecialix: restore driver using new break functionality
Alan Cox [Tue, 22 Jul 2008 10:19:05 +0000 (11:19 +0100)]
specialix: restore driver using new break functionality

Use the hardware break support on the specialix driver

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoFix the (i)Stallion driver's putchar() and break_ctl() ops
David Howells [Tue, 22 Jul 2008 10:18:43 +0000 (11:18 +0100)]
Fix the (i)Stallion driver's putchar() and break_ctl() ops

Fix the Stallion driver's putchar() and break_ctl() ops and iStallion's
putchar() to return values.

Is it actually possible for putchar() or break_ctl() to be called with tty ==
NULL or can the check be discarded?

Should stl_write() be returning 0 if tty->driver_data is NULL or tx.buf is
NULL?  Is this even possible?

I've made Stallion's functions return -EINVAL as stli_breakctl() if the checks
fail.

Signed-off-by: David Howells <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoriscom8: Restore driver using new break functionality
Alan Cox [Tue, 22 Jul 2008 10:18:30 +0000 (11:18 +0100)]
riscom8: Restore driver using new break functionality

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoisicom: restore using hardware break support
Alan Cox [Tue, 22 Jul 2008 10:18:21 +0000 (11:18 +0100)]
isicom: restore using hardware break support

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoepca: Restore driver
Alan Cox [Tue, 22 Jul 2008 10:18:12 +0000 (11:18 +0100)]
epca: Restore driver

Convert the driver to use the added hardware break support

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty: rework break handling
Alan Cox [Tue, 22 Jul 2008 10:18:03 +0000 (11:18 +0100)]
tty: rework break handling

Some hardware needs to do break handling itself and may have partial
support only. Make break_ctl return an error code. Add a tty driver flag
so you can indicate driver hardware side break support.

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty: Mark unconverted drivers as BROKEN
Alan Cox [Tue, 22 Jul 2008 10:17:53 +0000 (11:17 +0100)]
tty: Mark unconverted drivers as BROKEN

Nobody seems to use these drivers anyway so if they want them they can
fix them up. I don't have the needed info to add break_ctl support to them.
Send patches if you don't like it.

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agomxser: remove dead code
Alan Cox [Tue, 22 Jul 2008 10:17:43 +0000 (11:17 +0100)]
mxser: remove dead code

Old style ioctl break code can go

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoepca: Fix comments and move break
Alan Cox [Tue, 22 Jul 2008 10:17:32 +0000 (11:17 +0100)]
epca: Fix comments and move break

The ioctls it talks about are midlayer provided.

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agospecialix: Code cleanups
Alan Cox [Tue, 22 Jul 2008 10:17:16 +0000 (11:17 +0100)]
specialix: Code cleanups

Go through the inlines and other oddments that are iffy. Remove various bits
of dead code and bogus debug. Turn the crtsdts compile time option into a
runtime switch.

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agospecialix: Tidy up coding style
Alan Cox [Tue, 22 Jul 2008 10:17:05 +0000 (11:17 +0100)]
specialix: Tidy up coding style

Preparation for doing some real work on the driver. Do this first so we can
easily identify if the cleanups accidentally broke something

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty: Split ldisc code into its own file
Alan Cox [Tue, 22 Jul 2008 10:16:55 +0000 (11:16 +0100)]
tty: Split ldisc code into its own file

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoio_edgeport: Fix various bogus returns to the tty layer
Alan Cox [Tue, 22 Jul 2008 10:16:42 +0000 (11:16 +0100)]
io_edgeport: Fix various bogus returns to the tty layer

The edgeport reports negative error codes to functions that do not
expect them. This can cause ports to jam forever

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-io_edgeport: Coding style
Alan Cox [Tue, 22 Jul 2008 10:16:34 +0000 (11:16 +0100)]
tty-usb-io_edgeport: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-mos7720: Coding style
Alan Cox [Tue, 22 Jul 2008 10:16:21 +0000 (11:16 +0100)]
tty-usb-mos7720: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agomos7840: remove loads of bogus assignments to status
Alan Cox [Tue, 22 Jul 2008 10:16:12 +0000 (11:16 +0100)]
mos7840: remove loads of bogus assignments to status

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoomninet: Use string flip functions
Alan Cox [Tue, 22 Jul 2008 10:16:03 +0000 (11:16 +0100)]
omninet: Use string flip functions

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-omninet: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:54 +0000 (11:15 +0100)]
tty-usb-omninet: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-option: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:45 +0000 (11:15 +0100)]
tty-usb-option: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-oti6858: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:36 +0000 (11:15 +0100)]
tty-usb-oti6858: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-safe-serial: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:26 +0000 (11:15 +0100)]
tty-usb-safe-serial: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-ti-usb: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:17 +0000 (11:15 +0100)]
tty-usb-ti-usb: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-spcp8x5: Minor coding style
Alan Cox [Tue, 22 Jul 2008 10:15:08 +0000 (11:15 +0100)]
tty-usb-spcp8x5: Minor coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-sierra: Coding style - minor
Alan Cox [Tue, 22 Jul 2008 10:14:59 +0000 (11:14 +0100)]
tty-usb-sierra: Coding style - minor

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-pl2303: Coding style
Alan Cox [Tue, 22 Jul 2008 10:14:49 +0000 (11:14 +0100)]
tty-usb-pl2303: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agomct_u232: Use flip buffer functions
Alan Cox [Tue, 22 Jul 2008 10:14:40 +0000 (11:14 +0100)]
mct_u232: Use flip buffer functions

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-mct-u232: Coding style
Alan Cox [Tue, 22 Jul 2008 10:14:30 +0000 (11:14 +0100)]
tty-usb-mct-u232: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agokobil_sct: Fix ioctls
Alan Cox [Tue, 22 Jul 2008 10:14:22 +0000 (11:14 +0100)]
kobil_sct: Fix ioctls

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-kobil-sct: Coding style
Alan Cox [Tue, 22 Jul 2008 10:14:10 +0000 (11:14 +0100)]
tty-usb-kobil-sct: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-kl5kusb105: Coding style
Alan Cox [Tue, 22 Jul 2008 10:14:00 +0000 (11:14 +0100)]
tty-usb-kl5kusb105: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agokeyspan_pda: Use string flip functions
Alan Cox [Tue, 22 Jul 2008 10:13:51 +0000 (11:13 +0100)]
keyspan_pda: Use string flip functions

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-keyspan-pda: Coding style
Alan Cox [Tue, 22 Jul 2008 10:13:42 +0000 (11:13 +0100)]
tty-usb-keyspan-pda: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agokeyspan: Use string flip functions when possible
Alan Cox [Tue, 22 Jul 2008 10:13:32 +0000 (11:13 +0100)]
keyspan: Use string flip functions when possible

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-keyspan: Coding style
Alan Cox [Tue, 22 Jul 2008 10:13:08 +0000 (11:13 +0100)]
tty-usb-keyspan: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-iuu-phoenix: Clean up to coding style
Alan Cox [Tue, 22 Jul 2008 10:12:59 +0000 (11:12 +0100)]
tty-usb-iuu-phoenix: Clean up to coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-ipw: Coding style
Alan Cox [Tue, 22 Jul 2008 10:12:51 +0000 (11:12 +0100)]
tty-usb-ipw: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoipaq: Coding style
Alan Cox [Tue, 22 Jul 2008 10:12:41 +0000 (11:12 +0100)]
ipaq: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoio_ti: Minor coding style
Alan Cox [Tue, 22 Jul 2008 10:12:33 +0000 (11:12 +0100)]
io_ti: Minor coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agousb-serial: Coding style
Alan Cox [Tue, 22 Jul 2008 10:12:24 +0000 (11:12 +0100)]
usb-serial: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-visor: Coding style
Alan Cox [Tue, 22 Jul 2008 10:12:15 +0000 (11:12 +0100)]
tty-usb-visor: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-hp4x: Fix overlong line
Alan Cox [Tue, 22 Jul 2008 10:12:05 +0000 (11:12 +0100)]
tty-usb-hp4x: Fix overlong line

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-generic: Code cleanup
Alan Cox [Tue, 22 Jul 2008 10:11:55 +0000 (11:11 +0100)]
tty-usb-generic: Code cleanup

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agogarmin_gps: Coding style
Alan Cox [Tue, 22 Jul 2008 10:11:44 +0000 (11:11 +0100)]
garmin_gps: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agofunsoft: Switch to linux/uaccess
Alan Cox [Tue, 22 Jul 2008 10:11:34 +0000 (11:11 +0100)]
funsoft: Switch to linux/uaccess

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoftdi_sio: Coding style
Alan Cox [Tue, 22 Jul 2008 10:11:23 +0000 (11:11 +0100)]
ftdi_sio: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoempeg: Coding style
Alan Cox [Tue, 22 Jul 2008 10:11:11 +0000 (11:11 +0100)]
empeg: Coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agodigi_acceleport: coding style
Alan Cox [Tue, 22 Jul 2008 10:11:02 +0000 (11:11 +0100)]
digi_acceleport: coding style

Code tidy

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agousb-cypress: There is no 0 case to go with CS5/6/7/8 so remove the test
Alan Cox [Tue, 22 Jul 2008 10:10:53 +0000 (11:10 +0100)]
usb-cypress: There is no 0 case to go with CS5/6/7/8 so remove the test

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agocypress_m8: coding style
Alan Cox [Tue, 22 Jul 2008 10:10:36 +0000 (11:10 +0100)]
cypress_m8: coding style

Coding style clean ups

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agocyberjack: Coding style
Alan Cox [Tue, 22 Jul 2008 10:10:27 +0000 (11:10 +0100)]
cyberjack: Coding style

Coding style fixups

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agocp2101: coding style
Alan Cox [Tue, 22 Jul 2008 10:10:17 +0000 (11:10 +0100)]
cp2101: coding style

Bring up to coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-console: Fix termios
Alan Cox [Tue, 22 Jul 2008 10:10:08 +0000 (11:10 +0100)]
tty-usb-console: Fix termios

Setting CFLAG bits is all well and good but you must sort out ispeed and
ospeed properly.

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotty-usb-console: tidy the USB console code
Alan Cox [Tue, 22 Jul 2008 10:09:57 +0000 (11:09 +0100)]
tty-usb-console: tidy the USB console code

Code tidy

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agousb-serial-bus: tidy coding style
Alan Cox [Tue, 22 Jul 2008 10:09:48 +0000 (11:09 +0100)]
usb-serial-bus: tidy coding style

Tidy up

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agobelkin_sa: clean up code
Alan Cox [Tue, 22 Jul 2008 10:09:39 +0000 (11:09 +0100)]
belkin_sa: clean up code

Coding style tidy up for belkin_sa

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agowhiteheat: fix bugs found in the tidy and audit
Alan Cox [Tue, 22 Jul 2008 10:09:29 +0000 (11:09 +0100)]
whiteheat: fix bugs found in the tidy and audit

Termios tidy up, plus fix break and DTR.

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agowhiteheat: coding style
Alan Cox [Tue, 22 Jul 2008 10:09:16 +0000 (11:09 +0100)]
whiteheat: coding style

Bring ezusb and whiteheat into line with the coding style

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agousb_serial: API all change
Alan Cox [Tue, 22 Jul 2008 10:09:07 +0000 (11:09 +0100)]
usb_serial: API all change

USB serial likes to use port->tty back pointers for the real work it does and
to do so without any actual locking. Unfortunately when you consider hangup
events, hangup/parallel reopen or even worse hangup followed by parallel close
events the tty->port and port->tty pointers are not guaranteed to be the same
as port->tty is the active tty while tty->port is the port the tty may or
may not still be attached to.

So rework the entire API to pass the tty struct. For console cases we need
to pass both for now. This shows up multiple drivers that immediately crash
with USB console some of which have been fixed in the process.

Longer term we need a proper tty as console abstraction

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agottydev: Fix up compile failures in the PPC build
Alan Cox [Tue, 22 Jul 2008 10:08:53 +0000 (11:08 +0100)]
ttydev: Fix up compile failures in the PPC build

Fix up a couple of reported merge problems

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agomarkers: fix duplicate modpost entry
Mathieu Desnoyers [Mon, 21 Jul 2008 21:21:38 +0000 (14:21 -0700)]
markers: fix duplicate modpost entry

When a kernel was rebuilt, the previous Module.markers was not cleared.
It caused markers with different format strings to appear as duplicates
when a markers was changed.  This problem is present since
scripts/mod/modpost.c started to generate Module.markers, commit
b2e3e658b344c6bcfb8fb694100ab2f2b5b2edb0

It therefore applies to 2.6.25, 2.6.26 and linux-next.

I merely merged the patches from Roland, Wenji and Takashi here.

Credits to
Roland McGrath <[email protected]>
Wenji Huang <[email protected]>
and
Takashi Nishiie <[email protected]>

for providing the individual fixes.

- Changelog :
  - Integrated Takashi's Makefile modification to clear Module.markers upon
    make clean.

Signed-off-by: Mathieu Desnoyers <[email protected]>
Cc: Roland McGrath <[email protected]>
Cc: Wenji Huang <[email protected]>
Cc: Takashi Nishiie <[email protected]>
Cc: <[email protected]> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoFix build on COMPAT platforms when CONFIG_EPOLL is disabled
Atsushi Nemoto [Mon, 21 Jul 2008 21:21:37 +0000 (14:21 -0700)]
Fix build on COMPAT platforms when CONFIG_EPOLL is disabled

Add missing cond_syscall() entry for compat_sys_epoll_pwait.

Signed-off-by: Atsushi Nemoto <[email protected]>
Cc: Davide Libenzi <[email protected]>
Cc: <[email protected]> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agotpm: MAINTAINERS whitespace fix and email addresses addition
Rajiv Andrade [Mon, 21 Jul 2008 21:21:37 +0000 (14:21 -0700)]
tpm: MAINTAINERS whitespace fix and email addresses addition

Signed-off-by: Rajiv Andrade <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoproc: fix /proc/*/pagemap some more
Alexey Dobriyan [Mon, 21 Jul 2008 21:21:36 +0000 (14:21 -0700)]
proc: fix /proc/*/pagemap some more

struct pagemap_walk was placed on stack, some hooks are initialized, the
rest (->pgd_entry, ->pud_entry, ->pte_entry) are valid but junk.

Reported-by: Eric Sesterhenn <[email protected]>
Signed-off-by: Alexey Dobriyan <[email protected]>
Cc: "Vegard Nossum" <[email protected]>
Cc: <[email protected]> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agocpusets: fix wrong domain attr updates
Miao Xie [Mon, 21 Jul 2008 21:21:35 +0000 (14:21 -0700)]
cpusets: fix wrong domain attr updates

Fix wrong domain attr updates, or we will always update the first sched
domain attr.

Signed-off-by: Miao Xie <[email protected]>
Cc: Hidetoshi Seto <[email protected]>
Cc: Paul Jackson <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: <[email protected]> [2.6.26.x]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agogpio: pcf857x: add lock and handle more chips
David Brownell [Mon, 21 Jul 2008 21:21:34 +0000 (14:21 -0700)]
gpio: pcf857x: add lock and handle more chips

Two small updates to the pcf857x driver: (a) the max732[89] chips are
also second sources for the pcf8574/a, and (b) add a mutex to prevent
trashing the cached state.  Adding the lock is effectively a bugfix,
although it seems unlikely that anyone would have run into the issue it
protects against.

Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agogpio: gpio driver for max7301 SPI GPIO expander
Juergen Beisert [Mon, 21 Jul 2008 21:21:34 +0000 (14:21 -0700)]
gpio: gpio driver for max7301 SPI GPIO expander

Maxim's MAX7301 is an SPI GPIO expander with 28 GPIOs.  Note: MAX7301's
interrupt feature is not supported yet.

[[email protected]: coding-style fixes]
[[email protected]: Fix inaccuracies in comments, check spi_setup()
return code, mask off high byte in max7301_read()]
Signed-off-by: Juergen Beisert <[email protected]>
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agoexecve filename: document and export via auxiliary vector
John Reiser [Mon, 21 Jul 2008 21:21:32 +0000 (14:21 -0700)]
execve filename: document and export via auxiliary vector

The Linux kernel puts the filename argument of execve() into the new
address space.  Many developers are surprised to learn this.  Those who
know and could use it, object "But it's not documented."

Those who want to use it dislike the expression
  (char *)(1+ strlen(env[-1+ n_env]) + env[-1+ n_env])
because it requires locating the last original environment variable,
and assumes that the filename follows the characters.

This patch documents the insertion of the filename, and makes it easier
to find by adding a new tag AT_EXECFN in the ElfXX_auxv_t; see <elf.h>.

In many cases readlink("/proc/self/exe",) gives the same answer.  But if
all the original pages get unmapped, then the kernel erases the symlink
for /proc/self/exe.  This can happen when a program decompressor does a
good job of cleaning up after uncompressing directly to memory, so that
the address space of the target program looks the same as if compression
had never happened.  One example is http://upx.sourceforge.net .

One notable use of the underlying concept (what path containED the
executable) is glibc expanding $ORIGIN in DT_RUNPATH.  In practice for
the near term, it may be a good idea for user-mode code to use both
/proc/self/exe and AT_EXECFN as fall-back methods for each other.
/proc/self/exe can fail due to unmapping, AT_EXECFN can fail because it
won't be present on non-new systems.  The auxvec or {AT_EXECFN}.d_val
also can get overwritten, although in nearly all cases this would be the
result of a bug.

The runtime cost is one NEW_AUX_ENT using two words of stack space.  The
underlying value is maintained already as bprm->exec; setup_arg_pages()
in fs/exec.c slides it for stack_shift, etc.

Signed-off-by: John Reiser <[email protected]>
Cc: Roland McGrath <[email protected]>
Cc: Jakub Jelinek <[email protected]>
Cc: Ulrich Drepper <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
16 years agox86: fix crash due to missing debugctlmsr on AMD K6-3
Jan Kratochvil [Tue, 22 Jul 2008 12:00:47 +0000 (14:00 +0200)]
x86: fix crash due to missing debugctlmsr on AMD K6-3

currently if you use PTRACE_SINGLEBLOCK on AMD K6-3 (i586) it will crash.
Kernel now wrongly assumes existing DEBUGCTLMSR MSR register there.

Removed the assumption also for some other non-K6 CPUs but I am not sure there
(but it can only bring small inefficiency there if my assumption is wrong).

Based on info from Roland McGrath, Chuck Ebbert and Mikulas Patocka.
More info at:
https://bugzilla.redhat.com/show_bug.cgi?id=456175

Signed-off-by: Jan Kratochvil <[email protected]>
Cc: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
16 years agoremove CONFIG_KMOD from core kernel code
Johannes Berg [Tue, 8 Jul 2008 17:00:17 +0000 (19:00 +0200)]
remove CONFIG_KMOD from core kernel code

Always compile request_module when the kernel allows modules.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
16 years agoremove CONFIG_KMOD from lib
Johannes Berg [Tue, 8 Jul 2008 17:00:24 +0000 (19:00 +0200)]
remove CONFIG_KMOD from lib

textsearch algorithms can be loaded, make the code depend
on CONFIG_MODULES instead of CONFIG_KMOD.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
16 years agoremove CONFIG_KMOD from sparc64
Johannes Berg [Tue, 8 Jul 2008 17:00:20 +0000 (19:00 +0200)]
remove CONFIG_KMOD from sparc64

One place is just a comment, the other a conditional, unused
inclusion of linux/kmod.h.

Signed-off-by: Johannes Berg <[email protected]>
Cc: David S. Miller <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
16 years agorework try_then_request_module to do less in non-modular kernels
Johannes Berg [Tue, 8 Jul 2008 17:00:18 +0000 (19:00 +0200)]
rework try_then_request_module to do less in non-modular kernels

This reworks try_then_request_module to only invoke the "lookup"
function "x" once when the kernel is not modular.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
16 years agoremove mention of CONFIG_KMOD from documentation
Johannes Berg [Tue, 8 Jul 2008 17:00:25 +0000 (19:00 +0200)]
remove mention of CONFIG_KMOD from documentation

Also includes a few Kconfig files (xtensa, blackfin)

Signed-off-by: Johannes Berg <[email protected]>
Cc: Michael Kerrisk <[email protected]>
Cc: [email protected]
Signed-off-by: Rusty Russell <[email protected]>
Acked-by: Randy Dunlap <[email protected]>
16 years agomake CONFIG_KMOD invisible
Johannes Berg [Tue, 8 Jul 2008 17:00:16 +0000 (19:00 +0200)]
make CONFIG_KMOD invisible

... as preparation for removing it completely, make it an
invisible bool defaulting to yes.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
16 years agomodules: Take a shortcut for checking if an address is in a module
Rusty Russell [Wed, 23 Jul 2008 00:24:28 +0000 (19:24 -0500)]
modules: Take a shortcut for checking if an address is in a module

This patch keeps track of the boundaries of module allocation, in
order to speed up module_text_address().

Inspired by Arjan's version, which required arch-specific defines:

Various pieces of the kernel (lockdep, latencytop, etc) tend
to store backtraces, sometimes at a relatively high
frequency. In itself this isn't a big performance deal (after
all you're using diagnostics features), but there have been
some complaints from people who have over 100 modules loaded
that this is a tad too slow.

This is due to the new backtracer code which looks at every
slot on the stack to see if it's a kernel/module text address,
so that's 1024 slots.  1024 times 100 modules... that's a lot
of list walking.

Signed-off-by: Rusty Russell <[email protected]>
16 years agomodule: turn longs into ints for module sizes
Denys Vlasenko [Wed, 23 Jul 2008 00:24:27 +0000 (19:24 -0500)]
module: turn longs into ints for module sizes

This shrinks module.o and each *.ko file.

And finally, structure members which hold length of module
code (four such members there) and count of symbols
are converted from longs to ints.

We cannot possibly have a module where 32 bits won't
be enough to hold such counts.

For one, module loading checks module size for sanity
before loading, so such insanely big module will fail
that test first.

Signed-off-by: Denys Vlasenko <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
16 years agoShrink struct module: CONFIG_UNUSED_SYMBOLS ifdefs
Denys Vlasenko [Wed, 23 Jul 2008 00:24:26 +0000 (19:24 -0500)]
Shrink struct module: CONFIG_UNUSED_SYMBOLS ifdefs

module.c and module.h conatains code for finding
exported symbols which are declared with EXPORT_UNUSED_SYMBOL,
and this code is compiled in even if CONFIG_UNUSED_SYMBOLS is not set
and thus there can be no EXPORT_UNUSED_SYMBOLs in modules anyway
(because EXPORT_UNUSED_SYMBOL(x) are compiled out to nothing then).

This patch adds required #ifdefs.

Signed-off-by: Denys Vlasenko <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
16 years agomodule: reorder struct module to save space on 64 bit builds
Richard Kennedy [Wed, 23 Jul 2008 00:24:26 +0000 (19:24 -0500)]
module: reorder struct module to save space on 64 bit builds

reorder struct module to save space on 64 bit builds.
saves 1 cacheline_size  (128 on default x86_64 & 64 on AMD
Opteron/athlon) when CONFIG_MODULE_UNLOAD=y.

Signed-off-by: Richard Kennedy <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
16 years agomodule: generic each_symbol iterator function
Rusty Russell [Wed, 23 Jul 2008 00:24:25 +0000 (19:24 -0500)]
module: generic each_symbol iterator function

Introduce an each_symbol() iterator to avoid duplicating the knowledge
about the 5 different sections containing symbols.  Currently only
used by find_symbol(), but will be used by symbol_put_addr() too.

(Includes NULL ptr deref fix by Jiri Kosina <[email protected]>)

Signed-off-by: Rusty Russell <[email protected]>
Cc: Jiri Kosina <[email protected]>
16 years agomodule: don't use stop_machine for waiting rmmod
Rusty Russell [Wed, 23 Jul 2008 00:24:25 +0000 (19:24 -0500)]
module: don't use stop_machine for waiting rmmod

rmmod has a little-used "-w" option, meaning that instead of failing if the
module is in use, it should block until the module becomes unused.

In this case, we don't need to use stop_machine: Max Krasnyansky
indicated that would be useful for SystemTap which loads/unloads new
modules frequently.

Cc: Max Krasnyansky <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
16 years agox86: add PTE_FLAGS_MASK
Jeremy Fitzhardinge [Tue, 22 Jul 2008 05:59:56 +0000 (22:59 -0700)]
x86: add PTE_FLAGS_MASK

PTE_PFN_MASK was getting lonely, so I made it a friend.

Signed-off-by: Jeremy Fitzhardinge <[email protected]>
Cc: Rusty Russell <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
16 years agox86: rename PTE_MASK to PTE_PFN_MASK
Jeremy Fitzhardinge [Tue, 22 Jul 2008 05:59:42 +0000 (22:59 -0700)]
x86: rename PTE_MASK to PTE_PFN_MASK

Rusty, in his peevish way, complained that macros defining constants
should have a name which somewhat accurately reflects the actual
purpose of the constant.

Aside from the fact that PTE_MASK gives no clue as to what's actually
being masked, and is misleadingly similar to the functionally entirely
different PMD_MASK, PUD_MASK and PGD_MASK, I don't really see what the
problem is.

But if this patch silences the incessent noise, then it will have
achieved its goal (TODO: write test-case).

Signed-off-by: Jeremy Fitzhardinge <[email protected]>
Cc: Rusty Russell <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
16 years agox86: fix pte_flags() to only return flags, fix lguest (updated)
Rusty Russell [Tue, 22 Jul 2008 05:40:46 +0000 (15:40 +1000)]
x86: fix pte_flags() to only return flags, fix lguest (updated)

(Jeremy said:
rusty: use PTE_MASK
rusty: use PTE_MASK
rusty: use PTE_MASK
 When I asked:
jsgf: does that include the NX flag?
 He responded eloquently:
rusty: use PTE_MASK
rusty: use PTE_MASK
yes, it's the official constant of masking flags out of ptes
)

Change a15af1c9ea2750a9ff01e51615c45950bad8221b 'x86/paravirt: add
pte_flags to just get pte flags' removed lguest's private pte_flags()
in favor of a generic one.

Unfortunately, the generic one doesn't filter out the non-flags bits:
this results in lguest creating corrupt shadow page tables and blowing
up host memory.

Since noone is supposed to use the pfn part of pte_flags(), it seems
safest to always do the filtering.

Signed-off-by: Rusty Russell <[email protected]>
Acked-by: Jeremy Fitzhardinge <[email protected]>
Signed-off-and-morning-tea-spilled-by: Ingo Molnar <[email protected]>
16 years agoMerge commit 'origin/master'
Benjamin Herrenschmidt [Tue, 22 Jul 2008 07:12:37 +0000 (17:12 +1000)]
Merge commit 'origin/master'

Manually fixed up:

drivers/net/fs_enet/fs_enet-main.c

16 years agox86: use setup_clear_cpu_cap with disable_apic, fix
Yinghai Lu [Mon, 21 Jul 2008 18:21:43 +0000 (11:21 -0700)]
x86: use setup_clear_cpu_cap with disable_apic, fix

beauty fix: /proc/cpuinfo will still show apic feature even if
we booted up with it disabled.

Signed-off-by: Yinghai Lu <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
16 years agoarm: bus_id -> dev_name() and dev_set_name() conversions
Kay Sievers [Fri, 30 May 2008 15:42:11 +0000 (17:42 +0200)]
arm: bus_id -> dev_name() and dev_set_name() conversions

Signed-off-by: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agosparc64: fix up bus_id changes in sparc core code
Greg Kroah-Hartman [Fri, 2 May 2008 04:02:41 +0000 (06:02 +0200)]
sparc64: fix up bus_id changes in sparc core code

This converts all instances of bus_id in the sparc core kernel to use
either dev_set_name(), or dev_name() depending on the need.

This is done in anticipation of removing the bus_id field from struct
driver.

Cc: Kay Sievers <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years ago3c59x: handle pci_name() being const
Greg Kroah-Hartman [Wed, 2 Jul 2008 19:46:22 +0000 (12:46 -0700)]
3c59x: handle pci_name() being const

This changes vortex_prob1() to handle pci_name() now returning a
constant string.

Cc: Steffen Klassert <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoMTD: handle pci_name() being const
Greg Kroah-Hartman [Wed, 2 Jul 2008 19:46:22 +0000 (12:46 -0700)]
MTD: handle pci_name() being const

This changes the MTD core to handle pci_name() now returning a constant
string.

Cc: David Woodhouse <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agoHP iLO driver
David Altobelli [Wed, 2 Jul 2008 15:38:53 +0000 (09:38 -0600)]
HP iLO driver

A driver for the HP iLO/iLO2 management processor, which allows userspace
programs to query the management processor.  Programs can open a channel
to the device (/dev/hpilo/dXccbN), and use this to send/receive queries.
The O_EXCL open flag is used to indicate that a particular channel cannot
be shared between processes.  This driver will replace various packages
HP has shipped, including hprsm and hp-ilo.

Signed-off-by: David Altobelli <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agosysdev: Convert the x86 mce tolerant sysdev attribute to generic attribute
Andi Kleen [Tue, 1 Jul 2008 16:48:43 +0000 (18:48 +0200)]
sysdev: Convert the x86 mce tolerant sysdev attribute to generic attribute

Use the new generic int attribute accessors for the x86 mce tolerant
attribute. Simple example to illustrate the new macros.

There are much more places all over the tree that could be converted
like this.

Signed-off-by: Andi Kleen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agosysdev: Add utility functions for simple int/ulong variable sysdev attributes
Andi Kleen [Tue, 1 Jul 2008 16:48:42 +0000 (18:48 +0200)]
sysdev: Add utility functions for simple int/ulong variable sysdev attributes

This adds a new sysdev_ext_attribute that stores a pointer to the variable
it manages and some utility functions/macro to easily use them.

Previously all users wrote custom macros to generate show/store
functions for each variable, with this it is possible to avoid
that in many cases.

Signed-off-by: Andi Kleen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agosysdev: Pass the attribute to the low level sysdev show/store function
Andi Kleen [Tue, 1 Jul 2008 16:48:41 +0000 (18:48 +0200)]
sysdev: Pass the attribute to the low level sysdev show/store function

This allow to dynamically generate attributes and share show/store
functions between attributes. Right now most attributes are generated
by special macros and lots of duplicated code. With the attribute
passed it's instead possible to attach some data to the attribute
and then use that in shared low level functions to do different things.

I need this for the dynamically generated bank attributes in the x86
machine check code, but it'll allow some further cleanups.

I converted all users in tree to the new show/store prototype. It's a single
huge patch to avoid unbisectable sections.

Runtime tested: x86-32, x86-64
Compiled only: ia64, powerpc
Not compile tested/only grep converted: sh, arm, avr32

Signed-off-by: Andi Kleen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agodriver core: Suppress sysfs warnings for device_rename().
Cornelia Huck [Tue, 10 Jun 2008 09:09:08 +0000 (11:09 +0200)]
driver core: Suppress sysfs warnings for device_rename().

driver core: Suppress sysfs warnings for device_rename().

Renaming network devices to an already existing name is not
something we want sysfs to print a scary warning for, since the
callers can deal with this correctly. So let's introduce
sysfs_create_link_nowarn() which gets rid of the common warning.

Signed-off-by: Cornelia Huck <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agokobject: Transmit return value of call_usermodehelper() to caller
Wang Chen [Tue, 24 Jun 2008 08:59:02 +0000 (16:59 +0800)]
kobject: Transmit return value of call_usermodehelper() to caller

kobject_uevent_env() drops the return value of call_usermodehelper().
It will make upper caller, such as dm_send_uevents(), to lose error
information.

BTW, Previously kobject_uevent_env() transmitted return of
call_usermodehelper() to callers, but
commit 5f123fbd80f4f788554636f02bf73e40f914e0d6
"[PATCH] merge kobject_uevent and kobject_hotplug" removed it.

Signed-off-by: Wang Chen <[email protected]>
Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agosysfs-rules.txt: reword API stability statement
Nathan Lynch [Wed, 2 Jul 2008 17:21:30 +0000 (10:21 -0700)]
sysfs-rules.txt: reword API stability statement

The first paragraph of this document implies that user space developers
shouldn't use sysfs at all, but then it goes on to describe rules that
developers should follow when accessing sysfs.  Not only is this somewhat
self-contradictory, it has been shown to discourage developers from using
established sysfs interfaces.

A note of caution is more appropriate than a blanket "sysfs will never
be stable" assertion.

Signed-off-by: Nathan Lynch <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
16 years agodebugfs: Implement debugfs_remove_recursive()
Haavard Skinnemoen [Tue, 1 Jul 2008 13:14:51 +0000 (15:14 +0200)]
debugfs: Implement debugfs_remove_recursive()

debugfs_remove_recursive() will remove a dentry and all its children.
Drivers can use this to zap their whole debugfs tree so that they don't
need to keep track of every single debugfs dentry they created.

It may fail to remove the whole tree in certain cases:

sh-3.2# rmmod atmel-mci < /sys/kernel/debug/mmc0/ios/clock
mmc0: card b368 removed
atmel_mci atmel_mci.0: Lost dma0chan1, falling back to PIO
sh-3.2# ls /sys/kernel/debug/mmc0/
ios

But I'm not sure if that case can be handled in any sane manner.

Signed-off-by: Haavard Skinnemoen <[email protected]>
Cc: Pierre Ossman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This page took 0.162645 seconds and 4 git commands to generate.