Commit graph

54672 commits

Author SHA1 Message Date
Ron Mercer fd2df4f743 qlge: Fix sparse endian warning in ql_hw_csum_setup().
Changed u16 to __sum16 usage.

Warnings:
drivers/net/qlge/qlge_main.c:1897:9: warning: incorrect type in assignment (different base types)
drivers/net/qlge/qlge_main.c:1897:9:    expected unsigned short [usertype] *check
drivers/net/qlge/qlge_main.c:1897:9:    got restricted unsigned short *<noident>
drivers/net/qlge/qlge_main.c:1903:9: warning: incorrect type in assignment (different base types)
drivers/net/qlge/qlge_main.c:1903:9:    expected unsigned short [usertype] *check
drivers/net/qlge/qlge_main.c:1903:9:    got restricted unsigned short *<noident>
drivers/net/qlge/qlge_main.c:1909:9: warning: incorrect type in assignment (different base types)
drivers/net/qlge/qlge_main.c:1909:9:    expected unsigned short [unsigned] [short] [usertype] <noident>

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-05 18:18:45 -08:00
Ron Mercer a303ce0972 qlge: Fix sparse endian warning for inbound packet control block flags.
Changed flags element from __le32 to 3 reserved bytes and one byte of
flags.  Changed flags bit definitions to reflect byte width instead of
__le32 width.

Warnings:
drivers/net/qlge/qlge_main.c:1206:16: warning: restricted degrades to integer
drivers/net/qlge/qlge_main.c:1207:16: warning: restricted degrades to integer
drivers/net/qlge/qlge_main.c:1233:17: warning: restricted degrades to integer
drivers/net/qlge/qlge_main.c:1276:17: warning: restricted degrades to integer
drivers/net/qlge/qlge_main.c:1349:19: warning: restricted degrades to integer

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-05 18:18:22 -08:00
Ron Mercer 8306c952a5 qlge: Fix sparse warnings for byte swapping in qlge_ethool.c
drivers/net/qlge/qlge_ethtool.c:59:23: warning: cast to restricted type
drivers/net/qlge/qlge_ethtool.c:59:21: warning: incorrect type in assignment (different base types)
drivers/net/qlge/qlge_ethtool.c:59:21:    expected restricted unsigned short [usertype] irq_delay
drivers/net/qlge/qlge_ethtool.c:59:21:    got unsigned short [unsigned] [usertype] <noident>
drivers/net/qlge/qlge_ethtool.c:61:8: warning: cast to restricted type
drivers/net/qlge/qlge_ethtool.c:60:21: warning: incorrect type in assignment (different base types)
drivers/net/qlge/qlge_ethtool.c:60:21:    expected restricted unsigned short [usertype] pkt_delay
drivers/net/qlge/qlge_ethtool.c:60:21:    got unsigned short [unsigned] [usertype] <noident>
drivers/net/qlge/qlge_ethtool.c:82:23: warning: cast to restricted type
drivers/net/qlge/qlge_ethtool.c:82:21: warning: incorrect type in assignment (different base types)
drivers/net/qlge/qlge_ethtool.c:82:21:    expected restricted unsigned short [usertype] irq_delay
drivers/net/qlge/qlge_ethtool.c:82:21:    got unsigned short [unsigned] [usertype] <noident>
drivers/net/qlge/qlge_ethtool.c:84:8: warning: cast to restricted type
drivers/net/qlge/qlge_ethtool.c:83:21: warning: incorrect type in assignment (different base types)
drivers/net/qlge/qlge_ethtool.c:83:21:    expected restricted unsigned short [usertype] pkt_delay
drivers/net/qlge/qlge_ethtool.c:83:21:    got unsigned short [unsigned] [usertype] <noident>

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-05 18:17:33 -08:00
Brice Goglin 0f840011f0 myri10ge: print MAC and serial number on probe failure
To help board identification and diagnosis, print the MAC
and serial number on probe failure if they are available.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-05 18:16:14 -08:00
Stephen Rothwell 48e4cc777c net/ehea: bitops work on unsigned longs
The flags field of struct ehea_port is only used with test_bit(),
clear_bit() and set_bit() and these interfaces only work on
"unsigned long"s, so change the field to be an "unsigned long".  Also,
this field only has two bits defined for it (0 and 1) so will still be
fine if someone builds this driver for a 32 bit arch (at least as far as
this flags field is concerned).

Also note that ehea_driver_flags is only used in ehca_main.c, so make it
static in there.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-05 16:06:02 -08:00
Christoph Hellwig 4c728ef583 add a vfs_fsync helper
Fsync currently has a fdatawrite/fdatawait pair around the method call,
and a mutex_lock/unlock of the inode mutex.  All callers of fsync have
to duplicate this, but we have a few and most of them don't quite get
it right.  This patch adds a new vfs_fsync that takes care of this.
It's a little more complicated as usual as ->fsync might get a NULL file
pointer and just a dentry from nfsd, but otherwise gets afile and we
want to take the mapping and file operations from it when it is there.

Notes on the fsync callers:

 - ecryptfs wasn't calling filemap_fdatawrite / filemap_fdatawait on the
   	lower file
 - coda wasn't calling filemap_fdatawrite / filemap_fdatawait on the host
	file, and returning 0 when ->fsync was missing
 - shm wasn't calling either filemap_fdatawrite / filemap_fdatawait nor
   taking i_mutex.  Now given that shared memory doesn't have disk
   backing not doing anything in fsync seems fine and I left it out of
   the vfs_fsync conversion for now, but in that case we might just
   not pass it through to the lower file at all but just call the no-op
   simple_sync_file directly.

[and now actually export vfs_fsync]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-01-05 11:54:28 -05:00
Al Viro 56ff5efad9 zero i_uid/i_gid on inode allocation
... and don't bother in callers.  Don't bother with zeroing i_blocks,
while we are at it - it's already been zeroed.

i_mode is not worth the effort; it has no common default value.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-01-05 11:54:28 -05:00
Ben Dooks 88f60f62f3 Merge branch 'i2c-next-s3c' into i2c-next 2009-01-05 10:54:50 +00:00
Heiko Carstens 6ea2fde13a qeth: get rid of extra argument after printk to dev_* conversion
drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_setadapter_parms':
drivers/s390/net/qeth_l3_main.c:1049: warning: too many arguments for format

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 17:36:32 -08:00
Klaus-Dieter Wacker 015e691cfe qeth: No large send using EDDP for HiperSockets.
From: Klaus-Dieter Wacker <kdwacker@de.ibm.com>

The device driver qeth dos not support large send using EDDP for 
HiperSockets.

Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 17:36:05 -08:00
Frank Blaschka 5b54e16f1a qeth: do not spin for SETIP ip assist command
The ip assist hw command for setting an IP address last unacceptable
long so we can not spin while we waiting for the irq. Since we can
ensure process context for all occurrences of this command we can use
wait.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 17:35:44 -08:00
Ursula Braun fc9c24603c qeth: avoid crash in case of layer mismatch for VSWITCH
For z/VM GuestLAN or VSWITCH devices the transport layer is
configured in z/VM. The layer2 attribute of a participating Linux
device has to match the z/VM definition. In case of a mismatch
Linux currently crashes in qeth recovery due to a reference to the
not yet existing net_device.
Solution: add a check for existence of net_device and add a message
pointing to the mismatch of layer definitions in Linux and z/VM.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 17:35:18 -08:00
Ursula Braun fe94e2e0a6 qeth: exploit source MAC address for inbound layer3 packets
OSA-devices operating in layer3 mode offer adding of the source MAC
address to the QDIO header of inbound packets. The qeth driver can
exploit this functionality to replace FAKELL-entries in the ethernet
header of received packets.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 17:34:52 -08:00
Klaus-Dieter Wacker 906f1f0768 qeth: HiperSockets mcl string conversion (pre z9 mach)
The pre z9 machines provide an mcl string in EBCDIC format,
z9 or later provide string in ASCII format.

Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 17:34:10 -08:00
Gerrit Renker 745417e206 tun: Eliminate sparse signedness warning
register_pernet_gen_device() expects 'int*', found via sparse.

 CHECK   drivers/net/tun.c
 drivers/net/tun.c:1245:36: warning: incorrect type in argument 1 (different signedness)
 drivers/net/tun.c:1245:36:    expected int *id
 drivers/net/tun.c:1245:36:    got unsigned int static [toplevel] *<noident>

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 17:14:46 -08:00
Bruce Allan f26251eb68 e100: cosmetic cleanup
Add missing space after if, switch, for and while keywords.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 17:12:04 -08:00
Ron Mercer 939678f81a qlge: bugfix: Fix register access error checking.
Some indexed registers do not have error bits. In these cases a
value of zero should be used for error checking.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 17:08:29 -08:00
Ron Mercer 459caf5a99 qlge: bugfix: Fix ring length setting for rx ring, large/small
The length field for these rings is 16-bits.  If the length is
the max supported 65536 then the setting should be zero.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 17:08:11 -08:00
Ron Mercer 2b72c7849f qlge: bugfix: Fix shadow register endian issue.
Shadow registers are consistent memory locations to which the chip
echos ring indexes in little endian format.  These values need to
be endian swapped before referencing.

Note:
The register pointer declaration uses the volatile modifier which
causes warnings in checkpatch.
Per Documentation/volatile-considered-harmful.txt:
  - Pointers to data structures in coherent memory which might be modified
    by I/O devices can, sometimes, legitimately be volatile.  A ring buffer
    used by a network adapter, where that adapter changes pointers to
    indicate which descriptors have been processed, is an example of this
    type of situation.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 17:07:50 -08:00
Ron Mercer 4055c7d495 qlge: bugfix: Add missing pci_unmap_page call in receive path.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 17:07:09 -08:00
Ron Mercer c907a35acf qlge: bugfix: Add missing pci_mapping_err checking.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 17:06:46 -08:00
Baruch Siach 22692018b9 enc28j60: fix RX buffer overflow
The enc28j60 driver doesn't check whether the length of the packet as reported 
by the hardware fits into the preallocated buffer. When stressed, the hardware 
may report insanely large packets even tough the "Receive OK" bit is set. Fix 
this.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 16:23:01 -08:00
Roel Kluin fecc7036e7 isdn: capi: &&/|| typos
Correct two typos.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 16:22:04 -08:00
Jaswinder Singh Rajput cfc3a44c3c starfire: use request_firmware()
Firmware blob is big endian

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 16:12:11 -08:00
Jaswinder Singh Rajput 077f849de4 firmware: convert tg3 driver to request_firmware()
Firmware blob looks like this...
        u8 firmware_major
        u8 firmware_minor
        u8 firmware_fix
        u8 pad
        __be32 start_address
        __be32 length (total, including BSS sections to be zeroed)
        data... (in __be32 words, which is native for the firmware)

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 16:11:25 -08:00
Jaswinder Singh 949b42544a firmware: convert acenic driver to request_firmware()
We store the firmware in its native big-endian form now, so the loop in
ace_copy() is modified to use be32_to_cpup() when writing it out.

We can forget the BSS,SBSS sections of the firmware, since we were
clearing all the device's RAM anyway. And the text,rodata,data sections
can all be loaded as a single chunk since they're contiguous (give or
take a few dozen bytes in between).

Signed-off-by: Jaswinder Singh <jaswinder@infradead.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 16:10:02 -08:00
Alessandro Zummo 099e657625 rtc: add alarm/update irq interfaces
Add standard interfaces for alarm/update irqs enabling.  Drivers are no
more required to implement equivalent ioctl code as rtc-dev will provide
it.

UIE emulation should now be handled correctly and will work even for those
RTC drivers who cannot be configured to do both UIE and AIE.

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-04 13:33:20 -08:00
Bruno Prémont e687d691cb viafb: fix crashes due to 4k stack overflow
The function viafb_cursor() uses 2 stack-variables of CURSOR_SIZE bits;
CURSOR_SIZE is defined as (8 * 1024).  Using up twice 1k on stack is too
much for 4k-stack (though it works with 8k-stacks).  Make those two
variables kzalloc'ed to preserve stack space.

Also merge the whole lot of local struct's in viafb_ioctl into a union so
the stack usage gets minimized here as well.  (struct's are only accessed
in their indicidual IOCTL case) This second part is only compile-tested as
I know of no userspace app using the IOCTLs.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Cc: <JosephChan@via.com.tw>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-04 13:33:20 -08:00
Mark Brown 3f874b6643 mfd: Fix section mismatch in da903x
The subdevice removal functions are marked __devexit but are referenced
from the error handling path when probing so are needed even when
__devexit functions are removed.

Signed-off-by: Mark Brown <broonie@sirena.org.uk>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 15:31:49 +01:00
David Brownell 88e75cc347 mfd: move drivers/i2c/chips/menelaus.c to drivers/mfd
ove the menelaus driver from drivers/i2c/chips to drivers/mfd
since it's more of a multi-function device than anything else,
and since Jean is trying to vanish drivers/i2c/chips ASAP.

One way to think of these chips are as the PMIC family most
used with OMAP2 generation chips.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:44 +01:00
David Brownell 87c13493e6 mfd: move drivers/i2c/chips/tps65010.c to drivers/mfd
Move the tps65010 driver from drivers/i2c/chips to drivers/mfd
since it's more of a multi-function device than anything else,
and since Jean is trying to vanish drivers/i2c/chips ASAP.

One way to think of these chips are as the PMIC family most
used with OMAP1 generation chips.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:43 +01:00
David Brownell 0931a4c6db mfd: dm355evm msp430 driver
Basic MFD framework for the MSP430 microcontroller firmware used
on the dm355evm board:

 - Provides an interface for other drivers: register read/write
   utilities, and register declarations.

 - Directly exports:
     * Many signals through the GPIO framework
         + LEDs
         + SW6 through gpio sysfs
	 + NTSC/nPAL jumper through gpio sysfs
	 + ... more could be added later, e.g. MMC signals
     * Child devices:
	+ LEDs, via leds-gpio child (and default triggers)
	+ RTC, via rtc-dm355evm child device
	+ Buttons and IR control, via dm355evm_keys

 - Supports power-off system call.  Use the reset button to power
   the board back up; the power supply LED will be on, but the
   MSP430 waits to re-activate the regulators.

 - On probe() this:
     * Announces firmware revision
     * Turns off the banked LEDs
     * Exports the resources noted above
     * Hooks the power-off support
     * Muxes tvp5146 -or- imager for video input

Unless the new tvp514x driver (tracked for mainline) is configured,
this assumes that some custom imager driver handles video-in.

This completely ignores the registers reporting the output voltages
on the various power supplies.  Someone could add a hwmon interface
if that seems useful.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:43 +01:00
Mark Brown 4331bb3233 mfd: Add missing break from wm3850-core
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:43 +01:00
Mark Brown ca23f8c1b0 mfd: Add WM8351 support
The WM8351 is a WM8350 variant. As well as register default changes the
WM8351 has fewer voltage and current regulators than the WM8350.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:42 +01:00
Mark Brown 645524a9c6 mfd: Support configurable numbers of DCDCs and ISINKs on WM8350
Some WM8350 variants have fewer DCDCs and ISINKs. Identify these at
probe and refuse to use the absent DCDCs when running on these chips.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:42 +01:00
Mark Brown 53a0d99b1e mfd: Handle missing WM8350 platform data
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:42 +01:00
Mark Brown 9692063062 mfd: Add WM8352 support
The WM8352 is a variant of the WM8350. Aside from the register defaults
there are no software visible differences to the WM8350.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:42 +01:00
Samuel Ortiz 94964f96a6 mfd: Use irq_to_desc in twl4030 code
The global irq_desc array is soon going to be accessible only with
!CONFIG_SPARSE_IRQ. We should start using the generic irq_to_desc()
routines instead.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:42 +01:00
Mike Rapoport 342d765e01 power_supply: Add Dialog DA9030 battery charger driver
Driver for battery charger integrated into Dialog Semiconductor DA9030 PMIC

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:41 +01:00
Mike Rapoport 856f6fd119 mfd: Dialog DA9030 battery charger MFD driver
This patch amends DA903x MFD driver with definitions and methods
needed for battery charger driver.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:41 +01:00
Mark Brown b8380c1a66 mfd: Register WM8400 codec device
Register a child device for the codec in the WM8400.

Also switch the unregistration of the MFD devices to use the MFD core
since the current code is hand rolling the same thing.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:41 +01:00
Mark Brown 44faac3155 mfd: Pass driver_data onto child devices
The MFD cell structure provides a driver_data field but doesn't pass it
on to the child devices when instantiating them - do that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:41 +01:00
Samuel Ortiz 6354ab5c63 mfd: Fix twl4030-core.c build error
This is a fix for:

twl4030-core.c:(.text+0x16a797): undefined reference to `clk_get_rate'
twl4030-core.c:(.text+0x16a797): undefined reference to `clk_put'

on x86 and x86_64, as the clock API is not defined on those platforms.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:40 +01:00
David Brownell b73eac7871 mfd: twl4030 regulator bug fixes
This contains two bugfixes to the initial twl4030 regulator
support patch related to USB:

 (a) always overwrite the old list of consumers ... else
     the regulator handles all use the same "usb1v5" name;
 (b) don't set up the "usbcp" regulator, which turns out
     to be managed through separate controls, usually ULPI
     directly from the OTG controller.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:40 +01:00
David Brownell dad759ff8b mfd: twl4030: create some regulator devices
Initial code to create twl4030 voltage regulator devices, using
the new regulator framework.  Note that this now starts to care
what name is used to declare the TWL chip:

 - TWL4030 is the "old" chip; newer ones have a bigger variety
   of VAUX2 voltages.

 - TWL5030 is the core "new" chip; TPS65950 is its catalog version.

 - The TPS65930 and TPS65920 are cost-reduced catalog versions of
   TWL5030 parts ... fewer regulators, no battery charger, etc.

Board-specific regulator configuration should be provided, listing
which regulators are used and their constraints (e.g. 1.8V only).

Code that could ("should"?) leverage the regulator stuff includes
TWL4030 USB transceiver support and MMC glue, LCD support for the
3430SDP and Labrador boards, and S-Video output.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:39 +01:00
David Brownell 67460a7c26 mfd: twl4030: cleanup symbols and OMAP dependency
Finish removing dependency of TWL driver stack on platform-specific
IRQ definitions ... and remove the build dependency on OMAP.

This lets the TWL4030 code be included in test builds for most
platforms, and will make it easier for non-OMAP folk to update
most of this code for new APIs etc.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:39 +01:00
David Brownell 5725d66b9d mfd: twl4030: simplified child creation code
Minor cleanup to twl4030-core: define a helper function to populate
a single child node, and use it to replace six inconsistent versions
of the same logic.  Both object and source code shrink.

As part of this, some devices now have more IRQ resources:  battery
charger, keypad, ADC, and USB transceiver.  That helps to remove some
irq #defines that block the children's drivers code from compiling on
non-OMAP platforms.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:39 +01:00
Mark Brown 4008e879e1 power_supply: Add battery health reporting for WM8350
Implement support for reporting battery health in the WM8350 battery
interface. Since we are now able to report this via the classs remove
the diagnostics from the interrupt handler.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:39 +01:00
Mark Brown 7e386e6e0e power_supply: Add cold to the POWER_SUPPLY_HEALTH report values
Some systems are able to report problems with batteries being under
temperature.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:39 +01:00
Mark Brown b797a55519 mfd: Refactor WM8350 chip identification
Since the WM8350 driver was originally written the semantics for the
identification registers of the chip have been clarified, allowing
us to do an exact match on all the fields. This avoids mistakenly
running on unsupported hardware.

Also change to using the datasheet names more consistently for
legibility and fix a printk() that should be dev_err().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:39 +01:00
Mark Brown d756f4a444 mfd: Switch WM8350 revision detection to a feature based model
Rather than check for chip revisions in the WM8350 drivers have the core
code set flags for relevant differences.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:38 +01:00
Mark Brown 14431aa0c5 power_supply: Add support for WM8350 PMU
This patch adds support for the PMU provided by the WM8350 which
implements battery, line and USB supplies including a battery charger.
The hardware functions largely autonomously, with minimal software
control required to initiate fast charging.

Support for configuration of the USB supply is not yet implemented.
This means that the hardware will remain in the mode configured at
startup, by default limiting the current drawn from USB to 100mA.

This driver was originally written by Liam Girdwood with subsequent
updates for submission by Mark Brown.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:38 +01:00
David Brownell 3fba19ec1a mfd: allow reading entire register banks on twl4030
Minor change to the TWL4030 utility interface:  support reads
of all 256 bytes in each register bank (vs just 255).  This
can help when debugging, but is otherwise a NOP.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:38 +01:00
Mark Brown 6748852634 mfd: Add AUXADC support for WM8350
The auxiliary ADC in the WM8350 is shared between several subdevices
so access to it needs to be arbitrated by the core driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:38 +01:00
Mark Brown 0c8a601678 mfd: Add WM8350 revision H support
No other software changes are required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:38 +01:00
Mark Brown 858e674466 mfd: Add some documentation for WM8350 register lock
Hopefully this will make the purpose of these functions a bit clearer,
it's not immediately obvious that the lock is a hardware feature.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:37 +01:00
Mark Brown 2c5212279a mfd: Remove i.MX31ism from WM8350 i2c driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:37 +01:00
Mark Brown 6cd99b7828 mfd: Don't mark WM8350 security register as volatile
There's no need to read this back from the chip each time.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04 12:17:37 +01:00
Jiri Kosina ed42350e02 Merge branch 'upstream-fixes' into for-next
Conflicts:

	drivers/hid/hid-ids.h
2009-01-04 01:04:09 +01:00
Jiri Kosina 4dfdc46468 HID: fix error condition propagation in hid-sony driver
sony_set_operational() only propagates return value from
usb_control_msg(), which returns negative on error and number
of transferred bytes otherwise.

Reported-by: Marcin Tolysz <tolysz@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:01:43 +01:00
Oliver Neukum b8a832b1c0 HID: fix reference count leak hidraw
The hidraw subsystem has a bug that prevents the close syscall from ever
reaching the low level driver, leading to a resource leak. Fix by replacing
postdecrement with predecrement.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:01:43 +01:00
Matt Helsley 25e61613cf HID: add proper support for pensketch 12x9 tablet
The Genius PenSketch 12x9 tablet has a puck (labeled a
"Tablet Mouse") in addition to a pen. Without registering a quirk
the tablet appears to be a single input device that reports the
wrong axis information in /proc/bus/input/devices, and sends
incorrect events (e.g. ABS_Z instead of ABS_Y). This information
confuses the X evdev driver and makes the device impossible to
use.

The quirk fixes events and splits the device into multiple input
event devices so that at least the puck is useful.

Signed-off-by: Matt Helsley <matt.helsley@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:01:43 +01:00
Alexey Klimov 5f6108cf9b HID: don't allow DealExtreme usb-radio be handled by usb hid driver
This device is already handled by radio-si470x driver, and we therefore
want usbhid to ignore it.  Patch places usb ids of that device in
ignore section of hid-core.c

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:01:43 +01:00
Jiri Kosina 1db489b295 HID: fix default Kconfig setting for TopSpeed driver
Make default setting for TopSpeed driver compliant with the defaults
of the other specialized HID drivers.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:54 +01:00
Lev Babiev f14f526d02 HID: driver for TopSeed Cyberlink quirky remote
I recently picked up a Cyberlink branded remote control produced
by TopSeed Tech Corp. Alas, it appears that this device is using
non-standard mappings for some of it's keys (Usage page 0xffbc).

Signed-off-by: Lev Babiev <harley@hosers.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:53 +01:00
Parag Warudkar ac09952bab HID: make boot protocol drivers depend on EMBEDDED
The usbmouse and usbkbd modules are not supposed to be used with regular USB
mice and keyboards. Make them depend on EMBEDDED to prevent them from being
built and loaded on non-EMBEDDED configs.

Signed-off-by: Parag Warudkar <parag.lkml@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:53 +01:00
Oliver Neukum 079034073f HID: hiddev cleanup -- handle all error conditions properly
This is a cleanup of hiddev and fixes the following issues:

- thread safety by locking in read & ioctl, introducing a per device mutex
- race between ioctl and disconnect, introducing a flag and locking
  in form of a per low level device mutex
- race between open and other methods, making sure only successfully
  opened devices are put on the list, changing order of events
- range checking both upper and lower limits of the minor range
- make sure further calls to open fail for unplugged devices even if
  the device still has opened files
- error checking for low level open
- possible loss of wakeup events, using standard waiting macros
- race in initialisation by moving registration after full initialisation

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:53 +01:00
Lukasz Lubojanski 42859e0bd2 HID: force feedback driver for GreenAsia 0x12 PID
I have implemented Force Feedback driver for another "GreeAsia" based device
(0e8f:0012 "GreenAsia Inc. USB Joystick"). The functionality was tested with
MANTA Warior MM816 and SpeedLink Strike2 SL-6635 and fftest software -
everything seems to work right.

Signed-off-by: Lukasz Lubojanski <lukasz@lubojanski.info>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:53 +01:00
David Brownell d04b431e3d HID: switch specialized drivers from "default y" to !EMBEDDED
Fix the obnoxious "default y" for all the "special" HID code, which forces folk
with EMBEDDED defined to manually override that inappropriate default for
almost 20 choices.  The general policy is against "default y"; it should apply
here too.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:52 +01:00
Jiri Kosina aae6c286da HID: set proper dev.parent in hidraw
We need to properly set parent of the hidraw device (which is the
corresponding physical device itself) in order to hidraw devices not
end up under virtual device tree.

Reported-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:52 +01:00
Jiri Slaby 3a6f82f7a2 HID: add dynids facility
Allow adding new devices to the hid drivers on the fly without
a need of kernel recompilation.

Now, one can test a driver e.g. by:
echo 0003:045E:00F0.0003 > ../generic-usb/unbind
echo 0003 045E 00F0 > new_id
from some driver subdir.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:52 +01:00
Jiri Slaby 898089d08f HID: use GFP_KERNEL in hid_alloc_buffers
We might sleep, so no problem to use GFP_KERNEL.

While at it bring the function to coding style.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:52 +01:00
Jiri Slaby 581a273960 HID: usbhid, use usb_endpoint_xfer_int
Use usb_endpoint_xfer_int() instead of direct use of constants.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:51 +01:00
Jiri Slaby 0ed94b3342 HID: move usbhid flags to usbhid.h
Move usbhid specific flags from global hid.h into local usbhid.h.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:51 +01:00
Rafi Rubin 94011f93f2 HID: add n-trig digitizer support
Added quirks for the N-Trig digitizer.

Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:51 +01:00
Jiri Kosina 9188e79ec3 HID: add phys and name ioctls to hidraw
The hiddev interface provides ioctl() calls which can be used
to obtain phys and raw name of the underlying device.

Add the corresponding support also into hidraw.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:51 +01:00
Kay Sievers 6bbe586fd4 HID: struct device - replace bus_id with dev_name(), dev_set_name()
This patch is part of a larger patch series which will remove
the "char bus_id[20]" name string from struct device. The device
name is managed in the kobject anyway, and without any size
limitation, and just needlessly copied into "struct device".

To set and read the device name dev_name(dev) and dev_set_name(dev)
must be used. If your code uses static kobjects, which it shouldn't
do, "const char *init_name" can be used to statically provide the
name the registered device should have. At registration time, the
init_name field is cleared, to enforce the use of dev_name(dev) to
access the device name at a later time.

We need to get rid of all occurrences of bus_id in the entire tree
to be able to enable the new interface. Please apply this patch,
and possibly convert any remaining remaining occurrences of bus_id.

We want to submit a patch to -next, which will remove bus_id from
"struct device", to find the remaining pieces to convert, and finally
switch over to the new api, which will remove the 20 bytes array
and does no longer have a size limitation.

CC: Jiri Kosina <jkosina@suse.cz>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:51 +01:00
Alan Stern 08ef08ee8c HID: automatically call usbhid_set_leds in usbhid driver
This patch (as1146c) makes usbhid automatically call usbhid_set_leds()
for any device that supports the keyboard boot protocol.

In theory this should be perfectly safe.  BIOSes send the LED output
report as part of their normal device initialization, so any keyboard
device supporting the boot protocol has to be able to handle it.

As a side effect, the hid-dell and hid-bright drivers are no longer
needed, and the Logitech keyboard driver can be removed from hid-lg.

CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:50 +01:00
Jiri Kosina efc7ce18d9 HID: non-input reports can also be numbered
When computing the maximal buffer size needed, we must take into
account that not only input reports can be numbered.

Pointed out in bugzilla #10467

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:50 +01:00
Jiri Kosina ac26fca3e1 HID: ignore mouse interface for unibody macbooks
The mouse interface on unibody macbooks is going to be handled by
bcm59743 driver in 2.6.29.

Reported-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-04 01:00:50 +01:00
Linus Torvalds 7d3b56ba37 Merge branch 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (77 commits)
  x86: setup_per_cpu_areas() cleanup
  cpumask: fix compile error when CONFIG_NR_CPUS is not defined
  cpumask: use alloc_cpumask_var_node where appropriate
  cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t
  x86: use cpumask_var_t in acpi/boot.c
  x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids
  sched: put back some stack hog changes that were undone in kernel/sched.c
  x86: enable cpus display of kernel_max and offlined cpus
  ia64: cpumask fix for is_affinity_mask_valid()
  cpumask: convert RCU implementations, fix
  xtensa: define __fls
  mn10300: define __fls
  m32r: define __fls
  h8300: define __fls
  frv: define __fls
  cris: define __fls
  cpumask: CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
  cpumask: zero extra bits in alloc_cpumask_var_node
  cpumask: replace for_each_cpu_mask_nr with for_each_cpu in kernel/time/
  cpumask: convert mm/
  ...
2009-01-03 12:04:39 -08:00
Linus Torvalds 269b012321 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu: (89 commits)
  AMD IOMMU: remove now unnecessary #ifdefs
  AMD IOMMU: prealloc_protection_domains should be static
  kvm/iommu: fix compile warning
  AMD IOMMU: add statistics about total number of map requests
  AMD IOMMU: add statistics about allocated io memory
  AMD IOMMU: add stats counter for domain tlb flushes
  AMD IOMMU: add stats counter for single iommu domain tlb flushes
  AMD IOMMU: add stats counter for cross-page request
  AMD IOMMU: add stats counter for free_coherent requests
  AMD IOMMU: add stats counter for alloc_coherent requests
  AMD IOMMU: add stats counter for unmap_sg requests
  AMD IOMMU: add stats counter for map_sg requests
  AMD IOMMU: add stats counter for unmap_single requests
  AMD IOMMU: add stats counter for map_single requests
  AMD IOMMU: add stats counter for completion wait events
  AMD IOMMU: add init code for statistic collection
  AMD IOMMU: add necessary header defines for stats counting
  AMD IOMMU: add Kconfig entry for statistic collection code
  AMD IOMMU: use dev_name in iommu_enable function
  AMD IOMMU: use calc_devid in prealloc_protection_domains
  ...
2009-01-03 12:03:52 -08:00
Linus Torvalds f60a0a7984 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (34 commits)
  V4L/DVB (10173): Missing v4l2_prio_close in radio_release
  V4L/DVB (10172): add DVB_DEVICE_TYPE= to uevent
  V4L/DVB (10171): Use usb_set_intfdata
  V4L/DVB (10170): tuner-simple: prevent possible OOPS caused by divide by zero error
  V4L/DVB (10168): sms1xxx: fix inverted gpio for lna control on tiger r2
  V4L/DVB (10167): sms1xxx: add support for inverted gpio
  V4L/DVB (10166): dvb frontend: stop using non-C99 compliant comments
  V4L/DVB (10165): Add FE_CAN_2G_MODULATION flag to frontends that support DVB-S2
  V4L/DVB (10164): Add missing S2 caps flag to S2API
  V4L/DVB (10163): em28xx: allocate adev together with struct em28xx dev
  V4L/DVB (10162): tuner-simple: Fix tuner type set message
  V4L/DVB (10161): saa7134: fix autodetection for AVer TV GO 007 FM Plus
  V4L/DVB (10160): em28xx: update chip id for em2710
  V4L/DVB (10157): Add USB ID for the Sil4701 radio from DealExtreme
  V4L/DVB (10156): saa7134: Add support for Avermedia AVer TV GO 007 FM Plus
  V4L/DVB (10155): Add TEA5764 radio driver
  V4L/DVB (10154): saa7134: fix a merge conflict on Behold H6 board
  V4L/DVB (10153): Add the Beholder H6 card to DVB-T part of sources.
  V4L/DVB (10152): Change configuration of the Beholder H6 card
  V4L/DVB (10151): Fix I2C bridge error in zl10353
  ...
2009-01-03 12:02:18 -08:00
Yinghai Lu 2f98357001 sparseirq: move set/get_timer_rand_state back to .c
those two functions only used in that C file

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-03 12:01:23 -08:00
Linus Torvalds e9e67a8b57 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  mmc: warn about voltage mismatches
  mmc_spi: Add support for OpenFirmware bindings
  pxamci: fix dma_unmap_sg length
  mmc_block: ensure all sectors that do not have errors are read
  drivers/mmc: Move a dereference below a NULL test
  sdhci: handle built-in sdhci with modular leds class
  mmc: balanc pci_iomap with pci_iounmap
  mmc_block: print better error messages
  mmc: Add mmc_vddrange_to_ocrmask() helper function
  ricoh_mmc: Handle newer models of Ricoh controllers
  mmc: Add 8-bit bus width support
  sdhci: activate led support also when module
  mmc: trivial annotation of 'blocks'
  pci: use pci_ioremap_bar() in drivers/mmc
  sdricoh_cs: Add support for Bay Controller devices
  mmc: at91_mci: reorder timer setup and mmc_add_host() call
2009-01-03 12:00:07 -08:00
Linus Torvalds ad6b646fe5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] Add support for the WM8350 watchdog
  [WATCHDOG] Add SMSC SCH311x Watchdog Timer.
  [WATCHDOG] ib700wdt - add timeout parameter
2009-01-03 11:59:13 -08:00
Linus Torvalds 61420f59a5 Merge branch 'cputime' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'cputime' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [PATCH] fast vdso implementation for CLOCK_THREAD_CPUTIME_ID
  [PATCH] improve idle cputime accounting
  [PATCH] improve precision of idle time detection.
  [PATCH] improve precision of process accounting.
  [PATCH] idle cputime accounting
  [PATCH] fix scaled & unscaled cputime accounting
2009-01-03 11:56:24 -08:00
Mike Travis 8fd2d2d5aa cpumask: fix compile error when CONFIG_NR_CPUS is not defined
CONFIG_NR_CPUS will be defined for all arch's whether SMP or not, but
it may not have made it into all arches yet.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-03 19:15:41 +01:00
Rusty Russell 2fdf66b491 cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t
Impact: Reduce memory usage, use new API.

This is part of an effort to reduce structure sizes for machines
configured with large NR_CPUS.  cpumask_t gets replaced by
cpumask_var_t, which is either struct cpumask[1] (small NR_CPUS) or
struct cpumask * (large NR_CPUS).

(Changes to powernow-k* by <travis>.)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-03 19:15:40 +01:00
Mike Travis 7eb1955336 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask into merge-rr-cpumask
Conflicts:
	arch/x86/kernel/io_apic.c
	kernel/rcuclassic.c
	kernel/sched.c
	kernel/time/tick-sched.c

Signed-off-by: Mike Travis <travis@sgi.com>
[ mingo@elte.hu: backmerged typo fix for io_apic.c ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-03 18:53:31 +01:00
Mike Day cdc7b83726 intel-iommu: fix bit shift at DOMAIN_FLAG_P2P_MULTIPLE_DEVICES
Signed-off-by: Mike Day <ncmike@ncultra.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:08 +01:00
Joerg Roedel e4754c96cf VT-d: remove now unused intel_iommu_found function
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:08 +01:00
Joerg Roedel a8bcbb0de4 VT-d: register functions for the IOMMU API
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:08 +01:00
Joerg Roedel d14d65777c VT-d: adapt domain iova_to_phys function for IOMMU API
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:08 +01:00
Joerg Roedel dde57a210d VT-d: adapt domain map and unmap functions for IOMMU API
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:08 +01:00
Joerg Roedel 4c5478c94e VT-d: adapt device attach and detach functions for IOMMU API
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:08 +01:00
Joerg Roedel 5d450806eb VT-d: adapt domain init and destroy functions for IOMMU API
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:07 +01:00
Joerg Roedel 1aaf118352 select IOMMU_API when DMAR and/or AMD_IOMMU is selected
These two IOMMUs can implement the current version of this API. So
select the API if one or both of these IOMMU drivers is selected.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:10:09 +01:00
Joerg Roedel fc2100eb4d add frontend implementation for the IOMMU API
This API can be used by KVM for accessing different types of IOMMUs to
do device passthrough to guests. Beside that this API can also be used
by device drivers to map non-linear host memory into dma-linear
addresses to prevent sgather-gather DMA. UIO may be another user for
this API.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-03 14:10:09 +01:00
Weidong Han fe40f1e020 Check agaw is sufficient for mapped memory
When domain is related to multiple iommus, need to check if the minimum agaw is sufficient for the mapped memory

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:02:19 +01:00