pandora-kernel.git
14 years agotracing/events: Only define remove_subsystem_dir() if CONFIG_MODULES
Frederic Weisbecker [Thu, 6 Aug 2009 05:32:21 +0000 (07:32 +0200)]
tracing/events: Only define remove_subsystem_dir() if CONFIG_MODULES

If we disable modules, we get the following warning in ftrace events
file:

kernel/trace/trace_events.c:912: attention : ‘remove_subsystem_dir’ defined but not used

remove_subystem_dir() is useless if !CONFIG_MODULES, then move it to
the appropriate #ifdef section of trace_events.c

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
14 years agotracing/function-graph-tracer: Move graph event insertion helpers in the graph tracer...
Frederic Weisbecker [Wed, 29 Jul 2009 16:59:58 +0000 (18:59 +0200)]
tracing/function-graph-tracer: Move graph event insertion helpers in the graph tracer file

The function graph events helpers which insert the function entry and
return events into the ring buffer currently reside in trace.c
But this file is quite overloaded and the right place for these helpers
is in the function graph tracer file.

Then move them to trace_functions_graph.c

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
14 years agotracing: Move sched event insertion helpers in the sched switch tracer file
Frederic Weisbecker [Wed, 29 Jul 2009 16:00:29 +0000 (18:00 +0200)]
tracing: Move sched event insertion helpers in the sched switch tracer file

The sched events helpers which insert the sched switch and wakeup
events into the ring buffer currently reside in trace.c
But this file is quite overloaded and the right place for these helpers
is in the sched switch tracer file.

Then move them to trace_functions.c

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
14 years agotracing/core: Make the stack entry helpers global
Frederic Weisbecker [Wed, 29 Jul 2009 15:51:13 +0000 (17:51 +0200)]
tracing/core: Make the stack entry helpers global

Make the stacktrace event insertion helpers globals.
This has two effects:

- Prepare for moving the sched events insertion helpers to
  the sched switch tracer file.
- Move some ifdef outside function definitions

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
14 years agotracing/core: Turn ftrace_cpu_disabled into a global var
Frederic Weisbecker [Wed, 29 Jul 2009 15:11:12 +0000 (17:11 +0200)]
tracing/core: Turn ftrace_cpu_disabled into a global var

In order to prepare the moving of the function graph tracer insertion
helpers from trace.c to trace_functions_graph.c, we need to export the
ftrace_cpu_disabled variable.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
14 years agotracing/function-graph-tracer: Drop the useless nmi protection
Frederic Weisbecker [Wed, 29 Jul 2009 01:33:51 +0000 (03:33 +0200)]
tracing/function-graph-tracer: Drop the useless nmi protection

The function graph tracer used to have a protection against NMI
while entering a function entry tracing. But this is useless now,
this tracer is reentrant and the ring buffer supports the NMI tracing.
We can then drop this protection.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
14 years agotracing: Simplify print_graph_cpu()
Lai Jiangshan [Tue, 28 Jul 2009 12:26:06 +0000 (20:26 +0800)]
tracing: Simplify print_graph_cpu()

print_graph_cpu() is little over-designed.

And "log10_all" may be wrong when there are holes in cpu_online_mask:
the max online cpu id > cpumask_weight(cpu_online_mask)

So change it by using a static column length for the cpu matching
nr_cpu_ids number of decimal characters.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <4A6EEE5E.2000001@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
14 years agotracing/filters: improve subsystem filter
Li Zefan [Mon, 20 Jul 2009 02:20:53 +0000 (10:20 +0800)]
tracing/filters: improve subsystem filter

Currently a subsystem filter should be applicable to all events
under the subsystem, and if it failed, all the event filters
will be cleared. Those behaviors make subsys filter much less
useful:

  # echo 'vec == 1' > irq/softirq_entry/filter
  # echo 'irq == 5' > irq/filter
  bash: echo: write error: Invalid argument
  # cat irq/softirq_entry/filter
  none

I'd expect it set the filter for irq_handler_entry/exit, and
not touch softirq_entry/exit.

The basic idea is, try to see if the filter can be applied
to which events, and then just apply to the those events:

  # echo 'vec == 1' > softirq_entry/filter
  # echo 'irq == 5' > filter
  # cat irq_handler_entry/filter
  irq == 5
  # cat softirq_entry/filter
  vec == 1

Changelog for v2:
- do some cleanups to address Frederic's comments.

Inspired-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A63D485.7030703@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agotracing: cleanup for tracing_trace_options_read()
Xiao Guangrong [Mon, 22 Jun 2009 02:33:07 +0000 (10:33 +0800)]
tracing: cleanup for tracing_trace_options_read()

'\n' is already appended, and what we need is just an extra
space for the '\0'.

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
LKML-Reference: <4A3EED63.3090908@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agotracing/events: record the size of dynamic arrays
Li Zefan [Thu, 16 Jul 2009 02:54:02 +0000 (10:54 +0800)]
tracing/events: record the size of dynamic arrays

When a dynamic array is defined, we add __data_loc_foo in
trace_entry to record the offset of the array, but the
size of the array is not recorded, which causes 2 problems:

- the event filter just compares the first 2 chars of the strings.

- parsers can't parse dynamic arrays.

So we encode the size of each dynamic array in the higher 16 bits
of __data_loc_foo, while the offset is in lower 16 bits.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4A5E964A.9000403@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agotracing/events: add missing type info of dynamic arrays
Lai Jiangshan [Thu, 16 Jul 2009 02:53:34 +0000 (10:53 +0800)]
tracing/events: add missing type info of dynamic arrays

The format file doesn't contain enough information for
__dynamic_array/__string. The type name is missing.

Before:
  # cat format:
  name: irq_handler_entry
  ...
          field:__data_loc name;  offset:16;      size:2;

After:
  # cat format:
  name: irq_handler_entry
  ...
          field:__data_loc char[] name;  offset:16;      size:2;

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4A5E962E.9020900@cn.fujitsu.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agotracing: Remove .globl in the scripts/recordmcount.pl doc
jolsa@redhat.com [Thu, 16 Jul 2009 19:44:28 +0000 (21:44 +0200)]
tracing: Remove .globl in the scripts/recordmcount.pl doc

I was reading throught the recordmcount.pl starting comment,
and spotted a tiny discrepancy.

The second example is about my_func not being global, but the
example code has the ".globl my_func" statement just moved.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: rostedt@goodmis.org
LKML-Reference: <1247773468-11594-4-git-send-email-jolsa@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agotracing: Remove unused fields/variables
jolsa@redhat.com [Thu, 16 Jul 2009 19:44:26 +0000 (21:44 +0200)]
tracing: Remove unused fields/variables

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: rostedt@goodmis.org
LKML-Reference: <1247773468-11594-2-git-send-email-jolsa@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'linus' into tracing/core
Ingo Molnar [Sat, 18 Jul 2009 10:19:57 +0000 (12:19 +0200)]
Merge branch 'linus' into tracing/core

Merge reason: tracing/core was on an older, pre-rc1 base.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Sat, 18 Jul 2009 04:19:50 +0000 (21:19 -0700)]
Merge branch 'drm-fixes' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm: Move a dereference below a NULL test
  fb/intelfb: conflict with DRM_I915 and hide by default
  drm/ttm: fix misplaced parentheses
  drm/via: Fix vblank IRQ on VIA hardware.
  drm: drm_gem, check kzalloc retval
  drm: drm_debugfs, check kmalloc retval
  drm/radeon: add some missing pci ids

14 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/fyu/linux-2.6
Linus Torvalds [Fri, 17 Jul 2009 18:15:00 +0000 (11:15 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/fyu/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/fyu/linux-2.6:
  Revert "Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h"
  Add dma_debug_init() for ia64
  Fix ia64 compilation IS_ERR and PTE_ERR errors.

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Fri, 17 Jul 2009 17:51:55 +0000 (10:51 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  x86/pci: insert ioapic resource before assigning unassigned resources

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Fri, 17 Jul 2009 15:53:56 +0000 (08:53 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: riptide -  proper handling of pci_register_driver for joystick
  sound: usb-audio: add workaround for Blue Microphones devices
  ALSA: hda_intel: more strict alc880_parse_auto_config dig_nid checking
  ASoC: Fix NULL pointer dereference in __pxa2xx_pcm_hw_free

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Fri, 17 Jul 2009 15:53:41 +0000 (08:53 -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:
  virtio_net: Sync header with qemu
  virtio-pci: correctly unregister root device on error
  virtio_blk: ioctl return value fix
  virtio_blk: don't bounce highmem requests
  lguest: restrict CPUID to avoid perf counter wrmsr
  lguest: remove unnecessary forward struct declaration
  lguest: fix journey

14 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 17 Jul 2009 15:53:14 +0000 (08:53 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  tracing/function: Fix the return value of ftrace_trace_onoff_callback()

14 years agotty_port: Fix return on interrupted use
Alan Cox [Fri, 17 Jul 2009 15:17:26 +0000 (16:17 +0100)]
tty_port: Fix return on interrupted use

Whoops.. fortunately not many people use this yet.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoRevert "Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm...
Aurelien Jarno [Fri, 17 Jul 2009 13:35:05 +0000 (06:35 -0700)]
Revert "Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h"

asm/fpu.h uses the __IA64_UL macro which is declared in asm/types.h, so
this include is really required. Without it, GNU libc fails to build.

This reverts commit 2678c07b07ac2076675e5d57653bdf02e9af1950.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Acked-by: Fenghua Yu <fenghua.yu@intel.com>
14 years agoAdd dma_debug_init() for ia64
fujita [Fri, 10 Jul 2009 04:25:05 +0000 (21:25 -0700)]
Add dma_debug_init() for ia64

The commit 9916219579d078c80377dd3988c2cc213536d868 was supposed to
add CONFIG_DMA_API_DEBUG support to IA64 however I forgot to add
dma_debug_init().

Signed-off-by: fujita <fujita@tulip.osrg.net>
Acked-by: Fenghua Yu <fenghua.yu@intel.com>
14 years agoFix ia64 compilation IS_ERR and PTE_ERR errors.
Fenghua Yu [Fri, 10 Jul 2009 04:23:39 +0000 (21:23 -0700)]
Fix ia64 compilation IS_ERR and PTE_ERR errors.

When building ia64 kernel with CONFIG_XEN_SYS_HYPERVISOR, compiler reports
errors:

drivers/xen/sys-hypervisor.c: In function ‘uuid_show’:
drivers/xen/sys-hypervisor.c:125: error: implicit declaration of function ‘IS_ERR’
drivers/xen/sys-hypervisor.c:126: error: implicit declaration of function ‘PTR_ERR’

This patch fixes the errors.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Acked-by: Isaku Yamahata <yamahata@valinux.co.jp>
14 years agovirtio_net: Sync header with qemu
Alex Williamson [Tue, 7 Jul 2009 14:47:10 +0000 (08:47 -0600)]
virtio_net: Sync header with qemu

Qemu added support for a few extra RX modes that Linux doesn't
currently make use of.  Sync the headers to maintain consistency.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agovirtio-pci: correctly unregister root device on error
Mark McLoughlin [Tue, 7 Jul 2009 07:26:45 +0000 (08:26 +0100)]
virtio-pci: correctly unregister root device on error

If pci_register_driver() fails we're incorrectly unregistering the root
device with device_unregister() rather than root_device_unregister().

Reported-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agovirtio_blk: ioctl return value fix
Christoph Hellwig [Sat, 20 Jun 2009 19:29:41 +0000 (21:29 +0200)]
virtio_blk: ioctl return value fix

Block driver ioctl methods must return ENOTTY and not -ENOIOCTLCMD if
they expect the block layer to handle generic ioctls.

This triggered a BLKROSET failure in xfsqa #200.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agovirtio_blk: don't bounce highmem requests
Christoph Hellwig [Sat, 18 Jul 2009 03:47:45 +0000 (21:47 -0600)]
virtio_blk: don't bounce highmem requests

By default a block driver bounces highmem requests, but virtio-blk is
perfectly fine with any request that fit into it's 64 bit addressing scheme,
mapped in the kernel virtual space or not.

Besides improving performance on highmem systems this also makes the
reproducible oops in __bounce_end_io go away (but hiding the real cause).

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agolguest: restrict CPUID to avoid perf counter wrmsr
Rusty Russell [Sat, 18 Jul 2009 03:47:44 +0000 (21:47 -0600)]
lguest: restrict CPUID to avoid perf counter wrmsr

Avoid the following:
[    0.012093] WARNING: at arch/x86/kernel/apic/apic.c:249 native_apic_write_dummy+0x2f/0x40()

Rather than chase each new cpuid-detected feature, just lie about the highest
valid CPUID so this code is never run.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agolguest: remove unnecessary forward struct declaration
Davide Libenzi [Sat, 18 Jul 2009 03:47:44 +0000 (21:47 -0600)]
lguest: remove unnecessary forward struct declaration

While fixing lg.h to drop the fwd declaration, I noticed
there's another one ;)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agolguest: fix journey
Matias Zabaljauregui [Thu, 18 Jun 2009 14:44:06 +0000 (11:44 -0300)]
lguest: fix journey

fix: "make Guest" was complaining about duplicated G:032

Signed-off-by: Matias Zabaljauregui <zabaljauregui@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 years agotracing/function: Cleanup for function tracer
Xiao Guangrong [Thu, 16 Jul 2009 06:21:08 +0000 (14:21 +0800)]
tracing/function: Cleanup for function tracer

We can directly use %pf input format instead of kallsyms_lookup()
and %s input format

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
14 years agotracing/trace_stack: Cleanup for trace_lookup_stack()
Xiao Guangrong [Thu, 16 Jul 2009 06:17:11 +0000 (14:17 +0800)]
tracing/trace_stack: Cleanup for trace_lookup_stack()

We can directly use %pF input format instead of sprint_symbol()
and %s input format.

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
14 years agotracing/function: Simplify __ftrace_replace_code()
Xiao Guangrong [Wed, 15 Jul 2009 04:32:15 +0000 (12:32 +0800)]
tracing/function: Simplify __ftrace_replace_code()

Rewrite the __ftrace_replace_code() function, simplify it, but don't
change the code's logic.

First, we get the state we want to set, if the record has the same
state, then do nothing, otherwise enable/disable it.

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
14 years agotracing/function: Fix the return value of ftrace_trace_onoff_callback()
Xiao Guangrong [Wed, 15 Jul 2009 04:29:06 +0000 (12:29 +0800)]
tracing/function: Fix the return value of ftrace_trace_onoff_callback()

ftrace_trace_onoff_callback() will return an error even if we do the
right operation, for example:

 # echo _spin_*:traceon:10 > set_ftrace_filter
 -bash: echo: write error: Invalid argument
 # cat set_ftrace_filter
 #### all functions enabled ####
 _spin_trylock_bh:traceon:count=10
 _spin_unlock_irq:traceon:count=10
 _spin_unlock_bh:traceon:count=10
 _spin_lock_irq:traceon:count=10
 _spin_unlock:traceon:count=10
 _spin_trylock:traceon:count=10
 _spin_unlock_irqrestore:traceon:count=10
 _spin_lock_irqsave:traceon:count=10
 _spin_lock_bh:traceon:count=10
 _spin_lock:traceon:count=10

We want to set _spin_*:traceon:10 to set_ftrace_filter, it complains
with "Invalid argument", but the operation is successful.

This is because ftrace_process_regex() returns the number of functions that
matched the pattern. If the number is not 0, this value is returned
by ftrace_regex_write() whereas we want to return the number of bytes
virtually written.
Also the file offset pointer is not updated in this case.

If the number of matched functions is lower than the number of bytes written
by the user, this results to a reprocessing of the string given by the user with
a lower size, leading to a malformed ftrace regex and then a -EINVAL returned.

So, this patch fixes it by returning 0 if no error occured.
The fix also applies on 2.6.30

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: stable@kernel.org
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
14 years agoring_buffer: Fix warning while ignoring cmpxchg return value
Lai Jiangshan [Wed, 15 Jul 2009 08:27:30 +0000 (16:27 +0800)]
ring_buffer: Fix warning while ignoring cmpxchg return value

kernel/trace/ring_buffer.c: In function 'rb_tail_page_update':
kernel/trace/ring_buffer.c:849: warning: value computed is not used
kernel/trace/ring_buffer.c:850: warning: value computed is not used

Add "(void)"s to fix this warning, because we don't need here to handle
the fail case of cmpxchg, it's fine if an interrupt already did the
job.

Changed from V1:
  Add a comment(which is written by Steven) for it.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
14 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 16 Jul 2009 17:18:29 +0000 (10:18 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/peterz/linux-2.6-sched

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-sched:
  sched: Fix bug in SCHED_IDLE interaction with group scheduling
  sched: Fix rt_rq->pushable_tasks initialization in init_rt_rq()
  sched: Reset sched stats on fork()
  sched_rt: Fix overload bug on rt group scheduling
  sched: Documentation/sched-rt-group: Fix style issues & bump version

14 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 16 Jul 2009 17:07:37 +0000 (10:07 -0700)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  timer stats: fix quick check optimization

14 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Thu, 16 Jul 2009 17:05:34 +0000 (10:05 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Fix another bug in move of altivec code to vector.S
  powerpc: Fix booke user_disable_single_step()

14 years agon_tty: Fix echo race
Alan Cox [Thu, 16 Jul 2009 15:07:03 +0000 (16:07 +0100)]
n_tty: Fix echo race

If a tty in N_TTY mode with echo enabled manages to get itself into a state
where
- echo characters are pending
- FASYNC is enabled
- tty_write_wakeup is called from either
- a device write path (pty)
- an IRQ (serial)

then it either deadlocks or explodes taking a mutex in the IRQ path.

On the serial side it is almost impossible to reproduce because you have to
go from a full serial port to a near empty one with echo characters
pending. The pty case happens to have become possible to trigger using
emacs and ptys, the pty changes having created a scenario which shows up
this bug.

The code path is

n_tty:process_echoes() (takes mutex)
tty_io:tty_put_char()
pty:pty_write  (or serial paths)
tty_wakeup     (from pty_write or serial IRQ)
n_tty_write_wakeup()
process_echoes()
*KABOOM*

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agotty: nozomi, fix tty refcounting bug
Jiri Slaby [Thu, 16 Jul 2009 15:06:18 +0000 (16:06 +0100)]
tty: nozomi, fix tty refcounting bug

Don't forget to drop a tty refererence on fail paths in
receive_data().

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agovt: drop bootmem/slab memory distinction
Johannes Weiner [Thu, 16 Jul 2009 15:06:09 +0000 (16:06 +0100)]
vt: drop bootmem/slab memory distinction

Bootmem is not used for the vt screen buffer anymore as slab is now
available at the time the console is initialized.

Get rid of the now superfluous distinction between slab and bootmem,
it's always slab.

This also fixes a kmalloc leak which Catalin described thusly:

Commit a5f4f52e ("vt: use kzalloc() instead of the bootmem allocator")
replaced the alloc_bootmem() with kzalloc() but didn't set vc_kmalloced to
1 and the memory block is later leaked.  The corresponding kmemleak trace:

unreferenced object 0xdf828000 (size 8192):
  comm "swapper", pid 0, jiffies 4294937296
  backtrace:
    [<c006d473>] __save_stack_trace+0x17/0x1c
    [<c000d869>] log_early+0x55/0x84
    [<c01cfa4b>] kmemleak_alloc+0x33/0x3c
    [<c006c013>] __kmalloc+0xd7/0xe4
    [<c00108c7>] con_init+0xbf/0x1b8
    [<c0010149>] console_init+0x11/0x20
    [<c0008797>] start_kernel+0x137/0x1e4

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Tested-by: Catalin Marinas <catalin.marinas@arm.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>
14 years agodrivers/serial/bfin_sport_uart.c: remove wrong and unneeded memset
Andrew Morton [Thu, 16 Jul 2009 15:05:53 +0000 (16:05 +0100)]
drivers/serial/bfin_sport_uart.c: remove wrong and unneeded memset

dcb314@hotmail.com notes that this memset has its args reversed.

It's unneeded anyway, so remove it.

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

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>
14 years agoserial: don't add msm_serial's probe function to the driver struct
Uwe Kleine-König [Thu, 16 Jul 2009 15:05:43 +0000 (16:05 +0100)]
serial: don't add msm_serial's probe function to the driver struct

msm_serial_driver is registered using platform_driver_probe which takes
care for the probe function itself.  So don't pass it in the driver
struct, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agotty: fix close/hangup race
Alan Cox [Thu, 16 Jul 2009 15:05:08 +0000 (16:05 +0100)]
tty: fix close/hangup race

We can get a situation where a hangup occurs during or after a close. In
that case the ldisc gets disposed of by the close and the hangup then
explodes.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoAdd '-fno-delete-null-pointer-checks' to gcc CFLAGS
Eugene Teo [Wed, 15 Jul 2009 06:59:10 +0000 (14:59 +0800)]
Add '-fno-delete-null-pointer-checks' to gcc CFLAGS

Turning on this flag could prevent the compiler from optimising away
some "useless" checks for null pointers.  Such bugs can sometimes become
exploitable at compile time because of the -O2 optimisation.

See http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Optimize-Options.html

An example that clearly shows this 'problem' is commit 6bf67672.

 static void __devexit agnx_pci_remove(struct pci_dev *pdev)
 {
     struct ieee80211_hw *dev = pci_get_drvdata(pdev);
-    struct agnx_priv *priv = dev->priv;
+    struct agnx_priv *priv;
     AGNX_TRACE;

     if (!dev)
         return;
+    priv = dev->priv;

By reverting this patch, and compile it with and without
-fno-delete-null-pointer-checks flag, we can see that the check for dev
is compiled away.

    call    printk  #
-   testq   %r12, %r12  # dev
-   je  .L94    #,
    movq    %r12, %rdi  # dev,

Clearly the 'fix' is to stop using dev before it is tested, but building
with -fno-delete-null-pointer-checks flag at least makes it harder to
abuse.

Signed-off-by: Eugene Teo <eugeneteo@kernel.sg>
Acked-by: Eric Paris <eparis@redhat.com>
Acked-by: Wang Cong <amwang@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoRevert "ppp: Fix throttling bugs"
Linus Torvalds [Thu, 16 Jul 2009 16:14:23 +0000 (09:14 -0700)]
Revert "ppp: Fix throttling bugs"

This reverts commit a6540f731d506d9e82444cf0020e716613d4c46c, as
requested by Alan:

  "... as it was wrong, the pty code is now fixed and the fact this
   isn't reverted is breaking pptp setups."

Requested-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'fix/usb-audio' into for-linus
Takashi Iwai [Thu, 16 Jul 2009 14:35:50 +0000 (16:35 +0200)]
Merge branch 'fix/usb-audio' into for-linus

* fix/usb-audio:
  sound: usb-audio: add workaround for Blue Microphones devices

14 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Thu, 16 Jul 2009 14:35:48 +0000 (16:35 +0200)]
Merge branch 'fix/misc' into for-linus

* fix/misc:
  ALSA: riptide -  proper handling of pci_register_driver for joystick

14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Thu, 16 Jul 2009 14:35:47 +0000 (16:35 +0200)]
Merge branch 'fix/hda' into for-linus

* fix/hda:
  ALSA: hda_intel: more strict alc880_parse_auto_config dig_nid checking

14 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Thu, 16 Jul 2009 14:35:46 +0000 (16:35 +0200)]
Merge branch 'fix/asoc' into for-linus

* fix/asoc:
  ASoC: Fix NULL pointer dereference in __pxa2xx_pcm_hw_free

14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Wed, 15 Jul 2009 17:29:09 +0000 (10:29 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ahci: add device ID for 82801JI sata controller
  drivers/ata: Move a dereference below a NULL test
  libata: implement and use HORKAGE_NOSETXFER, take#2
  libata: fix follow-up SRST failure path

14 years agoALSA: riptide - proper handling of pci_register_driver for joystick
Jaswinder Singh Rajput [Wed, 15 Jul 2009 11:15:40 +0000 (16:45 +0530)]
ALSA: riptide -  proper handling of pci_register_driver for joystick

We need to check returning error for pci_register_driver(&joystick_driver)

On failure, we should unregister formerly registered audio drivers

This also fixed the compiler warning :

  CC [M]  sound/pci/riptide/riptide.o
 sound/pci/riptide/riptide.c: In function ‘alsa_card_riptide_init’:
 sound/pci/riptide/riptide.c:2200: warning: ignoring return value of ‘__pci_register_driver’, declared with attribute warn_unused_result

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agosound: usb-audio: add workaround for Blue Microphones devices
Clemens Ladisch [Mon, 13 Jul 2009 11:21:58 +0000 (13:21 +0200)]
sound: usb-audio: add workaround for Blue Microphones devices

Blue Microphones USB devices have an alternate setting that sends two
channels of data to the computer.  Unfortunately, the descriptors of
that altsetting have a wrong channel setting, which means that any
recorded data from such a device has twice the sample rate from what
would be expected.

This patch adds a workaround to ignore that altsetting.  Since these
devices have only one actual channel, no data is lost.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agopowerpc: Fix another bug in move of altivec code to vector.S
Andreas Schwab [Fri, 10 Jul 2009 11:17:36 +0000 (11:17 +0000)]
powerpc: Fix another bug in move of altivec code to vector.S

When moving load_up_altivec to vector.S a typo in a comment caused a
thinko setting the wrong variable.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Fix booke user_disable_single_step()
Dave Kleikamp [Wed, 8 Jul 2009 13:46:18 +0000 (13:46 +0000)]
powerpc: Fix booke user_disable_single_step()

On booke processors, gdb is seeing spurious SIGTRAPs when setting a
watchpoint.

user_disable_single_step() simply quits when the DAC is non-zero.  It should
be clearing the DBCR0_IC and DBCR0_BT bits from the dbcr0 register and
TIF_SINGLESTEP from the thread flag.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agodrm: Move a dereference below a NULL test
Julia Lawall [Sat, 11 Jul 2009 07:50:09 +0000 (09:50 +0200)]
drm: Move a dereference below a NULL test

If the NULL test is necessary, then the dereference should be moved below
the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Dave Airlie <airlied@linux.ie>
14 years agofb/intelfb: conflict with DRM_I915 and hide by default
Jesse Barnes [Fri, 3 Jul 2009 18:24:46 +0000 (11:24 -0700)]
fb/intelfb: conflict with DRM_I915 and hide by default

Users get confused by this driver.  It's really a special purpose
embedded driver, and causes a lot of problems if enabled.  So hide it
under EMBEDDED by default, and make sure it doesn't get enabled with
the i915 DRM driver.

Dave, I'm hoping you can feed this to Linus through your tree.  It's
appropriate for 2.6.31 I think.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
14 years agodrm/ttm: fix misplaced parentheses
Roel Kluin [Wed, 15 Jul 2009 06:00:37 +0000 (16:00 +1000)]
drm/ttm: fix misplaced parentheses

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
14 years agodrm/via: Fix vblank IRQ on VIA hardware.
Simon Farnsworth [Fri, 10 Jul 2009 10:25:16 +0000 (11:25 +0100)]
drm/via: Fix vblank IRQ on VIA hardware.

via_enable_vblank wasn't setting the VBlank enable bit - instead, it
was masking out the rest of the register.

At the same time, fix via_disable_vblank to clear the VBlank enable
bit.

Signed-off-by: Dave Airlie <airlied@linux.ie>
14 years agodrm: drm_gem, check kzalloc retval
Jiri Slaby [Mon, 13 Jul 2009 21:20:21 +0000 (23:20 +0200)]
drm: drm_gem, check kzalloc retval

Check kzalloc retval against NULL in drm_gem_object_alloc and bail out
appropriately.

While at it merge the fail paths and jump to them by gotos at the end
of the function.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
14 years agodrm: drm_debugfs, check kmalloc retval
Jiri Slaby [Mon, 13 Jul 2009 21:20:20 +0000 (23:20 +0200)]
drm: drm_debugfs, check kmalloc retval

Check kmalloc return value in drm_debugfs_create_files and bail out
appropriately if the pointer is NULL.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
14 years agodrm/radeon: add some missing pci ids
Alex Deucher [Wed, 1 Jul 2009 17:03:52 +0000 (13:03 -0400)]
drm/radeon: add some missing pci ids

Also, fix ordering for a couple others

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
14 years agoahci: add device ID for 82801JI sata controller
Mark Goodwin [Fri, 26 Jun 2009 15:44:11 +0000 (10:44 -0500)]
ahci: add device ID for 82801JI sata controller

Add device ID for Intel 82801JI SATA AHCI controller.

Signed-off-by: David Milburn <dmilburn@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agodrivers/ata: Move a dereference below a NULL test
Julia Lawall [Sat, 11 Jul 2009 07:49:48 +0000 (09:49 +0200)]
drivers/ata: Move a dereference below a NULL test

If the NULL test is necessary, then the dereference should be moved below
the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agolibata: implement and use HORKAGE_NOSETXFER, take#2
Tejun Heo [Thu, 9 Jul 2009 00:27:50 +0000 (09:27 +0900)]
libata: implement and use HORKAGE_NOSETXFER, take#2

PIONEER DVD-RW DVRTD08 times out SETXFER if no media is present.  The
device is SATA and simply skipping SETXFER works around the problem.
Implement ATA_HORKAGE_NOSETXFER and apply it to the device.

Reported by Moritz Rigler in the following thread.

  http://thread.gmane.org/gmane.linux.ide/36790

and by Lars in bko#9540.

Updated to whine and ignore NOSETXFER if PATA component is detected as
suggested by Alan Cox.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Moritz Rigler <linux-ide@momail.e4ward.com>
Reported-by: Lars <lars21ce@gmx.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agolibata: fix follow-up SRST failure path
Tejun Heo [Wed, 8 Jul 2009 03:16:37 +0000 (12:16 +0900)]
libata: fix follow-up SRST failure path

ata_eh_reset() was missing error return handling after follow-up SRST
allowing EH to continue the normal probing path after reset failure.
This was discovered while testing new WD 2TB drives which take longer
than 10 secs to spin up and cause the first follow-up SRST to time
out.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoMerge branch 'i2c-for-2631-rc3' of git://aeryn.fluff.org.uk/bjdooks/linux
Linus Torvalds [Wed, 15 Jul 2009 01:40:15 +0000 (18:40 -0700)]
Merge branch 'i2c-for-2631-rc3' of git://aeryn.fluff.org.uk/bjdooks/linux

* 'i2c-for-2631-rc3' of git://aeryn.fluff.org.uk/bjdooks/linux:
  i2c: Use resource_size
  i2c-davinci: behave with i2cdetect
  i2c-davinci: convert clock usage after clkdev conversion

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
Linus Torvalds [Wed, 15 Jul 2009 01:37:24 +0000 (18:37 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/teigland/dlm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
  dlm: free socket in error exit path
  dlm: fix plock use-after-free
  dlm: Fix uninitialised variable warning in lock.c

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Wed, 15 Jul 2009 01:37:09 +0000 (18:37 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  mlx4_core: Add new ConnectX EN PCI ID 0x6764
  mlx4_core: Handle multi-physical function devices

14 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 15 Jul 2009 01:35:24 +0000 (18:35 -0700)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  hrtimer: Fix migration expiry check
  hrtimer: migration: do not check expiry time on current CPU

14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 15 Jul 2009 01:35:11 +0000 (18:35 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Fix warning in pvclock.c
  x86, apic: Fix false positive section mismatch in numaq_32.c
  x86: Fix false positive section mismatch in es7000_32.c
  x86: Remove spurious printk level from segfault message

14 years agoMerge branch 'core-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 15 Jul 2009 01:35:00 +0000 (18:35 -0700)]
Merge branch 'core-fixes-for-linus-2' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  futexes: Fix infinite loop in get_futex_key() on huge page

14 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 15 Jul 2009 01:34:32 +0000 (18:34 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  tracing/function-profiler: do not free per cpu variable stat
  tracing/events: Move TRACE_SYSTEM outside of include guard

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 15 Jul 2009 01:33:54 +0000 (18:33 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  Revert "NET: Fix locking issues in PPP, 6pack, mkiss and strip line disciplines."
  skbuff.h: Fix comment for NET_IP_ALIGN
  drivers/net: using spin_lock_irqsave() in net_send_packet()
  NET: phy_device, fix lock imbalance
  gre: fix ToS/DiffServ inherit bug
  igb: gcc-3.4.6 fix
  atlx: duplicate testing of MCAST flag
  NET: Fix locking issues in PPP, 6pack, mkiss and strip line disciplines.
  netdev: restore MTU change operation
  netdev: restore MAC address set and validate operations
  sit: fix regression: do not release skb->dst before xmit
  net: ip_push_pending_frames() fix
  net: sk_prot_alloc() should not blindly overwrite memory

14 years agoi2c: Use resource_size
Julia Lawall [Sun, 5 Jul 2009 06:37:50 +0000 (08:37 +0200)]
i2c: Use resource_size

Use the function resource_size, which reduces the chance of introducing
off-by-one errors in calculating the resource size.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
struct resource *res;
@@

- (res->end - res->start) + 1
+ resource_size(res)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-davinci: behave with i2cdetect
David Brownell [Mon, 6 Jul 2009 22:48:36 +0000 (15:48 -0700)]
i2c-davinci: behave with i2cdetect

Make i2c-davinci cope properly with "i2cdetect":  don't spew
syslog spam on perfectly normal behaviors, or respond to any
address other than the one reserved for the SMBus host.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-davinci: convert clock usage after clkdev conversion
Kevin Hilman [Mon, 6 Jul 2009 22:48:35 +0000 (15:48 -0700)]
i2c-davinci: convert clock usage after clkdev conversion

DaVinci core code has converted to the new clkdev API so
clock name strings are not needed.  Instead, just the a
'struct device' pointer is needed.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoRevert "NET: Fix locking issues in PPP, 6pack, mkiss and strip line disciplines."
David S. Miller [Tue, 14 Jul 2009 20:13:41 +0000 (13:13 -0700)]
Revert "NET: Fix locking issues in PPP, 6pack, mkiss and strip line disciplines."

This reverts commit adeab1afb7de89555c69aab5ca21300c14af6369.

As Alan Cox explained, the TTY layer changes that went recently
to get rid of the tty->low_latency stuff fixes this already,
and even for -stable it's the ->low_latency changes that should
go in to fix this, rather than this patch.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoskbuff.h: Fix comment for NET_IP_ALIGN
Tobias Klauser [Mon, 13 Jul 2009 22:48:16 +0000 (22:48 +0000)]
skbuff.h: Fix comment for NET_IP_ALIGN

Use the correct function call for skb_reserve in the comment for
NET_IP_ALIGN.

Signed-off-by: Tobias Klauser <klto@zhaw.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net: using spin_lock_irqsave() in net_send_packet()
Dongdong Deng [Sun, 12 Jul 2009 20:27:06 +0000 (20:27 +0000)]
drivers/net: using spin_lock_irqsave() in net_send_packet()

spin_unlock_irq() will enable interrupt in net_send_packet(),
this patch changes it to spin_lock_irqsave/spin_lock_irqrestore,
so that it doesn't enable interrupts when already disabled,
and netconsole would work properly over cs89x0/isa-skeleton.

Call trace:
netconsole write_msg()
{
 ...
 -> spin_lock_irqsave();
        -> netpoll_send_udp()
          -> netpoll_send_skb()
            -> net_send_packet()
              ->...

 -> spin_unlock_irqrestore();
 ...
}

Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoNET: phy_device, fix lock imbalance
Jiri Slaby [Mon, 13 Jul 2009 11:23:39 +0000 (11:23 +0000)]
NET: phy_device, fix lock imbalance

Don't forget to unlock a mutex in phy_scan_fixups on a fail path.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodlm: free socket in error exit path
Casey Dahlin [Tue, 14 Jul 2009 17:17:51 +0000 (12:17 -0500)]
dlm: free socket in error exit path

In the tcp_connect_to_sock() error exit path, the socket
allocated at the top of the function was not being freed.

Signed-off-by: Casey Dahlin <cdahlin@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
14 years agogre: fix ToS/DiffServ inherit bug
Andreas Jaggi [Tue, 14 Jul 2009 16:35:59 +0000 (09:35 -0700)]
gre: fix ToS/DiffServ inherit bug

Fixes two bugs:
- ToS/DiffServ inheritance was unintentionally activated when using impair fixed ToS values
- ECN bit was lost during ToS/DiffServ inheritance

Signed-off-by: Andreas Jaggi <aj@open.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agox86: Fix warning in pvclock.c
Dave Jones [Mon, 13 Jul 2009 20:14:37 +0000 (16:14 -0400)]
x86: Fix warning in pvclock.c

when building 32-bit, I see this ..
arch/x86/kernel/pvclock.c:63:7: warning: "__x86_64__" is not defined

Signed-off-by: Dave Jones <davej@redhat.com>
LKML-Reference: <20090713201437.GA12165@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14 years agoLinux 2.6.31-rc3 v2.6.31-rc3
Linus Torvalds [Tue, 14 Jul 2009 01:18:52 +0000 (18:18 -0700)]
Linux 2.6.31-rc3

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Mon, 13 Jul 2009 23:39:25 +0000 (16:39 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  jbd2: fix race between write_metadata_buffer and get_write_access
  ext4: Fix ext4_mb_initialize_context() to initialize all fields
  ext4: fix null handler of ioctls in no journal mode
  ext4: Fix buffer head reference leak in no-journal mode
  ext4: Move __ext4_journalled_writepage() to avoid forward declaration
  ext4: Fix mmap/truncate race when blocksize < pagesize && !nodellaoc
  ext4: Fix mmap/truncate race when blocksize < pagesize && delayed allocation
  ext4: Don't look at buffer_heads outside i_size.
  ext4: Fix goal inum check in the inode allocator
  ext4: fix no journal corruption with locale-gen
  ext4: Calculate required journal credits for inserting an extent properly
  ext4: Fix truncation of symlinks after failed write
  jbd2: Fix a race between checkpointing code and journal_get_write_access()
  ext4: Use rcu_barrier() on module unload.
  ext4: naturally align struct ext4_allocation_request
  ext4: mark several more functions in mballoc.c as noinline
  ext4: Fix potential reclaim deadlock when truncating partial block
  jbd2: Remove GFP_ATOMIC kmalloc from inside spinlock critical region
  ext4: Fix type warning on 64-bit platforms in tracing events header

14 years agojbd2: fix race between write_metadata_buffer and get_write_access
dingdinghua [Mon, 13 Jul 2009 21:55:35 +0000 (17:55 -0400)]
jbd2: fix race between write_metadata_buffer and get_write_access

The function jbd2_journal_write_metadata_buffer() calls
jbd_unlock_bh_state(bh_in) too early; this could potentially allow
another thread to call get_write_access on the buffer head, modify the
data, and dirty it, and allowing the wrong data to be written into the
journal.  Fortunately, if we lose this race, the only time this will
actually cause filesystem corruption is if there is a system crash or
other unclean shutdown of the system before the next commit can take
place.

Signed-off-by: dingdinghua <dingdinghua85@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoigb: gcc-3.4.6 fix
Eric Dumazet [Mon, 13 Jul 2009 18:11:41 +0000 (11:11 -0700)]
igb: gcc-3.4.6 fix

forward declaration of inline function should be avoided, or
old gcc cannot compile.

Reported-by: Teck Choon Giam <giamteckchoon@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoatlx: duplicate testing of MCAST flag
roel kluin [Sun, 12 Jul 2009 13:12:37 +0000 (13:12 +0000)]
atlx: duplicate testing of MCAST flag

Fix duplicate testing of MCAST flag

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Jay Cliburn <jcliburn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Mon, 13 Jul 2009 17:24:43 +0000 (10:24 -0700)]
Merge git://git./linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  Staging: stlc45xx: convert config_interface to bss_info_changed, fixing a build error
  Staging: comedi: s626: use subvendor:subdevice ids for SAA7146 board
  Staging: prevent rtl8192su from crashing dev_ioctl in SIOCGIWNAME
  Staging: prevent rtl8187se from crashing dev_ioctl() in SIOCGIWNAME
  Staging: rtl8192su: convert to net_device_ops
  Staging: serqt_usb2: declare qt_open static in serqt_usb2
  Staging: serqt_usb2: fix qt_close parameters in serqt_usb2
  Staging: comedi: jr3_pci.c: add required includes
  Staging: meilhaus: add email address to TODO
  Staging: rspiusb: use NULL virtual address instead of a bogus one
  Staging: vt6655: compile fix
  Staging: rt2870: Add USB ID for Sitecom WL-608

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Mon, 13 Jul 2009 17:24:08 +0000 (10:24 -0700)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  wm97xx_batery: replace driver_data with dev_get_drvdata()
  omap: video: remove direct access of driver_data
  Sound: remove direct access of driver_data
  driver model: fix show/store prototypes in doc.
  Firmware: firmware_class, fix lock imbalance
  Driver Core: remove BUS_ID_SIZE
  sparc: remove driver-core BUS_ID_SIZE
  partitions: fix broken uevent_suppress conversion
  devres: WARN() and return, don't crash on device_del() of uninitialized device

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Mon, 13 Jul 2009 17:23:03 +0000 (10:23 -0700)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (48 commits)
  USB: otg: fix module reinsert issue
  USB: handle zero-length usbfs submissions correctly
  USB: EHCI: report actual_length for iso transfers
  USB: option: remove unnecessary and erroneous code
  USB: cypress_m8: remove invalid Clear-Halt
  USB: musb_host: undo incorrect change in musb_advance_schedule()
  USB: fix LANGID=0 regression
  USB: serial: sierra driver id_table additions
  USB serial: Add ID for Turtelizer, an FT2232L-based JTAG/RS-232 adapter.
  USB: fix race leading to a write after kfree in usbfs
  USB: Sierra: fix oops upon device close
  USB: option.c: add A-Link 3GU device id
  USB: Serial: Add support for Arkham Technology adapters
  USB: Fix option_ms regression in 2.6.31-rc2
  USB: gadget audio: select SND_PCM
  USB: ftdi: support NDI devices
  Revert USB: usbfs: deprecate and hide option for !embedded
  USB: usb.h: fix kernel-doc notation
  USB: RNDIS gadget, fix issues talking from PXA
  USB: serial: FTDI with product code FB80 and vendor id 0403
  ...

14 years agoupdate JFS entry in MAINTAINERS
Dave Kleikamp [Mon, 13 Jul 2009 16:02:24 +0000 (11:02 -0500)]
update JFS entry in MAINTAINERS

JFS hasn't really been supported for a while.  It's still maintained,
but saying it's supported is a stretch.  Updating my preferred email
address as well.

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomn10300: remove duplicated #include
Huang Weiyi [Mon, 13 Jul 2009 14:09:25 +0000 (15:09 +0100)]
mn10300: remove duplicated #include

Remove duplicated #include('s) in
  arch/mn10300/kernel/sys_mn10300.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoFix staging drivers after smp_lock.h redux
Jean Delvare [Mon, 13 Jul 2009 10:39:05 +0000 (12:39 +0200)]
Fix staging drivers after smp_lock.h redux

Commit 405f55712dfe464b3240d7816cc4fe4174831be2 ("headers: smp_lock.h
redux") broke the build of two staging drivers. Fix them.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoext4: Fix ext4_mb_initialize_context() to initialize all fields
Theodore Ts'o [Mon, 13 Jul 2009 13:45:52 +0000 (09:45 -0400)]
ext4: Fix ext4_mb_initialize_context() to initialize all fields

Pavel Roskin pointed out that kmemcheck indicated that
ext4_mb_store_history() was accessing uninitialized values of
ac->ac_tail and ac->ac_buddy leading to garbage in the mballoc
history.  Fix this by initializing the entire structure to all zeros
first.

Also, two fields were getting doubly initialized by the caller of
ext4_mb_initialize_context, so remove them for efficiency's sake.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoext4: fix null handler of ioctls in no journal mode
Peng Tao [Mon, 13 Jul 2009 13:30:17 +0000 (09:30 -0400)]
ext4: fix null handler of ioctls in no journal mode

The EXT4_IOC_GROUP_ADD and EXT4_IOC_GROUP_EXTEND ioctls should not
flush the journal in no_journal mode.  Otherwise, running resize2fs on
a mounted no_journal partition triggers the following error messages:

BUG: unable to handle kernel NULL pointer dereference at 00000014
IP: [<c039d282>] _spin_lock+0x8/0x19
*pde = 00000000
Oops: 0002 [#1] SMP

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoext4: Fix buffer head reference leak in no-journal mode
Curt Wohlgemuth [Mon, 13 Jul 2009 13:07:20 +0000 (09:07 -0400)]
ext4: Fix buffer head reference leak in no-journal mode

We found a problem with buffer head reference leaks when using an ext4
partition without a journal.  In particular, calls to ext4_forget() would
not to a brelse() on the input buffer head, which will cause pages they
belong to to not be reclaimable.

Further investigation showed that all places where ext4_journal_forget() and
ext4_journal_revoke() are called are subject to the same problem.  The patch
below changes __ext4_journal_forget/__ext4_journal_revoke to do an explicit
release of the buffer head when the journal handle isn't valid.

Signed-off-by: Curt Wohlgemuth <curtw@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agox86, apic: Fix false positive section mismatch in numaq_32.c
Rakib Mullick [Sun, 12 Jul 2009 11:07:19 +0000 (17:07 +0600)]
x86, apic: Fix false positive section mismatch in numaq_32.c

The variable apic_numaq placed in noninit section references the
function wakeup_secondary_cpu_via_nmi(), which is in __cpuinit
section. Thus causes a section mismatch warning. To avoid such
mismatch we mark apic_numaq as __refdata.

We were warned by the following warning:

  WARNING: arch/x86/kernel/built-in.o(.data+0x932c): Section mismatch in
  reference from the variable apic_numaq to the function
  .cpuinit.text:wakeup_secondary_cpu_via_nmi()

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
LKML-Reference: <b9df5fa10907120407p6b4f67dtf4d563155488188a@mail.gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>