<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/arch/x86/oprofile, branch v3.2.9</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge branch 'urgent' of git://amd64.org/linux/rric into perf/urgent</title>
<updated>2011-11-15T10:03:30+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2011-11-15T10:03:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4a1dba72384193753e44e15d9d05a50be6587271'/>
<id>4a1dba72384193753e44e15d9d05a50be6587271</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile, x86: Fix crash when unloading module (nmi timer mode)</title>
<updated>2011-11-04T14:04:33+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2011-10-10T14:21:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=97f7f8189fe54e3cfe324ef9ad35064f3d2d3bff'/>
<id>97f7f8189fe54e3cfe324ef9ad35064f3d2d3bff</id>
<content type='text'>
If oprofile uses the nmi timer interrupt there is a crash while
unloading the module. The bug can be triggered with oprofile build as
module and kernel parameter nolapic set. This patch fixes this.

oprofile: using NMI timer interrupt.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
IP: [&lt;ffffffff8123c226&gt;] unregister_syscore_ops+0x41/0x58
PGD 42dbca067 PUD 41da6a067 PMD 0
Oops: 0002 [#1] PREEMPT SMP
CPU 5
Modules linked in: oprofile(-) [last unloaded: oprofile]

Pid: 2518, comm: modprobe Not tainted 3.1.0-rc7-00019-gb2fb49d #19 Advanced Micro Device Anaheim/Anaheim
RIP: 0010:[&lt;ffffffff8123c226&gt;]  [&lt;ffffffff8123c226&gt;] unregister_syscore_ops+0x41/0x58
RSP: 0018:ffff88041ef71e98  EFLAGS: 00010296
RAX: 0000000000000000 RBX: ffffffffa0017100 RCX: dead000000200200
RDX: 0000000000000000 RSI: dead000000100100 RDI: ffffffff8178c620
RBP: ffff88041ef71ea8 R08: 0000000000000001 R09: 0000000000000082
R10: 0000000000000000 R11: ffff88041ef71de8 R12: 0000000000000080
R13: fffffffffffffff5 R14: 0000000000000001 R15: 0000000000610210
FS:  00007fc902f20700(0000) GS:ffff88042fd40000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000008 CR3: 000000041cdb6000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process modprobe (pid: 2518, threadinfo ffff88041ef70000, task ffff88041d348040)
Stack:
 ffff88041ef71eb8 ffffffffa0017790 ffff88041ef71eb8 ffffffffa0013532
 ffff88041ef71ec8 ffffffffa00132d6 ffff88041ef71ed8 ffffffffa00159b2
 ffff88041ef71f78 ffffffff81073115 656c69666f72706f 0000000000610200
Call Trace:
 [&lt;ffffffffa0013532&gt;] op_nmi_exit+0x15/0x17 [oprofile]
 [&lt;ffffffffa00132d6&gt;] oprofile_arch_exit+0xe/0x10 [oprofile]
 [&lt;ffffffffa00159b2&gt;] oprofile_exit+0x1e/0x20 [oprofile]
 [&lt;ffffffff81073115&gt;] sys_delete_module+0x1c3/0x22f
 [&lt;ffffffff811bf09e&gt;] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [&lt;ffffffff8148070b&gt;] system_call_fastpath+0x16/0x1b
Code: 20 c6 78 81 e8 c5 cc 23 00 48 8b 13 48 8b 43 08 48 be 00 01 10 00 00 00 ad de 48 b9 00 02 20 00 00 00 ad de 48 c7 c7 20 c6 78 81
 89 42 08 48 89 10 48 89 33 48 89 4b 08 e8 a6 c0 23 00 5a 5b
RIP  [&lt;ffffffff8123c226&gt;] unregister_syscore_ops+0x41/0x58
 RSP &lt;ffff88041ef71e98&gt;
CR2: 0000000000000008
---[ end trace 43a541a52956b7b0 ]---

CC: stable@kernel.org # 2.6.37+
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If oprofile uses the nmi timer interrupt there is a crash while
unloading the module. The bug can be triggered with oprofile build as
module and kernel parameter nolapic set. This patch fixes this.

oprofile: using NMI timer interrupt.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
IP: [&lt;ffffffff8123c226&gt;] unregister_syscore_ops+0x41/0x58
PGD 42dbca067 PUD 41da6a067 PMD 0
Oops: 0002 [#1] PREEMPT SMP
CPU 5
Modules linked in: oprofile(-) [last unloaded: oprofile]

Pid: 2518, comm: modprobe Not tainted 3.1.0-rc7-00019-gb2fb49d #19 Advanced Micro Device Anaheim/Anaheim
RIP: 0010:[&lt;ffffffff8123c226&gt;]  [&lt;ffffffff8123c226&gt;] unregister_syscore_ops+0x41/0x58
RSP: 0018:ffff88041ef71e98  EFLAGS: 00010296
RAX: 0000000000000000 RBX: ffffffffa0017100 RCX: dead000000200200
RDX: 0000000000000000 RSI: dead000000100100 RDI: ffffffff8178c620
RBP: ffff88041ef71ea8 R08: 0000000000000001 R09: 0000000000000082
R10: 0000000000000000 R11: ffff88041ef71de8 R12: 0000000000000080
R13: fffffffffffffff5 R14: 0000000000000001 R15: 0000000000610210
FS:  00007fc902f20700(0000) GS:ffff88042fd40000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000008 CR3: 000000041cdb6000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process modprobe (pid: 2518, threadinfo ffff88041ef70000, task ffff88041d348040)
Stack:
 ffff88041ef71eb8 ffffffffa0017790 ffff88041ef71eb8 ffffffffa0013532
 ffff88041ef71ec8 ffffffffa00132d6 ffff88041ef71ed8 ffffffffa00159b2
 ffff88041ef71f78 ffffffff81073115 656c69666f72706f 0000000000610200
Call Trace:
 [&lt;ffffffffa0013532&gt;] op_nmi_exit+0x15/0x17 [oprofile]
 [&lt;ffffffffa00132d6&gt;] oprofile_arch_exit+0xe/0x10 [oprofile]
 [&lt;ffffffffa00159b2&gt;] oprofile_exit+0x1e/0x20 [oprofile]
 [&lt;ffffffff81073115&gt;] sys_delete_module+0x1c3/0x22f
 [&lt;ffffffff811bf09e&gt;] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [&lt;ffffffff8148070b&gt;] system_call_fastpath+0x16/0x1b
Code: 20 c6 78 81 e8 c5 cc 23 00 48 8b 13 48 8b 43 08 48 be 00 01 10 00 00 00 ad de 48 b9 00 02 20 00 00 00 ad de 48 c7 c7 20 c6 78 81
 89 42 08 48 89 10 48 89 33 48 89 4b 08 e8 a6 c0 23 00 5a 5b
RIP  [&lt;ffffffff8123c226&gt;] unregister_syscore_ops+0x41/0x58
 RSP &lt;ffff88041ef71e98&gt;
CR2: 0000000000000008
---[ end trace 43a541a52956b7b0 ]---

CC: stable@kernel.org # 2.6.37+
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2011-10-26T15:03:38+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-10-26T15:03:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7115e3fcf45514db7525a05365b10454ff7f345e'/>
<id>7115e3fcf45514db7525a05365b10454ff7f345e</id>
<content type='text'>
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (121 commits)
  perf symbols: Increase symbol KSYM_NAME_LEN size
  perf hists browser: Refuse 'a' hotkey on non symbolic views
  perf ui browser: Use libslang to read keys
  perf tools: Fix tracing info recording
  perf hists browser: Elide DSO column when it is set to just one DSO, ditto for threads
  perf hists: Don't consider filtered entries when calculating column widths
  perf hists: Don't decay total_period for filtered entries
  perf hists browser: Honour symbol_conf.show_{nr_samples,total_period}
  perf hists browser: Do not exit on tab key with single event
  perf annotate browser: Don't change selection line when returning from callq
  perf tools: handle endianness of feature bitmap
  perf tools: Add prelink suggestion to dso update message
  perf script: Fix unknown feature comment
  perf hists browser: Apply the dso and thread filters when merging new batches
  perf hists: Move the dso and thread filters from hist_browser
  perf ui browser: Honour the xterm colors
  perf top tui: Give color hints just on the percentage, like on --stdio
  perf ui browser: Make the colors configurable and change the defaults
  perf tui: Remove unneeded call to newtCls on startup
  perf hists: Don't format the percentage on hist_entry__snprintf
  ...

Fix up conflicts in arch/x86/kernel/kprobes.c manually.

Ingo's tree did the insane "add volatile to const array", which just
doesn't make sense ("volatile const"?).  But we could remove the const
*and* make the array volatile to make doubly sure that gcc doesn't
optimize it away..

Also fix up kernel/trace/ring_buffer.c non-data-conflicts manually: the
reader_lock has been turned into a raw lock by the core locking merge,
and there was a new user of it introduced in this perf core merge.  Make
sure that new use also uses the raw accessor functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (121 commits)
  perf symbols: Increase symbol KSYM_NAME_LEN size
  perf hists browser: Refuse 'a' hotkey on non symbolic views
  perf ui browser: Use libslang to read keys
  perf tools: Fix tracing info recording
  perf hists browser: Elide DSO column when it is set to just one DSO, ditto for threads
  perf hists: Don't consider filtered entries when calculating column widths
  perf hists: Don't decay total_period for filtered entries
  perf hists browser: Honour symbol_conf.show_{nr_samples,total_period}
  perf hists browser: Do not exit on tab key with single event
  perf annotate browser: Don't change selection line when returning from callq
  perf tools: handle endianness of feature bitmap
  perf tools: Add prelink suggestion to dso update message
  perf script: Fix unknown feature comment
  perf hists browser: Apply the dso and thread filters when merging new batches
  perf hists: Move the dso and thread filters from hist_browser
  perf ui browser: Honour the xterm colors
  perf top tui: Give color hints just on the percentage, like on --stdio
  perf ui browser: Make the colors configurable and change the defaults
  perf tui: Remove unneeded call to newtCls on startup
  perf hists: Don't format the percentage on hist_entry__snprintf
  ...

Fix up conflicts in arch/x86/kernel/kprobes.c manually.

Ingo's tree did the insane "add volatile to const array", which just
doesn't make sense ("volatile const"?).  But we could remove the const
*and* make the array volatile to make doubly sure that gcc doesn't
optimize it away..

Also fix up kernel/trace/ring_buffer.c non-data-conflicts manually: the
reader_lock has been turned into a raw lock by the core locking merge,
and there was a new user of it introduced in this perf core merge.  Make
sure that new use also uses the raw accessor functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>perf, x86: Implement IBS initialization</title>
<updated>2011-10-10T04:57:16+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2011-09-21T09:30:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b716916679e72054d436afadce2f94dcad71cfad'/>
<id>b716916679e72054d436afadce2f94dcad71cfad</id>
<content type='text'>
This patch implements IBS feature detection and initialzation. The
code is shared between perf and oprofile. If IBS is available on the
system for perf, a pmu is setup.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1316597423-25723-3-git-send-email-robert.richter@amd.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements IBS feature detection and initialzation. The
code is shared between perf and oprofile. If IBS is available on the
system for perf, a pmu is setup.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1316597423-25723-3-git-send-email-robert.richter@amd.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf, x86: Share IBS macros between perf and oprofile</title>
<updated>2011-10-10T04:57:11+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2011-09-21T09:30:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ee5789dbcc800ba7d641443e53f60d53977f9747'/>
<id>ee5789dbcc800ba7d641443e53f60d53977f9747</id>
<content type='text'>
Moving IBS macros from oprofile to &lt;asm/perf_event.h&gt; to make it
available to perf. No additional changes.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1316597423-25723-2-git-send-email-robert.richter@amd.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Moving IBS macros from oprofile to &lt;asm/perf_event.h&gt; to make it
available to perf. No additional changes.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1316597423-25723-2-git-send-email-robert.richter@amd.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86, nmi: Wire up NMI handlers to new routines</title>
<updated>2011-10-10T04:56:57+00:00</updated>
<author>
<name>Don Zickus</name>
<email>dzickus@redhat.com</email>
</author>
<published>2011-09-30T19:06:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9c48f1c629ecfa114850c03f875c6691003214de'/>
<id>9c48f1c629ecfa114850c03f875c6691003214de</id>
<content type='text'>
Just convert all the files that have an nmi handler to the new routines.
Most of it is straight forward conversion.  A couple of places needed some
tweaking like kgdb which separates the debug notifier from the nmi handler
and mce removes a call to notify_die.

[Thanks to Ying for finding out the history behind that mce call

https://lkml.org/lkml/2010/5/27/114

And Boris responding that he would like to remove that call because of it

https://lkml.org/lkml/2011/9/21/163]

The things that get converted are the registeration/unregistration routines
and the nmi handler itself has its args changed along with code removal
to check which list it is on (most are on one NMI list except for kgdb
which has both an NMI routine and an NMI Unknown routine).

Signed-off-by: Don Zickus &lt;dzickus@redhat.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Acked-by: Corey Minyard &lt;minyard@acm.org&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Robert Richter &lt;robert.richter@amd.com&gt;
Cc: Huang Ying &lt;ying.huang@intel.com&gt;
Cc: Corey Minyard &lt;minyard@acm.org&gt;
Cc: Jack Steiner &lt;steiner@sgi.com&gt;
Link: http://lkml.kernel.org/r/1317409584-23662-4-git-send-email-dzickus@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just convert all the files that have an nmi handler to the new routines.
Most of it is straight forward conversion.  A couple of places needed some
tweaking like kgdb which separates the debug notifier from the nmi handler
and mce removes a call to notify_die.

[Thanks to Ying for finding out the history behind that mce call

https://lkml.org/lkml/2010/5/27/114

And Boris responding that he would like to remove that call because of it

https://lkml.org/lkml/2011/9/21/163]

The things that get converted are the registeration/unregistration routines
and the nmi handler itself has its args changed along with code removal
to check which list it is on (most are on one NMI list except for kgdb
which has both an NMI routine and an NMI Unknown routine).

Signed-off-by: Don Zickus &lt;dzickus@redhat.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Acked-by: Corey Minyard &lt;minyard@acm.org&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Robert Richter &lt;robert.richter@amd.com&gt;
Cc: Huang Ying &lt;ying.huang@intel.com&gt;
Cc: Corey Minyard &lt;minyard@acm.org&gt;
Cc: Jack Steiner &lt;steiner@sgi.com&gt;
Link: http://lkml.kernel.org/r/1317409584-23662-4-git-send-email-dzickus@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>locking, oprofile: Annotate oprofilefs lock as raw</title>
<updated>2011-09-13T09:12:05+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2009-07-25T14:18:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2d21a29fb62f142b8a62496700d8d82a6a8fd783'/>
<id>2d21a29fb62f142b8a62496700d8d82a6a8fd783</id>
<content type='text'>
The oprofilefs_lock can be taken in atomic context (in profiling
interrupts) and therefore cannot cannot be preempted on -rt -
annotate it.

In mainline this change documents the low level nature of
the lock - otherwise there's no functional difference. Lockdep
and Sparse checking will work as usual.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The oprofilefs_lock can be taken in atomic context (in profiling
interrupts) and therefore cannot cannot be preempted on -rt -
annotate it.

In mainline this change documents the low level nature of
the lock - otherwise there's no functional difference. Lockdep
and Sparse checking will work as usual.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile, x86: Fix overflow and warning (commit 1d12d35)</title>
<updated>2011-08-16T21:51:00+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2011-08-16T21:39:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=298557db42eb2d6efca81669dc369425b46c5be6'/>
<id>298557db42eb2d6efca81669dc369425b46c5be6</id>
<content type='text'>
Following fixes for:

 1d12d35 oprofile, x86: Convert memory allocation to static array

Fix potential buffer overflow.

Fix the following warning:

 arch/x86/oprofile/op_model_ppro.c: In function ‘ppro_check_ctrs’:
 arch/x86/oprofile/op_model_ppro.c:143: warning: label ‘out’ defined but not used

Cc: Maarten Lankhorst &lt;m.b.lankhorst@gmail.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following fixes for:

 1d12d35 oprofile, x86: Convert memory allocation to static array

Fix potential buffer overflow.

Fix the following warning:

 arch/x86/oprofile/op_model_ppro.c: In function ‘ppro_check_ctrs’:
 arch/x86/oprofile/op_model_ppro.c:143: warning: label ‘out’ defined but not used

Cc: Maarten Lankhorst &lt;m.b.lankhorst@gmail.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile, x86: Convert memory allocation to static array</title>
<updated>2011-08-01T20:54:19+00:00</updated>
<author>
<name>Maarten Lankhorst</name>
<email>m.b.lankhorst@gmail.com</email>
</author>
<published>2011-08-01T15:08:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1d12d35284b74b7257b84ba0cef1e82a66d73aea'/>
<id>1d12d35284b74b7257b84ba0cef1e82a66d73aea</id>
<content type='text'>
On -rt, allocators don't work from atomic context any more,
and the maximum size of the array is known at compile time.

Call trace on a -rt kernel:

oprofile: using NMI interrupt.
BUG: sleeping function called from invalid context at kernel/rtmutex.c:645
in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: kworker/0:1
Pid: 0, comm: kworker/0:1 Tainted: G         C  3.0.0-rt3-patser+ #39
Call Trace:
 &lt;IRQ&gt;  [&lt;ffffffff8103fc0a&gt;] __might_sleep+0xca/0xf0
 [&lt;ffffffff8160d424&gt;] rt_spin_lock+0x24/0x40
 [&lt;ffffffff811476c7&gt;] __kmalloc+0xc7/0x370
 [&lt;ffffffffa0275c85&gt;] ? ppro_setup_ctrs+0x215/0x260 [oprofile]
 [&lt;ffffffffa0273de0&gt;] ? oprofile_cpu_notifier+0x60/0x60 [oprofile]
 [&lt;ffffffffa0275c85&gt;] ppro_setup_ctrs+0x215/0x260 [oprofile]
 [&lt;ffffffffa0273de0&gt;] ? oprofile_cpu_notifier+0x60/0x60 [oprofile]
 [&lt;ffffffffa0273de0&gt;] ? oprofile_cpu_notifier+0x60/0x60 [oprofile]
 [&lt;ffffffffa0273ea4&gt;] nmi_cpu_setup+0xc4/0x110 [oprofile]
 [&lt;ffffffff81094455&gt;] generic_smp_call_function_interrupt+0x95/0x190
 [&lt;ffffffff8101df77&gt;] smp_call_function_interrupt+0x27/0x40
 [&lt;ffffffff81615093&gt;] call_function_interrupt+0x13/0x20
 &lt;EOI&gt;  [&lt;ffffffff8131d0c4&gt;] ? plist_check_head+0x54/0xc0
 [&lt;ffffffff81371fe8&gt;] ? intel_idle+0xc8/0x120
 [&lt;ffffffff81371fc7&gt;] ? intel_idle+0xa7/0x120
 [&lt;ffffffff814a57b0&gt;] cpuidle_idle_call+0xb0/0x230
 [&lt;ffffffff810011db&gt;] cpu_idle+0x8b/0xe0
 [&lt;ffffffff815fc82f&gt;] start_secondary+0x1d3/0x1d8

Signed-off-by: Maarten Lankhorst &lt;m.b.lankhorst@gmail.com&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On -rt, allocators don't work from atomic context any more,
and the maximum size of the array is known at compile time.

Call trace on a -rt kernel:

oprofile: using NMI interrupt.
BUG: sleeping function called from invalid context at kernel/rtmutex.c:645
in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: kworker/0:1
Pid: 0, comm: kworker/0:1 Tainted: G         C  3.0.0-rt3-patser+ #39
Call Trace:
 &lt;IRQ&gt;  [&lt;ffffffff8103fc0a&gt;] __might_sleep+0xca/0xf0
 [&lt;ffffffff8160d424&gt;] rt_spin_lock+0x24/0x40
 [&lt;ffffffff811476c7&gt;] __kmalloc+0xc7/0x370
 [&lt;ffffffffa0275c85&gt;] ? ppro_setup_ctrs+0x215/0x260 [oprofile]
 [&lt;ffffffffa0273de0&gt;] ? oprofile_cpu_notifier+0x60/0x60 [oprofile]
 [&lt;ffffffffa0275c85&gt;] ppro_setup_ctrs+0x215/0x260 [oprofile]
 [&lt;ffffffffa0273de0&gt;] ? oprofile_cpu_notifier+0x60/0x60 [oprofile]
 [&lt;ffffffffa0273de0&gt;] ? oprofile_cpu_notifier+0x60/0x60 [oprofile]
 [&lt;ffffffffa0273ea4&gt;] nmi_cpu_setup+0xc4/0x110 [oprofile]
 [&lt;ffffffff81094455&gt;] generic_smp_call_function_interrupt+0x95/0x190
 [&lt;ffffffff8101df77&gt;] smp_call_function_interrupt+0x27/0x40
 [&lt;ffffffff81615093&gt;] call_function_interrupt+0x13/0x20
 &lt;EOI&gt;  [&lt;ffffffff8131d0c4&gt;] ? plist_check_head+0x54/0xc0
 [&lt;ffffffff81371fe8&gt;] ? intel_idle+0xc8/0x120
 [&lt;ffffffff81371fc7&gt;] ? intel_idle+0xa7/0x120
 [&lt;ffffffff814a57b0&gt;] cpuidle_idle_call+0xb0/0x230
 [&lt;ffffffff810011db&gt;] cpu_idle+0x8b/0xe0
 [&lt;ffffffff815fc82f&gt;] start_secondary+0x1d3/0x1d8

Signed-off-by: Maarten Lankhorst &lt;m.b.lankhorst@gmail.com&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86, perf: Make copy_from_user_nmi() a library function</title>
<updated>2011-07-21T18:41:57+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2011-06-07T09:49:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1ac2e6ca44e13a087eb7438d284f887097ee7e84'/>
<id>1ac2e6ca44e13a087eb7438d284f887097ee7e84</id>
<content type='text'>
copy_from_user_nmi() is used in oprofile and perf. Moving it to other
library functions like copy_from_user(). As this is x86 code for 32
and 64 bits, create a new file usercopy.c for unified code.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/20110607172413.GJ20052@erda.amd.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
copy_from_user_nmi() is used in oprofile and perf. Moving it to other
library functions like copy_from_user(). As this is x86 code for 32
and 64 bits, create a new file usercopy.c for unified code.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/20110607172413.GJ20052@erda.amd.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
</feed>
