ia64/xen-unstable

changeset 18086:246a179ebb6d

[IA64] kexec: Header changes in preparation for EFI RID

The EFI RID patches require pal.h to (directly or indirectly)
have access to GRANULE_SIZE which is defined in pgtable.h.
This effectively causes a header loop as pgtable.h includes
system.h and system.h includes pal.h. This patch breaks
that loop by not including pal.h in system.h if XEN is defined,
which is the only time the loop will occur.

There are two side effects of this:

1. regionreg.c makes use of some symbols declared in
pal.h but does not include it directly. This is
resolved by including it, which doesn't seem to
cause any additional problems.

2. system.h makes use of ia64_pal_halt_light which is defined in pal.h.

#define safe_halt() ia64_pal_halt_light()

This is probably the reason that pal.h is included in system.h.
However this does not seem to manifest as any sort of build problem,
presumably because either nothing in xen uses safe_halt,
or because those that do include pal.h by some other means.

In any case the change seems safe, though hackish.

Cc: Tristan Gingold <tgingold@free.fr>
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Alex Williamson <alex.williamson@hp.com>
Cc: Aron Griffis <aron@hp.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Tue Jul 22 12:15:02 2008 +0900 (2008-07-22)
parents 4f0428e4dd15
children 34a84a5306f7
files xen/arch/ia64/xen/regionreg.c xen/include/asm-ia64/linux-xen/asm/system.h
line diff
     1.1 --- a/xen/arch/ia64/xen/regionreg.c	Tue Jul 22 12:15:02 2008 +0900
     1.2 +++ b/xen/arch/ia64/xen/regionreg.c	Tue Jul 22 12:15:02 2008 +0900
     1.3 @@ -16,6 +16,7 @@
     1.4  #include <asm/vhpt.h>
     1.5  #include <asm/vcpu.h>
     1.6  #include <asm/percpu.h>
     1.7 +#include <asm/pal.h>
     1.8  
     1.9  /* Defined in xemasm.S  */
    1.10  extern void ia64_new_rr7(unsigned long rid, void *shared_info, void *shared_arch_info, unsigned long shared_info_va, unsigned long va_vhpt);
     2.1 --- a/xen/include/asm-ia64/linux-xen/asm/system.h	Tue Jul 22 12:15:02 2008 +0900
     2.2 +++ b/xen/include/asm-ia64/linux-xen/asm/system.h	Tue Jul 22 12:15:02 2008 +0900
     2.3 @@ -16,7 +16,9 @@
     2.4  
     2.5  #include <asm/kregs.h>
     2.6  #include <asm/page.h>
     2.7 +#ifndef XEN
     2.8  #include <asm/pal.h>
     2.9 +#endif
    2.10  #include <asm/percpu.h>
    2.11  
    2.12  #ifndef XEN