[BACK]Return to irq.c CVS log [TXT][DIR] Up to [Development] / linux-2.6-xfs / arch / arm / mach-ns9xxx

File: [Development] / linux-2.6-xfs / arch / arm / mach-ns9xxx / irq.c (download)

Revision 1.2, Wed Sep 12 17:09:56 2007 UTC (10 years, 1 month ago) by tes.longdrop.melbourne.sgi.com
Branch: MAIN
Changes since 1.1: +10 -1 lines

Update 2.6.x-xfs to 2.6.23-rc4.

Also update fs/xfs with external mainline changes.
There were 12 such missing commits that I detected:

--------
commit ad690ef9e690f6c31f7d310b09ef1314bcec9033
Author: Al Viro <viro@ftp.linux.org.uk>
    xfs ioctl __user annotations

commit 20c2df83d25c6a95affe6157a4c9cac4cf5ffaac
Author: Paul Mundt <lethal@linux-sh.org>
    mm: Remove slab destructors from kmem_cache_create().

commit d0217ac04ca6591841e5665f518e38064f4e65bd
Author: Nick Piggin <npiggin@suse.de>
    mm: fault feedback #1

commit 54cb8821de07f2ffcd28c380ce9b93d5784b40d7
Author: Nick Piggin <npiggin@suse.de>
    mm: merge populate and nopage into fault (fixes nonlinear)

commit d00806b183152af6d24f46f0c33f14162ca1262a
Author: Nick Piggin <npiggin@suse.de>
    mm: fix fault vs invalidate race for linear mappings

commit a569425512253992cc64ebf8b6d00a62f986db3e
Author: Christoph Hellwig <hch@infradead.org>
    knfsd: exportfs: add exportfs.h header

commit 831441862956fffa17b9801db37e6ea1650b0f69
Author: Rafael J. Wysocki <rjw@sisk.pl>
    Freezer: make kernel threads nonfreezable by default

commit 8e1f936b73150f5095448a0fee6d4f30a1f9001d
Author: Rusty Russell <rusty@rustcorp.com.au>
    mm: clean up and kernelify shrinker registration

commit 5ffc4ef45b3b0a57872f631b4e4ceb8ace0d7496
Author: Jens Axboe <jens.axboe@oracle.com>
    sendfile: remove .sendfile from filesystems that use generic_file_sendfile()

commit 8bb7844286fb8c9fce6f65d8288aeb09d03a5e0d
Author: Rafael J. Wysocki <rjw@sisk.pl>
    Add suspend-related notifications for CPU hotplug

commit 59c51591a0ac7568824f541f57de967e88adaa07
Author: Michael Opdenacker <michael@free-electrons.com>
    Fix occurrences of "the the "

commit 0ceb331433e8aad9c5f441a965d7c681f8b9046f
Author: Dmitriy Monakhov <dmonakhov@openvz.org>
    mm: move common segment checks to separate helper function
--------
Merge of 2.6.x-xfs-melb:linux:29656b by kenmcd.

/*
 * arch/arm/mach-ns9xxx/irq.c
 *
 * Copyright (C) 2006,2007 by Digi International Inc.
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published by
 * the Free Software Foundation.
 */
#include <linux/interrupt.h>
#include <asm/mach/irq.h>
#include <asm/mach-types.h>
#include <asm/arch-ns9xxx/regs-sys.h>
#include <asm/arch-ns9xxx/irqs.h>
#include <asm/arch-ns9xxx/board.h>

#include "generic.h"

static void ns9xxx_ack_irq_timer(unsigned int irq)
{
	u32 tc = SYS_TC(irq - IRQ_TIMER0);

	/*
	 * If the timer is programmed to halt on terminal count, the
	 * timer must be disabled before clearing the interrupt.
	 */
	if (REGGET(tc, SYS_TCx, REN) == 0) {
		REGSET(tc, SYS_TCx, TEN, DIS);
		SYS_TC(irq - IRQ_TIMER0) = tc;
	}

	REGSET(tc, SYS_TCx, INTC, SET);
	SYS_TC(irq - IRQ_TIMER0) = tc;

	REGSET(tc, SYS_TCx, INTC, UNSET);
	SYS_TC(irq - IRQ_TIMER0) = tc;
}

static void (*ns9xxx_ack_irq_functions[NR_IRQS])(unsigned int) = {
	[IRQ_TIMER0] = ns9xxx_ack_irq_timer,
	[IRQ_TIMER1] = ns9xxx_ack_irq_timer,
	[IRQ_TIMER2] = ns9xxx_ack_irq_timer,
	[IRQ_TIMER3] = ns9xxx_ack_irq_timer,
};

static void ns9xxx_mask_irq(unsigned int irq)
{
	/* XXX: better use cpp symbols */
	SYS_IC(irq / 4) &= ~(1 << (7 + 8 * (3 - (irq & 3))));
}

static void ns9xxx_ack_irq(unsigned int irq)
{
	if (!ns9xxx_ack_irq_functions[irq]) {
		printk(KERN_ERR "no ack function for irq %u\n", irq);
		BUG();
	}

	ns9xxx_ack_irq_functions[irq](irq);
	SYS_ISRADDR = 0;
}

static void ns9xxx_maskack_irq(unsigned int irq)
{
	ns9xxx_mask_irq(irq);
	ns9xxx_ack_irq(irq);
}

static void ns9xxx_unmask_irq(unsigned int irq)
{
	/* XXX: better use cpp symbols */
	SYS_IC(irq / 4) |= 1 << (7 + 8 * (3 - (irq & 3)));
}

static struct irq_chip ns9xxx_chip = {
	.ack		= ns9xxx_ack_irq,
	.mask		= ns9xxx_mask_irq,
	.mask_ack	= ns9xxx_maskack_irq,
	.unmask		= ns9xxx_unmask_irq,
};

void __init ns9xxx_init_irq(void)
{
	int i;

	/* disable all IRQs */
	for (i = 0; i < 8; ++i)
		SYS_IC(i) = (4 * i) << 24 | (4 * i + 1) << 16 |
			(4 * i + 2) << 8 | (4 * i + 3);

	/* simple interrupt prio table:
	 * prio(x) < prio(y) <=> x < y
	 */
	for (i = 0; i < 32; ++i)
		SYS_IVA(i) = i;

	for (i = IRQ_WATCHDOG; i <= IRQ_EXT3; ++i) {
		set_irq_chip(i, &ns9xxx_chip);
		set_irq_handler(i, handle_level_irq);
		set_irq_flags(i, IRQF_VALID);
	}
}