Clean up warning for page_alloc.c
To me, it's more meaningful to change mmzone.h, because we're in
xen world. Due to historical reason, still some of linux files are remained unchanged in xen/ia64, with most stuff useless (like MMZONE below). It's only work around in early stage for compilation, and now time for
us to remove most of them and create new header files specific to
xen/ia64 if necessary. I think this can be the guideline when you're
cleaning up with confliction seen. ;-)
Thanks,
Kevin
Quoted 40 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Masaki Kanno
Sent: 2006年2月27日 12:35
To: [email protected]; [email protected]
Subject: [Xen-devel] [PATCH] Clean up warning forpage_alloc.cHi all,
I clean up warning in xen/ia64.
The "MAX_ORDER" is redefined as I show below it.
I didn't change the Linux original code "mmzone.h" and thought to change a local definition in "page_alloc.c".
This patch changes a local definition from "MAX_ORDER" to "XEN_MAX_ORDER".page_alloc.c:222:1: warning: "
MAX_ORDER" redefined
In file included from/home/kanno/xen-ia64-unstable.hg/xen/include/asm-ia64/linux-xen/linux/gfp.h:
7,
from/home/kanno/xen-ia64-unstable.hg/xen/include/asm/mm.h:6,
from/home/kanno/xen-ia64-unstable.hg/xen/include/linux/mm.h:79,
from/home/kanno/xen-ia64-unstable.hg/xen/include/asm-ia64/linux-xen/asm/uaccess.h:39,
from/home/kanno/xen-ia64-unstable.hg/xen/include/asm/domain.h:143,
from/home/kanno/xen-ia64-unstable.hg/xen/include/xen/sched.h:15,from page_alloc.c:28:
/home/kanno/xen-ia64-unstable.hg/xen/include/asm-ia64/linux/mmzone.h:19:
1: warning: this is the location of the previous
definitionSigned-off-by Masaki Kanno <[email protected]>Best regards,
Kan
Hi Kevin,
I will research whether the declaration defined in "mmzone.h" is used.
Best regards,
Kan
Quoted 2 lines · Kevin
To me, it's more meaningful to change
mmzone.h, because we're in
xen world. Due to historical reason, still some of linux files are remained unchanged in xen/ia64, with most stuff
useless (like MMZONE below).
Quoted 50 lines
It's only work around in early stage for compilation, and now time for us to remove most of them and create new header files specific to xen/ia64 if necessary. I think this can be the guideline when you're cleaning up with confliction seen. ;-)
Thanks,
KevinQuoted 40 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Masaki Kanno
Sent: 2006定2埖27晩 12:35
To: [email protected]; [email protected]
Subject: [Xen-devel] [PATCH] Clean up warning forpage_alloc.cHi all,
I clean up warning in xen/ia64.
The "MAX_ORDER" is redefined as I show below it.
I didn't change the Linux original code "mmzone.h" and thought to change a local definition in "page_alloc.c".
This patch changes a local definition from "MAX_ORDER" to "XEN_MAX_ORDER".page_alloc.c:222:1: warning: "
MAX_ORDER" redefined
In file included from/home/kanno/xen-ia64-unstable.hg/xen/include/asm-ia64/linux-xen/linux/gfp.h:
7,
from/home/kanno/xen-ia64-unstable.hg/xen/include/asm/mm.h:6,
from/home/kanno/xen-ia64-unstable.hg/xen/include/linux/mm.h:79,
from/home/kanno/xen-ia64-unstable.hg/xen/include/asm-ia64/linux-xen/asm/uaccess.h:39,
from/home/kanno/xen-ia64-unstable.hg/xen/include/asm/domain.h:143,
from/home/kanno/xen-ia64-unstable.hg/xen/include/xen/sched.h:15,from page_alloc.c:28:
/home/kanno/xen-ia64-unstable.hg/xen/include/asm-ia64/linux/mmzone.h:19:
1: warning: this is the location of the previous
definitionSigned-off-by Masaki Kanno <[email protected]>Best regards,
Kan
Hi Kevin,
I researched whether the declaration defined in "mmzone.h" is used. As a result, most of the declared definitions were needless for "mmzone.h". The necessary definition was only one line of "#include <linux/topology.h>" if I invalidated some definitions of "include/asm-ia64/linux-xen/linux/gfp.h". The details please see "example1.diff".
Request for comment.
Hi all,
By the way, "MAX_ORDER" is used in the following files.
- xen/include/asm-ia64/xen/asm/meminit.h
-- line 42:#define ORDERROUNDDOWN(n) ((n) & ~((PAGE_SIZE<<MAX_ORDER)-1))
- xen/arch/ia64/xen/xenmem.c
-- line 46:ASSERT(mpt_order <= MAX_ORDER);
I removed "mmzone.h", but did not become any compilation errors. It is the reason why "ORDERROUNDDOWN" is not used in Xen/ia64. When I compiled Xen, I didn't use debug option.
I think that a definition of "MAX_ORDER" should be declared in header files.
Request for comment, too.
Best regards,
Kan
Quoted 63 lines · Masaki Kanno
Hi Kevin,
I will research whether the declaration defined in "
mmzone.h" is used.Best regards,
KanQuoted 2 lines · Kevin
To me, it's more meaningful to change
mmzone.h, because we're in
xen world. Due to historical reason, still some of linux files are remained unchanged in xen/ia64, with most stuffuseless (like MMZONE below).
Quoted 5 lines
It's only work around in early stage for compilation, and now time for us to remove most of them and create new header files specific to xen/ia64 if necessary. I think this can be the guideline when you're cleaning up with confliction seen. ;-)
Quoted 45 lines
Thanks,
KevinQuoted 40 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Masaki Kanno
Sent: 2006定2埖27晩 12:35
To: [email protected]; [email protected]
Subject: [Xen-devel] [PATCH] Clean up warning forpage_alloc.cHi all,
I clean up warning in xen/ia64.
The "MAX_ORDER" is redefined as I show below it.
I didn't change the Linux original code "mmzone.h" and thought to change a local definition in "page_alloc.c".
This patch changes a local definition from "MAX_ORDER" to "XEN_MAX_ORDER".page_alloc.c:222:1: warning: "
MAX_ORDER" redefined
In file included from/home/kanno/xen-ia64-unstable.hg/xen/include/asm-ia64/linux-xen/linux/gfp.h:
7,
from/home/kanno/xen-ia64-unstable.hg/xen/include/asm/mm.h:6,
from/home/kanno/xen-ia64-unstable.hg/xen/include/linux/mm.h:79,
from/home/kanno/xen-ia64-unstable.hg/xen/include/asm-ia64/linux-xen/asm/uaccess.h:39,
from/home/kanno/xen-ia64-unstable.hg/xen/include/asm/domain.h:143,
from/home/kanno/xen-ia64-unstable.hg/xen/include/xen/sched.h:15,from page_alloc.c:28:
/home/kanno/xen-ia64-unstable.hg/xen/include/asm-ia64/linux/mmzone.h:19:
1: warning: this is the location of the previous
definitionSigned-off-by Masaki Kanno <[email protected]>Best regards,
Kan
Quoted 5 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
xen/arch/ia64/xen/acpi.c +1 -1
@@ -42,7 +42,7 @@#include <linux/irq.h> #include <linux/acpi.h> #include <linux/efi.h> -#include <linux/mmzone.h> +//#include <linux/mmzone.h> #include <asm/io.h> //#include <asm/iosapic.h> #include <asm/machvec.h>
xen/arch/ia64/xen/mm_init.c +2 -0
@@ -15,7 +15,9 @@#include <linux/efi.h> #include <linux/elf.h> #include <linux/mm.h> +#ifndef XEN #include <linux/mmzone.h> +#endif #include <linux/module.h> #ifndef XEN #include <linux/personality.h>
xen/include/asm-ia64/linux-xen/linux/gfp.h +5 -0
@@ -3,8 +3,11 @@#ifdef XEN #include <asm/bitops.h> +#include <linux/topology.h> #endif +#ifndef XEN #include <linux/mmzone.h> +#endif #include <linux/stddef.h> #include <linux/linkage.h> #include <linux/config.h>
@@ -85,6 +88,7 @@static inline void arch_free_page (struct page *page,int order) { }#endif +#ifndef XEN extern struct page *FASTCALL (__alloc_pages (unsigned int ,unsigned int ,struct zonelist *));
@@ -117,6 +121,7 @@#define alloc_page_vma (gfp_mask, vma, addr) alloc_pages(gfp_mask, 0)#endif #define alloc_page (gfp_mask) alloc_pages(gfp_mask, 0) +#endif /* XEN */ extern unsigned long FASTCALL (__get_free_pages (unsigned int __nocast gfp_mask,unsigned int order));extern unsigned long FASTCALL (get_zeroed_page (unsigned int __nocast gfp_mask));
xen/include/asm-ia64/linux/topology.h +2 -0
@@ -29,7 +29,9 @@#include <linux/cpumask.h> #include <linux/bitops.h> +#ifndef XEN #include <linux/mmzone.h> +#endif #include <linux/smp.h> #include <asm/topology.h>
xen/include/asm-ia64/linux/mmzone.h deleted +0 -592
592 lines not on this page · raw message
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel