Message ID | 1369930713-6063-1-git-send-email-stefano.stabellini@eu.citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, May 30, 2013 at 05:18:28PM +0100, Stefano Stabellini wrote: > Most of Xen support for ARM is common between ARMv7 and ARMv8. > Create links to the code under arch/arm (bleah). > > Other, probably better alternatives: > > - move the code to a different location, maybe the header files to > include/xen/arm and the code to drivers/xen/arm (still pretty ugly)? > > - create a copy of the code to arch/arm64 (even worse); KVM handles this in the Makefile by referencing back to arch/arm or even the generic kvm directory. I think that's the 'cleanest' ;)
On Fri, 31 May 2013, Catalin Marinas wrote: > On Thu, May 30, 2013 at 05:18:28PM +0100, Stefano Stabellini wrote: > > Most of Xen support for ARM is common between ARMv7 and ARMv8. > > Create links to the code under arch/arm (bleah). > > > > Other, probably better alternatives: > > > > - move the code to a different location, maybe the header files to > > include/xen/arm and the code to drivers/xen/arm (still pretty ugly)? > > > > - create a copy of the code to arch/arm64 (even worse); > > KVM handles this in the Makefile by referencing back to arch/arm or even > the generic kvm directory. I think that's the 'cleanest' ;) Do you mean creating links in the Makefile or generating header file copies from the Makefile? Or do you mean using something like "-I arch/arm/include/asm/xen" in the arch/arm64 Makefile? I tried to find exactly what KVM is doing but I couldn't find the code you are talking about..
On Fri, May 31, 2013 at 01:02:04PM +0100, Stefano Stabellini wrote: > On Fri, 31 May 2013, Catalin Marinas wrote: > > On Thu, May 30, 2013 at 05:18:28PM +0100, Stefano Stabellini wrote: > > > Most of Xen support for ARM is common between ARMv7 and ARMv8. > > > Create links to the code under arch/arm (bleah). > > > > > > Other, probably better alternatives: > > > > > > - move the code to a different location, maybe the header files to > > > include/xen/arm and the code to drivers/xen/arm (still pretty ugly)? > > > > > > - create a copy of the code to arch/arm64 (even worse); > > > > KVM handles this in the Makefile by referencing back to arch/arm or even > > the generic kvm directory. I think that's the 'cleanest' ;) > > Do you mean creating links in the Makefile or generating header file > copies from the Makefile? > Or do you mean using something like "-I arch/arm/include/asm/xen" in the > arch/arm64 Makefile? I meant C files being compiled directly from arch/arm (no links). For headers, if they are specific to arm or arm64, just copy the header in each place (e.g. not using regs->pstate in the arch/arm code with #ifdef's). For the rest, if they cannot be made generic, one way is to have a dummy file including the arm equivalent: #include <../../arm/include/asm/xen/events.h> Passing -I is dangerous as you actually need "-I arch/arm/include" which could bring other files.
On Fri, 31 May 2013, Catalin Marinas wrote: > On Fri, May 31, 2013 at 01:02:04PM +0100, Stefano Stabellini wrote: > > On Fri, 31 May 2013, Catalin Marinas wrote: > > > On Thu, May 30, 2013 at 05:18:28PM +0100, Stefano Stabellini wrote: > > > > Most of Xen support for ARM is common between ARMv7 and ARMv8. > > > > Create links to the code under arch/arm (bleah). > > > > > > > > Other, probably better alternatives: > > > > > > > > - move the code to a different location, maybe the header files to > > > > include/xen/arm and the code to drivers/xen/arm (still pretty ugly)? > > > > > > > > - create a copy of the code to arch/arm64 (even worse); > > > > > > KVM handles this in the Makefile by referencing back to arch/arm or even > > > the generic kvm directory. I think that's the 'cleanest' ;) > > > > Do you mean creating links in the Makefile or generating header file > > copies from the Makefile? > > Or do you mean using something like "-I arch/arm/include/asm/xen" in the > > arch/arm64 Makefile? > > I meant C files being compiled directly from arch/arm (no links). OK. > For headers, if they are specific to arm or arm64, just copy the header > in each place (e.g. not using regs->pstate in the arch/arm code with > #ifdef's). For the rest, if they cannot be made generic, one way is to > have a dummy file including the arm equivalent: > > #include <../../arm/include/asm/xen/events.h> > > Passing -I is dangerous as you actually need "-I arch/arm/include" which > could bring other files. Thanks, that is a good idea, I'll do that.
diff --git a/arch/arm64/include/asm/xen b/arch/arm64/include/asm/xen new file mode 120000 index 0000000..c27d6980 --- /dev/null +++ b/arch/arm64/include/asm/xen @@ -0,0 +1 @@ +../../../arm/include/asm/xen \ No newline at end of file diff --git a/arch/arm64/xen/enlighten.c b/arch/arm64/xen/enlighten.c new file mode 120000 index 0000000..cb31b7c --- /dev/null +++ b/arch/arm64/xen/enlighten.c @@ -0,0 +1 @@ +../../arm/xen/enlighten.c \ No newline at end of file diff --git a/arch/arm64/xen/grant-table.c b/arch/arm64/xen/grant-table.c new file mode 120000 index 0000000..5494f6c --- /dev/null +++ b/arch/arm64/xen/grant-table.c @@ -0,0 +1 @@ +../../arm/xen/grant-table.c
Most of Xen support for ARM is common between ARMv7 and ARMv8. Create links to the code under arch/arm (bleah). Other, probably better alternatives: - move the code to a different location, maybe the header files to include/xen/arm and the code to drivers/xen/arm (still pretty ugly)? - create a copy of the code to arch/arm64 (even worse); Please advice on how you would like me to move forward on this. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- arch/arm64/include/asm/xen | 1 + arch/arm64/xen/enlighten.c | 1 + arch/arm64/xen/grant-table.c | 1 + 3 files changed, 3 insertions(+), 0 deletions(-) create mode 120000 arch/arm64/include/asm/xen create mode 120000 arch/arm64/xen/enlighten.c create mode 120000 arch/arm64/xen/grant-table.c \ No newline at end of file