]> err.no Git - linux-2.6/log
linux-2.6
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Wed, 23 Jul 2008 02:04:22 +0000 (19:04 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc32: pass -m32 when building vmlinux.lds
  sparc: Fixes the DRM layer build on sparc.
  ide: merge <asm-sparc/ide_64.h> with <asm-sparc/ide_32.h>
  ide: <asm-sparc/ide_64.h>: use __raw_{read,write}w()
  ide: <asm-sparc/ide_32.h>: use __raw_{read,write}w()
  ide: <asm-sparc/ide_64.h>: use %r0 for outw_be()
  sparc64: Do not define BIO_VMERGE_BOUNDARY.

16 years agosparc32: pass -m32 when building vmlinux.lds
Stephen Rothwell [Tue, 22 Jul 2008 22:47:17 +0000 (15:47 -0700)]
sparc32: pass -m32 when building vmlinux.lds

Otherwise it breaks since we merged asm/page.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosparc: Fixes the DRM layer build on sparc.
David S. Miller [Tue, 22 Jul 2008 21:30:55 +0000 (14:30 -0700)]
sparc: Fixes the DRM layer build on sparc.

By providing an ioremap_wc().

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 22 Jul 2008 20:40:24 +0000 (13:40 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/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 crash due to missing debugctlmsr on AMD K6-3
  x86: add PTE_FLAGS_MASK
  x86: rename PTE_MASK to PTE_PFN_MASK
  x86: fix pte_flags() to only return flags, fix lguest (updated)
  x86: use setup_clear_cpu_cap with disable_apic, fix
  x86: move the last Dprintk instance to pr_debug()

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Tue, 22 Jul 2008 20:17:15 +0000 (13:17 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  remove CONFIG_KMOD from core kernel code
  remove CONFIG_KMOD from lib
  remove CONFIG_KMOD from sparc64
  rework try_then_request_module to do less in non-modular kernels
  remove mention of CONFIG_KMOD from documentation
  make CONFIG_KMOD invisible
  modules: Take a shortcut for checking if an address is in a module
  module: turn longs into ints for module sizes
  Shrink struct module: CONFIG_UNUSED_SYMBOLS ifdefs
  module: reorder struct module to save space on 64 bit builds
  module: generic each_symbol iterator function
  module: don't use stop_machine for waiting rmmod

16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Tue, 22 Jul 2008 20:16:01 +0000 (13:16 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (49 commits)
  powerpc: Fix build bug with binutils < 2.18 and GCC < 4.2
  powerpc/eeh: Don't panic when EEH_MAX_FAILS is exceeded
  fbdev: Teaches offb about palette on radeon r5xx/r6xx
  powerpc/cell/edac: Log a syndrome code in case of correctable error
  powerpc/cell: Add DMA_ATTR_WEAK_ORDERING dma attribute and use in Cell IOMMU code
  powerpc: Indicate which oprofile counters to use while in compat mode
  powerpc/boot: Change spaces to tabs
  powerpc: Remove duplicate 6xx option in Kconfig
  powerpc: Use PPC_LONG and PPC_LONG_ALIGN in lib/string.S
  powerpc: Use PPC_LONG_ALIGN in uaccess.h
  powerpc: Add a #define for aligning to a long-sized boundary
  powerpc: Fix OF parsing of 64 bits PCI addresses
  powerpc: Use WARN_ON(1) instead of __WARN()
  powerpc: Fix support for latencytop
  powerpc/ps3: Update ps3_defconfig
  powerpc/ps3: Add a sub-match id to ps3_system_bus
  powerpc: Add a 6xx defconfig
  powerpc/dma: Use the struct dma_attrs in iommu code
  powerpc/cell: Add support for power button of future IBM cell blades
  powerpc/cell: Cleanup sysreset_hack for IBM cell blades
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Tue, 22 Jul 2008 20:13:47 +0000 (13:13 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (79 commits)
  arm: bus_id -> dev_name() and dev_set_name() conversions
  sparc64: fix up bus_id changes in sparc core code
  3c59x: handle pci_name() being const
  MTD: handle pci_name() being const
  HP iLO driver
  sysdev: Convert the x86 mce tolerant sysdev attribute to generic attribute
  sysdev: Add utility functions for simple int/ulong variable sysdev attributes
  sysdev: Pass the attribute to the low level sysdev show/store function
  driver core: Suppress sysfs warnings for device_rename().
  kobject: Transmit return value of call_usermodehelper() to caller
  sysfs-rules.txt: reword API stability statement
  debugfs: Implement debugfs_remove_recursive()
  HOWTO: change email addresses of James in HOWTO
  always enable FW_LOADER unless EMBEDDED=y
  uio-howto.tmpl: use unique output names
  uio-howto.tmpl: use standard copyright/legal markings
  sysfs: don't call notify_change
  sysdev: fix debugging statements in registration code.
  kobject: should use kobject_put() in kset-example
  kobject: reorder kobject to save space on 64 bit builds
  ...

16 years agoport_fixups: Fix ups for tty port changes
Alan Cox [Tue, 22 Jul 2008 14:25:07 +0000 (15:25 +0100)]
port_fixups: Fix ups for tty port changes

I missed the cpm_uart one. Thanks to Kumar Gala for reporting it. A double
check found samsung also needed fixing up.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoistallion: Use helpers
Alan Cox [Tue, 22 Jul 2008 12:44:14 +0000 (13:44 +0100)]
istallion: Use helpers

The ldisc needs to be referenced properly when used. The tty layer has a
helper for this which should have been used but this driver got missed
originally.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosynclink_gt fix locking in error path of rx enable
Paul Fulghum [Tue, 22 Jul 2008 10:23:24 +0000 (11:23 +0100)]
synclink_gt fix locking in error path of rx enable

Fix locking in error path of rx_enable() introduced by
synclink_gt-add-rx-dma-buffer-fill-level-control patch.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosynclink_gt: add rx DMA buffer fill level control
Paul Fulghum [Tue, 22 Jul 2008 10:22:14 +0000 (11:22 +0100)]
synclink_gt: add rx DMA buffer fill level control

Add run time control for receive DMA buffer fill level to allow
application to control receive latency when using stream oriented serial
protocols that pass receive data to application only after a DMA buffer
fills.  This was previously a compile time option, but run time control is
needed when application changes data rate (and latency requirements) or
uses different data rates on different ports.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosynclink_gt: leave transmitter in reset state after configuration
Paul Fulghum [Tue, 22 Jul 2008 10:22:04 +0000 (11:22 +0100)]
synclink_gt: leave transmitter in reset state after configuration

Leave the transmitter in reset state after configuration so that transmit
signal is held at mark until transmitter is explicitly enabled by
application, otherwise transmitter sends idle pattern.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosynclink_gt: improve TIOCOUTQ accuracy
Paul Fulghum [Tue, 22 Jul 2008 10:21:55 +0000 (11:21 +0100)]
synclink_gt: improve TIOCOUTQ accuracy

Improve the accuracy of TIOCOUTQ value as implemented in chars_in_buffer()
method by walking and counting tx DMA buffers, reading controller tx FIFO
level and accounting for controller tx shift register.  The greatly
improves application control of transmit latency at lower data rates.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosynclink_gt: add serial bit order control
Paul Fulghum [Tue, 22 Jul 2008 10:21:39 +0000 (11:21 +0100)]
synclink_gt: add serial bit order control

Add control of hardware serial bit order between LSB first
(default/standard) and MSB first.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosynclink_gt: improve and simplify write method
Paul Fulghum [Tue, 22 Jul 2008 10:21:28 +0000 (11:21 +0100)]
synclink_gt: improve and simplify write method

Improve write method by allowing multiple HDLC frames to be loaded into tx
DMA buffer ring for continuous frame transmission.  This simplifies the
transmit code by using the common procedures for all serial protocols.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agon_hdlc: honor O_NONBLOCK on write
Paul Fulghum [Tue, 22 Jul 2008 10:21:19 +0000 (11:21 +0100)]
n_hdlc: honor O_NONBLOCK on write

Make n_hdlc line discipline honor the O_NONBLOCK file flag on write.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <avorontsov@ru.mvista.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <dhowells@redhat.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 alan@redhat.com to merge in with other patches)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <dhowells@redhat.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <roland@redhat.com>
Wenji Huang <wenji.huang@oracle.com>
and
Takashi Nishiie <t-nishiie@np.css.fujitsu.com>

for providing the individual fixes.

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

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Roland McGrath <roland@redhat.com>
Cc: Wenji Huang <wenji.huang@oracle.com>
Cc: Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <anemo@mba.ocn.ne.jp>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <srajiv@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <snakebyte@gmx.de>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Vegard Nossum" <vegard.nossum@gmail.com>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <miaox@cn.fujitsu.com>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org> [2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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.

[akpm@linux-foundation.org: coding-style fixes]
[g.liakhovetski@pengutronix.de: Fix inaccuracies in comments, check spi_setup()
return code, mask off high byte in max7301_read()]
Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <jreiser@BitWagon.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <jan.kratochvil@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
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 <johannes@sipsolutions.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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 <johannes@sipsolutions.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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 <johannes@sipsolutions.net>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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 <johannes@sipsolutions.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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 <johannes@sipsolutions.net>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: linux-doc@vger.kernel.org
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
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 <johannes@sipsolutions.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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 <rusty@rustcorp.com.au>
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 <vda.linux@googlemail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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 <vda.linux@googlemail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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 <richard@rsk.demon.co.uk>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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 <jkosina@suse.cz>)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jiri Kosina <jkosina@suse.cz>
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 <maxk@qualcomm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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 <jeremy@goop.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>