All of lore.kernel.org
 help / color / mirror / Atom feed
* [Adeos-main] [PATCHES] cleanup minor quirks for 1.6-01
@ 2006-12-03 14:13 Jan Kiszka
  2006-12-03 14:43 ` Philippe Gerum
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2006-12-03 14:13 UTC (permalink / raw)
  To: adeos-main

[-- Attachment #1: Type: text/plain, Size: 3036 bytes --]

Hi,

I came across a few things in latest 2.6.19-i386-1.6-01 patch:

The usage of __ipipe_pipelock in __ipipe_common_info_proc is broken (raw lock used as
Linux lock here), and I do not see any volatile data it could protect anyway. So let's
remove it.

--- linux-2.6.19-ipipe.orig/kernel/ipipe/core.c
+++ linux-2.6.19-ipipe/kernel/ipipe/core.c
@@ -1251,8 +1251,6 @@ static int __ipipe_common_info_proc(char
 	unsigned irq;
 	int len;
 
-	spin_lock(&__ipipe_pipelock);
-
 	p += sprintf(p, "       +----- Handling ([A]ccepted, [G]rabbed, [W]ired, [D]iscarded)\n");
 	p += sprintf(p, "       |+---- Sticky\n");
 	p += sprintf(p, "       ||+--- Locked\n");
@@ -1336,8 +1334,6 @@ static int __ipipe_common_info_proc(char
 	else
 		p += sprintf(p, "priority=%d\n", ipd->priority);
 
-	spin_unlock(&__ipipe_pipelock);
-
 	len = p - page;
 
 	if (len <= off + count)



The hard IRQ state of the tracer output got inverted during recent restructuring. This
fixes it (and indents a few labels correctly).

--- linux-2.6.19-ipipe.orig/kernel/ipipe/tracer.c
+++ linux-2.6.19-ipipe/kernel/ipipe/tracer.c
@@ -279,7 +279,7 @@ __ipipe_trace(enum ipipe_trace_type type
 	local_irq_save_hw_notrace(flags);
 
 	cpu_id = ipipe_processor_id();
-restart:
+ restart:
 	tp = old_tp = &trace_paths[cpu_id][active_path[cpu_id]];
 
 	/* here starts a race window with NMIs - catched below */
@@ -322,7 +322,7 @@ restart:
 
 	/* store all trace point data */
 	point->type = type;
-	point->flags = raw_irqs_disabled_flags(flags) ? 0 : IPIPE_TFLG_HWIRQ_OFF;
+	point->flags = raw_irqs_disabled_flags(flags) ? IPIPE_TFLG_HWIRQ_OFF : 0;
 	point->eip = eip;
 	point->parent_eip = parent_eip;
 	point->v = v;
@@ -367,7 +367,7 @@ restart:
 		/* store the path's end (i.e. excluding post-trace) */
 		tp->end = WRAP_POINT_NO(pos - post_trace + tp->post_trace);
 
-enforce_end:
+ enforce_end:
 		if (tp->flags & IPIPE_TFLG_FREEZING)
 			tp = __ipipe_trace_freeze(cpu_id, tp, pos);
 		else
@@ -411,7 +411,7 @@ static unsigned long __ipipe_global_path
 	spin_lock_irqsave(&global_path_lock, flags);
 
 	cpu_id = ipipe_processor_id();
-restart:
+ restart:
 	tp = &trace_paths[cpu_id][active_path[cpu_id]];
 
 	/* here is small race window with NMIs - catched below */



And finally, ipipe_init_proc can be moved to the __init section.

--- linux-2.6.19-ipipe.orig/kernel/ipipe/core.c
+++ linux-2.6.19-ipipe/kernel/ipipe/core.c
@@ -1362,7 +1362,7 @@ void __ipipe_remove_domain_proc(struct i
 	remove_proc_entry(ipd->name,ipipe_proc_root);
 }
 
-void ipipe_init_proc(void)
+void __init ipipe_init_proc(void)
 {
 	ipipe_proc_root = create_proc_entry("ipipe",S_IFDIR, 0);
 	create_proc_read_entry("version",0444,ipipe_proc_root,&__ipipe_version_info_proc,NULL);



There is more cleanup stuff in my pipe, one of it (type-based spinlock selection)
could be helpful for follow-up work on other archs. It's almost done, I will try to
prepare patch series over the next days.

Jan



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-12-14 20:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-03 14:13 [Adeos-main] [PATCHES] cleanup minor quirks for 1.6-01 Jan Kiszka
2006-12-03 14:43 ` Philippe Gerum
2006-12-03 14:50   ` Philippe Gerum
2006-12-03 15:05   ` Jan Kiszka
2006-12-03 15:47     ` Philippe Gerum
2006-12-03 18:01       ` Jan Kiszka
2006-12-03 20:22         ` Philippe Gerum
2006-12-06 23:38           ` Jan Kiszka
2006-12-14 20:53             ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.