mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.1159.180.3 (419ddd7ahbMbUcKt4ZRGoYKuNcN4MQ)
Merge arcadians.cl.cam.ac.uk:/auto/groups/xeno/BK/xen-2.0-testing.bk into arcadians.cl.cam.ac.uk:/local/scratch-2/cl349/xen-2.0-testing.bk
This commit is contained in:
commit
38755046f5
2 files changed
+29
-14
No files matched your search
@@ -695,7 +695,6 @@ void free_irq(unsigned int irq, void *dev_id)
|
||||
p = &desc->action;
|
||||
for (;;) {
|
||||
struct irqaction * action = *p;
|
||||
|
||||
if (action) {
|
||||
struct irqaction **pp = p;
|
||||
p = &action->next;
|
||||
@@ -757,7 +756,7 @@ unsigned long probe_irq_on(void)
|
||||
* something may have generated an irq long ago and we want to
|
||||
* flush such a longstanding irq before considering it as spurious.
|
||||
*/
|
||||
for (i = NR_PIRQS-1; i > 0; i--) {
|
||||
for (i = NR_IRQS-1; i > 0; i--) {
|
||||
desc = irq_desc + i;
|
||||
|
||||
spin_lock_irq(&desc->lock);
|
||||
@@ -775,7 +774,7 @@ unsigned long probe_irq_on(void)
|
||||
* (we must startup again here because if a longstanding irq
|
||||
* happened in the previous stage, it may have masked itself)
|
||||
*/
|
||||
for (i = NR_PIRQS-1; i > 0; i--) {
|
||||
for (i = NR_IRQS-1; i > 0; i--) {
|
||||
desc = irq_desc + i;
|
||||
|
||||
spin_lock_irq(&desc->lock);
|
||||
@@ -797,7 +796,7 @@ unsigned long probe_irq_on(void)
|
||||
* Now filter out any obviously spurious interrupts
|
||||
*/
|
||||
val = 0;
|
||||
for (i = 0; i < NR_PIRQS; i++) {
|
||||
for (i = 0; i < NR_IRQS; i++) {
|
||||
irq_desc_t *desc = irq_desc + i;
|
||||
unsigned int status;
|
||||
|
||||
@@ -844,7 +843,7 @@ unsigned int probe_irq_mask(unsigned long val)
|
||||
unsigned int mask;
|
||||
|
||||
mask = 0;
|
||||
for (i = 0; i < NR_PIRQS; i++) {
|
||||
for (i = 0; i < NR_IRQS; i++) {
|
||||
irq_desc_t *desc = irq_desc + i;
|
||||
unsigned int status;
|
||||
|
||||
@@ -894,7 +893,7 @@ int probe_irq_off(unsigned long val)
|
||||
|
||||
nr_irqs = 0;
|
||||
irq_found = 0;
|
||||
for (i = 0; i < NR_PIRQS; i++) {
|
||||
for (i = 0; i < NR_IRQS; i++) {
|
||||
irq_desc_t *desc = irq_desc + i;
|
||||
unsigned int status;
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ static unsigned long pirq_needs_unmask_notify[NR_PIRQS/sizeof(unsigned long)];
|
||||
/* Upcall to generic IRQ layer. */
|
||||
extern asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs);
|
||||
|
||||
#define VALID_EVTCHN(_chn) ((_chn) != -1)
|
||||
#define VALID_EVTCHN(_chn) ((_chn) >= 0)
|
||||
|
||||
/*
|
||||
* Force a proper event-channel callback from Xen after clearing the
|
||||
@@ -229,35 +229,51 @@ void unbind_evtchn_from_irq(int evtchn)
|
||||
|
||||
static unsigned int startup_dynirq(unsigned int irq)
|
||||
{
|
||||
unmask_evtchn(irq_to_evtchn[irq]);
|
||||
int evtchn = irq_to_evtchn[irq];
|
||||
|
||||
if ( !VALID_EVTCHN(evtchn) )
|
||||
return 0;
|
||||
unmask_evtchn(evtchn);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void shutdown_dynirq(unsigned int irq)
|
||||
{
|
||||
mask_evtchn(irq_to_evtchn[irq]);
|
||||
int evtchn = irq_to_evtchn[irq];
|
||||
|
||||
if ( !VALID_EVTCHN(evtchn) )
|
||||
return;
|
||||
mask_evtchn(evtchn);
|
||||
}
|
||||
|
||||
static void enable_dynirq(unsigned int irq)
|
||||
{
|
||||
unmask_evtchn(irq_to_evtchn[irq]);
|
||||
int evtchn = irq_to_evtchn[irq];
|
||||
|
||||
unmask_evtchn(evtchn);
|
||||
}
|
||||
|
||||
static void disable_dynirq(unsigned int irq)
|
||||
{
|
||||
mask_evtchn(irq_to_evtchn[irq]);
|
||||
int evtchn = irq_to_evtchn[irq];
|
||||
|
||||
mask_evtchn(evtchn);
|
||||
}
|
||||
|
||||
static void ack_dynirq(unsigned int irq)
|
||||
{
|
||||
mask_evtchn(irq_to_evtchn[irq]);
|
||||
clear_evtchn(irq_to_evtchn[irq]);
|
||||
int evtchn = irq_to_evtchn[irq];
|
||||
|
||||
mask_evtchn(evtchn);
|
||||
clear_evtchn(evtchn);
|
||||
}
|
||||
|
||||
static void end_dynirq(unsigned int irq)
|
||||
{
|
||||
int evtchn = irq_to_evtchn[irq];
|
||||
|
||||
if ( !(irq_desc[irq].status & IRQ_DISABLED) )
|
||||
unmask_evtchn(irq_to_evtchn[irq]);
|
||||
unmask_evtchn(evtchn);
|
||||
}
|
||||
|
||||
static struct hw_interrupt_type dynirq_type = {
|
||||
|
||||