diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2011-02-26 02:02:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-16 21:19:14 -0400 |
commit | 0399bb5b918bd8ffbf065a3db142ff121aaa18e0 (patch) | |
tree | 12a4d8a64993c7e7b1fd4acf0e4a729b95551357 /arch/sparc | |
parent | 1d05995b0880b23353741d5b2b826f7c2fd6a296 (diff) |
sparc32,sun4m: percpu and global register definitions moved to irq.h
entry.S access percpu + global data defined in
sun4m_irq.c - so move the types to irq.h.
This makes sparse happy and allow us to utilize
asm-offsets later.
Also updated a few comments in the sun4m_irq.c file.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/irq.h | 21 | ||||
-rw-r--r-- | arch/sparc/kernel/sun4m_irq.c | 30 |
2 files changed, 30 insertions, 21 deletions
diff --git a/arch/sparc/kernel/irq.h b/arch/sparc/kernel/irq.h index 0b4d5b902165..008453b798ec 100644 --- a/arch/sparc/kernel/irq.h +++ b/arch/sparc/kernel/irq.h | |||
@@ -2,6 +2,27 @@ | |||
2 | 2 | ||
3 | #include <asm/btfixup.h> | 3 | #include <asm/btfixup.h> |
4 | 4 | ||
5 | /* sun4m specific type definitions */ | ||
6 | |||
7 | /* This maps direct to CPU specific interrupt registers */ | ||
8 | struct sun4m_irq_percpu { | ||
9 | u32 pending; | ||
10 | u32 clear; | ||
11 | u32 set; | ||
12 | }; | ||
13 | |||
14 | /* This maps direct to global interrupt registers */ | ||
15 | struct sun4m_irq_global { | ||
16 | u32 pending; | ||
17 | u32 mask; | ||
18 | u32 mask_clear; | ||
19 | u32 mask_set; | ||
20 | u32 interrupt_target; | ||
21 | }; | ||
22 | |||
23 | extern struct sun4m_irq_percpu __iomem *sun4m_irq_percpu[SUN4M_NCPUS]; | ||
24 | extern struct sun4m_irq_global __iomem *sun4m_irq_global; | ||
25 | |||
5 | /* | 26 | /* |
6 | * Platform specific irq configuration | 27 | * Platform specific irq configuration |
7 | * The individual platforms assign their platform | 28 | * The individual platforms assign their platform |
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c index 1e13ce96dc7e..69df6257a32e 100644 --- a/arch/sparc/kernel/sun4m_irq.c +++ b/arch/sparc/kernel/sun4m_irq.c | |||
@@ -96,20 +96,6 @@ | |||
96 | */ | 96 | */ |
97 | 97 | ||
98 | 98 | ||
99 | struct sun4m_irq_percpu { | ||
100 | u32 pending; | ||
101 | u32 clear; | ||
102 | u32 set; | ||
103 | }; | ||
104 | |||
105 | struct sun4m_irq_global { | ||
106 | u32 pending; | ||
107 | u32 mask; | ||
108 | u32 mask_clear; | ||
109 | u32 mask_set; | ||
110 | u32 interrupt_target; | ||
111 | }; | ||
112 | |||
113 | /* Code in entry.S needs to get at these register mappings. */ | 99 | /* Code in entry.S needs to get at these register mappings. */ |
114 | struct sun4m_irq_percpu __iomem *sun4m_irq_percpu[SUN4M_NCPUS]; | 100 | struct sun4m_irq_percpu __iomem *sun4m_irq_percpu[SUN4M_NCPUS]; |
115 | struct sun4m_irq_global __iomem *sun4m_irq_global; | 101 | struct sun4m_irq_global __iomem *sun4m_irq_global; |
@@ -155,8 +141,11 @@ struct sun4m_irq_global __iomem *sun4m_irq_global; | |||
155 | #define OBP_INT_LEVEL_SBUS 0x30 | 141 | #define OBP_INT_LEVEL_SBUS 0x30 |
156 | #define OBP_INT_LEVEL_VME 0x40 | 142 | #define OBP_INT_LEVEL_VME 0x40 |
157 | 143 | ||
144 | #define SUN4M_TIMER_IRQ (OBP_INT_LEVEL_ONBOARD | 10) | ||
145 | #define SUM4M_PROFILE_IRQ (OBP_INT_LEVEL_ONBOARD | 14) | ||
146 | |||
158 | static unsigned long irq_mask[0x50] = { | 147 | static unsigned long irq_mask[0x50] = { |
159 | /* SMP */ | 148 | /* 0x00 - SMP */ |
160 | 0, SUN4M_SOFT_INT(1), | 149 | 0, SUN4M_SOFT_INT(1), |
161 | SUN4M_SOFT_INT(2), SUN4M_SOFT_INT(3), | 150 | SUN4M_SOFT_INT(2), SUN4M_SOFT_INT(3), |
162 | SUN4M_SOFT_INT(4), SUN4M_SOFT_INT(5), | 151 | SUN4M_SOFT_INT(4), SUN4M_SOFT_INT(5), |
@@ -165,7 +154,7 @@ static unsigned long irq_mask[0x50] = { | |||
165 | SUN4M_SOFT_INT(10), SUN4M_SOFT_INT(11), | 154 | SUN4M_SOFT_INT(10), SUN4M_SOFT_INT(11), |
166 | SUN4M_SOFT_INT(12), SUN4M_SOFT_INT(13), | 155 | SUN4M_SOFT_INT(12), SUN4M_SOFT_INT(13), |
167 | SUN4M_SOFT_INT(14), SUN4M_SOFT_INT(15), | 156 | SUN4M_SOFT_INT(14), SUN4M_SOFT_INT(15), |
168 | /* soft */ | 157 | /* 0x10 - soft */ |
169 | 0, SUN4M_SOFT_INT(1), | 158 | 0, SUN4M_SOFT_INT(1), |
170 | SUN4M_SOFT_INT(2), SUN4M_SOFT_INT(3), | 159 | SUN4M_SOFT_INT(2), SUN4M_SOFT_INT(3), |
171 | SUN4M_SOFT_INT(4), SUN4M_SOFT_INT(5), | 160 | SUN4M_SOFT_INT(4), SUN4M_SOFT_INT(5), |
@@ -174,19 +163,19 @@ static unsigned long irq_mask[0x50] = { | |||
174 | SUN4M_SOFT_INT(10), SUN4M_SOFT_INT(11), | 163 | SUN4M_SOFT_INT(10), SUN4M_SOFT_INT(11), |
175 | SUN4M_SOFT_INT(12), SUN4M_SOFT_INT(13), | 164 | SUN4M_SOFT_INT(12), SUN4M_SOFT_INT(13), |
176 | SUN4M_SOFT_INT(14), SUN4M_SOFT_INT(15), | 165 | SUN4M_SOFT_INT(14), SUN4M_SOFT_INT(15), |
177 | /* onboard */ | 166 | /* 0x20 - onboard */ |
178 | 0, 0, 0, 0, | 167 | 0, 0, 0, 0, |
179 | SUN4M_INT_SCSI, 0, SUN4M_INT_ETHERNET, 0, | 168 | SUN4M_INT_SCSI, 0, SUN4M_INT_ETHERNET, 0, |
180 | SUN4M_INT_VIDEO, SUN4M_INT_MODULE, | 169 | SUN4M_INT_VIDEO, SUN4M_INT_MODULE, |
181 | SUN4M_INT_REALTIME, SUN4M_INT_FLOPPY, | 170 | SUN4M_INT_REALTIME, SUN4M_INT_FLOPPY, |
182 | (SUN4M_INT_SERIAL | SUN4M_INT_KBDMS), | 171 | (SUN4M_INT_SERIAL | SUN4M_INT_KBDMS), |
183 | SUN4M_INT_AUDIO, 0, SUN4M_INT_MODULE_ERR, | 172 | SUN4M_INT_AUDIO, 0, SUN4M_INT_MODULE_ERR, |
184 | /* sbus */ | 173 | /* 0x30 - sbus */ |
185 | 0, 0, SUN4M_INT_SBUS(0), SUN4M_INT_SBUS(1), | 174 | 0, 0, SUN4M_INT_SBUS(0), SUN4M_INT_SBUS(1), |
186 | 0, SUN4M_INT_SBUS(2), 0, SUN4M_INT_SBUS(3), | 175 | 0, SUN4M_INT_SBUS(2), 0, SUN4M_INT_SBUS(3), |
187 | 0, SUN4M_INT_SBUS(4), 0, SUN4M_INT_SBUS(5), | 176 | 0, SUN4M_INT_SBUS(4), 0, SUN4M_INT_SBUS(5), |
188 | 0, SUN4M_INT_SBUS(6), 0, 0, | 177 | 0, SUN4M_INT_SBUS(6), 0, 0, |
189 | /* vme */ | 178 | /* 0x40 - vme */ |
190 | 0, 0, SUN4M_INT_VME(0), SUN4M_INT_VME(1), | 179 | 0, 0, SUN4M_INT_VME(0), SUN4M_INT_VME(1), |
191 | 0, SUN4M_INT_VME(2), 0, SUN4M_INT_VME(3), | 180 | 0, SUN4M_INT_VME(2), 0, SUN4M_INT_VME(3), |
192 | 0, SUN4M_INT_VME(4), 0, SUN4M_INT_VME(5), | 181 | 0, SUN4M_INT_VME(4), 0, SUN4M_INT_VME(5), |
@@ -319,7 +308,6 @@ struct sun4m_timer_global { | |||
319 | 308 | ||
320 | static struct sun4m_timer_global __iomem *timers_global; | 309 | static struct sun4m_timer_global __iomem *timers_global; |
321 | 310 | ||
322 | #define TIMER_IRQ (OBP_INT_LEVEL_ONBOARD | 10) | ||
323 | 311 | ||
324 | unsigned int lvl14_resolution = (((1000000/HZ) + 1) << 10); | 312 | unsigned int lvl14_resolution = (((1000000/HZ) + 1) << 10); |
325 | 313 | ||
@@ -396,7 +384,7 @@ static void __init sun4m_init_timers(irq_handler_t counter_fn) | |||
396 | 384 | ||
397 | master_l10_counter = &timers_global->l10_count; | 385 | master_l10_counter = &timers_global->l10_count; |
398 | 386 | ||
399 | err = request_irq(TIMER_IRQ, counter_fn, | 387 | err = request_irq(SUN4M_TIMER_IRQ, counter_fn, |
400 | (IRQF_DISABLED | SA_STATIC_ALLOC), "timer", NULL); | 388 | (IRQF_DISABLED | SA_STATIC_ALLOC), "timer", NULL); |
401 | if (err) { | 389 | if (err) { |
402 | printk(KERN_ERR "sun4m_init_timers: Register IRQ error %d.\n", | 390 | printk(KERN_ERR "sun4m_init_timers: Register IRQ error %d.\n", |