Isaku Yamahata
2009-Mar-09 02:45 UTC
[Xen-devel] [PATCH] fix compilation error caused by 19286:dd489125a2e7
[IA64] fix compilation error caused by 19286:dd489125a2e7
This patch fixes compilation error caused by 19286:dd489125a2e7
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
diff --git a/xen/arch/ia64/xen/xensetup.c b/xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c
+++ b/xen/arch/ia64/xen/xensetup.c
@@ -337,6 +337,8 @@ is_platform_hp_ski(void)
static int __initdata dom0_vhpt_size_log2;
integer_param("dom0_vhpt_size_log2", dom0_vhpt_size_log2);
#endif
+unsigned long xen_fixed_mfn_start __read_mostly;
+unsigned long xen_fixed_mfn_end __read_mostly;
void __init start_kernel(void)
{
@@ -556,6 +558,10 @@ skip_move:
(xenheap_phys_end-__pa(xen_heap_start)) >> 20,
(xenheap_phys_end-__pa(xen_heap_start)) >> 10);
+ /* for is_xen_fixed_mfn() */
+ xen_fixed_mfn_start = virt_to_mfn(&_start);
+ xen_fixed_mfn_end = virt_to_mfn(xen_heap_start);
+
end_boot_allocator();
softirq_init();
diff --git a/xen/include/asm-ia64/mm.h b/xen/include/asm-ia64/mm.h
--- a/xen/include/asm-ia64/mm.h
+++ b/xen/include/asm-ia64/mm.h
@@ -149,13 +149,34 @@ page_list_splice_init(struct page_list_h
# define PGC_xen_heap PG_mask(1, 2)
/* bit PG_shift(3) reserved. See asm-x86/mm.h */
/* PG_mask(7, 6) reserved. See asm-x86/mm.h*/
+
+ /* Page is broken? */
+#define _PGC_broken PG_shift(7)
+#define PGC_broken PG_mask(1, 7)
+ /* Page is offline pending ? */
+#define _PGC_offlining PG_shift(8)
+#define PGC_offlining PG_mask(1, 8)
+ /* Page is offlined */
+#define _PGC_offlined PG_shift(9)
+#define PGC_offlined PG_mask(1, 9)
+#define PGC_offlined_broken (PGC_offlined | PGC_broken)
+
+#define is_page_offlining(page) ((page)->count_info & PGC_offlining)
+#define is_page_offlined(page) ((page)->count_info & PGC_offlined)
+#define is_page_broken(page) ((page)->count_info & PGC_broken)
+#define is_page_online(page) (!is_page_offlined(page))
+
/* Count of references to this frame. */
-#define PGC_count_width PG_shift(6)
+#define PGC_count_width PG_shift(9)
#define PGC_count_mask ((1UL<<PGC_count_width)-1)
+extern unsigned long xen_fixed_mfn_start;
+extern unsigned long xen_fixed_mfn_end;
#define is_xen_heap_page(page) ((page)->count_info & PGC_xen_heap)
#define is_xen_heap_mfn(mfn) (mfn_valid(mfn) &&
\
is_xen_heap_page(mfn_to_page(mfn)))
+#define is_xen_fixed_mfn(mfn) \
+ (xen_fixed_mfn_start <= (mfn) && (mfn) <= xen_fixed_mfn_end)
#ifdef CONFIG_IA64_PICKLE_DOMAIN
#define page_get_owner(_p) \
--
yamahata
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Jiang, Yunhong
2009-Mar-09 02:54 UTC
RE: [Xen-devel] [PATCH] fix compilation error caused by 19286:dd489125a2e7
Isaku, really sorry for missing this, I will take care of IA64 next time. Also I have a question to the definition of page_info, I assume the PGC_xxx and PGT_xxx definition should always be same to both IA64 and x86, am I right? Thanks Yunhong Jiang xen-devel-bounces@lists.xensource.com <> wrote:> [IA64] fix compilation error caused by 19286:dd489125a2e7 > > This patch fixes compilation error caused by 19286:dd489125a2e7 > > Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> > > diff --git a/xen/arch/ia64/xen/xensetup.c > b/xen/arch/ia64/xen/xensetup.c > --- a/xen/arch/ia64/xen/xensetup.c > +++ b/xen/arch/ia64/xen/xensetup.c > @@ -337,6 +337,8 @@ is_platform_hp_ski(void) > static int __initdata dom0_vhpt_size_log2; > integer_param("dom0_vhpt_size_log2", dom0_vhpt_size_log2); #endif > +unsigned long xen_fixed_mfn_start __read_mostly; > +unsigned long xen_fixed_mfn_end __read_mostly; > > void __init start_kernel(void) > { > @@ -556,6 +558,10 @@ skip_move: > (xenheap_phys_end-__pa(xen_heap_start)) >> 20, > (xenheap_phys_end-__pa(xen_heap_start)) >> 10); > > + /* for is_xen_fixed_mfn() */ > + xen_fixed_mfn_start = virt_to_mfn(&_start); > + xen_fixed_mfn_end = virt_to_mfn(xen_heap_start); + > end_boot_allocator(); > > softirq_init(); > diff --git a/xen/include/asm-ia64/mm.h b/xen/include/asm-ia64/mm.h > --- a/xen/include/asm-ia64/mm.h > +++ b/xen/include/asm-ia64/mm.h > @@ -149,13 +149,34 @@ page_list_splice_init(struct page_list_h > # define PGC_xen_heap PG_mask(1, 2) > /* bit PG_shift(3) reserved. See asm-x86/mm.h */ > /* PG_mask(7, 6) reserved. See asm-x86/mm.h*/ > + > + /* Page is broken? */ > +#define _PGC_broken PG_shift(7) > +#define PGC_broken PG_mask(1, 7) > + /* Page is offline pending ? */ > +#define _PGC_offlining PG_shift(8) > +#define PGC_offlining PG_mask(1, 8) > + /* Page is offlined */ > +#define _PGC_offlined PG_shift(9) > +#define PGC_offlined PG_mask(1, 9) > +#define PGC_offlined_broken (PGC_offlined | PGC_broken) + > +#define is_page_offlining(page) ((page)->count_info & PGC_offlining) > +#define is_page_offlined(page) ((page)->count_info & PGC_offlined) > +#define is_page_broken(page) ((page)->count_info & PGC_broken) > +#define is_page_online(page) (!is_page_offlined(page)) + > /* Count of references to this frame. */ > -#define PGC_count_width PG_shift(6) > +#define PGC_count_width PG_shift(9) > #define PGC_count_mask ((1UL<<PGC_count_width)-1) > > +extern unsigned long xen_fixed_mfn_start; > +extern unsigned long xen_fixed_mfn_end; > #define is_xen_heap_page(page) ((page)->count_info & PGC_xen_heap) > #define is_xen_heap_mfn(mfn) (mfn_valid(mfn) && > \ > is_xen_heap_page(mfn_to_page(mfn))) > +#define is_xen_fixed_mfn(mfn) > \ > + (xen_fixed_mfn_start <= (mfn) && (mfn) <= xen_fixed_mfn_end) > > #ifdef CONFIG_IA64_PICKLE_DOMAIN > #define page_get_owner(_p) > \ > > > -- > yamahata > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Isaku Yamahata
2009-Mar-09 04:51 UTC
Re: [Xen-devel] [PATCH] fix compilation error caused by 19286:dd489125a2e7
On Mon, Mar 09, 2009 at 10:54:31AM +0800, Jiang, Yunhong wrote:> Also I have a question to the definition of page_info, I assume the PGC_xxx and PGT_xxx definition should always be same to both IA64 and x86, am I right?No. For example, ia64 doesn''t have PGC_page_table, PGC_cacheattr_base. So far, ia64 PGC_xxx is a subset of x86 PGC_xxx. -- yamahata _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jiang, Yunhong
2009-Mar-09 05:33 UTC
RE: [Xen-devel] [PATCH] fix compilation error caused by 19286:dd489125a2e7
Thanks for your clarification. After checking the code, seems the bits for PGC_page_table/PGC_cacheattr_base will be reserved in IA64, the only difference is it will not be used in IA64. Thanks Yunhong Jiang Isaku Yamahata <mailto:yamahata@valinux.co.jp> wrote:> On Mon, Mar 09, 2009 at 10:54:31AM +0800, Jiang, Yunhong wrote: >> Also I have a question to the definition of page_info, I > assume the PGC_xxx and PGT_xxx definition should always be > same to both IA64 and x86, am I right? > > No. For example, ia64 doesn''t have PGC_page_table, PGC_cacheattr_base. > So far, ia64 PGC_xxx is a subset of x86 PGC_xxx. > -- > yamahata_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel