1
0
Fork 0
Commit Graph

2114 Commits (4f5c791a850e5305a5b1b48d0e4b4de248dc96f9)

Author SHA1 Message Date
Amit Choudhary d9a2f4a494 drivers/char/synclink.c: check kmalloc() return value
Signed-off-by: Amit Choudhary <amit2030@gmail.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:02 -07:00
Robert P. J. Day fd463870dc remove unused header file: drivers/char/digi.h
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:02 -07:00
Robert P. J. Day cd436afd6e rocket: remove modversions include
It misspelled "MODVERSIONS" preprocessor variable with "CONFIG_MODVERSIONS".
Just kill it all.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:02 -07:00
Alex Williamson d954e8edee tpm_infineon: add support for devices in mmio space
tAdd adds support for devices living in MMIO space to the Infineon TPM
driver.  These can be found on some of the newer HP ia64 systems.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Cc: Kylene Jo Hall <kjhall@us.ibm.com>
Acked-by: Marcel Selhorst <tpm@selhorst.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:02 -07:00
Prarit Bhargava ee527cd3a2 Use stop_machine_run in the Intel RNG driver
Replace call_smp_function with stop_machine_run in the Intel RNG driver.

CPU A has done read_lock(&lock)
CPU B has done write_lock_irq(&lock) and is waiting for A to release the lock.

A third CPU calls call_smp_function and issues the IPI.  CPU A takes CPU
C's IPI.  CPU B is waiting with interrupts disabled and does not see the
IPI.  CPU C is stuck waiting for CPU B to respond to the IPI.

Deadlock.

The solution is to use stop_machine_run instead of call_smp_function
(call_smp_function should not be called in situations where the CPUs may be
suspended).

[haruo.tomita@toshiba.co.jp: fix a typo in mod_init()]
[haruo.tomita@toshiba.co.jp: fix memory leak]
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Jan Beulich <jbeulich@novell.com>
Cc: "Tomita, Haruo" <haruo.tomita@toshiba.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:00 -07:00
Adrian Bunk 4fa156ea84 drivers/char/hvc_console.c: cleanups
- make needlessly global code static
- remove the unused EXPORT_SYMBOL's

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:14:59 -07:00
Corey Minyard fca3b74779 ipmi: add pci remove handling
Add pci_remove handling to the driver, so it will clean up if
the device is hot-removed.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:14:58 -07:00
Corey Minyard f64da958df ipmi: add new IPMI nmi watchdog handling
Convert over to the new NMI handling for getting IPMI watchdog timeouts via an
NMI.  This add config options to know if there is the ability to receive NMIs
and if it has an NMI post processing call.  Then it modifies the IPMI watchdog
to take advantage of this so that it can know if an NMI comes in.

It also adds testing that the IPMI NMI watchdog works.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:14:58 -07:00
Corey Minyard ee6cd5f8f5 ipmi: allow shared interrupts
The IPMI driver used enable_irq and disable_irq when it got into situations
where it couldn't allocate memory; it did this to avoid having the interrupt
just lock the machine when it couldn't get memory to perform the transaction
to disable the interrupt.

This patch modifies the driver to not use disable_irq and enable_irq.  It
instead sends the messages to the BMC to perform this operation.  It also
makes sure interrupts are cleanly disabled when the interface is shut down and
cleans up some shutdown things that are no longer necessary.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:14:58 -07:00
Corey Minyard dba9b4f6a0 ipmi: add powerpc openfirmware sensing
Add support for of_platform_driver to the ipmi_si module.  When loading the
module, the driver will be registered to of_platform.  The driver will be
probed for all devices with the type ipmi.  It's supporting devices with
compatible settings ipmi-kcs, ipmi-smic and ipmi-bt.  Only ipmi-kcs could be
tested.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Acked-by: Heiko J Schick <schihei@de.ibm.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:14:58 -07:00
Thomas Hellstrom ef68d29550 via: Make sure we flush write-combining using a follow-up read.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-08 15:48:39 +10:00
Thomas Hellstrom a0a6dd0b22 via: Try to improve command-buffer chaining.
Bump driver date and patchlevel.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-08 15:47:41 +10:00
Dave Airlie bc07dc7f07 drm: remove old taskqueue remnant
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-08 15:32:35 +10:00
Dave Airlie 0515b93c0e drm: rename badly named define and cleanup ioctl code spacing
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-08 15:28:15 +10:00
Michel Dänzer 453ff94ca5 radeon: Don't mess up page flipping when a file descriptor is closed.
There can still be other contexts that may use page flipping later on, so do
just unilaterally 'clean it up', which could lead to the wrong page being
displayed, e.g. when running 3D apps with a GLX compositing manager such as
compiz using page flipping.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-08 15:21:14 +10:00
Dave Airlie f2b04cd219 drm/radeon: upgrade to 1.27 - make PCI GART more flexible
radeon: make PCI GART aperture size variable, but making table size variable
    This is precursor to getting a TTM backend for this stuff, and also
    allows the PCI table to be allocated at fb 0
radeon: add support for reverse engineered xpress200m

    The IGPGART setup code was traced using mmio-trace on fglrx by myself
    and Phillip Ezolt <phillipezolt@gmail.com> on dri-devel.

    This code doesn't let the 3D driver work properly as the card has no
    vertex shader support.

    Thanks to Matthew Garrett + Ubuntu for providing me some hardware to do this
    work on.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-08 15:19:23 +10:00
Paul Mackerras 02bbc0f09c Merge branch 'linux-2.6' 2007-05-08 13:37:51 +10:00
Linus Torvalds 5f757f91e7 Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/i915: Add 965GM pci id update
  drm: just use io_remap_pfn_range on all archs..
  drm: fix DRM_CONSISTENT mapping
  drm: fix up mmap locking in preparation for ttm changes
  drm: fix driver deadlock with AIGLX and reclaim_buffers_locked
  drm: fix warning in drm_fops.c
  drm: allow for more generic drm ioctls
  drm: fix alpha domain handling
  via: fix CX700 pci id
  drm: make drm_io_prot static.
  drm: remove via_mm.h
  drm: add missing NULL assignment
  drm/radeon: Fix u32 overflows when determining AGP base address in card space.
  drm: port over use_vmalloc code from git hashtab
  drm: fix crash with fops lock and fixup sarea/page size locking
  drm: bring bufs code from git tree.
  drm: move protection stuff into separate function
  drm: Use ARRAY_SIZE macro when appropriate
  drm: update README.drm (bugzilla #7933)
  drm: remove unused exports
2007-05-07 12:24:07 -07:00
Yoichi Yuasa 0976251676 rename TANBAC TB0219 config
Rename config for TANBAC TB0219 GPIO support to something more appropriate.

Fixes this:

drivers/char/Kconfig:906:warning: type of 'TANBAC_TB0219' redefined from 'boolean' to 'tristate'
drivers/char/Kconfig:907:warning: choice values currently only support a single
prompt

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-07 12:13:04 -07:00
Andy Whitcroft 543691a6cd tty_register_driver: only allocate tty instances when defined
If device->num is zero we attempt to kmalloc() zero bytes.  When SLUB is
enabled this returns a null pointer and take that as an allocation failure
and fail the device register.  Check for no devices and avoid the
allocation.

[akpm: opportunistic kzalloc() conversion]
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-07 12:12:53 -07:00
Stephen Rothwell 55b61fec22 [POWERPC] Rename device_is_compatible to of_device_is_compatible
for consistency with other Open Firmware interfaces (and Sparc).

This is just a straight replacement.

This leaves the compatibility define in place.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-07 20:31:14 +10:00
Florian Fainelli 04bf3b4f5f [WATCHDOG] MTX-1 Watchdog driver
This patch adds support for the MTX-1 boards watchdog. If not available the
board will reboot every 100 seconds. It uses the Linux watchdog and timer
APIs.

Signed-off-by: Florian Fainelli <florian.fainelli@int-evry.fr>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-05-06 19:36:45 +00:00
Arnaud Patard 62be074147 [WATCHDOG] s3c2410_wdt - initialize watchdog irq resource
In the error path of s3c2410wdt_probe() and in s3c2410wdt_remove(),
we're using wdt_irq without initialising it, leading to a oops.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-05-06 19:36:28 +00:00
Linus Torvalds ea62ccd00f Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (231 commits)
  [PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall
  [PATCH] i386: type may be unused
  [PATCH] i386: Some additional chipset register values validation.
  [PATCH] i386: Add missing !X86_PAE dependincy to the 2G/2G split.
  [PATCH] x86-64: Don't exclude asm-offsets.c in Documentation/dontdiff
  [PATCH] i386: avoid redundant preempt_disable in __unlazy_fpu
  [PATCH] i386: white space fixes in i387.h
  [PATCH] i386: Drop noisy e820 debugging printks
  [PATCH] x86-64: Fix allnoconfig error in genapic_flat.c
  [PATCH] x86-64: Shut up warnings for vfat compat ioctls on other file systems
  [PATCH] x86-64: Share identical video.S between i386 and x86-64
  [PATCH] x86-64: Remove CONFIG_REORDER
  [PATCH] x86-64: Print type and size correctly for unknown compat ioctls
  [PATCH] i386: Remove copy_*_user BUG_ONs for (size < 0)
  [PATCH] i386: Little cleanups in smpboot.c
  [PATCH] x86-64: Don't enable NUMA for a single node in K8 NUMA scanning
  [PATCH] x86: Use RDTSCP for synchronous get_cycles if possible
  [PATCH] i386: Add X86_FEATURE_RDTSCP
  [PATCH] i386: Implement X86_FEATURE_SYNC_RDTSC on i386
  [PATCH] i386: Implement alternative_io for i386
  ...

Fix up trivial conflict in include/linux/highmem.h manually.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-05 14:55:20 -07:00
Jan Engelhardt 261259b2a8 [WATCHDOG] Kconfig menuconfig patch
Change Kconfig objects from "menu, config" into "menuconfig" so
that the user can disable the whole feature without having to
enter the menu first.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-05-05 06:55:25 +00:00
Wim Van Sebroeck 5aa15050a2 [WATCHDOG] pcwd.c: Port to the new device driver model
Port the pcwd.c driver to the new device driver model.
Since this is an ISA card, I used Rene Herman's new isa bus type.
This made the probing for the card very "easy".

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-05-05 06:54:57 +00:00
Linus Torvalds a3d52136ee Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input: (65 commits)
  Input: gpio_keys - add support for switches (EV_SW)
  Input: cobalt_btns - convert to use polldev library
  Input: add skeleton for simple polled devices
  Input: update some documentation
  Input: wistron - fix typo in keymap for Acer TM610
  Input: add input_set_capability() helper
  Input: i8042 - add Fujitsu touchscreen/touchpad PNP IDs
  Input: i8042 - add Panasonic CF-29 to nomux list
  Input: lifebook - split into 2 devices
  Input: lifebook - add signature of Panasonic CF-29
  Input: lifebook - activate 6-byte protocol on select models
  Input: lifebook - work properly on Panasonic CF-18
  Input: cobalt buttons - separate device and driver registration
  Input: ati_remote - make button repeat sensitivity configurable
  Input: pxa27x - do not use deprecated SA_INTERRUPT flag
  Input: ucb1400 - make delays configurable
  Input: misc devices - switch to using input_dev->dev.parent
  Input: joysticks - switch to using input_dev->dev.parent
  Input: touchscreens - switch to using input_dev->dev.parent
  Input: mice - switch to using input_dev->dev.parent
  ...

Fixed up conflicts with core device model removal of "struct subsystem" manually.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-04 18:16:12 -07:00
Linus Torvalds 89661adaae Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (59 commits)
  PCI: Free resource files in error path of pci_create_sysfs_dev_files()
  pci-quirks: disable MSI on RS400-200 and RS480
  PCI hotplug: Use menuconfig objects
  PCI: ZT5550 CPCI Hotplug driver fix
  PCI: rpaphp: Remove semaphores
  PCI: rpaphp: Ensure more pcibios_add/pcibios_remove symmetry
  PCI: rpaphp: Use pcibios_remove_pci_devices() symmetrically
  PCI: rpaphp: Document is_php_dn()
  PCI: rpaphp: Document find_php_slot()
  PCI: rpaphp: Rename rpaphp_register_pci_slot() to rpaphp_enable_slot()
  PCI: rpaphp: refactor tail call to rpaphp_register_slot()
  PCI: rpaphp: remove rpaphp_set_attention_status()
  PCI: rpaphp: remove print_slot_pci_funcs()
  PCI: rpaphp: Remove setup_pci_slot()
  PCI: rpaphp: remove a call that does nothing but a pointer lookup
  PCI: rpaphp: Remove another wrappered function
  PCI: rpaphp: Remve another call that is a wrapper
  PCI: rpaphp: remove a function that does nothing but wrap debug printks
  PCI: rpaphp: Remove un-needed goto
  PCI: rpaphp: Fix a memleak; slot->location string was never freed
  ...
2007-05-04 18:04:29 -07:00
Linus Torvalds 98b96173c7 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] sworks-agp: Switch to PCI ref counting APIs
  [AGPGART] Nvidia AGP: Use refcount aware PCI interfaces
  [AGPGART] Fix sparse warning in sgi-agp.c
  [AGPGART] Intel-agp adjustments
  [AGPGART] Move [un]map_page_into_agp into asm/agp.h
  [AGPGART] Add missing calls to global_flush_tlb() to ali-agp
  [AGPGART] prevent probe collision of sis-agp and amd64_agp
2007-05-04 17:38:16 -07:00
Matthias Kaehlcke 9f7afa6b34 [WATCHDOG] use mutex instead of semaphore in Berkshire USB-PC Watchdog driver
The Berkshire USB-PC Watchdog driver uses a semaphore as mutex.  Use the mutex
API instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-05-04 06:07:59 +00:00
Michael Ellerman bab41e9be7 PCI: Convert to alloc_pci_dev()
Convert code that allocs a struct pci_dev to use alloc_pci_dev().

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-02 19:02:37 -07:00
Jean Delvare 6473d160b4 PCI: Cleanup the includes of <linux/pci.h>
I noticed that many source files include <linux/pci.h> while they do
not appear to need it. Here is an attempt to clean it all up.

In order to find all possibly affected files, I searched for all
files including <linux/pci.h> but without any other occurence of "pci"
or "PCI". I removed the include statement from all of these, then I
compiled an allmodconfig kernel on both i386 and x86_64 and fixed the
false positives manually.

My tests covered 66% of the affected files, so there could be false
positives remaining. Untested files are:

arch/alpha/kernel/err_common.c
arch/alpha/kernel/err_ev6.c
arch/alpha/kernel/err_ev7.c
arch/ia64/sn/kernel/huberror.c
arch/ia64/sn/kernel/xpnet.c
arch/m68knommu/kernel/dma.c
arch/mips/lib/iomap.c
arch/powerpc/platforms/pseries/ras.c
arch/ppc/8260_io/enet.c
arch/ppc/8260_io/fcc_enet.c
arch/ppc/8xx_io/enet.c
arch/ppc/syslib/ppc4xx_sgdma.c
arch/sh64/mach-cayman/iomap.c
arch/xtensa/kernel/xtensa_ksyms.c
arch/xtensa/platform-iss/setup.c
drivers/i2c/busses/i2c-at91.c
drivers/i2c/busses/i2c-mpc.c
drivers/media/video/saa711x.c
drivers/misc/hdpuftrs/hdpu_cpustate.c
drivers/misc/hdpuftrs/hdpu_nexus.c
drivers/net/au1000_eth.c
drivers/net/fec_8xx/fec_main.c
drivers/net/fec_8xx/fec_mii.c
drivers/net/fs_enet/fs_enet-main.c
drivers/net/fs_enet/mac-fcc.c
drivers/net/fs_enet/mac-fec.c
drivers/net/fs_enet/mac-scc.c
drivers/net/fs_enet/mii-bitbang.c
drivers/net/fs_enet/mii-fec.c
drivers/net/ibm_emac/ibm_emac_core.c
drivers/net/lasi_82596.c
drivers/parisc/hppb.c
drivers/sbus/sbus.c
drivers/video/g364fb.c
drivers/video/platinumfb.c
drivers/video/stifb.c
drivers/video/valkyriefb.c
include/asm-arm/arch-ixp4xx/dma.h
sound/oss/au1550_ac97.c

I would welcome test reports for these files. I am fine with removing
the untested files from the patch if the general opinion is that these
changes aren't safe. The tested part would still be nice to have.

Note that this patch depends on another header fixup patch I submitted
to LKML yesterday:
  [PATCH] scatterlist.h needs types.h
  http://lkml.org/lkml/2007/3/01/141

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-02 19:02:35 -07:00
Jan Beulich b92e9fac40 [PATCH] x86: fix amd64-agp aperture validation
Under CONFIG_DISCONTIGMEM, assuming that a !pfn_valid() implies all
subsequent pfn-s are also invalid is wrong. Thus replace this by
explicitly checking against the E820 map.

AK: make e820 on x86-64 not initdata

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Mark Langsdorf <mark.langsdorf@amd.com>
2007-05-02 19:27:11 +02:00
Stephen Rothwell 40cd3a4564 [POWERPC] Rename get_property to of_get_property: drivers
These are all the remaining instances of get_property.  Simple rename of
get_property to of_get_property.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-02 20:04:32 +10:00
Adrian Bunk dbf379ea9a [WATCHDOG] the scheduled removal of the i8xx_tco watchdog driver
This patch contains the scheduled removal of the i8xx_tco watchdog 
driver.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-05-01 07:35:35 +00:00
Wim Van Sebroeck 48a7afe314 Merge /pub/scm/linux/kernel/git/torvalds/linux-2.6 2007-05-01 06:53:01 +00:00
Dmitry Torokhov bc95f3669f Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/usb/input/Makefile
	drivers/usb/input/gtco.c
2007-05-01 00:24:54 -04:00
Linus Torvalds 24a77daf3d Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (255 commits)
  [POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c
  [POWERPC] remove kernel module option for booke wdt
  [POWERPC] Avoid putting cpu node twice
  [POWERPC] Spinlock initializer cleanup
  [POWERPC] ppc4xx_sgdma needs dma-mapping.h
  [POWERPC] arch/powerpc/sysdev/timer.c build fix
  [POWERPC] get_property cleanups
  [POWERPC] Remove the unused HTDMSOUND driver
  [POWERPC] cell: cbe_cpufreq cleanup and crash fix
  [POWERPC] Declare enable_kernel_spe in a header
  [POWERPC] Add dt_xlate_addr() to bootwrapper
  [POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE
  [POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards.
  [POWERPC] Add sane defaults for Xilinx EDK generated xparameters files
  [POWERPC] Add uartlite boot console driver for the zImage wrapper
  [POWERPC] Stop using ppc_sys for Xilinx Virtex boards
  [POWERPC] New registration for common Xilinx Virtex ppc405 platform devices
  [POWERPC] Merge common virtex header files
  [POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform
  [POWERPC] Clean up cpufreq Kconfig dependencies
  ...
2007-04-30 08:10:12 -07:00
Paul Mackerras 49e1900d4c Merge branch 'linux-2.6' into for-2.6.22 2007-04-30 12:38:01 +10:00
Dave Jiang 34f6d749c0 [POWERPC] remove kernel module option for booke wdt
Remove option of making booke_wdt into a kernel module. This watchdog
cannot be disabled. No point being a kernel module.

Signed-off-by: Dave Jiang <djiang@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-30 11:05:48 +10:00
Linus Torvalds 6b06d2cc6d Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (105 commits)
  sonypi: use mutex instead of semaphore
  sony-laptop: remove user visible camera controls as platform attributes
  meye: make meye use sony-laptop instead of sonypi
  sony-laptop: add a meye-usable include file for camera ops
  sony-laptop: complete the motion eye camera support in sony-laptop
  sonypi: try to detect if sony-laptop has already taken one of the known ioports
  sonypi: suggest sonypi users to try sony-laptop instead
  sony-laptop: add edge modem support (also called WWAN)
  sony-laptop: add locking on accesses to the ioport and global vars
  sony-laptop: add camera enable/disable parameter, better handle possible infinite loop
  thinkpad-acpi: make drivers/misc/thinkpad_acpi:fan_mutex static
  ACPI: thinkpad-acpi: add sysfs support to wan and bluetooth subdrivers
  ACPI: thinkpad-acpi: add sysfs support to hotkey subdriver
  ACPI: thinkpad-acpi: improve dock subdriver initialization
  ACPI: thinkpad-acpi: improve debugging for acpi helpers
  ACPI: thinkpad-acpi: improve fan control documentation
  ACPI: thinkpad-acpi: map ENXIO to EINVAL for fan sysfs
  ACPI: thinkpad-acpi: fix a fan watchdog invocation
  ACPI: thinkpad-acpi: do not arm fan watchdog if it would not work
  ACPI: thinkpad-acpi: add a fan-control feature master toggle
  ...
2007-04-29 10:47:25 -07:00
Len Brown cfaae3ee4a Pull sony into release branch 2007-04-28 23:09:57 -04:00
Matthias Kaehlcke c6c60106b9 sonypi: use mutex instead of semaphore
the Sony Programmable I/O Control driver uses a semaphore as
mutex. use the mutex API instead of the (binary) semaphore

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Acked-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:13:34 -04:00
malattia@linux.it 1a3e323907 sonypi: try to detect if sony-laptop has already taken one of the known ioports
Get the IO resources list in sony-laptop in the same order as listed
in sonypi and make sonypi check if one of those is already busy.
The sonypi check can be disabled by a module parameter in case the user
thinks we are plainly wrong (check_ioport=0).

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:05:59 -04:00
malattia@linux.it 74a882e485 sonypi: suggest sonypi users to try sony-laptop instead
Try to migrate sonypi users to sony-laptop gracefully.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:05:56 -04:00
Stephen Rothwell 01b2726dd1 [POWERPC] Rename get_property to of_get_property: partial drivers
This does drivers/machintosh and the hvc code.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-27 15:51:56 +10:00
Alan Cox 881ba59d46 [AGPGART] sworks-agp: Switch to PCI ref counting APIs
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-26 14:22:51 -04:00
Alan Cox 1e41573283 [AGPGART] Nvidia AGP: Use refcount aware PCI interfaces
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-26 14:22:51 -04:00
Dave Jones b826b4d6e4 [AGPGART] Fix sparse warning in sgi-agp.c
drivers/char/agp/sgi-agp.c:51:10: warning: Using plain integer as NULL pointer

Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-26 14:22:51 -04:00
Jan Beulich 89cf7ccc93 [AGPGART] Intel-agp adjustments
Fix a call to __free_page where __free_pages(, 2) was meant, and do proper
error path handling. Also remove a redundant conditional.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-26 14:22:51 -04:00
Jan Beulich 9eeee24414 [AGPGART] Move [un]map_page_into_agp into asm/agp.h
Remove an arch-dependent hunk in favor of #define-ing the respective bits in
asm-<arch>/agp.h (allowing easier overriding in para-virtualized environments).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-26 14:22:50 -04:00
Jan Beulich 77ec430ec3 [AGPGART] Add missing calls to global_flush_tlb() to ali-agp
add missing calls to global_flush_tlb().

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-26 14:22:50 -04:00
Oliver Neukum 82eab1306c [AGPGART] prevent probe collision of sis-agp and amd64_agp
For some vendor/id pairs the kernel will autoload both the sis-agp and the
amd64_agp modules as the sis-agp module will load for all sis devices.
This collision causes the bug reported in:
http://bugzilla.novell.com/show_bug.cgi?id=248665

As currently sis_probe does its own matching, requesting the whole range
gains nothing.  The clean fix seems to me to leave the matching to the core
and advertise only the devices actually supported.  This patch does so.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-26 14:22:50 -04:00
Paul Mackerras a48141db68 Revert "[POWERPC] Rename get_property to of_get_property: drivers"
This reverts commit d05c7a80cf,
which included changes which should go via other subsystem
maintainers.
2007-04-26 22:24:31 +10:00
Eric Dumazet f859581519 [NET]: random functions can use nsec resolution instead of usec
In order to get more randomness for secure_tcpv6_sequence_number(),
secure_tcp_sequence_number(), secure_dccp_sequence_number() functions,
we can use the high resolution time services, providing nanosec
resolution.

I've also done two kmalloc()/kzalloc() conversions.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25 22:28:25 -07:00
Arnaldo Carvalho de Melo d626f62b11 [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}
To clearly state the intent of copying from linear sk_buffs, _offset being a
overly long variant but interesting for the sake of saving some bytes.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-04-25 22:28:23 -07:00
Adrian Bunk cb69cc5236 [TCP/DCCP/RANDOM]: Remove unused exports.
This patch removes the following not or no longer used exports:
- drivers/char/random.c: secure_tcp_sequence_number
- net/dccp/options.c: sysctl_dccp_feat_sequence_window
- net/netlink/af_netlink.c: netlink_set_err

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25 22:24:03 -07:00
Wang Zhenyu ce7dd06372 drm/i915: Add 965GM pci id update
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-04-26 07:42:56 +10:00
Jiri Slaby fc83815c3a Char: mxser, fix TIOCMIWAIT
There was schedule() missing in the TIOCMIWAIT ioctl. Solve it by moving
the code to the wait_event_interruptible.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Jan Yenya Kasprzak <kas@fi.muni.cz>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-24 08:23:08 -07:00
Jiri Slaby b446a4a575 Char: mxser_new, fix TIOCMIWAIT
There was schedule() missing in the TIOCMIWAIT ioctl.  Solve it by moving
the code to the wait_event_interruptible.

Cc: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-24 08:23:07 -07:00
Jan Yenya Kasprzak 67d2bc58af Char: mxser_new, fix recursive locking
Signed-off-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-24 08:23:07 -07:00
Stephen Rothwell 8c8dc32248 [POWERPC] Remove old interface find_path_device
Replaced by of_find_node_by_path.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 22:08:59 +10:00
will schmidt c3ea6921a6 [POWERPC] hvc_console: Typo fixes
Fix a handful of comment typos for hvc_console.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:46 +10:00
Will Schmidt b791072ba3 [POWERPC] hvc_console: Polling mode timer backoff
Add a back-off mechanism to hvc_console's polling logic.   This change
drops the timers/second ratio from ~90 to ~1/2 while the console is
idle.
This change is most noticeable when watching /proc/timer_stats output.

This only affects when the hvc_console is running in poll mode, i.e.
power4 and cell systems.

I've tested on Power4, Michael Ellerman has both contributed to the
patch and tested on cell.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:43 +10:00
Benjamin Herrenschmidt 8a93258ce3 fix bogon in /dev/mem mmap'ing on nommu
While digging through my MAP_FIXED changes, I found that rather obvious
bug in /dev/mem mmap implementation for nommu archs. get_unmapped_area()
is expected to return an address, not a pfn.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-By: David Howells <dhowells@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-17 16:36:27 -07:00
Stephen Rothwell d05c7a80cf [POWERPC] Rename get_property to of_get_property: drivers
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-13 03:55:19 +10:00
Stephen Rothwell 9213feea6e [POWERPC] Rename prom_n_size_cells to of_n_size_cells
This is more consistent and gets us closer to the Sparc code.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-13 03:55:18 +10:00
Stephen Rothwell a8bda5dd4f [POWERPC] Rename prom_n_addr_cells to of_n_addr_cells
This is more consistent and gets us closer to the Sparc code.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-13 03:55:18 +10:00
Dmitry Torokhov 9e35d20663 Input: keyboard handler - use printk_ratelimit()
Use printk_ratelimit() to protect ourselves from buggy drivers or
devices endlessly generating invalid events.

Suggested by Andrew Morton.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-04-12 01:30:52 -04:00
Dmitry Torokhov 5b2a08262a Input: rework handle creation code
- consolidate code for binding handlers to a device
 - return error codes from handlers connect() methods back to input
   core and log failures

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-04-12 01:29:46 -04:00
Linus Torvalds 0bce0b7a3b Merge branch 'for-2.6.21' of master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* 'for-2.6.21' of master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] intel_agp: fix G965 GTT size detect
2007-04-10 17:24:56 -07:00
Wang Zhenyu 52ea0718ea [AGPGART] intel_agp: fix G965 GTT size detect
On G965, I810_PGETBL_CTL is a mmio offset, but we wrongly take it
as pci config space offset in detecting GTT size. This one line patch
fixs this.

Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-09 22:09:58 -04:00
Linus Torvalds 90f30eccf4 Merge branch 'for-2.6.21' of master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* 'for-2.6.21' of master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] intel_agp: PCI id update for Intel 965GM
2007-04-09 11:45:18 -07:00
Wang Zhenyu 4598af33d9 [AGPGART] intel_agp: PCI id update for Intel 965GM
Update PCI id info for Intel 965GM chipset.

Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-08 21:31:58 -04:00
Michal Januszewski f991519c19 [PATCH] vt: fix potential race in VT_WAITACTIVE handler
On a multiprocessor machine the VT_WAITACTIVE ioctl call may return 0 if
fg_console has already been updated in redraw_screen() but the console
switch itself hasn't been completed.  Fix this by checking fg_console in
vt_waitactive() with the console sem held.

Signed-off-by: Michal Januszewski <spock@gentoo.org>
Acked-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-02 10:06:09 -07:00
Ralf Baechle 96fac9dc95 [PATCH] Wire up DEC serial drivers in Kconfig
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-29 08:22:25 -07:00
Linus Torvalds d0a9af8091 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [VIDEO]: Fix section mismatch in cg3.c
  [SPARC]: sparc64 gcc-4.2.0 20070317 -Werror failure
  [VIDEO] ffb: Fix two DAC handling bugs.
  [SPARC32]: Fix SMP build regression
  [DRM]: Delete sparc64 FFB driver code that never gets built.
2007-03-28 14:01:21 -07:00
Daniel Drake d340d89087 [PATCH] generic_serial: fix decoding of baud rate
Commit d720bc4b8f partially removed a
private implementation of baud speed decoding.  However it doesn't seem
to be complete: after the speed is decoded, it is still being used as an
index to a local speed table (array overrun, no doubt).

This was found by Graham Murray who noticed it caused a 2.6.19 regression
with the SX driver: https://bugs.gentoo.org/170554

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-27 09:05:15 -07:00
David S. Miller b82f87f6d4 [DRM]: Delete sparc64 FFB driver code that never gets built.
The Kconfig bits were removed long ago, so we should kill off the
driver too.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-26 21:49:11 -07:00
Alexey Dobriyan fb8f7ba077 [WATCHDOG] Semi-typical watchdog bug re early misc_register()
It seems that some watchdog drivers are doing following mistake:

	rv = misc_register();
	if (rv < 0)
		return rv;
	rv = request_region();
	if (rv < 0) {
		misc_deregister();
		return rv;
	}

But, right after misc_register() returns, misc device can be opened and
ioctls interacting with hardware issued, and driver can do outb() to
port it doesn't own yet, because request_region() is still pending.

Here is my patch, compile-tested only.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-03-26 20:26:11 +00:00
Vlad Drukker 0e94f2ee0d [WATCHDOG] add support for the w83627thf chipset.
Added support for W83627THF, watchdog chip.

Signed-off-by: Vlad Drukker <vlad@storewiz.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-03-26 20:13:59 +00:00
Dave Airlie 9e9c1326a5 drm: just use io_remap_pfn_range on all archs..
Move the sparc64 ifdef around to clean this up.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-24 18:00:31 +11:00
Hugh Dickins 38315878a5 drm: fix DRM_CONSISTENT mapping
This patch got lost in the DRM git tree for ages, bring it back to life.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-24 18:00:28 +11:00
Thomas Hellstrom d7d8aac79d drm: fix up mmap locking in preparation for ttm changes
This change is needed to protect againt disappearing maps which aren't common.
The map lists are protected using sturct_mutex but drm_mmap never locked it.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-24 18:00:22 +11:00
Thomas Hellstrom 040ac32048 drm: fix driver deadlock with AIGLX and reclaim_buffers_locked
Bugzilla Bug #9457

Add refcounting of user waiters to the DRM hardware lock, so that we can use
DRM_LOCK_CONT flag more conservatively.

Also add a kernel waiter refcount that if nonzero transfers the lock for the
kernel context when it is released. This is useful when waiting for idle and can be used for very simple fence object driver implementations for the new memory manager

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-23 13:28:33 +11:00
Andrew Morton 4b560fde06 drm: fix warning in drm_fops.c
drivers/char/drm/drm_fops.c: In function 'drm_setup':
drivers/char/drm/drm_fops.c:60: warning: comparison of distinct pointer types lacks a cast

Unfortunately PAGE_SIZE has different types on different architectures.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-19 09:08:21 +11:00
Thomas Hellstrom 99da6d861c drm: allow for more generic drm ioctls
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-19 08:52:17 +11:00
Eric W. Biederman d9c1e9a8ff [PATCH] tty: Fix two reported pid leaks
These leaks were reported by: Catalin Marinas <catalin.marians@gmail.com>
and I have been able to very by inspection they are possible.

When converting tty_io.c to store pids as struct pid pointers instead
of pid_t values it appears I overlooked two places where we stop using
the pid value.  The very obvious one is in do_tty_hangup, and the one
the less obvious one in __proc_set_tty.

When looking into the code __proc_set_tty only has pids that need to
be put because of failures of other parts of the code to properly
perform hangup processing.   Fixing the leak here in __proc_set_tty
is easy and obviously correct so I am doing that first.

Fixing the places that should be performing hangup processing is much
less obviously correct.  So those I'm aiming those patches at -mm.
for now, so the can age a while before they are merged.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-18 13:40:06 -07:00
Andrew Morton bad77057ed [PATCH] machzwd warning fix
drivers/char/watchdog/machzwd.c: In function 'zf_ioctl':
drivers/char/watchdog/machzwd.c:327: warning: passing argument 1 of 'zf_ping' makes integer from pointer without a cast

Also some coding-style repairs.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@ftp.linux.org.uk>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-18 11:35:07 -07:00
Linus Torvalds 4745591167 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Kconfig: Move missplaced NR_CPUS default from SMTC to VSMP.
  [MIPS] Lockdep: Fix recursion bug.
  [MIPS] RTLX: Handle copy_*_user return values.
  [MIPS] RTLX: Protect rtlx_{read,write} with mutex.
  [MIPS] RTLX: Harden against compiler reordering and optimization.
  [MIPS] RTLX: Don't use volatile; it's fragile.
  [MIPS] Lasat: Downgrade 64-bit kernel from experimental to broken.
  [MIPS] Compat: Fix build if CONFIG_SYSVIPC is disabled.
  [CHAR] lcd: Fix two warnings.
  [MIPS] FPU ownership management & preemption fixes
  [MIPS] Check FCSR for pending interrupts, alternative version
  [MIPS] IP27, IP35: Fix warnings.
2007-03-16 19:28:15 -07:00
Bernhard Walle c2c88f109e [PATCH] Initialise SAK member for each virtual console to prevent oops
Initialise the SAK member of the vc_cons variable on all virtual terminals,
not only the first one.  This prevents an oops when trying Sysrq-C on e.g.
the second virtual terminal:

  kernel BUG at kernel/workqueue.c:212!
  invalid opcode: 0000 [1] SMP
  CPU 0
  Modules linked in: i915 drm deflate zlib_deflate twofish twofish_common serpent blowfish des ce
  Pid: 0, comm: swapper Not tainted 2.6.21-rc3-default #15
  RIP: 0010:[<ffffffff8028c955>]  [<ffffffff8028c955>] queue_work+0x32/0x51
  RSP: 0018:ffffffff805fada8  EFLAGS: 00010013
  RAX: ffffffff80683f38 RBX: ffffffff804ae700 RCX: 0000000000000000
  RDX: 0000000000000000 RSI: ffffffff80683f30 RDI: ffff81000134a840
  RBP: 0000000000000001 R08: 0000000000000005 R09: 0000000000000002
  R10: ffffffff805990e0 R11: ffff810037f4c0f0 R12: 000000000000006b
  R13: ffff81007aa23000 R14: 0000000000000001 R15: 0000000000000096
  FS:  0000000000000000(0000) GS:ffffffff804d8000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
  CR2: 00002b72026e9000 CR3: 0000000079175000 CR4: 00000000000006e0
  Process swapper (pid: 0, threadinfo ffffffff8059e000, task ffffffff80490840)
  Stack:  0000000000000096 ffffffff803635db ffffffff805fadf8 0000000000000001
   ffff8100013c2e40 0000000000000025 ffff81007c931c00 ffff81007aa23000
   0000000000000001 ffffffff8035e3ee 0000000000000092 ffff810037cc8000
  Call Trace:
   <IRQ>  [<ffffffff803635db>] __handle_sysrq+0x98/0x129
   [<ffffffff8035e3ee>] kbd_event+0x32e/0x56a
   [<ffffffff8037d502>] input_event+0x422/0x44a
   [<ffffffff80381d71>] atkbd_interrupt+0x449/0x503
   [<ffffffff8037a42d>] serio_interrupt+0x37/0x6f
   [<ffffffff8037affb>] i8042_interrupt+0x1f4/0x20a
   [<ffffffff8026bd20>] smp_send_timer_broadcast_ipi+0x2d/0x4e
   [<ffffffff8020eee5>] handle_IRQ_event+0x25/0x53
   [<ffffffff802a924c>] handle_edge_irq+0xe4/0x128
   [<ffffffff802562ac>] call_softirq+0x1c/0x28
   [<ffffffff802632eb>] do_IRQ+0x6c/0xd3
   [<ffffffff8024f4e7>] mwait_idle+0x0/0x45
   [<ffffffff80255631>] ret_from_intr+0x0/0xa
   <EOI>  [<ffffffff80248a4d>] datagram_poll+0x0/0xc8
   [<ffffffff8024f529>] mwait_idle+0x42/0x45
   [<ffffffff80242c05>] cpu_idle+0x8b/0xae
   [<ffffffff805a8779>] start_kernel+0x2b9/0x2c5
   [<ffffffff805a815e>] _sinittext+0x15e/0x162

  Code: 0f 0b eb fe 48 8b 07 48 63 d2 48 f7 d0 48 8b 3c d0 e8 13 ff
  RIP  [<ffffffff8028c955>] queue_work+0x32/0x51
   RSP <ffffffff805fada8>
  Kernel panic - not syncing: Aiee, killing interrupt handler!

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Acked-by: Eric Biederman <ebiederm@xmission.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16 19:25:06 -07:00
Andrew Johnson b257bc051f [PATCH] swsusp: fix suspend when console is in VT_AUTO+KD_GRAPHICS mode
When the console is in VT_AUTO+KD_GRAPHICS mode, switching to the
SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinitely or
until the task is interrupted.  This patch tests if a console switch can
occur in set_console() and returns early if a console switch is not
possible.

[akpm@linux-foundation.org: cleanup]
Signed-off-by: Andrew Johnson <ajohnson@intrinsyc.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16 19:25:05 -07:00
Ralf Baechle 2c35f813f3 [CHAR] lcd: Fix two warnings.
In file included from drivers/char/lcd.c:23:
include/linux/mc146818rtc.h:104:1: warning: "RTC_IO_EXTENT" redefined
drivers/char/lcd.c:15:1: warning: this is the location of the previous definition
drivers/char/lcd.c:35: warning: 'lcd_lock' defined but not used

c316eb1eee deleted the last code using
lcd_lock, so delete definition of lcd_lock.

The definition of RTC_IO_EXTENT is unused and probably always was only
debree copied from drivers/char/rtc.c.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17 01:03:26 +00:00
Marvin Raaijmakers c8e4c77277 Input: add getkeycode and setkeycode methods
Allow drivers to implement their own get and set keycode methods. This
will allow drivers to change their keymaps without allocating huge
tables covering entire range of possible scancodes.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-03-14 22:50:42 -04:00
Linus Torvalds 0bdd0f385a Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] i8xx TCO driver - mark for removal
2007-03-14 15:28:31 -07:00
Al Viro 89952d133d [PATCH] misc NULL noise
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14 15:27:49 -07:00
Wim Van Sebroeck ab97e6cf7b [WATCHDOG] i8xx TCO driver - mark for removal
Mark the i8xx TCO driver for removal.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-03-11 12:59:47 +00:00
Jay Estabrook 6244270ef6 drm: fix alpha domain handling
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:08:21 +11:00
Thomas Hellstrom 74be8e3b37 via: fix CX700 pci id
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:08:18 +11:00
Adrian Bunk 0bead7cdc9 drm: make drm_io_prot static.
This patch makes the needlessly global drm_io_prot() static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:08:15 +11:00
Robert P. J. Day 5379397182 drm: remove via_mm.h
Delete apparently unused header file drivers/char/drm/via_mm.h.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:08:10 +11:00
Dave Airlie c1185ccdfb drm: add missing NULL assignment
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:17 +11:00
Michel Dänzer 80b2c386f3 drm/radeon: Fix u32 overflows when determining AGP base address in card space.
The overflows could lead to the AGP aperture overlapping the framebuffer are    in the card's address space when the latter is located at the very end of th    32 bit address space, which would result in a freeze on X server startup,
probably because the card read commands from the framebuffer instead of from    AGP.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392915 .

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:17 +11:00
Dave Airlie cd839d0048 drm: port over use_vmalloc code from git hashtab
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:17 +11:00
Dave Airlie 11d9c2fd0a drm: fix crash with fops lock and fixup sarea/page size locking
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:17 +11:00
Dave Airlie 54ba2f76e2 drm: bring bufs code from git tree.
This checks the AGP mappings are in a valid place and also fixes the size
check in the vm..

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:17 +11:00
Dave Airlie 5cc7f9abec drm: move protection stuff into separate function
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:17 +11:00
Ahmed S. Darwish 8311d570bc drm: Use ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in kernel.h

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:16 +11:00
Randy Dunlap f54d1e40b2 drm: update README.drm (bugzilla #7933)
Update URLs in drivers/char/drm/README.drm, to take care of kernel bugzilla

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:16 +11:00
Adrian Bunk 41ed5de971 drm: remove unused exports
This patch removes two unused exports.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:16 +11:00
Ralf Baechle b35692ebde [CHAR] ds1286: Fix handling of seconds in RTC_ALM_SET ioctl.
o Fix use of uninitialized variable sec.
 o Make the RTC_ALM_SET ioctl return -EINVAL for non-zero seconds - the
   DS1286 has no second field for the alarm time.
 o Replace the obscure BIN_TO_BCD macro with BIN2BCD.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-08 01:10:30 +00:00
Mark Gross 03154a2710 [PATCH] minor updat to tlclk Kconfig entry
The tlclk driver is going on the MPCBL005 so I need to make the Kconfig
more more generic.  Just some text changes.

Signed-off-by: Mark Gross <mark.gross@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-06 18:02:22 -08:00
Marcel Holtmann 059819a41d [PATCH] Fix buffer overflow in Omnikey CardMan 4040 driver (CVE-2007-0005)
Based on a patch from Don Howard <dhoward@redhat.com>

When calling write() with a buffer larger than 512 bytes, the
driver's write buffer overflows, allowing to overwrite the EIP and
execute arbitrary code with kernel privileges.

In read(), there exists a similar problem, but coming from the device.
A malicous or buggy device sending more than 512 bytes can overflow
of the driver's read buffer, with the same effects as above.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-06 18:01:04 -08:00
Michal Piotrowski 6346190b2f [PATCH] char/epca.c: remove unused function
"drivers/char/epca.c:2741: warning: 'get_termio' defined but not used"

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:53 -08:00
Christian Krafft 4ff31d7757 [PATCH] ipmi: check, if default ports are accessible on PPC
ipmi_si_intf tries to access default ports, if no device could be found
elsewhere.  On PPC we have a function to check, if these legacy IO ports
are accessible.  This patch adds a check for these ports on PPC.  This
patch fixes a breakage of IPMI module on PPC machines without a BMC.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Acked-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: Paul Mackerras <paulus@samba.org>
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>
2007-03-05 07:57:53 -08:00
Andrew Morton d5dedf99e4 [PATCH] cyclades: return closing_wait
In http://bugzilla.kernel.org/show_bug.cgi?id=8065, Shen points out that the
cyclades driver forget to return closing_wait to userspace.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Shen <shanlu@cs.uiuc.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-05 07:57:50 -08:00
Aristeu Sergio Rozanski Filho 5a39e8c6d6 [PATCH] tty_io: fix race in master pty close/slave pty close path
This patch fixes a possible race that leads to double freeing an idr index.
 When the master begin to close, release_dev() is called and then
pty_close() is called:

        if (tty->driver->close)
                tty->driver->close(tty, filp);

This is done without helding any locks other than BKL.  Inside pty_close(),
being a master close, the devpts entry will be removed:

#ifdef CONFIG_UNIX98_PTYS
                if (tty->driver == ptm_driver)
                        devpts_pty_kill(tty->index);
#endif

But devpts_pty_kill() will call get_node() that may sleep while waiting for
&devpts_root->d_inode->i_sem.  When this happens and the slave is being
opened, tty_open() just found the driver and index:

        driver = get_tty_driver(device, &index);
        if (!driver) {
                mutex_unlock(&tty_mutex);
                return -ENODEV;
        }

This part of the code is already protected under tty_mute.  The problem is
that the slave close already got an index.  Then init_dev() is called and
blocks waiting for the same &devpts_root->d_inode->i_sem.

When the master close resumes, it removes the devpts entry, and the
relation between idr index and the tty is gone.  The master then sleeps
waiting for the tty_mutex on release_dev().

Slave open resumes and found no tty for that index.  As result, a NULL tty
is returned and init_dev() doesn't flow to fast_track:

        /* check whether we're reopening an existing tty */
        if (driver->flags & TTY_DRIVER_DEVPTS_MEM) {
                tty = devpts_get_tty(idx);
                if (tty && driver->subtype == PTY_TYPE_MASTER)
                        tty = tty->link;
        } else {
                tty = driver->ttys[idx];
        }
        if (tty) goto fast_track;

The result of this, is that a new tty will be created and init_dev() returns
sucessfull. After returning, tty_mutex is dropped and master close may resume.

Master close finds it's the only use and both sides are closing, then releases
the tty and the index. At this point, the idr index is free, but slave still
has it.

Slave open then calls pty_open() and finds that tty->link->count is 0,
because there's no master and returns error.  Then tty_open() calls
release_dev() which executes without any warning, as it was a case of last
slave close when the master is already closed (master->count == 0,
slave->count == 1).  The tty is then released with the already released idr
index.

This normally would only issue a warning on idr_remove() but in case of a
customer's critical application, it's never too simple:

thread1: opens master, gets index X
thread1: begin closing master
thread2: begin opening slave with index X
thread1: finishes closing master, index X released
thread3: opens master, gets index X, just released
thread2: fails opening slave, releases index X         <----
thread4: opens master, gets index X, init_dev() then find an already in use
	 and healthy tty and fails

If no more indexes are released, ptmx_open() will keep failing, as the
first free index available is X, and it will make init_dev() fail because
you're trying to "reopen a master" which isn't valid.

The patch notices when this race happens and make init_dev() fail
imediately.  The init_dev() function is called with tty_mutex held, so it's
safe to continue with tty till the end of function because release_dev()
won't make any further changes without grabbing the tty_mutex.

Without the patch, on some machines it's possible get easily idr warnings
like this one:

idr_remove called for id=15 which is not allocated.
 [<c02555b9>] idr_remove+0x139/0x170
 [<c02a1b62>] release_mem+0x182/0x230
 [<c02a28e7>] release_dev+0x4b7/0x700
 [<c02a0ea7>] tty_ldisc_enable+0x27/0x30
 [<c02a1e64>] init_dev+0x254/0x580
 [<c02a0d64>] check_tty_count+0x14/0xb0
 [<c02a4f05>] tty_open+0x1c5/0x340
 [<c02a4d40>] tty_open+0x0/0x340
 [<c017388f>] chrdev_open+0xaf/0x180
 [<c017c2ac>] open_namei+0x8c/0x760
 [<c01737e0>] chrdev_open+0x0/0x180
 [<c0167bc9>] __dentry_open+0xc9/0x210
 [<c0167e2c>] do_filp_open+0x5c/0x70
 [<c0167a91>] get_unused_fd+0x61/0xd0
 [<c0167e93>] do_sys_open+0x53/0x100
 [<c0167f97>] sys_open+0x27/0x30
 [<c010303b>] syscall_call+0x7/0xb

using this test application available on:
 http://www.ruivo.org/~aris/pty_sodomizer.c

Signed-off-by: Aristeu Sergio Rozanski Filho <aris@ruivo.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-01 14:53:39 -08:00
Ryusuke Konishi e047d1cfc3 [AGPGART] fix compile errors
This fixes the following compile failures of agpgart drivers.
These errors were inserted by the recent AGPGART constification patch.

drivers/char/agp/uninorth-agp.c:492: error: expected '{' before 'const'
drivers/char/agp/uninorth-agp.c:517: error: expected '{' before 'const'
drivers/char/agp/uninorth-agp.c: In function 'agp_uninorth_probe':
drivers/char/agp/uninorth-agp.c:634: error: 'u3_agp_driver' undeclared (first use in this function)
drivers/char/agp/uninorth-agp.c:634: error: (Each undeclared identifier is reported only once
drivers/char/agp/uninorth-agp.c:634: error: for each function it appears in.)
drivers/char/agp/uninorth-agp.c:636: error: 'uninorth_agp_driver' undeclared (first use in this function)

Signed-off-by: Ryusuke Konishi <ryusuke@osrg.net>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-02-27 00:36:00 -05:00
Kyle McMartin fb55a0debe [PARISC] parisc-agp: Fix thinko const-ifying
Can't really blame davej for mucking this up... static-ify
it while we're at it, which would have prevented this...

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-26 21:29:26 -05:00
Rusty Russell 8cd0ae056a [PATCH] Make hvc_console.c compile on non-powerpc: Remove NO_IRQ
Paulus preferred this over #defining NO_IRQ in the file, since that's
0 for powerpc anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-26 12:58:33 -08:00
Linus Torvalds b0138a6cb7 Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (78 commits)
  [PARISC] Use symbolic last syscall in __NR_Linux_syscalls
  [PARISC] Add missing statfs64 and fstatfs64 syscalls
  Revert "[PARISC] Optimize TLB flush on SMP systems"
  [PARISC] Compat signal fixes for 64-bit parisc
  [PARISC] Reorder syscalls to match unistd.h
  Revert "[PATCH] make kernel/signal.c:kill_proc_info() static"
  [PARISC] fix sys_rt_sigqueueinfo
  [PARISC] fix section mismatch warnings in harmony sound driver
  [PARISC] do not export get_register/set_register
  [PARISC] add ENTRY()/ENDPROC() and simplify assembly of HP/UX emulation code
  [PARISC] convert to use CONFIG_64BIT instead of __LP64__
  [PARISC] use CONFIG_64BIT instead of __LP64__
  [PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro
  [PARISC] more ENTRY(), ENDPROC(), END() conversions
  [PARISC] fix ENTRY() and ENDPROC() for 64bit-parisc
  [PARISC] Fixes /proc/cpuinfo cache output on B160L
  [PARISC] implement standard ENTRY(), END() and ENDPROC()
  [PARISC] kill ENTRY_SYS_CPUS
  [PARISC] clean up debugging printks in smp.c
  [PARISC] factor syscall_restart code out of do_signal
  ...

Fix conflict in include/linux/sched.h due to kill_proc_info() being made
publicly available to PARISC again.
2007-02-26 12:48:06 -08:00
Linus Torvalds a22a0fab32 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] Further constification.
  [AGPGART] Fix modular agpgart ia64 allmodconfig
2007-02-26 11:39:49 -08:00
Dave Jones e5524f355a [AGPGART] Further constification.
Make agp_bridge_driver->aperture_sizes and ->masks const.
Also agp_bridge_data->driver

Signed-off-by: Dave Jones <davej@redhat.com>
2007-02-22 18:41:28 -05:00
Linus Torvalds 5fc7e655a5 Fix bogus 'inline' in drivers/char/ip2/i2lib.c
Not only was the function way too big to be inlined in the first place,
it was used before it was even defined.

Noted-by: Faik Uygur <faik@pardus.org.tr>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-21 11:18:26 -08:00
Randy Dunlap 23cac8debc [PATCH] tty: use NULL for ptrs
Fix sparse warning in tty_io:
drivers/char/tty_io.c:1536:34: warning: Using plain integer as NULL pointer

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:14 -08:00
Alexey Dobriyan ae6b95d4d8 [PATCH] mwave: interesting flags savings
Flags from spin_lock_irqsave() are saved into global variable and restored
from it.  My gut feeling this is very racy.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:14 -08:00
Zwane Mwaikambo a5220b463e [AGPGART] Fix modular agpgart ia64 allmodconfig
My previous compat AGP patch broke modular AGPGART.

Test built on;

i386 CONFIG_AGP=y,m
x86_64 CONFIG_AGP=y
ia64 CONFIG_AGP=m

Signed-off-by: Zwane Mwaikambo <zwane@infradead.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-02-20 14:18:01 -05:00
Linus Torvalds d7f786e065 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [NET] Eliminate user-selectable CONFIG_MV643XX_ETH_[012]
  [MIPS] Drop __init from init_8259A()
  [MIPS] Fix Kconfig typo bug
  [MIPS] Fix double signal on trap and break instruction
  [MIPS] sigset_32 has been made redundand by compat_sigset_t.
  [MIPS] emma2rh: Remove needless <asm/i8259.h> inclusion.
  [MIPS] Add MTD device support for Cobalt
2007-02-20 10:14:29 -08:00
Geert Uytterhoeven e5717c48ed [PATCH] tty_register_driver: Remove incorrect and superfluous cast
tty_register_driver: Remove incorrect and superfluous cast (expected and passed
types are both const char *)

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 10:13:45 -08:00
Yoichi Yuasa c316eb1eee [MIPS] Add MTD device support for Cobalt
This patch has added MTD device support for Cobalt.
Moreover, removes old type FlashROM support.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-20 17:11:55 +00:00
Linus Torvalds 2aa6eb313e Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] machzwd warning fix
2007-02-19 14:16:51 -08:00
Andrew Morton 420cff550f [WATCHDOG] machzwd warning fix
From: Andrew Morton <akpm@linux-foundation.org>

drivers/char/watchdog/machzwd.c: In function 'zf_ioctl':
drivers/char/watchdog/machzwd.c:327: warning: passing argument 1 of 'zf_ping' makes integer from pointer without a cast

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-02-17 22:42:15 +01:00
Willy Tarreau 88dacbe961 rio: typo in bitwise AND expression.
The line :

    hp->Mode &= !RIO_PCI_INT_ENABLE;

is obviously wrong as RIO_PCI_INT_ENABLE=0x04 and is used as a bitmask
2 lines before. Getting no IRQ would not disable RIO_PCI_INT_ENABLE
but rather RIO_PCI_BOOT_FROM_RAM which equals 0x01.

Obvious fix is to change ! for ~.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-17 18:57:09 +01:00
Kyle McMartin e7b3ca0854 Merge branch 'parisc' from /home/kyle/repos/parisc-2.6.git
Conflicts:

	arch/parisc/hpux/sys_hpux.c
	arch/parisc/mm/ioremap.c
2007-02-17 00:18:23 -05:00
Linus Torvalds f8abea8f8c Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] allow drm populated agp memory types cleanups
  [AGPGART] intel-agp: Use ARRAY_SIZE macro when appropriate
  [AGPGART] Add agp-type-to-mask-type method missing from some drivers.
  [AGPGART] Don't try to remap i810 registers on resume.
  [AGPGART] Allow drm-populated agp memory types
  [AGPGART] compat ioctl
2007-02-16 08:17:04 -08:00
john stultz 1489939f0a [PATCH] time: x86_64: convert x86_64 to use GENERIC_TIME
This patch converts x86_64 to use the GENERIC_TIME infrastructure and adds
clocksource structures for both TSC and HPET (ACPI PM is shared w/ i386).

[akpm@osdl.org: fix printk timestamps]
[akpm@osdl.org: fix printk ckeanups]
[akpm@osdl.org: hpet build fix]
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <ak@muc.de>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-16 08:14:00 -08:00
Ingo Molnar 88ad0bf689 [PATCH] Add SysRq-Q to print timer_list debug info
Add SysRq-Q to print pending timers and other timer info.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-16 08:13:59 -08:00
Eric W. Biederman 0b4d414714 [PATCH] sysctl: remove insert_at_head from register_sysctl
The semantic effect of insert_at_head is that it would allow new registered
sysctl entries to override existing sysctl entries of the same name.  Which is
pain for caching and the proc interface never implemented.

I have done an audit and discovered that none of the current users of
register_sysctl care as (excpet for directories) they do not register
duplicate sysctl entries.

So this patch simply removes the support for overriding existing entries in
the sys_sysctl interface since no one uses it or cares and it makes future
enhancments harder.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Howells <dhowells@redhat.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Corey Minyard <minyard@acm.org>
Cc: Neil Brown <neilb@suse.de>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Jan Kara <jack@ucw.cz>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Cc: David Chinner <dgc@sgi.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:59 -08:00
Eric W. Biederman 7735362ac3 [PATCH] sysctl: remove sys_sysctl support from drivers/char/rtc.c
The real time clock driver was using the binary number reserved for cdroms in
the sysctl binary number interface, which is a no-no.  So since the sysctl
binary interface is wrong remove it.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:57 -08:00
Eric W. Biederman 22943364cf [PATCH] sysctl: remove sys_sysctl support from the hpet timer driver
In the binary sysctl interface the hpet driver was claiming to be the cdrom
driver.  This is a no-no so remove support for the binary interface.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:57 -08:00
Eric W. Biederman bfe1a1e160 [PATCH] sysctl: ipmi: remove unnecessary insert_at_head flag
With unique sysctl binary numbers setting insert_at_head is pointless.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Corey Minyard <minyard@acm.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:56 -08:00
Thomas Gleixner 38515e908b [PATCH] Scheduled removal of SA_xxx interrupt flags fixups
The obsolete SA_xxx interrupt flags have been used despite the scheduled
removal.  Fixup the remaining users.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Greg KH <greg@kroah.com>
Cc: Dave Airlie <airlied@linux.ie>
Cc: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:54 -08:00
Tim Schmielau cd354f1ae7 [PATCH] remove many unneeded #includes of sched.h
After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there.  Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.

To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.

Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm.  I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:54 -08:00
Linus Torvalds 58a3bb5997 Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: (23 commits)
  [WATCHDOG] timers cleanup
  [WATCHDOG] ib700wdt.c - convert to platform_device part 2
  [WATCHDOG] ib700wdt.c - convert to platform_device
  [WATCHDOG] ib700wdt.c spinlock/WDIOC_SETOPTIONS changes
  [WATCHDOG] ib700wdt.c small clean-up's
  [WATCHDOG] ib700wdt.c clean-up init and exit routines
  [WATCHDOG] ib700_wdt.c stop + set_heartbeat operations
  [WATCHDOG] show default value for nowayout in module parameter
  [WATCHDOG] advantechwdt.c - convert to platform_device part 2
  [WATCHDOG] advantechwdt.c - convert to platform_device
  [WATCHDOG] advantechwdt.c - move set_heartbeat to a seperate function
  [WATCHDOG] advantechwdt.c - cleanup before platform_device patches
  [WATCHDOG] acquirewdt.c - convert to platform_device part 2
  [WATCHDOG] acquirewdt.c - convert to platform_device
  [WATCHDOG] acquirewdt.c - clean before platform_device patches
  [WATCHDOG] pcwd_usb.c - get heartbeat from dip switches
  [WATCHDOG] pcwd.c - e-mail adres update
  [WATCHDOG] pcwd_usb.c - get heartbeat from dip switches
  [WATCHDOG] pcwd_usb.c - document includes
  [WATCHDOG] pcwd_pci.c - spinlock fixes
  ...
2007-02-13 16:10:08 -08:00
Eric W. Biederman 7f1f86a0d0 [PATCH] Fix SAK_work workqueue initialization.
Somewhere in the rewrite of the work queues my cleanup of SAK handling
got broken.  Maybe I didn't retest it properly or possibly the API
was changing so fast I missed something.  Regardless currently
triggering a SAK now generates an ugly BUG_ON and kills the kernel.

Thanks to Alexey Dobriyan <adobriyan@openvz.org> for spotting this.

This modifies the use of SAK_work to initialize it when the data
structure it resides in is initialized, and to simply call
schedule_work when we need to generate a SAK.  I update both
data structures that have a SAK_work member for consistency.

All of the old PREPARE_WORK calls that are now gone.

If we call schedule_work again before it has processed it
has generated the first SAK it will simply ignore the duplicate
schedule_work request.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-13 16:07:36 -08:00
Wim Van Sebroeck 88d5a7bb75 Merge ../linux-2.6-watchdog-mm 2007-02-13 23:24:34 +01:00
Jiri Slaby 82eb7c5059 [WATCHDOG] timers cleanup
- Use timer macros to set function and data members and to modify
  expiration time.
- Use DEFINE_TIMER for single (platform dependent) watchdog timers and
  do not init them at run-time in these cases.
- del_timer_sync is common in most cases -- we want to wait for timer
  function if it's still running.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Steve Hill <steve@navaho.co.uk>
Cc: Heiko Ronsdorf <hero@ihg.uni-duisburg.de>
Cc: Fernando Fuganti <fuganti@conectiva.com.br>
Cc: Gergely Madarasz <gorgo@itc.hu>
Cc: Ken Hollis <khollis@bitgate.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-02-12 22:43:02 +01:00
Arjan van de Ven 2b8693c061 [PATCH] mark struct file_operations const 3
Many struct file_operations in the kernel can be "const".  Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data.  In addition it'll catch accidental writes at compile time to
these shared resources.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:45 -08:00
Eric W. Biederman ab521dc0f8 [PATCH] tty: update the tty layer to work with struct pid
Of kernel subsystems that work with pids the tty layer is probably the largest
consumer.  But it has the nice virtue that the assiation with a session only
lasts until the session leader exits.  Which means that no reference counting
is required.  So using struct pid winds up being a simple optimization to
avoid hash table lookups.

In the long term the use of pid_nr also ensures that when we have multiple pid
spaces mixed everything will work correctly.

Signed-off-by: Eric W. Biederman <eric@maxwell.lnxi.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:32 -08:00
Eric W. Biederman 3e7cd6c413 [PATCH] pid: replace is_orphaned_pgrp with is_current_pgrp_orphaned
Every call to is_orphaned_pgrp passed in process_group(current) which is racy
with respect to another thread changing our process group.  It didn't bite us
because we were dealing with integers and the worse we would get would be a
stale answer.

In switching the checks to use struct pid to be a little more efficient and
prepare the way for pid namespaces this race became apparent.

So I simplified the calls to the more specialized is_current_pgrp_orphaned so
I didn't have to worry about making logic changes to avoid the race.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:32 -08:00
Eric W. Biederman 04a2e6a5cb [PATCH] pid: make session_of_pgrp use struct pid instead of pid_t
To properly implement a pid namespace I need to deal exclusively in terms of
struct pid, because pid_t values become ambiguous.

To this end session_of_pgrp is transformed to take and return a struct pid
pointer.  To avoid the need to worry about reference counting I now require my
caller to hold the appropriate locks.  Leaving callers repsonsible for
increasing the reference count if they need access to the result outside of
the locks.

Since session_of_pgrp currently only has one caller and that caller simply
uses only test the result for equality with another process group, the locking
change means I don't actually have to acquire the tasklist_lock at all.

tiocspgrp is also modified to take and release the lock.  The logic there is a
little more complicated but nothing I won't need when I convert pgrp of a tty
to a struct pid pointer.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:31 -08:00
Eric W. Biederman 2ea81868d8 [PATCH] tty: fix the locking for signal->session in disassociate_ctty
commit 24ec839c43 while fixing the locking for
signal->tty got the locking wrong for signal->session.  This places our
accesses of signal->session back under the tasklist_lock where they belong.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:31 -08:00
Eric W. Biederman 680a967100 [PATCH] tty: clarify disassociate_ctty
The code to look at tty_old_pgrp and send SIGHUP and SIGCONT when it is
present only executes when disassociate_ctty is called from do_exit.  Make
this clear by adding an explict on_exit check, and explicitly setting
tty_old_pgrp to 0.

In addition fix the locking by reading tty_old_pgrp under the siglock.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:31 -08:00
Eric W. Biederman cdc6233008 [PATCH] tty: make __proc_set_tty static
The aim of this patch set is to start wrapping up the struct pid conversions.
As such this patchset culminates with the removal of kill_pg, kill_pg_info,
__kill_pg_info, do_each_task_pid, and while_each_task_pid.

kill_proc, daemonize, and kernel_thread are still in my sights but there is
still work to get to them.

The first three are basic cleanups around disassociate_ctty, while working on
converting it I found several issues.  tty_old_pgrp can be a tricky concept to
wrap your head around.

 1 tty: Make __proc_set_tty static.
 2 tty: Clarify disassociate_ctty
 3 tty: Fix the locking for signal->session in disassociate_ctty

These just stop using the old helper functions.

 4 signal: Use kill_pgrp not kill_pg in the sunos compatibility code.
 5 signal: Rewrite kill_something_info so it uses newer helpers.

Then the grind to convert the tty layer and all of it's helper functions to
struct pid.

 6 pid: Make session_of_pgrp use struct pid instead of pid_t.
 7 pid: Use struct pid for talking about process groups in exit.c
 8 pid: Replace is_orphaned_pgrp with is_current_pgrp_orphaned
 9 tty: Update the tty layer to work with struct pid.

A final helper function update.

10 pid: Replace do/while_each_task_pid with do/while_each_pid_task

And the removal of the functions that are now unused.
11 pid: Remove now unused do_each_task_pid and while_each_task_pid
12 pid: Remove the now unused kill_pg kill_pg_info and __kill_pg_info

All of these should be fairly simple and to the point.

This patch:

Currently all users of __proc_set_tty are in tty_io.c so make the function
static.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:31 -08:00
Jiri Kosina efc47135e4 [PATCH] DS1302: local_irq_disable() is redundant after local_irq_save()
drivers/char/ds1302.c::get_rtc_time() contains local_irq_disable() call
after local_irq_save(). This looks redundant.

drivers/char/ds1302.c::rtc_ioctl() contains local_irq_disable() call after
local_irq_save(). This looks redundant.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:30 -08:00
Jiri Slaby 40565f1962 [PATCH] Char: timers cleanup
- Use timer macros to set function and data members and to modify
  expiration time.
- Use DEFINE_TIMER for global timers and do not init them at run-time in
  these cases.
- del_timer_sync is common in most cases -- we want to wait for timer
  function if it's still running.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Dave Airlie <airlied@linux.ie>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Kylene Jo Hall <kjhall@us.ibm.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Dmitry Torokhov <dtor@mail.ru>	(Input bits)
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:30 -08:00
Jiri Slaby d096f3e989 [PATCH] Char: specialix, isr have 2 params
specialix, isr have 2 params

pt_regs are no longer the third parameter of isr, call sx_interrupt without
it.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:30 -08:00
Jiri Slaby 893de2dffb [PATCH] Char: cyclades, use pci_device_id
Use pci_device_id struct instead of ushort array. Add MODULE_DEVICE_TABLE.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:28 -08:00
Jiri Slaby 29d73aab33 [PATCH] Char: use more PCI_DEVICE macro
Use more PCI_DEVICE macro

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be> (alim7101_wdt.c part)
Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:27 -08:00
Linus Torvalds d68798374b Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: remove scan_keyb driver
  Input: i8042 - fix AUX IRQ delivery check
  Input: wistron - add support for Fujitsu-Siemens Amilo D88x0
  Input: inport - use correct config option for ATIXL
  Input: HIL - handle erros from input_register_device()
  Input: tsdev - schedule removal
  Input: add Atlas button driver
  Input: ads7846 - be more compatible with the hwmon framework
  Input: ads7846 - detect pen up from GPIO state
  Input: ads7846 - select correct SPI mode
  Input: ads7846 - switch to using hrtimer
  Input: ads7846 - optionally leave Vref on during differential measurements
  Input: ads7846 - pluggable filtering logic
  Input: gpio-keys - keyboard driver for GPIO buttons
  Input: hid-ff - add support for Logitech Momo racing wheel
  Input: i8042 - really suppress ACK/NAK during panic blink
  Input: pc110pad - return proper error
2007-02-11 11:50:24 -08:00
Jiri Kosina 3abf3beda7 [PATCH] CHAR-Amiserial: turn local_save_flags() + local_irq_disable() into local_irq_save()
drivers/char/amiserial.c::rs_write() contains local_irq_disable() after
local_save_flags().  Turn it into local_irq_save().

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 11:18:07 -08:00
Christoph Hellwig d5698c28b6 [PATCH] tty: cleanup release_mem
release_mem contains two copies of exactly the same code.  Refactor these
into a new helper, release_tty.  The only change in behaviour is that the
driver reference count is now decremented after the master tty has been
freed instead of before.

[penberg@cs.helsinki.fi: fix use-after-free in release_tty.]
Cc: Alan Cox <alan@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 11:18:07 -08:00
Cedric Le Goater 8cddd7076a [PATCH] mxser: remove useless fields
the session and pgrp fields in mxser_struct are unused.

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 11:18:06 -08:00
Alexey Dobriyan 967bb77c69 [PATCH] seq_file conversion: toshiba.c
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:34 -08:00
Jeff Moyer 38584c14bb [PATCH] raw: don't allow the creation of a raw device with minor number 0
Minor number 0 (under the raw major) is reserved for the rawctl device
file, which is used to query, set, and unset raw device bindings.  However,
the ioctl interface does not protect the user from specifying a raw device
with minor number 0:

$ sudo ./raw /dev/raw/raw0 /dev/VolGroup00/swap
/dev/raw/raw0:  bound to major 253, minor 2
$ ls -l /dev/rawctl
ls: /dev/rawctl: No such file or directory
$ ls -l /dev/raw/raw0
crw------- 1 root root 162, 0 Jan 12 10:51 /dev/raw/raw0
$ sudo ./raw -qa
Cannot open master raw device '/dev/rawctl' (No such file or directory)

As you can see, this prevents any further raw operations from
succeeding.  The fix (from Steve Fernandez) is quite simple--do not
allow the allocation of minor number 0.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Cc: Steven Fernandez <sfernand@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:34 -08:00
Alan Cox 78137e3b34 [PATCH] tty: improve encode_baud_rate logic
Mostly so people can see the work in progress.  This enhances the encode
function which isn't currently used in the base tree but is when using some of
the testing tty patches.

This resolves a problem with some hardware where applications got confusing
information from the tty ioctls.  Correct but confusing.

In some situations asking for, say, 9600 baud actually gets you 9595 baud or
similar near-miss values.  With the old code this meant that a request for
B9600 got a return of BOTHER, 9595 which programs interpreted as a failure.

The new code now works on the following basis

- If you ask for specific rate via BOTHER, you get a precise return

- If you ask for a standard Bfoo rate and the result is close you get a Bfoo
  return

- If you ask for a standard Bfoo rate and get something way off you get a
  BOTHER/rate return

This seems to fix up the cases I've found where this broke compatibility.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:32 -08:00
Alexey Dobriyan b653d081c1 [PATCH] proc: remove useless (and buggy) ->nlink settings
Bug: pnx8550 code creates directory but resets ->nlink to 1.

create_proc_entry() et al will correctly set ->nlink for you.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Greg KH <greg@kroah.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:32 -08:00
Corey Minyard 78ba2faf71 [PATCH] IPMI: Fix some RCU problems
Fix some RCU problem pointed out by Paul McKenney of IBM.  These are:

The wholesale move of the command receivers list into a new list was not
safe because the list will point to the new tail during a traversal, so the
traversal will never end on a reader if this happens during a read.

Memory barriers were needed to handle proper ordering of the setting of the
IPMI interface as valid.  Readers might not see proper ordering of data
otherwise.

In ipmi_smi_watcher_register(), the use of the _rcu suffix on the list is
unnecessary.

This require the list_splice_init_rcu() patch previously posted.

Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:31 -08:00
Jiri Slaby a784bf7c19 [PATCH] Char: moxa, pci probing
Alter the driver to use the pci probing.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:30 -08:00
Jiri Slaby 9cde5bf027 [PATCH] Char: moxa, pci_probing prepare
- change pci conf prototype and rename it to moxa_pci_probe
- move some code to moxa_pci_probe
- create moxa_pci_remove

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:30 -08:00
Jiri Slaby 181d6f4fac [PATCH] Char: moxa, remove useless variables
Remove temporary or once used variables, that can be defined locally to
save some bytes.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:30 -08:00
Jiri Slaby 8f8ecbad09 [PATCH] Char: moxa, variables cleanup
- rename moxaChannels to moxa_port
- rename moxa_str to moxa_ports
- move board global variables into moxa_board
- move port global variables into moxa_port

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:30 -08:00
Jiri Slaby 889074ee0b [PATCH] Char: moxa, remove moxa_pci_devinfo
Nothing is used from this struct but *pdev. Remove it and store only pdev.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:30 -08:00
Jiri Slaby c251ae0d75 [PATCH] Char: moxa, use del_timer_sync
Use del_timer_sync in most timer deletions, we don't want to oops in the timer
function.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:30 -08:00
Jiri Slaby 11324edd4a [PATCH] Char: moxa, macros cleanup
Remove yet defined or unused macros and whitespace cleanup around the rest.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:30 -08:00
Jiri Slaby 9dff89cd82 [PATCH] Char: moxa, eliminate typedefs
Do not use typedefs, use directly struct <something> instead.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:30 -08:00
Jiri Slaby 5ebb4078af [PATCH] Char: moxa, use PCI_DEVICE
Use PCI_DEVICE macro in pci_device_id list.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:30 -08:00
Jiri Slaby 224299d444 [PATCH] Char: moxa, devids cleanup
Move them to pci_ids.h

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:30 -08:00
Jiri Slaby c5b466e70f [PATCH] Char: moxa, remove unused functions
Remove ifdeffed functions and cleanup comments including too long license
terms.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:30 -08:00
Jiri Slaby ba196df3d6 [PATCH] Char: moxa, remove hangup bottomhalf
Call tty_hangup directly, we do not need a bottomhalf for this.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:30 -08:00
Jiri Slaby aa7e5221fb [PATCH] Char: moxa, timers cleanup
Use kernel macros and functions for timer encapsulation -- do not access
fileds directly.  Also del_timer on inactive is legal, so that noting if it
runs is senseless, delete these variables.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby 9fa372a850 [PATCH] Char: moxa, do not initialize global static
Remove useless initialization of variables a) statically b) dynamically at
module_init c) dynamically after kzalloc (those with '= 0/NULL')

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby f204d26720 [PATCH] Char: moxa, remove unused allocated page
moxaXmitBuff is almost unused -- only one byte from the whole PAGE_SIZE bytes
is used.  Do not alloc so much space for almost anything.  Also remove lock
protecting this page allocation.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby a136e99f12 [PATCH] Char: mxser_new, fix sparse warning
Feed NULL instead of 0 where pointer is expected.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <osv@javad.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby 5ff7205dd9 [PATCH] Char: mxser_new, lock count and flags
Both open count and INITIALIZED flag should be changed under lock.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <osv@javad.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby 722d5e4ae8 [PATCH] Char: mxser_new, do not null driver_data
driver_data are initialzed to NULL from tty layer, no need to do it in the
driver.  In this case it cases oops, since driver_data may be NULL for a short
while for another closing process.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <osv@javad.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby f64c84a166 [PATCH] Char: mxser_new, upgrade to 1.9.15
- allow special rates
- break when bad status

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby 1a221026c3 [PATCH] Char: mxser_new, do not put pdev
We don't call pci_dev_get, so do not call pci_dev_put in the pci release
function.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby 45257fa9a5 [PATCH] Char: mxser_new, fix twice resource releasing
Because brd->info is not NULLed, resources are released twice.  NULL it in
pci_remove function.  Also take care of retval and releasing in pci_probe --
mxser_initbrd alreasy releases resource, do not do it again in fail path in
probe function.

Cc: Sergei Organov <osv@javad.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby 18b95576bc [PATCH] Char: mxser_new, less loops in isr
Loop only 100^2 times, not 99999^2 times in isr (at most).

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby ed79ba12e9 [PATCH] Char: mxser_new, header file cleanup
- Remove no longer used macros
- Move some macros from the header to the code
- Remove c++ comments
- Align backslashes to one column

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby f574874bc8 [PATCH] Char: mxser_new, alter locking in isr
Avoid oopsing when stress-testing open/close -- port->tty is NULL sometimes,
but is expected to be non-NULL, since dereferencing.  Receive/transmit chars
iff ASYNC_CLOSING is not set and ASYNC_INITIALIZED is set.  Thanks Sergei for
pointing this out and testing.

Cc: Sergei Organov <osv@javad.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby c493edd13d [PATCH] Char: mxser_new, clean request_irq call
We always set ASYNC_SHARE_IRQ, so do not test against this flag and request
shared irq directly.  Also remove nonsense comment.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jiri Slaby 47c85c0db1 [PATCH] Char: mxser_new, remove tty_wakeup bottomhalf
It's safe to call tty_wakeup from irq context. Do not schedule it for later
calling.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jiri Slaby 98c47ea28a [PATCH] Char: mxser, obsolete old, nonexperimental new
Mark v 1.x as obsolete and v 2.x as non-experimental in Kconfig.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jiri Slaby a24f1405b0 [PATCH] Char: mxser_new, remove unused stuff
- nobody waits on close_wait
- ASYNC_SPLIT_TERMIOS is not set by anybody, so do not test this flag
- process session and pgrp are useless information

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jiri Slaby 5e07e1ccb0 [PATCH] Char: n_r3964, cleanup
- Lindent the code
- allow semicolons after macros by 'do {} while (0)'
- eliminate C++ comments

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jiri Slaby 44bafdf37b [PATCH] Char: serial167, cleanup
serial167, cleanup

- Lindent the code
- remove 3 pointers from paranoia_check

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jiri Slaby 30a063a900 [PATCH] Char: mxser_new, remove useless spinlock
gm_lock is useless, since ISA is configured at init time and there it's
serialized.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jiri Slaby c76b09301e [PATCH] Char: mxser_new, mark init functions
Mark some funcions with __init and __devinit.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00