safe/jmp/linux-2.6
15 years agofix modules_install via NFS
Sam Ravnborg [Wed, 7 Jan 2009 19:52:43 +0000 (20:52 +0100)]
fix modules_install via NFS

Rafael reported:

I get the following error from 'make modules_install' on my test boxes:

  HOSTCC  firmware/ihex2fw
/home/rafael/src/linux-2.6/firmware/ihex2fw.c:268: fatal error: opening dependency file firmware/.ihex2fw.d: Read-only file system
compilation terminated.
make[3]: *** [firmware/ihex2fw] Error 1
make[2]: *** [_modinst_post] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2

where the configuration is that the kernel is compiled on a build box
with 'make O=<destdir> -j5' and then <destdir> is mounted over NFS read-only by
each test box (full path to this directory is the same on the build box and on
the test boxes).  Then, I cd into <destdir>, run 'make modules_install' and get
the error above.

The issue turns out to be that we when we install firmware pick
up the list of firmware blobs from firmware/Makefile.
And this triggers the Makefile rules to update ihex2fw.

There were two solutions for this issue:
1) Move the list of firmware blobs to a separate file
2) Avoid ihex2fw rebuild by moving it to scripts

As I seriously beleive that the list of firmware blobs should be
done in a fundamental different way solution 2) was selected.

Reported-and-tested-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David Woodhouse <dwmw2@infradead.org>
15 years agoqnx: include <linux/types.h> for definitions of __[us]{8,16,32,64} types
Anders Larsen [Thu, 1 Jan 2009 16:17:35 +0000 (17:17 +0100)]
qnx: include <linux/types.h> for definitions of __[us]{8,16,32,64} types

On 2008-12-30 11:32:33, Sam Ravnborg wrote:
> We have added a few additional validation checks of the userspace headers:
...
> 3) We should include <linux/types.h> and not <asm/types.h>
> 4) If we use a __[us]{8,16,32,64} type then we must include <linux/types.h>

Satisfy these requirements for the linux/qnx*.h headers.

Signed-off-by: Anders Larsen <al@alarsen.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agoFix up 64-bit byte swaps for most 32-bit architectures
Linus Torvalds [Wed, 7 Jan 2009 05:17:57 +0000 (21:17 -0800)]
Fix up 64-bit byte swaps for most 32-bit architectures

The __SWAB_64_THRU_32__ case of a 64-bit byte swap was depending on the
no-longer-existant ___swab32() method (three underscores).  We got rid
of some of the worst indirection and complexity, and now it should just
use the 32-bit swab function that was defined right above it.

Reported-and-tested-by: Nicolas Pitre <nico@cam.org>
Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agobyteorder: remove the now unused byteorder.h
Harvey Harrison [Tue, 6 Jan 2009 21:30:58 +0000 (13:30 -0800)]
byteorder: remove the now unused byteorder.h

This implementation caused problems in userspace which can, and does
define _both_ __LITTLE_ENDIAN and __BIG_ENDIAN.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomn10300: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:34 +0000 (14:56 -0800)]
mn10300: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofrv: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:33 +0000 (14:56 -0800)]
frv: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agom32r: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:33 +0000 (14:56 -0800)]
m32r: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agom68knommu: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:32 +0000 (14:56 -0800)]
m68knommu: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoh8300: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:31 +0000 (14:56 -0800)]
h8300: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoia64: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:31 +0000 (14:56 -0800)]
ia64: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblackfin: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:30 +0000 (14:56 -0800)]
blackfin: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoarm: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:30 +0000 (14:56 -0800)]
arm: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoalpha: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:29 +0000 (14:56 -0800)]
alpha: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agom68k: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:28 +0000 (14:56 -0800)]
m68k: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agox86: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:28 +0000 (14:56 -0800)]
x86: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosparc: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:27 +0000 (14:56 -0800)]
sparc: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosh: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:25 +0000 (14:56 -0800)]
sh: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agos390: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:24 +0000 (14:56 -0800)]
s390: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopowerpc: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:23 +0000 (14:56 -0800)]
powerpc: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomips: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:23 +0000 (14:56 -0800)]
mips: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoavr32: introduce asm/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:22 +0000 (14:56 -0800)]
avr32: introduce asm/swab.h

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agobyteorder: only use linux/swab.h
Harvey Harrison [Tue, 6 Jan 2009 22:56:21 +0000 (14:56 -0800)]
byteorder: only use linux/swab.h

The first step to make swab.h a regular header that will
include an asm/swab.h with arch overrides.

Avoid the gratuitous differences introduced in the new
linux/swab.h by naming the ___constant_swabXX bits and
__fswabXX bits exactly as found in the old implementation
in byteorder/swab[b].h

Use this new swab.h in byteorder/[big|little]_endian.h and
remove the two old swab headers.

Although the inclusion of asm/byteorder.h looks strange in
linux/swab.h, this will allow each arch to move the actual
arch overrides for the swab bits in an asm file and then
the includes can be cleaned up without requiring a flag day
for all arches at once.

Keep providing __fswabXX in case some userspace was using them
directly, but the revised __swabXX should be used instead in
any new code and will always do constant folding not dependent
on the optimization level, which means the __constant versions
can be phased out in-kernel.

Arches that use the old-style arch macros will lose their
optimized versions until they move to the new style, but at
least they will still compile.  Many arches have already moved
and the patches to move the remaining arches are trivial.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Wed, 7 Jan 2009 02:06:44 +0000 (18:06 -0800)]
Merge branch 'drm-next' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm: fix ordering of driver unload vs agp unload.
  drm/i915: Respect the other stolen memory sizes we know of.
  drm/i915: Non-mobile parts don't have integrated TV-out.
  drm/i915: Add support for integrated HDMI on G4X hardware.
  drm/i915: Pin cursor bo and unpin old bo when setting cursor.
  drm/i915: Don't allow objects to get bound while VT switched.

15 years agodrm: fix ordering of driver unload vs agp unload.
Dave Airlie [Wed, 7 Jan 2009 01:54:57 +0000 (11:54 +1000)]
drm: fix ordering of driver unload vs agp unload.

For KMS drivers, we really need to cleanup the driver before disabling
the AGP subsystem.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/i915: Respect the other stolen memory sizes we know of.
Eric Anholt [Sat, 3 Jan 2009 02:05:51 +0000 (18:05 -0800)]
drm/i915: Respect the other stolen memory sizes we know of.

fd.o bug #19336.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/i915: Non-mobile parts don't have integrated TV-out.
Eric Anholt [Fri, 2 Jan 2009 23:57:35 +0000 (15:57 -0800)]
drm/i915: Non-mobile parts don't have integrated TV-out.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/i915: Add support for integrated HDMI on G4X hardware.
Eric Anholt [Fri, 2 Jan 2009 21:33:00 +0000 (13:33 -0800)]
drm/i915: Add support for integrated HDMI on G4X hardware.

This is ported directly from the userland 2D driver code.  The HDMI audio bits
aren't hooked up yet.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/i915: Pin cursor bo and unpin old bo when setting cursor.
Kristian Høgsberg [Thu, 18 Dec 2008 03:14:59 +0000 (22:14 -0500)]
drm/i915: Pin cursor bo and unpin old bo when setting cursor.

We also didn't track the cursor bo before and would leak a reference
when the cursor image was change.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/i915: Don't allow objects to get bound while VT switched.
Eric Anholt [Wed, 24 Dec 2008 02:42:32 +0000 (18:42 -0800)]
drm/i915: Don't allow objects to get bound while VT switched.

This avoids a BUG_ON in the enter_vt path due to objects being in the GTT
when we shouldn't have ever let them be (as we're not supposed to touch the
device during that time).

This was triggered by a change in the 2D driver to use the GTT mapping of
objects after pinning them to improve software fallback performance.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Wed, 7 Jan 2009 01:14:01 +0000 (17:14 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (29 commits)
  Input: i8042 - add Dell Vostro 1510 to nomux list
  Input: gtco - use USB endpoint API
  Input: add support for Maple controller as a joystick
  Input: atkbd - broaden the Dell DMI signatures
  Input: HIL drivers - add MODULE_ALIAS()
  Input: map_to_7segment.h - convert to __inline__ for userspace
  Input: add support for enhanced rotary controller on pxa930 and pxa935
  Input: add support for trackball on pxa930 and pxa935
  Input: add da9034 touchscreen support
  Input: ads7846 - strict_strtoul takes unsigned long
  Input: make some variables and functions static
  Input: add tsc2007 based touchscreen driver
  Input: psmouse - add module parameters to control OLPC touchpad delays
  Input: i8042 - add Gigabyte M912 netbook to noloop exception table
  Input: atkbd - Samsung NC10 key repeat fix
  Input: atkbd - add keyboard quirk for HP Pavilion ZV6100 laptop
  Input: libps2 - handle 0xfc responses from devices
  Input: add support for Wacom W8001 penabled serial touchscreen
  Input: synaptics - report multi-taps only if supported by the device
  Input: add joystick driver for Walkera WK-0701 RC transmitter
  ...

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Wed, 7 Jan 2009 01:11:39 +0000 (17:11 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  CRED: Fix regression in cap_capable() as shown up by sys_faccessat() [ver #3]
  Revert "CRED: Fix regression in cap_capable() as shown up by sys_faccessat() [ver #2]"
  SELinux: shrink sizeof av_inhert selinux_class_perm and context
  CRED: Fix regression in cap_capable() as shown up by sys_faccessat() [ver #2]
  keys: fix sparse warning by adding __user annotation to cast
  smack: Add support for unlabeled network hosts and networks
  selinux: Deprecate and schedule the removal of the the compat_net functionality
  netlabel: Update kernel configuration API

15 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 7 Jan 2009 01:10:53 +0000 (17:10 -0800)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  hrtimer: splitout peek ahead functionality, fix
  hrtimer: fixup comments
  hrtimer: fix recursion deadlock by re-introducing the softirq
  hrtimer: simplify hotplug migration
  hrtimer: fix HOTPLUG_CPU=n compile warning
  hrtimer: splitout peek ahead functionality

15 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 7 Jan 2009 01:10:33 +0000 (17:10 -0800)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: fix section mismatch
  sched: fix double kfree in failure path
  sched: clean up arch_reinit_sched_domains()
  sched: mark sched_create_sysfs_power_savings_entries() as __init
  getrusage: RUSAGE_THREAD should return ru_utime and ru_stime
  sched: fix sched_slice()
  sched_clock: prevent scd->clock from moving backwards, take #2
  sched: sched.c declare variables before they get used

15 years agoMerge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 7 Jan 2009 01:10:19 +0000 (17:10 -0800)]
Merge branch 'irq-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq: provide irq_to_desc() to non-genirq architectures too

15 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 7 Jan 2009 01:10:04 +0000 (17:10 -0800)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  rcu: fix rcutorture bug
  rcu: eliminate synchronize_rcu_xxx macro
  rcu: make treercu safe for suspend and resume
  rcu: fix rcutree grace-period-latency bug on small systems
  futex: catch certain assymetric (get|put)_futex_key calls
  futex: make futex_(get|put)_key() calls symmetric
  locking, percpu counters: introduce separate lock classes
  swiotlb: clean up EXPORT_SYMBOL usage
  swiotlb: remove unnecessary declaration
  swiotlb: replace architecture-specific swiotlb.h with linux/swiotlb.h
  swiotlb: add support for systems with highmem
  swiotlb: store phys address in io_tlb_orig_addr array
  swiotlb: add hwdev to swiotlb_phys_to_bus() / swiotlb_sg_to_bus()

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Wed, 7 Jan 2009 01:09:51 +0000 (17:09 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: Fix SND_SOC_ALL_CODECS handling of dual SPI and I2C control buses
  ASoC: Use snd_soc_dapm_nc_pin() in at91sam9g20ek
  ASoC: TWL4030: Convert the bitfield enums to VALUE_ENUM type
  ASoC: New enum type: value_enum
  pxa2xx-ac97: switch AC unit to correct state before probing
  ASoC: Clocking fixes for davinci-evm.c
  ASoC: Mark non-connected TWL4030 pins for pandora
  ASoC: OMAP: Select OMAP pin multiplexing when using Nokia N810 ASoC drivers

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Wed, 7 Jan 2009 01:04:29 +0000 (17:04 -0800)]
Merge git://git./linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (237 commits)
  Staging: android: binder: fix build errors
  Staging: android: add lowmemorykiller driver
  Staging: android: remove dummy android.c driver
  Staging: android: timed_gpio: Rename android_timed_gpio to timed_gpio
  Staging: android: add timed_gpio driver
  Staging: android: add ram_console driver
  Staging: android: add logging driver
  staging: android: binder: Fix use of euid
  Staging: android: binder: Fix gcc warnings about improper format specifiers for size_t in printk
  Staging: android: add binder driver
  Staging: add android framework
  Staging: epl: fix netdev->priv b0rkage
  Staging: epl: hr timers all run in hard irq context now
  Staging: epl: run Lindent on *.c files
  Staging: epl: run Lindent on *.h files
  Staging: epl: run Lindent on all user/*.h files
  Staging: epl: run Lindent on all kernel/*.h files
  Staging: add epl stack
  Staging: frontier: fix compiler warnings
  Staging: frontier: remove unused alphatrack_sysfs.c file
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Wed, 7 Jan 2009 01:02:07 +0000 (17:02 -0800)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (60 commits)
  uio: make uio_info's name and version const
  UIO: Documentation for UIO ioport info handling
  UIO: Pass information about ioports to userspace (V2)
  UIO: uio_pdrv_genirq: allow custom irq_flags
  UIO: use pci_ioremap_bar() in drivers/uio
  arm: struct device - replace bus_id with dev_name(), dev_set_name()
  libata: struct device - replace bus_id with dev_name(), dev_set_name()
  avr: struct device - replace bus_id with dev_name(), dev_set_name()
  block: struct device - replace bus_id with dev_name(), dev_set_name()
  chris: struct device - replace bus_id with dev_name(), dev_set_name()
  dmi: struct device - replace bus_id with dev_name(), dev_set_name()
  gadget: struct device - replace bus_id with dev_name(), dev_set_name()
  gpio: struct device - replace bus_id with dev_name(), dev_set_name()
  gpu: struct device - replace bus_id with dev_name(), dev_set_name()
  hwmon: struct device - replace bus_id with dev_name(), dev_set_name()
  i2o: struct device - replace bus_id with dev_name(), dev_set_name()
  IA64: struct device - replace bus_id with dev_name(), dev_set_name()
  i7300_idle: struct device - replace bus_id with dev_name(), dev_set_name()
  infiniband: struct device - replace bus_id with dev_name(), dev_set_name()
  ISDN: struct device - replace bus_id with dev_name(), dev_set_name()
  ...

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
Linus Torvalds [Wed, 7 Jan 2009 01:01:20 +0000 (17:01 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mszeredi/fuse

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  fuse: clean up annotations of fc->lock
  fuse: fix sparse warning in ioctl
  fuse: update interface version
  fuse: add fuse_conn->release()
  fuse: separate out fuse_conn_init() from new_conn()
  fuse: add fuse_ prefix to several functions
  fuse: implement poll support
  fuse: implement unsolicited notification
  fuse: add file kernel handle
  fuse: implement ioctl support
  fuse: don't let fuse_req->end() put the base reference
  fuse: move FUSE_MINOR to miscdevice.h
  fuse: style fixes

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Wed, 7 Jan 2009 01:00:50 +0000 (17:00 -0800)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (41 commits)
  scc_pata: make use of scc_dma_sff_read_status()
  ide-dma-sff: factor out ide_dma_sff_write_status()
  ide: move read_sff_dma_status() method to 'struct ide_dma_ops'
  ide: don't set hwif->dma_ops in init_dma() method
  Resurrect IT8172 IDE controller driver
  piix: sync ich_laptop[] with ata_piix.c
  ide: update warm-plug HOWTO
  ide: fix ide_port_scan() to do ACPI setup after initializing request queues
  ide: remove now redundant ->cur_dev checks
  ide: remove unused ide_hwif_t.sg_mapped field
  ide: struct ide_atapi_pc - remove unused fields and update documentation
  ide: remove superfluous hwif variable assignment from ide_timer_expiry()
  ide: use ide_pci_is_in_compatibility_mode() helper in setup-pci.c
  ide: make "paranoia" ->handler check in ide_intr() more strict
  ide-cd: convert to ide-atapi facilities
  ide-cd: start DMA before sending the actual packet command
  ide-cd: wait for DRQ to get set per default
  ide: Fix drive's DWORD-IO handling
  ide: add port and host iterators
  ide: dynamic allocation of device structures
  ...

15 years agoparport: ieee1284: use del_timer_sync() in parport_wait_event()
Michael Buesch [Tue, 6 Jan 2009 22:43:14 +0000 (14:43 -0800)]
parport: ieee1284: use del_timer_sync() in parport_wait_event()

Use del_timer_sync() instead of del_timer() to make sure the timer won't
be running when we return from parport_wait_event(), because this would
crash due to destruction of timer_list.

This is untested and just based on a code review.  Just think about the
following sequence of events:

- add_timer()

- down_interruptible() is interrupted by a signal.

- we enter the timer callback handler on another CPU.

- del_timer(), but the timer callback is still running.

- eturn from parport_wait_even, which destroys the automatic variable
  "timer" while the callback is running on another CPU.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agobfs: check that filesystem fits on the blockdevice
Eric Sesterhenn [Tue, 6 Jan 2009 22:43:13 +0000 (14:43 -0800)]
bfs: check that filesystem fits on the blockdevice

Since all sanity checks rely on the validity of s_start which gets only
checked to be smaller than s_end, we should also check if s_end is sane.
Now we also try to retrieve the last block of the filesystem, which is
computed by s_end.  If this fails, something is bogus.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agobfs: add some basic sanity checks
Eric Sesterhenn [Tue, 6 Jan 2009 22:43:12 +0000 (14:43 -0800)]
bfs: add some basic sanity checks

bfs_fill_super() already touches all inodes, so we can easily add some
cheap sanity checks and check if the inode start and end blocks are
smaller than the maximum number of blocks, the inode start block lies
behind the end block or the file end offset is behind the end of the
filesystem.  Also check if the start of data offset in the super block
fits the filesystem.

The added sanity checks catch softlockup issues early when we try to
sb_bread() lots of blocks in a loop in bfs_readdir() and bfs_find_entry().
 In addition an oom issue in bfs_fill_super() is prevented by this when
s_start is corrupted, which influences imap_len and we try to allocate a
huge info->si_imap.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodma-coherent: catch oversized requests to dma_alloc_from_coherent()
Johannes Weiner [Tue, 6 Jan 2009 22:43:10 +0000 (14:43 -0800)]
dma-coherent: catch oversized requests to dma_alloc_from_coherent()

Prevent passing an order to bitmap_find_free_region() that is larger than
the actual bitmap can represent.

These requests can come from device drivers that have no idea how big the
dma region is and need to rely on dma_alloc_from_coherent() to sort it out
for them.

Reported-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodma_alloc_coherent: clean it up
Andrew Morton [Tue, 6 Jan 2009 22:43:09 +0000 (14:43 -0800)]
dma_alloc_coherent: clean it up

This thing was rather stupidly coded.  Rework it all prior to making
changes.

Also, rename local variable `page': kernel readers expect something called
`page' to have type `struct page *'.

Cc: Guennadi Liakhovetski <lg@denx.de>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodma_alloc_from_coherent(): fix fallback to generic memory
Andrew Morton [Tue, 6 Jan 2009 22:43:08 +0000 (14:43 -0800)]
dma_alloc_from_coherent(): fix fallback to generic memory

If bitmap_find_free_region() fails and DMA_MEMORY_EXCLUSIVE is not set,
the function will fail to write anything to *ret and will return 1.             This will cause dma_alloc_coherent() to return an uninitialised value,
crashing the kernel, perhaps via DMA to a random address.

Fix that by changing it to return zero in this case, so the caller will
proceed to allocate the memory from the generic memory allocator.

Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoedac: driver for i5400 MCH (update)
Mauro Carvalho Chehab [Tue, 6 Jan 2009 22:43:00 +0000 (14:43 -0800)]
edac: driver for i5400 MCH (update)

Signed-off-by: Ben Woodard <woodard@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Doug Thompson <norsk5@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoedac: driver for i5400 MCH (Seaburg)
Mauro Carvalho Chehab [Tue, 6 Jan 2009 22:43:00 +0000 (14:43 -0800)]
edac: driver for i5400 MCH (Seaburg)

EDAC driver for i5400 MCH (Seaburg)

This driver adds support for i5400 MCH chipset.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Ben Woodard <woodard@redhat.com>
Cc: Doug Thompson <norsk5@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoedac: fix mpc85xx and add mpc8536 mpc8560
Kumar Gala [Tue, 6 Jan 2009 22:42:59 +0000 (14:42 -0800)]
edac: fix mpc85xx and add mpc8536 mpc8560

All other compatibles that are uniquely identifying the processor use a
prefix of the form fsl,mpc85...'.  We add support for it so we can
deprecate the older 'fsl,85...' that was improperly used here.

Additionally added mpc8536 & mpc8560 to the compatible lists.

This patch is based on Nate's 8572 patch.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Acked-by: Dave Jiang <djiang@mvista.com>
Cc: Nate Case <ncase@xes-inc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoedac: struct device: replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 22:42:57 +0000 (14:42 -0800)]
edac: struct device: replace bus_id with dev_name(), dev_set_name()

This patch is part of a larger patch series which will remove the "char
bus_id[20]" name string from struct device.  The device name is managed in
the kobject anyway, and without any size limitation, and just needlessly
copied into "struct device".

[akpm@linux-foundation.org: coding-style fixes]
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopci: use pci_ioremap_bar() in drivers/edac
Arjan van de Ven [Tue, 6 Jan 2009 22:42:56 +0000 (14:42 -0800)]
pci: use pci_ioremap_bar() in drivers/edac

Use the newly introduced pci_ioremap_bar() function in drivers/edac.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agorandom: don't try to look at entropy_count outside the lock
Matt Mackall [Tue, 6 Jan 2009 22:42:55 +0000 (14:42 -0800)]
random: don't try to look at entropy_count outside the lock

As a non-atomic value, it's only safe to look at entropy_count when the
pool lock is held, so we move the BUG_ON inside the lock for correctness.

Also remove the spurious comment.  It's ok for entropy_count to
temporarily exceed POOLBITS so long as it's left in a consistent state
when the lock is released.

This is a more correct, simple, and idiomatic fix for the bug in
8b76f46a2db.  I've left the reorderings introduced by that patch in place
as they're harmless, even though they don't properly deal with potential
atomicity issues.

Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoconsolemap: indentation & braces disagree - reindent
Ilpo Järvinen [Tue, 6 Jan 2009 22:42:54 +0000 (14:42 -0800)]
consolemap: indentation & braces disagree - reindent

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomake firmware/dsp56k/bootstrap.asm buildable on a56
Robert Millan [Tue, 6 Jan 2009 22:42:52 +0000 (14:42 -0800)]
make firmware/dsp56k/bootstrap.asm buildable on a56

Make firmware/dsp56k/bootstrap.asm buildable on a56, the free Motorola
DSP56001 assembler (http://www.zdomain.com/a56.html).

Summary of changes:

  - Remove '<' and '>' candy (they specify explicit addressing modes,
    which a56 don't grok, but uses implicitly anyway).

  - Replace 'move' with 'movem' when accessing program memory.

  - Rename a few labels to avoid duplicates (which a56 can't handle).

Signed-off-by: Robert Millan <rmh@aybabtu.com>
Cc: Jaswinder Singh <jaswinder@infradead.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoipc/ipc_sysctl.c: move the definition of ipc_auto_callback()
akpm@linux-foundation.org [Tue, 6 Jan 2009 22:42:51 +0000 (14:42 -0800)]
ipc/ipc_sysctl.c: move the definition of ipc_auto_callback()

proc_ipcauto_dointvec_minmax() is the only user of ipc_auto_callback(),
since the former function is protected by CONFIG_PROC_FS, so should be the
latter one.

Just move its definition down.

Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: Eric Biederman <ebiederm@xmision.com>
Cc: Nadia Derbey <Nadia.Derbey@bull.net>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoipc: do not goto to the next line
Denis V. Lunev [Tue, 6 Jan 2009 22:42:50 +0000 (14:42 -0800)]
ipc: do not goto to the next line

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: WANG Cong <wangcong@zeuux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoipc: clean up ipc/shm.c
WANG Cong [Tue, 6 Jan 2009 22:42:49 +0000 (14:42 -0800)]
ipc: clean up ipc/shm.c

Use the macro shm_ids().

Remove useless check for a userspace pointer, because copy_to_user()
will check it.

Some style cleanups.

Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: Nadia Derbey <Nadia.Derbey@bull.net>
Cc: Pierre Peiffer <peifferp@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofs/exec.c: make do_coredump() void
WANG Cong [Tue, 6 Jan 2009 22:42:48 +0000 (14:42 -0800)]
fs/exec.c: make do_coredump() void

No one cares do_coredump()'s return value, and also it seems that it
is also not necessary. So make it void.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocoredump_filter: permit changing of the default filter
Hidehiro Kawai [Tue, 6 Jan 2009 22:42:47 +0000 (14:42 -0800)]
coredump_filter: permit changing of the default filter

Introduce a new kernel parameter `coredump_filter'.  Setting a value to
this parameter causes the default bitmask of coredump_filter to be
changed.

It is useful for users to change coredump_filter settings for the whole
system at boot time.  Without this parameter, users have to change
coredump_filter settings for each /proc/<pid>/ in an initializing script.

Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoSEND_SIG_NOINFO: set si_pid to tgid instead of pid
Sukadev Bhattiprolu [Tue, 6 Jan 2009 22:42:46 +0000 (14:42 -0800)]
SEND_SIG_NOINFO: set si_pid to tgid instead of pid

POSIX requires the si_pid to be the process id of the sender, so ->si_pid
should really be set to 'tgid'.  This change does have following changes
in behavior:

- When sending pdeath_signal on re-parent to a sub-thread, ->si_pid
  cannot be used to identify the thread that did the re-parent since
  it will now show the tgid instead of thread id.

- A multi-threaded application that expects to find the specific
  thread that encountered a SIGPIPE using the ->si_pid will now
  break.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-By: Roland McGrath <roland@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoSEND_SIG_NOINFO: masquerade si_pid when crossing pid-ns boundary
Sukadev Bhattiprolu [Tue, 6 Jan 2009 22:42:45 +0000 (14:42 -0800)]
SEND_SIG_NOINFO: masquerade si_pid when crossing pid-ns boundary

For SEND_SIG_NOINFO, si_pid is currently set to the pid of sender
in sender's active pid namespace. But if the receiver is in a
Eg: when parent sends the 'pdeath_signal' to a child that is in
a descendant pid namespace, we should set si_pid 0.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-By: Roland McGrath <roland@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodoc: reformat some long lines in kernel-parameters.txt
Randy Dunlap [Tue, 6 Jan 2009 22:42:44 +0000 (14:42 -0800)]
doc: reformat some long lines in kernel-parameters.txt

Reformat text to (mostly) stay within 80 columns of text.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodocs: add more early params to kernel-parameters.txt
Randy Dunlap [Tue, 6 Jan 2009 22:42:44 +0000 (14:42 -0800)]
docs: add more early params to kernel-parameters.txt

Add some (more) early_param boot options to kernel-parameters.txt.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodocumentation: how to use DOC: section blocks
Randy Dunlap [Tue, 6 Jan 2009 22:42:43 +0000 (14:42 -0800)]
documentation: how to use DOC: section blocks

Add info on how to use DOC: sections in kernel-doc.  DOC: sections enable
the addition of inline source file comments that are general in nature
instead of being specific to a function, struct, union, enum, or typedef.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodocumentation: update s390 header file paths
Randy Dunlap [Tue, 6 Jan 2009 22:42:42 +0000 (14:42 -0800)]
documentation: update s390 header file paths

Update Documentation/s390/ files to reflect changed header files
locations.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodocumentation: update header file paths
Randy Dunlap [Tue, 6 Jan 2009 22:42:41 +0000 (14:42 -0800)]
documentation: update header file paths

Update several Documentation/ files and a few sub-dir files (only one
change in each) to reflect changed header files locations.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agorapidio: remove excess kernel-doc notation
Randy Dunlap [Tue, 6 Jan 2009 22:42:41 +0000 (14:42 -0800)]
rapidio: remove excess kernel-doc notation

Remove excess kernel-doc notation from rio header and driver:

Warning(include/linux/rio_drv.h:399): Excess function parameter or struct member 'buffer' description in 'rio_get_inb_message'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodocs: document how to write @varargs in kernel-doc
Randy Dunlap [Tue, 6 Jan 2009 22:42:40 +0000 (14:42 -0800)]
docs: document how to write @varargs in kernel-doc

Add documentation on how to use kernel-doc for function parameters
that are "..." (varargs).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokmod: fix varargs kernel-doc
Randy Dunlap [Tue, 6 Jan 2009 22:42:39 +0000 (14:42 -0800)]
kmod: fix varargs kernel-doc

Fix varargs kernel-doc format in kmod.c:
Use @... instead of @varargs.

Warning(kernel/kmod.c:67): Excess function parameter or struct member 'varargs' description in 'request_module'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agominix: fix add link's wrong position calculation
Evgeniy Dushistov [Tue, 6 Jan 2009 22:42:38 +0000 (14:42 -0800)]
minix: fix add link's wrong position calculation

Fix the add link method.  The oosition in the directory was calculated in
wrong way - it had the incorrect shift direction.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: <stable@kernel.org> [2.6.lots]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofbdev/logo: check compatibility of main and extra logos
Geert Uytterhoeven [Tue, 6 Jan 2009 22:42:37 +0000 (14:42 -0800)]
fbdev/logo: check compatibility of main and extra logos

The code to draw penguin logos always uses some properties of the main logo.
This is incorrect if additional logos (CONFIG_FB_LOGO_EXTRA=y) have different
types than the main logo, which causes corrupted logo images.

  http://bugzilla.kernel.org/show_bug.cgi?id=12181

Hence skip additional logos that are not compatible with the main logo.

Technically, it's possible to draw multiple logos of different types on
truecolor displays, but this would complicate the (already quite
complicated) logo drawing code even more.

This patch fixes a problem with Debian's linux-image-2.6.26-1-powerpc64
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508173

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosm501: unsigned ptr cannot be negative
roel kluin [Tue, 6 Jan 2009 22:42:36 +0000 (14:42 -0800)]
sm501: unsigned ptr cannot be negative

unsigned ptr cannot be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agointelfb: fix sparse warnings
Hannes Eder [Tue, 6 Jan 2009 22:42:35 +0000 (14:42 -0800)]
intelfb: fix sparse warnings

Fix this sparse warnings:

  drivers/video/intelfb/intelfbdrv.c:1497:3: warning: returning void-valued expression
  drivers/video/intelfb/intelfbdrv.c:1525:3: warning: returning void-valued expression
  drivers/video/intelfb/intelfbdrv.c:1544:3: warning: returning void-valued expression
  drivers/video/intelfb/intelfbdrv.c:1558:3: warning: returning void-valued expression

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoi810: fix sparse warnings
Hannes Eder [Tue, 6 Jan 2009 22:42:34 +0000 (14:42 -0800)]
i810: fix sparse warnings

Fix this sparse warnings:

  drivers/video/i810/i810_accel.c:305:3: warning: returning void-valued expression
  drivers/video/i810/i810_accel.c:331:3: warning: returning void-valued expression
  drivers/video/i810/i810_accel.c:370:3: warning: returning void-valued expression

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoneofb: fix sparse warnings
Hannes Eder [Tue, 6 Jan 2009 22:42:34 +0000 (14:42 -0800)]
neofb: fix sparse warnings

Fix this sparse warnings:

  drivers/video/neofb.c:1456:4: warning: returning void-valued expression
  drivers/video/neofb.c:1464:3: warning: returning void-valued expression

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopm3fb: fix sparse warning
Hannes Eder [Tue, 6 Jan 2009 22:42:33 +0000 (14:42 -0800)]
pm3fb: fix sparse warning

Fix this sparse warning:

  drivers/video/pm3fb.c:543:3: warning: returning void-valued expression

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoviafb: fix sparse warnings
Hannes Eder [Tue, 6 Jan 2009 22:42:32 +0000 (14:42 -0800)]
viafb: fix sparse warnings

Fix this sparse warnings:

  drivers/video/via/viafbdev.c:871:3: warning: returning void-valued expression
  drivers/video/via/viafbdev.c:938:3: warning: returning void-valued expression
  drivers/video/via/viafbdev.c:995:3: warning: returning void-valued expression

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agonvidia: fix sparse warnings
Hannes Eder [Tue, 6 Jan 2009 22:42:32 +0000 (14:42 -0800)]
nvidia: fix sparse warnings

Fix this sparse warnings:

  drivers/video/nvidia/nv_accel.c:304:3: warning: returning void-valued expression
  drivers/video/nvidia/nv_accel.c:323:3: warning: returning void-valued expression

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agogbefb: unsigned var->pixclock cannot be less than 0
roel kluin [Tue, 6 Jan 2009 22:42:31 +0000 (14:42 -0800)]
gbefb: unsigned var->pixclock cannot be less than 0

unsigned var->pixclock cannot be less than 0

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofb: carminefb: trivial annotation packing color register
Harvey Harrison [Tue, 6 Jan 2009 22:42:30 +0000 (14:42 -0800)]
fb: carminefb: trivial annotation packing color register

drivers/video/carminefb.c:171:41: warning: cast to restricted __be32

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblackfin: remove __FUNCTION__ in video driver
Harvey Harrison [Tue, 6 Jan 2009 22:42:30 +0000 (14:42 -0800)]
blackfin: remove __FUNCTION__ in video driver

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofbdev: fix typo in drivers/video/modedb.c
Jiri Moravec [Tue, 6 Jan 2009 22:42:29 +0000 (14:42 -0800)]
fbdev: fix typo in drivers/video/modedb.c

When I viewed drivers/video/modedb.c, I noticed a very old typo already
contained in 2.6.0.

This typo remained unheeded at least 5 years.  Clear evidence of its
importance.  ;)

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopci: use pci_ioremap_bar() in drivers/video
Arjan van de Ven [Tue, 6 Jan 2009 22:42:28 +0000 (14:42 -0800)]
pci: use pci_ioremap_bar() in drivers/video

Use the newly introduced pci_ioremap_bar() function in drivers/video.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agogpio: pca953x handles more chips, i2c fault codes
David Brownell [Tue, 6 Jan 2009 22:42:27 +0000 (14:42 -0800)]
gpio: pca953x handles more chips, i2c fault codes

Minor updates to the pca953x GPIO expander driver: handle several more
compatible parts, and stop assuming that the I2C layer's return codes are
garbage (that's now been fixed).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotwl4030-gpio: cleanup debounce
David Brownell [Tue, 6 Jan 2009 22:42:26 +0000 (14:42 -0800)]
twl4030-gpio: cleanup debounce

Provide a static debounce configuration mechanism for twl4030 GPIOs,
replacing the previous dynamic one.  The single user of that mechanism was
for MMC card detect debouncing.

Boards can provide a bitmask saying which GPIOs to debounce (30 msec).
It's always enabled for pins with the MMC card-detect/VMMCx link active,
so most boards won't need to set the debounce mask.

This is a net code shrink, including runtime footprint.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/rtc: correct an error test
Julia Lawall [Tue, 6 Jan 2009 22:42:25 +0000 (14:42 -0800)]
drivers/rtc: correct an error test

rtc is clearly does not satisfy IS_ERR at the point where it is tested, so
I have changed the test to consider the just initialized rtc->rtc_dev.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@match exists@
expression x, E;
identifier fld;
position p1,p2;
@@

(
x = E;
|
x = E
|
x@p1->fld
... when != x = E
IS_ERR(x@p2)
... when any
)

@other_match exists@
expression match.x, E1, E2;
position match.p1,match.p2;
@@

x = E1
... when != x = E2
    when != x@p1
x@p2

@ script:python depends on !other_match@
p1 << match.p1;
p2 << match.p2;
@@

print "* file %s dereference %s test %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: driver for Marvell's SoCs 88F6281 and 88F6192
Saeed Bishara [Tue, 6 Jan 2009 22:42:24 +0000 (14:42 -0800)]
rtc: driver for Marvell's SoCs 88F6281 and 88F6192

Driver for the on-chip RTC found in some of Marvell's SoCs such as the
Kirkwood 88F6281 and 88F6192 devices.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: rtc-ds1216 fixes
Alessandro Zummo [Tue, 6 Jan 2009 22:42:23 +0000 (14:42 -0800)]
rtc: rtc-ds1216 fixes

Fixes a few issues with the rtc-ds1216 driver

- use rtc_valid_tm

- use platform_driver_probe

- fix init sequence - it was using rtc_unregister_driver where not
  needed.  I also added resource_size and removed an useless pointer
  assignment.

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Tested-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: add rtc-tx4939 driver
Atsushi Nemoto [Tue, 6 Jan 2009 22:42:22 +0000 (14:42 -0800)]
rtc: add rtc-tx4939 driver

Add support for RTC in TX4939 SoC.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: use set_mmss when set_time is not available
Alessandro Zummo [Tue, 6 Jan 2009 22:42:21 +0000 (14:42 -0800)]
rtc: use set_mmss when set_time is not available

Drivers should only need to implement either set_mmss (counter based RTCs)
or set_time (most RTCs).  The RTC subsystem will handle them
appropriately.

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: David Brownell <david-b@pacbell.net>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: rtc-ds3234 fixes
Alessandro Zummo [Tue, 6 Jan 2009 22:42:20 +0000 (14:42 -0800)]
rtc: rtc-ds3234 fixes

- no changelogs in code
- no banners
- use local buffers
- fix probe sequence
- do not init .driver.bus

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Dennis Aberilla <denzzzhome@yahoo.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: rtc-max6902 fixes
Alessandro Zummo [Tue, 6 Jan 2009 22:42:19 +0000 (14:42 -0800)]
rtc: rtc-max6902 fixes

- no changelogs in code
- no banners
- use local buffers
- fix probe sequence
- fixed style issues
- fix spi_write call
- removed old debug code

replaces http://patchwork.ozlabs.org/patch/9421/
and http://patchwork.ozlabs.org/patch/9455/

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: David Brownell <david-b@pacbell.net>
Cc: Raphael Assenat <raph@raphnet.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: Au1000 On-Chip Counter0-as-RTC driver.
Manuel Lauss [Tue, 6 Jan 2009 22:42:18 +0000 (14:42 -0800)]
rtc: Au1000 On-Chip Counter0-as-RTC driver.

Simple driver which uses the Au1xxx Time-Of-Year counter (counter0)
as a 1Hz RTC.

[akpm@linux-foundation.org: repair Kconfig]
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: kconfig cleanup
Alessandro Zummo [Tue, 6 Jan 2009 22:42:17 +0000 (14:42 -0800)]
rtc: kconfig cleanup

Remove double spaces and adds some suggestions.  It also fixes the
descriptions of options that are no more available as modules.

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: rtc-ds1390 probe sequence and misc fixes
Alessandro Zummo [Tue, 6 Jan 2009 22:42:16 +0000 (14:42 -0800)]
rtc: rtc-ds1390 probe sequence and misc fixes

Small fixes for the ds1390 driver

 - fixed initialization of the spi device
 - added missing includes
 - removed printks
 - removed useless wrappers for rtc ops
 - removed dead code

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Mark Jackson <mpfj@mimc.co.uk>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: pxa27x/pxa3xx driver fixes, revised
Alessandro Zummo [Tue, 6 Jan 2009 22:42:15 +0000 (14:42 -0800)]
rtc: pxa27x/pxa3xx driver fixes, revised

Small fixes for the pxa27x/pxa3xx driver

- use platform_driver_probe
- fixed exit paths
- fixed probe sequence
- added missing include
- using linux/io.h instead of asm/io.h

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: driver for pxa27x and pxa3xx SoC
Robert Jarzmik [Tue, 6 Jan 2009 22:42:14 +0000 (14:42 -0800)]
rtc: driver for pxa27x and pxa3xx SoC

With PXA27x and above, a new RTC hardware block was added in addition to
the legacy one which is also found on the SA1100 SOC family.  This second
RTC block is called "wristwatch" and "periodic interrupt" and works
independently from the other RTC block.

The driver offers provides :
 - a 1Hz ticking clock
 - a periodic alarm, in the 1Hz to 1000Hz range
 - a one shot alarm

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: move power of 2 periodic frequency check down into drivers
Jonathan Cameron [Tue, 6 Jan 2009 22:42:12 +0000 (14:42 -0800)]
rtc: move power of 2 periodic frequency check down into drivers

Move the power of 2 check on frequencies down into individual rtc drivers

This is to allow for non power of 2 real time clock periodic interrupts
such as those on the pxa27x to be found in the new pxa27x-rtc driver

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: bunch of drivers: fix 'no irq' case handing
Anton Vorontsov [Tue, 6 Jan 2009 22:42:11 +0000 (14:42 -0800)]
rtc: bunch of drivers: fix 'no irq' case handing

This patch fixes a bunch of irq checking misuses.  Most drivers were
getting irq via platform_get_irq(), which returns -ENXIO or r->start.

rtc-cmos.c is special.  It is using PNP and platform bindings.  Hopefully
nobody is using PNP IRQ 0 for RTC.  So the changes should be safe.

rtc-sh.c is using platform_get_irq, but was storing a result into an
unsigned type, then was checking for < 0.  This is fixed now.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: struct device: replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 22:42:11 +0000 (14:42 -0800)]
rtc: struct device: replace bus_id with dev_name(), dev_set_name()

Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Acked-By: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>