diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-07-06 13:07:32 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-07-06 13:07:32 -0400 |
commit | 70f05366b71c51c35c25c0b76b4318fbc26c975a (patch) | |
tree | d31230b93ba7df50d87eb11b1dba091641a9b89e /arch | |
parent | c0bc8721b8d0380ec69fa97578c91201201b05a9 (diff) | |
parent | 120bda20c6f64b32e8bfbdd7b34feafaa5f5332e (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-at91rm9200/at91rm9200.c | 45 | ||||
-rw-r--r-- | arch/arm/mach-at91rm9200/generic.h | 8 | ||||
-rw-r--r-- | arch/arm/mach-at91rm9200/irq.c | 70 | ||||
-rw-r--r-- | arch/arm/mach-pnx4008/core.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pnx4008/dma.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pnx4008/irq.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-pnx4008/time.c | 8 | ||||
-rw-r--r-- | arch/powerpc/sysdev/mpic.c | 39 | ||||
-rw-r--r-- | arch/sparc64/kernel/prom.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/sparc64_ksyms.c | 10 | ||||
-rw-r--r-- | arch/sparc64/kernel/time.c | 5 |
11 files changed, 119 insertions, 93 deletions
diff --git a/arch/arm/mach-at91rm9200/at91rm9200.c b/arch/arm/mach-at91rm9200/at91rm9200.c index 7e1d072bdd80..0985b1c42c7c 100644 --- a/arch/arm/mach-at91rm9200/at91rm9200.c +++ b/arch/arm/mach-at91rm9200/at91rm9200.c | |||
@@ -107,3 +107,48 @@ void __init at91rm9200_map_io(void) | |||
107 | iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); | 107 | iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); |
108 | } | 108 | } |
109 | 109 | ||
110 | /* | ||
111 | * The default interrupt priority levels (0 = lowest, 7 = highest). | ||
112 | */ | ||
113 | static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = { | ||
114 | 7, /* Advanced Interrupt Controller (FIQ) */ | ||
115 | 7, /* System Peripherals */ | ||
116 | 0, /* Parallel IO Controller A */ | ||
117 | 0, /* Parallel IO Controller B */ | ||
118 | 0, /* Parallel IO Controller C */ | ||
119 | 0, /* Parallel IO Controller D */ | ||
120 | 6, /* USART 0 */ | ||
121 | 6, /* USART 1 */ | ||
122 | 6, /* USART 2 */ | ||
123 | 6, /* USART 3 */ | ||
124 | 0, /* Multimedia Card Interface */ | ||
125 | 4, /* USB Device Port */ | ||
126 | 0, /* Two-Wire Interface */ | ||
127 | 6, /* Serial Peripheral Interface */ | ||
128 | 5, /* Serial Synchronous Controller 0 */ | ||
129 | 5, /* Serial Synchronous Controller 1 */ | ||
130 | 5, /* Serial Synchronous Controller 2 */ | ||
131 | 0, /* Timer Counter 0 */ | ||
132 | 0, /* Timer Counter 1 */ | ||
133 | 0, /* Timer Counter 2 */ | ||
134 | 0, /* Timer Counter 3 */ | ||
135 | 0, /* Timer Counter 4 */ | ||
136 | 0, /* Timer Counter 5 */ | ||
137 | 3, /* USB Host port */ | ||
138 | 3, /* Ethernet MAC */ | ||
139 | 0, /* Advanced Interrupt Controller (IRQ0) */ | ||
140 | 0, /* Advanced Interrupt Controller (IRQ1) */ | ||
141 | 0, /* Advanced Interrupt Controller (IRQ2) */ | ||
142 | 0, /* Advanced Interrupt Controller (IRQ3) */ | ||
143 | 0, /* Advanced Interrupt Controller (IRQ4) */ | ||
144 | 0, /* Advanced Interrupt Controller (IRQ5) */ | ||
145 | 0 /* Advanced Interrupt Controller (IRQ6) */ | ||
146 | }; | ||
147 | |||
148 | void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS]) | ||
149 | { | ||
150 | if (!priority) | ||
151 | priority = at91rm9200_default_irq_priority; | ||
152 | |||
153 | at91_aic_init(priority); | ||
154 | } | ||
diff --git a/arch/arm/mach-at91rm9200/generic.h b/arch/arm/mach-at91rm9200/generic.h index f0d969d7d874..7979d8ab7e07 100644 --- a/arch/arm/mach-at91rm9200/generic.h +++ b/arch/arm/mach-at91rm9200/generic.h | |||
@@ -8,13 +8,19 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | void at91_gpio_irq_setup(unsigned banks); | 11 | /* Interrupts */ |
12 | extern void __init at91rm9200_init_irq(unsigned int priority[]); | ||
13 | extern void __init at91_aic_init(unsigned int priority[]); | ||
14 | extern void __init at91_gpio_irq_setup(unsigned banks); | ||
12 | 15 | ||
16 | /* Timer */ | ||
13 | struct sys_timer; | 17 | struct sys_timer; |
14 | extern struct sys_timer at91rm9200_timer; | 18 | extern struct sys_timer at91rm9200_timer; |
15 | 19 | ||
20 | /* Memory Map */ | ||
16 | extern void __init at91rm9200_map_io(void); | 21 | extern void __init at91rm9200_map_io(void); |
17 | 22 | ||
23 | /* Clocks */ | ||
18 | extern int __init at91_clock_init(unsigned long main_clock); | 24 | extern int __init at91_clock_init(unsigned long main_clock); |
19 | struct device; | 25 | struct device; |
20 | extern void __init at91_clock_associate(const char *id, struct device *dev, const char *func); | 26 | extern void __init at91_clock_associate(const char *id, struct device *dev, const char *func); |
diff --git a/arch/arm/mach-at91rm9200/irq.c b/arch/arm/mach-at91rm9200/irq.c index dcd560dbcfb7..9b0911320417 100644 --- a/arch/arm/mach-at91rm9200/irq.c +++ b/arch/arm/mach-at91rm9200/irq.c | |||
@@ -36,58 +36,20 @@ | |||
36 | 36 | ||
37 | #include "generic.h" | 37 | #include "generic.h" |
38 | 38 | ||
39 | /* | ||
40 | * The default interrupt priority levels (0 = lowest, 7 = highest). | ||
41 | */ | ||
42 | static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = { | ||
43 | 7, /* Advanced Interrupt Controller */ | ||
44 | 7, /* System Peripheral */ | ||
45 | 0, /* Parallel IO Controller A */ | ||
46 | 0, /* Parallel IO Controller B */ | ||
47 | 0, /* Parallel IO Controller C */ | ||
48 | 0, /* Parallel IO Controller D */ | ||
49 | 6, /* USART 0 */ | ||
50 | 6, /* USART 1 */ | ||
51 | 6, /* USART 2 */ | ||
52 | 6, /* USART 3 */ | ||
53 | 0, /* Multimedia Card Interface */ | ||
54 | 4, /* USB Device Port */ | ||
55 | 0, /* Two-Wire Interface */ | ||
56 | 6, /* Serial Peripheral Interface */ | ||
57 | 5, /* Serial Synchronous Controller */ | ||
58 | 5, /* Serial Synchronous Controller */ | ||
59 | 5, /* Serial Synchronous Controller */ | ||
60 | 0, /* Timer Counter 0 */ | ||
61 | 0, /* Timer Counter 1 */ | ||
62 | 0, /* Timer Counter 2 */ | ||
63 | 0, /* Timer Counter 3 */ | ||
64 | 0, /* Timer Counter 4 */ | ||
65 | 0, /* Timer Counter 5 */ | ||
66 | 3, /* USB Host port */ | ||
67 | 3, /* Ethernet MAC */ | ||
68 | 0, /* Advanced Interrupt Controller */ | ||
69 | 0, /* Advanced Interrupt Controller */ | ||
70 | 0, /* Advanced Interrupt Controller */ | ||
71 | 0, /* Advanced Interrupt Controller */ | ||
72 | 0, /* Advanced Interrupt Controller */ | ||
73 | 0, /* Advanced Interrupt Controller */ | ||
74 | 0 /* Advanced Interrupt Controller */ | ||
75 | }; | ||
76 | 39 | ||
77 | 40 | static void at91_aic_mask_irq(unsigned int irq) | |
78 | static void at91rm9200_mask_irq(unsigned int irq) | ||
79 | { | 41 | { |
80 | /* Disable interrupt on AIC */ | 42 | /* Disable interrupt on AIC */ |
81 | at91_sys_write(AT91_AIC_IDCR, 1 << irq); | 43 | at91_sys_write(AT91_AIC_IDCR, 1 << irq); |
82 | } | 44 | } |
83 | 45 | ||
84 | static void at91rm9200_unmask_irq(unsigned int irq) | 46 | static void at91_aic_unmask_irq(unsigned int irq) |
85 | { | 47 | { |
86 | /* Enable interrupt on AIC */ | 48 | /* Enable interrupt on AIC */ |
87 | at91_sys_write(AT91_AIC_IECR, 1 << irq); | 49 | at91_sys_write(AT91_AIC_IECR, 1 << irq); |
88 | } | 50 | } |
89 | 51 | ||
90 | static int at91rm9200_irq_type(unsigned irq, unsigned type) | 52 | static int at91_aic_set_type(unsigned irq, unsigned type) |
91 | { | 53 | { |
92 | unsigned int smr, srctype; | 54 | unsigned int smr, srctype; |
93 | 55 | ||
@@ -122,7 +84,7 @@ static int at91rm9200_irq_type(unsigned irq, unsigned type) | |||
122 | static u32 wakeups; | 84 | static u32 wakeups; |
123 | static u32 backups; | 85 | static u32 backups; |
124 | 86 | ||
125 | static int at91rm9200_irq_set_wake(unsigned irq, unsigned value) | 87 | static int at91_aic_set_wake(unsigned irq, unsigned value) |
126 | { | 88 | { |
127 | if (unlikely(irq >= 32)) | 89 | if (unlikely(irq >= 32)) |
128 | return -EINVAL; | 90 | return -EINVAL; |
@@ -149,28 +111,24 @@ void at91_irq_resume(void) | |||
149 | } | 111 | } |
150 | 112 | ||
151 | #else | 113 | #else |
152 | #define at91rm9200_irq_set_wake NULL | 114 | #define at91_aic_set_wake NULL |
153 | #endif | 115 | #endif |
154 | 116 | ||
155 | static struct irqchip at91rm9200_irq_chip = { | 117 | static struct irqchip at91_aic_chip = { |
156 | .ack = at91rm9200_mask_irq, | 118 | .ack = at91_aic_mask_irq, |
157 | .mask = at91rm9200_mask_irq, | 119 | .mask = at91_aic_mask_irq, |
158 | .unmask = at91rm9200_unmask_irq, | 120 | .unmask = at91_aic_unmask_irq, |
159 | .set_type = at91rm9200_irq_type, | 121 | .set_type = at91_aic_set_type, |
160 | .set_wake = at91rm9200_irq_set_wake, | 122 | .set_wake = at91_aic_set_wake, |
161 | }; | 123 | }; |
162 | 124 | ||
163 | /* | 125 | /* |
164 | * Initialize the AIC interrupt controller. | 126 | * Initialize the AIC interrupt controller. |
165 | */ | 127 | */ |
166 | void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS]) | 128 | void __init at91_aic_init(unsigned int priority[NR_AIC_IRQS]) |
167 | { | 129 | { |
168 | unsigned int i; | 130 | unsigned int i; |
169 | 131 | ||
170 | /* No priority list specified for this board -> use defaults */ | ||
171 | if (priority == NULL) | ||
172 | priority = at91rm9200_default_irq_priority; | ||
173 | |||
174 | /* | 132 | /* |
175 | * The IVR is used by macro get_irqnr_and_base to read and verify. | 133 | * The IVR is used by macro get_irqnr_and_base to read and verify. |
176 | * The irq number is NR_AIC_IRQS when a spurious interrupt has occurred. | 134 | * The irq number is NR_AIC_IRQS when a spurious interrupt has occurred. |
@@ -178,10 +136,10 @@ void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS]) | |||
178 | for (i = 0; i < NR_AIC_IRQS; i++) { | 136 | for (i = 0; i < NR_AIC_IRQS; i++) { |
179 | /* Put irq number in Source Vector Register: */ | 137 | /* Put irq number in Source Vector Register: */ |
180 | at91_sys_write(AT91_AIC_SVR(i), i); | 138 | at91_sys_write(AT91_AIC_SVR(i), i); |
181 | /* Store the Source Mode Register as defined in table above */ | 139 | /* Active Low interrupt, with the specified priority */ |
182 | at91_sys_write(AT91_AIC_SMR(i), AT91_AIC_SRCTYPE_LOW | priority[i]); | 140 | at91_sys_write(AT91_AIC_SMR(i), AT91_AIC_SRCTYPE_LOW | priority[i]); |
183 | 141 | ||
184 | set_irq_chip(i, &at91rm9200_irq_chip); | 142 | set_irq_chip(i, &at91_aic_chip); |
185 | set_irq_handler(i, do_level_IRQ); | 143 | set_irq_handler(i, do_level_IRQ); |
186 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); | 144 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); |
187 | 145 | ||
diff --git a/arch/arm/mach-pnx4008/core.c b/arch/arm/mach-pnx4008/core.c index ba91daad64fb..3d73c1e93752 100644 --- a/arch/arm/mach-pnx4008/core.c +++ b/arch/arm/mach-pnx4008/core.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/spi/spi.h> | 27 | #include <linux/spi/spi.h> |
28 | 28 | ||
29 | #include <asm/hardware.h> | 29 | #include <asm/hardware.h> |
30 | #include <asm/irq.h> | ||
31 | #include <asm/io.h> | 30 | #include <asm/io.h> |
32 | #include <asm/setup.h> | 31 | #include <asm/setup.h> |
33 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
@@ -36,7 +35,6 @@ | |||
36 | #include <asm/system.h> | 35 | #include <asm/system.h> |
37 | 36 | ||
38 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
39 | #include <asm/mach/irq.h> | ||
40 | #include <asm/mach/map.h> | 38 | #include <asm/mach/map.h> |
41 | #include <asm/mach/time.h> | 39 | #include <asm/mach/time.h> |
42 | 40 | ||
diff --git a/arch/arm/mach-pnx4008/dma.c b/arch/arm/mach-pnx4008/dma.c index 981aa9dcdede..ec01574f88ac 100644 --- a/arch/arm/mach-pnx4008/dma.c +++ b/arch/arm/mach-pnx4008/dma.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | 24 | ||
25 | #include <asm/system.h> | 25 | #include <asm/system.h> |
26 | #include <asm/irq.h> | ||
27 | #include <asm/hardware.h> | 26 | #include <asm/hardware.h> |
28 | #include <asm/dma.h> | 27 | #include <asm/dma.h> |
29 | #include <asm/dma-mapping.h> | 28 | #include <asm/dma-mapping.h> |
diff --git a/arch/arm/mach-pnx4008/irq.c b/arch/arm/mach-pnx4008/irq.c index 9b0a8e084e99..3a4bcf3d91fa 100644 --- a/arch/arm/mach-pnx4008/irq.c +++ b/arch/arm/mach-pnx4008/irq.c | |||
@@ -22,8 +22,8 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/ioport.h> | 23 | #include <linux/ioport.h> |
24 | #include <linux/device.h> | 24 | #include <linux/device.h> |
25 | #include <linux/irq.h> | ||
25 | #include <asm/hardware.h> | 26 | #include <asm/hardware.h> |
26 | #include <asm/irq.h> | ||
27 | #include <asm/io.h> | 27 | #include <asm/io.h> |
28 | #include <asm/setup.h> | 28 | #include <asm/setup.h> |
29 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
@@ -96,26 +96,24 @@ void __init pnx4008_init_irq(void) | |||
96 | { | 96 | { |
97 | unsigned int i; | 97 | unsigned int i; |
98 | 98 | ||
99 | /* configure and enable IRQ 0,1,30,31 (cascade interrupts) mask all others */ | 99 | /* configure IRQ's */ |
100 | for (i = 0; i < NR_IRQS; i++) { | ||
101 | set_irq_flags(i, IRQF_VALID); | ||
102 | set_irq_chip(i, &pnx4008_irq_chip); | ||
103 | pnx4008_set_irq_type(i, pnx4008_irq_type[i]); | ||
104 | } | ||
105 | |||
106 | /* configure and enable IRQ 0,1,30,31 (cascade interrupts) */ | ||
100 | pnx4008_set_irq_type(SUB1_IRQ_N, pnx4008_irq_type[SUB1_IRQ_N]); | 107 | pnx4008_set_irq_type(SUB1_IRQ_N, pnx4008_irq_type[SUB1_IRQ_N]); |
101 | pnx4008_set_irq_type(SUB2_IRQ_N, pnx4008_irq_type[SUB2_IRQ_N]); | 108 | pnx4008_set_irq_type(SUB2_IRQ_N, pnx4008_irq_type[SUB2_IRQ_N]); |
102 | pnx4008_set_irq_type(SUB1_FIQ_N, pnx4008_irq_type[SUB1_FIQ_N]); | 109 | pnx4008_set_irq_type(SUB1_FIQ_N, pnx4008_irq_type[SUB1_FIQ_N]); |
103 | pnx4008_set_irq_type(SUB2_FIQ_N, pnx4008_irq_type[SUB2_FIQ_N]); | 110 | pnx4008_set_irq_type(SUB2_FIQ_N, pnx4008_irq_type[SUB2_FIQ_N]); |
104 | 111 | ||
112 | /* mask all others */ | ||
105 | __raw_writel((1 << SUB2_FIQ_N) | (1 << SUB1_FIQ_N) | | 113 | __raw_writel((1 << SUB2_FIQ_N) | (1 << SUB1_FIQ_N) | |
106 | (1 << SUB2_IRQ_N) | (1 << SUB1_IRQ_N), | 114 | (1 << SUB2_IRQ_N) | (1 << SUB1_IRQ_N), |
107 | INTC_ER(MAIN_BASE_INT)); | 115 | INTC_ER(MAIN_BASE_INT)); |
108 | __raw_writel(0, INTC_ER(SIC1_BASE_INT)); | 116 | __raw_writel(0, INTC_ER(SIC1_BASE_INT)); |
109 | __raw_writel(0, INTC_ER(SIC2_BASE_INT)); | 117 | __raw_writel(0, INTC_ER(SIC2_BASE_INT)); |
110 | |||
111 | /* configure all other IRQ's */ | ||
112 | for (i = 0; i < NR_IRQS; i++) { | ||
113 | if (i == SUB2_FIQ_N || i == SUB1_FIQ_N || | ||
114 | i == SUB2_IRQ_N || i == SUB1_IRQ_N) | ||
115 | continue; | ||
116 | set_irq_flags(i, IRQF_VALID); | ||
117 | set_irq_chip(i, &pnx4008_irq_chip); | ||
118 | pnx4008_set_irq_type(i, pnx4008_irq_type[i]); | ||
119 | } | ||
120 | } | 118 | } |
121 | 119 | ||
diff --git a/arch/arm/mach-pnx4008/time.c b/arch/arm/mach-pnx4008/time.c index 888bf6cfba8a..756228ddd035 100644 --- a/arch/arm/mach-pnx4008/time.c +++ b/arch/arm/mach-pnx4008/time.c | |||
@@ -20,17 +20,15 @@ | |||
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/kallsyms.h> | 22 | #include <linux/kallsyms.h> |
23 | #include <linux/time.h> | ||
24 | #include <linux/timex.h> | ||
25 | #include <linux/irq.h> | ||
23 | 26 | ||
24 | #include <asm/system.h> | 27 | #include <asm/system.h> |
25 | #include <asm/hardware.h> | 28 | #include <asm/hardware.h> |
26 | #include <asm/io.h> | 29 | #include <asm/io.h> |
27 | #include <asm/leds.h> | 30 | #include <asm/leds.h> |
28 | #include <asm/irq.h> | ||
29 | #include <asm/mach/irq.h> | ||
30 | #include <asm/mach/time.h> | 31 | #include <asm/mach/time.h> |
31 | |||
32 | #include <linux/time.h> | ||
33 | #include <linux/timex.h> | ||
34 | #include <asm/errno.h> | 32 | #include <asm/errno.h> |
35 | 33 | ||
36 | /*! Note: all timers are UPCOUNTING */ | 34 | /*! Note: all timers are UPCOUNTING */ |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 7d31d7cc392d..9cecebaa0360 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -405,20 +405,22 @@ static void mpic_unmask_irq(unsigned int irq) | |||
405 | unsigned int loops = 100000; | 405 | unsigned int loops = 100000; |
406 | struct mpic *mpic = mpic_from_irq(irq); | 406 | struct mpic *mpic = mpic_from_irq(irq); |
407 | unsigned int src = mpic_irq_to_hw(irq); | 407 | unsigned int src = mpic_irq_to_hw(irq); |
408 | unsigned long flags; | ||
408 | 409 | ||
409 | DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src); | 410 | DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src); |
410 | 411 | ||
412 | spin_lock_irqsave(&mpic_lock, flags); | ||
411 | mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, | 413 | mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, |
412 | mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & | 414 | mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & |
413 | ~MPIC_VECPRI_MASK); | 415 | ~MPIC_VECPRI_MASK); |
414 | |||
415 | /* make sure mask gets to controller before we return to user */ | 416 | /* make sure mask gets to controller before we return to user */ |
416 | do { | 417 | do { |
417 | if (!loops--) { | 418 | if (!loops--) { |
418 | printk(KERN_ERR "mpic_enable_irq timeout\n"); | 419 | printk(KERN_ERR "mpic_enable_irq timeout\n"); |
419 | break; | 420 | break; |
420 | } | 421 | } |
421 | } while(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK); | 422 | } while(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK); |
423 | spin_unlock_irqrestore(&mpic_lock, flags); | ||
422 | } | 424 | } |
423 | 425 | ||
424 | static void mpic_mask_irq(unsigned int irq) | 426 | static void mpic_mask_irq(unsigned int irq) |
@@ -426,9 +428,11 @@ static void mpic_mask_irq(unsigned int irq) | |||
426 | unsigned int loops = 100000; | 428 | unsigned int loops = 100000; |
427 | struct mpic *mpic = mpic_from_irq(irq); | 429 | struct mpic *mpic = mpic_from_irq(irq); |
428 | unsigned int src = mpic_irq_to_hw(irq); | 430 | unsigned int src = mpic_irq_to_hw(irq); |
431 | unsigned long flags; | ||
429 | 432 | ||
430 | DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src); | 433 | DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src); |
431 | 434 | ||
435 | spin_lock_irqsave(&mpic_lock, flags); | ||
432 | mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, | 436 | mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, |
433 | mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) | | 437 | mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) | |
434 | MPIC_VECPRI_MASK); | 438 | MPIC_VECPRI_MASK); |
@@ -440,6 +444,7 @@ static void mpic_mask_irq(unsigned int irq) | |||
440 | break; | 444 | break; |
441 | } | 445 | } |
442 | } while(!(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK)); | 446 | } while(!(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK)); |
447 | spin_unlock_irqrestore(&mpic_lock, flags); | ||
443 | } | 448 | } |
444 | 449 | ||
445 | static void mpic_end_irq(unsigned int irq) | 450 | static void mpic_end_irq(unsigned int irq) |
@@ -624,9 +629,10 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq, | |||
624 | struct irq_desc *desc = get_irq_desc(virq); | 629 | struct irq_desc *desc = get_irq_desc(virq); |
625 | struct irq_chip *chip; | 630 | struct irq_chip *chip; |
626 | struct mpic *mpic = h->host_data; | 631 | struct mpic *mpic = h->host_data; |
627 | unsigned int vecpri = MPIC_VECPRI_SENSE_LEVEL | | 632 | u32 v, vecpri = MPIC_VECPRI_SENSE_LEVEL | |
628 | MPIC_VECPRI_POLARITY_NEGATIVE; | 633 | MPIC_VECPRI_POLARITY_NEGATIVE; |
629 | int level; | 634 | int level; |
635 | unsigned long iflags; | ||
630 | 636 | ||
631 | pr_debug("mpic: map virq %d, hwirq 0x%lx, flags: 0x%x\n", | 637 | pr_debug("mpic: map virq %d, hwirq 0x%lx, flags: 0x%x\n", |
632 | virq, hw, flags); | 638 | virq, hw, flags); |
@@ -668,11 +674,21 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq, | |||
668 | } | 674 | } |
669 | #endif | 675 | #endif |
670 | 676 | ||
671 | /* Reconfigure irq */ | 677 | /* Reconfigure irq. We must preserve the mask bit as we can be called |
672 | vecpri |= MPIC_VECPRI_MASK | hw | (8 << MPIC_VECPRI_PRIORITY_SHIFT); | 678 | * while the interrupt is still active (This may change in the future |
673 | mpic_irq_write(hw, MPIC_IRQ_VECTOR_PRI, vecpri); | 679 | * but for now, it is the case). |
674 | 680 | */ | |
675 | pr_debug("mpic: mapping as IRQ\n"); | 681 | spin_lock_irqsave(&mpic_lock, iflags); |
682 | v = mpic_irq_read(hw, MPIC_IRQ_VECTOR_PRI); | ||
683 | vecpri = (v & | ||
684 | ~(MPIC_VECPRI_POLARITY_MASK | MPIC_VECPRI_SENSE_MASK)) | | ||
685 | vecpri; | ||
686 | if (vecpri != v) | ||
687 | mpic_irq_write(hw, MPIC_IRQ_VECTOR_PRI, vecpri); | ||
688 | spin_unlock_irqrestore(&mpic_lock, iflags); | ||
689 | |||
690 | pr_debug("mpic: mapping as IRQ, vecpri = 0x%08x (was 0x%08x)\n", | ||
691 | vecpri, v); | ||
676 | 692 | ||
677 | set_irq_chip_data(virq, mpic); | 693 | set_irq_chip_data(virq, mpic); |
678 | set_irq_chip_and_handler(virq, chip, handle_fasteoi_irq); | 694 | set_irq_chip_and_handler(virq, chip, handle_fasteoi_irq); |
@@ -904,8 +920,8 @@ void __init mpic_init(struct mpic *mpic) | |||
904 | 920 | ||
905 | /* do senses munging */ | 921 | /* do senses munging */ |
906 | if (mpic->senses && i < mpic->senses_count) | 922 | if (mpic->senses && i < mpic->senses_count) |
907 | vecpri = mpic_flags_to_vecpri(mpic->senses[i], | 923 | vecpri |= mpic_flags_to_vecpri(mpic->senses[i], |
908 | &level); | 924 | &level); |
909 | else | 925 | else |
910 | vecpri |= MPIC_VECPRI_SENSE_LEVEL; | 926 | vecpri |= MPIC_VECPRI_SENSE_LEVEL; |
911 | 927 | ||
@@ -955,14 +971,17 @@ void __init mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio) | |||
955 | 971 | ||
956 | void __init mpic_set_serial_int(struct mpic *mpic, int enable) | 972 | void __init mpic_set_serial_int(struct mpic *mpic, int enable) |
957 | { | 973 | { |
974 | unsigned long flags; | ||
958 | u32 v; | 975 | u32 v; |
959 | 976 | ||
977 | spin_lock_irqsave(&mpic_lock, flags); | ||
960 | v = mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1); | 978 | v = mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1); |
961 | if (enable) | 979 | if (enable) |
962 | v |= MPIC_GREG_GLOBAL_CONF_1_SIE; | 980 | v |= MPIC_GREG_GLOBAL_CONF_1_SIE; |
963 | else | 981 | else |
964 | v &= ~MPIC_GREG_GLOBAL_CONF_1_SIE; | 982 | v &= ~MPIC_GREG_GLOBAL_CONF_1_SIE; |
965 | mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1, v); | 983 | mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1, v); |
984 | spin_unlock_irqrestore(&mpic_lock, flags); | ||
966 | } | 985 | } |
967 | 986 | ||
968 | void mpic_irq_set_priority(unsigned int irq, unsigned int pri) | 987 | void mpic_irq_set_priority(unsigned int irq, unsigned int pri) |
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c index fa484d4f241e..99daeee4209d 100644 --- a/arch/sparc64/kernel/prom.c +++ b/arch/sparc64/kernel/prom.c | |||
@@ -1032,7 +1032,9 @@ static void sun4v_vdev_irq_trans_init(struct device_node *dp) | |||
1032 | static void irq_trans_init(struct device_node *dp) | 1032 | static void irq_trans_init(struct device_node *dp) |
1033 | { | 1033 | { |
1034 | const char *model; | 1034 | const char *model; |
1035 | #ifdef CONFIG_PCI | ||
1035 | int i; | 1036 | int i; |
1037 | #endif | ||
1036 | 1038 | ||
1037 | model = of_get_property(dp, "model", NULL); | 1039 | model = of_get_property(dp, "model", NULL); |
1038 | if (!model) | 1040 | if (!model) |
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 4173de425f09..237524d87cab 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c | |||
@@ -124,11 +124,6 @@ EXPORT_SYMBOL(__write_lock); | |||
124 | EXPORT_SYMBOL(__write_unlock); | 124 | EXPORT_SYMBOL(__write_unlock); |
125 | EXPORT_SYMBOL(__write_trylock); | 125 | EXPORT_SYMBOL(__write_trylock); |
126 | 126 | ||
127 | #if defined(CONFIG_MCOUNT) | ||
128 | extern void _mcount(void); | ||
129 | EXPORT_SYMBOL(_mcount); | ||
130 | #endif | ||
131 | |||
132 | /* CPU online map and active count. */ | 127 | /* CPU online map and active count. */ |
133 | EXPORT_SYMBOL(cpu_online_map); | 128 | EXPORT_SYMBOL(cpu_online_map); |
134 | EXPORT_SYMBOL(phys_cpu_present_map); | 129 | EXPORT_SYMBOL(phys_cpu_present_map); |
@@ -136,6 +131,11 @@ EXPORT_SYMBOL(phys_cpu_present_map); | |||
136 | EXPORT_SYMBOL(smp_call_function); | 131 | EXPORT_SYMBOL(smp_call_function); |
137 | #endif /* CONFIG_SMP */ | 132 | #endif /* CONFIG_SMP */ |
138 | 133 | ||
134 | #if defined(CONFIG_MCOUNT) | ||
135 | extern void _mcount(void); | ||
136 | EXPORT_SYMBOL(_mcount); | ||
137 | #endif | ||
138 | |||
139 | EXPORT_SYMBOL(sparc64_get_clock_tick); | 139 | EXPORT_SYMBOL(sparc64_get_clock_tick); |
140 | 140 | ||
141 | /* semaphores */ | 141 | /* semaphores */ |
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 8dcbfbffacc9..b43de647ba73 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
@@ -788,12 +788,15 @@ static int __devinit clock_probe(struct of_device *op, const struct of_device_id | |||
788 | if (!regs) | 788 | if (!regs) |
789 | return -ENOMEM; | 789 | return -ENOMEM; |
790 | 790 | ||
791 | #ifdef CONFIG_PCI | ||
791 | if (!strcmp(model, "ds1287") || | 792 | if (!strcmp(model, "ds1287") || |
792 | !strcmp(model, "m5819") || | 793 | !strcmp(model, "m5819") || |
793 | !strcmp(model, "m5819p") || | 794 | !strcmp(model, "m5819p") || |
794 | !strcmp(model, "m5823")) { | 795 | !strcmp(model, "m5823")) { |
795 | ds1287_regs = (unsigned long) regs; | 796 | ds1287_regs = (unsigned long) regs; |
796 | } else if (model[5] == '0' && model[6] == '2') { | 797 | } else |
798 | #endif | ||
799 | if (model[5] == '0' && model[6] == '2') { | ||
797 | mstk48t02_regs = regs; | 800 | mstk48t02_regs = regs; |
798 | } else if(model[5] == '0' && model[6] == '8') { | 801 | } else if(model[5] == '0' && model[6] == '8') { |
799 | mstk48t08_regs = regs; | 802 | mstk48t08_regs = regs; |