firefly-linux-kernel-4.4.55.git
15 years agofunction-graph: use int instead of atomic for ftrace_graph_active
Steven Rostedt [Fri, 3 Apr 2009 19:24:12 +0000 (15:24 -0400)]
function-graph: use int instead of atomic for ftrace_graph_active

Impact: cleanup

The variable ftrace_graph_active is only modified under the
ftrace_lock mutex, thus an atomic is not necessary for modification.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
15 years agotracing/ftrace: factorize the tracing files creation
Frederic Weisbecker [Thu, 26 Mar 2009 23:25:38 +0000 (00:25 +0100)]
tracing/ftrace: factorize the tracing files creation

Impact: cleanup

Most of the tracing files creation follow the same pattern:

ret = debugfs_create_file(...)
if (!ret)
pr_warning("Couldn't create ... entry\n")

Unify it!

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1238109938-11840-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
15 years agotracing: use macros to denote usec and nsec per second
Li Zefan [Fri, 27 Mar 2009 06:55:44 +0000 (14:55 +0800)]
tracing: use macros to denote usec and nsec per second

Impact: cleanup

Use USEC_PER_SEC and NSEC_PER_SEC instead of 1000000 and 1000000000.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <49CC7870.9000309@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
15 years agoMerge branch 'tracing/urgent' into tracing/ftrace
Ingo Molnar [Tue, 7 Apr 2009 12:41:14 +0000 (14:41 +0200)]
Merge branch 'tracing/urgent' into tracing/ftrace

15 years agoftrace: Correct a text align for event format output
Zhaolei [Fri, 3 Apr 2009 10:24:46 +0000 (18:24 +0800)]
ftrace: Correct a text align for event format output

If we cat debugfs/tracing/events/ftrace/bprint/format, we'll see:
name: bprint
ID: 6
format:
field:unsigned char common_type; offset:0; size:1;
field:unsigned char common_flags; offset:1; size:1;
field:unsigned char common_preempt_count; offset:2; size:1;
field:int common_pid; offset:4; size:4;
field:int common_tgid; offset:8; size:4;

field:unsigned long ip; offset:12; size:4;
field:char * fmt; offset:16; size:4;
field: char buf; offset:20; size:0;

print fmt: "%08lx (%d) fmt:%p %s"

There is an inconsistent blank before char buf.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
LKML-Reference: <49D5E3EE.70201@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoUpdate /debug/tracing/README
Nikanth Karthikesan [Mon, 23 Mar 2009 06:28:31 +0000 (11:58 +0530)]
Update /debug/tracing/README

Some of the tracers have been renamed, which was not updated in the in-kernel
run-time README file. Update it.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
LKML-Reference: <200903231158.32151.knikanth@suse.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing/ftrace: alloc the started cpumask for the trace file
Frederic Weisbecker [Wed, 1 Apr 2009 20:53:08 +0000 (22:53 +0200)]
tracing/ftrace: alloc the started cpumask for the trace file

Impact: fix a crash while cat trace file

Currently we are using a cpumask to remind each cpu where a
trace occured. It lets us notice the user that a cpu just had
its first trace.

But on latest -tip we have the following crash once we cat the trace
file:

IP: [<c0270c4a>] print_trace_fmt+0x45/0xe7
*pde = 00000000
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/class/net/eth0/carrier
Pid: 3897, comm: cat Not tainted (2.6.29-tip-02825-g0f22972-dirty #81)
EIP: 0060:[<c0270c4a>] EFLAGS: 00010297 CPU: 0
EIP is at print_trace_fmt+0x45/0xe7
EAX: 00000000 EBX: 00000000 ECX: c12d9e98 EDX: ccdb7010
ESI: d31f4000 EDI: 00322401 EBP: d31f3f10 ESP: d31f3efc
DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process cat (pid: 3897, ti=d31f2000 task=d3b3cf20 task.ti=d31f2000)
Stack:
d31f4080 ccdb7010 d31f4000 d691fe70 ccdb7010 d31f3f24 c0270e5c d31f4000
d691fe70 d31f4000 d31f3f34 c02718e8 c12d9e98 d691fe70 d31f3f70 c02bfc33
00001000 09130000 d3b46e00 d691fe98 00000000 00000079 00000001 00000000
Call Trace:
[<c0270e5c>] ? print_trace_line+0x170/0x17c
[<c02718e8>] ? s_show+0xa7/0xbd
[<c02bfc33>] ? seq_read+0x24a/0x327
[<c02bf9e9>] ? seq_read+0x0/0x327
[<c02ab18b>] ? vfs_read+0x86/0xe1
[<c02ab289>] ? sys_read+0x40/0x65
[<c0202d8f>] ? sysenter_do_call+0x12/0x3c
Code: 00 00 00 89 45 ec f7 c7 00 20 00 00 89 55 f0 74 4e f6 86 98 10 00 00 02 74 45 8b 86 8c 10 00 00 8b 9e a8 10 00 00 e8 52 f3 ff ff <0f> a3 03 19 c0 85 c0 75 2b 8b 86 8c 10 00 00 8b 9e a8 10 00 00
EIP: [<c0270c4a>] print_trace_fmt+0x45/0xe7 SS:ESP 0068:d31f3efc
CR2: 0000000000000000
---[ end trace aa9cf38e5ebed9dd ]---

This is because we alloc the iter->started cpumask on tracing_pipe_open but
not on tracing_open.

It hadn't been noticed until now because we need to have ring buffer overruns
to activate the starting of cpu buffer detection.

Also, we need a check to not print the messagge for the first trace on the file.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1238619188-6109-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing, x86: remove duplicated #include
Huang Weiyi [Tue, 31 Mar 2009 12:41:31 +0000 (20:41 +0800)]
tracing, x86: remove duplicated #include

Remove duplicated #include in arch/x86/kernel/ftrace.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
LKML-Reference: <1238503291-2532-1-git-send-email-weiyi.huang@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoftrace: Add check of sched_stopped for probe_sched_wakeup
Zhaolei [Tue, 31 Mar 2009 07:24:51 +0000 (15:24 +0800)]
ftrace: Add check of sched_stopped for probe_sched_wakeup

The wakeup tracing in sched_switch does not stop when a user
disables tracing. This is because the probe_sched_wakeup() is missing
the check to prevent the wakeup from being traced.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
LKML-Reference: <49D1C543.3010307@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agofunction-graph: add proper initialization for init task
Steven Rostedt [Thu, 26 Mar 2009 00:55:00 +0000 (20:55 -0400)]
function-graph: add proper initialization for init task

Impact: fix to crash going to kexec

The init task did not properly initialize the function graph pointers.
Altough these pointers are NULL, they can not be assumed to be NULL
for the init task, and must still be properly initialize.

This usually is not an issue since a problem only arises when a task
exits, and the init tasks do not usually exit. But when doing tests
with kexec, the init tasks do exit, and the bug appears.

This patch properly initializes the init tasks function graph data
structures.

Reported-and-Tested-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <alpine.DEB.2.00.0903252053080.5675@gandalf.stny.rr.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing/ftrace: fix missing include string.h
Frederic Weisbecker [Fri, 27 Mar 2009 13:22:10 +0000 (14:22 +0100)]
tracing/ftrace: fix missing include string.h

Building a kernel with tracing can raise the following warning on
tip/master:

kernel/trace/trace.c:1249: error: implicit declaration of function 'vbin_printf'

We are missing an include to string.h

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1238160130-7437-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing: fix incorrect return type of ns2usecs()
Lai Jiangshan [Mon, 30 Mar 2009 05:48:00 +0000 (13:48 +0800)]
tracing: fix incorrect return type of ns2usecs()

Impact: fix time output bug in 32bits system

ns2usecs() returns 'long', it's incorrect.

(In i386)
...
          <idle>-0     [000]   521.442100: _spin_lock <-tick_do_update_jiffies64
          <idle>-0     [000]   521.442101: do_timer <-tick_do_update_jiffies64
          <idle>-0     [000]   521.442102: update_wall_time <-do_timer
          <idle>-0     [000]   521.442102: update_xtime_cache <-update_wall_time
....
(It always print the time less than 2200 seconds besides ...)
Because 'long' is 32bits in i386. ( (1<<31) useconds is about 2200 seconds)

...
          <idle>-0     [001] 4154502640.134759: rcu_bh_qsctr_inc <-__do_softirq
          <idle>-0     [001] 4154502640.134760: _local_bh_enable <-__do_softirq
          <idle>-0     [001] 4154502640.134761: idle_cpu <-irq_exit
...
(very large value)
Because 'long' is a signed type and it is 32bits in i386.

Changes in v2:
return 'unsigned long long' instead of 'cycle_t'

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <49D05D10.4030009@cn.fujitsu.com>
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing: remove CALLER_ADDR2 from wakeup tracer
Steven Rostedt [Fri, 3 Apr 2009 15:12:23 +0000 (11:12 -0400)]
tracing: remove CALLER_ADDR2 from wakeup tracer

Maneesh Soni was getting a crash when running the wakeup tracer.
We debugged it down to the recording of the function with the
CALLER_ADDR2 macro.  This is used to get the location of the caller
to schedule.

But the problem comes when schedule is called by assmebly. In the case
that Maneesh had, retint_careful would call schedule. But retint_careful
does not set up a proper frame pointer. CALLER_ADDR2 is defined as
__builtin_return_address(2). This produces the following assembly in
the wakeup tracer code.

   mov    0x0(%rbp),%rcx  <--- get the frame pointer of the caller
   mov    %r14d,%r8d
   mov    0xf2de8e(%rip),%rdi

   mov    0x8(%rcx),%rsi  <-- this is __builtin_return_address(1)
   mov    0x28(%rdi,%rax,8),%rbx

   mov    (%rcx),%rax  <-- get the frame pointer of the caller's caller
   mov    %r12,%rcx
   mov    0x8(%rax),%rdx <-- this is __builtin_return_address(2)

At the reading of 0x8(%rax) Maneesh's machine would take a fault.
The reason is that retint_careful did not set up the return address
and the content of %rax here was zero.

To verify this, I sent Maneesh a patch to create a frame pointer
in retint_careful. He ran the test again but this time he would take
the same type of fault from sysret_careful. The retint_careful was no
longer an issue, but there are other callers that still have issues.

Instead of adding frame pointers for all callers to schedule (in possibly
all archs), it is much safer to simply not use CALLER_ADDR2. This
loses out on knowing what called schedule, but the function tracer
will help there if needed.

Reported-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'linus' into tracing/core
Ingo Molnar [Tue, 7 Apr 2009 11:47:33 +0000 (13:47 +0200)]
Merge branch 'linus' into tracing/core

Merge reason: update to upstream tracing facilities

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'tracing/blktrace-fixes' into tracing/urgent
Ingo Molnar [Tue, 7 Apr 2009 11:40:49 +0000 (13:40 +0200)]
Merge branch 'tracing/blktrace-fixes' into tracing/urgent

Merge reason: this used to be a tracing/blktrace-v2 devel topic still
              cooking during the merge window - has propagated to fixes

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoNFS: Fix a double free in nfs_parse_mount_options()
Trond Myklebust [Mon, 6 Apr 2009 23:41:35 +0000 (16:41 -0700)]
NFS: Fix a double free in nfs_parse_mount_options()

Due to an apparent typo, commit a67d18f89f5782806135aad4ee012ff78d45aae7
(NFS: load the rpc/rdma transport module automatically) lead to the
'proto=' mount option doing a double free, while Opt_mountproto leaks a
string.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoext3: make default data ordering mode configurable
Linus Torvalds [Tue, 7 Apr 2009 00:16:47 +0000 (17:16 -0700)]
ext3: make default data ordering mode configurable

This makes the defautl ext3 data ordering mode (when no explicit
ordering is set) configurable, so as to allow people to default to
'data=writeback' and get the resulting latency improvements.

This is a non-issue if a filesystem has been explicitly set to some
ordering (with 'tune2fs').

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'linux-next' of git://git.infradead.org/ubifs-2.6
Linus Torvalds [Mon, 6 Apr 2009 22:00:19 +0000 (15:00 -0700)]
Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6

* 'linux-next' of git://git.infradead.org/ubifs-2.6:
  UBIFS: fix recovery bug
  UBIFS: add R/O compatibility
  UBIFS: fix compiler warnings
  UBIFS: fully sort GCed nodes
  UBIFS: fix commentaries
  UBIFS: introduce a helpful variable
  UBIFS: use KERN_CONT
  UBIFS: fix lprops committing bug
  UBIFS: fix bogus assertion
  UBIFS: fix bug where page is marked uptodate when out of space
  UBIFS: amend key_hash return value
  UBIFS: improve find function interface
  UBIFS: list usage cleanup
  UBIFS: fix dbg_chk_lpt_sz()

15 years agoMerge branch 'linux-next' of git://git.infradead.org/ubi-2.6
Linus Torvalds [Mon, 6 Apr 2009 22:00:00 +0000 (15:00 -0700)]
Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6

* 'linux-next' of git://git.infradead.org/ubi-2.6:
  UBI: add fsync capability

15 years agoexit_notify: kill the wrong capable(CAP_KILL) check
Oleg Nesterov [Mon, 6 Apr 2009 14:16:02 +0000 (16:16 +0200)]
exit_notify: kill the wrong capable(CAP_KILL) check

The CAP_KILL check in exit_notify() looks just wrong, kill it.

Whatever logic we have to reset ->exit_signal, the malicious user
can bypass it if it execs the setuid application before exiting.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.infradead.org/mtd-2.6
Linus Torvalds [Mon, 6 Apr 2009 21:56:26 +0000 (14:56 -0700)]
Merge git://git.infradead.org/mtd-2.6

* git://git.infradead.org/mtd-2.6: (53 commits)
  [MTD] struct device - replace bus_id with dev_name(), dev_set_name()
  [MTD] [NOR] Fixup for Numonyx M29W128 chips
  [MTD] mtdpart: Make ecc_stats more realistic.
  powerpc/85xx: TQM8548: Update DTS file for multi-chip support
  powerpc: NAND: FSL UPM: document new bindings
  [MTD] [NAND] FSL-UPM: Add wait flags to support board/chip specific delays
  [MTD] [NAND] FSL-UPM: add multi chip support
  [MTD] [NOR] Add device parent info to physmap_of
  [MTD] [NAND] Add support for NAND on the Socrates board
  [MTD] [NAND] Add support for 4KiB pages.
  [MTD] sysfs support should not depend on CONFIG_PROC_FS
  [MTD] [NAND] Add parent info for CAFÉ controller
  [MTD] support driver model updates
  [MTD] driver model updates (part 2)
  [MTD] driver model updates
  [MTD] [NAND] move gen_nand's probe function to .devinit.text
  [MTD] [MAPS] move sa1100 flash's probe function to .devinit.text
  [MTD] fix use after free in register_mtd_blktrans
  [MTD] [MAPS] Drop now unused sharpsl-flash map
  [MTD] ofpart: Check name property to determine partition nodes.
  ...

Manually fix trivial conflict in drivers/mtd/maps/Makefile

15 years agoLANANA: Fix dates
Alan Cox [Mon, 6 Apr 2009 13:55:50 +0000 (14:55 +0100)]
LANANA: Fix dates

As noted by Janne Grunau it would be good if the date was also right.

(Web site also resynched)

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomd/raid1: fix build breakage
Alexander Beregalov [Mon, 6 Apr 2009 21:35:56 +0000 (01:35 +0400)]
md/raid1: fix build breakage

Fix this build error:

  drivers/md/raid1.c: In function 'raid1_congested':
  drivers/md/raid1.c:589: error: 'BDI_write_congested' undeclared

BDI_write_congested was changed in commit 1faa16d228 ("block: change the
request allocation/congestion logic to be sync/async based")

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago8250: Fix warning
Alan Cox [Mon, 6 Apr 2009 16:35:42 +0000 (17:35 +0100)]
8250: Fix warning

The 8430 patch was short a const so caused a warning.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agorio: addition has higher precedence than ?:
Roel Kluin [Mon, 6 Apr 2009 16:35:34 +0000 (17:35 +0100)]
rio: addition has higher precedence than ?:

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosymbol: Remove various bits of left over junk
Alan Cox [Mon, 6 Apr 2009 16:35:25 +0000 (17:35 +0100)]
symbol: Remove various bits of left over junk

There are various bits of code here that are unfinished and instead of
being harmless either confuse or spew stuff into the logs at higher than
debug level. They can and should go away.

Also remove the bogus use of tty->lowlatency. We fixed the need for this hack
long ago (with the flip buffer rewrite) but people keep copying it into drivers.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: pl2303 needs identifiers for Siemens S81 as well as EF81
Alan Cox [Mon, 6 Apr 2009 16:35:12 +0000 (17:35 +0100)]
tty: pl2303 needs identifiers for Siemens S81 as well as EF81

Closes bug 9065

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocdc-acm: zydas 1602 identifier needed
Alan Cox [Mon, 6 Apr 2009 16:35:01 +0000 (17:35 +0100)]
cdc-acm: zydas 1602 identifier needed

Bugzilla #9095 and a couple of other confirmations

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoicom: remove unused variables
Breno Leitao [Mon, 6 Apr 2009 16:34:53 +0000 (17:34 +0100)]
icom: remove unused variables

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomux: fix build problem
Alexander Beregalov [Mon, 6 Apr 2009 16:34:34 +0000 (17:34 +0100)]
mux: fix build problem

Fixes:

  In file included from drivers/serial/mux.c:37:
  include/linux/serial_core.h: In function 'uart_handle_sysrq_char':
  include/linux/serial_core.h:467: error: 'struct uart_port' has no member named 'sysrq'
  include/linux/serial_core.h:468: error: 'struct uart_port' has no member named 'sysrq'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agojsm: Fix the return variable and removing the unused retval.
Breno Leitao [Mon, 6 Apr 2009 16:34:27 +0000 (17:34 +0100)]
jsm: Fix the return variable and removing the unused retval.

As it was, the retval was never returned, so its assignments were silly.
Just consolidate everything to rc, and remove the unused retval variable.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@etchedpixels.co.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agojsm: define init function as __devinit
Breno Leitao [Mon, 6 Apr 2009 16:34:17 +0000 (17:34 +0100)]
jsm: define init function as __devinit

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomxser: remove tty_port_tty_get from mxser_check_modem_status
Jiri Slaby [Mon, 6 Apr 2009 16:34:10 +0000 (17:34 +0100)]
mxser: remove tty_port_tty_get from mxser_check_modem_status

mxser_check_modem_status is called with tty parameter, so the
reference should be increased by callers already -- for ioctl
syscall it is held whole time gap since open to close, for
interrupt, the reference count is increased in the irq handler.

There is no tty_kref_put in that function, so this also fixes
a refcounting bug.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: moxa, fix refcounting in moxa_poll_port
Jiri Slaby [Mon, 6 Apr 2009 16:34:04 +0000 (17:34 +0100)]
tty: moxa, fix refcounting in moxa_poll_port

There is missing tty_kref_put on some paths in moxa_poll_port,
although the reference is always taken. Fix it.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Reported-by: Jan 'Yenya' Kasprzak <kas@fi.muni.cz>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoisicom: isicom kref leak fix
Alan Cox [Mon, 6 Apr 2009 16:33:55 +0000 (17:33 +0100)]
isicom: isicom kref leak fix

The isicom driver leaks a kref on the shutdown path. Drop the additional
kref we took

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoucc: Fix leaky error path
Alan Cox [Mon, 6 Apr 2009 16:33:48 +0000 (17:33 +0100)]
ucc: Fix leaky error path

Found by Daniel Marjamäki using cppcheck

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoriscom8: Auto-load riscom8 module when device opened.
Scott James Remnant [Mon, 6 Apr 2009 16:33:26 +0000 (17:33 +0100)]
riscom8: Auto-load riscom8 module when device opened.

The riscom8 module is missing the char-major-48-* alias that would cause
it to be auto-loaded when a device of that type is opened.  This patch
adds the alias.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agousb: Auto-load cdc_acm module when device opened.
Scott James Remnant [Mon, 6 Apr 2009 16:33:18 +0000 (17:33 +0100)]
usb: Auto-load cdc_acm module when device opened.

The cdc_acm module is missing the char-major-166-* alias that would
cause it to be auto-loaded when a device of that type is opened.  This
patch adds the alias.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospecialix: Auto-load specialix module when device opened.
Scott James Remnant [Mon, 6 Apr 2009 16:33:11 +0000 (17:33 +0100)]
specialix: Auto-load specialix module when device opened.

The specialix module is missing the char-major-75-* alias that would
cause it to be auto-loaded when a device of that type is opened.  This
patch adds the alias.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocyclades: Auto-load cyclades module when device opened.
Scott James Remnant [Mon, 6 Apr 2009 16:33:04 +0000 (17:33 +0100)]
cyclades: Auto-load cyclades module when device opened.

The cyclades module is missing the char-major-19-* alias that would
cause it to be auto-loaded when a device of that type is opened.  This
patch adds the alias.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoapplicom: Auto-load applicom module when device opened.
Scott James Remnant [Mon, 6 Apr 2009 16:32:58 +0000 (17:32 +0100)]
applicom: Auto-load applicom module when device opened.

The applicom module is missing the char-major-10-157 alias that would
cause it to be auto-loaded when a device of that type is opened.  This
patch adds the alias.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblackfin: Subtract ANOMALY_05000230 on quot
Graf Yang [Mon, 6 Apr 2009 16:32:49 +0000 (17:32 +0100)]
blackfin: Subtract ANOMALY_05000230 on quot

Fix bug - up arrow key works abnormal for bf561 ezkit board

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix DMA rx ring buffer handling
Sonic Zhang [Mon, 6 Apr 2009 16:32:42 +0000 (17:32 +0100)]
Fix DMA rx ring buffer handling

Reported-by: Qian Zhang <zhangq@sansitech.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblackfin: Fix tty compile error in PIO mode
Sonic Zhang [Mon, 6 Apr 2009 16:32:35 +0000 (17:32 +0100)]
blackfin: Fix tty compile error in PIO mode

Fixes this compile issue:

  drivers/serial/bfin_5xx.c: In function bfin_serial_rx_chars:
  drivers/serial/bfin_5xx.c:178: error: struct uart_info has no member named tty

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblackfin: Use unsigned long for flags with irq functions
Mike Frysinger [Mon, 6 Apr 2009 16:32:28 +0000 (17:32 +0100)]
blackfin: Use unsigned long for flags with irq functions

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblackfin: BF538/9 serial uart support
Michael Hennerich [Mon, 6 Apr 2009 16:32:21 +0000 (17:32 +0100)]
blackfin: BF538/9 serial uart support

Enable third UART on BF538/9

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago8250_pci: add support for National Instruments legacy 8420 RS232 boards
Will Page [Mon, 6 Apr 2009 16:32:15 +0000 (17:32 +0100)]
8250_pci: add support for National Instruments legacy 8420 RS232 boards

Signed-off-by: Will Page <will.page@ni.com>
Signed-off-by: Shawn Bohrer <shawn.bohrer@ni.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago8250_pci: add support for National Instruments 843x RS232 devices
Shawn Bohrer [Mon, 6 Apr 2009 16:32:07 +0000 (17:32 +0100)]
8250_pci: add support for National Instruments 843x RS232 devices

This implements basic support for all 843x RS232 devices, but does not
add DMA support.  This means that sustained data transfers at high baud
rates may not be possible on multiple ports simultaneously.

Signed-off-by: Shawn Bohrer <shawn.bohrer@ni.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoserial: Update PNP IDs
Matthew Garrett [Mon, 6 Apr 2009 16:32:01 +0000 (17:32 +0100)]
serial: Update PNP IDs

Add new Wacom device IDs to the 8250_pnp serial driver, to support
autoconfig on some newer tablet PCs.  Also add a comment to clarify that
the FUJ02E6 device is a custom protocol, not a Wacom tablet.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@etchedpixels.co.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago8250_pnp.c: add another Wacom tablet
Danny Kukawka [Mon, 6 Apr 2009 16:31:54 +0000 (17:31 +0100)]
8250_pnp.c: add another Wacom tablet

Add another serial Wacom tablet with pnp_id: WACF009.

Signed-off-by: Danny Kukawka <dkukawka@suse.de>
Signed-off-by: Alan Cox <alan@etchedpixels.co.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMake CONFIG_SLOW_WORK an automatic rather than manual config option
David Howells [Mon, 6 Apr 2009 14:47:25 +0000 (15:47 +0100)]
Make CONFIG_SLOW_WORK an automatic rather than manual config option

Make CONFIG_SLOW_WORK an automatic rather than manual config option so that
people configuring their kernels don't have to make the choice.  It can be
selected automatically by those things that require it (such as FS-Cache).

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFRV: Fix compile breakage
Adrian Bunk [Mon, 6 Apr 2009 14:36:04 +0000 (15:36 +0100)]
FRV: Fix compile breakage

This patch fixes the follwing build error caused by
commit 7ca43e7564679604d86e9ed834e7bbcffd8a4a3f
(mm: use debug_kmap_atomic):

  ...
    AS      arch/frv/mm/tlb-miss.o
  In file included from
  arch/frv/mm/tlb-miss.S:13:
  ...
  Assembler messages:
  include/asm-generic/ioctl.h:73:
  Error: unrecognized instruction `extern unsigned int __invalid_size_argument_for_IO...'
  ...

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.infradead.org/iommu-2.6
Linus Torvalds [Mon, 6 Apr 2009 21:26:05 +0000 (14:26 -0700)]
Merge git://git.infradead.org/iommu-2.6

* git://git.infradead.org/iommu-2.6:
  drivers/pci/intr_remapping.c: include acpi.h
  intel-iommu: Fix oops in device_to_iommu() when devices not found.
  intel-iommu: Handle PCI domains appropriately.
  intel-iommu: Fix device-to-iommu mapping for PCI-PCI bridges.
  x2apic/intr-remap: decouple interrupt remapping from x2apic
  x86, dmar: check if it's initialized before disable queue invalidation
  intel-iommu: set compatibility format interrupt
  Intel IOMMU Suspend/Resume Support - Interrupt Remapping
  Intel IOMMU Suspend/Resume Support - Queued Invalidation
  Intel IOMMU Suspend/Resume Support - DMAR
  intel-iommu: Add for_each_iommu() and for_each_active_iommu() macros

15 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Mon, 6 Apr 2009 20:46:27 +0000 (13:46 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md/raid1 - don't assume newly allocated bvecs are initialised.

15 years agodrivers/pci/intr_remapping.c: include acpi.h
Alexander Beregalov [Mon, 6 Apr 2009 15:45:28 +0000 (16:45 +0100)]
drivers/pci/intr_remapping.c: include acpi.h

Fix this build error:
drivers/pci/intr_remapping.c: In function 'ir_parse_ioapic_scope':
drivers/pci/intr_remapping.c:617: error: invalid use of undefined type
         'struct acpi_dmar_hardware_unit'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agopercpu: __percpu_depopulate_mask can take a const mask
Stephen Rothwell [Mon, 6 Apr 2009 05:08:29 +0000 (15:08 +1000)]
percpu: __percpu_depopulate_mask can take a const mask

This eliminates a compiler warning:

  mm/allocpercpu.c: In function 'free_percpu':
  mm/allocpercpu.c:146: warning: passing argument 2 of '__percpu_depopulate_mask' discards qualifiers from pointer target type

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodocs: alphabetize entries in kernel-parameters.txt
Randy Dunlap [Sun, 5 Apr 2009 22:55:22 +0000 (15:55 -0700)]
docs: alphabetize entries in kernel-parameters.txt

Move entries to be in alpha order as specified near the beginning
of this file.

Clean up some whitespace and line-length miscues.

Add '=' to "selinux" option syntax.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodocbook: fix fatal filename error
Randy Dunlap [Sun, 5 Apr 2009 22:45:34 +0000 (15:45 -0700)]
docbook: fix fatal filename error

Fix docbook fatal error:

docproc: block/blktrace.c: No such file or directory

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokernel/sysctl.c: avoid annoying warnings
Linus Torvalds [Mon, 6 Apr 2009 20:38:46 +0000 (13:38 -0700)]
kernel/sysctl.c: avoid annoying warnings

Some of the limit constants are used only depending on some complex
configuration dependencies, yet it's not worth making the simple
variables depend on those configuration details.  Just mark them as
perhaps not being unused, and avoid the warning.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 6 Apr 2009 20:37:30 +0000 (13:37 -0700)]
Merge branch 'locking-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  lockdep: add stack dumps to asserts
  hrtimer: fix rq->lock inversion (again)

15 years agointel-iommu: Fix oops in device_to_iommu() when devices not found.
David Woodhouse [Mon, 6 Apr 2009 20:30:01 +0000 (13:30 -0700)]
intel-iommu: Fix oops in device_to_iommu() when devices not found.

It's possible for a device in the drhd->devices[] array to be NULL if
it wasn't found at boot time, which means we have to check for that
case.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agoMerge branch 'kmemtrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 6 Apr 2009 20:30:00 +0000 (13:30 -0700)]
Merge branch 'kmemtrace-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'kmemtrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  kmemtrace: trace kfree() calls with NULL or zero-length objects
  kmemtrace: small cleanups
  kmemtrace: restore original tracing data binary format, improve ABI
  kmemtrace: kmemtrace_alloc() must fill type_id
  kmemtrace: use tracepoints
  kmemtrace, rcu: don't include unnecessary headers, allow kmemtrace w/ tracepoints
  kmemtrace, rcu: fix rcupreempt.c data structure dependencies
  kmemtrace, rcu: fix rcu_tree_trace.c data structure dependencies
  kmemtrace, rcu: fix linux/rcutree.h and linux/rcuclassic.h dependencies
  kmemtrace, mm: fix slab.h dependency problem in mm/failslab.c
  kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_unlzma.c
  kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_bunzip2.c
  kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_inflate.c
  kmemtrace, squashfs: fix slab.h dependency problem in squasfs
  kmemtrace, befs: fix slab.h dependency problem
  kmemtrace, security: fix linux/key.h header file dependencies
  kmemtrace, fs: fix linux/fdtable.h header file dependencies
  kmemtrace, fs: uninline simple_transaction_set()
  kmemtrace, fs, security: move alloc_secdata() and free_secdata() to linux/security.h

15 years agoMerge branch 'for-2.6.30' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Mon, 6 Apr 2009 20:25:56 +0000 (13:25 -0700)]
Merge branch 'for-2.6.30' of git://linux-nfs.org/~bfields/linux

* 'for-2.6.30' of git://linux-nfs.org/~bfields/linux: (81 commits)
  nfsd41: define nfsd4_set_statp as noop for !CONFIG_NFSD_V4
  nfsd41: define NFSD_DRC_SIZE_SHIFT in set_max_drc
  nfsd41: Documentation/filesystems/nfs41-server.txt
  nfsd41: CREATE_EXCLUSIVE4_1
  nfsd41: SUPPATTR_EXCLCREAT attribute
  nfsd41: support for 3-word long attribute bitmask
  nfsd: dynamically skip encoded fattr bitmap in _nfsd4_verify
  nfsd41: pass writable attrs mask to nfsd4_decode_fattr
  nfsd41: provide support for minor version 1 at rpc level
  nfsd41: control nfsv4.1 svc via /proc/fs/nfsd/versions
  nfsd41: add OPEN4_SHARE_ACCESS_WANT nfs4_stateid bmap
  nfsd41: access_valid
  nfsd41: clientid handling
  nfsd41: check encode size for sessions maxresponse cached
  nfsd41: stateid handling
  nfsd: pass nfsd4_compound_state* to nfs4_preprocess_{state,seq}id_op
  nfsd41: destroy_session operation
  nfsd41: non-page DRC for solo sequence responses
  nfsd41: Add a create session replay cache
  nfsd41: create_session operation
  ...

15 years agoMerge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Mon, 6 Apr 2009 20:25:27 +0000 (13:25 -0700)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c: Delete unused i2c-algo-sgi helper module
  i2c: Delete many unused driver IDs
  i2c: Deprecate client_register and client_unregister methods

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Mon, 6 Apr 2009 20:24:49 +0000 (13:24 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (74 commits)
  [SCSI] sg: fix q->queue_lock on scsi_error_handler path
  [SCSI] replace __inline with inline
  [SCSI] a2091: make 2 functions static
  [SCSI] a3000: make 2 functions static
  [SCSI] ses: #if 0 the unused ses_match_host()
  [SCSI] use kmem_cache_zalloc instead of kmem_cache_alloc/memset
  [SCSI] sg: fix iovec bugs introduced by the block layer conversion
  [SCSI] qlogicpti: use request_firmware
  [SCSI] advansys: use request_firmware
  [SCSI] qla1280: use request_firmware
  [SCSI] libiscsi: fix iscsi pool error path
  [SCSI] cxgb3i: call ddp release function directly
  [SCSI] cxgb3i: merge cxgb3i_ddp into cxgb3i module
  [SCSI] cxgb3i: close all tcp connections upon chip reset
  [SCSI] cxgb3i: re-read ddp settings information after chip reset
  [SCSI] cxgb3i: re-initialize ddp settings after chip reset
  [SCSI] cxgb3i: subscribe to error notification from cxgb3 driver
  [SCSI] aacraid driver update
  [SCSI] mptsas: remove unneeded check
  [SCSI] config: Make need for SCSI_CDROM clearer
  ...

15 years agoMerge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
Linus Torvalds [Mon, 6 Apr 2009 20:24:00 +0000 (13:24 -0700)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight:
  backlight: Adds HP Jornada 700 series backlight driver
  backlight: Add HP Jornada 700 series LCD driver
  backlight: fix pwm_bl.c when multiple PWM backlights exist
  backlight: mbp_nvidia_bl - Add a debug switch
  backlight: Add support for MacBook 5, MacBook Air 2, and MacBook Pro 5

15 years agoMerge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
Linus Torvalds [Mon, 6 Apr 2009 20:22:45 +0000 (13:22 -0700)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
  leds: introduce lp5521 led driver
  leds: just ignore invalid GPIOs in leds-gpio
  leds: Fix &&/|| confusion in leds-pca9532.c
  leds: move h1940-leds's probe function to .devinit.text
  leds: remove an unnecessary "goto" on drivers/leds/leds-s3c24.c
  leds: add BD2802GU LED driver
  leds: remove experimental flag from leds-clevo-mail
  leds: Prevent multiple LED triggers with the same name
  leds: Add gpio-led trigger
  leds: Add rb532 LED driver for the User LED
  leds: Add suspend/resume state flags to leds-gpio
  leds: simple driver for pwm driven LEDs
  leds: Fix leds-gpio driver multiple module_init/exit usage
  leds: Add dac124s085 driver
  leds: allow led-drivers to use a variable range of brightness values
  leds: Add openfirmware platform device support

15 years agonfsd41: define nfsd4_set_statp as noop for !CONFIG_NFSD_V4
Benny Halevy [Mon, 6 Apr 2009 09:00:49 +0000 (12:00 +0300)]
nfsd41: define nfsd4_set_statp as noop for !CONFIG_NFSD_V4

Fixes following modpost error:
ERROR: "nfsd4_set_statp" [fs/nfsd/nfsd.ko] undefined!

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agonfsd41: define NFSD_DRC_SIZE_SHIFT in set_max_drc
Benny Halevy [Mon, 6 Apr 2009 09:00:36 +0000 (12:00 +0300)]
nfsd41: define NFSD_DRC_SIZE_SHIFT in set_max_drc

Fixes the following compiler error:
fs/nfsd/nfssvc.c: In function 'set_max_drc':
fs/nfsd/nfssvc.c:240: error: 'NFSD_DRC_SIZE_SHIFT' undeclared

CONFIG_NFSD_V4 is not set

Reported-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agoi2c: Delete unused i2c-algo-sgi helper module
Jean Delvare [Mon, 6 Apr 2009 16:12:25 +0000 (18:12 +0200)]
i2c: Delete unused i2c-algo-sgi helper module

The i2c-algo-sgi code was merged into the vino driver, so we can
delete it now.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c: Delete many unused driver IDs
Jean Delvare [Mon, 6 Apr 2009 16:12:25 +0000 (18:12 +0200)]
i2c: Delete many unused driver IDs

Delete many unused I2C driver IDs. We should be able to get rid of
i2c_driver.id pretty soon now.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c: Deprecate client_register and client_unregister methods
Jean Delvare [Mon, 6 Apr 2009 16:12:24 +0000 (18:12 +0200)]
i2c: Deprecate client_register and client_unregister methods

The new i2c binding model makes the client_register and
client_unregister methods of struct i2c_adapter useless, so we can
remove them with the rest of the legacy model.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agobacklight: Adds HP Jornada 700 series backlight driver
Kristoffer Ericson [Wed, 18 Feb 2009 11:50:43 +0000 (11:50 +0000)]
backlight: Adds HP Jornada 700 series backlight driver

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agobacklight: Add HP Jornada 700 series LCD driver
Kristoffer Ericson [Wed, 18 Feb 2009 11:47:26 +0000 (11:47 +0000)]
backlight: Add HP Jornada 700 series LCD driver

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agobacklight: fix pwm_bl.c when multiple PWM backlights exist
Eric Miao [Tue, 10 Feb 2009 05:30:37 +0000 (13:30 +0800)]
backlight: fix pwm_bl.c when multiple PWM backlights exist

When multiple PWMs are used as backlights, the current code uses
pdev->name as the backlight name when registering, which will be
conflicting, use dev_name() instead.

Signed-off-by: Peter Edwards <sweetlilmre@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agobacklight: mbp_nvidia_bl - Add a debug switch
Mario Schwalbe [Sun, 11 Jan 2009 00:19:31 +0000 (00:19 +0000)]
backlight: mbp_nvidia_bl - Add a debug switch

This patch adds a debug switch to enable (little) diagnostic
output, to help to trace down the remaining problems.

Signed-off-by: Mario Schwalbe <schwalbe@inf.tu-dresden.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agobacklight: Add support for MacBook 5, MacBook Air 2, and MacBook Pro 5
Mario Schwalbe [Sun, 11 Jan 2009 00:11:34 +0000 (00:11 +0000)]
backlight: Add support for MacBook 5, MacBook Air 2, and MacBook Pro 5

This patch adds support for the new Apple models incorporating an Nvidia
chipset.  Apple still uses the same protocol as on older models, but the
registers moved to a different address. To do this, two sets of functions
are added for the Intel/Nvidia chipset models and passed by the DMI_MATCH
function.

The initial code has been contributed by Hu Gang <hugang@soulinfo.com>.

The driver is known to work on MacBook Pro 3, MacBook Pro 4 and MacBook
Pro 5.

Its known to work with limitations on MacBook 5 / MacBook Air 2. Changing
brightness within X doesn't work, if using Nvidia's proprietary graphics
driver with no known fix at present. Changing brightness on a text console
or using the open-source driver does work.

MacBook Pro 5 has a known bug where the initial brightness after bootup is
the last recently used brightness (in Mac OSX), while the firmware reports
maximum. Impossible to fix.

[akpm@linux-foundation.org: build fix]
[rpurdie@linux.intel.com: Rebased the patch against latest git]
Signed-off-by: Mario Schwalbe <schwalbe@inf.tu-dresden.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: introduce lp5521 led driver
Felipe Balbi [Wed, 18 Feb 2009 12:05:54 +0000 (14:05 +0200)]
leds: introduce lp5521 led driver

LP5521 is a three channel led driver with support
for hardware accelerated patterns (currently used
via lp5521-only sysfs interface).

Currently, it's used on n810 device.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: just ignore invalid GPIOs in leds-gpio
David Brownell [Fri, 6 Mar 2009 00:46:44 +0000 (16:46 -0800)]
leds: just ignore invalid GPIOs in leds-gpio

Sometimes it's awkward to make sure that the array in the
platform_data handed to the leds-gpio driver has only valid
data ... some leds may not be always available, and coping
with that currently requires patching or rebuilding the array.

This patch fixes that by making it be OK to pass an invalid
GPIO (such as "-EINVAL") ... such table entries are skipped.

[rpurdie@linux.intel.com: adjusted to apply against other led tree changes]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Tested-by: Diego Dompe <diego.dompe@ridgerun.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Fix &&/|| confusion in leds-pca9532.c
Riku Voipio [Tue, 3 Mar 2009 20:13:06 +0000 (22:13 +0200)]
leds: Fix &&/|| confusion in leds-pca9532.c

This fixes the expression in the driver to do the correct thing,
not that I think anyone would send SND_* without EV_SND.

Thanks to Roel Kluin <roel.kluin@gmail.com> for noticing.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: move h1940-leds's probe function to .devinit.text
Uwe Kleine-König [Fri, 27 Mar 2009 23:26:38 +0000 (00:26 +0100)]
leds: move h1940-leds's probe function to .devinit.text

A pointer to h1940leds_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded.  Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: remove an unnecessary "goto" on drivers/leds/leds-s3c24.c
Zhenwen Xu [Fri, 3 Apr 2009 14:35:52 +0000 (15:35 +0100)]
leds: remove an unnecessary "goto" on drivers/leds/leds-s3c24.c

This goto is unnecessary.

Signed-off-by: Zhenwen Xu <helight.xu@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: add BD2802GU LED driver
Kim Kyuwon [Wed, 4 Mar 2009 19:59:29 +0000 (11:59 -0800)]
leds: add BD2802GU LED driver

ROHM BD2802GU is a RGB LED controller attached to i2c bus and specifically
engineered for decoration purposes.  This RGB controller incorporates
lighting patterns and illuminates.

This driver is designed to minimize power consumption, so when there is no
emitting LED, it enters to reset state.  And because the BD2802GU has lots
of features that can't be covered by the current LED framework, it
provides Advanced Configuration Function(ADF) mode, so that user
applications can set registers of BD2802GU directly.

Here are basic usage examples :
; to turn on LED (not blink)
$ echo 1 > /sys/class/leds/led1_R/brightness
; to blink LED
$ echo timer > /sys/class/leds/led1_R/trigger
$ echo 1 > /sys/class/leds/led1_R/delay_on
$ echo 1 > /sys/class/leds/led1_R/delay_off
; to turn off LED
$ echo 0 > /sys/class/leds/led1_R/brightness

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Kim Kyuwon <chammoru@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: remove experimental flag from leds-clevo-mail
Németh Márton [Fri, 3 Apr 2009 05:42:47 +0000 (07:42 +0200)]
leds: remove experimental flag from leds-clevo-mail

The leds-clevo-mail driver is in the mainline kernel since 2.6.25 and works
without severe problems. Make this driver available for a larger audience.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Prevent multiple LED triggers with the same name
Adam Nielsen [Tue, 17 Feb 2009 22:18:04 +0000 (08:18 +1000)]
leds: Prevent multiple LED triggers with the same name

Signed-off-by: Adam Nielsen <a.nielsen@shikadi.net>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Add gpio-led trigger
Felipe Balbi [Tue, 17 Feb 2009 11:18:11 +0000 (13:18 +0200)]
leds: Add gpio-led trigger

The gpio led trigger will allow leds to be triggered by
gpio events.

When we give the led a gpio number, the trigger will
request_irq() on that so we don't have to keep polling
for gpio state.

It's useful for usecases as n810's keypad leds that could
be triggered by the gpio event generated when user slides
up to show the keypad.

We also provide means for userland to tell us what is the
desired brightness for that special led when it goes on
so userland could use information from ambient light sensors
and not set led brightness too high if it's not necessary.

Signed-off-by: Felipe Balbi <me@felipebalbi.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Add rb532 LED driver for the User LED
Phil Sutter [Thu, 22 Jan 2009 18:35:48 +0000 (19:35 +0100)]
leds: Add rb532 LED driver for the User LED

Mikrotik built six LEDs into the Routerboard 532, from which one is
destined for custom use, the so called "User LED". This patch adds a
driver for it, based on the LEDs class.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Add suspend/resume state flags to leds-gpio
Richard Purdie [Tue, 17 Feb 2009 15:04:07 +0000 (15:04 +0000)]
leds: Add suspend/resume state flags to leds-gpio

Add an option to preserve LED state when suspending/resuming to the LED
gpio driver. Based on a suggestion from Robert Jarzmik.

Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: simple driver for pwm driven LEDs
Luotao Fu [Wed, 11 Feb 2009 21:24:40 +0000 (13:24 -0800)]
leds: simple driver for pwm driven LEDs

Add a simple driver for pwm driver LEDs.  pwm_id and period can be defined
in board file.  It is developed for pxa, however it is probably generic
enough to be used on other platforms with pwm.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Fix leds-gpio driver multiple module_init/exit usage
Richard Purdie [Mon, 2 Feb 2009 23:04:42 +0000 (23:04 +0000)]
leds: Fix leds-gpio driver multiple module_init/exit usage

You can't have multiple module_init()/module_exit calls so resort to messy
ifdefs potentially pending some code refactoring.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Add dac124s085 driver
Guennadi Liakhovetski [Sat, 10 Jan 2009 18:58:28 +0000 (18:58 +0000)]
leds: Add dac124s085 driver

Add an LED driver using the DAC124S085 DAC from NatSemi

[randy.dunlap@oracle.com: use header files for interfaces]
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: allow led-drivers to use a variable range of brightness values
Guennadi Liakhovetski [Sat, 10 Jan 2009 18:54:39 +0000 (18:54 +0000)]
leds: allow led-drivers to use a variable range of brightness values

This patch allows drivers to override the default maximum brightness value
of 255.  We take care to preserve backwards-compatibility as much as
possible, so that user-space ABI doesn't change for existing drivers.
LED trigger code has also been updated to use the per-LED maximum.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Add openfirmware platform device support
Trent Piepho [Sat, 10 Jan 2009 17:26:01 +0000 (17:26 +0000)]
leds: Add openfirmware platform device support

Add bindings to support LEDs defined as of_platform devices in addition to
the existing bindings for platform devices.

New options in Kconfig allow the platform binding code and/or the
of_platform code to be turned on.  The of_platform code is of course only
available on archs that have OF support.

The existing probe and remove methods are refactored to use new functions
create_gpio_led(), to create and register one led, and delete_gpio_led(),
to unregister and free one led.  The new probe and remove methods for the
of_platform driver can then share most of the common probe and remove code
with the platform driver.

The suspend and resume methods aren't shared, but they are very short.  The
actual led driving code is the same for LEDs created by either binding.

The OF bindings are based on patch by Anton Vorontsov
<avorontsov@ru.mvista.com>.  They have been extended to allow multiple LEDs
per device.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoblock: switch sync_dirty_buffer() over to WRITE_SYNC
Jens Axboe [Mon, 6 Apr 2009 12:48:08 +0000 (14:48 +0200)]
block: switch sync_dirty_buffer() over to WRITE_SYNC

We should now have the logic in place to handle this properly
without regressing on the write performance, so re-enable
the sync writes.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblock: Add flag for telling the IO schedulers NOT to anticipate more IO
Jens Axboe [Mon, 6 Apr 2009 12:48:07 +0000 (14:48 +0200)]
block: Add flag for telling the IO schedulers NOT to anticipate more IO

By default, CFQ will anticipate more IO from a given io context if the
previously completed IO was sync. This used to be fine, since the only
sync IO was reads and O_DIRECT writes. But with more "normal" sync writes
being used now, we don't want to anticipate for those.

Add a bio/request flag that informs the IO scheduler that this is a sync
request that we should not idle for. Introduce WRITE_ODIRECT specifically
for O_DIRECT writes, and make sure that the other sync writes set this
flag.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblock: enabling plugging on SSD devices that don't do queuing
Jens Axboe [Mon, 6 Apr 2009 12:48:06 +0000 (14:48 +0200)]
block: enabling plugging on SSD devices that don't do queuing

For the older SSD devices that don't do command queuing, we do want to
enable plugging to get better merging.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agojbd2: use WRITE_SYNC_PLUG instead of WRITE_SYNC
Jens Axboe [Mon, 6 Apr 2009 12:48:05 +0000 (14:48 +0200)]
jbd2: use WRITE_SYNC_PLUG instead of WRITE_SYNC

When you are going to be submitting several sync writes, we want to
give the IO scheduler a chance to merge some of them. Instead of
using the implicitly unplugging WRITE_SYNC variant, use WRITE_SYNC_PLUG
and rely on sync_buffer() doing the unplug when someone does a
wait_on_buffer()/lock_buffer().

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agojbd: use WRITE_SYNC_PLUG instead of WRITE_SYNC
Jens Axboe [Mon, 6 Apr 2009 12:48:04 +0000 (14:48 +0200)]
jbd: use WRITE_SYNC_PLUG instead of WRITE_SYNC

When you are going to be submitting several sync writes, we want to
give the IO scheduler a chance to merge some of them. Instead of
using the implicitly unplugging WRITE_SYNC variant, use WRITE_SYNC_PLUG
and rely on sync_buffer() doing the unplug when someone does a
wait_on_buffer()/lock_buffer().

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblock: fsync_buffers_list() should use SWRITE_SYNC_PLUG
Jens Axboe [Mon, 6 Apr 2009 12:48:03 +0000 (14:48 +0200)]
block: fsync_buffers_list() should use SWRITE_SYNC_PLUG

Then it can submit all the buffers without unplugging for each one.
We will kick off the pending IO if we come across a new address space.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoAdd WRITE_SYNC_PLUG and SWRITE_SYNC_PLUG
Jens Axboe [Mon, 6 Apr 2009 12:48:02 +0000 (14:48 +0200)]
Add WRITE_SYNC_PLUG and SWRITE_SYNC_PLUG

(S)WRITE_SYNC always unplugs the device right after IO submission.
Sometimes we want to build up a queue before doing so, so add
variants that explicitly DON'T unplug the queue. The caller must
then do that after submitting all the IO.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>