]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agogeneric swap(): don't return a value from swap()
Peter Zijlstra [Wed, 4 Feb 2009 23:11:59 +0000 (15:11 -0800)]
generic swap(): don't return a value from swap()

The swap() macro is accidentally retuning the value of its first argument.
Change it into a doesn't-return-anything macro before someone goes and
relies upon this behaviour.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agohpilo: open/close fix
David Altobelli [Wed, 4 Feb 2009 23:11:58 +0000 (15:11 -0800)]
hpilo: open/close fix

The device can take a while to respond to an open/close request, so
increase the time kernel will wait for response (1 ms to 10ms).

Also, properly clean up a channel on a failed open, by calling the channel
close routine.  Just freeing the memory isn't sufficient, the device needs
to be informed that the channel is no longer open, and the device memory
cleared of references to freed dma buffer.

Signed-off-by: David Altobelli <david.altobelli@hp.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokernel/async.c: fix printk warnings
Andrew Morton [Wed, 4 Feb 2009 23:11:58 +0000 (15:11 -0800)]
kernel/async.c: fix printk warnings

alpha:

kernel/async.c: In function 'run_one_entry':
kernel/async.c:141: warning: format '%lli' expects type 'long long int', but argument 2 has type 'async_cookie_t'
kernel/async.c:149: warning: format '%lli' expects type 'long long int', but argument 2 has type 'async_cookie_t'
kernel/async.c:149: warning: format '%lld' expects type 'long long int', but argument 4 has type 's64'
kernel/async.c: In function 'async_synchronize_cookie_special':
kernel/async.c:250: warning: format '%lli' expects type 'long long int', but argument 3 has type 's64'

Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomodpost: NOBITS sections may point beyond the end of the file
Tejun Heo [Thu, 5 Feb 2009 15:48:02 +0000 (00:48 +0900)]
modpost: NOBITS sections may point beyond the end of the file

Impact: fix link failure on certain toolchains with specific configs

Recent percpu change made x86_64 split .data.init section into three
separate segments - data.init, percpu and data.init2.  data.init2 gets
.data.nosave and .bss.* and is followed by .notes segment.  Depending
on configuration both segments might contain no data, in which case
the tool chain makes the section header to contain offset beyond the
end of the file.

modpost isn't too happy about it and fails build - as reported by
Pawel Dziekonski:

    Building modules, stage 2.
    MODPOST 416 modules
    FATAL: vmlinux is truncated. sechdrs[i].sh_offset=10354688 >
    sizeof(*hrd)=64
    make[1]: *** [__modpost] Error 1

Teach modpost that NOBITS section may point beyond the end of the file
and that .modinfo can't be NOBITS.

Reported-by: Pawel Dziekonski <dzieko@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: style cleanups for xen assemblies
Tejun Heo [Thu, 5 Feb 2009 15:57:48 +0000 (00:57 +0900)]
x86: style cleanups for xen assemblies

Make the following style cleanups:

* drop unnecessary //#include from xen-asm_32.S
* compulsive adding of space after comma
* reformat multiline comments

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosoftlockup: convert read_lock in hung_task to rcu_read_lock
Mandeep Singh Baines [Thu, 5 Feb 2009 17:56:08 +0000 (09:56 -0800)]
softlockup: convert read_lock in hung_task to rcu_read_lock

Since the tasklist is protected by rcu list operations, it is safe
to convert the read_lock()s to rcu_read_lock().

Suggested-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mandeep Singh Baines <msb@google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosoftlockup: check all tasks in hung_task
Mandeep Singh Baines [Thu, 5 Feb 2009 04:35:48 +0000 (20:35 -0800)]
softlockup: check all tasks in hung_task

Impact: extend the scope of hung-task checks

Changed the default value of hung_task_check_count to PID_MAX_LIMIT.
hung_task_batch_count added to put an upper bound on the critical
section. Every hung_task_batch_count checks, the rcu lock is never
held for a too long time.

Keeping the critical section small minimizes time preemption is disabled
and keeps rcu grace periods small.

To prevent following a stale pointer, get_task_struct is called on g and t.
To verify that g and t have not been unhashed while outside the critical
section, the task states are checked.

The design was proposed by Frédéric Weisbecker.

Signed-off-by: Mandeep Singh Baines <msb@google.com>
Suggested-by: Frédéric Weisbecker <fweisbec@gmail.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years ago[CPUFREQ] powernow-k8: Get transition latency from ACPI _PSS table
Mark Langsdorf [Tue, 3 Feb 2009 16:46:43 +0000 (17:46 +0100)]
[CPUFREQ] powernow-k8: Get transition latency from ACPI _PSS table

At this time, the PowerNow! driver for K8 uses an experimentally
derived formula to calculate transition latency.  The value it
provides is orders of magnitude too large on modern systems.
This patch replaces the formula with ACPI _PSS latency values
for more accuracy and better performance.

I've tested it on two 2nd generation Opteron systems, a 3rd
generation Operton system, and a Turion X2 without seeing any
stability problems.

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Dave Jones <davej@redhat.com>
16 years ago[CPUFREQ] Make ignore_nice_load setting of ondemand work as expected.
Venkatesh Pallipadi [Fri, 23 Jan 2009 14:25:02 +0000 (09:25 -0500)]
[CPUFREQ] Make ignore_nice_load setting of ondemand work as expected.

ondemand micro-accounting of idle time changes broke ignore_nice_load
sysfs setting due to a thinko in the code.

The bug entry:
http://bugzilla.kernel.org/show_bug.cgi?id=12310

Reported-by: Jim Bray <jimsantelmo@gmail.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
16 years agox86: disable intel_iommu support by default
Kyle McMartin [Wed, 4 Feb 2009 22:29:19 +0000 (14:29 -0800)]
x86: disable intel_iommu support by default

Due to recurring issues with DMAR support on certain platforms.
There's a number of filesystem corruption incidents reported:

  https://bugzilla.redhat.com/show_bug.cgi?id=479996
  http://bugzilla.kernel.org/show_bug.cgi?id=12578

Provide a Kconfig option to change whether it is enabled by
default.

If disabled, it can still be reenabled by passing intel_iommu=on to the
kernel. Keep the .config option off by default.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-By: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoALSA: ca0106 - Add missing KERN_* prefix to printk
Takashi Iwai [Thu, 5 Feb 2009 15:15:39 +0000 (16:15 +0100)]
ALSA: ca0106 - Add missing KERN_* prefix to printk

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: Add missing KERN_* prefix to printk in other sound/*
Takashi Iwai [Thu, 5 Feb 2009 15:11:58 +0000 (16:11 +0100)]
ALSA: Add missing KERN_* prefix to printk in other sound/*

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: Fix missing KERN_* prefix to printk in sound/pci
Takashi Iwai [Thu, 5 Feb 2009 15:11:31 +0000 (16:11 +0100)]
ALSA: Fix missing KERN_* prefix to printk in sound/pci

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: intel8x0 - Add missing KERN_* prefix to printk
Takashi Iwai [Thu, 5 Feb 2009 15:09:57 +0000 (16:09 +0100)]
ALSA: intel8x0 - Add missing KERN_* prefix to printk

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: emu10k1 - Add missing KERN_* prefix to printk
Takashi Iwai [Thu, 5 Feb 2009 15:08:14 +0000 (16:08 +0100)]
ALSA: emu10k1 - Add missing KERN_* prefix to printk

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: Add missing KERN_* prefix to printk in sound/pci/ice1712
Takashi Iwai [Thu, 5 Feb 2009 15:07:02 +0000 (16:07 +0100)]
ALSA: Add missing KERN_* prefix to printk in sound/pci/ice1712

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: emux - Add missing KERN_* prefix to printk
Takashi Iwai [Thu, 5 Feb 2009 15:01:46 +0000 (16:01 +0100)]
ALSA: emux - Add missing KERN_* prefix to printk

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: Add missing KERN_* prefix to printk in sound/drivers
Takashi Iwai [Thu, 5 Feb 2009 14:51:50 +0000 (15:51 +0100)]
ALSA: Add missing KERN_* prefix to printk in sound/drivers

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: Add missing KERN_* prefix to printk in sound/core
Takashi Iwai [Thu, 5 Feb 2009 14:51:04 +0000 (15:51 +0100)]
ALSA: Add missing KERN_* prefix to printk in sound/core

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: hda - Add missing KERN_* prefix to printk
Takashi Iwai [Thu, 5 Feb 2009 14:57:55 +0000 (15:57 +0100)]
ALSA: hda - Add missing KERN_* prefix to printk

... and disable the annoying debug message.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: usb - Add missing KERN_* prefix to printk
Takashi Iwai [Thu, 5 Feb 2009 14:55:18 +0000 (15:55 +0100)]
ALSA: usb - Add missing KERN_* prefix to printk

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoMerge branch 'tj-percpu' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc...
Ingo Molnar [Thu, 5 Feb 2009 14:54:27 +0000 (15:54 +0100)]
Merge branch 'tj-percpu' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into core/percpu

16 years agoALSA: isa/*: Add missing KERN_* prefix to printk
Takashi Iwai [Thu, 5 Feb 2009 14:47:51 +0000 (15:47 +0100)]
ALSA: isa/*: Add missing KERN_* prefix to printk

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: gus - Add missing KERN_* prefix to printk
Takashi Iwai [Thu, 5 Feb 2009 14:46:48 +0000 (15:46 +0100)]
ALSA: gus - Add missing KERN_* prefix to printk

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: wss - Add missing KERN_* prefix to printk
Takashi Iwai [Thu, 5 Feb 2009 14:45:05 +0000 (15:45 +0100)]
ALSA: wss - Add missing KERN_* prefix to printk

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: Add Atmel ALSA drivers directory
Hans-Christian Egtvedt [Thu, 5 Feb 2009 12:11:01 +0000 (13:11 +0100)]
ALSA: Add Atmel ALSA drivers directory

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: Add ALSA driver for Atmel AC97 controller
Hans-Christian Egtvedt [Thu, 5 Feb 2009 12:11:00 +0000 (13:11 +0100)]
ALSA: Add ALSA driver for Atmel AC97 controller

This patch adds ALSA support for the AC97 controller found on Atmel
AVR32 devices.

Tested on ATSTK1006 + ATSTK1000 with a development board with a AC97
codec.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: Add ALSA driver for Atmel Audio Bitstream DAC
Hans-Christian Egtvedt [Thu, 5 Feb 2009 12:10:59 +0000 (13:10 +0100)]
ALSA: Add ALSA driver for Atmel Audio Bitstream DAC

This patch adds ALSA support for the Audio Bistream DAC found on Atmel
AVR32 devices. The ABDAC is an Atmel IP which might show up on AT91
devices in the future, hence making a generic driver which can be
utilized by AT91 arch if needed.

Datasheet describing the ABDAC peripheral is available in the AT32AP7000
datasheet, http://www.atmel.com/dyn/products/datasheets.asp?family_id=682

Tested on ATSTK1006 + ATSTK1000 with a class D amplifier stage.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoMerge branch 'topic/snd_card_new-err' into topic/atmel
Takashi Iwai [Thu, 5 Feb 2009 14:08:33 +0000 (15:08 +0100)]
Merge branch 'topic/snd_card_new-err' into topic/atmel

16 years agoBtrfs: Fix memory leak in cache_drop_leaf_ref
Chris Mason [Thu, 5 Feb 2009 14:08:14 +0000 (09:08 -0500)]
Btrfs: Fix memory leak in cache_drop_leaf_ref

The code wasn't doing a kfree on the sorted array

Signed-off-by: Chris Mason <chris.mason@oracle.com>
16 years agoALSA: snd_pcm_new api cleanup
Tim Blechmann [Thu, 5 Feb 2009 12:01:54 +0000 (13:01 +0100)]
ALSA: snd_pcm_new api cleanup

Impact: cleanup

snd_pcm_new takes a char *id argument, although it is not modifying
the string. it can therefore be declared as const char *id.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: hda - Add quirk for another HP laptop
Takashi Iwai [Thu, 5 Feb 2009 14:02:06 +0000 (15:02 +0100)]
ALSA: hda - Add quirk for another HP laptop

Add model=laptop entry for another HP laptop (103c:3077) with AD1984A.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agotrace: code style clean up
Steven Rostedt [Thu, 5 Feb 2009 06:13:38 +0000 (01:13 -0500)]
trace: code style clean up

Ingo Molnar suggested using goto logic to keep the indentation
down and to be able to remove the nasty line breaks. This actually
makes the code a bit more readable.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agotrace: Remove unused trace_array_cpu parameter
Arnaldo Carvalho de Melo [Thu, 5 Feb 2009 06:13:37 +0000 (01:13 -0500)]
trace: Remove unused trace_array_cpu parameter

Impact: cleanup

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agotrace_branch: Remove unused function
Arnaldo Carvalho de Melo [Thu, 5 Feb 2009 06:13:36 +0000 (01:13 -0500)]
trace_branch: Remove unused function

Impact: cleanup

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agotrace: assign defaults at register_ftrace_event
Arnaldo Carvalho de Melo [Wed, 4 Feb 2009 22:16:39 +0000 (20:16 -0200)]
trace: assign defaults at register_ftrace_event

Impact: simplification of tracers

As all tracers are doing this we might as well do it in
register_ftrace_event and save one branch each time we call these
callbacks.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branches 'tracing/ftrace' and 'linus' into tracing/core
Ingo Molnar [Thu, 5 Feb 2009 13:33:31 +0000 (14:33 +0100)]
Merge branches 'tracing/ftrace' and 'linus' into tracing/core

16 years agoprintk: introduce printk_once()
Ingo Molnar [Thu, 5 Feb 2009 12:45:43 +0000 (13:45 +0100)]
printk: introduce printk_once()

This pattern shows up frequently in the kernel:

  static int once = 1;
  ...

if (once) {
once = 0;
printk(KERN_ERR "message\n");
}
  ...

So add a printk_once() helper macro that reduces this to a single line
of:

printk_once(KERN_ERR "message\n");

It works analogously to WARN_ONCE() & friends. (We use a macro not
an inline because vararg expansion in inlines looks awkward and the
macro is simple enough.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agotimers: split process wide cpu clocks/timers
Peter Zijlstra [Thu, 5 Feb 2009 11:24:16 +0000 (12:24 +0100)]
timers: split process wide cpu clocks/timers

Change the process wide cpu timers/clocks so that we:

 1) don't mess up the kernel with too many threads,
 2) don't have a per-cpu allocation for each process,
 3) have no impact when not used.

In order to accomplish this we're going to split it into two parts:

 - clocks; which can take all the time they want since they run
           from user context -- ie. sys_clock_gettime(CLOCK_PROCESS_CPUTIME_ID)

 - timers; which need constant time sampling but since they're
           explicity used, the user can pay the overhead.

The clock readout will go back to a full sum of the thread group, while the
timers will run of a global 'clock' that only runs when needed, so only
programs that make use of the facility pay the price.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosignal: re-add dead task accumulation stats.
Peter Zijlstra [Thu, 5 Feb 2009 11:24:15 +0000 (12:24 +0100)]
signal: re-add dead task accumulation stats.

We're going to split the process wide cpu accounting into two parts:

 - clocks; which can take all the time they want since they run
           from user context.

 - timers; which need constant time tracing but can affort the overhead
           because they're default off -- and rare.

The clock readout will go back to a full sum of the thread group, for this
we need to re-add the exit stats that were removed in the initial itimer
rework (f06febc9: timers: fix itimer/many thread hang).

Furthermore, since that full sum can be rather slow for large thread groups
and we have the complete dead task stats, revert the do_notify_parent time
computation.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'sched/urgent' into timers/urgent
Ingo Molnar [Thu, 5 Feb 2009 12:03:28 +0000 (13:03 +0100)]
Merge branch 'sched/urgent' into timers/urgent

Merging it here because an upcoming timers/urgent fix relies on
a change already in sched/urgent and not yet upstream.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoALSA: hda - Add quirk for HP zenith laptop
Takashi Iwai [Thu, 5 Feb 2009 11:14:52 +0000 (12:14 +0100)]
ALSA: hda - Add quirk for HP zenith laptop

Added model=laptop for another HP laptop (103c:3072) with AD1984A codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: snd-usb-caiaq: Increase version number to 1.3.12
Mark Hills [Wed, 4 Feb 2009 22:34:34 +0000 (22:34 +0000)]
ALSA: snd-usb-caiaq: Increase version number to 1.3.12

Indicates fixes affecting control messages and switching of input mode
on Audio 8 DJ and Audio 4 DJ.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: snd-usb-caiaq: Remove duplicate A8DJ control
Mark Hills [Wed, 4 Feb 2009 22:34:33 +0000 (22:34 +0000)]
ALSA: snd-usb-caiaq: Remove duplicate A8DJ control

Remove a duplicate control which causes an error when it is registered,
and causes later controls to not be registered. The device does not have
a fourth ground lift control.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: snd-usb-caiaq: Do not expose hardware input mode 0 of A4DJ
Mark Hills [Wed, 4 Feb 2009 22:34:32 +0000 (22:34 +0000)]
ALSA: snd-usb-caiaq: Do not expose hardware input mode 0 of A4DJ

In the context of the Audio 4 DJ (when compared to Audio 8 DJ), hardware
input mode 0 is not used. Expose modes 1 (line) and 2 (phono) to the user
as modes 0 and 1 respectively.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: snd-usb-caiaq: Set default input mode of A4DJ
Mark Hills [Wed, 4 Feb 2009 22:34:31 +0000 (22:34 +0000)]
ALSA: snd-usb-caiaq: Set default input mode of A4DJ

Do not start the device with input mode undefined. Mimic the behaviour of
the Audio 8 DJ and start in phono input mode.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: snd-usb-caiaq: Send the correct command when setting controls
Mark Hills [Wed, 4 Feb 2009 22:34:30 +0000 (22:34 +0000)]
ALSA: snd-usb-caiaq: Send the correct command when setting controls

Fixes a bug where an incorrect command was sent which had no effect on the
device.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: Remove superfluous hwdep ops
Takashi Iwai [Thu, 5 Feb 2009 08:28:08 +0000 (09:28 +0100)]
ALSA: Remove superfluous hwdep ops

Remove NOP hwdep ops in sound drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: hwdep - Fix coding style
Takashi Iwai [Thu, 5 Feb 2009 08:17:50 +0000 (09:17 +0100)]
ALSA: hwdep - Fix coding style

Fix misc coding style issues in hwdep.h and add some comments.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: hwdep - Make open callback optional
Takashi Iwai [Thu, 5 Feb 2009 08:10:20 +0000 (09:10 +0100)]
ALSA: hwdep - Make open callback optional

Don't require the open callback as mandatory.
Now all hwdeps ops can be optional.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: hda: Added stac378x digital slave out struct
Matthew Ranostay [Wed, 4 Feb 2009 22:49:41 +0000 (17:49 -0500)]
ALSA: hda: Added stac378x digital slave out struct

Added the ADATOut nid to a slave digital outs struct to allow output
via the DigOut pin.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: hda - Don't call stac92xx_parse_auto_config with wrong dig_in
Herton Ronaldo Krzesinski [Wed, 4 Feb 2009 16:37:27 +0000 (11:37 -0500)]
ALSA: hda - Don't call stac92xx_parse_auto_config with wrong dig_in

Don't use uneeded/wrong third parameter for stac92xx_parse_auto_config
in patch_stac92hd71bxx (no SPDIF in).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: hda - Dynamic detection of dmics/dmuxes/smuxes in stac92hd71bxx
Herton Ronaldo Krzesinski [Wed, 4 Feb 2009 16:34:22 +0000 (11:34 -0500)]
ALSA: hda - Dynamic detection of dmics/dmuxes/smuxes in stac92hd71bxx

Detect the number of connected ports and number of smuxes dynamically,
looking at pin configs, using new introduced functions
stac92hd71bxx_connected_ports and stac92hd71bxx_connected_smuxes. Also
use proper input mux configuration for 4port and 5port models.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoALSA: hda - Additional pin nids for STAC92HD71Bx and STAC92HD75Bx codecs
Herton Ronaldo Krzesinski [Wed, 4 Feb 2009 16:23:19 +0000 (11:23 -0500)]
ALSA: hda - Additional pin nids for STAC92HD71Bx and STAC92HD75Bx codecs

Current code for STAC92HD71Bx and STAC92HD75Bx doesn't consider pin
complexes 0x20 and 0x27. Also for 4 port models, nids 0x0e and 0x0f
are vendor reserved. This commit changes code so it'll consider the
additional pin complexes for models that have it, and avoid reserved
nids to be touched on 4 port models.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Thu, 5 Feb 2009 06:42:28 +0000 (07:42 +0100)]
Merge branch 'fix/hda' into topic/hda

16 years agoALSA: hda - Fix misc workqueue issues
Takashi Iwai [Thu, 5 Feb 2009 06:34:28 +0000 (07:34 +0100)]
ALSA: hda - Fix misc workqueue issues

Some fixes regarding snd-hda-intel workqueue:
- Use create_singlethread_workqueue() instead of create_workqueue()
  as per-CPU work isn't required.
- Allocate workq name string properly
- Renamed the workq name to "hd-audio*" to be more obvious.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agocrypto: shash - Fix tfm destruction
Herbert Xu [Thu, 5 Feb 2009 05:51:25 +0000 (16:51 +1100)]
crypto: shash - Fix tfm destruction

We were freeing an offset into the slab object instead of the
start.  This patch fixes it by calling crypto_destroy_tfm which
allows the correct address to be given.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years agocrypto: api - Fix zeroing on free
Herbert Xu [Thu, 5 Feb 2009 05:48:24 +0000 (16:48 +1100)]
crypto: api - Fix zeroing on free

Geert Uytterhoeven pointed out that we're not zeroing all the
memory when freeing a transform.  This patch fixes it by calling
ksize to ensure that we zero everything in sight.

Reported-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years agox86: don't apply __supported_pte_mask to non-present ptes
Jeremy Fitzhardinge [Thu, 5 Feb 2009 02:33:38 +0000 (18:33 -0800)]
x86: don't apply __supported_pte_mask to non-present ptes

On an x86 system which doesn't support global mappings,
__supported_pte_mask has _PAGE_GLOBAL clear, to make sure it never
appears in the PTE.  pfn_pte() and so on will enforce it with:

static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot)
{
return __pte((((phys_addr_t)page_nr << PAGE_SHIFT) |
      pgprot_val(pgprot)) & __supported_pte_mask);
}

However, we overload _PAGE_GLOBAL with _PAGE_PROTNONE on non-present
ptes to distinguish them from swap entries.  However, applying
__supported_pte_mask indiscriminately will clear the bit and corrupt the
pte.

I guess the best fix is to only apply __supported_pte_mask to present
ptes.  This seems like the right solution to me, as it means we can
completely ignore the issue of overlaps between the present pte bits and
the non-present pte-as-swap entry use of the bits.

__supported_pte_mask contains the set of flags we support on the
current hardware.  We also use bits in the pte for things like
logically present ptes with no permissions, and swap entries for
swapped out pages.  We should only apply __supported_pte_mask to
present ptes, because otherwise we may destroy other information being
stored in the ptes.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
16 years agocrypto: shash - Fix module refcount
Adrian-Ken Rueegsegger [Thu, 5 Feb 2009 05:19:31 +0000 (16:19 +1100)]
crypto: shash - Fix module refcount

Module reference counting for shash is incorrect: when
a new shash transformation is created the refcount is not
increased as it should.

Signed-off-by: Adrian-Ken Rueegsegger <rueegsegger@swiss-it.ch>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years agox86: uaccess: use errret as error value in __put_user_size()
Hiroshi Shimamoto [Sat, 31 Jan 2009 02:16:46 +0000 (18:16 -0800)]
x86: uaccess: use errret as error value in __put_user_size()

Impact: cleanup

In __put_user_size() macro errret is used for error value.
But if size is 8, errret isn't passed to__put_user_asm_u64().
This behavior is inconsistent.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
16 years agoPCI PM: make the PM core more careful with drivers using the new PM framework
Rafael J. Wysocki [Wed, 4 Feb 2009 01:09:07 +0000 (02:09 +0100)]
PCI PM: make the PM core more careful with drivers using the new PM framework

Currently, the PM core always attempts to manage devices with drivers
that use the new PM framework.  In particular, it attempts to disable
the devices (which is unnecessary), to save their state (which may be
undesirable if the driver has done that already) and to put them into
low power states (again, this may be undesirable if the driver has
already put the device into a low power state).  That need not be
the right thing to do, so make the core be more careful in this
respect.

Generally, there are the following categories of devices to consider:
* bridge devices without drivers
* non-bridge devices without drivers
* bridge devices with drivers
* non-bridge devices with drivers
and each of them should be handled differently.

For bridge devices without drivers the PCI PM core will save their
state on suspend and restore it (early) during resume, after putting
them into D0 if necessary.  It will not attempt to do anything else
to these devices.

For non-bridge devices without drivers the PCI PM core will disable
them and save their state on suspend.  During resume, it will put
them into D0, if necessary, restore their state (early) and reenable
them.

For bridge devices with drivers the PCI PM core will only save
their state on suspend if the driver hasn't done that already.
Still, the core will restore their state (early) during resume,
after putting them into D0, if necessary.

For non-bridge devices with drivers the PCI PM core will only save
their state on suspend if the driver hasn't done that already.  Also,
if the state of the device hasn't been saved by the driver, the core
will attempt to put the device into a low power state.  During
resume the core will restore the state of the device (early), after
putting it into D0, if necessary.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoPCI PM: Read power state from device after trying to change it on resume
Rafael J. Wysocki [Wed, 4 Feb 2009 01:02:15 +0000 (02:02 +0100)]
PCI PM: Read power state from device after trying to change it on resume

pci_restore_standard_config() unconditionally changes current_state
to PCI_D0 after attempting to change the device's power state, but
it should rather read the actual current power state from the
device.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoPCI PM: Do not disable and enable bridges during suspend-resume
Rafael J. Wysocki [Wed, 4 Feb 2009 01:01:15 +0000 (02:01 +0100)]
PCI PM: Do not disable and enable bridges during suspend-resume

It is a mistake to disable and enable PCI bridges and PCI Express
ports during suspend-resume, at least at the time when it is
currently done.  Disabling them may lead to problems with accessing
devices behind them and they should be automatically enabled when
their standard config spaces are restored.  Fix this by not attempting
to disable bridges during suspend and enable them during resume.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoPCI: PCIe portdrv: Simplify suspend and resume
Rafael J. Wysocki [Wed, 4 Feb 2009 01:00:11 +0000 (02:00 +0100)]
PCI: PCIe portdrv: Simplify suspend and resume

Simplify suspend and resume of the PCI Express port driver.  It no
longer needs to save and restore the standard configuration space of the
device; this is now done by the PCI PM core layer.

This patch is reported to fix the regression tracked as
http://bugzilla.kernel.org/show_bug.cgi?id=12598

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-and-tested-by: Parag Warudkar <parag.lkml@gmail.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoPCI PM: Fix saving of device state in pci_legacy_suspend
Rafael J. Wysocki [Wed, 4 Feb 2009 00:59:09 +0000 (01:59 +0100)]
PCI PM: Fix saving of device state in pci_legacy_suspend

Make pci_legacy_suspend() save the state of the device if it is
in PCI_UNKNOWN after its suspend callback has run and warn only if
the power state of the device has been changed by its suspend
callback.

Also, use WARN_ONCE(), which is more useful, in pci_legacy_suspend(),
so that the name of the offending function is printed.

Additionally, remove the unnecessary line of code setting
pci_dev->state_saved.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoPCI PM: Check if the state has been saved before trying to restore it
Rafael J. Wysocki [Wed, 4 Feb 2009 00:57:22 +0000 (01:57 +0100)]
PCI PM: Check if the state has been saved before trying to restore it

Check if the standard configuration registers of a PCI device have
been saved during suspend before trying to restore them during
resume.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoPCI PM: Fix handling of devices without drivers
Rafael J. Wysocki [Wed, 4 Feb 2009 00:56:14 +0000 (01:56 +0100)]
PCI PM: Fix handling of devices without drivers

Suspend to RAM is reported to break on some machines as a result of
attempting to put one of driverless PCI devices into a low power
state.  Avoid that by not attepmting to power manage driverless
devices during suspend.

Fix up pci_pm_poweroff() after a previous incomplete fix for the same
thing during hibernation.

This patch is reported to fix the regression from 2.6.28 tracked as
http://bugzilla.kernel.org/show_bug.cgi?id=12605

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-and-tested-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoxen: use direct ops on 64-bit
Jeremy Fitzhardinge [Mon, 2 Feb 2009 21:55:54 +0000 (13:55 -0800)]
xen: use direct ops on 64-bit

Enable the use of the direct vcpu-access operations on 64-bit.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
16 years agoxen: make direct versions of irq_enable/disable/save/restore to common code
Jeremy Fitzhardinge [Mon, 2 Feb 2009 21:55:42 +0000 (13:55 -0800)]
xen: make direct versions of irq_enable/disable/save/restore to common code

Now that x86-64 has directly accessible percpu variables, it can also
implement the direct versions of these operations, which operate on a
vcpu_info structure directly embedded in the percpu area.

In fact, the 64-bit versions are more or less identical, and so can be
shared.  The only two differences are:
 1. xen_restore_fl_direct takes its argument in eax on 32-bit, and rdi on 64-bit.
    Unfortunately it isn't possible to directly refer to the 2nd lsb of rdi directly
    (as you can with %ah), so the code isn't quite as dense.
 2. check_events needs to variants to save different registers.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
16 years agoxen: setup percpu data pointers
Jeremy Fitzhardinge [Mon, 2 Feb 2009 21:55:31 +0000 (13:55 -0800)]
xen: setup percpu data pointers

We need to access percpu data fairly early, so set up the percpu
registers as soon as possible.  We only need to load the appropriate
segment register.  We already have a GDT, but its hard to change it
early because we need to manipulate the pagetable to do so, and that
hasn't been set up yet.

Also, set the kernel stack when bringing up secondary CPUs.  If we
don't they all end up sharing the same stack...

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
16 years agoPCI: return error on failure to read PCI ROMs
Timothy S. Nelson [Thu, 29 Jan 2009 19:12:47 +0000 (06:12 +1100)]
PCI: return error on failure to read PCI ROMs

This patch makes the ROM reading code return an error to user space if
the size of the ROM read is equal to 0.

The patch also emits a warnings if the contents of the ROM are invalid,
and documents the effects of the "enable" file on ROM reading.

Signed-off-by: Timothy S. Nelson <wayland@wayland.id.au>
Acked-by: Alex Villacis-Lasso <a_villacis@palosanto.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoPCI: properly clean up ASPM link state on device remove
Alex Chiang [Wed, 28 Jan 2009 21:59:18 +0000 (14:59 -0700)]
PCI: properly clean up ASPM link state on device remove

We only want to disable ASPM when the last function is removed from
the parent's device list. We determine this by checking to see if
the parent's device list is completely empty.

Unfortunately, we never hit that code because the parent is considered
an upstream port, and never had an ASPM link_state associated with it.

The early check for !link_state causes us to return early, we never
discover that our device list is empty, and thus we never remove the
downstream ports' link_state nodes.

Instead of checking to see if the parent's device list is empty, we can
check to see if we are the last device on the list, and if so, then we
know that we can clean up properly.

Cc: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
16 years agoMerge branch 'core/percpu' into x86/paravirt
H. Peter Anvin [Thu, 5 Feb 2009 00:58:26 +0000 (16:58 -0800)]
Merge branch 'core/percpu' into x86/paravirt

16 years agonet: Reexport sock_alloc_send_pskb
Herbert Xu [Thu, 5 Feb 2009 00:55:54 +0000 (16:55 -0800)]
net: Reexport sock_alloc_send_pskb

The function sock_alloc_send_pskb is completely useless if not
exported since most of the code in it won't be used as is.  In
fact, this code has already been duplicated in the tun driver.

Now that we need accounting in the tun driver, we can in fact
use this function as is.  So this patch marks it for export again.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Partially allow skb destructors to be used on receive path
Herbert Xu [Thu, 5 Feb 2009 00:55:27 +0000 (16:55 -0800)]
net: Partially allow skb destructors to be used on receive path

As it currently stands, skb destructors are forbidden on the
receive path because the protocol end-points will overwrite
any existing destructor with their own.

This is the reason why we have to call skb_orphan in the loopback
driver before we reinject the packet back into the stack, thus
creating a period during which loopback traffic isn't charged
to any socket.

With virtualisation, we have a similar problem in that traffic
is reinjected into the stack without being associated with any
socket entity, thus providing no natural congestion push-back
for those poor folks still stuck with UDP.

Now had we been consistent in telling them that UDP simply has
no congestion feedback, I could just fob them off.  Unfortunately,
we appear to have gone to some length in catering for this on
the standard UDP path, with skb/socket accounting so that has
created a very unhealthy dependency.

Alas habits are difficult to break out of, so we may just have
to allow skb destructors on the receive path.

It turns out that making skb destructors useable on the receive path
isn't as easy as it seems.  For instance, simply adding skb_orphan
to skb_set_owner_r isn't enough.  This is because we assume all
over the IP stack that skb->sk is an IP socket if present.

The new transparent proxy code goes one step further and assumes
that skb->sk is the receiving socket if present.

Now all of this can be dealt with by adding simple checks such
as only treating skb->sk as an IP socket if skb->sk->sk_family
matches.  However, it turns out that for bridging at least we
don't need to do all of this work.

This is of interest because most virtualisation setups use bridging
so we don't actually go through the IP stack on the host (with
the exception of our old nemesis the bridge netfilter, but that's
easily taken care of).

So this patch simply adds skb_orphan to the point just before we
enter the IP stack, but after we've gone through the bridge on the
receive path.  It also adds an skb_orphan to the one place in
netfilter that touches skb->sk/skb->destructor, that is, tproxy.

One word of caution, because of the internal code structure, anyone
wishing to deploy this must use skb_set_owner_w as opposed to
skb_set_owner_r since many functions that create a new skb from
an existing one will invoke skb_set_owner_w on the new skb.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Thu, 5 Feb 2009 00:52:41 +0000 (16:52 -0800)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

16 years agoMerge branch 'master' of /home/davem/src/GIT/linux-2.6/
David S. Miller [Thu, 5 Feb 2009 00:51:58 +0000 (16:51 -0800)]
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/

16 years agoxen: fix 32-bit build resulting from mmu move
Jeremy Fitzhardinge [Mon, 2 Feb 2009 21:58:06 +0000 (13:58 -0800)]
xen: fix 32-bit build resulting from mmu move

Moving the mmu code from enlighten.c to mmu.c inadvertently broke the
32-bit build.  Fix it.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
16 years agogianfar: Fix stashing support
Andy Fleming [Thu, 5 Feb 2009 00:43:44 +0000 (16:43 -0800)]
gianfar: Fix stashing support

Stashing is only supported on the 85xx (e500-based) SoCs.  The 83xx and 86xx
chips don't have a proper cache for this.  U-Boot has been updated to add
stashing properties to the device tree nodes of gianfar devices on 85xx.  So
now we modify Linux to keep stashing off unless those properties are there.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agogianfar: Add support for skb recycling
Andy Fleming [Thu, 5 Feb 2009 00:43:16 +0000 (16:43 -0800)]
gianfar: Add support for skb recycling

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetdev: Merge UCC and gianfar MDIO bus drivers
Andy Fleming [Thu, 5 Feb 2009 00:42:12 +0000 (16:42 -0800)]
netdev: Merge UCC and gianfar MDIO bus drivers

The MDIO bus drivers for the UCC and gianfar ethernet controllers are
essentially the same.  There's no reason to duplicate that much code.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agogianfar: Fix potential soft reset race
Andy Fleming [Thu, 5 Feb 2009 00:38:05 +0000 (16:38 -0800)]
gianfar: Fix potential soft reset race

SOFT_RESET must be asserted for at least 3 TX clocks in order for it to work
properly.  The syncs in the gfar_write() commands have been hiding this, but
we need to guarantee it.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agogianfar: Fix BD_LENGTH_MASK definition
Andy Fleming [Thu, 5 Feb 2009 00:37:40 +0000 (16:37 -0800)]
gianfar: Fix BD_LENGTH_MASK definition

BD_LENGTH_MASK is supposed to catch the low 16-bits of the status field, not
the low byte.  The old way, we would never be able to clean up tx packets with
sizes divisible by 256.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agovirtio_net: Allow setting the MAC address of the NIC
Alex Williamson [Thu, 5 Feb 2009 00:36:34 +0000 (16:36 -0800)]
virtio_net: Allow setting the MAC address of the NIC

Many physical NICs let the OS re-program the "hardware" MAC
address.  Virtual NICs should allow this too.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Acked-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agovirtio_net: Add support for VLAN filtering in the hypervisor
Alex Williamson [Wed, 4 Feb 2009 09:02:50 +0000 (09:02 +0000)]
virtio_net: Add support for VLAN filtering in the hypervisor

VLAN filtering allows the hypervisor to drop packets from VLANs
that we're not a part of, further reducing the number of extraneous
packets recieved.  This makes use of the VLAN virtqueue command class.
The CTRL_VLAN feature bit tells us whether the backend supports VLAN
filtering.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agovirtio_net: Add a MAC filter table
Alex Williamson [Wed, 4 Feb 2009 09:02:45 +0000 (09:02 +0000)]
virtio_net: Add a MAC filter table

Make use of the MAC control virtqueue class to support a MAC
filter table.  The filter table is managed by the hypervisor.
We consider the table to be available if the CTRL_RX feature
bit is set.  We leave it to the hypervisor to manage the table
and enable promiscuous or all-multi mode as necessary depending
on the resources available to it.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agovirtio_net: Add a set_rx_mode interface
Alex Williamson [Wed, 4 Feb 2009 09:02:40 +0000 (09:02 +0000)]
virtio_net: Add a set_rx_mode interface

Make use of the RX_MODE control virtqueue class to enable the
set_rx_mode netdev interface.  This allows us to selectively
enable/disable promiscuous and allmulti mode so we don't see
packets we don't want.  For now, we automatically enable these
as needed if additional unicast or multicast addresses are
requested.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agovirtio_net: Add a virtqueue for outbound control commands
Alex Williamson [Wed, 4 Feb 2009 09:02:34 +0000 (09:02 +0000)]
virtio_net: Add a virtqueue for outbound control commands

This will be used for RX mode, MAC filter table, VLAN filtering, etc...

The control transaction consists of one or more "out" sg entries and
one or more "in" sg entries.  The first out entry contains a header
defining the class and command.  Additional out entries may provide
data for the command.  The last in entry provides a status response
back from the command.

Virtqueues typically run asynchronous, running a callback function
when there's data in the channel.  We can't readily make use of this
in the command paths where we need to use this.  Instead, we kick
the virtqueue and spin.  The kick causes an I/O write, triggering an
immediate trap into the hypervisor.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agocxgb3: Fix lro switch
Divy Le Ray [Thu, 5 Feb 2009 00:31:39 +0000 (16:31 -0800)]
cxgb3: Fix lro switch

The LRO switch is always set to 1 in the rx processing loop.
It breaks the accelerated iSCSI receive traffic.
Fix its computation.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agox86: mm: introduce helper function in fault.c
Hiroshi Shimamoto [Wed, 4 Feb 2009 23:24:09 +0000 (15:24 -0800)]
x86: mm: introduce helper function in fault.c

Impact: cleanup

Introduce helper function fault_in_kernel_address() to make editors happy.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
16 years agox86: fix grammar in user-visible BIOS warning
Alex Chiang [Wed, 4 Feb 2009 23:44:01 +0000 (16:44 -0700)]
x86: fix grammar in user-visible BIOS warning

Fix user-visible grammo.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix hpet timer reinit for x86_64
Pavel Emelyanov [Wed, 4 Feb 2009 10:40:31 +0000 (13:40 +0300)]
x86: fix hpet timer reinit for x86_64

There's a small problem with hpet_rtc_reinit function - it checks
for the:

hpet_readl(HPET_COUNTER) - hpet_t1_cmp > 0

to continue increasing both the HPET_T1_CMP (register) and the
hpet_t1_cmp (variable).

But since the HPET_COUNTER is always 32-bit, if the hpet_t1_cmp
is 64-bit this condition will always be FALSE once the latter hits
the 32-bit boundary, and we can have a situation, when we don't
increase the HPET_T1_CMP register high enough.

The result - timer stops ticking, since HPET_T1_CMP becomes less,
than the COUNTER and never increased again.

The solution is (based on Linus's suggestion) to not compare 64-bits
(on 64-bit x86), but to do the comparison on 32-bit signed
integers.

Reported-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Wed, 4 Feb 2009 22:32:03 +0000 (23:32 +0100)]
Merge branch 'fix/hda' into topic/hda

16 years agoALSA: hda - Add quirk for FSC Amilo Xi2550
Takashi Iwai [Wed, 4 Feb 2009 22:30:19 +0000 (23:30 +0100)]
ALSA: hda - Add quirk for FSC Amilo Xi2550

Added model=fujisu-pi2515 for FSC Amilo Xi2550 with ALC883 codec.

Refernece: Novell bnc#450979
https://bugzilla.novell.com/show_bug.cgi?id=450979

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 4 Feb 2009 21:58:50 +0000 (13:58 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: APIC: enable workaround on AMD Fam10h CPUs
  xen: disable interrupts before saving in percpu
  x86: add x86@kernel.org to MAINTAINERS
  x86: push old stack address on irqstack for unwinder
  irq, x86: fix lock status with numa_migrate_irq_desc
  x86: add cache descriptors for Intel Core i7
  x86/Voyager: make it build and boot

16 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 4 Feb 2009 21:58:37 +0000 (13:58 -0800)]
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/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: add missing kernel-doc in sched.h

16 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 4 Feb 2009 21:58:24 +0000 (13:58 -0800)]
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ftrace: do_each_pid_task() needs rcu lock

16 years agosparc64: Call dump_stack() in die_nmi().
David S. Miller [Wed, 4 Feb 2009 21:48:11 +0000 (13:48 -0800)]
sparc64: Call dump_stack() in die_nmi().

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosched: fix nohz load balancer on cpu offline
Suresh Siddha [Wed, 4 Feb 2009 19:59:44 +0000 (11:59 -0800)]
sched: fix nohz load balancer on cpu offline

Christian Borntraeger reports:

> After a logical cpu offline, even on a complete idle system, there
> is one cpu with full ticks. It turns out that nohz.cpu_mask has the
> the offlined cpu still set.
>
> In select_nohz_load_balancer() we check if the system is completely
> idle to turn of load balancing. We compare cpu_online_map with
> nohz.cpu_mask.  Since cpu_online_map is updated on cpu unplug,
> but nohz.cpu_mask is not, the check fails and the scheduler believes
> that we need an "idle load balancer" even on a fully idle system.
> Since the ilb cpu does not deactivate the timer tick this breaks NOHZ.

Fix the select_nohz_load_balancer() to not set the nohz.cpu_mask
while a cpu is going offline.

Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>