Commit e09b4e9a authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'upstream/core' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen

* 'upstream/core' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
  xen: handle events as edge-triggered
  xen: use percpu interrupts for IPIs and VIRQs
parents 871eae48 dffe2e1e
...@@ -112,6 +112,7 @@ static inline unsigned long *cpu_evtchn_mask(int cpu) ...@@ -112,6 +112,7 @@ static inline unsigned long *cpu_evtchn_mask(int cpu)
#define VALID_EVTCHN(chn) ((chn) != 0) #define VALID_EVTCHN(chn) ((chn) != 0)
static struct irq_chip xen_dynamic_chip; static struct irq_chip xen_dynamic_chip;
static struct irq_chip xen_percpu_chip;
/* Constructor for packed IRQ information. */ /* Constructor for packed IRQ information. */
static struct irq_info mk_unbound_info(void) static struct irq_info mk_unbound_info(void)
...@@ -377,7 +378,7 @@ int bind_evtchn_to_irq(unsigned int evtchn) ...@@ -377,7 +378,7 @@ int bind_evtchn_to_irq(unsigned int evtchn)
irq = find_unbound_irq(); irq = find_unbound_irq();
set_irq_chip_and_handler_name(irq, &xen_dynamic_chip, set_irq_chip_and_handler_name(irq, &xen_dynamic_chip,
handle_level_irq, "event"); handle_edge_irq, "event");
evtchn_to_irq[evtchn] = irq; evtchn_to_irq[evtchn] = irq;
irq_info[irq] = mk_evtchn_info(evtchn); irq_info[irq] = mk_evtchn_info(evtchn);
...@@ -403,8 +404,8 @@ static int bind_ipi_to_irq(unsigned int ipi, unsigned int cpu) ...@@ -403,8 +404,8 @@ static int bind_ipi_to_irq(unsigned int ipi, unsigned int cpu)
if (irq < 0) if (irq < 0)
goto out; goto out;
set_irq_chip_and_handler_name(irq, &xen_dynamic_chip, set_irq_chip_and_handler_name(irq, &xen_percpu_chip,
handle_level_irq, "ipi"); handle_percpu_irq, "ipi");
bind_ipi.vcpu = cpu; bind_ipi.vcpu = cpu;
if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_ipi, if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_ipi,
...@@ -444,8 +445,8 @@ static int bind_virq_to_irq(unsigned int virq, unsigned int cpu) ...@@ -444,8 +445,8 @@ static int bind_virq_to_irq(unsigned int virq, unsigned int cpu)
irq = find_unbound_irq(); irq = find_unbound_irq();
set_irq_chip_and_handler_name(irq, &xen_dynamic_chip, set_irq_chip_and_handler_name(irq, &xen_percpu_chip,
handle_level_irq, "virq"); handle_percpu_irq, "virq");
evtchn_to_irq[evtchn] = irq; evtchn_to_irq[evtchn] = irq;
irq_info[irq] = mk_virq_info(evtchn, virq); irq_info[irq] = mk_virq_info(evtchn, virq);
...@@ -964,6 +965,16 @@ static struct irq_chip xen_dynamic_chip __read_mostly = { ...@@ -964,6 +965,16 @@ static struct irq_chip xen_dynamic_chip __read_mostly = {
.retrigger = retrigger_dynirq, .retrigger = retrigger_dynirq,
}; };
static struct irq_chip xen_percpu_chip __read_mostly = {
.name = "xen-percpu",
.disable = disable_dynirq,
.mask = disable_dynirq,
.unmask = enable_dynirq,
.ack = ack_dynirq,
};
int xen_set_callback_via(uint64_t via) int xen_set_callback_via(uint64_t via)
{ {
struct xen_hvm_param a; struct xen_hvm_param a;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment