aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2008-10-17 16:51:28 -0400
committerTony Luck <tony.luck@intel.com>2008-10-17 16:51:28 -0400
commit22ca532a4d137545244fdff0b687325fd4e13eae (patch)
tree459f5116344c71d13d860f4fd9f0c2c477df268a /arch/ia64/kernel
parent9224652cc76417bfe779bcdb1243cf0b083e3eee (diff)
parentf8d1f99f3958c46cdc983743d75d0b31b9accb80 (diff)
Pull pv_ops-xen into release branch
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r--arch/ia64/kernel/Makefile18
-rw-r--r--arch/ia64/kernel/acpi.c5
-rw-r--r--arch/ia64/kernel/asm-offsets.c31
-rw-r--r--arch/ia64/kernel/ivt.S6
-rw-r--r--arch/ia64/kernel/nr-irqs.c1
-rw-r--r--arch/ia64/kernel/paravirt.c2
-rw-r--r--arch/ia64/kernel/paravirt_inst.h4
-rw-r--r--arch/ia64/kernel/process.c1
8 files changed, 62 insertions, 6 deletions
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 87fea11aecb7..55e6ca8eebda 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -112,5 +112,23 @@ clean-files += $(objtree)/include/asm-ia64/nr-irqs.h
112ASM_PARAVIRT_OBJS = ivt.o entry.o 112ASM_PARAVIRT_OBJS = ivt.o entry.o
113define paravirtualized_native 113define paravirtualized_native
114AFLAGS_$(1) += -D__IA64_ASM_PARAVIRTUALIZED_NATIVE 114AFLAGS_$(1) += -D__IA64_ASM_PARAVIRTUALIZED_NATIVE
115AFLAGS_pvchk-sed-$(1) += -D__IA64_ASM_PARAVIRTUALIZED_PVCHECK
116extra-y += pvchk-$(1)
115endef 117endef
116$(foreach obj,$(ASM_PARAVIRT_OBJS),$(eval $(call paravirtualized_native,$(obj)))) 118$(foreach obj,$(ASM_PARAVIRT_OBJS),$(eval $(call paravirtualized_native,$(obj))))
119
120#
121# Checker for paravirtualizations of privileged operations.
122#
123quiet_cmd_pv_check_sed = PVCHK $@
124define cmd_pv_check_sed
125 sed -f $(srctree)/arch/$(SRCARCH)/scripts/pvcheck.sed $< > $@
126endef
127
128$(obj)/pvchk-sed-%.s: $(src)/%.S $(srctree)/arch/$(SRCARCH)/scripts/pvcheck.sed FORCE
129 $(call if_changed_dep,as_s_S)
130$(obj)/pvchk-%.s: $(obj)/pvchk-sed-%.s FORCE
131 $(call if_changed,pv_check_sed)
132$(obj)/pvchk-%.o: $(obj)/pvchk-%.s FORCE
133 $(call if_changed,as_o_S)
134.PRECIOUS: $(obj)/pvchk-sed-%.s $(obj)/pvchk-%.s $(obj)/pvchk-%.o
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 5d1eb7ee2bf6..00936491933e 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -52,6 +52,7 @@
52#include <asm/numa.h> 52#include <asm/numa.h>
53#include <asm/sal.h> 53#include <asm/sal.h>
54#include <asm/cyclone.h> 54#include <asm/cyclone.h>
55#include <asm/xen/hypervisor.h>
55 56
56#define BAD_MADT_ENTRY(entry, end) ( \ 57#define BAD_MADT_ENTRY(entry, end) ( \
57 (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ 58 (!entry) || (unsigned long)entry + sizeof(*entry) > end || \
@@ -121,6 +122,8 @@ acpi_get_sysname(void)
121 return "uv"; 122 return "uv";
122 else 123 else
123 return "sn2"; 124 return "sn2";
125 } else if (xen_pv_domain() && !strcmp(hdr->oem_id, "XEN")) {
126 return "xen";
124 } 127 }
125 128
126 return "dig"; 129 return "dig";
@@ -137,6 +140,8 @@ acpi_get_sysname(void)
137 return "uv"; 140 return "uv";
138# elif defined (CONFIG_IA64_DIG) 141# elif defined (CONFIG_IA64_DIG)
139 return "dig"; 142 return "dig";
143# elif defined (CONFIG_IA64_XEN_GUEST)
144 return "xen";
140# else 145# else
141# error Unknown platform. Fix acpi.c. 146# error Unknown platform. Fix acpi.c.
142# endif 147# endif
diff --git a/arch/ia64/kernel/asm-offsets.c b/arch/ia64/kernel/asm-offsets.c
index 94c44b1ccfd0..742dbb1d5a4f 100644
--- a/arch/ia64/kernel/asm-offsets.c
+++ b/arch/ia64/kernel/asm-offsets.c
@@ -16,6 +16,9 @@
16#include <asm/sigcontext.h> 16#include <asm/sigcontext.h>
17#include <asm/mca.h> 17#include <asm/mca.h>
18 18
19#include <asm/xen/interface.h>
20#include <asm/xen/hypervisor.h>
21
19#include "../kernel/sigframe.h" 22#include "../kernel/sigframe.h"
20#include "../kernel/fsyscall_gtod_data.h" 23#include "../kernel/fsyscall_gtod_data.h"
21 24
@@ -286,4 +289,32 @@ void foo(void)
286 offsetof (struct itc_jitter_data_t, itc_jitter)); 289 offsetof (struct itc_jitter_data_t, itc_jitter));
287 DEFINE(IA64_ITC_LASTCYCLE_OFFSET, 290 DEFINE(IA64_ITC_LASTCYCLE_OFFSET,
288 offsetof (struct itc_jitter_data_t, itc_lastcycle)); 291 offsetof (struct itc_jitter_data_t, itc_lastcycle));
292
293#ifdef CONFIG_XEN
294 BLANK();
295
296 DEFINE(XEN_NATIVE_ASM, XEN_NATIVE);
297 DEFINE(XEN_PV_DOMAIN_ASM, XEN_PV_DOMAIN);
298
299#define DEFINE_MAPPED_REG_OFS(sym, field) \
300 DEFINE(sym, (XMAPPEDREGS_OFS + offsetof(struct mapped_regs, field)))
301
302 DEFINE_MAPPED_REG_OFS(XSI_PSR_I_ADDR_OFS, interrupt_mask_addr);
303 DEFINE_MAPPED_REG_OFS(XSI_IPSR_OFS, ipsr);
304 DEFINE_MAPPED_REG_OFS(XSI_IIP_OFS, iip);
305 DEFINE_MAPPED_REG_OFS(XSI_IFS_OFS, ifs);
306 DEFINE_MAPPED_REG_OFS(XSI_PRECOVER_IFS_OFS, precover_ifs);
307 DEFINE_MAPPED_REG_OFS(XSI_ISR_OFS, isr);
308 DEFINE_MAPPED_REG_OFS(XSI_IFA_OFS, ifa);
309 DEFINE_MAPPED_REG_OFS(XSI_IIPA_OFS, iipa);
310 DEFINE_MAPPED_REG_OFS(XSI_IIM_OFS, iim);
311 DEFINE_MAPPED_REG_OFS(XSI_IHA_OFS, iha);
312 DEFINE_MAPPED_REG_OFS(XSI_ITIR_OFS, itir);
313 DEFINE_MAPPED_REG_OFS(XSI_PSR_IC_OFS, interrupt_collection_enabled);
314 DEFINE_MAPPED_REG_OFS(XSI_BANKNUM_OFS, banknum);
315 DEFINE_MAPPED_REG_OFS(XSI_BANK0_R16_OFS, bank0_regs[0]);
316 DEFINE_MAPPED_REG_OFS(XSI_BANK1_R16_OFS, bank1_regs[0]);
317 DEFINE_MAPPED_REG_OFS(XSI_B0NATS_OFS, vbnat);
318 DEFINE_MAPPED_REG_OFS(XSI_B1NATS_OFS, vnat);
319#endif /* CONFIG_XEN */
289} 320}
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S
index 416a952b19bd..f675d8e33853 100644
--- a/arch/ia64/kernel/ivt.S
+++ b/arch/ia64/kernel/ivt.S
@@ -580,7 +580,7 @@ ENTRY(dirty_bit)
580 mov b0=r29 // restore b0 580 mov b0=r29 // restore b0
581 ;; 581 ;;
582 st8 [r17]=r18 // store back updated PTE 582 st8 [r17]=r18 // store back updated PTE
583 itc.d r18 // install updated PTE 583 ITC_D(p0, r18, r16) // install updated PTE
584#endif 584#endif
585 mov pr=r31,-1 // restore pr 585 mov pr=r31,-1 // restore pr
586 RFI 586 RFI
@@ -646,7 +646,7 @@ ENTRY(iaccess_bit)
646 mov b0=r29 // restore b0 646 mov b0=r29 // restore b0
647 ;; 647 ;;
648 st8 [r17]=r18 // store back updated PTE 648 st8 [r17]=r18 // store back updated PTE
649 itc.i r18 // install updated PTE 649 ITC_I(p0, r18, r16) // install updated PTE
650#endif /* !CONFIG_SMP */ 650#endif /* !CONFIG_SMP */
651 mov pr=r31,-1 651 mov pr=r31,-1
652 RFI 652 RFI
@@ -698,7 +698,7 @@ ENTRY(daccess_bit)
698 or r18=_PAGE_A,r18 // set the accessed bit 698 or r18=_PAGE_A,r18 // set the accessed bit
699 ;; 699 ;;
700 st8 [r17]=r18 // store back updated PTE 700 st8 [r17]=r18 // store back updated PTE
701 itc.d r18 // install updated PTE 701 ITC_D(p0, r18, r16) // install updated PTE
702#endif 702#endif
703 mov b0=r29 // restore b0 703 mov b0=r29 // restore b0
704 mov pr=r31,-1 704 mov pr=r31,-1
diff --git a/arch/ia64/kernel/nr-irqs.c b/arch/ia64/kernel/nr-irqs.c
index 8273afc32db8..ee564575148e 100644
--- a/arch/ia64/kernel/nr-irqs.c
+++ b/arch/ia64/kernel/nr-irqs.c
@@ -10,6 +10,7 @@
10#include <linux/kbuild.h> 10#include <linux/kbuild.h>
11#include <linux/threads.h> 11#include <linux/threads.h>
12#include <asm/native/irq.h> 12#include <asm/native/irq.h>
13#include <asm/xen/irq.h>
13 14
14void foo(void) 15void foo(void)
15{ 16{
diff --git a/arch/ia64/kernel/paravirt.c b/arch/ia64/kernel/paravirt.c
index afaf5b9a2cf0..de35d8e8b7d2 100644
--- a/arch/ia64/kernel/paravirt.c
+++ b/arch/ia64/kernel/paravirt.c
@@ -332,7 +332,7 @@ ia64_native_iosapic_write(char __iomem *iosapic, unsigned int reg, u32 val)
332 332
333struct pv_iosapic_ops pv_iosapic_ops = { 333struct pv_iosapic_ops pv_iosapic_ops = {
334 .pcat_compat_init = ia64_native_iosapic_pcat_compat_init, 334 .pcat_compat_init = ia64_native_iosapic_pcat_compat_init,
335 .get_irq_chip = ia64_native_iosapic_get_irq_chip, 335 .__get_irq_chip = ia64_native_iosapic_get_irq_chip,
336 336
337 .__read = ia64_native_iosapic_read, 337 .__read = ia64_native_iosapic_read,
338 .__write = ia64_native_iosapic_write, 338 .__write = ia64_native_iosapic_write,
diff --git a/arch/ia64/kernel/paravirt_inst.h b/arch/ia64/kernel/paravirt_inst.h
index 5cad6fb2ed19..64d6d810c64b 100644
--- a/arch/ia64/kernel/paravirt_inst.h
+++ b/arch/ia64/kernel/paravirt_inst.h
@@ -20,7 +20,9 @@
20 * 20 *
21 */ 21 */
22 22
23#ifdef __IA64_ASM_PARAVIRTUALIZED_XEN 23#ifdef __IA64_ASM_PARAVIRTUALIZED_PVCHECK
24#include <asm/native/pvchk_inst.h>
25#elif defined(__IA64_ASM_PARAVIRTUALIZED_XEN)
24#include <asm/xen/inst.h> 26#include <asm/xen/inst.h>
25#include <asm/xen/minstate.h> 27#include <asm/xen/minstate.h>
26#else 28#else
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index 341a0319a5ba..c57162705147 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -242,7 +242,6 @@ default_idle (void)
242/* We don't actually take CPU down, just spin without interrupts. */ 242/* We don't actually take CPU down, just spin without interrupts. */
243static inline void play_dead(void) 243static inline void play_dead(void)
244{ 244{
245 extern void ia64_cpu_local_tick (void);
246 unsigned int this_cpu = smp_processor_id(); 245 unsigned int this_cpu = smp_processor_id();
247 246
248 /* Ack it */ 247 /* Ack it */