Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116794
b: refs/heads/master
c: bcdd487
h: refs/heads/master
v: v3
  • Loading branch information
Isaku Yamahata authored and Tony Luck committed Oct 17, 2008
1 parent ea8dbce commit ea489f3
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16583bc0b4871299a60cbcdd1c6e102e3f9b8e4b
refs/heads/master: bcdd48739d1336332e4086c9e1c9f225290b8194
52 changes: 52 additions & 0 deletions trunk/arch/ia64/xen/xen_pv_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,57 @@ const struct pv_cpu_asm_switch xen_cpu_asm_switch = {
.leave_kernel = (unsigned long)&xen_leave_kernel,
};

/***************************************************************************
* pv_iosapic_ops
* iosapic read/write hooks.
*/
static void
xen_pcat_compat_init(void)
{
/* nothing */
}

static struct irq_chip*
xen_iosapic_get_irq_chip(unsigned long trigger)
{
return NULL;
}

static unsigned int
xen_iosapic_read(char __iomem *iosapic, unsigned int reg)
{
struct physdev_apic apic_op;
int ret;

apic_op.apic_physbase = (unsigned long)iosapic -
__IA64_UNCACHED_OFFSET;
apic_op.reg = reg;
ret = HYPERVISOR_physdev_op(PHYSDEVOP_apic_read, &apic_op);
if (ret)
return ret;
return apic_op.value;
}

static void
xen_iosapic_write(char __iomem *iosapic, unsigned int reg, u32 val)
{
struct physdev_apic apic_op;

apic_op.apic_physbase = (unsigned long)iosapic -
__IA64_UNCACHED_OFFSET;
apic_op.reg = reg;
apic_op.value = val;
HYPERVISOR_physdev_op(PHYSDEVOP_apic_write, &apic_op);
}

static const struct pv_iosapic_ops xen_iosapic_ops __initdata = {
.pcat_compat_init = xen_pcat_compat_init,
.__get_irq_chip = xen_iosapic_get_irq_chip,

.__read = xen_iosapic_read,
.__write = xen_iosapic_write,
};

/***************************************************************************
* pv_ops initialization
*/
Expand All @@ -302,6 +353,7 @@ xen_setup_pv_ops(void)
pv_info = xen_info;
pv_init_ops = xen_init_ops;
pv_cpu_ops = xen_cpu_ops;
pv_iosapic_ops = xen_iosapic_ops;

paravirt_cpu_asm_init(&xen_cpu_asm_switch);
}

0 comments on commit ea489f3

Please sign in to comment.