GitHub/mt8127/android_kernel_alcatel_ttab.git
17 years agom68k iomem (based on Geert's tree + memcpy_... stuff)
Al Viro [Fri, 20 Jul 2007 03:32:58 +0000 (04:32 +0100)]
m68k iomem (based on Geert's tree + memcpy_... stuff)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68k: teach modpost about .m68_fixup
Al Viro [Fri, 20 Jul 2007 03:32:48 +0000 (04:32 +0100)]
m68k: teach modpost about .m68_fixup

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomore isa/eisa/pci-only drivers marked as such
Al Viro [Thu, 19 Jul 2007 23:24:22 +0000 (00:24 +0100)]
more isa/eisa/pci-only drivers marked as such

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'kmem_death' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Fri, 20 Jul 2007 01:38:13 +0000 (18:38 -0700)]
Merge branch 'kmem_death' of /linux/kernel/git/lethal/sh-2.6

* 'kmem_death' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6:
  mm: Remove slab destructors from kmem_cache_create().

17 years agofallout from kbuild changes
Al Viro [Fri, 20 Jul 2007 01:01:16 +0000 (02:01 +0100)]
fallout from kbuild changes

Change in 'kbuild: do section mismatch check on full vmlinux'
should've been replicated in arch/um/Makefile.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomm: Remove slab destructors from kmem_cache_create().
Paul Mundt [Fri, 20 Jul 2007 01:11:58 +0000 (10:11 +0900)]
mm: Remove slab destructors from kmem_cache_create().

Slab destructors were no longer supported after Christoph's
c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been
BUGs for both slab and slub, and slob never supported them
either.

This rips out support for the dtor pointer from kmem_cache_create()
completely and fixes up every single callsite in the kernel (there were
about 224, not including the slab allocator definitions themselves,
or the documentation references).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Thu, 19 Jul 2007 23:31:22 +0000 (16:31 -0700)]
Merge /pub/scm/linux/kernel/git/bart/ide-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: (23 commits)
  ide: add support for SCSI ioctls to ide-floppy
  ide: remove stale changelog from setup-pci.c
  ide: remove stale changelog/comments/TODO from ide.c
  ide-cris: handle PIO auto-tuning in tune_cris_ide()
  ide: add PIO masks
  ide: remove ide_find_best_pio_mode()
  ide: drop "PIO data" argument from ide_get_best_pio_mode()
  ide: ide_find_best_pio_mode() fixes (take 2)
  ide: add ide_pio_cycle_time() helper (take 2)
  sc1200: remove stale Power Management code
  ide: ide_start_power_step() fix WRT disabling DMA
  serverworks: fix DMA
  serverworks: always tune PIO
  ide: add ide_pci_device_t.host_flags (take 2)
  ide: add ide_dev_has_iordy() helper (take 4)
  ide: make ide_get_best_pio_mode() print info if overriding PIO mode
  siimage: PIO mode setup fixes (take 2)
  atiixp: PIO mode setup fixes
  ide: Stop mapping ROMs
  IDE: Remove references to dead ETRAX-related variables.
  ...

17 years agocoda breakage
Al Viro [Thu, 19 Jul 2007 23:23:31 +0000 (00:23 +0100)]
coda breakage

a) switch by loff_t == __cmpdi2 use.  Replaced with a couple
of obvious ifs; update of ->f_pos in the first one makes sure that we
do the right thing in all cases.
b) block_signals() and unblock_signals() are globals on UML.
Renamed coda ones; in principle UML probably ought to do rename as
well, but that's another story.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomissed cong_avoid() instance
Al Viro [Thu, 19 Jul 2007 23:17:45 +0000 (00:17 +0100)]
missed cong_avoid() instance

Removal of rtt argument in ->cong_avoid() had missed tcp_htcp.c
instance.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoide: add support for SCSI ioctls to ide-floppy
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:59 +0000 (01:11 +0200)]
ide: add support for SCSI ioctls to ide-floppy

Now that ide-floppy supports SG_IO we can add support for SCSI ioctls
(except deprecated SCSI_IOCTL_SEND_COMMAND and legacy CDROM_SEND_PACKET
ones - we can add them later iff really needed).

While at it remove handling of CDROMEJECT and CDROMCLOSETRAY ioctls from
generic_ide_ioctl():

- This prevents ide-{disk,tape,scsi} device drivers from obtaining
  REQ_TYPE_BLOCK_PC type requests which are currently unsupported by
  these drivers and which are potentially harmful (as reported by Andrew).

- There is no functionality loss since aforementioned ioctls will now be
  handled by idefloppy_ioctl()->scsi_cmd_ioctl() (for devices using
  ide-floppy driver) and by idecd_ioctl->cdrom_ioctl()->scsi_cmd_ioctl()
  (for devices using ide-cd driver).

Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: remove stale changelog from setup-pci.c
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:59 +0000 (01:11 +0200)]
ide: remove stale changelog from setup-pci.c

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: remove stale changelog/comments/TODO from ide.c
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:59 +0000 (01:11 +0200)]
ide: remove stale changelog/comments/TODO from ide.c

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide-cris: handle PIO auto-tuning in tune_cris_ide()
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:59 +0000 (01:11 +0200)]
ide-cris: handle PIO auto-tuning in tune_cris_ide()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add PIO masks
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:59 +0000 (01:11 +0200)]
ide: add PIO masks

* Add ATA_PIO[0-6] defines to <linux/ata.h>.

* Add ->pio_mask field to ide_pci_device_t and ide_hwif_t.

* Add PIO masks to host drivers.

<linux/ata.h> change ACK-ed by Jeff Garzik <jeff@garzik.org>.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: remove ide_find_best_pio_mode()
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:58 +0000 (01:11 +0200)]
ide: remove ide_find_best_pio_mode()

* Add ->host_flags to ide_hwif_t to store ide_pci_device_t.host_flags,
  assign it in setup-pci.c:ide_pci_setup_ports().

* Add IDE_HFLAG_PIO_NO_{BLACKLIST,DOWNGRADE} to ide_pci_device_t.host_flags
  and teach ide_get_best_pio_mode() about them.  Also remove needless
  !drive->id check while at it (drive->id is always present).

* Convert amd74xx, via82cxxx and ide-timing.h to use ide_get_best_pio_mode()
  and then remove no longer needed ide_find_best_pio_mode().

There should be no functionality changes caused by this patch.

Acked-by: Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: drop "PIO data" argument from ide_get_best_pio_mode()
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:58 +0000 (01:11 +0200)]
ide: drop "PIO data" argument from ide_get_best_pio_mode()

* Drop no longer needed "PIO data" argument from ide_get_best_pio_mode()
  and convert all users accordingly.

* Remove no longer needed ide_pio_data_t.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: ide_find_best_pio_mode() fixes (take 2)
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:57 +0000 (01:11 +0200)]
ide: ide_find_best_pio_mode() fixes (take 2)

* Check IORDY bit for PIO modes > 2.

* Some devices claim maximum PIO mode > 2 in id->tPIO, they were punished too
  severly for this by being limited to PIO_SLOW.  Limit them to PIO2 instead.

v2:
* Fix PIO number being returned incorrectly instead of PIO mode
  (Noticed by Sergei).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add ide_pio_cycle_time() helper (take 2)
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:56 +0000 (01:11 +0200)]
ide: add ide_pio_cycle_time() helper (take 2)

* Add ide_pio_cycle_time() helper.

* Use it in ali14xx/ht6560b/qd65xx/cmd64{0,x}/sl82c105 and pmac host drivers
  (previously cycle time given by the device was only used for "pio" == 255).

* Remove no longer needed ide_pio_data_t.cycle_time field.

v2:
* Fix "ata_" prefix (Noticed by Jeff).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agosc1200: remove stale Power Management code
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:56 +0000 (01:11 +0200)]
sc1200: remove stale Power Management code

* Nowadays core IDE code handles restoring of PIO and DMA modes
  (ide-io.c:ide_start_power_step() etc) so remove open-coded version
  from sc1200_resume().

  There should be no change in behavior because settings done by
  sc1200_resume() were always overridden by generic_ide_resume()
  and ide_{start,stop}_power_step().

* Bump driver version.

Cc: Mark Lord <mlord@pobox.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: ide_start_power_step() fix WRT disabling DMA
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:56 +0000 (01:11 +0200)]
ide: ide_start_power_step() fix WRT disabling DMA

* Do the same thing as probe_hwif() and always disable DMA so chipset DMA
  enabled bit gets cleared (if the drive doesn't support DMA ide_set_dma()
  won't try to tune it anyway).

* Add TODO comment about respecting ->using_dma setting.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoserverworks: fix DMA
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:56 +0000 (01:11 +0200)]
serverworks: fix DMA

The driver used to depend on BIOS settings for deciding whether it is OK
to use DMA.  However it seems that BIOS doesn't always handle all cases
correctly so just let IDE core to decide about this.  It should be a safe
thing to do now, after the driver went through heavy bugfixing.

Thanks for bugreport and testing the patch goes out to Sven Niedner.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoserverworks: always tune PIO
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:56 +0000 (01:11 +0200)]
serverworks: always tune PIO

* Always set ->autotune so PIO gets correctly auto-tuned (previously
  ->autotune was only set when ->dma_base wasn't available, however
  ->ide_dma_check()/->speedproc() was always trying to tune PIO when
  tuning DMA).

* Move code responsible for programming chipset for PIO mode from
  svwks_tune_chipset() to svwks_tune_pio().  Don't tune PIO when tuning
  DMA (this is no longer needed since ->autotune is always set now).

* Handle PIO modes early in svwks_tune_chipset() so DMA configuration
  registers don't get cleared when programming PIO mode.

* Bump driver version.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add ide_pci_device_t.host_flags (take 2)
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:55 +0000 (01:11 +0200)]
ide: add ide_pci_device_t.host_flags (take 2)

* Rename ide_pci_device_t.flags to ide_pci_device_t.host_flags
  and IDEPCI_FLAG_ISA_PORTS flag to IDE_HFLAG_ISA_PORTS.

* Add IDE_HFLAG_SINGLE flag for single channel devices.

* Convert core code and all IDE PCI drivers to use IDE_HFLAG_SINGLE
  and remove no longer needed ide_pci_device_t.channels field.

v2:
* Fix issues noticed by Sergei:
  - correct code alignment in scc_pata.c
  - s/IDE_HFLAG_SINGLE/~IDE_HFLAG_SINGLE/ in serverworks.c

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add ide_dev_has_iordy() helper (take 4)
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:55 +0000 (01:11 +0200)]
ide: add ide_dev_has_iordy() helper (take 4)

* Add ide_dev_has_iordy() helper and use it sl82c105 host driver.

* Remove no longer needed ide_pio_data_t.use_iordy field.

v2/v3:
* Fix issues noticed by Sergei:
  - correct patch description
  - fix comment in ide_get_best_pio_mode()

v4:
* Fix "ata_" prefix (Noticed by Jeff).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: make ide_get_best_pio_mode() print info if overriding PIO mode
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:55 +0000 (01:11 +0200)]
ide: make ide_get_best_pio_mode() print info if overriding PIO mode

* Print info about overriding PIO mode in ide_get_best_pio_mode().

* Remove info about overriding PIO mode from cmd64{0,x} host drivers.

* Remove no longer needed ide_pio_data_t.overridden field.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agosiimage: PIO mode setup fixes (take 2)
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:54 +0000 (01:11 +0200)]
siimage: PIO mode setup fixes (take 2)

* Add sil_tuneproc() wrapper for siimage_tuneproc() which also sets
  PIO mode on the device.

* Add missing ide_get_best_pio_mode() call to sil_tuneproc() so
  "pio" == 255 (autotune) is handled correctly (previously PIO0 was used)
  and "pio" values > 4 && < 255 are filtered to PIO4 (instead of PIO0).

* Add code limiting maximum PIO mode according to the pair device capabilities
  to sil_tuneproc().

* Convert users of config_siimage_chipset_for_pio() to use sil_tune_pio() and
  sil_tuneproc().  This fixes PIO fallback in siimage_config_drive_for_dma() to
  use max PIO mode available instead of PIO4 (config_siimage_chipset_for_pio()
  used wrong arguments for ide_get_best_pio_mode() and as a results always
  tried to set PIO4).

* Remove no longer needed siimage_taskfile_timing()
  and config_siimage_chipset_for_pio().

* Enable ->autotune unconditionally and remove PIO tuning for UDMA/MDMA modes
  from siimage_speedproc()

* Bump driver version.

v2:
* Fix issues noticed by Sergei:
  - correct pair device check
  - trim only taskfile PIO to the slowest of the master/slave
  - enable ->autotune unconditionally and remove PIO tuning for UDMA/MDMA modes
    from siimage_speedproc()
  - add TODO item for IORDY bugs
  - minor cleanups

Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoatiixp: PIO mode setup fixes
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:54 +0000 (01:11 +0200)]
atiixp: PIO mode setup fixes

* Split off exisiting atiixp_tuneproc() into atiixp_tune_pio()
  and then add setting device PIO mode to atiixp_tuneproc().

* Add missing ide_get_best_pio_mode() call to atiixp_tuneproc() so
  "pio" == 255 (autotune) is handled correctly and "pio" values > 4 && < 255
  are filtered to PIO4 (previously "pio" == 5 could result in wrong timings
  being used and "pio" values > 4 && < 255 in an OOPS).

* Handle PIO modes early in atiixp_speedproc() so save_mdma_mode[]
  doesn't get cleared.

* In atiixp_dma_check():
  - fix max_mode argument for ide_get_best_pio_mode()
  - don't call atiixp_dma_2_pio() so PIO1 doesn't get remapped to PIO0
  - use atiixp_tuneproc() instead of atiixp_speedproc()

* Bump driver version.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: Stop mapping ROMs
Alan Cox [Thu, 19 Jul 2007 23:11:54 +0000 (01:11 +0200)]
ide: Stop mapping ROMs

Various old IDE drivers go mapping ROM devices for no apparent reason and
without using the ROM mapping API we now have. They don't actually use
the ROM they map and the new libata drivers are happy without it being
mapped so rather than port them lets just junk it for the next -rc1.

Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoIDE: Remove references to dead ETRAX-related variables.
Robert P. J. Day [Thu, 19 Jul 2007 23:11:54 +0000 (01:11 +0200)]
IDE: Remove references to dead ETRAX-related variables.

The two CONFIG variables

        CONFIG_ETRAX_IDE_CSE1_16_RESET
        CONFIG_ETRAX_IDE_CSP0_8_RESET

appear to have been dead since way back in 2.5.xx days:

http://www.linuxhq.com/kernel/v2.5/75/arch/cris/drivers/Kconfig

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Cc: Michael Starvik <starvik@axis.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoPCMCIA: Add another MemoryCard to ide-cs/pata_pcmcia
Marcin Juszkiewicz [Thu, 19 Jul 2007 23:11:53 +0000 (01:11 +0200)]
PCMCIA: Add another MemoryCard to ide-cs/pata_pcmcia

One card submitted by user.

Signed-off-by: Marcin Juszkiewicz <openembedded@hrw.one.pl>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoscc_pata.c: Workaround for errata A308 (take 2)
Kou Ishizaki [Thu, 19 Jul 2007 23:11:53 +0000 (01:11 +0200)]
scc_pata.c: Workaround for errata A308 (take 2)

Workaround for errata A308: turn down the UDMA mode and retry
the DMA command when the data lost condition is detected.

take2:
udma_filter() hook is used to limit ATAPI UDMA mode.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoscc_pata: Use inline function for eieio
Kumar Gala [Thu, 19 Jul 2007 23:11:53 +0000 (01:11 +0200)]
scc_pata: Use inline function for eieio

Move to using inline function variant of eieio instead of inline assmebly.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Cc: kou.ishizaki@toshiba.co.jp
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Thu, 19 Jul 2007 21:42:40 +0000 (14:42 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/selinux-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
  SELinux: use SECINITSID_NETMSG instead of SECINITSID_UNLABELED for NetLabel
  SELinux: enable dynamic activation/deactivation of NetLabel/SELinux enforcement

17 years agoMerge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
Linus Torvalds [Thu, 19 Jul 2007 21:41:33 +0000 (14:41 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6

* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
  [XFS] Fix inode size update before data write in xfs_setattr
  [XFS] Allow punching holes to free space when at ENOSPC
  [XFS] Implement ->page_mkwrite in XFS.
  [FS] Implement block_page_mkwrite.

Manually fix up conflict with Nick's VM fault handling patches in
fs/xfs/linux-2.6/xfs_file.c

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoi386: Allow KVM on i386 nonpae
Avi Kivity [Thu, 19 Jul 2007 11:30:14 +0000 (14:30 +0300)]
i386: Allow KVM on i386 nonpae

Currently, CONFIG_X86_CMPXCHG64 both enables boot-time checking of
the cmpxchg64b feature and enables compilation of the set_64bit() family.
Since the option is dependent on PAE, and since KVM depends on set_64bit(),
this effectively disables KVM on i386 nopae.

Simplify by removing the config option altogether: the boot check is made
dependent on CONFIG_X86_PAE directly, and the set_64bit() family is exposed
without constraints.  It is up to users to check for the feature flag (KVM
does not as virtualiation extensions imply its existence).

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge git://git.linux-nfs.org/pub/linux/nfs-2.6
Linus Torvalds [Thu, 19 Jul 2007 21:33:41 +0000 (14:33 -0700)]
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6

* git://git.linux-nfs.org/pub/linux/nfs-2.6:
  NFSv4: handle lack of clientaddr in option string
  NFSv4: debug print ntohl(status) in nfs client callback xdr code
  SUNRPC: Clean up the sillyrename code
  NFS: Introduce struct nfs_removeargs+nfs_removeres
  NFS: Use dentry->d_time to store the parent directory verifier.
  SUNRPC: move bkl locking and xdr proc invocation into a common helper
  NFSv4: Fix the nfsv4 readlink reply buffer alignment
  NFSv4: Fix the readdir reply buffer alignment
  NFSv4: More NFSv4 xdr cleanups
  NFSv4: Try to recover from getfh failures in nfs4_xdr_dec_open
  NFSv4: 'constify' lookup arguments.
  NFSv4: Don't fail nfs4_xdr_dec_open if decode_restorefh() failed
  NFSv4: Fix open state recovery
  NFSD/SUNRPC: Fix the automatic selection of RPCSEC_GSS

17 years agoUpdate .gitignore for arch/i386/boot
Matthew Wilcox [Thu, 19 Jul 2007 19:09:10 +0000 (13:09 -0600)]
Update .gitignore for arch/i386/boot

With the new setup code, we generate a couple more files

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
[ .. and do the same for x86-64 - Alexey ]
Acked-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix spufs build after ->fault changes
Christoph Hellwig [Thu, 19 Jul 2007 19:05:58 +0000 (12:05 -0700)]
fix spufs build after ->fault changes

83c54070ee1a2d05c89793884bea1a03f2851ed4 broke spufs by incorrectly
updating the code, this patch gets it to compile again.

It's probably still broken due to the scheduler changes, but this
at least makes sure cell kernels can still be built.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Linus Torvalds [Thu, 19 Jul 2007 21:28:19 +0000 (14:28 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (33 commits)
  xtensa: use DATA_DATA in xtensa
  powerpc: add missing DATA_DATA to powerpc
  cris: use DATA_DATA in cris
  kallsyms: remove usage of memmem and _GNU_SOURCE from scripts/kallsyms.c
  kbuild: use -fno-optimize-sibling-calls unconditionally
  kconfig: reset generated values only if Kconfig and .config agree.
  kbuild: fix the warning when running make tags
  kconfig: strip 'CONFIG_' automatically in kernel configuration search
  kbuild: use POSIX BRE in headers install target
  Whitelist references from __dbe_table to .init
  modpost white list pattern adjustment
  kbuild: do section mismatch check on full vmlinux
  kbuild: whitelist references from variables named _timer to .init.text
  kbuild: remove hardcoded _logo names from modpost
  kbuild: remove hardcoded apic_es7000 from modpost
  kbuild: warn about references from .init.text to .exit.text
  kbuild: consolidate section checks
  kbuild: refactor code in modpost to improve maintainability
  kbuild: ignore section mismatch warnings originating from .note section
  kbuild: .paravirtprobe section is obsolete, so modpost doesn't need to handle it
  ...

17 years agoMerge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
Linus Torvalds [Thu, 19 Jul 2007 21:24:57 +0000 (14:24 -0700)]
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6

* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6: (44 commits)
  i2c: Delete the i2c-isa pseudo bus driver
  hwmon: refuse to load abituguru driver on non-Abit boards
  hwmon: fix Abit Uguru3 driver detection on some motherboards
  hwmon/w83627ehf: Be quiet when no chip is found
  hwmon/w83627ehf: No need to initialize fan_min
  hwmon/w83627ehf: Export the thermal sensor types
  hwmon/w83627ehf: Enable VBAT monitoring
  hwmon/w83627ehf: Add support for the VID inputs
  hwmon/w83627ehf: Fix timing issues
  hwmon/w83627ehf: Add error messages for two error cases
  hwmon/w83627ehf: Convert to a platform driver
  hwmon/w83627ehf: Update the Kconfig entry
  make coretemp_device_remove() static
  hwmon: Add LM93 support
  hwmon: Improve the pwmN_enable documentation
  hwmon/smsc47b397: Don't report missing fans as spinning at 82 RPM
  hwmon: Add support for newer uGuru's
  hwmon/f71805f: Add temperature-tracking fan control mode
  hwmon/w83627ehf: Preserve speed reading when changing fan min
  hwmon: fix detection of abituguru volt inputs
  ...

Manual fixup of trivial conflict in MAINTAINERS file

17 years agorandom: fix bound check ordering (CVE-2007-3105)
Matt Mackall [Thu, 19 Jul 2007 18:30:14 +0000 (11:30 -0700)]
random: fix bound check ordering (CVE-2007-3105)

If root raised the default wakeup threshold over the size of the
output pool, the pool transfer function could overflow the stack with
RNG bytes, causing a DoS or potential privilege escalation.

(Bug reported by the PaX Team <pageexec@freemail.hu>)

Cc: Theodore Tso <tytso@mit.edu>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Thu, 19 Jul 2007 21:16:44 +0000 (14:16 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: ->fallocate() support

17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Thu, 19 Jul 2007 21:11:14 +0000 (14:11 -0700)]
Merge git://git./linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  [PATCH] sched: implement cpu_clock(cpu) high-speed time source
  [PATCH] sched: fix the all pinned logic in load_balance_newidle()
  [PATCH] sched: fix newly idle load balance in case of SMT
  [PATCH] sched: sched_cacheflush is now unused

17 years agouser namespace: fix copy_user_ns return value
Serge E. Hallyn [Tue, 17 Jul 2007 19:28:17 +0000 (15:28 -0400)]
user namespace: fix copy_user_ns return value

When a CONFIG_USER_NS=n and a user tries to unshare some namespace other
than the user namespace, the dummy copy_user_ns returns NULL rather than
the old_ns.

This value then gets assigned to task->nsproxy->user_ns, so that a
subsequent setuid, which uses task->nsproxy->user_ns, causes a NULL
pointer deref.

Fix this by returning old_ns.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoslub: fix ksize() for zero-sized pointers
Linus Torvalds [Thu, 19 Jul 2007 20:21:34 +0000 (13:21 -0700)]
slub: fix ksize() for zero-sized pointers

The slab and slob allocators already did this right, but slub would call
"get_object_page()" on the magic ZERO_SIZE_PTR, with all kinds of nasty
end results.

Noted by Ingo Molnar.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix up non-NUMA SLAB configuration for zero-sized allocations
Linus Torvalds [Thu, 19 Jul 2007 20:17:15 +0000 (13:17 -0700)]
Fix up non-NUMA SLAB configuration for zero-sized allocations

I suspect Christoph tested his code only in the NUMA configuration, for
the combination of SLAB+non-NUMA the zero-sized kmalloc's would not work.

Of course, this would only trigger in configurations where those zero-
sized allocations happen (not very common), so that may explain why it
wasn't more widely noticed.

Seen by by Andi Kleen under qemu, and there seems to be a report by
Michael Tsirkin on it too.

Cc: Andi Kleen <ak@suse.de>
Cc: Roland Dreier <rdreier@cisco.com>
Cc: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] sched: implement cpu_clock(cpu) high-speed time source
Ingo Molnar [Thu, 19 Jul 2007 19:28:35 +0000 (21:28 +0200)]
[PATCH] sched: implement cpu_clock(cpu) high-speed time source

Implement the cpu_clock(cpu) interface for kernel-internal use:
high-speed (but slightly incorrect) per-cpu clock constructed from
sched_clock().

This API, unused at the moment, will be used in the future by blktrace,
by the softlockup-watchdog, by printk and by lockstat.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[PATCH] sched: fix the all pinned logic in load_balance_newidle()
Suresh Siddha [Thu, 19 Jul 2007 19:28:35 +0000 (21:28 +0200)]
[PATCH] sched: fix the all pinned logic in load_balance_newidle()

nr_moved is not the correct check for triggering all pinned logic. Fix
the all pinned logic in the case of load_balance_newidle().

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[PATCH] sched: fix newly idle load balance in case of SMT
Suresh Siddha [Thu, 19 Jul 2007 19:28:35 +0000 (21:28 +0200)]
[PATCH] sched: fix newly idle load balance in case of SMT

In the presence of SMT, newly idle balance was never happening for
multi-core and SMP domains (even when both the logical siblings are
idle).

If thread 0 is already idle and when thread 1 is about to go to idle,
newly idle load balance always think that one of the threads is not idle
and skips doing the newly idle load balance for multi-core and SMP
domains.

This is because of the idle_cpu() macro, which checks if the current
process on a cpu is an idle process. But this is not the case for the
thread doing the load_balance_newidle().

Fix this by using runqueue's nr_running field instead of idle_cpu(). And
also skip the logic of 'only one idle cpu in the group will be doing
load balancing' during newly idle case.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[PATCH] sched: sched_cacheflush is now unused
Ralf Baechle [Thu, 19 Jul 2007 19:28:35 +0000 (21:28 +0200)]
[PATCH] sched: sched_cacheflush is now unused

Since Ingo's recent scheduler rewrite which was merged as commit
0437e109e1841607f2988891eaa36c531c6aa6ac sched_cacheflush is unused.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoNFSv4: handle lack of clientaddr in option string
Jeff Layton [Wed, 18 Jul 2007 15:28:43 +0000 (11:28 -0400)]
NFSv4: handle lack of clientaddr in option string

If a NFSv4 mount is attempted  with string based options, and the
option string doesn't contain a clientaddr= option, the kernel will
currently oops. Check for this situation and return a proper error.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: debug print ntohl(status) in nfs client callback xdr code
Benny Halevy [Sun, 15 Jul 2007 17:14:32 +0000 (20:14 +0300)]
NFSv4: debug print ntohl(status) in nfs client callback xdr code

status in nfs client callback xdr code is passed in network order.
print it in host order for better readability.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoSUNRPC: Clean up the sillyrename code
Trond Myklebust [Sat, 14 Jul 2007 19:39:58 +0000 (15:39 -0400)]
SUNRPC: Clean up the sillyrename code

Fix a couple of bugs:
 - Don't rely on the parent dentry still being valid when the call completes.
   Fixes a race with shrink_dcache_for_umount_subtree()

 - Don't remove the file if the filehandle has been labelled as stale.

Fix a couple of inefficiencies
 - Remove the global list of sillyrenamed files. Instead we can cache the
   sillyrename information in the dentry->d_fsdata
 - Move common code from unlink_setup/unlink_done into fs/nfs/unlink.c

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFS: Introduce struct nfs_removeargs+nfs_removeres
Trond Myklebust [Sat, 14 Jul 2007 19:39:57 +0000 (15:39 -0400)]
NFS: Introduce struct nfs_removeargs+nfs_removeres

We need a common structure for setting up an unlink() rpc call in order to
fix the asynchronous unlink code.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFS: Use dentry->d_time to store the parent directory verifier.
Trond Myklebust [Sat, 14 Jul 2007 21:36:45 +0000 (17:36 -0400)]
NFS: Use dentry->d_time to store the parent directory verifier.

This will free up the d_fsdata field for other use.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoSUNRPC: move bkl locking and xdr proc invocation into a common helper
J. Bruce Fields [Wed, 11 Jul 2007 22:39:02 +0000 (18:39 -0400)]
SUNRPC: move bkl locking and xdr proc invocation into a common helper

Since every invocation of xdr encode or decode functions takes the BKL now,
there's a lot of redundant lock_kernel/unlock_kernel pairs that we can pull
out into a common function.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: Fix the nfsv4 readlink reply buffer alignment
Trond Myklebust [Thu, 19 Jul 2007 14:03:38 +0000 (10:03 -0400)]
NFSv4: Fix the nfsv4 readlink reply buffer alignment

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: Fix the readdir reply buffer alignment
Trond Myklebust [Thu, 19 Jul 2007 14:03:37 +0000 (10:03 -0400)]
NFSv4: Fix the readdir reply buffer alignment

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: More NFSv4 xdr cleanups
Trond Myklebust [Wed, 18 Jul 2007 01:52:42 +0000 (21:52 -0400)]
NFSv4: More NFSv4 xdr cleanups

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: Try to recover from getfh failures in nfs4_xdr_dec_open
Trond Myklebust [Wed, 18 Jul 2007 01:52:41 +0000 (21:52 -0400)]
NFSv4: Try to recover from getfh failures in nfs4_xdr_dec_open

Try harder to recover the open state if the server failed to return a
filehandle.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: 'constify' lookup arguments.
Trond Myklebust [Wed, 18 Jul 2007 01:52:39 +0000 (21:52 -0400)]
NFSv4: 'constify' lookup arguments.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: Don't fail nfs4_xdr_dec_open if decode_restorefh() failed
Trond Myklebust [Wed, 18 Jul 2007 01:52:37 +0000 (21:52 -0400)]
NFSv4: Don't fail nfs4_xdr_dec_open if decode_restorefh() failed

We can already easily recover from that inside _nfs4_proc_open().

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: Fix open state recovery
Trond Myklebust [Wed, 18 Jul 2007 01:50:45 +0000 (21:50 -0400)]
NFSv4: Fix open state recovery

Ensure that opendata->state is always initialised when we do state
recovery.

Ensure that we set the filehandle in the case where we're doing an
"OPEN_CLAIM_PREVIOUS" call due to a server reboot.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSD/SUNRPC: Fix the automatic selection of RPCSEC_GSS
Trond Myklebust [Thu, 19 Jul 2007 14:03:34 +0000 (10:03 -0400)]
NFSD/SUNRPC: Fix the automatic selection of RPCSEC_GSS

Bruce's patch broke the ability to compile RPCSEC_GSS as a module.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoi2c: Delete the i2c-isa pseudo bus driver
Jean Delvare [Sun, 8 Jul 2007 12:26:37 +0000 (14:26 +0200)]
i2c: Delete the i2c-isa pseudo bus driver

There are no users of i2c-isa left, so we can finally get rid of it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
17 years agohwmon: refuse to load abituguru driver on non-Abit boards
Hans de Goede [Tue, 10 Jul 2007 15:09:57 +0000 (17:09 +0200)]
hwmon: refuse to load abituguru driver on non-Abit boards

With this patch the abituguru refuses to load on non Abit motherboards, as
discussed in lkml CONFIG_BREAK_MY_MACHINE thread.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon: fix Abit Uguru3 driver detection on some motherboards
Hans de Goede [Mon, 2 Jul 2007 21:08:26 +0000 (23:08 +0200)]
hwmon: fix Abit Uguru3 driver detection on some motherboards

This patch changes the driver to also detect uguru3's which hold 0x08 at DATA
initially, as has been reported here:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=220160

Also when an uguru3's holds 0x0014 in the ID register it will now report
"Abit AB9 Pro" as motherboard identification.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/w83627ehf: Be quiet when no chip is found
Jean Delvare [Sun, 24 Jun 2007 09:23:41 +0000 (11:23 +0200)]
hwmon/w83627ehf: Be quiet when no chip is found

This fixes bug #8593:
http://bugzilla.kernel.org/show_bug.cgi?id=8593

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/w83627ehf: No need to initialize fan_min
Jean Delvare [Sun, 24 Jun 2007 09:21:43 +0000 (11:21 +0200)]
hwmon/w83627ehf: No need to initialize fan_min

We don't need to initialize fan_min in this driver, as the fan_div
attributes are read-only.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/w83627ehf: Export the thermal sensor types
Jean Delvare [Sun, 24 Jun 2007 09:21:02 +0000 (11:21 +0200)]
hwmon/w83627ehf: Export the thermal sensor types

Add support for the w83627ehf thermal sensor types. I made them read-only,
as the BIOS is supposed to set them up properly. This information makes it
easier to find out which temperature channel corresponds to the CPU.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/w83627ehf: Enable VBAT monitoring
Jean Delvare [Sun, 24 Jun 2007 09:20:13 +0000 (11:20 +0200)]
hwmon/w83627ehf: Enable VBAT monitoring

If VBAT monitoring is disabled, enable it. Original patch from
an anonymous contributor on the lm-sensors trac system:
http://lm-sensors.org/ticket/2218

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/w83627ehf: Add support for the VID inputs
Jean Delvare [Sun, 24 Jun 2007 09:19:42 +0000 (11:19 +0200)]
hwmon/w83627ehf: Add support for the VID inputs

The W83627EHF and similar chips have 6 VID input pins, add support
for them. The driver changes the input voltage level automatically
if the current setting is not correct for the detected CPU model.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/w83627ehf: Fix timing issues
Jean Delvare [Sun, 24 Jun 2007 09:19:01 +0000 (11:19 +0200)]
hwmon/w83627ehf: Fix timing issues

* I have experimental evidence that the W83627EHG needs more than 1
second to refresh all the measured values. Increase the caching time to
1.5 second.
* When changing a fan clock divider, the corresponding fan speed
measurement register is no longer valid, until the next time the chip
will refresh it. One way to fix this is to pretend that the cache is
still valid for one more period (1.5 second.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/w83627ehf: Add error messages for two error cases
David Hubbard [Sun, 24 Jun 2007 09:17:09 +0000 (11:17 +0200)]
hwmon/w83627ehf: Add error messages for two error cases

If the Super-I/O device is disabled, it is likely the BIOS has a good
reason for leaving it disabled, so give a warning when enabling it --
it's not likely to be wired correctly or be able to give good data.

Also, if the Super-I/O device is configured with an address of 0, the
driver refuses to initialize it.

Signed-off-by: David Hubbard <david.c.hubbard@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/w83627ehf: Convert to a platform driver
David Hubbard [Sun, 24 Jun 2007 09:16:15 +0000 (11:16 +0200)]
hwmon/w83627ehf: Convert to a platform driver

Remove i2c-isa from the w83627ehf driver, and use a platform driver
instead.

Signed-off-by: David Hubbard <david.c.hubbard@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/w83627ehf: Update the Kconfig entry
David Hubbard [Sun, 24 Jun 2007 09:15:03 +0000 (11:15 +0200)]
hwmon/w83627ehf: Update the Kconfig entry

Add description for the W83627DHG chip to Kconfig.

Signed-off-by: David Hubbard <david.c.hubbard@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agomake coretemp_device_remove() static
Adrian Bunk [Thu, 5 Jul 2007 23:23:06 +0000 (01:23 +0200)]
make coretemp_device_remove() static

coretemp_device_remove() can become static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon: Add LM93 support
Hans-Jürgen Koch [Thu, 5 Jul 2007 15:58:29 +0000 (17:58 +0200)]
hwmon: Add LM93 support

This patch adds support for the LM93 hardware monitoring chip.

Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon: Improve the pwmN_enable documentation
Jean Delvare [Wed, 27 Jun 2007 19:26:08 +0000 (21:26 +0200)]
hwmon: Improve the pwmN_enable documentation

The documentation of the pwmN_enable interface file is not very clear,
and has been confusing several driver authors already. Make it clearer.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/smsc47b397: Don't report missing fans as spinning at 82 RPM
Jean Delvare [Sat, 23 Jun 2007 12:58:22 +0000 (14:58 +0200)]
hwmon/smsc47b397: Don't report missing fans as spinning at 82 RPM

Also protects ourselves against a possible division by zero.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon: Add support for newer uGuru's
Hans de Goede [Sat, 16 Jun 2007 22:28:45 +0000 (00:28 +0200)]
hwmon: Add support for newer uGuru's

This patch adds a new driver for the hardware monitoring features of the
third revision of the Abit uGuru chip, found on recent Abit
motherboards. This is an entirely different beast then the first and
second revision (its again a winbond microcontroller, but the "protocol"
to talk to it and the bank addresses are very different.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/f71805f: Add temperature-tracking fan control mode
Phil Endecott [Fri, 29 Jun 2007 07:19:14 +0000 (09:19 +0200)]
hwmon/f71805f: Add temperature-tracking fan control mode

Add support for the "temperature mode" fan speed control. In this mode,
the user can define 3 temperature/speed trip points, and the chip will
set the speed automatically according to the temperature changes.

Signed-off-by: Phil Endecott <kernel@chezphil.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/w83627ehf: Preserve speed reading when changing fan min
Jean Delvare [Sun, 17 Jun 2007 14:09:12 +0000 (16:09 +0200)]
hwmon/w83627ehf: Preserve speed reading when changing fan min

The w83627ehf driver changes the fan clock divider automatically when
a new min fan speed is set. It is supposed to preserve the fan speed
reading while doing so, bug doesn't really. Fix it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon: fix detection of abituguru volt inputs
Hans de Goede [Mon, 18 Jun 2007 20:59:34 +0000 (22:59 +0200)]
hwmon: fix detection of abituguru volt inputs

This patch fixes the detection of volt inputs with a reading of more then 240
units.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon: add SCH5317 to smsc47b397 driver
Juerg Haefliger [Wed, 20 Jun 2007 22:41:33 +0000 (15:41 -0700)]
hwmon: add SCH5317 to smsc47b397 driver

This patch adds the SMSC SCH5317 chip (device ID 0x85) as a supported
device to the smsc47b397 driver.

Signed-off-by: Juerg Haefliger <juergh at gmail.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon: convert it87 to platform driver
corentin.labbe [Wed, 13 Jun 2007 18:27:36 +0000 (20:27 +0200)]
hwmon: convert it87 to platform driver

This is the patch for converting it87 to a platform driver (and remove i2c-isa).

Signed-off-by: Corentin LABBE <corentin.labbe@geomatys.fr>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon: Fix a potential race condition on unload
Jean Delvare [Tue, 12 Jun 2007 11:57:19 +0000 (13:57 +0200)]
hwmon: Fix a potential race condition on unload

Fix a potential race condition when some hardware monitoring platform
drivers are being unloaded. I believe that the driver data pointer
shouldn't be cleared before all the sysfs files are removed, otherwise
a sysfs callback might attempt to dereference a NULL pointer. I'm not
sure exactly what the driver core protects drivers against, so let's
play it safe.

While we're here, clear the driver data pointer when probe fails, so
as to not leave an invalid pointer behind us.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon: Convert vt8231 to a platform driver
Roger Lucas [Tue, 12 Jun 2007 19:04:08 +0000 (21:04 +0200)]
hwmon: Convert vt8231 to a platform driver

Convert the vt8231 driver from the nonsensical i2c-isa hack to a
regular platform driver.

Signed-off-by: Roger Lucas <roger@planbit.co.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/sis5595: Use PCI_REVISION_ID
Jean Delvare [Sat, 9 Jun 2007 14:11:17 +0000 (10:11 -0400)]
hwmon/sis5595: Use PCI_REVISION_ID

Use PCI_REVISION_ID instead of our own define.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
17 years agohwmon/sis5595: Use dynamic sysfs callbacks
Jean Delvare [Sat, 9 Jun 2007 14:11:16 +0000 (10:11 -0400)]
hwmon/sis5595: Use dynamic sysfs callbacks

This lets us get rid of macro-generated functions and shrinks the
driver size by about 7%.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
17 years agohwmon/sis5595: Convert to a platform driver
Jean Delvare [Sat, 9 Jun 2007 14:11:16 +0000 (10:11 -0400)]
hwmon/sis5595: Convert to a platform driver

Convert the sis5595 driver from the nonsensical i2c-isa hack to a
regular platform driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
17 years agohwmon/via686a: Use dynamic sysfs callbacks
Jean Delvare [Sat, 9 Jun 2007 14:11:16 +0000 (10:11 -0400)]
hwmon/via686a: Use dynamic sysfs callbacks

This lets us get rid of macro-generated functions and shrinks the
driver size by about 9%.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
17 years agohwmon/via686a: Convert to a platform driver
Jean Delvare [Sat, 9 Jun 2007 14:11:16 +0000 (10:11 -0400)]
hwmon/via686a: Convert to a platform driver

Convert the via686a driver from the nonsensical i2c-isa hack to a
regular platform driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
17 years agohwmon/via686a: Temperature interrupt configuration fix
Jean Delvare [Sat, 9 Jun 2007 14:11:16 +0000 (10:11 -0400)]
hwmon/via686a: Temperature interrupt configuration fix

Fix the writing of the temperature interrupt configuration.
The old code was working only by accident.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
17 years agohwmon/w83627hf: Add PWM frequency selection support
Carlos Olalla Martinez [Sat, 9 Jun 2007 14:11:16 +0000 (10:11 -0400)]
hwmon/w83627hf: Add PWM frequency selection support

Signed-off-by: Carlos Olalla <com.ea@tinet.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
17 years agohwmon/it87: Add IT8726F support
Rudolf Marek [Sat, 9 Jun 2007 14:11:16 +0000 (10:11 -0400)]
hwmon/it87: Add IT8726F support

Add support for IT8726F chip driver, which is just same as
IT8716F with additional glue logic for AMD power sequencing.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
17 years agohwmon: Fault files naming convention
Jean Delvare [Sat, 9 Jun 2007 14:11:16 +0000 (10:11 -0400)]
hwmon: Fault files naming convention

We have the following naming convention documented in
Documentation/hwmon/sysfs-interface for fault files:

in[0-*]_input_fault
fan[1-*]_input_fault
temp[1-*]_input_fault

Some drivers follow this convention (lm63, lm83, lm90, smsc47m192).
However some drivers omit the "input" part and create files named
fan1_fault (pc87427) or temp1_fault (dme1737). And the new "generic"
libsensors follows this second (non-standard) convention, so it fails
to report fault conditions for drivers which follow the standard.

We want a single naming scheme, and everyone seems to prefer the
shorter variant, so let's go for it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
17 years agohwmon/lm90: Add support for the Maxim MAX6680/MAX6681
Rainer Birkenmaier [Sat, 9 Jun 2007 14:11:16 +0000 (10:11 -0400)]
hwmon/lm90: Add support for the Maxim MAX6680/MAX6681

Signed-off-by: Rainer Birkenmaier <rainer.birkenmaier@siemens.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
17 years agohwmon: Use platform_device_add_data()
Jean Delvare [Sat, 9 Jun 2007 14:11:16 +0000 (10:11 -0400)]
hwmon: Use platform_device_add_data()

Use platform_device_add_data() in hardware monitoring drivers. This
makes the code nicer and smaller too. Reported by David Hubbard.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Hubbard <david.c.hubbard@gmail.com>
17 years agohwmon/pc87360: Convert to a platform driver
Jean Delvare [Sat, 9 Jun 2007 14:11:16 +0000 (10:11 -0400)]
hwmon/pc87360: Convert to a platform driver

Convert the pc87360 driver from the nonsensical i2c-isa hack to a
regular platform driver. This is a direct conversion, other cleanups
could happen on top of that.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jim Cromie <jim.cromie@gmail.com>