/* Careful! The 8259A is a fragile beast, it pretty much  */
void i8259_mask_and_ack(int irq)
/* Careful! The 8259A is a fragile beast, it pretty much  */
void i8259_mask_and_ack(int irq)
{
	if (irq > 7) {
		cached_imr2 |= (1 << (irq - 8));
		in8(IMR_2);
		out8(IMR_2, cached_imr2);
		out8(OCW2_2, 0x20);
		out8(OCW2_1, 0x20);
	} else {
		cached_imr1 |= (1 << irq);
		in8(IMR_1);
		out8(IMR_1, cached_imr1);
		out8(OCW2_1, 0x20);
	}
}