Skip to contentSkip to conversation

Fix include for kernel/panic.c

PATCH In review Jan Kiszka 3 participants 7 messages Dec 29, 2008

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 Fix include for kernel/panic.c

Not all archs include ipipe_trace.h implicitly so that bulding kernel/panic.c may break in oops_enter (seen on ARM with tracer disabled). Fix this with a proper include.

---
 kernel/panic.c |    1 +
 1 file changed, 1 insertion(+)
kernel/panic.c +1 -0
Index: b/kernel/panic.c
===================================================================
@@ -21,6 +21,7 @@
 #include <linux/debug_locks.h>
 #include <linux/random.h>
 #include <linux/kallsyms.h>
+#include <linux/ipipe_trace.h>
 
 int panic_on_oops;
 int tainted;
#1 lore raw

kernel/panic.c line 24

Quoted 6 lines · Jan Kiszka

+++ b/kernel/panic.c

kernel/panic.c +1 -0
@@ -21,6 +21,7 @@
 #include <linux/debug_locks.h>
 #include <linux/random.h>
 #include <linux/kallsyms.h>
+#include <linux/ipipe_trace.h>

That is not enough, when compiling a kernel without I-pipe enabled, the compiler complains about ipipe_processor_id.

Signature · 1 line
                                                 Gilles.
author
#2 lore raw
Quoted 10 lines · Gilles Chanteperdrix

kernel/panic.c line 24

Quoted 6 lines · Jan Kiszka

+++ b/kernel/panic.c

kernel/panic.c +1 -0
@@ -21,6 +21,7 @@
 #include <linux/debug_locks.h>
 #include <linux/random.h>
 #include <linux/kallsyms.h>
+#include <linux/ipipe_trace.h>

That is not enough, when compiling a kernel without I-pipe enabled, the compiler complains about ipipe_processor_id.

Good point. But I wonder where the ipipe_processor_id wrapper for the disabled case is - can't find it in adeos-ipipe-2.6.26-arm-1.11-02.patch right now.

Jan

#3 lore raw
Quoted 11 lines · Jan Kiszka
Quoted 9 lines · Gilles Chanteperdrix

kernel/panic.c line 24

Quoted 6 lines · Jan Kiszka

+++ b/kernel/panic.c

kernel/panic.c +1 -0
@@ -21,6 +21,7 @@
 #include <linux/debug_locks.h>
 #include <linux/random.h>
 #include <linux/kallsyms.h>
+#include <linux/ipipe_trace.h>

That is not enough, when compiling a kernel without I-pipe enabled, the compiler complains about ipipe_processor_id.

Quoted 3 lines

Good point. But I wonder where the ipipe_processor_id wrapper for the disabled case is - can't find it in adeos-ipipe-2.6.26-arm-1.11-02.patch right now.

It does not exist.

Signature · 1 line
                                                 Gilles.
author
#4 lore raw
Quoted 11 lines · Gilles Chanteperdrix
Quoted 10 lines · Jan Kiszka
Quoted 9 lines · Gilles Chanteperdrix

Review line 24

Quoted 6 lines · Jan Kiszka

+++ b/kernel/panic.c

(quoted diff) +1 -0
@@ -21,6 +21,7 @@
 #include <linux/debug_locks.h>
 #include <linux/random.h>
 #include <linux/kallsyms.h>
+#include <linux/ipipe_trace.h>

That is not enough, when compiling a kernel without I-pipe enabled, the compiler complains about ipipe_processor_id.

Quoted 5 lines
Quoted 3 lines

Good point. But I wonder where the ipipe_processor_id wrapper for the disabled case is - can't find it in adeos-ipipe-2.6.26-arm-1.11-02.patch right now.

It does not exist.

Ah, I see now. This hunk from my ipipe-lttng patch is required upstream:

include/linux/ipipe.h +2 -1
Index: b/include/linux/ipipe.h
===================================================================
@@ -534,7 +534,8 @@ static inline void local_irq_restore_nos
 #define ipipe_irq_unlock(irq)		do { } while(0)
 
 #define ipipe_root_domain_p		1
-#define ipipe_safe_current		current
+#define ipipe_processor_id()		smp_processor_id()
+#define ipipe_safe_current()		current
 
 #define local_irq_disable_head()	local_irq_disable()
 

Jan

#5 lore raw
In reply to Jan Kiszka
Quoted 11 lines · Jan Kiszka
Quoted 9 lines · Gilles Chanteperdrix

kernel/panic.c line 24

Quoted 6 lines · Jan Kiszka

+++ b/kernel/panic.c

kernel/panic.c +1 -0
@@ -21,6 +21,7 @@
 #include <linux/debug_locks.h>
 #include <linux/random.h>
 #include <linux/kallsyms.h>
+#include <linux/ipipe_trace.h>

That is not enough, when compiling a kernel without I-pipe enabled, the compiler complains about ipipe_processor_id.

Quoted 4 lines

Good point. But I wonder where the ipipe_processor_id wrapper for the disabled case is - can't find it in adeos-ipipe-2.6.26-arm-1.11-02.patch right now.

I have a pending fix for this one as well. I'll push my tree tomorrow.

Quoted 10 lines

Jan

------------------------------------------------------------------------

_______________________________________________
Adeos-main mailing list
[email protected]
https://mail.gna.org/listinfo/adeos-main

Signature · 1 line
Philippe.
#6 lore raw
In reply to Jan Kiszka
Quoted 4 lines · Jan Kiszka

Not all archs include ipipe_trace.h implicitly so that bulding kernel/panic.c may break in oops_enter (seen on ARM with tracer disabled). Fix this with a proper include.

Thanks. Fix a bit earlier on ppc as well. I will push my tree soon now since things seem to have gone back to normal wrt 2.6.27.

Quoted 27 lines
---
 kernel/panic.c |    1 +
 1 file changed, 1 insertion(+)

Index: b/kernel/panic.c
===================================================================

kernel/panic.c +1 -1
@@ -21,6 +21,7 @@
 #include <linux/debug_locks.h>
 #include <linux/random.h>
 #include <linux/kallsyms.h>
+#include <linux/ipipe_trace.h>
 
 int panic_on_oops;
 int tainted;
 
 
 
------------------------------------------------------------------------

_______________________________________________
Adeos-main mailing list
[email protected]
https://mail.gna.org/listinfo/adeos-main

Signature · 1 line
Philippe.