Re: [PATCH] fix kirq code for clustered mode

William Lee Irwin III (wli@holomorphy.com)
Thu, 20 Feb 2003 04:19:17 -0800


On Tue, Feb 18, 2003 at 09:51:28AM -0800, Dave Hansen wrote:
> The new kirq code breaks clustered apic mode. This 2-liner fixes it.
> It should compile down to the same thing, unless you're using a
> clustered apic sub-arch.

This isn't quite enough:

static int irq_affinity_write_proc (struct file *file, const char *buffer,
unsigned long count, void *data)
{
int irq = (long) data, full_count = count, err;
unsigned long new_value;

if (!irq_desc[irq].handler->set_affinity)
return -EIO;

err = parse_hex_value(buffer, count, &new_value);

/*
* Do not allow disabling IRQs completely - it's a too easy
* way to make the system unusable accidentally :-) At least
* one online CPU still has to be targeted.
*/
if (!(new_value & cpu_online_map))
return -EINVAL;

irq_affinity[irq] = new_value;
irq_desc[irq].handler->set_affinity(irq, new_value);

return full_count;
}

This is a bitmask and it's being handed directly to set_ioapic_affinity().
Or, at least, it's inconsistent, being &'d with cpu_online_map.

-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/