2006-10-14 09:02:00

by Lu, Yinghai

[permalink] [raw]
Subject: [PATCH] x86_64: using irq_domain in ioapic_retrigger_irq

using irq_domain[irq] to get cpu_mask for send_IPI_mask

Signed-off-by: Yinghai Lu <[email protected]>

diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index 44b55f8..6a07bce 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -1254,13 +1254,12 @@ static unsigned int startup_ioapic_irq(u
static int ioapic_retrigger_irq(unsigned int irq)
{
cpumask_t mask;
- unsigned vector;
+ int vector;

vector = irq_vector[irq];
- cpus_clear(mask);
- cpu_set(vector >> 8, mask);
+ mask = irq_domain[irq];

- send_IPI_mask(mask, vector & 0xff);
+ send_IPI_mask(mask, vector);

return 1;
}


Attachments:
(No filename) (699.00 B)
io_apic_irq_trigger.diff (537.00 B)
Download all attachments

2006-10-14 10:08:52

by Eric W. Biederman

[permalink] [raw]
Subject: Re: [PATCH] x86_64: using irq_domain in ioapic_retrigger_irq

"Yinghai Lu" <[email protected]> writes:

> using irq_domain[irq] to get cpu_mask for send_IPI_mask

Yep. I missed that one in my last refactoring :(

Acked-by: Eric W. Biederman <[email protected]>

Eric

2006-10-17 17:05:14

by Eric W. Biederman

[permalink] [raw]
Subject: Re: [PATCH] x86_64: using irq_domain in ioapic_retrigger_irq

"Yinghai Lu" <[email protected]> writes:

> using irq_domain[irq] to get cpu_mask for send_IPI_mask
>
> Signed-off-by: Yinghai Lu <[email protected]>

YH I have to grumble at you, your patch suffers from white space damage
and does not apply.

In addition while looking this version is actually broken because
for retrigger irq we only ever want to send the irq once and your
version has the potential to be broadcast to several cpus. Not
what we want.

I will send a fixed version in a minute.

Eric


>
> diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
> index 44b55f8..6a07bce 100644
> --- a/arch/x86_64/kernel/io_apic.c
> +++ b/arch/x86_64/kernel/io_apic.c
> @@ -1254,13 +1254,12 @@ static unsigned int startup_ioapic_irq(u
> static int ioapic_retrigger_irq(unsigned int irq)
> {
> cpumask_t mask;
> - unsigned vector;
> + int vector;
>
> vector = irq_vector[irq];
> - cpus_clear(mask);
> - cpu_set(vector >> 8, mask);
> + mask = irq_domain[irq];
>
> - send_IPI_mask(mask, vector & 0xff);
> + send_IPI_mask(mask, vector);
>
> return 1;
> }

2006-10-17 17:36:00

by Lu, Yinghai

[permalink] [raw]
Subject: RE: [PATCH] x86_64: using irq_domain in ioapic_retrigger_irq

Good, So need to find out the correct mask for irq ever used.