diff options
Diffstat (limited to 'arch/mips/sgi-ip27')
-rw-r--r-- | arch/mips/sgi-ip27/Kconfig | 38 | ||||
-rw-r--r-- | arch/mips/sgi-ip27/ip27-init.c | 4 | ||||
-rw-r--r-- | arch/mips/sgi-ip27/ip27-irq.c | 2 | ||||
-rw-r--r-- | arch/mips/sgi-ip27/ip27-timer.c | 61 |
4 files changed, 80 insertions, 25 deletions
diff --git a/arch/mips/sgi-ip27/Kconfig b/arch/mips/sgi-ip27/Kconfig index 7b0bc4437243..f14ef38646d0 100644 --- a/arch/mips/sgi-ip27/Kconfig +++ b/arch/mips/sgi-ip27/Kconfig | |||
@@ -4,31 +4,29 @@ | |||
4 | # This options adds support for userspace processes upto 16TB size. | 4 | # This options adds support for userspace processes upto 16TB size. |
5 | # Normally the limit is just .5TB. | 5 | # Normally the limit is just .5TB. |
6 | 6 | ||
7 | config SGI_SN0_N_MODE | 7 | choice |
8 | bool "IP27 N-Mode" | 8 | prompt "Node addressing mode" |
9 | depends on SGI_IP27 | 9 | depends on SGI_IP27 |
10 | help | 10 | default SGI_SN_M_MODE |
11 | The nodes of Origin 200, Origin 2000 and Onyx 2 systems can be | ||
12 | configured in either N-Modes which allows for more nodes or M-Mode | ||
13 | which allows for more memory. Your system is most probably | ||
14 | running in M-Mode, so you should say N here. | ||
15 | 11 | ||
16 | config ARCH_DISCONTIGMEM_ENABLE | 12 | config SGI_SN_M_MODE |
17 | bool | 13 | bool "IP27 M-Mode" |
18 | default y if SGI_IP27 | ||
19 | help | 14 | help |
20 | Say Y to upport efficient handling of discontiguous physical memory, | 15 | The nodes of Origin, Onyx, Fuel and Tezro systems can be configured |
21 | for architectures which are either NUMA (Non-Uniform Memory Access) | 16 | in either N-Modes which allows for more nodes or M-Mode which allows |
22 | or have huge holes in the physical address space for other reasons. | 17 | for more memory. Your hardware is almost certainly running in |
23 | See <file:Documentation/vm/numa> for more. | 18 | M-Mode, so choose M-mode here. |
24 | 19 | ||
25 | config NUMA | 20 | config SGI_SN_N_MODE |
26 | bool "NUMA Support" | 21 | bool "IP27 N-Mode" |
27 | depends on SGI_IP27 | 22 | depends on EXPERIMENTAL |
28 | help | 23 | help |
29 | Say Y to compile the kernel to support NUMA (Non-Uniform Memory | 24 | The nodes of Origin, Onyx, Fuel and Tezro systems can be configured |
30 | Access). This option is for configuring high-end multiprocessor | 25 | in either N-Modes which allows for more nodes or M-Mode which allows |
31 | server machines. If in doubt, say N. | 26 | for more memory. Your hardware is almost certainly running in |
27 | M-Mode, so choose M-mode here. | ||
28 | |||
29 | endchoice | ||
32 | 30 | ||
33 | config MAPPED_KERNEL | 31 | config MAPPED_KERNEL |
34 | bool "Mapped kernel support" | 32 | bool "Mapped kernel support" |
diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c index 8651a0e75404..a6b490e99709 100644 --- a/arch/mips/sgi-ip27/ip27-init.c +++ b/arch/mips/sgi-ip27/ip27-init.c | |||
@@ -196,7 +196,7 @@ extern void ip27_setup_console(void); | |||
196 | extern void ip27_time_init(void); | 196 | extern void ip27_time_init(void); |
197 | extern void ip27_reboot_setup(void); | 197 | extern void ip27_reboot_setup(void); |
198 | 198 | ||
199 | void __init plat_setup(void) | 199 | void __init plat_mem_setup(void) |
200 | { | 200 | { |
201 | hubreg_t p, e, n_mode; | 201 | hubreg_t p, e, n_mode; |
202 | nasid_t nid; | 202 | nasid_t nid; |
@@ -228,7 +228,7 @@ void __init plat_setup(void) | |||
228 | */ | 228 | */ |
229 | n_mode = LOCAL_HUB_L(NI_STATUS_REV_ID) & NSRI_MORENODES_MASK; | 229 | n_mode = LOCAL_HUB_L(NI_STATUS_REV_ID) & NSRI_MORENODES_MASK; |
230 | printk("Machine is in %c mode.\n", n_mode ? 'N' : 'M'); | 230 | printk("Machine is in %c mode.\n", n_mode ? 'N' : 'M'); |
231 | #ifdef CONFIG_SGI_SN0_N_MODE | 231 | #ifdef CONFIG_SGI_SN_N_MODE |
232 | if (!n_mode) | 232 | if (!n_mode) |
233 | panic("Kernel compiled for M mode."); | 233 | panic("Kernel compiled for M mode."); |
234 | #else | 234 | #else |
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index 2e643d2f51cb..0b61a39ce2bb 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c | |||
@@ -360,7 +360,7 @@ static struct hw_interrupt_type bridge_irq_type = { | |||
360 | 360 | ||
361 | static unsigned long irq_map[NR_IRQS / BITS_PER_LONG]; | 361 | static unsigned long irq_map[NR_IRQS / BITS_PER_LONG]; |
362 | 362 | ||
363 | static int allocate_irqno(void) | 363 | int allocate_irqno(void) |
364 | { | 364 | { |
365 | int irq; | 365 | int irq; |
366 | 366 | ||
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c index 36b662e27b6e..1fb860c7ac6d 100644 --- a/arch/mips/sgi-ip27/ip27-timer.c +++ b/arch/mips/sgi-ip27/ip27-timer.c | |||
@@ -89,11 +89,13 @@ static int set_rtc_mmss(unsigned long nowtime) | |||
89 | } | 89 | } |
90 | #endif | 90 | #endif |
91 | 91 | ||
92 | static unsigned int rt_timer_irq; | ||
93 | |||
92 | void ip27_rt_timer_interrupt(struct pt_regs *regs) | 94 | void ip27_rt_timer_interrupt(struct pt_regs *regs) |
93 | { | 95 | { |
94 | int cpu = smp_processor_id(); | 96 | int cpu = smp_processor_id(); |
95 | int cpuA = cputoslice(cpu) == 0; | 97 | int cpuA = cputoslice(cpu) == 0; |
96 | int irq = 9; /* XXX Assign number */ | 98 | unsigned int irq = rt_timer_irq; |
97 | 99 | ||
98 | irq_enter(); | 100 | irq_enter(); |
99 | write_seqlock(&xtime_lock); | 101 | write_seqlock(&xtime_lock); |
@@ -179,13 +181,68 @@ static __init unsigned long get_m48t35_time(void) | |||
179 | return mktime(year, month, date, hour, min, sec); | 181 | return mktime(year, month, date, hour, min, sec); |
180 | } | 182 | } |
181 | 183 | ||
184 | static void startup_rt_irq(unsigned int irq) | ||
185 | { | ||
186 | } | ||
187 | |||
188 | static void shutdown_rt_irq(unsigned int irq) | ||
189 | { | ||
190 | } | ||
191 | |||
192 | static void enable_rt_irq(unsigned int irq) | ||
193 | { | ||
194 | } | ||
195 | |||
196 | static void disable_rt_irq(unsigned int irq) | ||
197 | { | ||
198 | } | ||
199 | |||
200 | static void mask_and_ack_rt(unsigned int irq) | ||
201 | { | ||
202 | } | ||
203 | |||
204 | static void end_rt_irq(unsigned int irq) | ||
205 | { | ||
206 | } | ||
207 | |||
208 | static struct hw_interrupt_type rt_irq_type = { | ||
209 | .typename = "SN HUB RT timer", | ||
210 | .startup = startup_rt_irq, | ||
211 | .shutdown = shutdown_rt_irq, | ||
212 | .enable = enable_rt_irq, | ||
213 | .disable = disable_rt_irq, | ||
214 | .ack = mask_and_ack_rt, | ||
215 | .end = end_rt_irq, | ||
216 | }; | ||
217 | |||
218 | static struct irqaction rt_irqaction = { | ||
219 | .handler = ip27_rt_timer_interrupt, | ||
220 | .flags = SA_INTERRUPT, | ||
221 | .mask = CPU_MASK_NONE, | ||
222 | .name = "timer" | ||
223 | }; | ||
224 | |||
225 | extern int allocate_irqno(void); | ||
226 | |||
182 | static void ip27_timer_setup(struct irqaction *irq) | 227 | static void ip27_timer_setup(struct irqaction *irq) |
183 | { | 228 | { |
229 | int irqno = allocate_irqno(); | ||
230 | |||
231 | if (irqno < 0) | ||
232 | panic("Can't allocate interrupt number for timer interrupt"); | ||
233 | |||
234 | irq_desc[irqno].status = IRQ_DISABLED; | ||
235 | irq_desc[irqno].action = NULL; | ||
236 | irq_desc[irqno].depth = 1; | ||
237 | irq_desc[irqno].handler = &rt_irq_type; | ||
238 | |||
184 | /* over-write the handler, we use our own way */ | 239 | /* over-write the handler, we use our own way */ |
185 | irq->handler = no_action; | 240 | irq->handler = no_action; |
186 | 241 | ||
187 | /* setup irqaction */ | 242 | /* setup irqaction */ |
188 | // setup_irq(IP27_TIMER_IRQ, irq); /* XXX Can't do this yet. */ | 243 | irq_desc[irqno].status |= IRQ_PER_CPU; |
244 | |||
245 | rt_timer_irq = irqno; | ||
189 | } | 246 | } |
190 | 247 | ||
191 | void __init ip27_time_init(void) | 248 | void __init ip27_time_init(void) |