linux-2.6
15 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 9 Apr 2009 17:37:28 +0000 (10:37 -0700)] 
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: do not count frozen tasks toward load
  sched: refresh MAINTAINERS entry
  sched: Print sched_group::__cpu_power in sched_domain_debug
  cpuacct: add per-cgroup utime/stime statistics
  posixtimers, sched: Fix posix clock monotonicity
  sched_rt: don't allocate cpumask in fastpath
  cpuacct: make cpuacct hierarchy walk in cpuacct_charge() safe when rcupreempt is used -v2

15 years agosh: Add support for DMA API debugging.
Paul Mundt [Thu, 9 Apr 2009 17:36:54 +0000 (10:36 -0700)] 
sh: Add support for DMA API debugging.

This wires up support for the generic DMA API debugging.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoMerge branches 'core-fixes-for-linus', 'irq-fixes-for-linus' and 'timers-fixes-for...
Linus Torvalds [Thu, 9 Apr 2009 17:35:30 +0000 (10:35 -0700)] 
Merge branches 'core-fixes-for-linus', 'irq-fixes-for-linus' and 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  printk: fix wrong format string iter for printk
  futex: comment requeue key reference semantics

* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  irq: fix cpumask memory leak on offstack cpumask kernels

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  posix-timers: fix RLIMIT_CPU && setitimer(CPUCLOCK_PROF)
  posix-timers: fix RLIMIT_CPU && fork()
  timers: add missing kernel-doc

15 years agoMN10300: Convert obsolete no_irq_type to no_irq_chip
Thomas Gleixner [Thu, 9 Apr 2009 17:18:47 +0000 (18:18 +0100)] 
MN10300: Convert obsolete no_irq_type to no_irq_chip

Convert the last remaining users to no_irq_chip.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomutex: have non-spinning mutexes on s390 by default
Heiko Carstens [Thu, 9 Apr 2009 16:48:34 +0000 (18:48 +0200)] 
mutex: have non-spinning mutexes on s390 by default

Impact: performance regression fix for s390

The adaptive spinning mutexes will not always do what one would expect on
virtualized architectures like s390. Especially the cpu_relax() loop in
mutex_spin_on_owner might hurt if the mutex holding cpu has been scheduled
away by the hypervisor.

We would end up in a cpu_relax() loop when there is no chance that the
state of the mutex changes until the target cpu has been scheduled again by
the hypervisor.

For that reason we should change the default behaviour to no-spin on s390.

We do have an instruction which allows to yield the current cpu in favour of
a different target cpu. Also we have an instruction which allows us to figure
out if the target cpu is physically backed.

However we need to do some performance tests until we can come up with
a solution that will do the right thing on s390.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
LKML-Reference: <20090409184834.7a0df7b2@osiris.boeblingen.de.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agofuse: fix "direct_io" private mmap
Miklos Szeredi [Thu, 9 Apr 2009 15:37:53 +0000 (17:37 +0200)] 
fuse: fix "direct_io" private mmap

MAP_PRIVATE mmap could return stale data from the cache for
"direct_io" files.  Fix this by flushing the cache on mmap.

Found with a slightly modified fsx-linux.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
15 years agofuse: fix argument type in fuse_get_user_pages()
Miklos Szeredi [Thu, 9 Apr 2009 15:37:52 +0000 (17:37 +0200)] 
fuse: fix argument type in fuse_get_user_pages()

Fix the following warning:

fs/fuse/file.c: In function 'fuse_direct_io':
fs/fuse/file.c:1002: warning: passing argument 3 of 'fuse_get_user_pages' from incompatible pointer type

This was introduced by commit f4975c67 "fuse: allow kernel to access
"direct_io" files".

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
Linus Torvalds [Thu, 9 Apr 2009 15:01:21 +0000 (08:01 -0700)] 
Merge git://git./linux/kernel/git/agk/linux-2.6-dm

* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
  dm kcopyd: fix callback race
  dm kcopyd: prepare for callback race fix
  dm: implement basic barrier support
  dm: remove dm_request loop
  dm: rework queueing and suspension
  dm: simplify dm_request loop
  dm: split DMF_BLOCK_IO flag into two
  dm: rearrange dm_wq_work
  dm: remove limited barrier support
  dm: add integrity support

15 years agomodule: try_then_request_module must wait
Herbert Xu [Thu, 9 Apr 2009 02:35:47 +0000 (10:35 +0800)] 
module: try_then_request_module must wait

Since the whole point of try_then_request_module is to retry
the operation after a module has been loaded, we must wait for
the module to fully load.

Otherwise all sort of things start breaking, e.g., you won't
be able to read your encrypted disks on the first attempt.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Maciej Rutecki <maciej.rutecki@gmail.com>
Tested-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Wim Van Sebroeck [Thu, 9 Apr 2009 05:51:57 +0000 (05:51 +0000)] 
Merge branch 'master' of /linux/kernel/git/torvalds/linux-2.6

15 years agosched: do not count frozen tasks toward load
Nathan Lynch [Thu, 9 Apr 2009 00:45:12 +0000 (19:45 -0500)] 
sched: do not count frozen tasks toward load

Freezing tasks via the cgroup freezer causes the load average to climb
because the freezer's current implementation puts frozen tasks in
uninterruptible sleep (D state).

Some applications which perform job-scheduling functions consult the
load average when making decisions.  If a cgroup is frozen, the load
average does not provide a useful measure of the system's utilization
to such applications.  This is especially inconvenient if the job
scheduler employs the cgroup freezer as a mechanism for preempting low
priority jobs.  Contrast this with using SIGSTOP for the same purpose:
the stopped tasks do not count toward system load.

Change task_contributes_to_load() to return false if the task is
frozen.  This results in /proc/loadavg behavior that better meets
users' expectations.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Nigel Cunningham <nigel@tuxonice.net>
Tested-by: Nigel Cunningham <nigel@tuxonice.net>
Cc: <stable@kernel.org>
Cc: containers@lists.linux-foundation.org
Cc: linux-pm@lists.linux-foundation.org
Cc: Matt Helsley <matthltc@us.ibm.com>
LKML-Reference: <20090408194512.47a99b95@manatee.lan>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing: consolidate documents
Li Zefan [Thu, 9 Apr 2009 03:40:27 +0000 (11:40 +0800)] 
tracing: consolidate documents

Move kmemtrace.txt, tracepoints.txt, ftrace.txt and mmiotrace.txt to
the new trace/ directory.

I didnt find any references to those documents in both source
files and documents, so no extra work needs to be done.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Pekka Paalanen <pq@iki.fi>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
LKML-Reference: <49DD6E2B.6090200@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: cpu_debug remove execute permission
Jaswinder Singh Rajput [Wed, 8 Apr 2009 17:19:46 +0000 (22:49 +0530)] 
x86: cpu_debug remove execute permission

It seems by mistake these files got execute permissions so removing it.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
LKML-Reference: <1239211186.9037.2.camel@ht.satnam>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoblktrace: pass the right pointer to kfree()
Li Zefan [Thu, 9 Apr 2009 03:19:40 +0000 (11:19 +0800)] 
blktrace: pass the right pointer to kfree()

Impact: fix kfree crash with non-standard act_mask string

If passing a string with leading white spaces to strstrip(),
the returned ptr != the original ptr.

This bug was introduced by me.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <49DD694C.8020902@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing/syscalls: use a dedicated file header
Frederic Weisbecker [Wed, 8 Apr 2009 18:40:59 +0000 (20:40 +0200)] 
tracing/syscalls: use a dedicated file header

Impact: fix build warnings and possibe compat misbehavior on IA64

Building a kernel on ia64 might trigger these ugly build warnings:

CC      arch/ia64/ia32/sys_ia32.o
In file included from arch/ia64/ia32/sys_ia32.c:55:
arch/ia64/ia32/ia32priv.h:290:1: warning: "elf_check_arch" redefined
In file included from include/linux/elf.h:7,
                 from include/linux/module.h:14,
                 from include/linux/ftrace.h:8,
                 from include/linux/syscalls.h:68,
                 from arch/ia64/ia32/sys_ia32.c:18:
arch/ia64/include/asm/elf.h:19:1: warning: this is the location of the previous definition
[...]

sys_ia32.c includes linux/syscalls.h which in turn includes linux/ftrace.h
to import the syscalls tracing prototypes.

But including ftrace.h can pull too much things for a low level file,
especially on ia64 where the ia32 private headers conflict with higher
level headers.

Now we isolate the syscall tracing headers in their own lightweight file.

Reported-by: Tony Luck <tony.luck@intel.com>
Tested-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Jason Baron <jbaron@redhat.com>
Cc: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Jiaying Zhang <jiayingz@google.com>
Cc: Michael Rubin <mrubin@google.com>
Cc: Martin Bligh <mbligh@google.com>
Cc: Michael Davidson <md@google.com>
LKML-Reference: <20090408184058.GB6017@nowhere>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Thu, 9 Apr 2009 01:00:55 +0000 (18:00 -0700)] 
Merge git://git./linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  work_on_cpu(): rewrite it to create a kernel thread on demand
  kthread: move sched-realeted initialization from kthreadd context
  kthread: Don't looking for a task in create_kthread() #2

15 years agoxen: add FIX_TEXT_POKE to fixmap
Jeremy Fitzhardinge [Sun, 8 Mar 2009 07:48:41 +0000 (23:48 -0800)] 
xen: add FIX_TEXT_POKE to fixmap

FIX_TEXT_POKE[01] are used to map kernel addresses, so they're mapping
pfns, not mfns.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoMerge git://git.infradead.org/battery-2.6
Linus Torvalds [Thu, 9 Apr 2009 00:45:02 +0000 (17:45 -0700)] 
Merge git://git.infradead.org/battery-2.6

* git://git.infradead.org/battery-2.6:
  pda_power: Add optional OTG transceiver and voltage regulator support
  pcf50633_charger: Remove unused mbc_set_status function
  pcf50633_charger: Enable periodic charging restart

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Thu, 9 Apr 2009 00:44:28 +0000 (17:44 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  cap_prctl: don't set error to 0 at 'no_change'

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 9 Apr 2009 00:43:58 +0000 (17:43 -0700)] 
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  igb: remove sysfs entry that was used to set the number of vfs
  igbvf: add new driver to support 82576 virtual functions
  drivers/net/eql.c: Fix a dev leakage.
  niu: Fix unused variable warning.
  r6040: set MODULE_VERSION
  bnx2: Don't use reserved names
  FEC driver: add missing #endif
  niu: Fix error handling
  mv643xx_eth: don't reset the rx coal timer on interface up
  smsc911x: correct debugging message on mii read timeout
  ethoc: fix library build errors
  netfilter: ctnetlink: fix regression in expectation handling
  netfilter: fix selection of "LED" target in netfilter
  netfilter: ip6tables regression fix

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Thu, 9 Apr 2009 00:43:39 +0000 (17:43 -0700)] 
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc: Hook up sys_preadv and sys_pwritev
  sparc64: add_node_ranges() must be __init
  serial: sunsu: sunsu_kbd_ms_init needs to be __devinit
  sparc: Fix section mismatch warnings in cs4231 sound driver.
  sparc64: Fix section mismatch warnings in PCI controller drivers.
  sparc64: Fix section mismatch warnings in power driver.
  sparc64: get_cells() can't be marked __init

15 years agoMerge branch 'ext3-latency-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 9 Apr 2009 00:42:32 +0000 (17:42 -0700)] 
Merge branch 'ext3-latency-fixes' of git://git./linux/kernel/git/tytso/ext4

* 'ext3-latency-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext3: Try to avoid starting a transaction in writepage for data=writepage
  block_write_full_page: switch synchronous writes to use WRITE_SYNC_PLUG

15 years agowork_on_cpu(): rewrite it to create a kernel thread on demand
Andrew Morton [Thu, 9 Apr 2009 15:50:37 +0000 (09:50 -0600)] 
work_on_cpu(): rewrite it to create a kernel thread on demand

Impact: circular locking bugfix

The various implemetnations and proposed implemetnations of work_on_cpu()
are vulnerable to various deadlocks because they all used queues of some
form.

Unrelated pieces of kernel code thus gained dependencies wherein if one
work_on_cpu() caller holds a lock which some other work_on_cpu() callback
also takes, the kernel could rarely deadlock.

Fix this by creating a short-lived kernel thread for each work_on_cpu()
invokation.

This is not terribly fast, but the only current caller of work_on_cpu() is
pci_call_probe().

It would be nice to find some other way of doing the node-local
allocations in the PCI probe code so that we can zap work_on_cpu()
altogether.  The code there is rather nasty.  I can't think of anything
simple at this time...

Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
15 years agokthread: move sched-realeted initialization from kthreadd context
Oleg Nesterov [Thu, 9 Apr 2009 15:50:36 +0000 (09:50 -0600)] 
kthread: move sched-realeted initialization from kthreadd context

kthreadd is the single thread which implements ths "create" request, move
sched_setscheduler/etc from create_kthread() to kthread_create() to
improve the scalability.

We should be careful with sched_setscheduler(), use _nochek helper.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Vitaliy Gusev <vgusev@openvz.org
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
15 years agokthread: Don't looking for a task in create_kthread() #2
Vitaliy Gusev [Thu, 9 Apr 2009 15:50:35 +0000 (09:50 -0600)] 
kthread: Don't looking for a task in create_kthread() #2

Remove the unnecessary find_task_by_pid_ns(). kthread() can just
use "current" to get the same result.

Signed-off-by: Vitaliy Gusev <vgusev@openvz.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
15 years agodm kcopyd: fix callback race
Mikulas Patocka [Wed, 8 Apr 2009 23:27:17 +0000 (00:27 +0100)] 
dm kcopyd: fix callback race

If the thread calling dm_kcopyd_copy is delayed due to scheduling inside
split_job/segment_complete and the subjobs complete before the loop in
split_job completes, the kcopyd callback could be invoked from the
thread that called dm_kcopyd_copy instead of the kcopyd workqueue.

dm_kcopyd_copy -> split_job -> segment_complete -> job->fn()

Snapshots depend on the fact that callbacks are called from the singlethreaded
kcopyd workqueue and expect that there is no racing between individual
callbacks. The racing between callbacks can lead to corruption of exception
store and it can also mean that exception store callbacks are called twice
for the same exception - a likely reason for crashes reported inside
pending_complete() / remove_exception().

This patch fixes two problems:

1. job->fn being called from the thread that submitted the job (see above).

- Fix: hand over the completion callback to the kcopyd thread.

2. job->fn(read_err, write_err, job->context); in segment_complete
reports the error of the last subjob, not the union of all errors.

- Fix: pass job->write_err to the callback to report all error bits
  (it is done already in run_complete_job)

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm kcopyd: prepare for callback race fix
Mikulas Patocka [Wed, 8 Apr 2009 23:27:16 +0000 (00:27 +0100)] 
dm kcopyd: prepare for callback race fix

Use a variable in segment_complete() to point to the dm_kcopyd_client
struct and only release job->pages in run_complete_job() if any are
defined.  These changes are needed by the next patch.

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm: implement basic barrier support
Mikulas Patocka [Wed, 8 Apr 2009 23:27:16 +0000 (00:27 +0100)] 
dm: implement basic barrier support

Barriers are submitted to a worker thread that issues them in-order.

The thread is modified so that when it sees a barrier request it waits
for all pending IO before the request then submits the barrier and
waits for it.  (We must wait, otherwise it could be intermixed with
following requests.)

Errors from the barrier request are recorded in a per-device barrier_error
variable. There may be only one barrier request in progress at once.

For now, the barrier request is converted to a non-barrier request when
sending it to the underlying device.

This patch guarantees correct barrier behavior if the underlying device
doesn't perform write-back caching. The same requirement existed before
barriers were supported in dm.

Bottom layer barrier support (sending barriers by target drivers) and
handling devices with write-back caches will be done in further patches.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm: remove dm_request loop
Mikulas Patocka [Wed, 8 Apr 2009 23:27:15 +0000 (00:27 +0100)] 
dm: remove dm_request loop

Remove queue_io return value and a loop in dm_request.

IO may be submitted to a worker thread with queue_io().  queue_io() sets
DMF_QUEUE_IO_TO_THREAD so that all further IO is queued for the thread. When
the thread finishes its work, it clears DMF_QUEUE_IO_TO_THREAD and from this
point on, requests are submitted from dm_request again. This will be used
for processing barriers.

Remove the loop in dm_request. queue_io() can submit I/Os to the worker thread
even if DMF_QUEUE_IO_TO_THREAD was not set.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm: rework queueing and suspension
Mikulas Patocka [Wed, 8 Apr 2009 23:27:15 +0000 (00:27 +0100)] 
dm: rework queueing and suspension

Rework shutting down on suspend and document the associated rules.

Drop write lock in __split_and_process_bio to allow more processing
concurrency.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm: simplify dm_request loop
Alasdair G Kergon [Wed, 8 Apr 2009 23:27:14 +0000 (00:27 +0100)] 
dm: simplify dm_request loop

Refactor the code in dm_request().

Require the new DMF_BLOCK_FOR_SUSPEND flag on readahead bios we will
discard so we don't drop such bios while processing a barrier.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm: split DMF_BLOCK_IO flag into two
Alasdair G Kergon [Wed, 8 Apr 2009 23:27:14 +0000 (00:27 +0100)] 
dm: split DMF_BLOCK_IO flag into two

Split the DMF_BLOCK_IO flag into two.

DMF_BLOCK_IO_FOR_SUSPEND is set when I/O must be blocked while suspending a
device.  DMF_QUEUE_IO_TO_THREAD is set when I/O must be queued to a
worker thread for later processing.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm: rearrange dm_wq_work
Alasdair G Kergon [Wed, 8 Apr 2009 23:27:13 +0000 (00:27 +0100)] 
dm: rearrange dm_wq_work

Refactor dm_wq_work() to make later patch more readable.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm: remove limited barrier support
Mikulas Patocka [Wed, 8 Apr 2009 23:27:13 +0000 (00:27 +0100)] 
dm: remove limited barrier support

Prepare for full barrier implementation: first remove the restricted support.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm: add integrity support
Martin K. Petersen [Wed, 8 Apr 2009 23:27:12 +0000 (00:27 +0100)] 
dm: add integrity support

This patch provides support for data integrity passthrough in the device
mapper.

 - If one or more component devices support integrity an integrity
   profile is preallocated for the DM device.

 - If all component devices have compatible profiles the DM device is
   flagged as capable.

 - Handle integrity metadata when splitting and cloning bios.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agocap_prctl: don't set error to 0 at 'no_change'
Serge E. Hallyn [Wed, 8 Apr 2009 21:55:58 +0000 (16:55 -0500)] 
cap_prctl: don't set error to 0 at 'no_change'

One-liner: capsh --print is broken without this patch.

In certain cases, cap_prctl returns error > 0 for success.  However,
the 'no_change' label was always setting error to 0.  As a result,
for example, 'prctl(CAP_BSET_READ, N)' would always return 0.
It should return 1 if a process has N in its bounding set (as
by default it does).

I'm keeping the no_change label even though it's now functionally
the same as 'error'.

Signed-off-by: Serge Hallyn <serue@us.ibm.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agoigb: remove sysfs entry that was used to set the number of vfs
Alexander Duyck [Tue, 7 Apr 2009 14:37:52 +0000 (14:37 +0000)] 
igb: remove sysfs entry that was used to set the number of vfs

This patch removes the sysfs entry num_vfs which was added to support
enabling pci virtual functions for 82576.

To prevent VFs from loading automatically a module parameter "max_vfs" was
added so that the number of VFs per PF can be limited.  This is especially
useful when 4 or more 82576 ports are on the system because otherwise to
load all VFs would result in 8 interface per physical port.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigbvf: add new driver to support 82576 virtual functions
Alexander Duyck [Tue, 7 Apr 2009 14:37:34 +0000 (14:37 +0000)] 
igbvf: add new driver to support 82576 virtual functions

This adds an igbvf driver to handle virtual functions provided by the
igb driver when SR-IOV has been enabled.  A virtual function is a
lightweight pci-e function that supports a single queue and shares
resources with the 82576 physical function contained within the igb
driver.

To spawn virtual functions from the igb driver all that is needed is to
enable CONFIG_PCI_IOV and have an 82576 Ethernet adapter on a system that
supports SR-IOV in the BIOS.  The virtual functions will appear after the
interface is loaded.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/eql.c: Fix a dev leakage.
Yang Hongyang [Wed, 8 Apr 2009 22:56:33 +0000 (15:56 -0700)] 
drivers/net/eql.c: Fix a dev leakage.

After dev_get_by_name(), we should follow a dev_put().

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoniu: Fix unused variable warning.
David S. Miller [Wed, 8 Apr 2009 22:52:16 +0000 (15:52 -0700)] 
niu: Fix unused variable warning.

Don't strain gcc's tiny mind.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agor6040: set MODULE_VERSION
Florian Fainelli [Wed, 8 Apr 2009 22:50:43 +0000 (15:50 -0700)] 
r6040: set MODULE_VERSION

This patch sets MODULE_VERSION in order to help users track
changes to this module.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2: Don't use reserved names
Bastian Blank [Wed, 8 Apr 2009 22:50:07 +0000 (15:50 -0700)] 
bnx2: Don't use reserved names

The mips identifier is reserved by gcc on mips plattforms. Don't use it
in the code.

Signed-off-by: Bastian Blank <waldi@debian.org>
Tested-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoFEC driver: add missing #endif
Sascha Hauer [Wed, 8 Apr 2009 22:44:45 +0000 (15:44 -0700)] 
FEC driver: add missing #endif

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoniu: Fix error handling
Dan Carpenter [Wed, 8 Apr 2009 22:44:04 +0000 (15:44 -0700)] 
niu: Fix error handling

platform_device_register_simple() returns ERR_PTR(), not NULL, if an error
occurs.

Found by smatch (http://repo.or.cz/w/smatch.git).  Compile tested.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomv643xx_eth: don't reset the rx coal timer on interface up
Lennert Buytenhek [Wed, 8 Apr 2009 22:42:46 +0000 (15:42 -0700)] 
mv643xx_eth: don't reset the rx coal timer on interface up

Move SDMA configuration from interface up to port probe, to prevent
overwriting the receive coalescing timer value on interface up.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosmsc911x: correct debugging message on mii read timeout
Steve Glendinning [Wed, 8 Apr 2009 22:42:15 +0000 (15:42 -0700)] 
smsc911x: correct debugging message on mii read timeout

the warning printed when a mii READ times out currently says "Timed out
waiting for MII write to finish".  This patch corrects this.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoethoc: fix library build errors
Randy Dunlap [Wed, 8 Apr 2009 22:41:25 +0000 (15:41 -0700)] 
ethoc: fix library build errors

ethoc indirectly uses crc32_le() and bitrev32(), so select
those library functions to be built.

drivers/built-in.o: In function `ethoc_set_multicast_list':
ethoc.c:(.text+0x6226f): undefined reference to `crc32_le'
ethoc.c:(.text+0x62276): undefined reference to `bitrev32'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Wed, 8 Apr 2009 22:36:42 +0000 (15:36 -0700)] 
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] wire up preadv/pwritev system calls

15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Wed, 8 Apr 2009 22:32:06 +0000 (15:32 -0700)] 
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  x86 ACPI: Add support for Always Running APIC timer
  ACPI x86: Make aperf/mperf MSR access in acpi_cpufreq read_only
  ACPI x86: Cleanup acpi_cpufreq structures related to aperf/mperf
  ACPICA: delete check for AML access to port 0x81-83
  ACPI: WMI: use .notify method instead of installing handler directly
  sony-laptop: use .notify method instead of installing handler directly
  panasonic-laptop: use .notify method instead of installing handler directly
  fujitsu-laptop: use .notify method instead of installing hotkey handler directly
  fujitsu-laptop: use .notify method instead of installing handler directly
  ACPI: video: use .notify method instead of installing handler directly
  ACPI: thermal: use .notify method instead of installing handler directly
  ACPI battery: fix async boot oops
  ACPI: delete acpi_device.g_list
  NULL noise: drivers/platform/x86/panasonic-laptop.c
  ACPI: cpufreq: remove dupilcated #include
  ACPI: Adjust Kelvin offset to match local implementation
  ACPI: convert acpi_device_lock spinlock to mutex

15 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Wed, 8 Apr 2009 22:24:09 +0000 (15:24 -0700)] 
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5446/1: ohci-at91: Limit vbus_pin assignment to the size of the array
  [ARM] 5445/1: AT91: Remove flexible array from USBH platform data
  [ARM] 5447/1: Add SZ_32K
  [ARM] omap: fix omap1 clock usecount decrement bug
  [ARM] pxa: register AC97 controller devices
  [ARM] pxa/csb701: do not register devices on non-csb726 boads
  [ARM] pxa/colibri: get rid of set_irq_type()
  [ARM] pxa/colibri: provide MAC address from ATAG_SERIAL
  [ARM] pxa/cm-x2xx: fix ucb1400 not being registered
  [ARM] pxa: Add support for suspend on PalmTX, T5 and LD
  [ARM] pxa: PalmTE2 support for battery, UDC, IrDA and backlight
  [ARM] pxa: Palm Tungsten E2 basic support
  [ARM] pxa/em-x270: add libertas device registration
  [ARM] pxa/magician: Enable bq24022 regulator for gpio_vbus and pda_power

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Wed, 8 Apr 2009 21:33:59 +0000 (14:33 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  mmc_spi: support for non-byte-aligned cards
  omap_hsmmc: Do not expect cmd/data to be non-null when CC/TC occurs
  mmc: Fix compile for omap_hsmmc.c
  mmc_spi: convert timeout handling to jiffies and avoid busy waiting
  mmc_spi: do not check CID and CSD blocks with CRC16
  omap_hsmmc: Flush posted write to IRQ
  New mail address for Pierre Ossman
  imxmmc: move RSSR BLR
  imxmmc: init-exit rework
  mmc: Accept EXT_CSD rev 1.3 since it is backwards compatible with 1.2

15 years agotty: MAX3100
Alan Cox [Wed, 8 Apr 2009 19:13:16 +0000 (20:13 +0100)] 
tty: MAX3100

Thou shalt remember to use 'git add' or errors shall be visited on your
downloads and there shall be wrath from on list and much gnashing of teeth.

Thou shalt remember to use git status or there shall be catcalls and much
embarrasment shall come to pass.

Signed-off-by: Alan "I'm hiding" Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branches 'cma', 'cxgb3', 'ipoib', 'mlx4' and 'nes' into for-next
Roland Dreier [Wed, 8 Apr 2009 21:28:21 +0000 (14:28 -0700)] 
Merge branches 'cma', 'cxgb3', 'ipoib', 'mlx4' and 'nes' into for-next

15 years agoRDMA/nes: Add support for new SFP+ PHY
Chien Tung [Wed, 8 Apr 2009 21:27:56 +0000 (14:27 -0700)] 
RDMA/nes: Add support for new SFP+ PHY

Add new register settings for new SFP+ PHY/firmware.
Add new PHY to to nes_netdev_get/set_settings.

Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Add wide_ppm_offset parm for switch compatibility
Chien Tung [Wed, 8 Apr 2009 21:27:18 +0000 (14:27 -0700)] 
RDMA/nes: Add wide_ppm_offset parm for switch compatibility

We have observed unstable link with a new BNT switch.

Add wide_ppm_offset parameter to allow the user to control the clock
ppm offset on the CX4 interface for better compatibility.  Default is
100ppm, setting it to 1 will increase it to 300ppm.  Change default
SerDes1 reference clock to external source.

Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Fix SFP+ PHY initialization
Chien Tung [Wed, 8 Apr 2009 21:27:09 +0000 (14:27 -0700)] 
RDMA/nes: Fix SFP+ PHY initialization

SFP+ PHY initialization has very long delays, incorrect settings for
direct attach copper cables, and inconsistent link detection.

Adjust delays to the minimum required by the PHY.  Worst case is now
less than 4 seconds.  Add new register settings for direct attach
cables.  Change link detection logic to use two new registers for more
consistent link state detection.  Reorganize code to shorten line
length.

Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoxen: honour VCPU availability on boot
Ian Campbell [Thu, 2 Apr 2009 12:24:28 +0000 (13:24 +0100)] 
xen: honour VCPU availability on boot

If a VM is booted with offline VCPUs then unplug them during boot. Determining
the availability of a VCPU requires access to XenStore which is not available
at the point smp_prepare_cpus() is called, therefore we bring up all VCPUS
initially and unplug the offline ones as soon as XenStore becomes available.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
15 years agoxen: clean up gate trap/interrupt constants
Jeremy Fitzhardinge [Mon, 30 Mar 2009 05:57:15 +0000 (22:57 -0700)] 
xen: clean up gate trap/interrupt constants

Use GATE_INTERRUPT/TRAP rather than 0xe/f.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: set _PAGE_NX in __supported_pte_mask before pagetable construction
Jeremy Fitzhardinge [Fri, 27 Mar 2009 18:29:02 +0000 (11:29 -0700)] 
xen: set _PAGE_NX in __supported_pte_mask before pagetable construction

Some 64-bit machines don't support the NX flag in ptes.
Check for NX before constructing the kernel pagetables.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: resume interrupts before system devices.
Ian Campbell [Wed, 25 Mar 2009 17:46:42 +0000 (17:46 +0000)] 
xen: resume interrupts before system devices.

Impact: bugfix Xen domain restore

Otherwise the first timer interrupt after resume is missed and we never
get another.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/mmu: weaken flush_tlb_other test
Jeremy Fitzhardinge [Thu, 5 Mar 2009 01:36:57 +0000 (17:36 -0800)] 
xen/mmu: weaken flush_tlb_other test

Impact: fixes crashing bug

There's no particular problem with getting an empty cpu mask,
so just shortcut-return if we get one.

Avoids crash reported by Christophe Saout <christophe@saout.de>

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/mmu: some early pagetable cleanups
Jeremy Fitzhardinge [Tue, 17 Mar 2009 20:30:55 +0000 (13:30 -0700)] 
xen/mmu: some early pagetable cleanups

1. make sure early-allocated ptes are pinned, so they can be later
   unpinned
2. don't pin pmd+pud, just make them RO
3. scatter some __inits around

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoRDMA/nes: Fix nes_nic_cm_xmit() error handling
Faisal Latif [Wed, 8 Apr 2009 21:23:55 +0000 (14:23 -0700)] 
RDMA/nes: Fix nes_nic_cm_xmit() error handling

We are getting crash or hung situation when we are running network
cable pull tests during RDMA traffic.

In schedule_nes_timer(), we return an error if nes_nic_cm_xmit()
returns failure.  This is changed to success as skb is being put on
the timer routines to be processed later.  In send_syn() case, we are
indicating connect failure once from nes_connect() and the other when
the rexmit retries expires.

The other issue is skb->users which we are incrementing before calling
nes_nic_cm_xmit() which calls dev_queue_xmit() but in case of failure
we are decrementing the skb->users at the same time putting the skb on
the rexmit path.  Even if dev_queue_xmit() fails, the skb->users is
decremented already.  We are removing the decrement of skb->users in
case of failure from both schedule_nes_timer() as well as from
nes_cm_timer_tick().

There is also extra check in nes_cm_timer_tick() for rexmit failure
which does a break from the loop is removed.  This causes problem as
the other nodes have their cm_node->ref_count incremented and are not
processed.

Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Fix error handling issues
Faisal Latif [Wed, 8 Apr 2009 21:22:20 +0000 (14:22 -0700)] 
RDMA/nes: Fix error handling issues

Fix issues found by static code analysis:

(1) Check if cm_node was successfully created for loopback connection.

(2) schedule_nes_timer() does not free up allocated memory after
    encountering an error.  There is a WARN_ON() for this condition.

(3) there is a cm_node->freed flag which is set but not used.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoRDMA/nes: Fix incorrect casts on 32-bit architectures
Don Wood [Wed, 8 Apr 2009 21:21:02 +0000 (14:21 -0700)] 
RDMA/nes: Fix incorrect casts on 32-bit architectures

The were some incorrect casts to unsigned long that caused 64-bit values
to be truncated on 32-bit architectures and made the driver pass invalid
adresses and lengths to the hardware.  The problems were primarily seen
with kernels with highmem configured but some could show up in
non-highmem kernels, too.

Signed-off-by: Don Wood <donald.e.wood@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoIPoIB: Document newish features
Or Gerlitz [Wed, 8 Apr 2009 20:52:01 +0000 (13:52 -0700)] 
IPoIB: Document newish features

Update the documentation to include connected mode, stateless offloads
and interrupt moderation, and add a reference to the connected mode RFC.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years ago[IA64] wire up preadv/pwritev system calls
Tony Luck [Wed, 8 Apr 2009 20:46:14 +0000 (13:46 -0700)] 
[IA64] wire up preadv/pwritev system calls

Gerd Hoffmann added these to Linux.  Let ia64 use them.

Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years agoRDMA/cma: Create cm id even when IB port is down
Yossi Etigin [Wed, 8 Apr 2009 20:42:33 +0000 (13:42 -0700)] 
RDMA/cma: Create cm id even when IB port is down

When doing rdma_resolve_addr(), if the relevant IB port is down, the
function fails and the cm_id is not bound to the correct device.
Therefore, application does not have a device handle and cannot wait
for the port to become active.  The function fails because the
underlying IPoIB interface is not joined to the broadcast group and
therefore the SA does not have a multicast record to take a Q_Key
from.

The fix is to use lazy Q_Key resolution - cma_set_qkey() will set
id_priv->qkey if it was not set, and will be called just before the
Q_Key is really required.

Signed-off-by: Yossi Etigin <yosefe@voltaire.com>
Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
David S. Miller [Wed, 8 Apr 2009 20:39:54 +0000 (13:39 -0700)] 
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-2.6

15 years ago[ARM] 5446/1: ohci-at91: Limit vbus_pin assignment to the size of the array
Justin Waters [Fri, 3 Apr 2009 20:06:53 +0000 (21:06 +0100)] 
[ARM] 5446/1: ohci-at91: Limit vbus_pin assignment to the size of the array

Currently, the vbus_pin assignment loop is limited by the value of the "ports"
variable in the platform data.  Now that the vbus_pin array is no longer
flexible, we can use its actual size.

Signed-off-by: Justin Waters <justin.waters@timesys.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5445/1: AT91: Remove flexible array from USBH platform data
Justin Waters [Fri, 3 Apr 2009 20:03:59 +0000 (21:03 +0100)] 
[ARM] 5445/1: AT91: Remove flexible array from USBH platform data

The flexible array in the USBH platform data is not safe to copy.  The
compiler will not allocate any extra memory for the non-init platform
data structure (in the *_devices.c files) since it isn't given any
defaults at compile time.  When the probe function attempts to address
that array, it will actually attempt to access data in an adjacent
structure.

Since there are currently no (known) implementations of the at91 USBH
IP with more than 2 vbus pins, I am capping the value at 2.  If somebody
tries to assign more, then the compiler will produce a warning.

Signed-off-by: Justin Waters <justin.waters@timesys.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5447/1: Add SZ_32K
Linus Walleij [Wed, 8 Apr 2009 00:32:20 +0000 (01:32 +0100)] 
[ARM] 5447/1: Add SZ_32K

This adds a SZ_32K define to the available sizes. I need it for an
upcoming platform support.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoXen: Add virt_to_pfn helper function
Alex Nixon [Mon, 9 Feb 2009 20:05:46 +0000 (12:05 -0800)] 
Xen: Add virt_to_pfn helper function

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
15 years agox86-64: remove PGE from must-have feature list
Jeremy Fitzhardinge [Sun, 8 Mar 2009 10:59:04 +0000 (03:59 -0700)] 
x86-64: remove PGE from must-have feature list

PGE may not be available when running paravirtualized, so test the cpuid
bit before using it.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: mask XSAVE from cpuid
Jeremy Fitzhardinge [Sun, 8 Mar 2009 01:09:27 +0000 (17:09 -0800)] 
xen: mask XSAVE from cpuid

Xen leaves XSAVE set in cpuid, but doesn't allow cr4.OSXSAVE
to be set.  This confuses the kernel and it ends up crashing on
an xsetbv instruction.

At boot time, try to set cr4.OSXSAVE, and mask XSAVE out of
cpuid it we can't.  This will produce a spurious error from Xen,
but allows us to support XSAVE if/when Xen does.

This also factors out the cpuid mask decisions to boot time.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoNULL noise: arch/x86/xen/smp.c
Hannes Eder [Thu, 5 Mar 2009 19:13:57 +0000 (20:13 +0100)] 
NULL noise: arch/x86/xen/smp.c

Fix this sparse warnings:
  arch/x86/xen/smp.c:316:52: warning: Using plain integer as NULL pointer
  arch/x86/xen/smp.c:421:60: warning: Using plain integer as NULL pointer

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: remove xen_load_gdt debug
Jeremy Fitzhardinge [Thu, 5 Mar 2009 00:34:27 +0000 (16:34 -0800)] 
xen: remove xen_load_gdt debug

Don't need the noise.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: make xen_load_gdt simpler
Jeremy Fitzhardinge [Wed, 4 Mar 2009 23:26:00 +0000 (15:26 -0800)] 
xen: make xen_load_gdt simpler

Remove use of multicall machinery which is unused (gdt loading
is never performance critical).  This removes the implicit use
of percpu variables, which simplifies understanding how
the percpu code's use of load_gdt interacts with this code.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: clean up xen_load_gdt
Jeremy Fitzhardinge [Wed, 4 Mar 2009 21:02:18 +0000 (13:02 -0800)] 
xen: clean up xen_load_gdt

Makes the logic a bit clearer.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: split construction of p2m mfn tables from registration
Jeremy Fitzhardinge [Fri, 27 Feb 2009 23:34:59 +0000 (15:34 -0800)] 
xen: split construction of p2m mfn tables from registration

Build the p2m_mfn_list_list early with the rest of the p2m table, but
register it later when the real shared_info structure is in place.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: separate p2m allocation from setting
Jeremy Fitzhardinge [Thu, 26 Feb 2009 23:48:33 +0000 (15:48 -0800)] 
xen: separate p2m allocation from setting

When doing very early p2m setting, we need to separate setting
from allocation, so split things up accordingly.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: disable preempt for leave_lazy_mmu
Jeremy Fitzhardinge [Sat, 21 Feb 2009 07:01:26 +0000 (23:01 -0800)] 
xen: disable preempt for leave_lazy_mmu

xen_mc_flush() requires preemption to be disabled for its own sanity,
so disable it while we're flushing.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agommc_spi: support for non-byte-aligned cards
Wolfgang Muees [Wed, 8 Apr 2009 08:48:58 +0000 (09:48 +0100)] 
mmc_spi: support for non-byte-aligned cards

A very large subset of SD cards in the market send their
responses and data non-byte-aligned. So add logic to the
mmc spi driver to handle this mess.

Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
15 years agoomap_hsmmc: Do not expect cmd/data to be non-null when CC/TC occurs
Jarkko Lavinen [Wed, 8 Apr 2009 08:18:32 +0000 (11:18 +0300)] 
omap_hsmmc: Do not expect cmd/data to be non-null when CC/TC occurs

With spurious interrupt cmd can be null even when we have CC
set in irq status.

Fixes: NB#106295 - prevent potential kernel crash in the MMC driver

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
15 years agommc: Fix compile for omap_hsmmc.c
Tony Lindgren [Wed, 8 Apr 2009 00:04:33 +0000 (17:04 -0700)] 
mmc: Fix compile for omap_hsmmc.c

This fixes the issue noted by Russell King:

drivers/mmc/host/omap_hsmmc.c: In function 'mmc_omap_xfer_done':
drivers/mmc/host/omap_hsmmc.c:301: error: implicit declaration of function 'mmc_omap_fclk_lazy_disable'

This got broken by 4a694dc915c9a223044ce21fc0d99e63facd1d64.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
15 years agommc_spi: convert timeout handling to jiffies and avoid busy waiting
Wolfgang Muees [Tue, 7 Apr 2009 14:26:30 +0000 (15:26 +0100)] 
mmc_spi: convert timeout handling to jiffies and avoid busy waiting

SD/MMC card timeouts can be very high. So avoid busy-waiting,
using the scheduler. Calculate all timeouts in jiffies units,
because this will give us the correct sign when to involve
the scheduler.

Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
15 years agommc_spi: do not check CID and CSD blocks with CRC16
Wolfgang Muees [Tue, 7 Apr 2009 13:48:16 +0000 (14:48 +0100)] 
mmc_spi: do not check CID and CSD blocks with CRC16

Some cards are not able to calculate a valid CRC16 value
for CID and CSD reads (CRC for 512 byte data blocks is OK).
By moving the CRC enable after the read of CID and CSD, these
cards can be used. This patch was tested with a faulty 8 GByte
takeMS Class 6 SDHC card. This patch was suggested by
Pierre Ossman.

Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
15 years agoomap_hsmmc: Flush posted write to IRQ
Kevin Hilman [Mon, 6 Apr 2009 12:01:19 +0000 (15:01 +0300)] 
omap_hsmmc: Flush posted write to IRQ

Spurious IRQs seen on MMC after 2.6.29.  Flush posted write in IRQ
handler.

The interrupt line is released by clearing the error status bits
in the MMCHS_STAT register, which must occur before the interrupt
handler returns to avoid unwanted irqs.  Hence the need to flush
the posted write.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Acked-by: Tony Lindgen <tony@atomide.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
15 years agoNew mail address for Pierre Ossman
Pierre Ossman [Wed, 8 Apr 2009 18:14:54 +0000 (20:14 +0200)] 
New mail address for Pierre Ossman

Signed-off-by: Pierre Ossman <pierre@ossman.eu>
15 years agoimxmmc: move RSSR BLR
Paulius Zaleckas [Wed, 25 Mar 2009 09:18:50 +0000 (11:18 +0200)] 
imxmmc: move RSSR BLR

DMA request source (RSSR) needs to be set only once (in probe).
DMA burst length (BLR) need to be set only in set_ios()

This cleans up imxmci_setup_data() and should make it a little
bit faster :)

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agoimxmmc: init-exit rework
Paulius Zaleckas [Wed, 25 Mar 2009 09:17:42 +0000 (11:17 +0200)] 
imxmmc: init-exit rework

Add __init __exit for appropriate probe and remove functions.
Conver to platform_driver_probe()

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agommc: Accept EXT_CSD rev 1.3 since it is backwards compatible with 1.2
Jarkko Lavinen [Thu, 27 Nov 2008 12:30:32 +0000 (14:30 +0200)] 
mmc: Accept EXT_CSD rev 1.3 since it is backwards compatible with 1.2

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agodrm/i915: Allow tiling of objects with bit 17 swizzling by the CPU.
Eric Anholt [Thu, 12 Mar 2009 23:56:27 +0000 (16:56 -0700)] 
drm/i915: Allow tiling of objects with bit 17 swizzling by the CPU.

Save the bit 17 state of the pages when freeing the page list, and
reswizzle them if necessary when rebinding the pages (in case they were
swapped out).  Since we have userland with expectations that the swizzle
enums let it pread and pwrite contents accurately, we can't expose a new
swizzle enum for bit 17 (which it would have to GTT map to handle), so we
handle it down in pread and pwrite by swizzling the copy when bit 17 of the
page address is set.

Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: Correctly set the write flag for get_user_pages in pread.
Eric Anholt [Tue, 7 Apr 2009 23:01:22 +0000 (16:01 -0700)] 
drm/i915: Correctly set the write flag for get_user_pages in pread.

Otherwise, the results of our read didn't show up when we were faulting in
the page being read into (as happened with a testcase reading into a big
stack area).  Likely accounts for some conformance test failures.

Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agoptrace: some checkpatch fixes
Roland McGrath [Wed, 8 Apr 2009 06:21:06 +0000 (23:21 -0700)] 
ptrace: some checkpatch fixes

This fixes all the checkpatch --file complaints about kernel/ptrace.c
and also removes an unused #include.  I've verified that there are no
changes to the compiled code on x86_64.

Signed-off-by: Roland McGrath <roland@redhat.com>
[ Removed the parts that just split a line  - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agonommu: fix typo vma->pg_off to vma->vm_pgoff
Nobuhiro Iwamatsu [Wed, 8 Apr 2009 04:21:43 +0000 (21:21 -0700)] 
nommu: fix typo vma->pg_off to vma->vm_pgoff

6260a4b0521a41189b2c2a8119096c1e21dbdf2c ("/proc/pid/maps: don't show
pgoff of pure ANON VMAs" had a typo.

fs/proc/task_nommu.c:138: error: 'struct vm_area_struct' has no member named 'pg_off'
distcc[21484] ERROR: compile fs/proc/task_nommu.c on sprygo/32 failed

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agobefs: fix build on parisc
Alexander Beregalov [Wed, 8 Apr 2009 04:21:42 +0000 (21:21 -0700)] 
befs: fix build on parisc

fs/befs/super.c:85: error: 'PAGE_SIZE' undeclared

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrm/i915: Fix use of uninitialized var in 40a5f0de
Florian Mickler [Mon, 6 Apr 2009 20:55:41 +0000 (22:55 +0200)] 
drm/i915: Fix use of uninitialized var in 40a5f0de

i915_gem_put_relocs_to_user returned an uninitialized value which
got returned to userspace. This caused libdrm in my setup to never
get out of a do{}while() loop retrying i915_gem_execbuffer.

result was hanging X, overheating of cpu and 2-3gb of logfile-spam.

This patch adresses the issue by
 1. initializing vars in this file where necessary
 2. correcting wrongly interpreted return values of copy_[from/to]_user

Signed-off-by: Florian Mickler <florian@mickler.org>
[anholt: cleanups of unnecessary changes, consistency in APIs]
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: indicate framebuffer restore key in SysRq help message
Ferenc Wagner [Mon, 6 Apr 2009 12:55:09 +0000 (14:55 +0200)] 
drm/i915: indicate framebuffer restore key in SysRq help message

At the same time, bring the action message closer to the usual format.

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agodrm/i915: sync hdmi detection by hdmi identifier with 2D
Ma Ling [Thu, 2 Apr 2009 05:13:26 +0000 (13:13 +0800)] 
drm/i915: sync hdmi detection by hdmi identifier with 2D

Currently we detect HDMI monitor by hardware detection, but if an HDMI-DVI
adapter is used to connect a DVI monitor, hardware detection will incorrectly
take monitor as HDMI. HDMI spec says any device containing IEEE registration
identifier will be treated as HDMI device.  The patch intends to detect HDMI
monitor by drm_detect_hdmi_monitor function which follows that rule.

Signed-off-by: Ma Ling <ling.ma@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>