]> Git Repo - linux.git/log
linux.git
14 years agoMerge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
Linus Torvalds [Thu, 27 May 2010 18:34:20 +0000 (11:34 -0700)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
  leds: Add mx31moboard MC13783 led support
  leds: Add mc13783 LED support
  leds: leds-ss4200: fix led_classdev_unregister twice in error handling
  leds: leds-lp3944: properly handle lp3944_configure fail in lp3944_probe
  leds: led-class: set permissions on max_brightness file to 0444
  leds: leds-gpio: Change blink_set callback to be able to turn off blinking
  leds: Add LED driver for the Soekris net5501 board
  leds: 88pm860x - fix checking in probe function

14 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Thu, 27 May 2010 18:33:46 +0000 (11:33 -0700)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: (23 commits)
  hwmon: (lm75) Add support for the Texas Instruments TMP105
  hwmon: (ltc4245) Read only one GPIO pin
  hwmon: (dme1737) Add SCH5127 support
  hwmon: (tmp102) Don't always stop chip at exit
  hwmon: (tmp102) Fix suspend and resume functions
  hwmon: (tmp102) Various fixes
  hwmon: Driver for TI TMP102 temperature sensor
  hwmon: EMC1403 thermal sensor support
  hwmon: (applesmc) Add temperature sensor labels to sysfs interface
  hwmon: (applesmc) Add generic support for MacBook Pro 7
  hwmon: (applesmc) Add generic support for MacBook Pro 6
  hwmon: (applesmc) Add support for MacBook Pro 5,3 and 5,4
  hwmon: (tmp401) Reorganize code to get rid of static forward declarations
  hwmon: (tmp401) Use constants for sysfs file permissions
  hwmon: (adm1031) Allow setting update rate
  hwmon: Add description of the update_rate sysfs attribute
  hwmon: (lm90) Use programmed update rate
  hwmon: (f71882fg) Acquire I/O regions while we're working with them
  hwmon: (f71882fg) Code cleanup
  hwmon: (f71882fg) Use strict_stro(l|ul) instead of simple_strto$1
  ...

14 years agohwmon: (lm75) Add support for the Texas Instruments TMP105
Shubhrajyoti Datta [Thu, 27 May 2010 17:59:03 +0000 (19:59 +0200)]
hwmon: (lm75) Add support for the Texas Instruments TMP105

Add support for the Texas Instruments TMP105 temperature sensor
device.

Signed-off-by: Shubhrajyoti Datta <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (ltc4245) Read only one GPIO pin
Ira W. Snyder [Thu, 27 May 2010 17:59:02 +0000 (19:59 +0200)]
hwmon: (ltc4245) Read only one GPIO pin

Read only one of the GPIO pins as an analog voltage. The ADC can be
switched to a different GPIO pin at runtime, but this is not supported.

Previously, this driver would report the analog voltage of the currently
selected GPIO pin as all three GPIO voltages: in9_input, in10_input and
in11_input.

Signed-off-by: Ira W. Snyder <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Cc: [email protected]
14 years agohwmon: (dme1737) Add SCH5127 support
Juerg Haefliger [Thu, 27 May 2010 17:59:01 +0000 (19:59 +0200)]
hwmon: (dme1737) Add SCH5127 support

Add support for the hardware monitoring capabilities of the SCH5127
chip to the dme1737 driver.

Signed-off-by: Juerg Haefliger <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Tested-by: Jeff Rickman <[email protected]>
14 years agohwmon: (tmp102) Don't always stop chip at exit
Jean Delvare [Thu, 27 May 2010 17:58:59 +0000 (19:58 +0200)]
hwmon: (tmp102) Don't always stop chip at exit

Only stop the chip at driver exit if it was stopped when driver was
loaded. Leave it running otherwise.

Also restore the device configuration if probe failed, to not leave
the system in a dangling state.

Signed-off-by: Jean Delvare <[email protected]>
Cc: Steven King <[email protected]>
14 years agohwmon: (tmp102) Fix suspend and resume functions
Jean Delvare [Thu, 27 May 2010 17:58:58 +0000 (19:58 +0200)]
hwmon: (tmp102) Fix suspend and resume functions

Suspend and resume functions shouldn't overwrite the configuration
register. They should only alter the one bit they have to touch.

Also don't assume that register reads and writes always succeed.
Handle errors properly, shall they happen.

Signed-off-by: Jean Delvare <[email protected]>
Cc: Steven King <[email protected]>
14 years agohwmon: (tmp102) Various fixes
Jean Delvare [Thu, 27 May 2010 17:58:57 +0000 (19:58 +0200)]
hwmon: (tmp102) Various fixes

Fixes from my driver review:
http://lists.lm-sensors.org/pipermail/lm-sensors/2010-March/028051.html

Only the small changes are in there, more important changes will come
later separately as time permits.

* Drop the remnants of the now gone detect function
* The TMP102 has no known compatible chip
* Include the right header files
* Clarify why byte swapping of register values is needed
* Strip resolution info bit from temperature register value
* Set cache lifetime to 1/3 second
* Don't arbitrarily reject limit values; clamp as needed
* Make limit writing unconditional
* Don't check for transaction types the driver doesn't use
* Properly check for error when setting configuration
* Report error on failed probe
* Make the driver load automatically where needed
* Various other minor fixes

Signed-off-by: Jean Delvare <[email protected]>
Cc: Steven King <[email protected]>
14 years agohwmon: Driver for TI TMP102 temperature sensor
Steven King [Thu, 27 May 2010 17:58:56 +0000 (19:58 +0200)]
hwmon: Driver for TI TMP102 temperature sensor

Driver for the TI TMP102.

The TI TMP102 is similar to the LM75.  It differs from the LM75 by
having a 16-bit conf register and the temp registers have a minimum
resolution of 12 bits; the extended conf register can select 13-bit
resolution (which this driver does) and also change the update rate
(which this driver currently doesn't use).

[JD: Fix tmp102_exit tag, must be __exit, not __init.]

Signed-off-by: Steven King <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: EMC1403 thermal sensor support
Kalhan Trisal [Thu, 27 May 2010 17:58:56 +0000 (19:58 +0200)]
hwmon: EMC1403 thermal sensor support

Provides support for the EMC1403 thermal sensor. Only reporting of values
is supported. The various Moorestown specific extras to do with thermal
alerts and the like are not in this version of the driver.

Considerably edited and tidied up by Alan Cox, plus fixes and detection
bits from Jean Delvare.

Signed-off-by: Kalhan Trisal <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (applesmc) Add temperature sensor labels to sysfs interface
Alex Murray [Thu, 27 May 2010 17:58:54 +0000 (19:58 +0200)]
hwmon: (applesmc) Add temperature sensor labels to sysfs interface

The Apple SMC uses a systematic labeling scheme for the hardware
temperature sensors. This scheme is currently hidden from
userland. Since the sensor set, and consequently the numbering,
differs between models, an extensive database of configurations is
required for an application such as fan control. This patch adds the
SMC labels to the hwmon sysfs interface, allowing applications to use
the sensors more intelligibly.

[[email protected]: fixed error handling]
Signed-off-by: Alex Murray <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (applesmc) Add generic support for MacBook Pro 7
Henrik Rydberg [Thu, 27 May 2010 17:58:53 +0000 (19:58 +0200)]
hwmon: (applesmc) Add generic support for MacBook Pro 7

This patch adds generic support for the MacBook Pro 7 family
based on the 7,1 model.

Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (applesmc) Add generic support for MacBook Pro 6
Bernhard Froemel [Thu, 27 May 2010 17:58:52 +0000 (19:58 +0200)]
hwmon: (applesmc) Add generic support for MacBook Pro 6

This patch adds generic support for the MacBook Pro 6 family
based on the 6,2 model.

[[email protected]: patch cleanup]
Signed-off-by: Bernhard Froemel <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (applesmc) Add support for MacBook Pro 5,3 and 5,4
Henrik Rydberg [Thu, 27 May 2010 17:58:50 +0000 (19:58 +0200)]
hwmon: (applesmc) Add support for MacBook Pro 5,3 and 5,4

The MacBookPro 5,3 model has two fans, whereas the 5,4 model has
only one. This patch adds explicit support for the 5,3 and 5,4 models.

Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (tmp401) Reorganize code to get rid of static forward declarations
Andre Prendel [Thu, 27 May 2010 17:58:49 +0000 (19:58 +0200)]
hwmon: (tmp401) Reorganize code to get rid of static forward declarations

Signed-off-by: Andre Prendel <[email protected]>
Acked-by: Hans de Goede <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (tmp401) Use constants for sysfs file permissions
Andre Prendel [Thu, 27 May 2010 17:58:48 +0000 (19:58 +0200)]
hwmon: (tmp401) Use constants for sysfs file permissions

Replace octal representation of file permissions by the corresponding
constants.

Signed-off-by: Andre Prendel <[email protected]>
Acked-by: Hans de Goede <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (adm1031) Allow setting update rate
Jean Delvare [Thu, 27 May 2010 17:58:46 +0000 (19:58 +0200)]
hwmon: (adm1031) Allow setting update rate

Based on earlier work by Ira W. Snyder.

The adm1031 chip is capable of using a runtime configurable sampling rate,
using the fan filter register. Add support for reading and setting the
update rate via sysfs.

Signed-off-by: Jean Delvare <[email protected]>
Acked-by: Ira W. Snyder <[email protected]>
14 years agohwmon: Add description of the update_rate sysfs attribute
Ira W. Snyder [Thu, 27 May 2010 17:58:45 +0000 (19:58 +0200)]
hwmon: Add description of the update_rate sysfs attribute

The update_rate attribute can be used by drivers to let userspace choose
the update rate of the chip, if it is configurable.

Signed-off-by: Ira W. Snyder <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (lm90) Use programmed update rate
Ira W. Snyder [Thu, 27 May 2010 17:58:44 +0000 (19:58 +0200)]
hwmon: (lm90) Use programmed update rate

The lm90 driver programs the sensor chip to update its readings at 2 Hz
(500 ms between readings). However, the driver only does reads from the
chip at intervals of 2 * HZ (2000 ms between readings). Change the driver
update rate to the programmed update rate.

Signed-off-by: Ira W. Snyder <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (f71882fg) Acquire I/O regions while we're working with them
Giel van Schijndel [Thu, 27 May 2010 17:58:43 +0000 (19:58 +0200)]
hwmon: (f71882fg) Acquire I/O regions while we're working with them

Acquire the I/O region for the Super I/O chip while we're working on it.

Signed-off-by: Giel van Schijndel <[email protected]>
Cc: Hans de Goede <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (f71882fg) Code cleanup
Giel van Schijndel [Thu, 27 May 2010 17:58:42 +0000 (19:58 +0200)]
hwmon: (f71882fg) Code cleanup

Some code cleanup: properly use previously defined functions, rather
than duplicating their code.

Signed-off-by: Giel van Schijndel <[email protected]>
Cc: Hans de Goede <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (f71882fg) Use strict_stro(l|ul) instead of simple_strto$1
Giel van Schijndel [Thu, 27 May 2010 17:58:41 +0000 (19:58 +0200)]
hwmon: (f71882fg) Use strict_stro(l|ul) instead of simple_strto$1

Use the strict_strol and strict_stroul functions instead of simple_strol
and simple_stroul respectively in sysfs functions.

Signed-off-by: Giel van Schijndel <[email protected]>
Acked-by: Hans de Goede <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (f71882fg) Fixed braces coding style issues
Giel van Schijndel [Thu, 27 May 2010 17:58:40 +0000 (19:58 +0200)]
hwmon: (f71882fg) Fixed braces coding style issues

Fixed several coding style issues.

Signed-off-by: Giel van Schijndel <[email protected]>
Acked-by: Hans de Goede <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (lm63) Add basic support for LM64
Matthew Garrett [Thu, 27 May 2010 17:58:38 +0000 (19:58 +0200)]
hwmon: (lm63) Add basic support for LM64

The LM64 appears to be an LM63 with added GPIO lines. Add support for the
hwmon functionality - GPIO can be added at some later stage if someone
has a need for them.

Signed-off-by: Matthew Garrett <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
14 years agohwmon: (asus_atk0110) Don't load if ACPI resources aren't enforced
Jean Delvare [Thu, 27 May 2010 17:58:37 +0000 (19:58 +0200)]
hwmon: (asus_atk0110) Don't load if ACPI resources aren't enforced

When the user passes the kernel parameter acpi_enforce_resources=lax,
the ACPI resources are no longer protected, so a native driver can
make use of them. In that case, we do not want the asus_atk0110 to be
loaded. Unfortunately, this driver loads automatically due to its
MODULE_DEVICE_TABLE, so the user ends up with two drivers loaded for
the same device - this is bad.

So I suggest that we prevent the asus_atk0110 driver from loading if
acpi_enforce_resources=lax.

Signed-off-by: Jean Delvare <[email protected]>
Acked-by: Luca Tettamanti <[email protected]>
Cc: Len Brown <[email protected]>
14 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Thu, 27 May 2010 17:48:46 +0000 (10:48 -0700)]
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] fill out file list in s390 MAINTAINERS entry
  [S390] Add support for LZO-compressed kernels.
  [S390] cmm: get rid of CMM_PROC config option
  [S390] cmm: remove superfluous EXPORT_SYMBOLs plus cleanups
  [S390] dasd: unit check handling during internal cio I/O
  [S390] cio: unit check handling during internal I/O
  [S390] ccwgroup: add locking around drvdata access
  [S390] cio: remove stsch
  [S390] spp: remove KVM_AWARE_CMF config option
  [S390] kprobes: forbid probing of stnsm/stosm/epsw
  [S390] spp: fix compilation for CONFIG_32BIT
  [S390] atomic: implement atomic64_dec_if_positive
  [S390] cmm: fix crash on module unload

14 years agoMerge branch 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb...
Linus Torvalds [Thu, 27 May 2010 17:47:41 +0000 (10:47 -0700)]
Merge branch 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6

* 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6:
  SFI: add sysfs interface for SFI tables.
  SFI: add support for v0.81 spec

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
Linus Torvalds [Thu, 27 May 2010 17:43:44 +0000 (10:43 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable

* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (27 commits)
  Btrfs: add more error checking to btrfs_dirty_inode
  Btrfs: allow unaligned DIO
  Btrfs: drop verbose enospc printk
  Btrfs: Fix block generation verification race
  Btrfs: fix preallocation and nodatacow checks in O_DIRECT
  Btrfs: avoid ENOSPC errors in btrfs_dirty_inode
  Btrfs: move O_DIRECT space reservation to btrfs_direct_IO
  Btrfs: rework O_DIRECT enospc handling
  Btrfs: use async helpers for DIO write checksumming
  Btrfs: don't walk around with task->state != TASK_RUNNING
  Btrfs: do aio_write instead of write
  Btrfs: add basic DIO read/write support
  direct-io: do not merge logically non-contiguous requests
  direct-io: add a hook for the fs to provide its own submit_bio function
  fs: allow short direct-io reads to be completed via buffered IO
  Btrfs: Metadata ENOSPC handling for balance
  Btrfs: Pre-allocate space for data relocation
  Btrfs: Metadata ENOSPC handling for tree log
  Btrfs: Metadata reservation for orphan inodes
  Btrfs: Introduce global metadata reservation
  ...

14 years agoAvoid warning when CPU hotplug isn't enabled
Linus Torvalds [Thu, 27 May 2010 17:32:08 +0000 (10:32 -0700)]
Avoid warning when CPU hotplug isn't enabled

Commit e9fb7631ebcd ("cpu-hotplug: introduce cpu_notify(),
__cpu_notify(), cpu_notify_nofail()") also introduced this annoying
warning:

  kernel/cpu.c:157: warning: 'cpu_notify_nofail' defined but not used

when CONFIG_HOTPLUG_CPU wasn't set.

So move that helper inside the #ifdef CONFIG_HOTPLUG_CPU region, and
simplify it while at it.

Signed-off-by: Linus Torvalds <[email protected]>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Thu, 27 May 2010 17:28:11 +0000 (10:28 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6:
  [SCSI] fix race in scsi_target_reap
  [SCSI] aacraid: Eliminate use after free
  [SCSI] arcmsr: Support HW reset for EH and polling scheme for scsi device
  [SCSI] bfa: fix system crash when reading sysfs fc_host statistics
  [SCSI] iscsi_tcp: remove sk_sleep check
  [SCSI] ipr: improve interrupt service routine performance
  [SCSI] ipr: set the data list length in the request control block
  [SCSI] ipr: fix a register read to use the correct address for 64 bit adapters
  [SCSI] ipr: include the resource path in the IOA status area structure
  [SCSI] ipr: implement fixes for 64 bit adapter support
  [SCSI] be2iscsi: correct return value in mgmt_invalidate_icds()

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Thu, 27 May 2010 17:26:37 +0000 (10:26 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (40 commits)
  ext4: Make fsync sync new parent directories in no-journal mode
  ext4: Drop whitespace at end of lines
  ext4: Fix compat EXT4_IOC_ADD_GROUP
  ext4: Conditionally define compat ioctl numbers
  tracing: Convert more ext4 events to DEFINE_EVENT
  ext4: Add new tracepoints to track mballoc's buddy bitmap loads
  ext4: Add a missing trace hook
  ext4: restart ext4_ext_remove_space() after transaction restart
  ext4: Clear the EXT4_EOFBLOCKS_FL flag only when warranted
  ext4: Avoid crashing on NULL ptr dereference on a filesystem error
  ext4: Use bitops to read/modify i_flags in struct ext4_inode_info
  ext4: Convert calls of ext4_error() to EXT4_ERROR_INODE()
  ext4: Convert callers of ext4_get_blocks() to use ext4_map_blocks()
  ext4: Add new abstraction ext4_map_blocks() underneath ext4_get_blocks()
  ext4: Use our own write_cache_pages()
  ext4: Show journal_checksum option
  ext4: Fix for ext4_mb_collect_stats()
  ext4: check for a good block group before loading buddy pages
  ext4: Prevent creation of files larger than RLIMIT_FSIZE using fallocate
  ext4: Remove extraneous newlines in ext4_msg() calls
  ...

Fixed up trivial conflict in fs/ext4/fsync.c

14 years agoMerge branch 'for-linus/2634-git-updates' of git://git.fluff.org/bjdooks/linux
Linus Torvalds [Thu, 27 May 2010 17:23:57 +0000 (10:23 -0700)]
Merge branch 'for-linus/2634-git-updates' of git://git.fluff.org/bjdooks/linux

* 'for-linus/2634-git-updates' of git://git.fluff.org/bjdooks/linux:
  ARM: S5PC100: Fixup cross tree merge problems
  ARM: S5P: Fix the platform external interrupt issues.
  ARM: s5pv210_defconfig: Update s5pv210_defconfig to v2.6.34-git
  ARM: s5pc110_defconfig: Update s5pc110_defconfig to v2.6.34-git
  ARM: s5pc100_defconfig: Update s5pc100_defconfig to v2.6.34-git
  ARM: s5p6442_defconfig: Update s5p6442_defconfig to v2.6.34-git
  ARM: s5p6440_defconfig: Update s5p6440_defconfig to v2.6.34-git
  ARM: s3c6400_defconfig: Update s3c6400_defconfig to v2.6.34-git
  ARM: s3c2410_defconfig: Update s3c2410_defconfig to v2.6.34-git

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Thu, 27 May 2010 17:22:06 +0000 (10:22 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: schedule for removal
  firewire: core: use separate timeout for each transaction
  firewire: core: Fix tlabel exhaustion problem
  firewire: core: make transaction label allocation more robust
  firewire: core: clean up config ROM related defined constants
  ieee1394: mark char device files as not seekable
  firewire: cdev: mark char device files as not seekable
  firewire: ohci: cleanups and fix for nonstandard build without debug facility
  firewire: ohci: wait for PHY register accesses to complete
  firewire: ohci: fix up configuration of TI chips
  firewire: ohci: enable 1394a enhancements
  firewire: ohci: do not clear PHY interrupt status inadvertently
  firewire: ohci: add a function for reading PHY registers

Trivial conflicts in Documentation/feature-removal-schedule.txt

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Thu, 27 May 2010 17:19:19 +0000 (10:19 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (24 commits)
  m68k: amiga - RTC platform device conversion
  m68k: amiga - Parallel port platform device conversion
  m68k: amiga - Serial port platform device conversion
  m68k: amiga - Mouse platform device conversion
  m68k: amiga - Keyboard platform device conversion
  m68k: amiga - Amiga Gayle IDE platform device conversion
  m68k: amiga - A4000T SCSI platform device conversion
  m68k/scsi: a3000 - Do not use legacy Scsi_Host.base
  m68k: amiga - A3000 SCSI platform device conversion
  m68k/scsi: gvp11 - Do not use legacy Scsi_Host.base
  m68k: amiga - GVP Series II SCSI zorro_driver conversion
  m68k/scsi: a2091 - Do not use legacy Scsi_Host.base
  m68k: amiga - A2091/A590 SCSI zorro_driver conversion
  m68k/scsi: mvme147 - Kill obsolete HOSTS_C logic
  m68k/scsi: a3000 - Kill a3000_scsiregs typedef
  m68k/scsi: gvp11 - Kill gvp11_scsiregs typedef
  m68k/scsi: a2091 - Kill a2091_scsiregs typedef
  m68k/scsi: gvp11 - Extract check_wd33c93()
  m68k/scsi: a3000 - Kill static global a3000_host
  m68k/scsi: mvme147 - Kill static global mvme147_host
  ...

14 years agoMerge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
Linus Torvalds [Thu, 27 May 2010 17:18:44 +0000 (10:18 -0700)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6

* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
  NFS: Fix another nfs_wb_page() deadlock
  NFS: Ensure that we mark the inode as dirty if we exit early from commit
  NFS: Fix a lock imbalance typo in nfs_access_cache_shrinker
  sunrpc: fix leak on error on socket xprt setup

14 years agoSFI: add sysfs interface for SFI tables.
Feng Tang [Wed, 26 May 2010 03:28:08 +0000 (11:28 +0800)]
SFI: add sysfs interface for SFI tables.

Analogous to ACPI's /sys/firmware/acpi/tables/...

create /sys/firmware/sfi/tables/

The tables are primariy for the kernel,
but sometimes it is useful for user-space to be
able to read them.

Signed-off-by: Feng Tang <[email protected]>
Signed-off-by: Len Brown <[email protected]>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Thu, 27 May 2010 16:19:55 +0000 (09:19 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: usbtouchscreen - support bigger iNexio touchscreens
  Input: ads7846 - return error on regulator_get() failure
  Input: twl4030-vibra - correct the power down sequence
  Input: enable onkey driver of max8925
  Input: use ABS_CNT rather than (ABS_MAX + 1)

14 years agoInput: s3c2410_ts - restore accidentially dropped s3c24xx ids
Vasily Khoruzhick [Thu, 27 May 2010 16:03:19 +0000 (09:03 -0700)]
Input: s3c2410_ts - restore accidentially dropped s3c24xx ids

Without s3c24xx ids driver doesn't attach on s3c2410 and s3c244x

Signed-off-by: Vasily Khoruzhick <[email protected]>
Acked-by: Ben Dooks <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agonuma: update Documentation/vm/numa, add memoryless node info
Lee Schermerhorn [Wed, 26 May 2010 21:45:06 +0000 (14:45 -0700)]
numa: update Documentation/vm/numa, add memoryless node info

Kamezawa Hiroyuki requested documentation for the numa_mem_id() and slab
related changes.  He suggested Documentation/vm/numa for this
documentation.  Looking at this file, it seems to me to be hopelessly out
of date relative to current Linux NUMA support.  At the risk of going down
a rathole, I have made an attempt to rewrite the doc at a slightly higher
level [I think] and provide pointers to other in-tree documents and
out-of-tree man pages that cover the details.

Let the games begin.

Signed-off-by: Lee Schermerhorn <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Eric Whitney <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: Randy Dunlap <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agonuma: in-kernel profiling: use cpu_to_mem() for per cpu allocations
Lee Schermerhorn [Wed, 26 May 2010 21:45:04 +0000 (14:45 -0700)]
numa: in-kernel profiling: use cpu_to_mem() for per cpu allocations

In kernel profiling requires that we be able to allocate "local" memory
for each cpu.  Use "cpu_to_mem()" instead of "cpu_to_node()" to support
memoryless nodes.

Depends on the "numa_mem_id()" patch.

Signed-off-by: Lee Schermerhorn <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Eric Whitney <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agonuma: slab: use numa_mem_id() for slab local memory node
Lee Schermerhorn [Wed, 26 May 2010 21:45:03 +0000 (14:45 -0700)]
numa: slab: use numa_mem_id() for slab local memory node

Example usage of generic "numa_mem_id()":

The mainline slab code, since ~ 2.6.19, does not handle memoryless nodes
well.  Specifically, the "fast path"--____cache_alloc()--will never
succeed as slab doesn't cache offnode object on the per cpu queues, and
for memoryless nodes, all memory will be "off node" relative to
numa_node_id().  This adds significant overhead to all kmem cache
allocations, incurring a significant regression relative to earlier
kernels [from before slab.c was reorganized].

This patch uses the generic topology function "numa_mem_id()" to return
the "effective local memory node" for the calling context.  This is the
first node in the local node's generic fallback zonelist-- the same node
that "local" mempolicy-based allocations would use.  This lets slab cache
these "local" allocations and avoid fallback/refill on every allocation.

N.B.: Slab will need to handle node and memory hotplug events that could
change the value returned by numa_mem_id() for any given node if recent
changes to address memory hotplug don't already address this.  E.g., flush
all per cpu slab queues before rebuilding the zonelists while the
"machine" is held in the stopped state.

Performance impact on "hackbench 400 process 200"

2.6.34-rc3-mmotm-100405-1609 no-patch this-patch
ia64 no memoryless nodes [avg of 10]:     11.713       11.637  ~0.65 diff
ia64 cpus all on memless nodes  [10]:    228.259       26.484  ~8.6x speedup

The slowdown of the patched kernel from ~12 sec to ~28 seconds when
configured with memoryless nodes is the result of all cpus allocating from
a single node's mm pagepool.  The cache lines of the single node are
distributed/interleaved over the memory of the real physical nodes, but
the zone lock, list heads, ...  of the single node with memory still each
live in a single cache line that is accessed from all processors.

x86_64 [8x6 AMD] [avg of 40]: 2.883    2.845

Signed-off-by: Lee Schermerhorn <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Eric Whitney <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agonuma: ia64: support numa_mem_id() for memoryless nodes
Lee Schermerhorn [Wed, 26 May 2010 21:45:01 +0000 (14:45 -0700)]
numa: ia64: support numa_mem_id() for memoryless nodes

Enable 'HAVE_MEMORYLESS_NODES' by default when NUMA configured on ia64.
Initialize percpu 'numa_mem' variable when starting secondary cpus.
Generic initialization will handle the boot cpu.

Nothing uses 'numa_mem_id()' yet.  Subsequent patch with modify slab to
use this.

Signed-off-by: Lee Schermerhorn <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Eric Whitney <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agonuma: introduce numa_mem_id()- effective local memory node id
Lee Schermerhorn [Wed, 26 May 2010 21:45:00 +0000 (14:45 -0700)]
numa: introduce numa_mem_id()- effective local memory node id

Introduce numa_mem_id(), based on generic percpu variable infrastructure
to track "nearest node with memory" for archs that support memoryless
nodes.

Define API in <linux/topology.h> when CONFIG_HAVE_MEMORYLESS_NODES
defined, else stubs.  Architectures will define HAVE_MEMORYLESS_NODES
if/when they support them.

Archs can override definitions of:

numa_mem_id() - returns node number of "local memory" node
set_numa_mem() - initialize [this cpus'] per cpu variable 'numa_mem'
cpu_to_mem()  - return numa_mem for specified cpu; may be used as lvalue

Generic initialization of 'numa_mem' occurs in __build_all_zonelists().
This will initialize the boot cpu at boot time, and all cpus on change of
numa_zonelist_order, or when node or memory hot-plug requires zonelist
rebuild.  Archs that support memoryless nodes will need to initialize
'numa_mem' for secondary cpus as they're brought on-line.

[[email protected]: fix build]
Signed-off-by: Lee Schermerhorn <[email protected]>
Signed-off-by: Christoph Lameter <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Eric Whitney <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agonuma: ia64: use generic percpu var numa_node_id() implementation
Lee Schermerhorn [Wed, 26 May 2010 21:44:59 +0000 (14:44 -0700)]
numa: ia64: use generic percpu var numa_node_id() implementation

ia64:  Use generic percpu implementation of numa_node_id()
   + intialize per cpu 'numa_node'
   + remove ia64 cpu_to_node() macro;  use generic
   + define CONFIG_USE_PERCPU_NUMA_NODE_ID when NUMA configured

Signed-off-by: Lee Schermerhorn <[email protected]>
Reviewed-by: Christoph Lameter <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Eric Whitney <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agonuma: x86_64: use generic percpu var numa_node_id() implementation
Lee Schermerhorn [Wed, 26 May 2010 21:44:58 +0000 (14:44 -0700)]
numa: x86_64: use generic percpu var numa_node_id() implementation

x86 arch specific changes to use generic numa_node_id() based on generic
percpu variable infrastructure.  Back out x86's custom version of
numa_node_id()

Signed-off-by: Lee Schermerhorn <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Eric Whitney <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agonuma: add generic percpu var numa_node_id() implementation
Lee Schermerhorn [Wed, 26 May 2010 21:44:56 +0000 (14:44 -0700)]
numa: add generic percpu var numa_node_id() implementation

Rework the generic version of the numa_node_id() function to use the new
generic percpu variable infrastructure.

Guard the new implementation with a new config option:

        CONFIG_USE_PERCPU_NUMA_NODE_ID.

Archs which support this new implemention will default this option to 'y'
when NUMA is configured.  This config option could be removed if/when all
archs switch over to the generic percpu implementation of numa_node_id().
Arch support involves:

  1) converting any existing per cpu variable implementations to use
     this implementation.  x86_64 is an instance of such an arch.
  2) archs that don't use a per cpu variable for numa_node_id() will
     need to initialize the new per cpu variable "numa_node" as cpus
     are brought on-line.  ia64 is an example.
  3) Defining USE_PERCPU_NUMA_NODE_ID in arch dependent Kconfig--e.g.,
     when NUMA is configured.  This is required because I have
     retained the old implementation by default to allow archs to
     be modified incrementally, as desired.

Subsequent patches will convert x86_64 and ia64 to use this implemenation.

Signed-off-by: Lee Schermerhorn <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Mel Gorman <[email protected]>
Reviewed-by: Christoph Lameter <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Eric Whitney <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoDocumentation/filesystems/Locking: update documentation on llseek() wrt BKL
Jan Blunck [Wed, 26 May 2010 21:44:54 +0000 (14:44 -0700)]
Documentation/filesystems/Locking: update documentation on llseek() wrt BKL

The inode's i_size is not protected by the big kernel lock.  Therefore it
does not make sense to recommend taking the BKL in filesystems llseek
operations.  Instead it should use the inode's mutex or use just use
i_size_read() instead.  Add a note that this is not protecting
file->f_pos.

Signed-off-by: Jan Blunck <[email protected]>
Acked-by: Alan Cox <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: John Kacur <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agofs/: do not fallback to default_llseek() when readdir() uses BKL
jan Blunck [Wed, 26 May 2010 21:44:53 +0000 (14:44 -0700)]
fs/: do not fallback to default_llseek() when readdir() uses BKL

Do not use the fallback default_llseek() if the readdir operation of the
filesystem still uses the big kernel lock.

Since llseek() modifies
file->f_pos of the directory directly it may need locking to not confuse
readdir which usually uses file->f_pos directly as well

Since the special characteristics of the BKL (unlocked on schedule) are
not necessary in this case, the inode mutex can be used for locking as
provided by generic_file_llseek().  This is only possible since all
filesystems, except reiserfs, either use a directory as a flat file or
with disk address offsets.  Reiserfs on the other hand uses a 32bit hash
off the filename as the offset so generic_file_llseek() can get used as
well since the hash is always smaller than sb->s_maxbytes (= (512 << 32) -
blocksize).

Signed-off-by: Jan Blunck <[email protected]>
Acked-by: Jan Kara <[email protected]>
Acked-by: Anders Larsen <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agost: use noop_llseek() instead of default_llseek()
Jan Blunck [Wed, 26 May 2010 21:44:51 +0000 (14:44 -0700)]
st: use noop_llseek() instead of default_llseek()

st_open() suggests that llseek() doesn't work: "We really want to do
nonseekable_open(inode, filp); here, but some versions of tar incorrectly
call lseek on tapes and bail out if that fails.  So we disallow pread()
and pwrite(), but permit lseeks."

Instead of using the fallback default_llseek() the driver should use
noop_llseek() which leaves the file->f_pos untouched but succeeds.

Signed-off-by: Jan Blunck <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Kai Makisara <[email protected]>
Cc: Willem Riede <[email protected]>
Cc: James Bottomley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoosst: use noop_llseek() instead of default_llseek()
Jan Blunck [Wed, 26 May 2010 21:44:50 +0000 (14:44 -0700)]
osst: use noop_llseek() instead of default_llseek()

__os_scsi_tape_open() suggests that llseek() doesn't work: "We really want
to do nonseekable_open(inode, filp); here, but some versions of tar
incorrectly call lseek on tapes and bail out if that fails.  So we
disallow pread() and pwrite(), but permit lseeks."

Instead of using the fallback default_llseek() the driver should use
noop_llseek() which leaves the file->f_pos untouched but succeeds.

Signed-off-by: Jan Blunck <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Willem Riede <[email protected]>
Cc: James Bottomley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agovfs: introduce noop_llseek()
jan Blunck [Wed, 26 May 2010 21:44:48 +0000 (14:44 -0700)]
vfs: introduce noop_llseek()

This is an implementation of ->llseek useable for the rare special case
when userspace expects the seek to succeed but the (device) file is
actually not able to perform the seek.  In this case you use noop_llseek()
instead of falling back to the default implementation of ->llseek.

Signed-off-by: Jan Blunck <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agortc-m41t80: use nonseekable_open()
Jan Blunck [Wed, 26 May 2010 21:44:47 +0000 (14:44 -0700)]
rtc-m41t80: use nonseekable_open()

Use nonseekable_open() for this since seeking is not supported anyway.

Signed-off-by: Jan Blunck <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Paul Gortmaker <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agomISDN: remove unnecessary test on f_pos
Jan Blunck [Wed, 26 May 2010 21:44:46 +0000 (14:44 -0700)]
mISDN: remove unnecessary test on f_pos

This test is not doing anything since it is always false if the
mISDN_read() is called from vfs_read().  Besides that the driver uses
nonseekable_open() and is not using off or file->f_pos anywhere.

Signed-off-by: Jan Blunck <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Karsten Keil <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agofrv: remove "struct file *" argument from sysctl ->proc_handler
Jan Blunck [Wed, 26 May 2010 21:44:46 +0000 (14:44 -0700)]
frv: remove "struct file *" argument from sysctl ->proc_handler

Signed-off-by: Jan Blunck <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: David Howells <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoosst: update ppos instead of using file->f_pos
Jan Blunck [Wed, 26 May 2010 21:44:44 +0000 (14:44 -0700)]
osst: update ppos instead of using file->f_pos

osst_read()/osst_write() modify file->f_pos directly instead of the ppos
given to them.  The VFS later updates the file->f_pos and overwrites it
with the value of ppos.

Signed-off-by: Jan Blunck <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Willem Riede <[email protected]>
Cc: James Bottomley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoparisc: use asm-generic/scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:43 +0000 (14:44 -0700)]
parisc: use asm-generic/scatterlist.h

parisc uses iova and iova_length in scatterlist structure instead of
dma_address and dma_length.  However, the accessor are used so we can
convert parisc to use asm-generic/scatterlist.h easily.

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Kyle McMartin <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agomn10300: use asm-generic/scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:42 +0000 (14:44 -0700)]
mn10300: use asm-generic/scatterlist.h

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: David Howells <[email protected]>
Cc: Koichi Yasutake <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agofrv: use asm-generic/scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:42 +0000 (14:44 -0700)]
frv: use asm-generic/scatterlist.h

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: David Howells <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoblackfin: use use asm-generic/scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:41 +0000 (14:44 -0700)]
blackfin: use use asm-generic/scatterlist.h

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Mike Frysinger <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoxtensa: use use asm-generic/scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:41 +0000 (14:44 -0700)]
xtensa: use use asm-generic/scatterlist.h

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Chris Zankel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agomips: use use asm-generic/scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:40 +0000 (14:44 -0700)]
mips: use use asm-generic/scatterlist.h

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Ralf Baechle <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agom68k: use asm-generic/scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:39 +0000 (14:44 -0700)]
m68k: use asm-generic/scatterlist.h

Signed-off-by: FUJITA Tomonori <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Cc: Roman Zippel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agom32r: use use asm-generic/scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:37 +0000 (14:44 -0700)]
m32r: use use asm-generic/scatterlist.h

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Hirokazu Takata <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoh8300: use asm-generic/scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:36 +0000 (14:44 -0700)]
h8300: use asm-generic/scatterlist.h

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Yoshinori Sato <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agocris: use asm-generic/scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:35 +0000 (14:44 -0700)]
cris: use asm-generic/scatterlist.h

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Mikael Starvik <[email protected]>
Cc: Jesper Nilsson <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoavr32: use asm-generic/scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:35 +0000 (14:44 -0700)]
avr32: use asm-generic/scatterlist.h

Signed-off-by: FUJITA Tomonori <[email protected]>
Acked-by: Haavard Skinnemoen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoasm-generic: remove ARCH_HAS_SG_CHAIN in scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:34 +0000 (14:44 -0700)]
asm-generic: remove ARCH_HAS_SG_CHAIN in scatterlist.h

There are more architectures that don't support ARCH_HAS_SG_CHAIN than
those that support it.  This removes removes ARCH_HAS_SG_CHAIN in
asm-generic/scatterlist.h and lets arhictectures to define it.

It's clearer than defining ARCH_HAS_SG_CHAIN asm-generic/scatterlist.h and
undefing it in arhictectures that don't support it.

Signed-off-by: FUJITA Tomonori <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoalpha: use asm-generic/scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:34 +0000 (14:44 -0700)]
alpha: use asm-generic/scatterlist.h

Signed-off-by: FUJITA Tomonori <[email protected]>
Acked-by: Matt Turner <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agopowerpc: use asm-generic/scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:33 +0000 (14:44 -0700)]
powerpc: use asm-generic/scatterlist.h

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agox86_32: use asm-generic/scatterlist.h
Andrew Morton [Wed, 26 May 2010 21:44:33 +0000 (14:44 -0700)]
x86_32: use asm-generic/scatterlist.h

Cc: FUJITA Tomonori <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoasm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len()
FUJITA Tomonori [Wed, 26 May 2010 21:44:32 +0000 (14:44 -0700)]
asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len()

There are only two ways to define sg_dma_len(); use sg->dma_length or
sg->length.  This patch introduces NEED_SG_DMA_LENGTH that enables
architectures to choose sg->dma_length or sg->length.

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Cc: Matt Turner <[email protected]>
Cc: Russell King <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoasm-generic: remove ISA_DMA_THRESHOLD in scatterlist.h
FUJITA Tomonori [Wed, 26 May 2010 21:44:30 +0000 (14:44 -0700)]
asm-generic: remove ISA_DMA_THRESHOLD in scatterlist.h

This is the first half of the attempt to use asm-generic/scatterlist.h
on every architecture.

There are only two ways to define scatterlist structure. So it's easy
to convert every architecture to use asm-generic/scatterlist.h.

This patch:

The trick for ISA_DMA_THRESHOLD in asm-generic/scatterlist.h doesn't work
for powerpc.  This lets architectures defin ISA_DMA_THRESHOLD.

Hopefully, we can remove ISA_DMA_THRESHOLD in the future; we can do better
to decide if the bouncing is necessary or not.

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Cc: Matt Turner <[email protected]>
Cc: Russell King <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agolktdm: add support for hardlockup, softlockup and hung task crashes
Frederic Weisbecker [Wed, 26 May 2010 21:44:29 +0000 (14:44 -0700)]
lktdm: add support for hardlockup, softlockup and hung task crashes

This adds three new types of kernel "crashes" in the lkdtm driver to
trigger hardlockups, softlockups and task hung states at will.

The first two are useful to test the new generic lockup detector and check
its further regressions.  The latter one is a bonus to check the hung task
detector regressions even though it's not currently in rework.

Signed-off-by: Frederic Weisbecker <[email protected]>
Cc: Simon Kagstrom <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Cyrill Gorcunov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoinitramfs: add support for in-kernel initramfs compressed with LZO
Albin Tonnerre [Wed, 26 May 2010 21:44:28 +0000 (14:44 -0700)]
initramfs: add support for in-kernel initramfs compressed with LZO

Add the necessary parts to be enable the use of LZO-compressed initramfs
build into the kernel.

Signed-off-by: Albin Tonnerre <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Michal Marek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoradix-tree: fix radix_tree_prev_hole() underflow case
Cesar Eduardo Barros [Wed, 26 May 2010 21:44:27 +0000 (14:44 -0700)]
radix-tree: fix radix_tree_prev_hole() underflow case

radix_tree_prev_hole() used LONG_MAX to detect underflow; however,
ULONG_MAX is clearly what was intended, both here and by its only user
(count_history_pages at mm/readahead.c).

Reviewed-by: Wu Fengguang <[email protected]>
Signed-off-by: Cesar Eduardo Barros <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoaio: fix the compat vectored operations
Jeff Moyer [Wed, 26 May 2010 21:44:26 +0000 (14:44 -0700)]
aio: fix the compat vectored operations

The aio compat code was not converting the struct iovecs from 32bit to
64bit pointers, causing either EINVAL to be returned from io_getevents, or
EFAULT as the result of the I/O.  This patch passes a compat flag to
io_submit to signal that pointer conversion is necessary for a given iocb
array.

A variant of this was tested by Michael Tokarev.  I have also updated the
libaio test harness to exercise this code path with good success.
Further, I grabbed a copy of ltp and ran the
testcases/kernel/syscall/readv and writev tests there (compiled with -m32
on my 64bit system).  All seems happy, but extra eyes on this would be
welcome.

[[email protected]: coding-style fixes]
[[email protected]: fix CONFIG_COMPAT=n build]
Signed-off-by: Jeff Moyer <[email protected]>
Reported-by: Michael Tokarev <[email protected]>
Cc: Zach Brown <[email protected]>
Cc: <[email protected]> [2.6.35.1]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agocompat: factor out compat_rw_copy_check_uvector from compat_do_readv_writev
Jeff Moyer [Wed, 26 May 2010 21:44:25 +0000 (14:44 -0700)]
compat: factor out compat_rw_copy_check_uvector from compat_do_readv_writev

It was reported in http://lkml.org/lkml/2010/3/8/309 that 32 bit readv and
writev AIO operations were not functioning properly.  It turns out that
the code to convert the 32bit io vectors to 64 bits was never written.
The results of that can be pretty bad, but in my testing, it mostly ended
up in generating EFAULT as we walked off the list of I/O vectors provided.

This patch set fixes the problem in my environment.  are greatly
appreciated.

This patch:

Factor out code that will be used by both compat_do_readv_writev and the
compat aio submission code paths.

Signed-off-by: Jeff Moyer <[email protected]>
Reported-by: Michael Tokarev <[email protected]>
Cc: Zach Brown <[email protected]>
Cc: <[email protected]> [2.6.35.1]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agopanic: call console_verbose() in panic
Anton Blanchard [Wed, 26 May 2010 21:44:24 +0000 (14:44 -0700)]
panic: call console_verbose() in panic

Most distros turn the console verbosity down and that means a backtrace
after a panic never makes it to the console.  I assume we haven't seen
this because a panic is often preceeded by an oops which will have called
console_verbose.  There are however a lot of places we call panic
directly, and they are broken.

Use console_verbose like we do in the oops path to ensure a directly
called panic will print a backtrace.

Signed-off-by: Anton Blanchard <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agofs/affs: use ERR_CAST
Julia Lawall [Wed, 26 May 2010 21:44:23 +0000 (14:44 -0700)]
fs/affs: use ERR_CAST

Use ERR_CAST(x) rather than ERR_PTR(PTR_ERR(x)).  The former makes more
clear what is the purpose of the operation, which otherwise looks like a
no-op.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
type T;
T x;
identifier f;
@@

T f (...) { <+...
- ERR_PTR(PTR_ERR(x))
+ x
 ...+> }

@@
expression x;
@@

- ERR_PTR(PTR_ERR(x))
+ ERR_CAST(x)
// </smpl>

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoDocumentation/DMA-API-HOWTO: add ARCH_KMALLOC_MINALIGN description
FUJITA Tomonori [Wed, 26 May 2010 21:44:23 +0000 (14:44 -0700)]
Documentation/DMA-API-HOWTO: add ARCH_KMALLOC_MINALIGN description

Add ARCH_KMALLOC_MINALIGN description in "Platform Issues" section.

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Matt Mackall <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoDocumentation: move the error handling to the better place in DMA-API-HOWTO
FUJITA Tomonori [Wed, 26 May 2010 21:44:22 +0000 (14:44 -0700)]
Documentation: move the error handling to the better place in DMA-API-HOWTO

Handing DMA mapping errors is essential.  Let's put it in the more
appropriate place rather than the end of the doc.

Signed-off-by: FUJITA Tomonori <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoDocumentation: update scatterlist struct description in DMA-API-HOWTO
FUJITA Tomonori [Wed, 26 May 2010 21:44:21 +0000 (14:44 -0700)]
Documentation: update scatterlist struct description in DMA-API-HOWTO

Now we have <asm-generic/scatterlist.h>.  Architectures should use it
instead of inventing the own scatterlist struct.  Let's update the
description.

Signed-off-by: FUJITA Tomonori <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoDocumentation: add SCSI drivers' mapping error handling to DMA-API-HOWTO
FUJITA Tomonori [Wed, 26 May 2010 21:44:21 +0000 (14:44 -0700)]
Documentation: add SCSI drivers' mapping error handling to DMA-API-HOWTO

Add the concrete DMA mapping error handling for SCSI drivers on the
queuecommand path.

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: James Bottomley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agodma-mapping: remove deprecated dma_sync_single and dma_sync_sg API
FUJITA Tomonori [Wed, 26 May 2010 21:44:20 +0000 (14:44 -0700)]
dma-mapping: remove deprecated dma_sync_single and dma_sync_sg API

Since 2.6.5, it had been commented, 'for backwards compatibility,
removed in 2.7.x'. Since 2.6.31, it have been marked as __deprecated.

I think that we can remove the API safely now.

Signed-off-by: FUJITA Tomonori <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoStaging: saa7134-go7007: replace dma_sync_single with dma_sync_single_for_cpu
FUJITA Tomonori [Wed, 26 May 2010 21:44:20 +0000 (14:44 -0700)]
Staging: saa7134-go7007: replace dma_sync_single with dma_sync_single_for_cpu

dma_sync_single() is deprecated and will be removed soon.

No functional change since dma_sync_single is the wrapper of
dma_sync_single_for_cpu.

saa7134-go7007.c is commented out but anyway let's replace it.

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Ben Hutchings <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoDocumentation: add networking driver's mapping error handling to DMA-API-HOWTO
FUJITA Tomonori [Wed, 26 May 2010 21:44:19 +0000 (14:44 -0700)]
Documentation: add networking driver's mapping error handling to DMA-API-HOWTO

Adds the concrete DMA mapping error handling for Networking drivers on the
transmit path.

Signed-off-by: FUJITA Tomonori <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agodma-mapping: remove unnecessary sync_single_range_* in dma_map_ops
FUJITA Tomonori [Wed, 26 May 2010 21:44:18 +0000 (14:44 -0700)]
dma-mapping: remove unnecessary sync_single_range_* in dma_map_ops

sync_single_range_for_cpu and sync_single_range_for_device hooks are
unnecessary because sync_single_for_cpu and sync_single_for_device can
be used instead.

Signed-off-by: FUJITA Tomonori <[email protected]>
Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoswiotlb: remove unnecessary swiotlb_sync_single_range_*
FUJITA Tomonori [Wed, 26 May 2010 21:44:18 +0000 (14:44 -0700)]
swiotlb: remove unnecessary swiotlb_sync_single_range_*

swiotlb_sync_single_range_for_cpu and swiotlb_sync_single_range_for_device
are unnecessary because swiotlb_sync_single_for_cpu and
swiotlb_sync_single_for_device can be used instead.

Signed-off-by: FUJITA Tomonori <[email protected]>
Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agopowerpc: remove unnecessary sync_single_range_* in swiotlb_dma_ops
FUJITA Tomonori [Wed, 26 May 2010 21:44:17 +0000 (14:44 -0700)]
powerpc: remove unnecessary sync_single_range_* in swiotlb_dma_ops

sync_single_range_for_cpu and sync_single_range_for_device hooks in
swiotlb_dma_ops are unnecessary because sync_single_for_cpu and
sync_single_for_device are used there.

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Becky Bruce <[email protected]>
Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agox86: remove unnecessary sync_single_range_* in swiotlb_dma_ops
FUJITA Tomonori [Wed, 26 May 2010 21:44:16 +0000 (14:44 -0700)]
x86: remove unnecessary sync_single_range_* in swiotlb_dma_ops

sync_single_range_for_cpu and sync_single_range_for_device hooks in
swiotlb_dma_ops are unnecessary because sync_single_for_cpu and
sync_single_for_device are used there.

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoia64: remove unnecessary sync_single_range_* in swiotlb_dma_ops
FUJITA Tomonori [Wed, 26 May 2010 21:44:15 +0000 (14:44 -0700)]
ia64: remove unnecessary sync_single_range_* in swiotlb_dma_ops

sync_single_range_for_cpu and sync_single_range_for_device hooks in
swiotlb_dma_ops are unnecessary because sync_single_for_cpu and
sync_single_for_device are used there.

Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: Fenghua Yu <[email protected]>
Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agodrivers/edac: convert logging messages direct uses of __FILE__ to %s, __FILE
Joe Perches [Wed, 26 May 2010 21:44:14 +0000 (14:44 -0700)]
drivers/edac: convert logging messages direct uses of __FILE__ to %s, __FILE

Reduces text by eliminating multiple __FILE__ uses.

[[email protected]: coding-style fixes]
Signed-off-by: Joe Perches <[email protected]>
Cc: Doug Thompson <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Tim Small <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agolib/random32: export pseudo-random number generator for modules
Joe Eykholt [Wed, 26 May 2010 21:44:13 +0000 (14:44 -0700)]
lib/random32: export pseudo-random number generator for modules

This patch moves the definition of struct rnd_state and the inline
__seed() function to linux/random.h.  It renames the static __random32()
function to prandom32() and exports it for use in modules.

prandom32() is useful as a privately-seeded pseudo random number generator
that can give the same result every time it is initialized.

For FCoE FC-BB-6 VN2VN mode self-selected unique FC address generation, we
need an pseudo-random number generator seeded with the 64-bit world-wide
port name.  A truly random generator or one seeded with randomness won't
do because the same sequence of numbers should be generated each time we
boot or the link comes up.

A prandom32_seed() inline function is added to the header file.  It is
inlined not for speed, but so the function won't be expanded in the base
kernel, but only in the module that uses it.

Signed-off-by: Joe Eykholt <[email protected]>
Acked-by: Matt Mackall <[email protected]>
Cc: Theodore Ts'o <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoINIT_SIGHAND: use SIG_DFL instead of NULL
Oleg Nesterov [Wed, 26 May 2010 21:44:12 +0000 (14:44 -0700)]
INIT_SIGHAND: use SIG_DFL instead of NULL

Cosmetic, no changes in the compiled code. Just s/NULL/SIG_DFL/ to make
it more readable and grep-friendly.

Note: probably SIG_IGN makes more sense, we could kill ignore_signals().
But then kernel_init() should do flush_signal_handlers() before exec().

Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Cedric Le Goater <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Eric Biederman <[email protected]>
Cc: Herbert Poetzl <[email protected]>
Cc: Mathias Krause <[email protected]>
Acked-by: Roland McGrath <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Cc: Sukadev Bhattiprolu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agopids: fix fork_idle() to setup ->pids correctly
Oleg Nesterov [Wed, 26 May 2010 21:44:11 +0000 (14:44 -0700)]
pids: fix fork_idle() to setup ->pids correctly

copy_process(pid => &init_struct_pid) doesn't do attach_pid/etc.

It shouldn't, but this means that the idle threads run with the wrong
pids copied from the caller's task_struct. In x86 case the caller is
either kernel_init() thread or keventd.

In particular, this means that after the series of cpu_up/cpu_down an
idle thread (which never exits) can run with .pid pointing to nowhere.

Change fork_idle() to initialize idle->pids[] correctly. We only set
.pid = &init_struct_pid but do not add .node to list, INIT_TASK() does
the same for the boot-cpu idle thread (swapper).

Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Cedric Le Goater <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Eric Biederman <[email protected]>
Cc: Herbert Poetzl <[email protected]>
Cc: Mathias Krause <[email protected]>
Acked-by: Roland McGrath <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Cc: Sukadev Bhattiprolu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agopids: init_struct_pid.tasks should never see the swapper process
Oleg Nesterov [Wed, 26 May 2010 21:44:10 +0000 (14:44 -0700)]
pids: init_struct_pid.tasks should never see the swapper process

"statically initialize struct pid for swapper" commit 820e45db says:

Statically initialize a struct pid for the swapper process (pid_t == 0)
and attach it to init_task.  This is needed so task_pid(), task_pgrp()
and task_session() interfaces work on the swapper process also.

OK, but:

- it doesn't make sense to add init_task.pids[].node into
  init_struct_pid.tasks[], and in fact this just wrong.

  idle threads are special, they shouldn't be visible on any
  global list. In particular do_each_pid_task(init_struct_pid)
  shouldn't see swapper.

  This is the actual reason why kill(0, SIGKILL) from /sbin/init
  (which starts with 0,0 special pids) crashes the kernel. The
  signal sent to pgid/sid == 0 must never see idle threads, even
  if the previous patch fixed the crash itself.

- we have other idle threads running on the non-boot CPUs, see
  the next patch.

Change INIT_STRUCT_PID/INIT_PID_LINK to create the empty/unhashed
hlist_head/hlist_node. Like any other idle thread swapper can never exit,
so detach_pid()->__hlist_del() is not possible, but we could change
INIT_PID_LINK() to set pprev = &next if needed.

All we need is the valid swapper->pids[].pid == &init_struct_pid.

Reported-by: Mathias Krause <[email protected]>
Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Cedric Le Goater <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Eric Biederman <[email protected]>
Cc: Herbert Poetzl <[email protected]>
Cc: Mathias Krause <[email protected]>
Acked-by: Roland McGrath <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Cc: Sukadev Bhattiprolu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agoINIT_TASK() should initialize ->thread_group list
Oleg Nesterov [Wed, 26 May 2010 21:44:08 +0000 (14:44 -0700)]
INIT_TASK() should initialize ->thread_group list

The trivial /sbin/init doing

int main(void)
{
kill(0, SIGKILL)
}

crashes the kernel.

This happens because __kill_pgrp_info(init_struct_pid) also sends SIGKILL
to the swapper process which runs with the uninitialized ->thread_group.

Change INIT_TASK() to initialize ->thread_group properly.

Note: the real problem is that the swapper process must not be visible to
signals, see the next patch. But this change is right anyway and fixes
the crash.

Reported-and-tested-by: Mathias Krause <[email protected]>
Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Cedric Le Goater <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Eric Biederman <[email protected]>
Cc: Herbert Poetzl <[email protected]>
Cc: Mathias Krause <[email protected]>
Acked-by: Roland McGrath <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Acked-by: Sukadev Bhattiprolu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agopids: increase pid_max based on num_possible_cpus
Hedi Berriche [Wed, 26 May 2010 21:44:06 +0000 (14:44 -0700)]
pids: increase pid_max based on num_possible_cpus

On a system with a substantial number of processors, the early default
pid_max of 32k will not be enough.  A system with 1664 CPU's, there are
25163 processes started before the login prompt.  It's estimated that with
2048 CPU's we will pass the 32k limit.  With 4096, we'll reach that limit
very early during the boot cycle, and processes would stall waiting for an
available pid.

This patch increases the early maximum number of pids available, and
increases the minimum number of pids that can be set during runtime.

[[email protected]: fix warnings]
Signed-off-by: Hedi Berriche <[email protected]>
Signed-off-by: Mike Travis <[email protected]>
Signed-off-by: Robin Holt <[email protected]>
Acked-by: Linus Torvalds <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Pavel Machek <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: John Stoffel <[email protected]>
Cc: Jack Steiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agorapidio: fix maintenance access to higher memory areas
Thomas Moll [Wed, 26 May 2010 21:44:05 +0000 (14:44 -0700)]
rapidio: fix maintenance access to higher memory areas

Fix the maintenance access functions to farend RapidIO devices.
1. Fixed shift of the given offset, to open the maintenance window
2. Mask offset to limit access to the opened maintenance window
3. Added extended destid part to rowtear register, required for 16bit mode

This method is matching maintenance transactions generation described
by Freescale in the appnote AN2932. With this modification full access
to a 16MB maintenance window is possible, this patch is required for
IDT cps switches. For easier handling of the access routines, the
access was limited to aligned memory regions. This should be no problem
because all registers are 32bit wide.

Signed-off-by: Thomas Moll <[email protected]>
Tested-by: Alexandre Bounine <[email protected]>
Cc: Matt Porter <[email protected]>
Cc: Li Yang <[email protected]>
Cc: Kumar Gala <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
14 years agorapidio: use default route value for CPS switches
Alexandre Bounine [Wed, 26 May 2010 21:44:05 +0000 (14:44 -0700)]
rapidio: use default route value for CPS switches

Fix to use correct default value for routing table entries.

Signed-off-by: Alexandre Bounine <[email protected]>
Cc: Matt Porter <[email protected]>
Cc: Li Yang <[email protected]>
Cc: Kumar Gala <[email protected]>
Cc: Thomas Moll <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This page took 0.117874 seconds and 4 git commands to generate.