]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agox86, bts: add fork and exit handling
Markus Metzger [Fri, 19 Dec 2008 14:10:24 +0000 (15:10 +0100)]
x86, bts: add fork and exit handling

Impact: introduce new ptrace facility

Add arch_ptrace_untrace() function that is called when the tracer
detaches (either voluntarily or when the tracing task dies);
ptrace_disable() is only called on a voluntary detach.

Add ptrace_fork() and arch_ptrace_fork(). They are called when a
traced task is forked.

Clear DS and BTS related fields on fork.

Release DS resources and reclaim memory in ptrace_untrace(). This
releases resources already when the tracing task dies. We used to do
that when the traced task dies.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branches 'tracing/ftrace', 'tracing/ring-buffer' and 'tracing/urgent' into...
Ingo Molnar [Fri, 19 Dec 2008 08:42:40 +0000 (09:42 +0100)]
Merge branches 'tracing/ftrace', 'tracing/ring-buffer' and 'tracing/urgent' into tracing/core

Conflicts:
include/linux/ftrace.h

15 years agotracing: fix warnings in kernel/trace/trace_sched_switch.c
Ingo Molnar [Fri, 19 Dec 2008 00:09:51 +0000 (01:09 +0100)]
tracing: fix warnings in kernel/trace/trace_sched_switch.c

these warnings:

  kernel/trace/trace_sched_switch.c: In function ‘tracing_sched_register’:
  kernel/trace/trace_sched_switch.c:96: warning: passing argument 1 of ‘register_trace_sched_wakeup_new’ from incompatible pointer type
  kernel/trace/trace_sched_switch.c:112: warning: passing argument 1 of ‘unregister_trace_sched_wakeup_new’ from incompatible pointer type
  kernel/trace/trace_sched_switch.c: In function ‘tracing_sched_unregister’:
  kernel/trace/trace_sched_switch.c:121: warning: passing argument 1 of ‘unregister_trace_sched_wakeup_new’ from incompatible pointer type

Trigger because sched_wakeup_new tracepoints need the same trace
signature as sched_wakeup - which was changed recently.

Fix it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing: fix warning in kernel/trace/trace.c
Ingo Molnar [Fri, 19 Dec 2008 00:03:29 +0000 (01:03 +0100)]
tracing: fix warning in kernel/trace/trace.c

this warning:

  kernel/trace/trace.c: In function ‘print_lat_fmt’:
  kernel/trace/trace.c:1826: warning: unused variable ‘state’

Triggers because 'state' has become unused - remove it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing/ring-buffer: remove unused ring_buffer size
Lai Jiangshan [Wed, 17 Dec 2008 09:48:23 +0000 (17:48 +0800)]
tracing/ring-buffer: remove unused ring_buffer size

Impact: remove dead code

struct ring_buffer.size is not set after ring_buffer is initialized
or resized. it is always 0.

we can use "buffer->pages * PAGE_SIZE" to get ring_buffer's size

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotrace: fix task state printout
Thomas Gleixner [Wed, 17 Dec 2008 21:34:13 +0000 (22:34 +0100)]
trace: fix task state printout

Impact: fix occasionally incorrect trace output

The tracing code has interesting varieties of printing out task state.

Unfortunalely only one of the instances is correct as it copies the
code from sched.c:sched_show_task(). The others are plain wrong as
they treatthe bitfield as an integer offset into the character
array. Also the size check of the character array is wrong as it
includes the trailing \0.

Use a common state decoder inline which does the Right Thing.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoftrace: add not to regex on filtering functions
Steven Rostedt [Wed, 17 Dec 2008 20:05:36 +0000 (15:05 -0500)]
ftrace: add not to regex on filtering functions

Impact: enhancement

Ingo Molnar has asked about a way to remove items from the filter
lists. Currently, you can only add or replace items. The way
items are added to the list is through opening one of the list
files (set_ftrace_filter or set_ftrace_notrace) via append.
If the file is opened for truncate, the list is cleared.

  echo spin_lock > /debug/tracing/set_ftrace_filter

The above will replace the list with only spin_lock

  echo spin_lock >> /debug/tracing/set_ftrace_filter

The above will add spin_lock to the list.

Now this patch adds:

  echo '!spin_lock' >> /debug/tracing/set_ftrace_filter

This will remove spin_lock from the list.

The limited glob features of these lists also can be notted.

  echo '!spin_*' >> /debug/tracing/set_ftrace_filter

This will remove all functions that start with 'spin_'

Note:

  echo '!spin_*' > /debug/tracing/set_ftrace_filter

will simply clear out the list (notice the '>' instead of '>>')

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotrace: better use of stack_trace_enabled for boot up code
Steven Rostedt [Wed, 17 Dec 2008 14:43:00 +0000 (09:43 -0500)]
trace: better use of stack_trace_enabled for boot up code

Impact: clean up

Andrew Morton suggested to use the stack_tracer_enabled variable
to decide whether or not to start stack tracing on bootup.
This lets us remove the start_stack_trace variable.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotrace: add a way to enable or disable the stack tracer
Steven Rostedt [Wed, 17 Dec 2008 04:06:40 +0000 (23:06 -0500)]
trace: add a way to enable or disable the stack tracer

Impact: enhancement to stack tracer

The stack tracer currently is either on when configured in or
off when it is not. It can not be disabled when it is configured on.
(besides disabling the function tracer that it uses)

This patch adds a way to enable or disable the stack tracer at
run time. It defaults off on bootup, but a kernel parameter 'stacktrace'
has been added to enable it on bootup.

A new sysctl has been added "kernel.stack_tracer_enabled" to let
the user enable or disable the stack tracer at run time.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branches 'tracing/ftrace' and 'tracing/hw-branch-tracing' into tracing/core
Ingo Molnar [Thu, 18 Dec 2008 11:51:05 +0000 (12:51 +0100)]
Merge branches 'tracing/ftrace' and 'tracing/hw-branch-tracing' into tracing/core

15 years agoMerge branch 'i2c-fixes' of git://aeryn.fluff.org.uk/bjdooks/linux
Linus Torvalds [Wed, 17 Dec 2008 23:05:26 +0000 (15:05 -0800)]
Merge branch 'i2c-fixes' of git://aeryn.fluff.org.uk/bjdooks/linux

* 'i2c-fixes' of git://aeryn.fluff.org.uk/bjdooks/linux:
  i2c-s3c2410: fix check for being in suspend.
  i2c-cpm: Detect and report NAK right away instead of timing out

15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Wed, 17 Dec 2008 23:01:23 +0000 (15:01 -0800)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: Add JBD2 compat feature bit.
  ocfs2: Always update xattr search when creating bucket.

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Wed, 17 Dec 2008 23:01:06 +0000 (15:01 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: pl2303: add id for Hewlett-Packard LD220-HP POS pole display
  USB: set correct configuration in probe of ti_usb_3410_5052
  USB: add 5372:2303 to pl2303
  USB: skip Set-Interface(0) if already in altsetting 0
  USB: fix comment about endianness of descriptors
  USB: Documentation/usb/gadget_serial.txt: update to match driver use_acm behaviour
  usbmon: drop bogus 0t from usbmon.txt
  USB: gadget: fix rndis working at high speed
  USB: ftdi_sio: Adding Ewert Energy System's CANdapter PID
  USB: tty: SprogII DCC controller identifiers
  usb-storage: update unusual_devs entry for Nokia 5310
  USB: Unusual devs patch for Nokia 3500c
  USB: storage: unusual_devs.h: Nokia 3109c addition
  USB: fix problem with usbtmc driver not loading properly

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Wed, 17 Dec 2008 23:00:54 +0000 (15:00 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  STAGING: Move staging drivers back to staging-specific menu
  driver core: add newlines to debugging enabled/disabled messages
  xilinx_hwicap: remove improper wording in license statement
  driver core: fix using 'ret' variable in unregister_dynamic_debug_module

15 years agocifs: fix buffer overrun in parse_DFS_referrals
Jeff Layton [Wed, 17 Dec 2008 11:31:53 +0000 (06:31 -0500)]
cifs: fix buffer overrun in parse_DFS_referrals

While testing a kernel with memory poisoning enabled, I saw some warnings
about the redzone getting clobbered when chasing DFS referrals. The
buffer allocation for the unicode converted version of the searchName is
too small and needs to take null termination into account.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc
Linus Torvalds [Wed, 17 Dec 2008 22:58:56 +0000 (14:58 -0800)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc:
  powerpc: Fix corruption error in rh_alloc_fixed()
  powerpc/fsl-booke: Fix the miss interrupt restore

15 years agoSTAGING: Move staging drivers back to staging-specific menu
Dmitry Baryshkov [Thu, 27 Nov 2008 21:01:28 +0000 (00:01 +0300)]
STAGING: Move staging drivers back to staging-specific menu

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodriver core: add newlines to debugging enabled/disabled messages
Marcel Holtmann [Sun, 30 Nov 2008 13:01:26 +0000 (14:01 +0100)]
driver core: add newlines to debugging enabled/disabled messages

Both messages are missing the newline and thus dmesg output gets
scrambled.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoxilinx_hwicap: remove improper wording in license statement
Greg Kroah-Hartman [Sun, 7 Dec 2008 05:10:51 +0000 (21:10 -0800)]
xilinx_hwicap: remove improper wording in license statement

GPLv2 doesn't allow additional restrictions to be imposed on any
code, so this wording needs to be removed from these files.

Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodriver core: fix using 'ret' variable in unregister_dynamic_debug_module
Johann Felix Soden [Thu, 30 Oct 2008 21:44:39 +0000 (22:44 +0100)]
driver core: fix using 'ret' variable in unregister_dynamic_debug_module

The 'ret' variable is assigned, but not used in the return statement. Fix this.

Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
Acked-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: pl2303: add id for Hewlett-Packard LD220-HP POS pole display
Mike Provencher [Tue, 16 Dec 2008 20:30:14 +0000 (14:30 -0600)]
USB: pl2303: add id for Hewlett-Packard LD220-HP POS pole display

Add id for the Hewlett-Packard LD220-HP POS pole display.

Bus 002 Device 002: ID 03f0:3524 Hewlett-Packard

Signed-off-by: Mike Provencher <mike.provencher@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: set correct configuration in probe of ti_usb_3410_5052
Oliver Neukum [Tue, 16 Dec 2008 11:25:55 +0000 (12:25 +0100)]
USB: set correct configuration in probe of ti_usb_3410_5052

This driver transfers firmware. It may just as well set the correct
configuration.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: add 5372:2303 to pl2303
Matthew Arnold [Sat, 13 Dec 2008 11:42:53 +0000 (22:42 +1100)]
USB: add 5372:2303 to pl2303

This patch adds the "Superial" USB-Serial converter to pl2303 so that it
is detected, by the correct driver.  Adds the relevant vendor:product
(5372:2303) to the device tables in pl2303.c & pl2303.h.  The patch has
been tested against 2.6.24-22-generic.

Signed-off-by: Matthew D Arnold <matthew.arnold-1@uts.edu.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: skip Set-Interface(0) if already in altsetting 0
Alan Stern [Mon, 1 Dec 2008 15:24:41 +0000 (10:24 -0500)]
USB: skip Set-Interface(0) if already in altsetting 0

When a driver unbinds from an interface, usbcore always sends a
Set-Interface request to reinstall altsetting 0.  Unforunately, quite
a few devices have buggy firmware that crashes when it receives this
request.

To avoid such problems, this patch (as1180) arranges to send the
Set-Interface request only when the interface is not already in
altsetting 0.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fix comment about endianness of descriptors
Phil Endecott [Mon, 1 Dec 2008 15:22:33 +0000 (10:22 -0500)]
USB: fix comment about endianness of descriptors

This patch fixes a comment and clarifies the documentation about the
endianness of descriptors. The current policy is that descriptors will
be little-endian at the API even on big-endian systems; however the
/proc/bus/usb API predates this policy and presents descriptors with
some multibyte fields byte-swapped.

Signed-off-by: Phil Endecott <usb_endian_patch@chezphil.org>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Documentation/usb/gadget_serial.txt: update to match driver use_acm behaviour
Peter Korsgaard [Thu, 4 Dec 2008 15:30:53 +0000 (16:30 +0100)]
USB: Documentation/usb/gadget_serial.txt: update to match driver use_acm behaviour

Commit 7bb5ea54 (usb gadget serial: use composite gadget framework)
changed the default for the use_acm parameter from 0 to 1.
Update the documentation to match.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousbmon: drop bogus 0t from usbmon.txt
Pete Zaitcev [Thu, 4 Dec 2008 23:17:00 +0000 (16:17 -0700)]
usbmon: drop bogus 0t from usbmon.txt

The example is incorrect: there is no 0t socket (the '1t' format has no
bus number in it). Also, correct the broken sentence for USB Tag.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: gadget: fix rndis working at high speed
David Brownell [Tue, 25 Nov 2008 07:11:03 +0000 (23:11 -0800)]
USB: gadget: fix rndis working at high speed

Fix a bug specific to highspeed mode in the recently updated RNDIS
support:  it wasn't setting up the high speed notification endpoint,
which prevented high speed RNDIS links from working.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Tested-by: Anand Gadiyar <gadiyar@ti.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: ftdi_sio: Adding Ewert Energy System's CANdapter PID
Andrew Ewert [Thu, 4 Dec 2008 15:09:59 +0000 (09:09 -0600)]
USB: ftdi_sio: Adding Ewert Energy System's CANdapter PID

The following patch adds in the USB PID for Ewert Energy System's CANdapter
device (CANBUS to USB-Serial which uses the FTDI 245R chipset) to the ftdi_sio
device driver.

The patch was tested successfully on Linux kernel 2.6.27 under Ubuntu.

Relevant output from /proc/bus/usb/devices (With patch installed):

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=9f80 Rev= 6.00
S:  Manufacturer=Ewert Energy Systems
S:  Product=CANdapter
S:  SerialNumber=A6RGB3Z3
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 90mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

Signed-off-by: Andrew Ewert <andrew@ewertenergy.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: tty: SprogII DCC controller identifiers
Alan Cox [Sun, 7 Dec 2008 07:46:04 +0000 (23:46 -0800)]
USB: tty: SprogII DCC controller identifiers

Someone on rmweb reminded me this had been overlooked from ages ago..

Add the identifiers for the Sprog II USB. This is a DCC control interface
using the FTDI-SIO hardware: http://www.sprog-dcc.co.uk/. People have been
using it with insmod options for ages, this just puts it into the driver
data.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb-storage: update unusual_devs entry for Nokia 5310
Alan Stern [Mon, 1 Dec 2008 15:23:43 +0000 (10:23 -0500)]
usb-storage: update unusual_devs entry for Nokia 5310

This patch (as1179) updates the unusual_devs entry for Nokia's 5310
phone to include a more recent firmware revision.

This fixes Bugzilla #12099.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Robson Roberto Souza Peixoto <robsonpeixoto@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Unusual devs patch for Nokia 3500c
Ozan Sener [Mon, 8 Dec 2008 17:15:45 +0000 (19:15 +0200)]
USB: Unusual devs patch for Nokia 3500c

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0421 ProdID=0060 Rev= 5.51
S:  Manufacturer=Nokia
S:  Product=Nokia 3500c
S:  SerialNumber=357687010280751
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

From: Ozan Sener <themgzzy@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: storage: unusual_devs.h: Nokia 3109c addition
CSÉCSY László [Tue, 9 Dec 2008 22:39:14 +0000 (23:39 +0100)]
USB: storage: unusual_devs.h: Nokia 3109c addition

2.6.26(.x, cannot remember) could handle the microSD card in my Nokia
3109c attached via USB as mass storage, 2.6.27(.x, up to and included
2.6.27.8) cannot. Please find the attached patch which fixes this
regression, and a copy of /proc/bus/usb/devices with my phone plugged in
running with this patch on Frugalware.

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0421 ProdID=0063 Rev= 6.01
S:  Manufacturer=Nokia
S:  Product=Nokia 3109c
S:  SerialNumber=359561013742570
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

From: CSÉCSY László <boobaa@frugalware.org>
Cc: Phil Dibowitz <phil@ipom.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fix problem with usbtmc driver not loading properly
Greg Kroah-Hartman [Thu, 4 Dec 2008 00:33:09 +0000 (16:33 -0800)]
USB: fix problem with usbtmc driver not loading properly

The usbtmc driver forgot to export its device table to userspace.
Without this, it is never loaded properly when such a device is seen by
the system.

Cc: Marcel Janssen <marcel.janssen@admesy.nl>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agopowerpc: Fix corruption error in rh_alloc_fixed()
Guillaume Knispel [Tue, 9 Dec 2008 14:28:34 +0000 (15:28 +0100)]
powerpc: Fix corruption error in rh_alloc_fixed()

There is an error in rh_alloc_fixed() of the Remote Heap code:
If there is at least one free block blk won't be NULL at the end of the
search loop, so -ENOMEM won't be returned and the else branch of
"if (bs == s || be == e)" will be taken, corrupting the management
structures.

Signed-off-by: Guillaume Knispel <gknispel@proformatique.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agopowerpc/fsl-booke: Fix the miss interrupt restore
Dave Liu [Wed, 17 Dec 2008 10:24:15 +0000 (18:24 +0800)]
powerpc/fsl-booke: Fix the miss interrupt restore

The commit e5e774d8833de1a0037be2384efccadf16935675
powerpc/fsl-booke: Fix problem with _tlbil_va being interrupted
introduce one issue. that casue the problem like this:

Kernel BUG at c00b19fc [verbose debug info unavailable]
Oops: Exception in kernel mode, sig: 5 [#1]
MPC8572 DS
Modules linked in:
NIP: c00b19fc LR: c00b1c34 CTR: c0064e88
REGS: ef02b7b0 TRAP: 0700   Not tainted  (2.6.28-rc8-00057-g1bda712)
MSR: 00021000 <ME>  CR: 44048028  XER: 20000000
TASK = ef02c000[1] 'init' THREAD: ef02a000
GPR00: 00000001 ef02b860 ef02c000 eec201a0 c0dec2c0 00000000 000078a1 00000400
GPR08: c00b4e40 000078a1 c048ec00 a1780000 44048028 ecd26917 00000001 ef02b948
GPR16: ffffffea 0000020c 00000000 00000000 00000003 0000000a 00000000 000078a1
GPR24: eec201a0 00000000 ed849000 00000400 ef02b95c 00000001 ef02b978 ef02b984
NIP [c00b19fc] __find_get_block+0x24/0x238
LR [c00b1c34] __getblk+0x24/0x2a0
Call Trace:
[ef02b860] [c017b768] generic_make_request+0x290/0x328 (unreliable)
[ef02b8b0] [c00b1c34] __getblk+0x24/0x2a0
[ef02b910] [c00b4ae4] __bread+0x14/0xf8
[ef02b920] [c00fc228] ext2_get_branch+0xf0/0x138
[ef02b940] [c00fcc88] ext2_get_block+0xb8/0x828
[ef02ba00] [c00bbdc8] do_mpage_readpage+0x188/0x808
[ef02bac0] [c00bc5b4] mpage_readpages+0xec/0x144
[ef02bb50] [c00fba38] ext2_readpages+0x24/0x34
[ef02bb60] [c006ade0] __do_page_cache_readahead+0x150/0x230
[ef02bbb0] [c0064bdc] filemap_fault+0x31c/0x3e0
[ef02bbf0] [c00728b8] __do_fault+0x60/0x5b0
[ef02bc50] [c0011e0c] do_page_fault+0x2d8/0x4c4
[ef02bd10] [c000ed90] handle_page_fault+0xc/0x80
[ef02bdd0] [c00c7adc] set_brk+0x74/0x9c
[ef02bdf0] [c00c9274] load_elf_binary+0x70c/0x1180
[ef02be70] [c00945f0] search_binary_handler+0xa8/0x274
[ef02bea0] [c0095818] do_execve+0x19c/0x1d4
[ef02bed0] [c000766c] sys_execve+0x58/0x84
[ef02bef0] [c000e950] ret_from_syscall+0x0/0x3c
[ef02bfb0] [c009c6fc] sys_dup+0x24/0x6c
[ef02bfc0] [c0001e04] init_post+0xb0/0xf0
[ef02bfd0] [c046c1ac] kernel_init+0xcc/0xf4
[ef02bff0] [c000e6d0] kernel_thread+0x4c/0x68
Instruction dump:
4bffffa4 813f000c 4bffffac 9421ffb0 7c0802a6 7d800026 90010054 bf210034
91810030 7c0000a6 68008000 54008ffe <0f0000003d20c04e 3b29ffb8 38000008

The issue was the beqlr returns early but we haven't reenabled interrupts.

Signed-off-by: Dave Liu <daveliu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agoocfs2: Add JBD2 compat feature bit.
Joel Becker [Wed, 17 Dec 2008 02:10:18 +0000 (18:10 -0800)]
ocfs2: Add JBD2 compat feature bit.

Define the OCFS2_FEATURE_COMPAT_JBD2 bit in the filesystem header.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agox86: entry_64 - introduce FTRACE_ frame macro v2
Cyrill Gorcunov [Fri, 12 Dec 2008 21:09:08 +0000 (00:09 +0300)]
x86: entry_64 - introduce FTRACE_ frame macro v2

Impact: clean up

Itroduce MCOUNT_SAVE/RESTORE_FRAME which allow us to
save a number of lines on source level.

Also fix a comment in ftrace.h.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing/ftrace: add the printk-msg-only option
Frederic Weisbecker [Sat, 13 Dec 2008 19:18:13 +0000 (20:18 +0100)]
tracing/ftrace: add the printk-msg-only option

Impact: display ftrace_printk messages "as is"

By default, ftrace_printk() messages find their output with some other
informations like pid, caller, ...
Sometimes a developer just want to have the ftrace_printk left "as is", without
other information.

This is done by providing a default-off option called printk-msg-only.
To enable it, just do `echo printk-msg-only > /debugfs/tracing/trace_options`

Before the patch:

           <...>-2739  [000]   145.692153: __might_sleep: I'm an ftrace_printk msg in __might_sleep
           <...>-2739  [000]   145.692155: __might_sleep: I'm another ftrace_printk msg in __might_sleep

After the patch and the printk-msg-only option enabled:

I'm an ftrace_printk msg in __might_sleep
I'm another ftrace_printk msg in __might_sleep

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing/ftrace: use preempt_enable_no_resched_notrace in ring_buffer_time_stamp()
Frederic Weisbecker [Tue, 16 Dec 2008 21:08:58 +0000 (22:08 +0100)]
tracing/ftrace: use preempt_enable_no_resched_notrace in ring_buffer_time_stamp()

Impact: prevent a trace recursion

After some tests with function graph tracer under x86-32, I saw some recursions
caused by ring_buffer_time_stamp() that calls preempt_enable_no_notrace() which
calls preempt_schedule() which is traced itself.

This patch re-enables preemption without rescheduling.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoocfs2: Always update xattr search when creating bucket.
Tao Ma [Fri, 5 Dec 2008 01:14:10 +0000 (09:14 +0800)]
ocfs2: Always update xattr search when creating bucket.

When we create xattr bucket during the process of xattr set, we always
need to update the ocfs2_xattr_search since even if the bucket size is
the same as block size, the offset will change because of the removal
of the ocfs2_xattr_block header.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoi2c-s3c2410: fix check for being in suspend.
Ben Dooks [Fri, 31 Oct 2008 16:10:22 +0000 (16:10 +0000)]
i2c-s3c2410: fix check for being in suspend.

As noted by Julia Lawall <julia@diku.dk>, we can never
trigger the check for being in suspend due to the result
of !readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN
always being 0.

Add suspend/resume hooks to stop i2c transactions happening
until the driver has been resumed.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
15 years agoi2c-cpm: Detect and report NAK right away instead of timing out
Mike Ditto [Tue, 16 Dec 2008 20:17:09 +0000 (20:17 +0000)]
i2c-cpm: Detect and report NAK right away instead of timing out

Make the driver report an ENXIO error immediately upon NAK instead of
waiting for another interrupt and getting a timeout.

When reading from a device that is not present or declines to respond
to, e.g., a non-existent register address, CPM immediately reports a
NAK condition in the TxBD, but the driver kept waiting until a timeout,
which takes 1 second and causes an ugly console error message.

Signed-off-by: Mike Ditto <mditto@consentry.com>
Acked-by: Jochen Friedrich <jochen@scram.de>
[ben-linux@fluff.org: reordered description text]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Tue, 16 Dec 2008 17:49:10 +0000 (09:49 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: add quirk fix for Freecom HDD

15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Tue, 16 Dec 2008 17:48:53 +0000 (09:48 -0800)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  pata_hpt366: no ATAPI DMA
  pata_hpt366: fix cable detection,
  libata: fix Seagate NCQ+FLUSH blacklist

15 years agoMerge branch 'sh/for-2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
Linus Torvalds [Tue, 16 Dec 2008 17:47:58 +0000 (09:47 -0800)]
Merge branch 'sh/for-2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* 'sh/for-2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Disable GENERIC_HARDIRQS_NO__DO_IRQ for unconverted platforms.
  sh: maple: Do not pass SLAB_POISON to kmem_cache_create()

15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Tue, 16 Dec 2008 17:47:43 +0000 (09:47 -0800)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  powerpc/cell/axon-msi: Fix MSI after kexec
  powerpc: Fix bootmem reservation on uninitialized node
  powerpc: Check for valid hugepage size in hugetlb_get_unmapped_area

15 years agox86, bts: correctly report invalid bts records
Markus Metzger [Tue, 16 Dec 2008 14:53:11 +0000 (15:53 +0100)]
x86, bts: correctly report invalid bts records

Impact: change the reporting of empty BTS records

Correctly report a cleared BTS record as invalid. Used to be reported
as branch from 0 to 0.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, bts: remove recursion from get_context
Markus Metzger [Tue, 16 Dec 2008 14:51:03 +0000 (15:51 +0100)]
x86, bts: remove recursion from get_context

Impact: cleanup

Optimistically allocate a DS context. It is extremely unlikely that
one already existed. This simplifies the code a lot.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agomm: Don't touch uninitialized variable in do_pages_stat_array()
KOSAKI Motohiro [Tue, 16 Dec 2008 07:06:43 +0000 (16:06 +0900)]
mm: Don't touch uninitialized variable in do_pages_stat_array()

Commit 80bba1290ab5122c60cdb73332b26d288dc8aedd removed one necessary
variable initialization.  As a result following warning happened:

    CC      mm/migrate.o
  mm/migrate.c: In function 'sys_move_pages':
  mm/migrate.c:1001: warning: 'err' may be used uninitialized in this function

More unfortunately, if find_vma() failed, kernel read uninitialized
memory.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
CC: Brice Goglin <Brice.Goglin@inria.fr>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branches 'tracing/fastboot', 'tracing/ftrace', 'tracing/function-graph-tracer...
Ingo Molnar [Tue, 16 Dec 2008 11:03:38 +0000 (12:03 +0100)]
Merge branches 'tracing/fastboot', 'tracing/ftrace', 'tracing/function-graph-tracer' and 'tracing/hw-branch-tracing' into tracing/core

15 years agopata_hpt366: no ATAPI DMA
Tejun Heo [Tue, 9 Dec 2008 08:14:04 +0000 (17:14 +0900)]
pata_hpt366: no ATAPI DMA

IDE hpt366 driver doesn't allow DMA for ATAPI devices and MWDMA2 on
ATAPI device locks up pata_hpt366.  Follow the suit.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agopata_hpt366: fix cable detection,
Tejun Heo [Tue, 9 Dec 2008 08:13:19 +0000 (17:13 +0900)]
pata_hpt366: fix cable detection,

pata_hpt366 is strange in that its two channels occupy two PCI
functions and both are primary channels and bit1 of PCI configuration
register 0x5A indicates cable for both channels.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: fix Seagate NCQ+FLUSH blacklist
Tejun Heo [Thu, 11 Dec 2008 04:42:42 +0000 (13:42 +0900)]
libata: fix Seagate NCQ+FLUSH blacklist

Due to miscommunication, P/N was mistaken as firmware revision
strings.  Update it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosh: Disable GENERIC_HARDIRQS_NO__DO_IRQ for unconverted platforms.
Paul Mundt [Mon, 8 Dec 2008 02:45:37 +0000 (11:45 +0900)]
sh: Disable GENERIC_HARDIRQS_NO__DO_IRQ for unconverted platforms.

Presently limited to Cayman, Dreamcast, Microdev, and SystemH 7751.
Re-enable it for everyone once these have been fixed up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: maple: Do not pass SLAB_POISON to kmem_cache_create()
Matt Fleming [Tue, 16 Dec 2008 00:15:31 +0000 (09:15 +0900)]
sh: maple: Do not pass SLAB_POISON to kmem_cache_create()

SLAB_POISON is not a valid flag for kmem_create_cache() unless
CONFIG_DEBUG_SLAB is set, so remove it from the flags argument.

Acked-by: Adrian McMenamin <adrian@newgolddream.dyndns.info>
Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agopowerpc/cell/axon-msi: Fix MSI after kexec
Arnd Bergmann [Fri, 12 Dec 2008 09:19:50 +0000 (09:19 +0000)]
powerpc/cell/axon-msi: Fix MSI after kexec

Commit d015fe995 'powerpc/cell/axon-msi: Retry on missing interrupt'
has turned a rare failure to kexec on QS22 into a reproducible
error, which we have now analysed.

The problem is that after a kexec, the MSIC hardware still points
into the middle of the old ring buffer.  We set up the ring buffer
during reboot, but not the offset into it.  On older kernels, this
would cause a storm of thousands of spurious interrupts after a
kexec, which would most of the time get dropped silently.

With the new code, we time out on each interrupt, waiting for
it to become valid.  If more interrupts come in that we time
out on, this goes on indefinitely, which eventually leads to
a hard crash.

The solution in this commit is to read the current offset from
the MSIC when reinitializing it.  This now works correctly, as
expected.

Reported-by: Dirk Herrendoerfer <d.herrendoerfer@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Fix bootmem reservation on uninitialized node
Dave Hansen [Thu, 11 Dec 2008 08:36:06 +0000 (08:36 +0000)]
powerpc: Fix bootmem reservation on uninitialized node

careful_allocation() was calling into the bootmem allocator for
nodes which had not been fully initialized and caused a previous
bug:  http://patchwork.ozlabs.org/patch/10528/  So, I merged a
few broken out loops in do_init_bootmem() to fix it.  That changed
the code ordering.

I think this bug is triggered by having reserved areas for a node
which are spanned by another node's contents.  In the
mark_reserved_regions_for_nid() code, we attempt to reserve the
area for a node before we have allocated the NODE_DATA() for that
nid.  We do this since I reordered that loop.  I suck.

This is causing crashes at bootup on some systems, as reported
by Jon Tollefson.

This may only present on some systems that have 16GB pages
reserved.  But, it can probably happen on any system that is
trying to reserve large swaths of memory that happen to span other
nodes' contents.

This commit ensures that we do not touch bootmem for any node which
has not been initialized, and also removes a compile warning about
an unused variable.

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Check for valid hugepage size in hugetlb_get_unmapped_area
Brian King [Thu, 4 Dec 2008 04:07:54 +0000 (04:07 +0000)]
powerpc: Check for valid hugepage size in hugetlb_get_unmapped_area

It looks like most of the hugetlb code is doing the correct thing if
hugepages are not supported, but the mmap code is not.  If we get into
the mmap code when hugepages are not supported, such as in an LPAR
which is running Active Memory Sharing, we can oops the kernel.  This
fixes the oops being seen in this path.

oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=1024 NUMA pSeries
Modules linked in: nfs(N) lockd(N) nfs_acl(N) sunrpc(N) ipv6(N) fuse(N) loop(N)
dm_mod(N) sg(N) ibmveth(N) sd_mod(N) crc_t10dif(N) ibmvscsic(N)
scsi_transport_srp(N) scsi_tgt(N) scsi_mod(N)
Supported: No
NIP: c000000000038d60 LR: c00000000003945c CTR: c0000000000393f0
REGS: c000000077e7b830 TRAP: 0300   Tainted: G
(2.6.27.5-bz50170-2-ppc64)
MSR: 8000000000009032 <EE,ME,IR,DR>  CR: 44000448  XER: 20000001
DAR: c000002000af90a8, DSISR: 0000000040000000
TASK = c00000007c1b8600[4019] 'hugemmap01' THREAD: c000000077e78000 CPU: 6
GPR00: 0000001fffffffe0 c000000077e7bab0 c0000000009a4e78 0000000000000000
GPR04: 0000000000010000 0000000000000001 00000000ffffffff 0000000000000001
GPR08: 0000000000000000 c000000000af90c8 0000000000000001 0000000000000000
GPR12: 000000000000003f c000000000a73880 0000000000000000 0000000000000000
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000010000
GPR20: 0000000000000000 0000000000000003 0000000000010000 0000000000000001
GPR24: 0000000000000003 0000000000000000 0000000000000001 ffffffffffffffb5
GPR28: c000000077ca2e80 0000000000000000 c00000000092af78 0000000000010000
NIP [c000000000038d60] .slice_get_unmapped_area+0x6c/0x4e0
LR [c00000000003945c] .hugetlb_get_unmapped_area+0x6c/0x80
Call Trace:
[c000000077e7bbc0] [c00000000003945c] .hugetlb_get_unmapped_area+0x6c/0x80
[c000000077e7bc30] [c000000000107e30] .get_unmapped_area+0x64/0xd8
[c000000077e7bcb0] [c00000000010b140] .do_mmap_pgoff+0x140/0x420
[c000000077e7bd80] [c00000000000bf5c] .sys_mmap+0xc4/0x140
[c000000077e7be30] [c0000000000086b4] syscall_exit+0x0/0x40
Instruction dump:
fac1ffb0 fae1ffb8 fb01ffc0 fb21ffc8 fb41ffd0 fb61ffd8 fb81ffe0 fbc1fff0
fbe1fff8 f821fef1 f8c10158 f8e10160 <7d49002ef9010168 e92d01b0 eb4902b0

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Tue, 16 Dec 2008 00:31:05 +0000 (16:31 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5348/1: fix documentation wrt location of the alignment trap interface
  [ARM] Ensure linux/hardirqs.h is included where required
  [ARM] fix kernel-doc syntax
  [ARM] arch/arm/common/sa1111.c: Correct error handling code
  [ARM] 5341/2: there is no copy_page on nommu ARM

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 16 Dec 2008 00:30:22 +0000 (16:30 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  Phonet: keep TX queue disabled when the device is off
  SCHED: netem: Correct documentation comment in code.
  netfilter: update rwlock initialization for nat_table
  netlabel: Compiler warning and NULL pointer dereference fix
  e1000e: fix double release of mutex
  IA64: HP_SIMETH needs to depend upon NET
  netpoll: fix race on poll_list resulting in garbage entry
  ipv6: silence log messages for locally generated multicast
  sungem: improve ethtool output with internal pcs and serdes
  tcp: tcp_vegas cong avoid fix
  sungem: Make PCS PHY support partially work again.

15 years agoDefine smp_call_function_many for UP
Rusty Russell [Mon, 15 Dec 2008 08:34:35 +0000 (19:04 +1030)]
Define smp_call_function_many for UP

Otherwise those using it in transition patches (eg. kvm) can't compile
with CONFIG_SMP=n:

arch/x86/kvm/../../../virt/kvm/kvm_main.c: In function 'make_all_cpus_request':
arch/x86/kvm/../../../virt/kvm/kvm_main.c:380: error: implicit declaration of function 'smp_call_function_many'

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocgroups: fix a race between rmdir and remount
Paul Menage [Mon, 15 Dec 2008 21:54:22 +0000 (13:54 -0800)]
cgroups: fix a race between rmdir and remount

When a cgroup is removed, it's unlinked from its parent's children list,
but not actually freed until the last dentry on it is released (at which
point cgrp->root->number_of_cgroups is decremented).

Currently rebind_subsystems checks for the top cgroup's child list being
empty in order to rebind subsystems into or out of a hierarchy - this can
result in the set of subsystems bound to a hierarchy being
removed-but-not-freed cgroup.

The simplest fix for this is to forbid remounts that change the set of
subsystems on a hierarchy that has removed-but-not-freed cgroups.  This
bug can be reproduced via:

mkdir /mnt/cg
mount -t cgroup -o ns,freezer cgroup /mnt/cg
mkdir /mnt/cg/foo
sleep 1h < /mnt/cg/foo &
rmdir /mnt/cg/foo
mount -t cgroup -o remount,ns,devices,freezer cgroup /mnt/cg
kill $!

Though the above will cause oops in -mm only but not mainline, but the bug
can cause memory leak in mainline (and even oops)

Signed-off-by: Paul Menage <menage@google.com>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoACPI toshiba: only register rfkill if bt is enabled
Frederik Deweerdt [Mon, 15 Dec 2008 21:54:19 +0000 (13:54 -0800)]
ACPI toshiba: only register rfkill if bt is enabled

Part of the rfkill initialization was done whenever BT was on or not.  The
following patch checks for BT presence before registering the rfkill to
the input layer.  Some minor cleanups (> 80 char lines) were also added in
the process.

On Tue, Oct 28, 2008 at 10:10:37PM +0300, Andrey Borzenkov wrote:
[...]
> [   66.633036] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.19
> [   66.633054] toshiba_acpi:     HCI method: \_SB_.VALD.GHCI
> [   66.637764] input: Toshiba RFKill Switch as /devices/virtual/input/input3
[...]
> [  113.920753] ------------[ cut here ]------------
> [  113.920828] kernel BUG at /home/bor/src/linux-git/net/rfkill/rfkill.c:347!
> [  113.920845] invalid opcode: 0000 [#1]
> [  113.920877] last sysfs file: /sys/devices/pci0000:00/0000:00:04.0/host0/target0:0:0/0:0:0:0/block/sda/size
> [  113.920900] Dumping ftrace buffer:
> [  113.920919]    (ftrace buffer empty)
> [  113.920933] Modules linked in: af_packet irnet ppp_generic slhc ircomm_tty ircomm binfmt_misc loop dm_mirror dm_region_hash dm_log dm_round_robin dm_multipath dm_mod alim15x3 ide_core nvram toshiba cryptomgr aead crypto_blkcipher michael_mic crypto_algapi orinoco_cs orinoco hermes_dld hermes pcmcia firmware_class snd_ali5451 snd_ac97_codec ac97_bus snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device smsc_ircc2 snd_pcm_oss snd_pcm rtc_cmos irda snd_timer snd_mixer_oss rtc_core snd crc_ccitt yenta_socket rtc_lib rsrc_nonstatic i2c_ali1535 pcmcia_core pcspkr psmouse soundcore i2c_core evdev sr_mod snd_page_alloc alim1535_wdt cdrom fan sg video output toshiba_acpi rfkill thermal backlight ali_agp processor ac button input_polldev battery agpgart ohci_hcd usbcore reiserfs pata_ali libata sd_mod scsi_mod [last unloaded: scsi_wait_scan]
> [  113.921765]
> [  113.921785] Pid: 3272, comm: ipolldevd Not tainted (2.6.28-rc2-1avb #3) PORTEGE 4000
> [  113.921801] EIP: 0060:[<dfaa4683>] EFLAGS: 00010246 CPU: 0
> [  113.921854] EIP is at rfkill_force_state+0x53/0x90 [rfkill]
> [  113.921870] EAX: 00000000 EBX: 00000000 ECX: 00000003 EDX: 00000000
> [  113.921885] ESI: 00000000 EDI: ddd50300 EBP: d8d7af40 ESP: d8d7af24
> [  113.921900]  DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
> [  113.921918] Process ipolldevd (pid: 3272, ti=d8d7a000 task=d8d93c90 task.ti=d8d7a000)
> [  113.921933] Stack:
> [  113.921945]  d8d7af38 00000246 dfb029d8 dfb029c0 dfb029d8 dfb029c0 ddd50300 d8d7af5c
> [  113.922014]  dfb018e2 01000246 01000000 ddd50300 ddd50314 ddabb8a0 d8d7af68 dfb381c1
> [  113.922098]  00000000 d8d7afa4 c012ec0a 00000000 00000002 00000000 c012eba8 ddabb8c0
> [  113.922240] Call Trace:
> [  113.922240]  [<dfb018e2>] ? bt_poll_rfkill+0x5c/0x82 [toshiba_acpi]
> [  113.922240]  [<dfb381c1>] ? input_polled_device_work+0x11/0x40 [input_polldev]
> [  113.922240]  [<c012ec0a>] ? run_workqueue+0xea/0x1f0
> [  113.922240]  [<c012eba8>] ? run_workqueue+0x88/0x1f0
> [  113.922240]  [<dfb381b0>] ? input_polled_device_work+0x0/0x40 [input_polldev]
> [  113.922240]  [<c012f047>] ? worker_thread+0x87/0xf0
> [  113.922240]  [<c0132b00>] ? autoremove_wake_function+0x0/0x50
> [  113.922240]  [<c012efc0>] ? worker_thread+0x0/0xf0
> [  113.922240]  [<c013280f>] ? kthread+0x3f/0x80
> [  113.922240]  [<c01327d0>] ? kthread+0x0/0x80
> [  113.922240]  [<c01040d7>] ? kernel_thread_helper+0x7/0x10
> [  113.922240] Code: 43 54 89 73 54 39 c6 74 11 89 d9 ba 01 00 00 00 b8 40 68 aa df e8 3e 35 69 e0 89 f8 e8 77 fd 85 e0 31 c0 83 c4 10 5b 5e 5f 5d c3 <0f> 0b eb fe 89 f6 8d bc 27 00 00 00 00 be f4 4d aa df bb 5f 01
> [  113.922240] EIP: [<dfaa4683>] rfkill_force_state+0x53/0x90 [rfkill] SS:ESP 0068:d8d7af24
> [  113.924700] ---[ end trace 0e404eb40cadd5f0 ]---

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Tested-by: Andrey Borzenkov <arvidjaar@mail.ru>
Acked-by: Len Brown <len.brown@intel.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoeCryptfs: Update maintainers
Michael Halcrow [Mon, 15 Dec 2008 21:54:17 +0000 (13:54 -0800)]
eCryptfs: Update maintainers

Tyler Hicks and Dustin Kirkland are now the primary contact points for
eCryptfs issues that may arise from this point forward.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Acked-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Acked-by: Dustin Kirkland <kirkland@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoslob: do not pass the SLAB flags as GFP in kmem_cache_create()
Catalin Marinas [Mon, 15 Dec 2008 21:54:16 +0000 (13:54 -0800)]
slob: do not pass the SLAB flags as GFP in kmem_cache_create()

The kmem_cache_create() function in the slob allocator passes the SLAB
flags as GFP flags to the slob_alloc() function.  The patch changes this
call to pass GFP_KERNEL as the other allocators seem to do.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopcmcia: blackfin: fix bug - add missing ; to MODULE macro
Mike Frysinger [Mon, 15 Dec 2008 21:54:14 +0000 (13:54 -0800)]
pcmcia: blackfin: fix bug - add missing ; to MODULE macro

Cc: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago[ARM] 5348/1: fix documentation wrt location of the alignment trap interface
Nicolas Pitre [Mon, 15 Dec 2008 02:09:15 +0000 (03:09 +0100)]
[ARM] 5348/1: fix documentation wrt location of the alignment trap interface

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] Ensure linux/hardirqs.h is included where required
Russell King [Sun, 14 Dec 2008 18:01:44 +0000 (18:01 +0000)]
[ARM] Ensure linux/hardirqs.h is included where required

... for the removal of it from asm-generic/local.h

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoPhonet: keep TX queue disabled when the device is off
Rémi Denis-Courmont [Mon, 15 Dec 2008 08:53:57 +0000 (00:53 -0800)]
Phonet: keep TX queue disabled when the device is off

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoSCHED: netem: Correct documentation comment in code.
Jesper Dangaard Brouer [Mon, 15 Dec 2008 08:39:17 +0000 (00:39 -0800)]
SCHED: netem: Correct documentation comment in code.

The netem simulator is no longer limited by Linux timer resolution HZ.
Not since Patrick McHardy changed the QoS system to use hrtimer.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: update rwlock initialization for nat_table
Steven Rostedt [Mon, 15 Dec 2008 08:19:14 +0000 (00:19 -0800)]
netfilter: update rwlock initialization for nat_table

The commit e099a173573ce1ba171092aee7bb3c72ea686e59
(netfilter: netns nat: per-netns NAT table) renamed the
nat_table from __nat_table to nat_table without updating the
__RW_LOCK_UNLOCKED(__nat_table.lock).

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc
Linus Torvalds [Mon, 15 Dec 2008 00:25:19 +0000 (16:25 -0800)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc:
  powerpc/fsl-booke: Fix problem with _tlbil_va being interrupted

15 years agox86 Fix VMI crash on boot in 2.6.28-rc8
Zachary Amsden [Sat, 13 Dec 2008 20:36:58 +0000 (12:36 -0800)]
x86 Fix VMI crash on boot in 2.6.28-rc8

VMI initialiation can relocate the fixmap, causing early_ioremap to
malfunction if it is initialized before the relocation.  To fix this,
VMI activation is split into two phases; the detection, which must
happen before setting up ioremap, and the activation, which must happen
after parsing early boot parameters.

This fixes a crash on boot when VMI is enabled under VMware.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoRevert "sched_clock: prevent scd->clock from moving backwards"
Linus Torvalds [Sun, 14 Dec 2008 23:46:01 +0000 (15:46 -0800)]
Revert "sched_clock: prevent scd->clock from moving backwards"

This reverts commit 5b7dba4ff834259a5623e03a565748704a8fe449, which
caused a regression in hibernate, reported by and bisected by Fabio
Comolli.

This revert fixes

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

Bisected-by: Fabio Comolli <fabio.comolli@gmail.com>
Requested-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago[ARM] fix kernel-doc syntax
Randy Dunlap [Mon, 1 Dec 2008 22:15:37 +0000 (14:15 -0800)]
[ARM] fix kernel-doc syntax

Fix kernel-doc notation to use correct syntax.  Even though this should be
moved to where the function is actually implemented...

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] arch/arm/common/sa1111.c: Correct error handling code
Julia Lawall [Sat, 13 Dec 2008 15:37:59 +0000 (16:37 +0100)]
[ARM] arch/arm/common/sa1111.c: Correct error handling code

If it is reasonable to apply PTR_ERR to the result of calling clk_get, then
that result should first be tested with IS_ERR, not with !.

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

// <smpl>
@@
expression E,E1;
@@

if (
-   E == NULL
+   IS_ERR(E)
   ) { <+... when != E = E1
        PTR_ERR(E)
       ...+> }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoieee1394: add quirk fix for Freecom HDD
Stefan Richter [Sat, 13 Dec 2008 00:43:59 +0000 (01:43 +0100)]
ieee1394: add quirk fix for Freecom HDD

According to http://bugzilla.kernel.org/show_bug.cgi?id=12206, Freecom
FireWire Hard Drive 1TB reports max_rom=2 but returns garbage if block
read requests are used to read the config ROM.  Force max_rom=0 to limit
them to quadlet read requests.

Reported-by: Christian Mueller <cm1@mumac.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
15 years agopowerpc/fsl-booke: Fix problem with _tlbil_va being interrupted
Kumar Gala [Sat, 13 Dec 2008 23:01:37 +0000 (17:01 -0600)]
powerpc/fsl-booke: Fix problem with _tlbil_va being interrupted

An example calling sequence which we did see:

copy_user_highpage -> kmap_atomic -> flush_tlb_page -> _tlbil_va

We got interrupted after setting up the MAS registers before the
tlbwe and the interrupt handler that caused the interrupt also did
a kmap_atomic (ide code) and thus on returning from the interrupt
the MAS registers no longer contained the proper values.

Since we dont save/restore MAS registers for normal interrupts we
need to disable interrupts in _tlbil_va to ensure atomicity.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx
Linus Torvalds [Sat, 13 Dec 2008 19:32:24 +0000 (11:32 -0800)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx:
  powerpc/40x: Add proper BOOTCFLAGS for cuboot-acadia

15 years agoMerge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Sat, 13 Dec 2008 19:32:04 +0000 (11:32 -0800)]
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-highlander: Trivial endian casting fixes
  i2c-pmcmsp: Fix endianness misannotation

15 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Sat, 13 Dec 2008 19:28:13 +0000 (11:28 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  Commands needing to be retried require a complete re-initialization.

15 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Sat, 13 Dec 2008 19:26:34 +0000 (11:26 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  MIPS: IP32: Update defconfig
  MIPS: Add missing calls to plat_unmap_dma_mem.
  MIPS: Kconfig: Fix the arch-specific header path
  MIPS: Use EI/DI for MIPS R2.

15 years agoconsole ASCII glyph 1:1 mapping
Ingo Brueckl [Wed, 10 Dec 2008 22:35:00 +0000 (23:35 +0100)]
console ASCII glyph 1:1 mapping

For the console, there is a 1:1 mapping of glyphs which cannot be found
in the current font.  This seems to be meant as a kind of 'emergency
fallback' for fonts without unicode mapping which otherwise would
display nothing readable on the screen.

At the moment it affects all chars for which no substitution character
is defined.  In particular this means that for all chars (>= 128) where
there is no iso88591-1/unicode character (e.g.  control character area)
you'll get the very strange 1:1 mapping of the (cp437) graphics card
glyphs.

I'm pretty sure that the 1:1 mapping should only affect strict ASCII
code characters, i.e.  chars < 128.

The patch limits the mapping as it probably was meant anyway.

Signed-off-by: Ingo Brueckl <ib@wupperonline.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Cc: Egmont Koblinger <egmont@uhulinux.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agounicode table for cp437
Ingo Brueckl [Wed, 10 Dec 2008 22:34:00 +0000 (23:34 +0100)]
unicode table for cp437

There is a major bug in the cp437 to unicode translation table.  Char
0x7c is mapped to U+00a5 which is the Yen sign and wrong.  The right
mapping is U+00a6 (broken bar).

Furthermore, a mapping for U+00b4 (a widely used character) is missing
even though easily possible.

The patch fixes these, as well as it provides a few other useful
mappings.

The changes are as follows:

  0x0f (enhancement) enables a sort of currency symbol
  0x27 (bug) enables a sort of acute accent which is a widely used character
  0x44 (enhancement) enables a sort of icelandic capital letter eth
  0x7c (major bug) corrects mapping
  0xeb (enhancement) enables a sort of icelandic small letter eth
  0xee (enhancement) enables a sort of math 'element of'

Signed-off-by: Ingo Brueckl <ib@wupperonline.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMIPS: IP32: Update defconfig
David Daney [Wed, 10 Dec 2008 23:27:13 +0000 (15:27 -0800)]
MIPS: IP32: Update defconfig

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add missing calls to plat_unmap_dma_mem.
David Daney [Thu, 11 Dec 2008 02:14:45 +0000 (18:14 -0800)]
MIPS: Add missing calls to plat_unmap_dma_mem.

dma_free_noncoherent() and dma_free_coherent() are missing calls to
plat_unmap_dma_mem().  This patch adds them.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Kconfig: Fix the arch-specific header path
Dmitri Vorobiev [Wed, 10 Dec 2008 20:38:36 +0000 (22:38 +0200)]
MIPS: Kconfig: Fix the arch-specific header path

The header path in the help text for the RUNTIME_DEBUG config option is
obsolete and needs to be updated to match the new location of
architecture-specific header files. While at it, fix the spelling mistake.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Use EI/DI for MIPS R2.
David Daney [Wed, 10 Dec 2008 16:37:25 +0000 (08:37 -0800)]
MIPS: Use EI/DI for MIPS R2.

For MIPS R2, use the EI and DI instructions to enable and disable
interrupts.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoCommands needing to be retried require a complete re-initialization.
Alan D. Brunelle [Tue, 9 Dec 2008 14:52:15 +0000 (15:52 +0100)]
Commands needing to be retried require a complete re-initialization.

The test-unit-ready portion of this patch was causing boots to fail on
my test machine (as in http://lkml.org/lkml/2008/12/5/161). With this
patch in place, the system is booting reliably.

Mike Anderson found the same problem in the hp_hw_start_stop code,
and I applied the same solution in cdrom_read_cdda_bpc.

Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
Cc: Mike Anderson <andmike@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agotracing/function-graph-tracer: add a new .irqentry.text section, fix
Ingo Molnar [Fri, 12 Dec 2008 11:13:36 +0000 (12:13 +0100)]
tracing/function-graph-tracer: add a new .irqentry.text section, fix

Impact: build fix

32-bit x86 needs this section too.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: fix tracepoints in scheduler
Peter Zijlstra [Wed, 10 Dec 2008 07:08:22 +0000 (08:08 +0100)]
sched: fix tracepoints in scheduler

The trace point only caught one of many places where a task changes cpu,
put it in the right place to we get all of them.

Change the signature while we're at it.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing/function-graph-tracer: Output arrows signal on hardirq call/return
Frederic Weisbecker [Tue, 9 Dec 2008 22:55:25 +0000 (23:55 +0100)]
tracing/function-graph-tracer: Output arrows signal on hardirq call/return

Impact: make more obvious the hardirq calls in the output

When a hardirq is triggered inside the codeflow on output, we have
now two arrows that indicate the entry and return of the hardirq.

 0)               |          bit_waitqueue() {
 0)   0.880 us    |            __phys_addr();
 0)   2.699 us    |          }
 0)               |          __wake_up_bit() {
 0)   ==========> |          smp_apic_timer_interrupt() {
 0)   0.797 us    |            native_apic_mem_write();
 0)   0.715 us    |            exit_idle();
 0)               |            irq_enter() {
 0)   0.722 us    |              idle_cpu();
 0)   5.519 us    |            }
 0)               |            hrtimer_interrupt() {
 0)               |              ktime_get() {
 0)               |                ktime_get_ts() {
 0)   0.805 us    |                  getnstimeofday();

 [...]

 0) ! 108.528 us  |            }
 0)               |            irq_exit() {
 0)               |              do_softirq() {
 0)               |                __do_softirq() {
 0)   0.895 us    |                  __local_bh_disable();
 0)               |                  run_timer_softirq() {
 0)   0.827 us    |                    hrtimer_run_pending();
 0)   1.226 us    |                    _spin_lock_irq();
 0)               |                    _spin_unlock_irq() {
 0)   6.550 us    |                  }
 0)   0.924 us    |                  _local_bh_enable();
 0) + 12.129 us   |                }
 0) + 13.911 us   |              }
 0)   0.707 us    |              idle_cpu();
 0) + 17.009 us   |            }
 0) ! 137.419 us  |          }
 0)   <========== |
 0)   1.045 us    |          }
 0) ! 148.908 us  |        }
 0) ! 151.022 us  |      }
 0) ! 153.022 us  |    }
 0)   0.963 us    |    journal_mark_dirty();
 0)   0.925 us    |    __brelse();

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing/function-graph-tracer: annotate do_IRQ and smp_apic_timer_interrupt
Frederic Weisbecker [Tue, 9 Dec 2008 22:54:20 +0000 (23:54 +0100)]
tracing/function-graph-tracer: annotate do_IRQ and smp_apic_timer_interrupt

Impact: move most important x86 irq entry-points to a separate subsection

Annotate do_IRQ and smp_apic_timer_interrupt to put them into the .irqentry.text
subsection. These function will so be recognized as hardirq entrypoints for the
function-graph-tracer. We could also annotate other irq entries but the others
are far less important but they can be added on request.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing/function-graph-tracer: add a new .irqentry.text section
Frederic Weisbecker [Tue, 9 Dec 2008 22:53:16 +0000 (23:53 +0100)]
tracing/function-graph-tracer: add a new .irqentry.text section

Impact: let the function-graph-tracer be aware of the irq entrypoints

Add a new .irqentry.text section to store the irq entrypoints functions
inside the same section. This way, the tracer will be able to signal
an interrupts triggering on output by recognizing these entrypoints.

Also, make this section recordable for dynamic tracing.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing/fastboot: include missing headers
Frederic Weisbecker [Thu, 11 Dec 2008 15:14:23 +0000 (16:14 +0100)]
tracing/fastboot: include missing headers

For now include/trace/boot.h doesn't need to include necessary headers
for its functions and structures because the files that include it already
do it.

But boot.h could be needed as well for further uses on other files.
So, this patch adds the necessary headers for future purposes...

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing/fastboot: fix len of func buffer
Stephen Rothwell [Thu, 11 Dec 2008 15:10:08 +0000 (16:10 +0100)]
tracing/fastboot: fix len of func buffer

Impact: fix possible stack overrun

This is a port of a patch included in the mainline (KSYM_SYMBOL_LEN fixes).
The current func len is not large enough to contain the max symbol len, the
right size must be KSYM_SYMBOL_LEN.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, bts: fix build error
Ingo Molnar [Fri, 12 Dec 2008 07:21:19 +0000 (08:21 +0100)]
x86, bts: fix build error

Impact: build fix

 arch/x86/kernel/ds.c: In function 'ds_request':
 arch/x86/kernel/ds.c:236: sorry, unimplemented: inlining failed in call to 'ds_get_context': recursive inlining

but the recursion here is scary ...

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, bts, ftrace: adapt the hw-branch-tracer to the ds.c interface
Markus Metzger [Thu, 11 Dec 2008 12:53:26 +0000 (13:53 +0100)]
x86, bts, ftrace: adapt the hw-branch-tracer to the ds.c interface

Impact: restructure code, cleanup

Remove BTS bits from the hw-branch-tracer (renamed from bts-tracer) and
use the ds interface.

Signed-off-by: Markus Metzger <markut.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, bts: provide in-kernel branch-trace interface
Markus Metzger [Thu, 11 Dec 2008 12:49:59 +0000 (13:49 +0100)]
x86, bts: provide in-kernel branch-trace interface

Impact: cleanup

Move the BTS bits from ptrace.c into ds.c.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>