[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen: arm: introduce arm32 as a subarch of arm.
It would be nice to add to the description of the patch what you are doing. Something along these lines: - move gic.h to include/asm-arm/gic.h; - move assembly files (entry.S, head.S, mode_switch.S, proc-ca15.S, lib/*) to xen/arch/arm/arm32; - move asm-offsets.c to xen/arch/arm/arm32; - make the appropriate Makefile changes. Other than that the patch is OK. On Tue, 18 Dec 2012, Ian Campbell wrote: > Ping? > On Tue, 2012-12-04 at 15:57 +0000, Ian Campbell wrote: > > Eventually we will have arm64 as well. > > > > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> > > --- > > Config.mk | 4 +++- > > config/{arm.mk => arm32.mk} | 0 > > xen/Rules.mk | 2 +- > > xen/arch/arm/Makefile | 9 +++------ > > xen/arch/arm/Rules.mk | 13 ++++++++----- > > xen/arch/arm/arm32/Makefile | 5 +++++ > > xen/arch/arm/{ => arm32}/asm-offsets.c | 0 > > xen/arch/arm/{ => arm32}/entry.S | 0 > > xen/arch/arm/{ => arm32}/head.S | 0 > > xen/arch/arm/{ => arm32}/lib/Makefile | 0 > > xen/arch/arm/{ => arm32}/lib/assembler.h | 0 > > xen/arch/arm/{ => arm32}/lib/bitops.h | 0 > > xen/arch/arm/{ => arm32}/lib/changebit.S | 0 > > xen/arch/arm/{ => arm32}/lib/clearbit.S | 0 > > xen/arch/arm/{ => arm32}/lib/copy_template.S | 0 > > xen/arch/arm/{ => arm32}/lib/div64.S | 0 > > xen/arch/arm/{ => arm32}/lib/findbit.S | 0 > > xen/arch/arm/{ => arm32}/lib/lib1funcs.S | 0 > > xen/arch/arm/{ => arm32}/lib/lshrdi3.S | 0 > > xen/arch/arm/{ => arm32}/lib/memcpy.S | 0 > > xen/arch/arm/{ => arm32}/lib/memmove.S | 0 > > xen/arch/arm/{ => arm32}/lib/memset.S | 0 > > xen/arch/arm/{ => arm32}/lib/memzero.S | 0 > > xen/arch/arm/{ => arm32}/lib/setbit.S | 0 > > xen/arch/arm/{ => arm32}/lib/testchangebit.S | 0 > > xen/arch/arm/{ => arm32}/lib/testclearbit.S | 0 > > xen/arch/arm/{ => arm32}/lib/testsetbit.S | 0 > > xen/arch/arm/{ => arm32}/mode_switch.S | 2 +- > > xen/arch/arm/{ => arm32}/proc-ca15.S | 0 > > xen/arch/arm/domain.c | 2 +- > > xen/arch/arm/domain_build.c | 2 +- > > xen/arch/arm/gic.c | 2 +- > > xen/arch/arm/irq.c | 2 +- > > xen/arch/arm/p2m.c | 2 +- > > xen/arch/arm/setup.c | 2 +- > > xen/arch/arm/smpboot.c | 2 +- > > xen/arch/arm/traps.c | 2 +- > > xen/arch/arm/vgic.c | 2 +- > > xen/arch/arm/vtimer.c | 2 +- > > xen/{arch/arm => include/asm-arm}/gic.h | 6 ++---- > > 40 files changed, 33 insertions(+), 28 deletions(-) > > rename config/{arm.mk => arm32.mk} (100%) > > create mode 100644 xen/arch/arm/arm32/Makefile > > rename xen/arch/arm/{ => arm32}/asm-offsets.c (100%) > > rename xen/arch/arm/{ => arm32}/entry.S (100%) > > rename xen/arch/arm/{ => arm32}/head.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/Makefile (100%) > > rename xen/arch/arm/{ => arm32}/lib/assembler.h (100%) > > rename xen/arch/arm/{ => arm32}/lib/bitops.h (100%) > > rename xen/arch/arm/{ => arm32}/lib/changebit.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/clearbit.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/copy_template.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/div64.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/findbit.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/lib1funcs.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/lshrdi3.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/memcpy.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/memmove.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/memset.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/memzero.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/setbit.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/testchangebit.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/testclearbit.S (100%) > > rename xen/arch/arm/{ => arm32}/lib/testsetbit.S (100%) > > rename xen/arch/arm/{ => arm32}/mode_switch.S (99%) > > rename xen/arch/arm/{ => arm32}/proc-ca15.S (100%) > > rename xen/{arch/arm => include/asm-arm}/gic.h (98%) > > > > diff --git a/Config.mk b/Config.mk > > index d99b9a1..8e35886 100644 > > --- a/Config.mk > > +++ b/Config.mk > > @@ -14,7 +14,9 @@ debug ?= y > > debug_symbols ?= $(debug) > > > > XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \ > > - -e s/i86pc/x86_32/ -e s/amd64/x86_64/ -e > > s/arm.*/arm/) > > + -e s/i86pc/x86_32/ -e s/amd64/x86_64/ \ > > + -e s/armv7.*/arm32/) > > + > > XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH) > > XEN_OS ?= $(shell uname -s) > > > > diff --git a/config/arm.mk b/config/arm32.mk > > similarity index 100% > > rename from config/arm.mk > > rename to config/arm32.mk > > diff --git a/xen/Rules.mk b/xen/Rules.mk > > index f7cb8b2..c2db449 100644 > > --- a/xen/Rules.mk > > +++ b/xen/Rules.mk > > @@ -28,7 +28,7 @@ endif > > # Set ARCH/SUBARCH appropriately. > > override TARGET_SUBARCH := $(XEN_TARGET_ARCH) > > override TARGET_ARCH := $(shell echo $(XEN_TARGET_ARCH) | \ > > - sed -e 's/x86.*/x86/') > > + sed -e 's/x86.*/x86/' -e > > s'/arm\(32\|64\)/arm/g') > > > > TARGET := $(BASEDIR)/xen > > > > diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile > > index fd92b72..1b33767 100644 > > --- a/xen/arch/arm/Makefile > > +++ b/xen/arch/arm/Makefile > > @@ -1,8 +1,7 @@ > > -subdir-y += lib > > +subdir-$(arm32) += arm32 > > > > obj-y += dummy.o > > obj-y += early_printk.o > > -obj-y += entry.o > > obj-y += domain.o > > obj-y += domctl.o > > obj-y += sysctl.o > > @@ -12,8 +11,6 @@ obj-y += io.o > > obj-y += irq.o > > obj-y += kernel.o > > obj-y += mm.o > > -obj-y += mode_switch.o > > -obj-y += proc-ca15.o > > obj-y += p2m.o > > obj-y += percpu.o > > obj-y += guestcopy.o > > @@ -36,7 +33,7 @@ obj-y += dtb.o > > AFLAGS += -DCONFIG_DTB_FILE=\"$(CONFIG_DTB_FILE)\" > > endif > > > > -ALL_OBJS := head.o $(ALL_OBJS) > > +ALL_OBJS := $(TARGET_SUBARCH)/head.o $(ALL_OBJS) > > > > $(TARGET): $(TARGET)-syms $(TARGET).bin > > # XXX: VE model loads by VMA so instead of > > @@ -81,7 +78,7 @@ $(TARGET)-syms: prelink.o xen.lds > > $(BASEDIR)/common/symbols-dummy.o > > $(@D)/.$(@F).1.o -o $@ > > rm -f $(@D)/.$(@F).[0-9]* > > > > -asm-offsets.s: asm-offsets.c > > +asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c > > $(CC) $(filter-out -flto,$(CFLAGS)) -S -o $@ $< > > > > xen.lds: xen.lds.S > > diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk > > index a45c654..f83bfee 100644 > > --- a/xen/arch/arm/Rules.mk > > +++ b/xen/arch/arm/Rules.mk > > @@ -12,16 +12,19 @@ CFLAGS += -fno-builtin -fno-common -Wredundant-decls > > CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe > > CFLAGS += -I$(BASEDIR)/include > > > > -# Prevent floating-point variables from creeping into Xen. > > -CFLAGS += -msoft-float > > - > > $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) > > $(call cc-option-add,CFLAGS,CC,-Wnested-externs) > > > > arm := y > > > > +ifeq ($(TARGET_SUBARCH),arm32) > > +# Prevent floating-point variables from creeping into Xen. > > +CFLAGS += -msoft-float > > +CFLAGS += -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp > > +arm32 := y > > +arm64 := n > > +endif > > + > > ifneq ($(call cc-option,$(CC),-fvisibility=hidden,n),n) > > CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE > > endif > > - > > -CFLAGS += -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp > > diff --git a/xen/arch/arm/arm32/Makefile b/xen/arch/arm/arm32/Makefile > > new file mode 100644 > > index 0000000..20931fa > > --- /dev/null > > +++ b/xen/arch/arm/arm32/Makefile > > @@ -0,0 +1,5 @@ > > +subdir-y += lib > > + > > +obj-y += entry.o > > +obj-y += mode_switch.o > > +obj-y += proc-ca15.o > > diff --git a/xen/arch/arm/asm-offsets.c b/xen/arch/arm/arm32/asm-offsets.c > > similarity index 100% > > rename from xen/arch/arm/asm-offsets.c > > rename to xen/arch/arm/arm32/asm-offsets.c > > diff --git a/xen/arch/arm/entry.S b/xen/arch/arm/arm32/entry.S > > similarity index 100% > > rename from xen/arch/arm/entry.S > > rename to xen/arch/arm/arm32/entry.S > > diff --git a/xen/arch/arm/head.S b/xen/arch/arm/arm32/head.S > > similarity index 100% > > rename from xen/arch/arm/head.S > > rename to xen/arch/arm/arm32/head.S > > diff --git a/xen/arch/arm/lib/Makefile b/xen/arch/arm/arm32/lib/Makefile > > similarity index 100% > > rename from xen/arch/arm/lib/Makefile > > rename to xen/arch/arm/arm32/lib/Makefile > > diff --git a/xen/arch/arm/lib/assembler.h > > b/xen/arch/arm/arm32/lib/assembler.h > > similarity index 100% > > rename from xen/arch/arm/lib/assembler.h > > rename to xen/arch/arm/arm32/lib/assembler.h > > diff --git a/xen/arch/arm/lib/bitops.h b/xen/arch/arm/arm32/lib/bitops.h > > similarity index 100% > > rename from xen/arch/arm/lib/bitops.h > > rename to xen/arch/arm/arm32/lib/bitops.h > > diff --git a/xen/arch/arm/lib/changebit.S > > b/xen/arch/arm/arm32/lib/changebit.S > > similarity index 100% > > rename from xen/arch/arm/lib/changebit.S > > rename to xen/arch/arm/arm32/lib/changebit.S > > diff --git a/xen/arch/arm/lib/clearbit.S b/xen/arch/arm/arm32/lib/clearbit.S > > similarity index 100% > > rename from xen/arch/arm/lib/clearbit.S > > rename to xen/arch/arm/arm32/lib/clearbit.S > > diff --git a/xen/arch/arm/lib/copy_template.S > > b/xen/arch/arm/arm32/lib/copy_template.S > > similarity index 100% > > rename from xen/arch/arm/lib/copy_template.S > > rename to xen/arch/arm/arm32/lib/copy_template.S > > diff --git a/xen/arch/arm/lib/div64.S b/xen/arch/arm/arm32/lib/div64.S > > similarity index 100% > > rename from xen/arch/arm/lib/div64.S > > rename to xen/arch/arm/arm32/lib/div64.S > > diff --git a/xen/arch/arm/lib/findbit.S b/xen/arch/arm/arm32/lib/findbit.S > > similarity index 100% > > rename from xen/arch/arm/lib/findbit.S > > rename to xen/arch/arm/arm32/lib/findbit.S > > diff --git a/xen/arch/arm/lib/lib1funcs.S > > b/xen/arch/arm/arm32/lib/lib1funcs.S > > similarity index 100% > > rename from xen/arch/arm/lib/lib1funcs.S > > rename to xen/arch/arm/arm32/lib/lib1funcs.S > > diff --git a/xen/arch/arm/lib/lshrdi3.S b/xen/arch/arm/arm32/lib/lshrdi3.S > > similarity index 100% > > rename from xen/arch/arm/lib/lshrdi3.S > > rename to xen/arch/arm/arm32/lib/lshrdi3.S > > diff --git a/xen/arch/arm/lib/memcpy.S b/xen/arch/arm/arm32/lib/memcpy.S > > similarity index 100% > > rename from xen/arch/arm/lib/memcpy.S > > rename to xen/arch/arm/arm32/lib/memcpy.S > > diff --git a/xen/arch/arm/lib/memmove.S b/xen/arch/arm/arm32/lib/memmove.S > > similarity index 100% > > rename from xen/arch/arm/lib/memmove.S > > rename to xen/arch/arm/arm32/lib/memmove.S > > diff --git a/xen/arch/arm/lib/memset.S b/xen/arch/arm/arm32/lib/memset.S > > similarity index 100% > > rename from xen/arch/arm/lib/memset.S > > rename to xen/arch/arm/arm32/lib/memset.S > > diff --git a/xen/arch/arm/lib/memzero.S b/xen/arch/arm/arm32/lib/memzero.S > > similarity index 100% > > rename from xen/arch/arm/lib/memzero.S > > rename to xen/arch/arm/arm32/lib/memzero.S > > diff --git a/xen/arch/arm/lib/setbit.S b/xen/arch/arm/arm32/lib/setbit.S > > similarity index 100% > > rename from xen/arch/arm/lib/setbit.S > > rename to xen/arch/arm/arm32/lib/setbit.S > > diff --git a/xen/arch/arm/lib/testchangebit.S > > b/xen/arch/arm/arm32/lib/testchangebit.S > > similarity index 100% > > rename from xen/arch/arm/lib/testchangebit.S > > rename to xen/arch/arm/arm32/lib/testchangebit.S > > diff --git a/xen/arch/arm/lib/testclearbit.S > > b/xen/arch/arm/arm32/lib/testclearbit.S > > similarity index 100% > > rename from xen/arch/arm/lib/testclearbit.S > > rename to xen/arch/arm/arm32/lib/testclearbit.S > > diff --git a/xen/arch/arm/lib/testsetbit.S > > b/xen/arch/arm/arm32/lib/testsetbit.S > > similarity index 100% > > rename from xen/arch/arm/lib/testsetbit.S > > rename to xen/arch/arm/arm32/lib/testsetbit.S > > diff --git a/xen/arch/arm/mode_switch.S b/xen/arch/arm/arm32/mode_switch.S > > similarity index 99% > > rename from xen/arch/arm/mode_switch.S > > rename to xen/arch/arm/arm32/mode_switch.S > > index 7c3b357..d550c33 100644 > > --- a/xen/arch/arm/mode_switch.S > > +++ b/xen/arch/arm/arm32/mode_switch.S > > @@ -21,7 +21,7 @@ > > #include <asm/page.h> > > #include <asm/platform_vexpress.h> > > #include <asm/asm_defns.h> > > -#include "gic.h" > > +#include <asm/gic.h> > > > > > > /* XXX: Versatile Express specific code */ > > diff --git a/xen/arch/arm/proc-ca15.S b/xen/arch/arm/arm32/proc-ca15.S > > similarity index 100% > > rename from xen/arch/arm/proc-ca15.S > > rename to xen/arch/arm/arm32/proc-ca15.S > > diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c > > index c5292c7..0875045 100644 > > --- a/xen/arch/arm/domain.c > > +++ b/xen/arch/arm/domain.c > > @@ -12,7 +12,7 @@ > > #include <asm/p2m.h> > > #include <asm/irq.h> > > > > -#include "gic.h" > > +#include <asm/gic.h> > > #include "vtimer.h" > > #include "vpl011.h" > > > > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > > index a9e7f43..aac92b3 100644 > > --- a/xen/arch/arm/domain_build.c > > +++ b/xen/arch/arm/domain_build.c > > @@ -11,7 +11,7 @@ > > #include <xen/libfdt/libfdt.h> > > #include <xen/guest_access.h> > > > > -#include "gic.h" > > +#include <asm/gic.h> > > #include "kernel.h" > > > > static unsigned int __initdata opt_dom0_max_vcpus; > > diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c > > index 0c6fab9..41824c9 100644 > > --- a/xen/arch/arm/gic.c > > +++ b/xen/arch/arm/gic.c > > @@ -29,7 +29,7 @@ > > #include <asm/p2m.h> > > #include <asm/domain.h> > > > > -#include "gic.h" > > +#include <asm/gic.h> > > > > /* Access to the GIC Distributor registers through the fixmap */ > > #define GICD ((volatile uint32_t *) FIXMAP_ADDR(FIXMAP_GICD)) > > diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c > > index 72e83e6..c141d81 100644 > > --- a/xen/arch/arm/irq.c > > +++ b/xen/arch/arm/irq.c > > @@ -25,7 +25,7 @@ > > #include <xen/errno.h> > > #include <xen/sched.h> > > > > -#include "gic.h" > > +#include <asm/gic.h> > > > > static void enable_none(struct irq_desc *irq) { } > > static unsigned int startup_none(struct irq_desc *irq) { return 0; } > > diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c > > index 7ae4515..852f0d8 100644 > > --- a/xen/arch/arm/p2m.c > > +++ b/xen/arch/arm/p2m.c > > @@ -4,7 +4,7 @@ > > #include <xen/errno.h> > > #include <xen/domain_page.h> > > #include <asm/flushtlb.h> > > -#include "gic.h" > > +#include <asm/gic.h> > > > > void dump_p2m_lookup(struct domain *d, paddr_t addr) > > { > > diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c > > index 2076724..8f85ae6 100644 > > --- a/xen/arch/arm/setup.c > > +++ b/xen/arch/arm/setup.c > > @@ -39,7 +39,7 @@ > > #include <asm/setup.h> > > #include <asm/vfp.h> > > #include <asm/early_printk.h> > > -#include "gic.h" > > +#include <asm/gic.h> > > > > static __used void init_done(void) > > { > > diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c > > index 6555ac6..7b6ffa0 100644 > > --- a/xen/arch/arm/smpboot.c > > +++ b/xen/arch/arm/smpboot.c > > @@ -29,7 +29,7 @@ > > #include <xen/timer.h> > > #include <xen/irq.h> > > #include <asm/vfp.h> > > -#include "gic.h" > > +#include <asm/gic.h> > > > > cpumask_t cpu_online_map; > > EXPORT_SYMBOL(cpu_online_map); > > diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c > > index 19e2081..d01ff6d 100644 > > --- a/xen/arch/arm/traps.c > > +++ b/xen/arch/arm/traps.c > > @@ -35,7 +35,7 @@ > > > > #include "io.h" > > #include "vtimer.h" > > -#include "gic.h" > > +#include <asm/gic.h> > > > > /* The base of the stack must always be double-word aligned, which means > > * that both the kernel half of struct cpu_user_regs (which is pushed in > > diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c > > index 3f7e757..7d1a5ad 100644 > > --- a/xen/arch/arm/vgic.c > > +++ b/xen/arch/arm/vgic.c > > @@ -27,7 +27,7 @@ > > #include <asm/current.h> > > > > #include "io.h" > > -#include "gic.h" > > +#include <asm/gic.h> > > > > #define VGIC_DISTR_BASE_ADDRESS 0x000000002c001000 > > > > diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c > > index 490b021..1c45f4a 100644 > > --- a/xen/arch/arm/vtimer.c > > +++ b/xen/arch/arm/vtimer.c > > @@ -21,7 +21,7 @@ > > #include <xen/lib.h> > > #include <xen/timer.h> > > #include <xen/sched.h> > > -#include "gic.h" > > +#include <asm/gic.h> > > > > extern s_time_t ticks_to_ns(uint64_t ticks); > > extern uint64_t ns_to_ticks(s_time_t ns); > > diff --git a/xen/arch/arm/gic.h b/xen/include/asm-arm/gic.h > > similarity index 98% > > rename from xen/arch/arm/gic.h > > rename to xen/include/asm-arm/gic.h > > index 1bf1b02..bf30fbd 100644 > > --- a/xen/arch/arm/gic.h > > +++ b/xen/include/asm-arm/gic.h > > @@ -1,6 +1,4 @@ > > /* > > - * xen/arch/arm/gic.h > > - * > > * ARM Generic Interrupt Controller support > > * > > * Tim Deegan <tim@xxxxxxx> > > @@ -17,8 +15,8 @@ > > * GNU General Public License for more details. > > */ > > > > -#ifndef __ARCH_ARM_GIC_H__ > > -#define __ARCH_ARM_GIC_H__ > > +#ifndef __ASM_ARM_GIC_H__ > > +#define __ASM_ARM_GIC_H__ > > > > #define GICD_CTLR (0x000/4) > > #define GICD_TYPER (0x004/4) > > -- > > 1.7.2.5 > > > > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |