[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 07/12] xen: allow tmem to be disabled on platforms which do not support it (ARM)
On Fri, 2012-01-20 at 12:19 +0000, Stefano Stabellini wrote: > Why do we need this? > I though that tmem compiled OK on ARM. But it can't possibly work, as evidenced by the missing symbol in dummy.S! There is no point in compiling something which cannot work. > Also I don't think there is any > architectural limitation that would prevent tmem from working on ARM, > right? Not really an architectural thing but a "not yet implemented thing". tmem is quite a long way down the list of things we need to do for ARM right now. I'd be quite happy to have this patch reverted at some point in the future but for now there is no point in pretending that tmem works. > If the goal is to remove DUMMY(donate_page) maybe it is better to > introduce a stub function instead? A stub would be no better than the dummy function in this case. It needs to actually do things which we cannot do yet on ARM. dummy.S is a total hack and we should be aiming to remove it ASAP. Ian. > > On Fri, 20 Jan 2012, Ian Campbell wrote: > > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> > > --- > > xen/Rules.mk | 1 + > > xen/arch/arm/dummy.S | 1 - > > xen/arch/ia64/Rules.mk | 1 + > > xen/arch/x86/Rules.mk | 1 + > > xen/common/Makefile | 4 ++-- > > xen/common/page_alloc.c | 1 + > > xen/include/xen/tmem.h | 9 +++++++++ > > xen/include/xen/tmem_xen.h | 5 +++++ > > 8 files changed, 20 insertions(+), 3 deletions(-) > > > > diff --git a/xen/Rules.mk b/xen/Rules.mk > > index b7b54f6..e25e8d4 100644 > > --- a/xen/Rules.mk > > +++ b/xen/Rules.mk > > @@ -51,6 +51,7 @@ CFLAGS-$(perfc) += -DPERF_COUNTERS > > CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS > > CFLAGS-$(lock_profile) += -DLOCK_PROFILE > > CFLAGS-$(HAS_ACPI) += -DHAS_ACPI > > +CFLAGS-$(HAS_TMEM) += -DHAS_TMEM > > CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER > > > > ifneq ($(max_phys_cpus),) > > diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S > > index 3bf5226..da0b906 100644 > > --- a/xen/arch/arm/dummy.S > > +++ b/xen/arch/arm/dummy.S > > @@ -20,7 +20,6 @@ DUMMY(domain_get_maximum_gpfn); > > DUMMY(domain_relinquish_resources); > > DUMMY(domain_set_time_offset); > > DUMMY(dom_cow); > > -DUMMY(donate_page); > > DUMMY(flush_tlb_mask); > > DUMMY(free_vcpu_guest_context); > > DUMMY(get_page); > > diff --git a/xen/arch/ia64/Rules.mk b/xen/arch/ia64/Rules.mk > > index 054b4de..6c8cf69 100644 > > --- a/xen/arch/ia64/Rules.mk > > +++ b/xen/arch/ia64/Rules.mk > > @@ -9,6 +9,7 @@ HAS_PCI := y > > HAS_PASSTHROUGH := y > > HAS_NS16550 := y > > HAS_KEXEC := y > > +HAS_TMEM := y > > xenoprof := y > > no_warns ?= n > > vti_debug ?= n > > diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk > > index 1e48877..8802a69 100644 > > --- a/xen/arch/x86/Rules.mk > > +++ b/xen/arch/x86/Rules.mk > > @@ -8,6 +8,7 @@ HAS_PCI := y > > HAS_PASSTHROUGH := y > > HAS_NS16550 := y > > HAS_KEXEC := y > > +HAS_TMEM := y > > xenoprof := y > > > > # > > diff --git a/xen/common/Makefile b/xen/common/Makefile > > index 9249845..68a2df1 100644 > > --- a/xen/common/Makefile > > +++ b/xen/common/Makefile > > @@ -38,8 +38,8 @@ obj-y += vsprintf.o > > obj-y += wait.o > > obj-y += xmalloc_tlsf.o > > obj-y += rcupdate.o > > -obj-y += tmem.o > > -obj-y += tmem_xen.o > > +obj-$(HAS_TMEM) += tmem.o > > +obj-$(HAS_TMEM) += tmem_xen.o > > obj-y += radix-tree.o > > obj-y += rbtree.o > > obj-y += lzo.o > > diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c > > index 249bb35..3aac830 100644 > > --- a/xen/common/page_alloc.c > > +++ b/xen/common/page_alloc.c > > @@ -35,6 +35,7 @@ > > #include <xen/perfc.h> > > #include <xen/numa.h> > > #include <xen/nodemask.h> > > +#include <xen/errno.h> > > #include <xen/tmem.h> > > #include <xen/tmem_xen.h> > > #include <public/sysctl.h> > > diff --git a/xen/include/xen/tmem.h b/xen/include/xen/tmem.h > > index 5dbf9d5..2ebffb4 100644 > > --- a/xen/include/xen/tmem.h > > +++ b/xen/include/xen/tmem.h > > @@ -9,8 +9,17 @@ > > #ifndef __XEN_TMEM_H__ > > #define __XEN_TMEM_H__ > > > > +#ifdef HAS_TMEM > > extern void tmem_destroy(void *); > > extern void *tmem_relinquish_pages(unsigned int, unsigned int); > > extern unsigned long tmem_freeable_pages(void); > > +#else > > +static inline void tmem_destroy(void *v) {} > > +static inline void *tmem_relinquish_pages(unsigned int order, unsigned int > > flags) > > +{ > > + return NULL; > > +} > > +static inline unsigned long tmem_freeable_pages(void) { return 0; } > > +#endif > > > > #endif /* __XEN_TMEM_H__ */ > > diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h > > index fdbeed1..a6c0672 100644 > > --- a/xen/include/xen/tmem_xen.h > > +++ b/xen/include/xen/tmem_xen.h > > @@ -9,6 +9,7 @@ > > #ifndef __XEN_TMEM_XEN_H__ > > #define __XEN_TMEM_XEN_H__ > > > > +#ifdef HAS_TMEM > > #include <xen/config.h> > > #include <xen/mm.h> /* heap alloc/free */ > > #include <xen/pfn.h> > > @@ -559,4 +560,8 @@ extern int tmh_copy_tze_to_client(tmem_cli_mfn_t cmfn, > > void *tmem_va, pagesize_t > > #define RESET_CYC_COUNTER(x) do { } while (0) > > #endif > > > > +#else /* HAS_TMEM */ > > +#define opt_tmem 0 > > +#endif > > + > > #endif /* __XEN_TMEM_XEN_H__ */ > > -- > > 1.7.2.5 > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@xxxxxxxxxxxxxxxxxxx > > http://lists.xensource.com/xen-devel > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |