WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [patch] bitops on irq_cpustat_t->__softirq_pending

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch] bitops on irq_cpustat_t->__softirq_pending
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Thu, 30 Mar 2006 10:44:36 -0600
Cc: jimix@xxxxxxxxxxxxxx
Delivery-date: Thu, 30 Mar 2006 16:46:48 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.8.3
As mentioned earlier, PowerPC's atomic ops operate on longs, and we have made 
our *_bit() prototypes use long* (instead of void*) to warn us of problems at 
compile time. Here's one caller that was flagged:
        test_and_set_bit(nr, &softirq_pending(cpu))
Accordingly, we need __softirq_pending to be long, not int.

PowerPC is currently using a few files unmodified from the x86 versions; 
hardirq.h is one of them. We could copy asm-x86/hardirq.h and change the type 
of this one field, but that leads to maintenance headaches down the road.

Instead, this patch changes asm-x86/hardirq.h to use a long where PPC needs 
it. This doesn't change the size of the structure for x86. There are other 
ways we could and should do this code-sharing, but this one is the least 
impact (and this is an area where IA64's divergence is potentially 
problematic).

I think it would be a good idea to make a wiki page that covers the files that 
are candidates for sharing. I know Jimi has investigated this subject...

Please apply.

-- 
Hollis Blanchard
IBM Linux Technology Center

Use long instead of int for irq_cpustat_t->__softirq_pending, allowing PowerPC 
to share this file unchanged (PowerPC bitops operate on longs).

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>

diff -r 50778f42f2dd xen/include/asm-x86/hardirq.h
--- a/xen/include/asm-x86/hardirq.h     Wed Mar 29 16:02:40 2006 +0100
+++ b/xen/include/asm-x86/hardirq.h     Wed Mar 29 16:23:32 2006 -0600
@@ -5,7 +5,7 @@
 #include <xen/cache.h>
 
 typedef struct {
-       unsigned int __softirq_pending;
+       unsigned long __softirq_pending;
        unsigned int __local_irq_count;
        unsigned int __nmi_count;
        unsigned long idle_timestamp;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>