Skip to contentSkip to conversation

final header fixes

PATCH In review Hollis Blanchard 4 participants 8 messages Mar 23, 2005 – Mar 26, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 final header fixes

I think this is the last of the header fixes I've run across. Though it's sometimes difficult to tell, I believe Xen/ia64 has asm/mm.h, flushtlb.h, page.h, and shadow.h. Please apply.

Signature · 2 lines
Hollis Blanchard
IBM Linux Technology Center

===== xen/include/xen/sched.h 1.162 vs edited =====

xen/include/xen/sched.h +1 -0
@@ -22,6 +22,7 @@
 #include <xen/grant_table.h>
 #include <asm/hardirq.h>
 #include <asm/domain.h>
+#include <asm/bitops.h>
 
 extern unsigned long volatile jiffies;
 extern rwlock_t domlist_lock;

===== xen/include/xen/softirq.h 1.23 vs edited =====

xen/include/xen/softirq.h +1 -0
@@ -14,6 +14,7 @@
 #include <xen/config.h>
 #include <xen/lib.h>
 #include <xen/smp.h>
+#include <xen/irq_cpustat.h>
 #include <asm/bitops.h>
 #include <asm/hardirq.h>
 
#1 lore raw

One of the two additions was already applied. I think the other, to softirq.h, was a problem for ia64?

-- Keir

Quoted 10 lines · Hollis Blanchard

I think this is the last of the header fixes I've run across. Though it's sometimes difficult to tell, I believe Xen/ia64 has asm/mm.h, flushtlb.h, page.h, and shadow.h. Please apply.

Signature · 3 lines
Hollis Blanchard
IBM Linux Technology Center
<xen-headers.diff>

-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005 Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click

#2 lore raw
Quoted 1 line · Keir Fraser

One of the two additions was already applied. I think the other, to softirq.h, was a problem for ia64?

Sorry, I sent the wrong patch. The correct one is attached now.

Signature · 2 lines
Hollis Blanchard
IBM Linux Technology Center
xen/common/grant_table.c +2 -2
diff -Nru a/xen/common/grant_table.c b/xen/common/grant_table.c
@@ -26,8 +26,8 @@
 
 #include <xen/config.h>
 #include <xen/sched.h>
-#include <asm-x86/mm.h>
-#include <asm-x86/shadow.h>
+#include <asm/mm.h>
+#include <asm/shadow.h>
 
 #define PIN_FAIL(_rc, _f, _a...)   \
     do {                           \
xen/include/xen/keyhandler.h +2 -0
diff -Nru a/xen/include/xen/keyhandler.h b/xen/include/xen/keyhandler.h
@@ -10,6 +10,8 @@
 #ifndef __XEN_KEYHANDLER_H__
 #define __XEN_KEYHANDLER_H__
 
+struct xen_regs;
+
 /*
  * Register a callback function for key @key. The callback occurs in
  * softirq context with no locks held and interrupts enabled.
xen/include/xen/list.h +1 -0
diff -Nru a/xen/include/xen/list.h b/xen/include/xen/list.h
@@ -2,6 +2,7 @@
 #define _LINUX_LIST_H
 
 #include <xen/lib.h>
+#include <xen/prefetch.h>
 
 /*
  * Simple doubly linked list implementation.
xen/common/page_alloc.c +1 -0
diff -Nru a/xen/common/page_alloc.c b/xen/common/page_alloc.c
@@ -32,6 +32,7 @@
 #include <xen/softirq.h>
 #include <asm/domain_page.h>
 #include <asm/page.h>
+#include <asm/flushtlb.h>
 
 /*
  * Comma-separated list of hexadecimal page numbers containing bad bytes.
xen/common/xmalloc.c +1 -0
diff -Nru a/xen/common/xmalloc.c b/xen/common/xmalloc.c
@@ -33,6 +33,7 @@
 #include <xen/ac_timer.h>
 #include <xen/cache.h>
 #include <xen/prefetch.h>
+#include <asm/page.h>
 
 static LIST_HEAD(freelist);
 static spinlock_t freelist_lock = SPIN_LOCK_UNLOCKED;
#3 lore raw

Sorry for the delay in comment... I was traveling and am a bit behind on email.

This second patch looks good to me, though I would prefer to change to '#include <asm/regs.h>' from 'struct xen_regs;' as xen_regs is #define'd to pt_regs on ia64 and the explicit use of struct xen_regs in a header could cause header ordering problems later. Will that work for ppc?

Dan

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#4 lore raw
Quoted 5 lines · Dan Magenheimer

This second patch looks good to me, though I would prefer to change to '#include <asm/regs.h>' from 'struct xen_regs;' as xen_regs is #define'd to pt_regs on ia64 and the explicit use of struct xen_regs in a header could cause header ordering problems later. Will that work for ppc?

Ah, sure... I was just trying to avoid extra dependency trees where possible. Apparently it is not possible here. :)

So that should be #include <public/xen.h> (which includes arch-*.h which defines xen_regs). It looks like we may want to move ia64's #define to arch-ia64.h ...

Signature · 9 lines
Hollis Blanchard
IBM Linux Technology Center


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#5 lore raw
Quoted 7 lines · Hollis Blanchard
Quoted 5 lines · Dan Magenheimer

This second patch looks good to me, though I would prefer to change to '#include <asm/regs.h>' from 'struct xen_regs;' as xen_regs is #define'd to pt_regs on ia64 and the explicit use of struct xen_regs in a header could cause header ordering problems later. Will that work for ppc?

Quoted 6 lines

Ah, sure... I was just trying to avoid extra dependency trees where possible. Apparently it is not possible here. :)

So that should be #include <public/xen.h> (which includes arch-*.h which defines xen_regs). It looks like we may want to move ia64's #define to arch-ia64.h ...

Could you please include asm/regs.h or public/xen.h wherever you want to include keyhandler.h? Thanks.

christian

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#6 lore raw
Quoted 11 lines · Christian Limpach
Quoted 10 lines · Hollis Blanchard
Quoted 5 lines · Dan Magenheimer

This second patch looks good to me, though I would prefer to change to '#include <asm/regs.h>' from 'struct xen_regs;' as xen_regs is #define'd to pt_regs on ia64 and the explicit use of struct xen_regs in a header could cause header ordering problems later. Will that work for ppc?

Ah, sure... I was just trying to avoid extra dependency trees where possible. Apparently it is not possible here. :)

Quoted 6 lines
Quoted 3 lines

So that should be #include <public/xen.h> (which includes arch-*.h which defines xen_regs). It looks like we may want to move ia64's #define to arch-ia64.h ...

Could you please include asm/regs.h or public/xen.h wherever you want to include keyhandler.h? Thanks.

That works great, until somebody other than me includes or modifies keyhandler.h (or any of the other headers we've been talking about).

I guess I don't see the difficulty in making sure you include what you use...?

Signature · 10 lines
Hollis Blanchard
IBM Linux Technology Center



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#7 lore raw
Quoted 16 lines · Hollis Blanchard
Quoted 15 lines · Christian Limpach
Quoted 13 lines · Hollis Blanchard
Quoted 5 lines · Dan Magenheimer

This second patch looks good to me, though I would prefer to change to '#include <asm/regs.h>' from 'struct xen_regs;' as xen_regs is #define'd to pt_regs on ia64 and the explicit use of struct xen_regs in a header could cause header ordering problems later. Will that work for ppc?

Ah, sure... I was just trying to avoid extra dependency trees where possible. Apparently it is not possible here. :)

So that should be #include <public/xen.h> (which includes arch-*.h which defines xen_regs). It looks like we may want to move ia64's #define to arch-ia64.h ...

Quoted 8 lines
Quoted 2 lines

Could you please include asm/regs.h or public/xen.h wherever you want to include keyhandler.h? Thanks.

That works great, until somebody other than me includes or modifies keyhandler.h (or any of the other headers we've been talking about).

I guess I don't see the difficulty in making sure you include what you use...?

I think we have too many header files which include other header files already -- to the point that a lot of .c files don't include all the header files they need because some random header file includes it for them.

keyhandler.c is one of the header files you probably want to include in source code level add-on software, software which might be require using a header set which is not compatible with Xen's header set.

christian

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click