* [PATCH 00/28] RFC: ia64/xen domU paravirtualization @ 2008-02-22 5:10 Isaku Yamahata 2008-02-22 5:10 ` [PATCH 03/28] ia64/xen: increase IA64_MAX_RSVD_REGIONS Isaku Yamahata 2008-02-22 5:10 ` [PATCH 04/28] ia64/xen: introduce synch bitops which is necessary for ia64/xen support Isaku Yamahata 0 siblings, 2 replies; 12+ messages in thread From: Isaku Yamahata @ 2008-02-22 5:10 UTC (permalink / raw) To: linux-ia64 Hi linux/ia64 developers. Few days before Eddie posted the mail for Linux/IA64 paravirtualization. But only a few responded partially because there was no reviewable patches. Here is the patches for xen/ia64 Linux paravirtualization. The goal is to merge IA64 xen Linux paravirtualization for both domU and dom0 eventually. However the first step is to merge domU portion. As you can see from the current patchset, abstraction and many clean up must be done before merge. Before starting cleaning up, we want to discuss with linux ia64 developers. Please comment. Especially the first blocker is the paravirtualization of the hand written assembly code as Eddie already tried to discuss. The corresponding patch is "ia64/xen: xen hand written assembly code paravirtualization." This patchset depends on another patchset which I sent out as "Xen arch portability patches." thansk, Diffstat: arch/ia64/Kconfig | 76 + arch/ia64/Makefile | 12 +- arch/ia64/configs/xen_domu_wip_defconfig | 854 ++++++++++++ arch/ia64/kernel/Makefile | 63 + arch/ia64/kernel/acpi.c | 6 + arch/ia64/kernel/asm-offsets.c | 25 + arch/ia64/kernel/entry.S | 41 +- arch/ia64/kernel/fsys.S | 41 + arch/ia64/kernel/gate.S | 55 + arch/ia64/kernel/gate.lds.S | 18 + arch/ia64/kernel/head.S | 6 + arch/ia64/kernel/iosapic.c | 89 ++- arch/ia64/kernel/irq_ia64.c | 363 +++++- arch/ia64/kernel/mca.c | 22 + arch/ia64/kernel/module.c | 32 + arch/ia64/kernel/pal.S | 5 +- arch/ia64/kernel/paravirt_alt.c | 118 ++ arch/ia64/kernel/paravirt_core.c | 201 +++ arch/ia64/kernel/paravirt_entry.c | 99 ++ arch/ia64/kernel/paravirt_nop.c | 49 + arch/ia64/kernel/paravirtentry.S | 37 + arch/ia64/kernel/patch.c | 28 + arch/ia64/kernel/salinfo.c | 44 + arch/ia64/kernel/setup.c | 121 ++ arch/ia64/kernel/smpboot.c | 4 + arch/ia64/kernel/time.c | 204 +++ arch/ia64/kernel/vmlinux.lds.S | 41 + arch/ia64/kernel/xengate-data.S | 3 + arch/ia64/mm/init.c | 22 +- arch/ia64/xen/Kconfig | 29 + arch/ia64/xen/Makefile | 11 + arch/ia64/xen/hypercall.S | 141 ++ arch/ia64/xen/hypervisor.c | 228 +++ arch/ia64/xen/machvec.c | 4 + arch/ia64/xen/paravirt_xen.c | 242 ++++ arch/ia64/xen/privops_asm.S | 221 +++ arch/ia64/xen/privops_c.c | 279 ++++ arch/ia64/xen/util.c | 101 ++ arch/ia64/xen/xcom_asm.S | 27 + arch/ia64/xen/xcom_hcall.c | 458 +++++++ arch/ia64/xen/xencomm.c | 108 ++ arch/ia64/xen/xenentry.S | 798 +++++++++++ arch/ia64/xen/xenivt.S | 2204 ++++++++++++++++++++++++++++++ arch/ia64/xen/xenminstate.h | 320 +++++ arch/ia64/xen/xenpal.S | 76 + arch/ia64/xen/xensetup.S | 50 + include/asm-ia64/gcc_intrin.h | 58 +- include/asm-ia64/hw_irq.h | 10 + include/asm-ia64/intel_intrin.h | 64 +- include/asm-ia64/intrinsics.h | 12 + include/asm-ia64/iosapic.h | 2 + include/asm-ia64/irq.h | 33 + include/asm-ia64/machvec.h | 2 + include/asm-ia64/machvec_xen.h | 22 + include/asm-ia64/meminit.h | 7 + include/asm-ia64/mmu_context.h | 6 +- include/asm-ia64/module.h | 6 + include/asm-ia64/page.h | 11 + include/asm-ia64/paravirt_alt.h | 82 ++ include/asm-ia64/paravirt_core.h | 54 + include/asm-ia64/paravirt_entry.h | 62 + include/asm-ia64/paravirt_nop.h | 46 + include/asm-ia64/privop.h | 67 + include/asm-ia64/privop_paravirt.h | 587 ++++++++ include/asm-ia64/sal.h | 36 + include/asm-ia64/sync_bitops.h | 61 + include/asm-ia64/system.h | 4 +- include/asm-ia64/xen/hypercall.h | 426 ++++++ include/asm-ia64/xen/hypervisor.h | 249 ++++ include/asm-ia64/xen/interface.h | 686 ++++++++++ include/asm-ia64/xen/page.h | 19 + include/asm-ia64/xen/privop.h | 609 +++++++++ include/asm-ia64/xen/xcom_hcall.h | 55 + include/asm-ia64/xen/xencomm.h | 33 + 74 files changed, 11190 insertions(+), 95 deletions(-) ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 03/28] ia64/xen: increase IA64_MAX_RSVD_REGIONS. @ 2008-02-22 5:10 ` Isaku Yamahata 2008-02-22 5:33 ` Robin Holt ` (3 more replies) 0 siblings, 4 replies; 12+ messages in thread From: Isaku Yamahata @ 2008-02-22 5:10 UTC (permalink / raw) To: linux-ia64 Xenlinux/ia64 needs to reserve one more region passed from xen hypervisor as start info. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> --- include/asm-ia64/meminit.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h index f93308f..7c12c08 100644 --- a/include/asm-ia64/meminit.h +++ b/include/asm-ia64/meminit.h @@ -18,10 +18,17 @@ * - crash dumping code reserved region * - Kernel memory map built from EFI memory map * - ELF core header + * ifdef CONFIG_XEN + * - xen start info + * endif * * More could be added if necessary */ +#ifdef CONFIG_XEN #define IA64_MAX_RSVD_REGIONS 8 +#else +#define IA64_MAX_RSVD_REGIONS 9 +#endif struct rsvd_region { unsigned long start; /* virtual address of beginning of element */ -- 1.5.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 03/28] ia64/xen: increase IA64_MAX_RSVD_REGIONS. 2008-02-22 5:10 ` [PATCH 03/28] ia64/xen: increase IA64_MAX_RSVD_REGIONS Isaku Yamahata @ 2008-02-22 5:33 ` Robin Holt 2008-02-22 6:02 ` Isaku Yamahata 2008-02-22 6:02 ` Isaku Yamahata ` (2 subsequent siblings) 3 siblings, 1 reply; 12+ messages in thread From: Robin Holt @ 2008-02-22 5:33 UTC (permalink / raw) To: linux-ia64 On Fri, Feb 22, 2008 at 02:10:19PM +0900, Isaku Yamahata wrote: > Xenlinux/ia64 needs to reserve one more region passed from xen hypervisor > as start info. > > Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> > --- > include/asm-ia64/meminit.h | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h > index f93308f..7c12c08 100644 > --- a/include/asm-ia64/meminit.h > +++ b/include/asm-ia64/meminit.h > @@ -18,10 +18,17 @@ > * - crash dumping code reserved region > * - Kernel memory map built from EFI memory map > * - ELF core header > + * ifdef CONFIG_XEN > + * - xen start info > + * endif > * > * More could be added if necessary > */ > +#ifdef CONFIG_XEN > #define IA64_MAX_RSVD_REGIONS 8 > +#else > +#define IA64_MAX_RSVD_REGIONS 9 > +#endif This one seems upside down to me. You are saying there is an additional region when CONFIG_XEN, but you are defining it larger for !CONFIG_XEN. I concede the point that I know nothing about Xen, so please straighten me out here. Thanks, Robin ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 03/28] ia64/xen: increase IA64_MAX_RSVD_REGIONS. 2008-02-22 5:33 ` Robin Holt @ 2008-02-22 6:02 ` Isaku Yamahata 0 siblings, 0 replies; 12+ messages in thread From: Isaku Yamahata @ 2008-02-22 6:02 UTC (permalink / raw) To: Robin Holt; +Cc: virtualization, linux-ia64, xen-ia64-devel On Thu, Feb 21, 2008 at 11:33:16PM -0600, Robin Holt wrote: > On Fri, Feb 22, 2008 at 02:10:19PM +0900, Isaku Yamahata wrote: > > Xenlinux/ia64 needs to reserve one more region passed from xen hypervisor > > as start info. > > > > Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> > > --- > > include/asm-ia64/meminit.h | 7 +++++++ > > 1 files changed, 7 insertions(+), 0 deletions(-) > > > > diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h > > index f93308f..7c12c08 100644 > > --- a/include/asm-ia64/meminit.h > > +++ b/include/asm-ia64/meminit.h > > @@ -18,10 +18,17 @@ > > * - crash dumping code reserved region > > * - Kernel memory map built from EFI memory map > > * - ELF core header > > + * ifdef CONFIG_XEN > > + * - xen start info > > + * endif > > * > > * More could be added if necessary > > */ > > +#ifdef CONFIG_XEN > > #define IA64_MAX_RSVD_REGIONS 8 > > +#else > > +#define IA64_MAX_RSVD_REGIONS 9 > > +#endif > > This one seems upside down to me. You are saying there is an additional > region when CONFIG_XEN, but you are defining it larger for !CONFIG_XEN. > I concede the point that I know nothing about Xen, so please straighten > me out here. Thank you for review. You're absolutely correct. --- ia64/xen: increase IA64_MAX_RSVD_REGIONS. Xenlinux/ia64 needs to reserve one more region passed from xen hypervisor as start info. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> --- include/asm-ia64/meminit.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h index f93308f..3de9c74 100644 --- a/include/asm-ia64/meminit.h +++ b/include/asm-ia64/meminit.h @@ -18,10 +18,17 @@ * - crash dumping code reserved region * - Kernel memory map built from EFI memory map * - ELF core header + * ifdef CONFIG_XEN + * - xen start info + * endif * * More could be added if necessary */ +#ifndef CONFIG_XEN #define IA64_MAX_RSVD_REGIONS 8 +#else +#define IA64_MAX_RSVD_REGIONS 9 +#endif struct rsvd_region { unsigned long start; /* virtual address of beginning of element */ -- 1.5.3 -- yamahata ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 03/28] ia64/xen: increase IA64_MAX_RSVD_REGIONS. 2008-02-22 5:10 ` [PATCH 03/28] ia64/xen: increase IA64_MAX_RSVD_REGIONS Isaku Yamahata 2008-02-22 5:33 ` Robin Holt @ 2008-02-22 6:02 ` Isaku Yamahata 2008-02-25 17:18 ` Bjorn Helgaas 2008-02-26 1:57 ` Isaku Yamahata 3 siblings, 0 replies; 12+ messages in thread From: Isaku Yamahata @ 2008-02-22 6:02 UTC (permalink / raw) To: linux-ia64 On Thu, Feb 21, 2008 at 11:33:16PM -0600, Robin Holt wrote: > On Fri, Feb 22, 2008 at 02:10:19PM +0900, Isaku Yamahata wrote: > > Xenlinux/ia64 needs to reserve one more region passed from xen hypervisor > > as start info. > > > > Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> > > --- > > include/asm-ia64/meminit.h | 7 +++++++ > > 1 files changed, 7 insertions(+), 0 deletions(-) > > > > diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h > > index f93308f..7c12c08 100644 > > --- a/include/asm-ia64/meminit.h > > +++ b/include/asm-ia64/meminit.h > > @@ -18,10 +18,17 @@ > > * - crash dumping code reserved region > > * - Kernel memory map built from EFI memory map > > * - ELF core header > > + * ifdef CONFIG_XEN > > + * - xen start info > > + * endif > > * > > * More could be added if necessary > > */ > > +#ifdef CONFIG_XEN > > #define IA64_MAX_RSVD_REGIONS 8 > > +#else > > +#define IA64_MAX_RSVD_REGIONS 9 > > +#endif > > This one seems upside down to me. You are saying there is an additional > region when CONFIG_XEN, but you are defining it larger for !CONFIG_XEN. > I concede the point that I know nothing about Xen, so please straighten > me out here. Thank you for review. You're absolutely correct. --- ia64/xen: increase IA64_MAX_RSVD_REGIONS. Xenlinux/ia64 needs to reserve one more region passed from xen hypervisor as start info. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> --- include/asm-ia64/meminit.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h index f93308f..3de9c74 100644 --- a/include/asm-ia64/meminit.h +++ b/include/asm-ia64/meminit.h @@ -18,10 +18,17 @@ * - crash dumping code reserved region * - Kernel memory map built from EFI memory map * - ELF core header + * ifdef CONFIG_XEN + * - xen start info + * endif * * More could be added if necessary */ +#ifndef CONFIG_XEN #define IA64_MAX_RSVD_REGIONS 8 +#else +#define IA64_MAX_RSVD_REGIONS 9 +#endif struct rsvd_region { unsigned long start; /* virtual address of beginning of element */ -- 1.5.3 -- yamahata ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 03/28] ia64/xen: increase IA64_MAX_RSVD_REGIONS. 2008-02-22 5:10 ` [PATCH 03/28] ia64/xen: increase IA64_MAX_RSVD_REGIONS Isaku Yamahata 2008-02-22 5:33 ` Robin Holt 2008-02-22 6:02 ` Isaku Yamahata @ 2008-02-25 17:18 ` Bjorn Helgaas 2008-02-26 1:57 ` Isaku Yamahata 3 siblings, 0 replies; 12+ messages in thread From: Bjorn Helgaas @ 2008-02-25 17:18 UTC (permalink / raw) To: linux-ia64 On Thursday 21 February 2008 10:10:19 pm Isaku Yamahata wrote: > Xenlinux/ia64 needs to reserve one more region passed from xen hypervisor > as start info. I don't think it's really worth adding an ifdef here to save one struct rsvd_region (two longs). Why not just increase IA64_MAX_RSVD_REGIONS to 9 for everybody, and get rid of the ifdef? > +#ifdef CONFIG_XEN > #define IA64_MAX_RSVD_REGIONS 8 > +#else > +#define IA64_MAX_RSVD_REGIONS 9 > +#endif > > struct rsvd_region { > unsigned long start; /* virtual address of beginning of element */ ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 03/28] ia64/xen: increase IA64_MAX_RSVD_REGIONS. 2008-02-22 5:10 ` [PATCH 03/28] ia64/xen: increase IA64_MAX_RSVD_REGIONS Isaku Yamahata ` (2 preceding siblings ...) 2008-02-25 17:18 ` Bjorn Helgaas @ 2008-02-26 1:57 ` Isaku Yamahata 3 siblings, 0 replies; 12+ messages in thread From: Isaku Yamahata @ 2008-02-26 1:57 UTC (permalink / raw) To: linux-ia64 On Mon, Feb 25, 2008 at 10:18:52AM -0700, Bjorn Helgaas wrote: > On Thursday 21 February 2008 10:10:19 pm Isaku Yamahata wrote: > > Xenlinux/ia64 needs to reserve one more region passed from xen hypervisor > > as start info. > > I don't think it's really worth adding an ifdef here to save > one struct rsvd_region (two longs). Why not just increase > IA64_MAX_RSVD_REGIONS to 9 for everybody, and get rid of the > ifdef? Thank you for comment. It works for me. ia64/xen: increase IA64_MAX_RSVD_REGIONS. Xenlinux/ia64 needs to reserve one more region passed from xen hypervisor as start info. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> --- include/asm-ia64/meminit.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h index f93308f..8de94e2 100644 --- a/include/asm-ia64/meminit.h +++ b/include/asm-ia64/meminit.h @@ -18,10 +18,11 @@ * - crash dumping code reserved region * - Kernel memory map built from EFI memory map * - ELF core header + * - xen start info if CONFIG_XEN * * More could be added if necessary */ -#define IA64_MAX_RSVD_REGIONS 8 +#define IA64_MAX_RSVD_REGIONS 9 struct rsvd_region { unsigned long start; /* virtual address of beginning of element */ -- 1.5.3 -- yamahata ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 04/28] ia64/xen: introduce synch bitops which is necessary for ia64/xen support. @ 2008-02-22 5:10 ` Isaku Yamahata 2008-02-22 5:42 ` [PATCH 04/28] ia64/xen: introduce synch bitops which is Robin Holt 2008-02-22 6:13 ` Isaku Yamahata 0 siblings, 2 replies; 12+ messages in thread From: Isaku Yamahata @ 2008-02-22 5:10 UTC (permalink / raw) To: linux-ia64 Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> --- include/asm-ia64/sync_bitops.h | 61 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 61 insertions(+), 0 deletions(-) create mode 100644 include/asm-ia64/sync_bitops.h diff --git a/include/asm-ia64/sync_bitops.h b/include/asm-ia64/sync_bitops.h new file mode 100644 index 0000000..dc402be --- /dev/null +++ b/include/asm-ia64/sync_bitops.h @@ -0,0 +1,61 @@ +#ifndef __XEN_SYNC_BITOPS_H__ +#define __XEN_SYNC_BITOPS_H__ + +/* + * Copyright 1992, Linus Torvalds. + * Heavily modified to provide guaranteed strong synchronisation + * when communicating with Xen or other guest OSes running on other CPUs. + */ + +#define ADDR (*(volatile long *) addr) + +static inline void sync_set_bit(int nr, volatile void *addr) +{ + set_bit(nr, addr); +} + +static inline void sync_clear_bit(int nr, volatile void *addr) +{ + clear_bit(nr, addr); +} + +static inline void sync_change_bit(int nr, volatile void *addr) +{ + change_bit(nr, addr); +} + +static inline int sync_test_and_set_bit(int nr, volatile void *addr) +{ + return test_and_set_bit(nr, addr); +} + +static inline int sync_test_and_clear_bit(int nr, volatile void *addr) +{ + return test_and_clear_bit(nr, addr); +} + +static inline int sync_test_and_change_bit(int nr, volatile void *addr) +{ + return test_and_change_bit(nr, addr); +} + +static inline int sync_const_test_bit(int nr, const volatile void *addr) +{ + return test_bit(nr, addr); +} + +static inline int sync_var_test_bit(int nr, volatile void *addr) +{ + return test_bit(nr, addr); +} + +#define sync_cmpxchg ia64_cmpxchg4_acq + +#define sync_test_bit(nr,addr) \ + (__builtin_constant_p(nr) ? \ + sync_const_test_bit((nr), (addr)) : \ + sync_var_test_bit((nr), (addr))) + +#define sync_cmpxchg_subword sync_cmpxchg + +#endif /* __XEN_SYNC_BITOPS_H__ */ -- 1.5.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 04/28] ia64/xen: introduce synch bitops which is 2008-02-22 5:10 ` [PATCH 04/28] ia64/xen: introduce synch bitops which is necessary for ia64/xen support Isaku Yamahata @ 2008-02-22 5:42 ` Robin Holt 2008-02-22 6:13 ` [PATCH 04/28] ia64/xen: introduce synch bitops which is necessary for ia64/xen support Isaku Yamahata 2008-02-22 6:13 ` Isaku Yamahata 1 sibling, 1 reply; 12+ messages in thread From: Robin Holt @ 2008-02-22 5:42 UTC (permalink / raw) To: linux-ia64 On Fri, Feb 22, 2008 at 02:10:20PM +0900, Isaku Yamahata wrote: ... > --- /dev/null > +++ b/include/asm-ia64/sync_bitops.h > @@ -0,0 +1,61 @@ > +#ifndef __XEN_SYNC_BITOPS_H__ > +#define __XEN_SYNC_BITOPS_H__ Typically, these #defines are made to match the filename. ... > +#define ADDR (*(volatile long *) addr) This seems like a leftover #define. Additionally, ADDR seems a bit vague and easily misused. Since I don't see it used anywhere else in that patch, I will assume it should be tossed, but reserve the right to rescind this comment later. ... > +#endif /* __XEN_SYNC_BITOPS_H__ */ Same as the first. Thanks, Robin ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 04/28] ia64/xen: introduce synch bitops which is necessary for ia64/xen support. 2008-02-22 5:42 ` [PATCH 04/28] ia64/xen: introduce synch bitops which is Robin Holt @ 2008-02-22 6:13 ` Isaku Yamahata 0 siblings, 0 replies; 12+ messages in thread From: Isaku Yamahata @ 2008-02-22 6:13 UTC (permalink / raw) To: Robin Holt; +Cc: xen-ia64-devel, linux-ia64, virtualization On Thu, Feb 21, 2008 at 11:42:28PM -0600, Robin Holt wrote: > > +#define ADDR (*(volatile long *) addr) > > This seems like a leftover #define. Additionally, ADDR seems a bit > vague and easily misused. Since I don't see it used anywhere else in > that patch, I will assume it should be tossed, but reserve the right to > rescind this comment later. It's a leftover from i386 version so that I eliminated it. ia64/xen: introduce synch bitops which is necessary for ia64/xen support. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> --- include/asm-ia64/sync_bitops.h | 59 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 59 insertions(+), 0 deletions(-) create mode 100644 include/asm-ia64/sync_bitops.h diff --git a/include/asm-ia64/sync_bitops.h b/include/asm-ia64/sync_bitops.h new file mode 100644 index 0000000..f56cd90 --- /dev/null +++ b/include/asm-ia64/sync_bitops.h @@ -0,0 +1,59 @@ +#ifndef _ASM_IA64_SYNC_BITOPS_H +#define _ASM_IA64_SYNC_BITOPS_H + +/* + * Copyright 1992, Linus Torvalds. + * Heavily modified to provide guaranteed strong synchronisation + * when communicating with Xen or other guest OSes running on other CPUs. + */ + +static inline void sync_set_bit(int nr, volatile void *addr) +{ + set_bit(nr, addr); +} + +static inline void sync_clear_bit(int nr, volatile void *addr) +{ + clear_bit(nr, addr); +} + +static inline void sync_change_bit(int nr, volatile void *addr) +{ + change_bit(nr, addr); +} + +static inline int sync_test_and_set_bit(int nr, volatile void *addr) +{ + return test_and_set_bit(nr, addr); +} + +static inline int sync_test_and_clear_bit(int nr, volatile void *addr) +{ + return test_and_clear_bit(nr, addr); +} + +static inline int sync_test_and_change_bit(int nr, volatile void *addr) +{ + return test_and_change_bit(nr, addr); +} + +static inline int sync_const_test_bit(int nr, const volatile void *addr) +{ + return test_bit(nr, addr); +} + +static inline int sync_var_test_bit(int nr, volatile void *addr) +{ + return test_bit(nr, addr); +} + +#define sync_cmpxchg ia64_cmpxchg4_acq + +#define sync_test_bit(nr,addr) \ + (__builtin_constant_p(nr) ? \ + sync_const_test_bit((nr), (addr)) : \ + sync_var_test_bit((nr), (addr))) + +#define sync_cmpxchg_subword sync_cmpxchg + +#endif /* _ASM_IA64_SYNC_BITOPS_H */ -- 1.5.3 -- yamahata ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 04/28] ia64/xen: introduce synch bitops which is necessary for ia64/xen support. 2008-02-22 5:10 ` [PATCH 04/28] ia64/xen: introduce synch bitops which is necessary for ia64/xen support Isaku Yamahata 2008-02-22 5:42 ` [PATCH 04/28] ia64/xen: introduce synch bitops which is Robin Holt @ 2008-02-22 6:13 ` Isaku Yamahata 1 sibling, 0 replies; 12+ messages in thread From: Isaku Yamahata @ 2008-02-22 6:13 UTC (permalink / raw) To: linux-ia64 On Thu, Feb 21, 2008 at 11:42:28PM -0600, Robin Holt wrote: > > +#define ADDR (*(volatile long *) addr) > > This seems like a leftover #define. Additionally, ADDR seems a bit > vague and easily misused. Since I don't see it used anywhere else in > that patch, I will assume it should be tossed, but reserve the right to > rescind this comment later. It's a leftover from i386 version so that I eliminated it. ia64/xen: introduce synch bitops which is necessary for ia64/xen support. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> --- include/asm-ia64/sync_bitops.h | 59 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 59 insertions(+), 0 deletions(-) create mode 100644 include/asm-ia64/sync_bitops.h diff --git a/include/asm-ia64/sync_bitops.h b/include/asm-ia64/sync_bitops.h new file mode 100644 index 0000000..f56cd90 --- /dev/null +++ b/include/asm-ia64/sync_bitops.h @@ -0,0 +1,59 @@ +#ifndef _ASM_IA64_SYNC_BITOPS_H +#define _ASM_IA64_SYNC_BITOPS_H + +/* + * Copyright 1992, Linus Torvalds. + * Heavily modified to provide guaranteed strong synchronisation + * when communicating with Xen or other guest OSes running on other CPUs. + */ + +static inline void sync_set_bit(int nr, volatile void *addr) +{ + set_bit(nr, addr); +} + +static inline void sync_clear_bit(int nr, volatile void *addr) +{ + clear_bit(nr, addr); +} + +static inline void sync_change_bit(int nr, volatile void *addr) +{ + change_bit(nr, addr); +} + +static inline int sync_test_and_set_bit(int nr, volatile void *addr) +{ + return test_and_set_bit(nr, addr); +} + +static inline int sync_test_and_clear_bit(int nr, volatile void *addr) +{ + return test_and_clear_bit(nr, addr); +} + +static inline int sync_test_and_change_bit(int nr, volatile void *addr) +{ + return test_and_change_bit(nr, addr); +} + +static inline int sync_const_test_bit(int nr, const volatile void *addr) +{ + return test_bit(nr, addr); +} + +static inline int sync_var_test_bit(int nr, volatile void *addr) +{ + return test_bit(nr, addr); +} + +#define sync_cmpxchg ia64_cmpxchg4_acq + +#define sync_test_bit(nr,addr) \ + (__builtin_constant_p(nr) ? \ + sync_const_test_bit((nr), (addr)) : \ + sync_var_test_bit((nr), (addr))) + +#define sync_cmpxchg_subword sync_cmpxchg + +#endif /* _ASM_IA64_SYNC_BITOPS_H */ -- 1.5.3 -- yamahata ^ permalink raw reply related [flat|nested] 12+ messages in thread
[parent not found: <20080221091731.641745000@ls.local.valinux.co.jp>]
* [PATCH 03/28] ia64/xen: increase IA64_MAX_RSVD_REGIONS. [not found] <20080221091731.641745000@ls.local.valinux.co.jp> @ 2008-02-21 9:17 ` yamahata 0 siblings, 0 replies; 12+ messages in thread From: yamahata @ 2008-02-21 9:17 UTC (permalink / raw) To: linux-ia64; +Cc: xen-ia64-devel, kvm-ia64-devel, virtualization [-- Attachment #1: 0003-ia64-xen-increase-IA64_MAX_RSVD_REGIONS.patch --] [-- Type: text/plain, Size: 859 bytes --] Xenlinux/ia64 needs to reserve one more region passed from xen hypervisor as start info. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> --- include/asm-ia64/meminit.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h index f93308f..7c12c08 100644 --- a/include/asm-ia64/meminit.h +++ b/include/asm-ia64/meminit.h @@ -18,10 +18,17 @@ * - crash dumping code reserved region * - Kernel memory map built from EFI memory map * - ELF core header + * ifdef CONFIG_XEN + * - xen start info + * endif * * More could be added if necessary */ +#ifdef CONFIG_XEN #define IA64_MAX_RSVD_REGIONS 8 +#else +#define IA64_MAX_RSVD_REGIONS 9 +#endif struct rsvd_region { unsigned long start; /* virtual address of beginning of element */ -- 1.5.3 -- yamahata ^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-02-26 1:57 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-22 5:10 [PATCH 00/28] RFC: ia64/xen domU paravirtualization Isaku Yamahata
2008-02-22 5:10 ` [PATCH 03/28] ia64/xen: increase IA64_MAX_RSVD_REGIONS Isaku Yamahata
2008-02-22 5:33 ` Robin Holt
2008-02-22 6:02 ` Isaku Yamahata
2008-02-22 6:02 ` Isaku Yamahata
2008-02-25 17:18 ` Bjorn Helgaas
2008-02-26 1:57 ` Isaku Yamahata
2008-02-22 5:10 ` [PATCH 04/28] ia64/xen: introduce synch bitops which is necessary for ia64/xen support Isaku Yamahata
2008-02-22 5:42 ` [PATCH 04/28] ia64/xen: introduce synch bitops which is Robin Holt
2008-02-22 6:13 ` [PATCH 04/28] ia64/xen: introduce synch bitops which is necessary for ia64/xen support Isaku Yamahata
2008-02-22 6:13 ` Isaku Yamahata
[not found] <20080221091731.641745000@ls.local.valinux.co.jp>
2008-02-21 9:17 ` [PATCH 03/28] ia64/xen: increase IA64_MAX_RSVD_REGIONS yamahata
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.