ia64/linux-2.6.18-xen.hg

view arch/mips/kernel/irq-rm7000.c @ 452:c7ed6fe5dca0

kexec: dont initialise regions in reserve_memory()

There is no need to initialise efi_memmap_res and boot_param_res in
reserve_memory() for the initial xen domain as it is done in
machine_kexec_setup_resources() using values from the kexec hypercall.

Signed-off-by: Simon Horman <horms@verge.net.au>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 28 10:55:18 2008 +0000 (2008-02-28)
parents 831230e53067
children
line source
1 /*
2 * Copyright (C) 2003 Ralf Baechle
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * Handler for RM7000 extended interrupts. These are a non-standard
10 * feature so we handle them separately from standard interrupts.
11 */
12 #include <linux/init.h>
13 #include <linux/interrupt.h>
14 #include <linux/kernel.h>
16 #include <asm/irq_cpu.h>
17 #include <asm/mipsregs.h>
18 #include <asm/system.h>
20 static int irq_base;
22 static inline void unmask_rm7k_irq(unsigned int irq)
23 {
24 set_c0_intcontrol(0x100 << (irq - irq_base));
25 }
27 static inline void mask_rm7k_irq(unsigned int irq)
28 {
29 clear_c0_intcontrol(0x100 << (irq - irq_base));
30 }
32 static inline void rm7k_cpu_irq_enable(unsigned int irq)
33 {
34 unsigned long flags;
36 local_irq_save(flags);
37 unmask_rm7k_irq(irq);
38 local_irq_restore(flags);
39 }
41 static void rm7k_cpu_irq_disable(unsigned int irq)
42 {
43 unsigned long flags;
45 local_irq_save(flags);
46 mask_rm7k_irq(irq);
47 local_irq_restore(flags);
48 }
50 static unsigned int rm7k_cpu_irq_startup(unsigned int irq)
51 {
52 rm7k_cpu_irq_enable(irq);
54 return 0;
55 }
57 #define rm7k_cpu_irq_shutdown rm7k_cpu_irq_disable
59 /*
60 * While we ack the interrupt interrupts are disabled and thus we don't need
61 * to deal with concurrency issues. Same for rm7k_cpu_irq_end.
62 */
63 static void rm7k_cpu_irq_ack(unsigned int irq)
64 {
65 mask_rm7k_irq(irq);
66 }
68 static void rm7k_cpu_irq_end(unsigned int irq)
69 {
70 if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
71 unmask_rm7k_irq(irq);
72 }
74 static struct irq_chip rm7k_irq_controller = {
75 .typename = "RM7000",
76 .startup = rm7k_cpu_irq_startup,
77 .shutdown = rm7k_cpu_irq_shutdown,
78 .enable = rm7k_cpu_irq_enable,
79 .disable = rm7k_cpu_irq_disable,
80 .ack = rm7k_cpu_irq_ack,
81 .end = rm7k_cpu_irq_end,
82 };
84 void __init rm7k_cpu_irq_init(int base)
85 {
86 int i;
88 clear_c0_intcontrol(0x00000f00); /* Mask all */
90 for (i = base; i < base + 4; i++) {
91 irq_desc[i].status = IRQ_DISABLED;
92 irq_desc[i].action = NULL;
93 irq_desc[i].depth = 1;
94 irq_desc[i].chip = &rm7k_irq_controller;
95 }
97 irq_base = base;
98 }