pandora-kernel.git
14 years agocleanup __writeback_single_inode
Christoph Hellwig [Mon, 8 Jun 2009 11:35:40 +0000 (13:35 +0200)]
cleanup __writeback_single_inode

There is no reason to for the split between __writeback_single_inode and
__sync_single_inode, the former just does a couple of checks before
tail-calling the latter.  So merge the two, and while we're at it split
out the I_SYNC waiting case for data integrity writers, as it's
logically separate function.  Finally rename __writeback_single_inode to
writeback_single_inode.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years ago... and the same for vfsmount id/mount group id
Al Viro [Wed, 24 Jun 2009 07:12:00 +0000 (03:12 -0400)]
... and the same for vfsmount id/mount group id

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agoMake allocation of anon devices cheaper
Al Viro [Wed, 24 Jun 2009 06:05:18 +0000 (02:05 -0400)]
Make allocation of anon devices cheaper

Standard trick - add a new variable (start) such that
for each n < start n is known to be busy.  Allocation can
skip checking everything in [0..start) and if it returns
n, we can set start to n + 1.  Freeing below start sets
start to what we'd just freed.

Of course, it still sucks if we do something like
free 0
allocate
allocate
in a loop - still O(n^2) time.  However, on saner loads it
improves the things a lot and the entire thing is not worth
the trouble of switching to something with better worst-case
behaviour.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agoupdate Documentation/filesystems/Locking
Christoph Hellwig [Fri, 19 Jun 2009 18:22:37 +0000 (20:22 +0200)]
update Documentation/filesystems/Locking

The rules for locking in many superblock operations has changed
significantly, so update the documentation for it.  Also correct some
older updates and ommissions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agodevpts: remove module-related code
H. Peter Anvin [Wed, 17 Jun 2009 04:15:04 +0000 (21:15 -0700)]
devpts: remove module-related code

These days, the devpts filesystem is closely integrated with the pty
memory management, and cannot be built as a module, even less removed
from the kernel.  Accordingly, remove all module-related stuff from
this filesystem.

[ v2: only remove code that's actually dead ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agoVFS: Switch init_mount_tree() to use the new create_mnt_ns() helper
Trond Myklebust [Tue, 23 Jun 2009 21:29:49 +0000 (17:29 -0400)]
VFS: Switch init_mount_tree() to use the new create_mnt_ns() helper

Eliminates some duplicated code...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agovfs: fix nd->root leak in do_filp_open()
J. R. Okajima [Thu, 18 Jun 2009 14:30:15 +0000 (23:30 +0900)]
vfs: fix nd->root leak in do_filp_open()

commit 2a737871108de9ba8930f7650d549f1383767f8b "Cache root in nameidata"
introduced a new member nd->root, but forgot to put it in do_filp_open().

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agoreiserfs: remove stray unlock_super in reiserfs_resize
Christoph Hellwig [Fri, 19 Jun 2009 08:30:07 +0000 (10:30 +0200)]
reiserfs: remove stray unlock_super in reiserfs_resize

Reiserfs doesn't use lock_super anywhere internally, and ->remount_fs
which calls reiserfs_resize does have it currently but also expects it
to be held on return, so there's no business for the unlock_super here.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked by Edward Shishkin <edward.shishkin@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agoALSA: hda - Fix support for Samsung P50 with AD1986A codec
Takashi Iwai [Wed, 24 Jun 2009 12:14:34 +0000 (14:14 +0200)]
ALSA: hda - Fix support for Samsung P50 with AD1986A codec

Samsung P50 requires the HP auto-muting unlike other Samsung models.
Added a new model=samsung-p50 to support this.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Generalize the pin-detect quirk for Lenovo N100
Takashi Iwai [Wed, 24 Jun 2009 12:10:15 +0000 (14:10 +0200)]
ALSA: hda - Generalize the pin-detect quirk for Lenovo N100

Add a new flag to ad_spec struct so that the same hack can be used for
any other models (if any).  This also allows other models to reuse the
auto-mute functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Simplify AD1986A mixer definitions
Takashi Iwai [Wed, 24 Jun 2009 12:07:53 +0000 (14:07 +0200)]
ALSA: hda - Simplify AD1986A mixer definitions

Split mixer element arrays of AD1986A models to several pieces so that
each model can share the same mixer arrays.
This removes lots of duplicated data.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoudf: remove redundant tests on unsigned
Roel Kluin [Mon, 22 Jun 2009 21:12:29 +0000 (23:12 +0200)]
udf: remove redundant tests on unsigned

first_block and goal are unsigned. When negative they are wrapped and caught by
the other test.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoALSA: hda - More description about patch module option
Takashi Iwai [Wed, 17 Jun 2009 15:30:54 +0000 (17:30 +0200)]
ALSA: hda - More description about patch module option

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Add description about patch loading
Takashi Iwai [Wed, 17 Jun 2009 15:17:18 +0000 (17:17 +0200)]
ALSA: hda - Add description about patch loading

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Add patch module option
Takashi Iwai [Wed, 17 Jun 2009 07:52:54 +0000 (09:52 +0200)]
ALSA: hda - Add patch module option

Added the patch module option to apply a "patch" as a firmware to
modify pin configurations or give additional hints to the driver
before actually initializing and configuring the codec.

This can be used as a workaround when the BIOS doesn't give sufficient
information or give wrong information that doesn't match with the real
hardware setup, until it's fixed statically in the driver via a quirk.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Don't call snd_hda_codec_configure in snd_hda_codec_new()
Takashi Iwai [Wed, 17 Jun 2009 07:33:52 +0000 (09:33 +0200)]
ALSA: hda - Don't call snd_hda_codec_configure in snd_hda_codec_new()

The codec setup call via snd_hda_codec_configure() isn't necessarily
called in snd_hda_codec_new().  For the later added feature, it's better
to change the code flow like:
 - create all codec instances
 - configure each codec

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agobnx2: Fix the behavior of ethtool when ONBOOT=no
Ooiwa Naohiro [Wed, 24 Jun 2009 07:19:06 +0000 (00:19 -0700)]
bnx2: Fix the behavior of ethtool when ONBOOT=no

I found a little bug.

When configure in ifcfg-eth* is ONBOOT=no,
the behavior of ethtool command is wrong.

    # grep ONBOOT /etc/sysconfig/network-scripts/ifcfg-eth2
    ONBOOT=no
    # ethtool eth2 | tail -n1
            Link detected: yes

I think "Link detected" should be "no".

Signed-off-by: Ooiwa Naohiro <nooiwa@miraclelinux.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoasus-laptop: remove EXPERIMENTAL dependency
Corentin Chary [Fri, 19 Jun 2009 12:52:11 +0000 (14:52 +0200)]
asus-laptop: remove EXPERIMENTAL dependency

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoasus-laptop: use pr_fmt and pr_<level>
Corentin Chary [Fri, 19 Jun 2009 12:52:03 +0000 (14:52 +0200)]
asus-laptop: use pr_fmt and pr_<level>

Convert the unusual printk(ASUS_<level> uses to
the more standard pr_fmt and pr_<level>(.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: cpufv updates
Corentin Chary [Tue, 16 Jun 2009 19:28:56 +0000 (19:28 +0000)]
eeepc-laptop: cpufv updates

Limit cpufv input to acceptables values.
Add an available_cpufv file to show available
presets.
Change cpufv ouput format from %d to %#x, it won't
break compatibility with existing userspace tools, but
it provide a more human readable output.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: sync eeepc-laptop with asus_acpi
Corentin Chary [Tue, 16 Jun 2009 19:28:52 +0000 (19:28 +0000)]
eeepc-laptop: sync eeepc-laptop with asus_acpi

In the default Eee PC distribution, there is a modified
asus_acpi driver. eeepc-laptop is a cleaned version of this
driver. Sync ASL enum and getter/setters with asus_acpi.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoasus_acpi: Deprecate in favor of asus-laptop
Corentin Chary [Tue, 16 Jun 2009 19:28:48 +0000 (19:28 +0000)]
asus_acpi: Deprecate in favor of asus-laptop

asus-laptop have been merged in the kernel two years ago,
it is now stable and used by most distribution instead of
the old asus_acpi driver.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoacpi4asus: update MAINTAINER and KConfig links
Corentin Chary [Tue, 16 Jun 2009 19:28:47 +0000 (19:28 +0000)]
acpi4asus: update MAINTAINER and KConfig links

The bug tracker have moved from sourceforge to
http://dev.iksaif.net . The homepage of the project
is now http://acpi4asus.sf.net with links to the new
bug tracker. No change for the mailing list.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoasus-laptop: platform dev as parent for led and backlight
Corentin Chary [Tue, 16 Jun 2009 19:28:46 +0000 (19:28 +0000)]
asus-laptop: platform dev as parent for led and backlight

Makes asus-laptop platform device the parent device of
backlight and led classes.

With this patch, leds and backlight are also available in
/sys/devices/platform/asus-laptop/ like thinkpad_acpi.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: enable camera by default
Pekka Enberg [Tue, 16 Jun 2009 19:28:45 +0000 (19:28 +0000)]
eeepc-laptop: enable camera by default

If we leave the camera disabled by default, userspace programs (e.g.
Skype, Cheese) leave the user out in the cold saying that the machine
"has no camera." Therefore, it's better to enable camera by default and
let people who really don't want it just disable the thing.

To reduce power usage you should enable USB autosuspend:
echo -n auto > /sys/bus/usb/drivers/uvcvideo/*:*/../power/level

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoMerge branch 'bjorn-notify' into release
Len Brown [Wed, 24 Jun 2009 05:22:20 +0000 (01:22 -0400)]
Merge branch 'bjorn-notify' into release

Conflicts:
drivers/platform/x86/eeepc-laptop.c

Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoMerge branches 'acerhdf', 'acpi-pci-bind', 'bjorn-pci-root', 'bugzilla-12904', 'bugzi...
Len Brown [Wed, 24 Jun 2009 05:19:50 +0000 (01:19 -0400)]
Merge branches 'acerhdf', 'acpi-pci-bind', 'bjorn-pci-root', 'bugzilla-12904', 'bugzilla-13121', 'bugzilla-13396', 'bugzilla-13533', 'bugzilla-13612', 'c3_lock', 'hid-cleanups', 'misc-2.6.31', 'pdc-leak-fix', 'pnpacpi', 'power_nocheck', 'thinkpad_acpi', 'video' and 'wmi' into release

14 years agoACPI: Rename ACPI processor device bus ID
Zhao Yakui [Wed, 24 Jun 2009 03:46:44 +0000 (11:46 +0800)]
ACPI: Rename ACPI processor device bus ID

Some BIOS re-use the same processor bus id
in different scope:

\_SB.SCK0.CPU0
\_SB.SCK1.CPU0

But the (deprecated) /proc/acpi/ interface
assumes the bus-id's are unique, resulting in an OOPS
when the processor driver is loaded:

WARNING: at fs/proc/generic.c:590 proc_register+0x148/0x180()
Hardware name: Sunrise Ridge
proc_dir_entry 'processor/CPU0' already registered
Call Trace:
 [<ffffffff8023f7ef>] warn_slowpath+0xb1/0xe5
 [<ffffffff8036243b>] ? ida_get_new_above+0x190/0x1b1
 [<ffffffff803625a8>] ? idr_pre_get+0x5f/0x75
 [<ffffffff8030b2f6>] proc_register+0x148/0x180
 [<ffffffff8030b4ff>] proc_mkdir_mode+0x3d/0x52
 [<ffffffff8030b525>] proc_mkdir+0x11/0x13
 [<ffffffffa0014b89>] acpi_processor_start+0x755/0x9bc [processor]

Rename the processor device bus id. And the new bus id will be
generated as the following format:
CPU+ CPU ID

For example: If the cpu ID is 5, then the bus ID will be "CPU5".
If the CPU ID is 10, then the bus ID will be "CPUA".

Yes, this will change the directory names seen
in /proc/acpi/processor/* on some systems.
Before this patch, those directory names where
totally arbitrary strings based on the interal AML device strings.

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

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoacerhdf: Acer Aspire One fan control
Peter Feuerer [Sun, 21 Jun 2009 16:53:03 +0000 (18:53 +0200)]
acerhdf: Acer Aspire One fan control

Acerhdf is a driver for Acer Aspire One netbooks. It allows
to access the temperature sensor and to control the fan.

Signed-off-by: Peter Feuerer <peter@piie.net>
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoFix rule eviction order for AUDIT_DIR
Al Viro [Wed, 24 Jun 2009 04:02:38 +0000 (00:02 -0400)]
Fix rule eviction order for AUDIT_DIR

If syscall removes the root of subtree being watched, we
definitely do not want the rules refering that subtree
to be destroyed without the syscall in question having
a chance to match them.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agoAudit: clean up all op= output to include string quoting
Eric Paris [Thu, 11 Jun 2009 18:31:37 +0000 (14:31 -0400)]
Audit: clean up all op= output to include string quoting

A number of places in the audit system we send an op= followed by a string
that includes spaces.  Somehow this works but it's just wrong.  This patch
moves all of those that I could find to be quoted.

Example:

Change From: type=CONFIG_CHANGE msg=audit(1244666690.117:31): auid=0 ses=1
subj=unconfined_u:unconfined_r:auditctl_t:s0-s0:c0.c1023 op=remove rule
key="number2" list=4 res=0

Change To: type=CONFIG_CHANGE msg=audit(1244666690.117:31): auid=0 ses=1
subj=unconfined_u:unconfined_r:auditctl_t:s0-s0:c0.c1023 op="remove rule"
key="number2" list=4 res=0

Signed-off-by: Eric Paris <eparis@redhat.com>
14 years agoAudit: move audit_get_nd completely into audit_watch
Eric Paris [Thu, 11 Jun 2009 18:31:36 +0000 (14:31 -0400)]
Audit: move audit_get_nd completely into audit_watch

audit_get_nd() is only used  by audit_watch and could be more cleanly
implemented by having the audit watch functions call it when needed rather
than making the generic audit rule parsing code deal with those objects.

Signed-off-by: Eric Paris <eparis@redhat.com>
14 years agoaudit: seperate audit inode watches into a subfile
Eric Paris [Thu, 11 Jun 2009 18:31:36 +0000 (14:31 -0400)]
audit: seperate audit inode watches into a subfile

In preparation for converting audit to use fsnotify instead of inotify we
seperate the inode watching code into it's own file.  This is similar to
how the audit tree watching code is already seperated into audit_tree.c

Signed-off-by: Eric Paris <eparis@redhat.com>
14 years agoAudit: clean up audit_receive_skb
Eric Paris [Thu, 11 Jun 2009 18:31:35 +0000 (14:31 -0400)]
Audit: clean up audit_receive_skb

audit_receive_skb is hard to clearly parse what it is doing to the netlink
message.  Clean the function up so it is easy and clear to see what is going
on.

Signed-off-by: Eric Paris <eparis@redhat.com>
14 years agoAudit: cleanup netlink mesg handling
Eric Paris [Thu, 11 Jun 2009 18:31:35 +0000 (14:31 -0400)]
Audit: cleanup netlink mesg handling

The audit handling of netlink messages is all over the place.  Clean things
up, use predetermined macros, generally make it more readable.

Signed-off-by: Eric Paris <eparis@redhat.com>
14 years agoAudit: unify the printk of an skb when auditd not around
Eric Paris [Thu, 11 Jun 2009 18:31:35 +0000 (14:31 -0400)]
Audit: unify the printk of an skb when auditd not around

Remove code duplication of skb printk when auditd is not around in userspace
to deal with this message.

Signed-off-by: Eric Paris <eparis@redhat.com>
14 years agoAudit: dereferencing krule as if it were an audit_watch
Eric Paris [Thu, 11 Jun 2009 18:31:34 +0000 (14:31 -0400)]
Audit: dereferencing krule as if it were an audit_watch

audit_update_watch() runs all of the rules for a given watch and duplicates
them, attaches a new watch to them, and then when it finishes that process
and has called free on all of the old rules (ok maybe still inside the rcu
grace period) it proceeds to use the last element from list_for_each_entry_safe()
as if it were a krule rather than being the audit_watch which was anchoring
the list to output a message about audit rules changing.

This patch unfies the audit message from two different places into a helper
function and calls it from the correct location in audit_update_rules().  We
will now get an audit message about the config changing for each rule (with
each rules filterkey) rather than the previous garbage.

Signed-off-by: Eric Paris <eparis@redhat.com>
14 years agoAudit: better estimation of execve record length
Eric Paris [Thu, 11 Jun 2009 18:31:34 +0000 (14:31 -0400)]
Audit: better estimation of execve record length

The audit execve record splitting code estimates the length of the message
generated.  But it forgot to include the "" that wrap each string in its
estimation.  This means that execve messages with lots of tiny (1-2 byte)
arguments could still cause records greater than 8k to be emitted.  Simply
fix the estimate.

Signed-off-by: Eric Paris <eparis@redhat.com>
14 years agoAudit: fix audit watch use after free
Eric Paris [Thu, 11 Jun 2009 18:31:33 +0000 (14:31 -0400)]
Audit: fix audit watch use after free

When an audit watch is added to a parent the temporary watch inside the
original krule from userspace is freed.  Yet the original watch is used after
the real watch was created in audit_add_rules()

Signed-off-by: Eric Paris <eparis@redhat.com>
14 years agoACPI: video: DMI workaround broken Acer 7720 BIOS enabling display brightness
Zhang Rui [Mon, 22 Jun 2009 03:31:18 +0000 (11:31 +0800)]
ACPI: video: DMI workaround broken Acer 7720 BIOS enabling display brightness

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

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: run ACPI device hot removal in kacpi_hotplug_wq
Zhang Rui [Mon, 22 Jun 2009 03:31:16 +0000 (11:31 +0800)]
ACPI: run ACPI device hot removal in kacpi_hotplug_wq

Now that new interface is available,
convert to using it rather than creating a new kernel thread.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: Add the reference count to avoid unloading ACPI video bus twice
Zhao Yakui [Tue, 16 Jun 2009 03:23:13 +0000 (11:23 +0800)]
ACPI: Add the reference count to avoid unloading ACPI video bus twice

Sometimes both acpi video and i915 driver are compiled as modules.
And there exists the strict dependency between the two drivers.
The acpi video bus will be unloaded in course of unloading the i915 driver.
If we unload the acpi video driver, then the kernel oops will be triggered.

Add the reference count to avoid unloading the ACPI video bus twice.
The reference count should be checked before unregistering the acpi video bus.
If the reference count is already zero, it won't unregister it again.
And after the acpi video bus is already unregistered, the reference count
will be set to zero.

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

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: DMI to disable Vista compatibility on some Sony laptops
Zhang Rui [Mon, 22 Jun 2009 03:31:17 +0000 (11:31 +0800)]
ACPI: DMI to disable Vista compatibility on some Sony laptops

Linux claims Vista compatibility to the BIOS for a number of
reasons, but this brings hard lockup on some Sony laptops.

Disable Vista compatibility via DMI for these laptops unless
we can figure out what Vista is doing for this platform.
http://bugzilla.kernel.org/show_bug.cgi?id=12904

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: fix a deadlock in hotplug case
Zhang Rui [Tue, 23 Jun 2009 02:20:29 +0000 (10:20 +0800)]
ACPI: fix a deadlock in hotplug case

we used to run the hotplug code in keventd_wq.
But when hot removing the ACPI battery device,
power_supply_unregister invokes flush_scheduled_work.
This causes a deadlock. i.e
1. When dock is unplugged, all the hotplug code is run on kevent_wq.
2. the hotplug code removes all the child devices of dock device.
3. removing the child device may invoke flush_scheduled_work
4. flush_scheduled_work waits until all the work on kevent_wq to be
   finished, while this will never be true because the hotplug code
   is running on keventd_wq...

Introduce a new workqueue for hotplug in this patch.
http://bugzilla.kernel.org/show_bug.cgi?id=13533

Tested-by: Paul Martin <pm@debian.org>
Tested-by: Vojtech Gondzala <vojtech.gondzala@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoShow the physical device node of backlight class device.
Zhang Rui [Mon, 22 Jun 2009 03:31:14 +0000 (11:31 +0800)]
Show the physical device node of backlight class device.

Create symbol link from backlight class device to ACPI video device.

More and more laptops are shipped with multiple ACPI
video devices, while we export only one of them to userspace.

With this patch applied, we can know which ACPI video device
is used by "cat /sys/class/backlight/acpi_video0/device/path".

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoMerge git://git.infradead.org/iommu-2.6
Linus Torvalds [Wed, 24 Jun 2009 02:49:24 +0000 (19:49 -0700)]
Merge git://git.infradead.org/iommu-2.6

* git://git.infradead.org/iommu-2.6:
  Intel-IOMMU, intr-remap: source-id checking
  Intel-IOMMU, intr-remap: set the whole 128bits of irte when modify/free it
  IOMMU Identity Mapping Support (drivers/pci/intel_iommu.c)

14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec...
Linus Torvalds [Wed, 24 Jun 2009 02:36:02 +0000 (19:36 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jlbec/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
  ocfs2/trivial: Wrap ocfs2_sysfile_cluster_lock_key within define.
  ocfs2: Add lockdep annotations
  vfs: Set special lockdep map for dirs only if not set by fs
  ocfs2: Disable orphan scanning for local and hard-ro mounts
  ocfs2: Do not initialize lvb in ocfs2_orphan_scan_lock_res_init()
  ocfs2: Stop orphan scan as early as possible during umount
  ocfs2: Fix ocfs2_osb_dump()
  ocfs2: Pin journal head before accessing jh->b_committed_data
  ocfs2: Update atime in splice read if necessary.
  ocfs2: Provide the ocfs2_dlm_lvb_valid() stack API.

14 years agoMerge branch 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux
Linus Torvalds [Wed, 24 Jun 2009 02:35:42 +0000 (19:35 -0700)]
Merge branch 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux

* 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux:
  i2c: driver for the Synopsys DesignWare I2C controller

14 years agoqla3xxx: Don't sleep while holding lock.
Ron Mercer [Tue, 23 Jun 2009 09:00:02 +0000 (09:00 +0000)]
qla3xxx: Don't sleep while holding lock.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqla3xxx: Give the PHY time to come out of reset.
Ron Mercer [Tue, 23 Jun 2009 09:00:01 +0000 (09:00 +0000)]
qla3xxx: Give the PHY time to come out of reset.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv4 routing: Ensure that route cache entries are usable and reclaimable with caching...
Neil Horman [Mon, 22 Jun 2009 10:18:53 +0000 (10:18 +0000)]
ipv4 routing: Ensure that route cache entries are usable and reclaimable with caching is off

When route caching is disabled (rt_caching returns false), We still use route
cache entries that are created and passed into rt_intern_hash once.  These
routes need to be made usable for the one call path that holds a reference to
them, and they need to be reclaimed when they're finished with their use.  To be
made usable, they need to be associated with a neighbor table entry (which they
currently are not), otherwise iproute_finish2 just discards the packet, since we
don't know which L2 peer to send the packet to.  To do this binding, we need to
follow the path a bit higher up in rt_intern_hash, which calls
arp_bind_neighbour, but not assign the route entry to the hash table.
Currently, if caching is off, we simply assign the route to the rp pointer and
are reutrn success.  This patch associates us with a neighbor entry first.

Secondly, we need to make sure that any single use routes like this are known to
the garbage collector when caching is off.  If caching is off, and we try to
hash in a route, it will leak when its refcount reaches zero.  To avoid this,
this patch calls rt_free on the route cache entry passed into rt_intern_hash.
This places us on the gc list for the route cache garbage collector, so that
when its refcount reaches zero, it will be reclaimed (Thanks to Alexey for this
suggestion).

I've tested this on a local system here, and with these patches in place, I'm
able to maintain routed connectivity to remote systems, even if I set
/proc/sys/net/ipv4/rt_cache_rebuild_count to -1, which forces rt_caching to
return false.

Signed-off-by: Neil Horman <nhorman@redhat.com>
Reported-by: Jarek Poplawski <jarkao2@gmail.com>
Reported-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Move rx skb_orphan call to where needed
Herbert Xu [Mon, 22 Jun 2009 02:25:25 +0000 (02:25 +0000)]
net: Move rx skb_orphan call to where needed

In order to get the tun driver to account packets, we need to be
able to receive packets with destructors set.  To be on the safe
side, I added an skb_orphan call for all protocols by default since
some of them (IP in particular) cannot handle receiving packets
destructors properly.

Now it seems that at least one protocol (CAN) expects to be able
to pass skb->sk through the rx path without getting clobbered.

So this patch attempts to fix this properly by moving the skb_orphan
call to where it's actually needed.  In particular, I've added it
to skb_set_owner_[rw] which is what most users of skb->destructor
call.

This is actually an improvement for tun too since it means that
we only give back the amount charged to the socket when the skb
is passed to another socket that will also be charged accordingly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Oliver Hartkopp <olver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoi2c: driver for the Synopsys DesignWare I2C controller
Baruch Siach [Mon, 22 Jun 2009 13:36:29 +0000 (16:36 +0300)]
i2c: driver for the Synopsys DesignWare I2C controller

The i2c Linux driver for the DesignWare i2c block of Synopsys, which is meant
for AMBA Peripheral Bus. This i2c block is used on SoC chips like the ARM9
based PVG610.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoIntel-IOMMU, intr-remap: source-id checking
Weidong Han [Fri, 22 May 2009 16:41:15 +0000 (00:41 +0800)]
Intel-IOMMU, intr-remap: source-id checking

To support domain-isolation usages, the platform hardware must be
capable of uniquely identifying the requestor (source-id) for each
interrupt message. Without source-id checking for interrupt remapping
, a rouge guest/VM with assigned devices can launch interrupt attacks
to bring down anothe guest/VM or the VMM itself.

This patch adds source-id checking for interrupt remapping, and then
really isolates interrupts for guests/VMs with assigned devices.

Because PCI subsystem is not initialized yet when set up IOAPIC
entries, use read_pci_config_byte to access PCI config space directly.

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agoIntel-IOMMU, intr-remap: set the whole 128bits of irte when modify/free it
Weidong Han [Fri, 22 May 2009 16:41:14 +0000 (00:41 +0800)]
Intel-IOMMU, intr-remap: set the whole 128bits of irte when modify/free it

Interrupt remapping table entry is 128bits. Currently, it only sets low
64bits of irte in modify_irte and free_irte. This ignores high 64bits
setting of irte, that means source-id setting will be ignored. This patch
sets the whole 128bits of irte when modify/free it. Following source-id
checking patch depends on this.

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agoIOMMU Identity Mapping Support (drivers/pci/intel_iommu.c)
Fenghua Yu [Fri, 19 Jun 2009 20:47:29 +0000 (13:47 -0700)]
IOMMU Identity Mapping Support (drivers/pci/intel_iommu.c)

Identity mapping for IOMMU defines a single domain to 1:1 map all PCI
devices to all usable memory.

This reduces map/unmap overhead in DMA API's and improve IOMMU
performance. On 10Gb network cards, Netperf shows no performance
degradation compared to non-IOMMU performance.

This method may lose some of DMA remapping benefits like isolation.

The patch sets up identity mapping for all PCI devices to all usable
memory. In the DMA API, there is no overhead to maintain page tables,
invalidate iotlb, flush cache etc.

32 bit DMA devices don't use identity mapping domain, in order to access
memory beyond 4GiB.

When kernel option iommu=pt, pass through is first tried. If pass
through succeeds, IOMMU goes to pass through. If pass through is not
supported in hw or fail for whatever reason, IOMMU goes to identity
mapping.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agonvidiafb: fix boot-time printk string
Mikael Pettersson [Tue, 23 Jun 2009 19:37:07 +0000 (12:37 -0700)]
nvidiafb: fix boot-time printk string

On bootup nvidiafb prints the following on my Apple G5:

nvidiafb: CRTC 1appears to have a CRT attached

There should be a space between the '1' and the 'appears'.  Add it.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoh8/300: fix incorrect "select" directives in arch/h8300/Kconfig.cpu.
Robert P. J. Day [Tue, 23 Jun 2009 19:37:06 +0000 (12:37 -0700)]
h8/300: fix incorrect "select" directives in arch/h8300/Kconfig.cpu.

Fix the incorrect "select" directives by dropping the "CONFIG_"
prefixes, and correcting the typo "H8S2768" to "H8S2678".

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Acked-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomm: fix handling of pagesets for downed cpus
Dimitri Sivanich [Tue, 23 Jun 2009 19:37:04 +0000 (12:37 -0700)]
mm: fix handling of pagesets for downed cpus

After downing/upping a cpu, an attempt to set
/proc/sys/vm/percpu_pagelist_fraction results in an oops in
percpu_pagelist_fraction_sysctl_handler().

If a processor is downed then we need to set the pageset pointer back to
the boot pageset.

Updates of the high water marks should not access pagesets of unpopulated
zones (those pointer go to the boot pagesets which would be no longer
functional if their size would be increased beyond zero).

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agormap: fixup page_referenced() for nommu systems
Mike Frysinger [Tue, 23 Jun 2009 19:37:01 +0000 (12:37 -0700)]
rmap: fixup page_referenced() for nommu systems

After the recent changes that went into mm/vmscan.c to overhaul stuff, we
ended up with these warnings on no-mmu systems:

  mm/vmscan.c: In function `shrink_page_list':
  mm/vmscan.c:580: warning: unused variable `vm_flags'
  mm/vmscan.c: In function `shrink_active_list':
  mm/vmscan.c:1294: warning: `vm_flags' may be used uninitialized in this function
  mm/vmscan.c:1242: note: `vm_flags' was declared here

This is because the no-mmu function defines page_referenced() to work on
the first argument only (the page).  It does not clear the vm_flags given
to it because for no-mmu systems, they never actually get utilized.  Since
that is no longer strictly true, we need to set vm_flags to 0 like
everyone else so gcc can do proper dead code elimination without annoying
us with unused warnings.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: David Howells <dhowells@redhat.com>
Acked-by: David McCullough <davidm@snapgear.com>
Cc: Greg Ungerer <gerg@uclinux.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomm: pass mm to grab_swap_token
Hugh Dickins [Tue, 23 Jun 2009 19:36:58 +0000 (12:36 -0700)]
mm: pass mm to grab_swap_token

If a kthread happens to use get_user_pages() on an mm (as KSM does),
there's a chance that it will end up trying to read in a swap page, then
oops in grab_swap_token() because the kthread has no mm: GUP passes down
the right mm, so grab_swap_token() ought to be using it.

We have not identified a stronger case than KSM's daemon (not yet in
mainline), but the issue must have come up before, since RHEL has included
a fix for this for years (though a different fix, they just back out of
grab_swap_token if current->mm is unset: which is what we first proposed,
but using the right mm here seems more correct).

Reported-by: Izik Eidus <ieidus@redhat.com>
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Tue, 23 Jun 2009 18:52:16 +0000 (11:52 -0700)]
Merge git://git./linux/kernel/git/lethal/sh-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Fix up HAVE_PERF_COUNTERS typo.
  sh: Fix up more dma-mapping fallout.
  sh: SH7786 SMP support.
  sh: Wire up the uncached fixmap on sh64 as well.
  sh: Use local TLB flush in set_pte_phys().
  sh: Provide cpu_idle_wait() to fix up cpuidle/SMP build.

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Tue, 23 Jun 2009 18:36:01 +0000 (11:36 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  RDMA: Add __init/__exit macros to addr.c and cma.c
  IB/ehca: Bump version number
  mlx4_core: Fix dma_sync_single_for_cpu() with matching for_device() calls
  IB/mthca: Replace dma_sync_single() use with proper functions
  RDMA/nes: Fix FIN state handling under error conditions
  RDMA/nes: Fix max_qp_init_rd_atom returned from query device
  IB/ehca: Ensure that guid_entry index is not negative
  IB/ehca: Tolerate dynamic memory operations before driver load

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Tue, 23 Jun 2009 18:35:37 +0000 (11:35 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (38 commits)
  fusion: mptsas, fix lock imbalance
  [SCSI] scsi_transport_fc: replace BUS_ID_SIZE by fixed count
  sd, sr: fix Driver 'sd' needs updating message
  scsi_transport_iscsi: return -EOVERFLOW for Too many iscsi targets
  fc_transport: Selective return value from BSG timeout function
  fc_transport: The softirq_done function registration for BSG request
  sym53c8xx: ratelimit parity errors
  explain the hidden scsi_wait_scan Kconfig variable
  ibmvfc: Fix endless PRLI loop in discovery
  ibmvfc: Process async events before command responses
  libfc: Add runtime debugging with debug_logging module parameter
  libfcoe: Add runtime debugging with module param debug_logging
  fcoe: Add runtime debug logging with module parameter debug_logging
  scsi_debug: Add support for physical block exponent and alignment
  cnic: add NETDEV_1000 and NETDEVICES to Kconfig select
  cnic: Fix __symbol_get() build error.
  Revert "[SCSI] cnic: fix error: implicit declaration of function ‘__symbol_get’"
  ipr: differentiate pci-x and pci-e based adapters
  ipr: add test for MSI interrupt support
  scsi_transport_spi: Blacklist Ultrium-3 tape for IU transfers
  ...

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm...
Linus Torvalds [Tue, 23 Jun 2009 18:34:24 +0000 (11:34 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/arnd/asm-generic

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  asm-generic: add dummy pgprot_noncached()
  lib/checksum.c: fix endianess bug
  asm-generic: hook up new system calls
  asm-generic: list Arnd as asm-generic maintainer
  asm-generic: drop HARDIRQ_BITS definition from hardirq.h
  asm-generic: uaccess: fix up local access_ok() usage
  asm-generic: uaccess: add missing access_ok() check to strnlen_user()

14 years agoMerge branch 'kmemleak' of git://linux-arm.org/linux-2.6
Linus Torvalds [Tue, 23 Jun 2009 18:25:04 +0000 (11:25 -0700)]
Merge branch 'kmemleak' of git://linux-arm.org/linux-2.6

* 'kmemleak' of git://linux-arm.org/linux-2.6:
  kmemleak: Do not force the slab debugging Kconfig options
  kmemleak: use pr_fmt

14 years agomm: don't rely on flags coincidence
Hugh Dickins [Tue, 23 Jun 2009 12:52:49 +0000 (13:52 +0100)]
mm: don't rely on flags coincidence

Indeed FOLL_WRITE matches FAULT_FLAG_WRITE, matches GUP_FLAGS_WRITE,
and it's tempting to devise a set of Grand Unified Paging flags;
but not today.  So until then, let's rely upon the compiler to spot
the coincidence, "rather than have that subtle dependency and a
comment for it" - as you remarked in another context yesterday.

Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agohugetlb: fault flags instead of write_access
Hugh Dickins [Tue, 23 Jun 2009 12:49:05 +0000 (13:49 +0100)]
hugetlb: fault flags instead of write_access

handle_mm_fault() is now passing fault flags rather than write_access
down to hugetlb_fault(), so better recognize that in hugetlb_fault(),
and in hugetlb_no_page().

Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of git://www.jni.nu/cris
Linus Torvalds [Tue, 23 Jun 2009 17:47:01 +0000 (10:47 -0700)]
Merge branch 'for-linus' of git://www.jni.nu/cris

* 'for-linus' of git://www.jni.nu/cris:
  CRISv10: remove redundant tests on unsigned
  CRISv32: irq.c - Move end brace outside #endif
  CRISv32: Fix potential null reference in cryptocop driver.
  CRISv32: Add arch optimized strcmp.
  CRIS: assignment/is equal confusion

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Tue, 23 Jun 2009 17:45:39 +0000 (10:45 -0700)]
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:
  ALSA: hda - Make jack-plug notification selectable
  ALSA: ctxfi - Add PM support
  sound: seq_midi_event: fix decoding of (N)RPN events
  ALSA: hda - Add digital-mic support to ALC262 auto model
  ALSA: hda - Fix check of input source type for realtek codecs
  ALSA: hda - Add quirk for Sony VAIO Z21MN
  ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model
  ALSA: hda - Fix unsigned comparison in patch_sigmatel.c
  ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait
  sound: fix check for return value in snd_pcm_hw_refine
  ALSA: ctxfi - Allow unknown PCI SSIDs
  ASoC: Blackfin: update the bf5xx_i2s_resume parameters
  ASoC: Blackfin: keep better track of SPORT configuration state

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Tue, 23 Jun 2009 17:41:17 +0000 (10:41 -0700)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] wdt_pci.c: remove #ifdef CONFIG_WDT_501_PCI
  [WATCHDOG] hpwdt: Add NMI priority option
  [WATCHDOG] OMAP fixes: enable clock in probe, trigger timer reload
  [WATCHDOG] add bcm47xx watchdog driver
  [WATCHDOG] Freescale STMP: watchdog driver
  [WATCHDOG] twl4030 watchdog driver
  [WATCHDOG] U300 COH 901 327 watchdog driver
  [WATCHDOG] Add pnx833x_wdt

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Tue, 23 Jun 2009 17:40:19 +0000 (10:40 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (62 commits)
  V4L/DVB (12131): BUGFIX: An incorrect Carrier Recovery Loop optimization table was being
  V4L/DVB (12130): Fix a redundant compiler warning
  V4L/DVB (12003): v4l2: Move bounding code outside I2C ifdef block
  V4L/DVB (11913): cx231xx: TRY_FMT should not actually set anything
  V4L/DVB (11912): em28xx: Use v4l bounding/alignment function
  V4L/DVB (11911): cx231xx: Use v4l bounding/alignment function
  V4L/DVB (11910): mt9: Use v4l bounding/alignment function
  V4L/DVB (11909): cx23885: Use v4l bounding/alignment function
  V4L/DVB (11908): w8968cf: Use v4l bounding/alignment function
  V4L/DVB (11907): cx88: Use v4l bounding/alignment function
  V4L/DVB (11906): saa7134: Use v4l bounding/alignment function
  V4L/DVB (11905): vivi: Use v4l bounding/alignment function
  V4L/DVB (11904): zoran: Use v4l bounding/alignment functiob
  V4L/DVB (11903): sh_mobile_ceu_camera: Use v4l bounding/alignment function
  V4L/DVB (11902): pxa-camera: Use v4l bounding/alignment function
  V4L/DVB (11901): v4l2: Create helper function for bounding and aligning images
  V4L/DVB (12128): v4l2: update framework documentation.
  V4L/DVB (12125): v4l2: add new s_config subdev ops and v4l2_i2c_new_subdev_cfg/board calls
  V4L/DVB (12122): pvrusb2: De-obfuscate code which handles routing schemes
  V4L/DVB (12121): pvrusb2: Improve handling of routing schemes
  ...

14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Tue, 23 Jun 2009 17:39:36 +0000 (10:39 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: don't set IORDY for reset
  sata_fsl: Add power mgmt support
  [libata] PATA driver for CF interface on AT91SAM9260 SoC
  [libata] beautify module parameters

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
Linus Torvalds [Tue, 23 Jun 2009 17:39:00 +0000 (10:39 -0700)]
Merge git://git./linux/kernel/git/davem/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  ide cmd64x: Remove serialize setting.
  ide: Take over as maintainer.

14 years agoMerge branches 'ehca', 'misc', 'mlx4', 'mthca' and 'nes' into for-linus
Roland Dreier [Tue, 23 Jun 2009 17:38:47 +0000 (10:38 -0700)]
Merge branches 'ehca', 'misc', 'mlx4', 'mthca' and 'nes' into for-linus

14 years agoRDMA: Add __init/__exit macros to addr.c and cma.c
Peter Huewe [Tue, 23 Jun 2009 17:38:42 +0000 (10:38 -0700)]
RDMA: Add __init/__exit macros to addr.c and cma.c

Add __init and __exit annotations to the module_init/module_exit
functions from drivers/infiniband/core/addr.c and cma.c.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agoIB/ehca: Bump version number
Alexander Schmidt [Tue, 23 Jun 2009 17:30:04 +0000 (10:30 -0700)]
IB/ehca: Bump version number

Increment version number for DMEM toleration.

Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agomm: fix incorrect page removal from LRU
KAMEZAWA Hiroyuki [Mon, 22 Jun 2009 23:57:55 +0000 (08:57 +0900)]
mm: fix incorrect page removal from LRU

The isolated page is "cursor_page" not "page".

This could cause LRU list corruption under memory pressure, caught by
CONFIG_DEBUG_LIST.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Tested-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosh: Fix up HAVE_PERF_COUNTERS typo.
Paul Mundt [Tue, 23 Jun 2009 16:41:05 +0000 (01:41 +0900)]
sh: Fix up HAVE_PERF_COUNTERS typo.

That's HAVE_PERF_COUNTERS not HAVE_PERF_COUNTER. This was right
initially but I seem to have screwed it up while re-typing it out
by hand on another machine when I checked it in. Hmph.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agokmemleak: Do not force the slab debugging Kconfig options
Catalin Marinas [Tue, 23 Jun 2009 13:40:27 +0000 (14:40 +0100)]
kmemleak: Do not force the slab debugging Kconfig options

Selecting DEBUG_SLAB or SLUB_DEBUG by the KMEMLEAK menu entry may cause
issues with other dependencies (KMEMCHECK). These configuration options
aren't strictly needed by kmemleak but they may increase the chances of
finding leaks. This patch also updates the KMEMLEAK config entry help
text.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
14 years agokmemleak: use pr_fmt
Joe Perches [Tue, 23 Jun 2009 13:40:26 +0000 (14:40 +0100)]
kmemleak: use pr_fmt

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agoasm-generic: add dummy pgprot_noncached()
Paul Mundt [Tue, 23 Jun 2009 11:51:19 +0000 (13:51 +0200)]
asm-generic: add dummy pgprot_noncached()

Most architectures now provide a pgprot_noncached(), the
remaining ones can simply use an dummy default implementation,
except for cris and xtensa, which should override the
default appropriately.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Magnus Damm <magnus.damm@gmail.com>
14 years agoipv6: Use correct data types for ICMPv6 type and code
Brian Haley [Tue, 23 Jun 2009 11:31:07 +0000 (04:31 -0700)]
ipv6: Use correct data types for ICMPv6 type and code

Change all the code that deals directly with ICMPv6 type and code
values to use u8 instead of a signed int as that's the actual data
type.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: let KS8842 driver depend on HAS_IOMEM
Heiko Carstens [Mon, 22 Jun 2009 21:32:18 +0000 (21:32 +0000)]
net: let KS8842 driver depend on HAS_IOMEM

Fixes this compile error on s390:

  CC      drivers/net/ks8842.o
drivers/net/ks8842.c: In function 'ks8842_select_bank':
drivers/net/ks8842.c:124: error: implicit declaration of function 'iowrite16'
drivers/net/ks8842.c: In function 'ks8842_write8':
drivers/net/ks8842.c:131: error: implicit declaration of function 'iowrite8'

Cc: Richard Rojfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: let SJA1000 driver depend on HAS_IOMEM
Heiko Carstens [Mon, 22 Jun 2009 21:31:20 +0000 (21:31 +0000)]
can: let SJA1000 driver depend on HAS_IOMEM

Fixes this compile error on s390:

drivers/net/can/sja1000/sja1000_platform.c: In function 'sp_read_reg':
drivers/net/can/sja1000/sja1000_platform.c:42: error: implicit declaration of function 'ioread8'
drivers/net/can/sja1000/sja1000_platform.c: In function 'sp_write_reg':
drivers/net/can/sja1000/sja1000_platform.c:47: error: implicit declaration of function 'iowrite8'
drivers/net/can/sja1000/sja1000_platform.c: In function 'sp_probe':
drivers/net/can/sja1000/sja1000_platform.c:79: error: implicit declaration of function 'ioremap_nocache'

Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix firmware init handshake
Dhananjay Phadke [Mon, 22 Jun 2009 20:26:21 +0000 (20:26 +0000)]
netxen: fix firmware init handshake

Make sure all functions run firmware init handshake.

If PCI function 0 fails to initialize firmware, mark the
state failed so that other functions on the same board
bail out quickly instead of waiting 30s for firmware
handshake.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix build with without CONFIG_PM
Dhananjay Phadke [Mon, 22 Jun 2009 20:26:20 +0000 (20:26 +0000)]
netxen: fix build with without CONFIG_PM

wrap pci suspend() and resume() with CONFIG_PM check.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosh: Fix up more dma-mapping fallout.
Paul Mundt [Tue, 23 Jun 2009 08:36:23 +0000 (17:36 +0900)]
sh: Fix up more dma-mapping fallout.

commit dbe6f1869188b6e04e38aa861dd198befb08bcd7
("dma-mapping: mark dma_sync_single and dma_sync_sg as deprecated"
conveniently broke every single SH build.

In the future it would be great if people could at least bother
figuring out how to use grep.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: SH7786 SMP support.
Paul Mundt [Fri, 19 Jun 2009 07:00:00 +0000 (16:00 +0900)]
sh: SH7786 SMP support.

SH7786 is roughly identical to SH-X3 proto SMP, though there are only 2
CPUs. This just wraps in to the existing SH-X3 SMP code with some minor
changes for SH7786, including wiring up the IPIs properly, enabling
IRQ_PER_CPU, and so forth.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Wire up the uncached fixmap on sh64 as well.
Paul Mundt [Fri, 19 Jun 2009 06:39:47 +0000 (15:39 +0900)]
sh: Wire up the uncached fixmap on sh64 as well.

Now that sh64 also can use the uncached section, wire up the fixmap for
it as well.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Use local TLB flush in set_pte_phys().
Paul Mundt [Fri, 19 Jun 2009 06:37:11 +0000 (15:37 +0900)]
sh: Use local TLB flush in set_pte_phys().

set_pte_phys() presently uses the global flush_tlb_one(), which locks on
SMP trying to do the IPI. As we have not even initialized the other CPUs
at this point, switch to the local_ variant so the flush happens on the
boot CPU.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Provide cpu_idle_wait() to fix up cpuidle/SMP build.
Paul Mundt [Fri, 19 Jun 2009 05:40:51 +0000 (14:40 +0900)]
sh: Provide cpu_idle_wait() to fix up cpuidle/SMP build.

Crib the x86 cpu_idle_wait() implementation and shove it in with the
idle code, subsequently enabling ARCH_HAS_CPU_IDLE_WAIT.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoCRISv10: remove redundant tests on unsigned
Roel Kluin [Tue, 23 Jun 2009 08:04:14 +0000 (10:04 +0200)]
CRISv10: remove redundant tests on unsigned

Since dmanr is unsigned, negatives are wrapped and caught by the other test.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
14 years ago[WATCHDOG] wdt_pci.c: remove #ifdef CONFIG_WDT_501_PCI
Wim Van Sebroeck [Fri, 19 Jun 2009 09:32:57 +0000 (09:32 +0000)]
[WATCHDOG] wdt_pci.c: remove #ifdef CONFIG_WDT_501_PCI

Change the wdt_pci.c watchdog driver so that the code is the same for
both the PCI-WDT500 as the PCI-WDT501 card. The selection of the card
is now being done via the module parameter: 'type' instead of the
config option CONFIG_WDT_501_PCI.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
14 years ago[WATCHDOG] hpwdt: Add NMI priority option
Tom Mingarelli [Thu, 18 Jun 2009 23:28:57 +0000 (23:28 +0000)]
[WATCHDOG] hpwdt: Add NMI priority option

Add a priority option so that the user can choose if we do the NMI
first or last.

Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
14 years ago[WATCHDOG] OMAP fixes: enable clock in probe, trigger timer reload
Ulrik Bech Hald [Fri, 12 Jun 2009 21:18:32 +0000 (16:18 -0500)]
[WATCHDOG] OMAP fixes: enable clock in probe, trigger timer reload

This patch contains two fixes:

1)In omap_wdt_probe() the watchdog is reset and disabled. This
requires register access and the clks needs to be enabled temporarily

2)In omap_wdt_open() the timer register needs to be reloaded
to trigger a new timer value (the default of 60s)

Tested on OMAP34xx platform (Zoom1)

Reviewed-by: Kevin Hilman <khilman@ti.deeprootsystems.com>
Signed-off-by: Ulrik Bech Hald <ubh@ti.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
14 years agoV4L/DVB (12131): BUGFIX: An incorrect Carrier Recovery Loop optimization table was...
Manu Abraham [Thu, 18 Jun 2009 07:50:53 +0000 (04:50 -0300)]
V4L/DVB (12131): BUGFIX: An incorrect Carrier Recovery Loop optimization table was being

loaded for a given chip version. This would cause the optimization in
tuning not to be applied and thus a failed expectation, in tuning speed
increment. The patch swaps the tables in use. It also fixes a possible
one in a million condition where state->dev_ver implies an older Cut
(Cut < 2.0, eventhough the driver doesn't attach to any Cut older than
2.0) or even negative (due to a bad I2C bus master driver) for the card
combination.

Thanks to Mauro Carvalho Chehab <mchehab@infradead.org> for pointing
out the issue at large.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12130): Fix a redundant compiler warning
Manu Abraham [Wed, 17 Jun 2009 19:48:17 +0000 (16:48 -0300)]
V4L/DVB (12130): Fix a redundant compiler warning

drivers/media/dvb/frontends/stv090x.c: In function ‘stv090x_optimize_carloop_short’:
drivers/media/dvb/frontends/stv090x.c:2677: warning: ‘short_crl’ may be used uninitialized in this function

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (12003): v4l2: Move bounding code outside I2C ifdef block
Trent Piepho [Fri, 12 Jun 2009 19:31:29 +0000 (16:31 -0300)]
V4L/DVB (12003): v4l2: Move bounding code outside I2C ifdef block

On Fri, 12 Jun 2009, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Move v4l_bound_align_image() outside of an #ifdef CONFIG_I2C block
> so that it is always built.  Fixes a build error:

clamp_align() should be moved as well, since it's only used by
v4l_bound_align_image().  I'm attaching an alternate version that fixes
this.  Labeled the endif too.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (11913): cx231xx: TRY_FMT should not actually set anything
Trent Piepho [Sun, 31 May 2009 00:45:46 +0000 (21:45 -0300)]
V4L/DVB (11913): cx231xx: TRY_FMT should not actually set anything

In the TRY_FMT handler the function get_scale() is called to find what the
scaler hardware will produce for a requested size.

The problem is that get_scale(struct cx231xx *dev, ..., unsigned int *vscale,
unsigned int *hscale) saves the calculated scale values into both the
pointer arguments and into dev's hscale and vscale fields.  TRY_FMT shouldn't
actually change anything in the device state.

The code to in get_scale() that writes to dev->[hv]scale can just be
deleted.  In all cases when dev's fields should be modified, get_scale()
was called with get_scale(dev, ..., &dev->hscale, &dev->vscale), so dev was
getting updated anyway.

This didn't actually cause a problem because nothing ever actually made use
of the hscale and vscale fields.  I changed cx231xx_resolution_set() to use
those fields rather than re-calculate them with a call to get_scale().

Updating [hv]scale in cx231xx_resolution_set() isn't necessary because
every call of cx231xx_resolution_set() was already preceded by a call to
get_scale() or setting the [hv]scale fields, so they will be always be
up-to-date w.r.t. width and height.

Removing the call to get_scale() from cx231xx_resolution_set() allowed
making get_scale() a static function, which is a good thing for something
with such a short name.  There is already another function with the same
name in the em28xx driver, but that one is static.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>