diff options
Diffstat (limited to 'arch')
65 files changed, 446 insertions, 295 deletions
diff --git a/arch/cris/Makefile b/arch/cris/Makefile index ea65d585cf5e..ee114699ef8e 100644 --- a/arch/cris/Makefile +++ b/arch/cris/Makefile | |||
@@ -119,7 +119,7 @@ $(SRC_ARCH)/.links: | |||
119 | @ln -sfn $(SRC_ARCH)/$(SARCH)/lib $(SRC_ARCH)/lib | 119 | @ln -sfn $(SRC_ARCH)/$(SARCH)/lib $(SRC_ARCH)/lib |
120 | @ln -sfn $(SRC_ARCH)/$(SARCH) $(SRC_ARCH)/arch | 120 | @ln -sfn $(SRC_ARCH)/$(SARCH) $(SRC_ARCH)/arch |
121 | @ln -sfn $(SRC_ARCH)/$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S | 121 | @ln -sfn $(SRC_ARCH)/$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S |
122 | @ln -sfn $(SRC_ARCH)/$(SARCH)/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c | 122 | @ln -sfn $(SRC_ARCH)/$(SARCH)/kernel/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c |
123 | @touch $@ | 123 | @touch $@ |
124 | 124 | ||
125 | # Create link to sub arch includes | 125 | # Create link to sub arch includes |
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 98a5c23cf3df..f39e09ef64ec 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -77,7 +77,7 @@ void ack_bad_irq(unsigned int irq) | |||
77 | * completely. | 77 | * completely. |
78 | * But only ack when the APIC is enabled -AK | 78 | * But only ack when the APIC is enabled -AK |
79 | */ | 79 | */ |
80 | if (!cpu_has_apic) | 80 | if (cpu_has_apic) |
81 | ack_APIC_irq(); | 81 | ack_APIC_irq(); |
82 | } | 82 | } |
83 | 83 | ||
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index c3e852e9953e..767de847b4ab 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -595,6 +595,7 @@ config SGI_IP32 | |||
595 | select SYS_HAS_CPU_R5000 | 595 | select SYS_HAS_CPU_R5000 |
596 | select SYS_HAS_CPU_R10000 if BROKEN | 596 | select SYS_HAS_CPU_R10000 if BROKEN |
597 | select SYS_HAS_CPU_RM7000 | 597 | select SYS_HAS_CPU_RM7000 |
598 | select SYS_HAS_CPU_NEVADA | ||
598 | select SYS_SUPPORTS_64BIT_KERNEL | 599 | select SYS_SUPPORTS_64BIT_KERNEL |
599 | select SYS_SUPPORTS_BIG_ENDIAN | 600 | select SYS_SUPPORTS_BIG_ENDIAN |
600 | help | 601 | help |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 2a9f2ef27b29..6a57407df1bc 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -53,14 +53,17 @@ CROSS_COMPILE := $(tool-prefix) | |||
53 | endif | 53 | endif |
54 | 54 | ||
55 | CHECKFLAGS-y += -D__linux__ -D__mips__ \ | 55 | CHECKFLAGS-y += -D__linux__ -D__mips__ \ |
56 | -D_MIPS_SZINT=32 \ | ||
56 | -D_ABIO32=1 \ | 57 | -D_ABIO32=1 \ |
57 | -D_ABIN32=2 \ | 58 | -D_ABIN32=2 \ |
58 | -D_ABI64=3 | 59 | -D_ABI64=3 |
59 | CHECKFLAGS-$(CONFIG_32BIT) += -D_MIPS_SIM=_ABIO32 \ | 60 | CHECKFLAGS-$(CONFIG_32BIT) += -D_MIPS_SIM=_ABIO32 \ |
60 | -D_MIPS_SZLONG=32 \ | 61 | -D_MIPS_SZLONG=32 \ |
62 | -D_MIPS_SZPTR=32 \ | ||
61 | -D__PTRDIFF_TYPE__=int | 63 | -D__PTRDIFF_TYPE__=int |
62 | CHECKFLAGS-$(CONFIG_64BIT) += -m64 -D_MIPS_SIM=_ABI64 \ | 64 | CHECKFLAGS-$(CONFIG_64BIT) += -m64 -D_MIPS_SIM=_ABI64 \ |
63 | -D_MIPS_SZLONG=64 \ | 65 | -D_MIPS_SZLONG=64 \ |
66 | -D_MIPS_SZPTR=64 \ | ||
64 | -D__PTRDIFF_TYPE__="long int" | 67 | -D__PTRDIFF_TYPE__="long int" |
65 | CHECKFLAGS-$(CONFIG_CPU_BIG_ENDIAN) += -D__MIPSEB__ | 68 | CHECKFLAGS-$(CONFIG_CPU_BIG_ENDIAN) += -D__MIPSEB__ |
66 | CHECKFLAGS-$(CONFIG_CPU_LITTLE_ENDIAN) += -D__MIPSEL__ | 69 | CHECKFLAGS-$(CONFIG_CPU_LITTLE_ENDIAN) += -D__MIPSEL__ |
@@ -166,79 +169,97 @@ echo $$gcc_abi $$gcc_opt$$gcc_cpu $$gcc_isa $$gas_abi $$gas_opt$$gas_cpu $$gas_i | |||
166 | # | 169 | # |
167 | cflags-$(CONFIG_CPU_R3000) += \ | 170 | cflags-$(CONFIG_CPU_R3000) += \ |
168 | $(call set_gccflags,r3000,mips1,r3000,mips1,mips1) | 171 | $(call set_gccflags,r3000,mips1,r3000,mips1,mips1) |
172 | CHECKFLAGS-$(CONFIG_CPU_R3000) += -D_MIPS_ISA=_MIPS_ISA_MIPS1 | ||
169 | 173 | ||
170 | cflags-$(CONFIG_CPU_TX39XX) += \ | 174 | cflags-$(CONFIG_CPU_TX39XX) += \ |
171 | $(call set_gccflags,r3900,mips1,r3000,mips1,mips1) | 175 | $(call set_gccflags,r3900,mips1,r3000,mips1,mips1) |
176 | CHECKFLAGS-$(CONFIG_CPU_TX39XX) += -D_MIPS_ISA=_MIPS_ISA_MIPS1 | ||
172 | 177 | ||
173 | cflags-$(CONFIG_CPU_R6000) += \ | 178 | cflags-$(CONFIG_CPU_R6000) += \ |
174 | $(call set_gccflags,r6000,mips2,r6000,mips2,mips2) \ | 179 | $(call set_gccflags,r6000,mips2,r6000,mips2,mips2) \ |
175 | -Wa,--trap | 180 | -Wa,--trap |
181 | CHECKFLAGS-$(CONFIG_CPU_R6000) += -D_MIPS_ISA=_MIPS_ISA_MIPS2 | ||
176 | 182 | ||
177 | cflags-$(CONFIG_CPU_R4300) += \ | 183 | cflags-$(CONFIG_CPU_R4300) += \ |
178 | $(call set_gccflags,r4300,mips3,r4300,mips3,mips2) \ | 184 | $(call set_gccflags,r4300,mips3,r4300,mips3,mips2) \ |
179 | -Wa,--trap | 185 | -Wa,--trap |
186 | CHECKFLAGS-$(CONFIG_CPU_R4300) += -D_MIPS_ISA=_MIPS_ISA_MIPS3 | ||
180 | 187 | ||
181 | cflags-$(CONFIG_CPU_VR41XX) += \ | 188 | cflags-$(CONFIG_CPU_VR41XX) += \ |
182 | $(call set_gccflags,r4100,mips3,r4600,mips3,mips2) \ | 189 | $(call set_gccflags,r4100,mips3,r4600,mips3,mips2) \ |
183 | -Wa,--trap | 190 | -Wa,--trap |
191 | CHECKFLAGS-$(CONFIG_CPU_VR41XX) += -D_MIPS_ISA=_MIPS_ISA_MIPS3 | ||
184 | 192 | ||
185 | cflags-$(CONFIG_CPU_R4X00) += \ | 193 | cflags-$(CONFIG_CPU_R4X00) += \ |
186 | $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \ | 194 | $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \ |
187 | -Wa,--trap | 195 | -Wa,--trap |
196 | CHECKFLAGS-$(CONFIG_CPU_R4X00) += -D_MIPS_ISA=_MIPS_ISA_MIPS3 | ||
188 | 197 | ||
189 | cflags-$(CONFIG_CPU_TX49XX) += \ | 198 | cflags-$(CONFIG_CPU_TX49XX) += \ |
190 | $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \ | 199 | $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \ |
191 | -Wa,--trap | 200 | -Wa,--trap |
201 | CHECKFLAGS-$(CONFIG_CPU_TX49XX) += -D_MIPS_ISA=_MIPS_ISA_MIPS3 | ||
192 | 202 | ||
193 | cflags-$(CONFIG_CPU_MIPS32_R1) += \ | 203 | cflags-$(CONFIG_CPU_MIPS32_R1) += \ |
194 | $(call set_gccflags,mips32,mips32,r4600,mips3,mips2) \ | 204 | $(call set_gccflags,mips32,mips32,r4600,mips3,mips2) \ |
195 | -Wa,--trap | 205 | -Wa,--trap |
206 | CHECKFLAGS-$(CONFIG_CPU_MIPS32_R1) += -D_MIPS_ISA=_MIPS_ISA_MIPS32 | ||
196 | 207 | ||
197 | cflags-$(CONFIG_CPU_MIPS32_R2) += \ | 208 | cflags-$(CONFIG_CPU_MIPS32_R2) += \ |
198 | $(call set_gccflags,mips32r2,mips32r2,r4600,mips3,mips2) \ | 209 | $(call set_gccflags,mips32r2,mips32r2,r4600,mips3,mips2) \ |
199 | -Wa,--trap | 210 | -Wa,--trap |
211 | CHECKFLAGS-$(CONFIG_CPU_MIPS32_R2) += -D_MIPS_ISA=_MIPS_ISA_MIPS32 | ||
200 | 212 | ||
201 | cflags-$(CONFIG_CPU_MIPS64_R1) += \ | 213 | cflags-$(CONFIG_CPU_MIPS64_R1) += \ |
202 | $(call set_gccflags,mips64,mips64,r4600,mips3,mips2) \ | 214 | $(call set_gccflags,mips64,mips64,r4600,mips3,mips2) \ |
203 | -Wa,--trap | 215 | -Wa,--trap |
216 | CHECKFLAGS-$(CONFIG_CPU_MIPS64_R1) += -D_MIPS_ISA=_MIPS_ISA_MIPS64 | ||
204 | 217 | ||
205 | cflags-$(CONFIG_CPU_MIPS64_R2) += \ | 218 | cflags-$(CONFIG_CPU_MIPS64_R2) += \ |
206 | $(call set_gccflags,mips64r2,mips64r2,r4600,mips3,mips2) \ | 219 | $(call set_gccflags,mips64r2,mips64r2,r4600,mips3,mips2) \ |
207 | -Wa,--trap | 220 | -Wa,--trap |
221 | CHECKFLAGS-$(CONFIG_CPU_MIPS64_R2) += -D_MIPS_ISA=_MIPS_ISA_MIPS64 | ||
208 | 222 | ||
209 | cflags-$(CONFIG_CPU_R5000) += \ | 223 | cflags-$(CONFIG_CPU_R5000) += \ |
210 | $(call set_gccflags,r5000,mips4,r5000,mips4,mips2) \ | 224 | $(call set_gccflags,r5000,mips4,r5000,mips4,mips2) \ |
211 | -Wa,--trap | 225 | -Wa,--trap |
226 | CHECKFLAGS-$(CONFIG_CPU_R5000) += -D_MIPS_ISA=_MIPS_ISA_MIPS4 | ||
212 | 227 | ||
213 | cflags-$(CONFIG_CPU_R5432) += \ | 228 | cflags-$(CONFIG_CPU_R5432) += \ |
214 | $(call set_gccflags,r5400,mips4,r5000,mips4,mips2) \ | 229 | $(call set_gccflags,r5400,mips4,r5000,mips4,mips2) \ |
215 | -Wa,--trap | 230 | -Wa,--trap |
231 | CHECKFLAGS-$(CONFIG_CPU_R5432) += -D_MIPS_ISA=_MIPS_ISA_MIPS4 | ||
216 | 232 | ||
217 | cflags-$(CONFIG_CPU_NEVADA) += \ | 233 | cflags-$(CONFIG_CPU_NEVADA) += \ |
218 | $(call set_gccflags,rm5200,mips4,r5000,mips4,mips2) \ | 234 | $(call set_gccflags,rm5200,mips4,r5000,mips4,mips2) \ |
219 | -Wa,--trap | 235 | -Wa,--trap |
220 | # $(call cc-option,-mmad) | 236 | CHECKFLAGS-$(CONFIG_CPU_NEVADA) += -D_MIPS_ISA=_MIPS_ISA_MIPS4 |
221 | 237 | ||
222 | cflags-$(CONFIG_CPU_RM7000) += \ | 238 | cflags-$(CONFIG_CPU_RM7000) += \ |
223 | $(call set_gccflags,rm7000,mips4,r5000,mips4,mips2) \ | 239 | $(call set_gccflags,rm7000,mips4,r5000,mips4,mips2) \ |
224 | -Wa,--trap | 240 | -Wa,--trap |
241 | CHECKFLAGS-$(CONFIG_CPU_RM7000) += -D_MIPS_ISA=_MIPS_ISA_MIPS4 | ||
225 | 242 | ||
226 | cflags-$(CONFIG_CPU_RM9000) += \ | 243 | cflags-$(CONFIG_CPU_RM9000) += \ |
227 | $(call set_gccflags,rm9000,mips4,r5000,mips4,mips2) \ | 244 | $(call set_gccflags,rm9000,mips4,r5000,mips4,mips2) \ |
228 | -Wa,--trap | 245 | -Wa,--trap |
246 | CHECKFLAGS-$(CONFIG_CPU_RM9000) += -D_MIPS_ISA=_MIPS_ISA_MIPS4 | ||
229 | 247 | ||
230 | 248 | ||
231 | cflags-$(CONFIG_CPU_SB1) += \ | 249 | cflags-$(CONFIG_CPU_SB1) += \ |
232 | $(call set_gccflags,sb1,mips64,r5000,mips4,mips2) \ | 250 | $(call set_gccflags,sb1,mips64,r5000,mips4,mips2) \ |
233 | -Wa,--trap | 251 | -Wa,--trap |
252 | CHECKFLAGS-$(CONFIG_CPU_SB1) += -D_MIPS_ISA=_MIPS_ISA_MIPS64 | ||
234 | 253 | ||
235 | cflags-$(CONFIG_CPU_R8000) += \ | 254 | cflags-$(CONFIG_CPU_R8000) += \ |
236 | $(call set_gccflags,r8000,mips4,r8000,mips4,mips2) \ | 255 | $(call set_gccflags,r8000,mips4,r8000,mips4,mips2) \ |
237 | -Wa,--trap | 256 | -Wa,--trap |
257 | CHECKFLAGS-$(CONFIG_CPU_R8000) += -D_MIPS_ISA=_MIPS_ISA_MIPS4 | ||
238 | 258 | ||
239 | cflags-$(CONFIG_CPU_R10000) += \ | 259 | cflags-$(CONFIG_CPU_R10000) += \ |
240 | $(call set_gccflags,r10000,mips4,r8000,mips4,mips2) \ | 260 | $(call set_gccflags,r10000,mips4,r8000,mips4,mips2) \ |
241 | -Wa,--trap | 261 | -Wa,--trap |
262 | CHECKFLAGS-$(CONFIG_CPU_R10000) += -D_MIPS_ISA=_MIPS_ISA_MIPS4 | ||
242 | 263 | ||
243 | ifdef CONFIG_CPU_SB1 | 264 | ifdef CONFIG_CPU_SB1 |
244 | ifdef CONFIG_SB1_PASS_1_WORKAROUNDS | 265 | ifdef CONFIG_SB1_PASS_1_WORKAROUNDS |
@@ -369,7 +390,7 @@ load-$(CONFIG_MIPS_XXS1500) += 0xffffffff80100000 | |||
369 | # Cobalt Server | 390 | # Cobalt Server |
370 | # | 391 | # |
371 | core-$(CONFIG_MIPS_COBALT) += arch/mips/cobalt/ | 392 | core-$(CONFIG_MIPS_COBALT) += arch/mips/cobalt/ |
372 | cflags-$(CONFIG_MIPS_COBALT) += -Iinclude/asm-mips/cobalt | 393 | cflags-$(CONFIG_MIPS_COBALT) += -Iinclude/asm-mips/mach-cobalt |
373 | load-$(CONFIG_MIPS_COBALT) += 0xffffffff80080000 | 394 | load-$(CONFIG_MIPS_COBALT) += 0xffffffff80080000 |
374 | 395 | ||
375 | # | 396 | # |
diff --git a/arch/mips/au1000/common/reset.c b/arch/mips/au1000/common/reset.c index 65b84db800e4..4ffccedf5967 100644 --- a/arch/mips/au1000/common/reset.c +++ b/arch/mips/au1000/common/reset.c | |||
@@ -151,7 +151,7 @@ void au1000_restart(char *command) | |||
151 | } | 151 | } |
152 | 152 | ||
153 | set_c0_status(ST0_BEV | ST0_ERL); | 153 | set_c0_status(ST0_BEV | ST0_ERL); |
154 | set_c0_config(CONF_CM_UNCACHED); | 154 | change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED); |
155 | flush_cache_all(); | 155 | flush_cache_all(); |
156 | write_c0_wired(0); | 156 | write_c0_wired(0); |
157 | 157 | ||
diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c index 08c8c855cc9c..eb155c071aa6 100644 --- a/arch/mips/au1000/common/setup.c +++ b/arch/mips/au1000/common/setup.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/pm.h> | ||
36 | 37 | ||
37 | #include <asm/cpu.h> | 38 | #include <asm/cpu.h> |
38 | #include <asm/bootinfo.h> | 39 | #include <asm/bootinfo.h> |
@@ -125,7 +126,7 @@ void __init plat_setup(void) | |||
125 | #endif | 126 | #endif |
126 | _machine_restart = au1000_restart; | 127 | _machine_restart = au1000_restart; |
127 | _machine_halt = au1000_halt; | 128 | _machine_halt = au1000_halt; |
128 | _machine_power_off = au1000_power_off; | 129 | pm_power_off = au1000_power_off; |
129 | board_time_init = au1xxx_time_init; | 130 | board_time_init = au1xxx_time_init; |
130 | board_timer_setup = au1xxx_timer_setup; | 131 | board_timer_setup = au1xxx_timer_setup; |
131 | 132 | ||
diff --git a/arch/mips/cobalt/int-handler.S b/arch/mips/cobalt/int-handler.S index f92608e8d84f..e75d5e3ca868 100644 --- a/arch/mips/cobalt/int-handler.S +++ b/arch/mips/cobalt/int-handler.S | |||
@@ -8,7 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | #include <asm/asm.h> | 9 | #include <asm/asm.h> |
10 | #include <asm/mipsregs.h> | 10 | #include <asm/mipsregs.h> |
11 | #include <asm/cobalt/cobalt.h> | 11 | #include <asm/mach-cobalt/cobalt.h> |
12 | #include <asm/regdef.h> | 12 | #include <asm/regdef.h> |
13 | #include <asm/stackframe.h> | 13 | #include <asm/stackframe.h> |
14 | 14 | ||
diff --git a/arch/mips/cobalt/irq.c b/arch/mips/cobalt/irq.c index 0d90851f925e..f9a108820d6e 100644 --- a/arch/mips/cobalt/irq.c +++ b/arch/mips/cobalt/irq.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <asm/gt64120.h> | 18 | #include <asm/gt64120.h> |
19 | #include <asm/ptrace.h> | 19 | #include <asm/ptrace.h> |
20 | 20 | ||
21 | #include <asm/cobalt/cobalt.h> | 21 | #include <asm/mach-cobalt/cobalt.h> |
22 | 22 | ||
23 | extern void cobalt_handle_int(void); | 23 | extern void cobalt_handle_int(void); |
24 | 24 | ||
diff --git a/arch/mips/cobalt/reset.c b/arch/mips/cobalt/reset.c index 805a0e88507b..753dfccae6fa 100644 --- a/arch/mips/cobalt/reset.c +++ b/arch/mips/cobalt/reset.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <asm/reboot.h> | 16 | #include <asm/reboot.h> |
17 | #include <asm/system.h> | 17 | #include <asm/system.h> |
18 | #include <asm/mipsregs.h> | 18 | #include <asm/mipsregs.h> |
19 | #include <asm/cobalt/cobalt.h> | 19 | #include <asm/mach-cobalt/cobalt.h> |
20 | 20 | ||
21 | void cobalt_machine_halt(void) | 21 | void cobalt_machine_halt(void) |
22 | { | 22 | { |
diff --git a/arch/mips/cobalt/setup.c b/arch/mips/cobalt/setup.c index d358a118fa31..050685b87a3c 100644 --- a/arch/mips/cobalt/setup.c +++ b/arch/mips/cobalt/setup.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * License. See the file "COPYING" in the main directory of this archive | 5 | * License. See the file "COPYING" in the main directory of this archive |
6 | * for more details. | 6 | * for more details. |
7 | * | 7 | * |
8 | * Copyright (C) 1996, 1997, 2004 by Ralf Baechle (ralf@linux-mips.org) | 8 | * Copyright (C) 1996, 1997, 2004, 05 by Ralf Baechle (ralf@linux-mips.org) |
9 | * Copyright (C) 2001, 2002, 2003 by Liam Davies (ldavies@agile.tv) | 9 | * Copyright (C) 2001, 2002, 2003 by Liam Davies (ldavies@agile.tv) |
10 | * | 10 | * |
11 | */ | 11 | */ |
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/pm.h> | ||
16 | #include <linux/serial.h> | 17 | #include <linux/serial.h> |
17 | #include <linux/serial_core.h> | 18 | #include <linux/serial_core.h> |
18 | 19 | ||
@@ -25,7 +26,7 @@ | |||
25 | #include <asm/gt64120.h> | 26 | #include <asm/gt64120.h> |
26 | #include <asm/serial.h> | 27 | #include <asm/serial.h> |
27 | 28 | ||
28 | #include <asm/cobalt/cobalt.h> | 29 | #include <asm/mach-cobalt/cobalt.h> |
29 | 30 | ||
30 | extern void cobalt_machine_restart(char *command); | 31 | extern void cobalt_machine_restart(char *command); |
31 | extern void cobalt_machine_halt(void); | 32 | extern void cobalt_machine_halt(void); |
@@ -99,7 +100,7 @@ void __init plat_setup(void) | |||
99 | 100 | ||
100 | _machine_restart = cobalt_machine_restart; | 101 | _machine_restart = cobalt_machine_restart; |
101 | _machine_halt = cobalt_machine_halt; | 102 | _machine_halt = cobalt_machine_halt; |
102 | _machine_power_off = cobalt_machine_power_off; | 103 | pm_power_off = cobalt_machine_power_off; |
103 | 104 | ||
104 | board_timer_setup = cobalt_timer_setup; | 105 | board_timer_setup = cobalt_timer_setup; |
105 | 106 | ||
diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig index 967e7acd8e1f..a34db6e82b27 100644 --- a/arch/mips/configs/ip32_defconfig +++ b/arch/mips/configs/ip32_defconfig | |||
@@ -102,6 +102,7 @@ CONFIG_CPU_R5000=y | |||
102 | # CONFIG_CPU_RM9000 is not set | 102 | # CONFIG_CPU_RM9000 is not set |
103 | # CONFIG_CPU_SB1 is not set | 103 | # CONFIG_CPU_SB1 is not set |
104 | CONFIG_SYS_HAS_CPU_R5000=y | 104 | CONFIG_SYS_HAS_CPU_R5000=y |
105 | CONFIG_SYS_HAS_CPU_NEVADA=y | ||
105 | CONFIG_SYS_HAS_CPU_RM7000=y | 106 | CONFIG_SYS_HAS_CPU_RM7000=y |
106 | CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y | 107 | CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y |
107 | CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y | 108 | CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y |
diff --git a/arch/mips/configs/qemu_defconfig b/arch/mips/configs/qemu_defconfig index dee44606164c..c02becab850b 100644 --- a/arch/mips/configs/qemu_defconfig +++ b/arch/mips/configs/qemu_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.15-rc2 | 3 | # Linux kernel version: 2.6.16-rc2 |
4 | # Thu Nov 24 01:07:00 2005 | 4 | # Fri Feb 3 17:14:27 2006 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | 7 | ||
@@ -147,26 +147,27 @@ CONFIG_LOCALVERSION_AUTO=y | |||
147 | # CONFIG_BSD_PROCESS_ACCT is not set | 147 | # CONFIG_BSD_PROCESS_ACCT is not set |
148 | # CONFIG_SYSCTL is not set | 148 | # CONFIG_SYSCTL is not set |
149 | # CONFIG_AUDIT is not set | 149 | # CONFIG_AUDIT is not set |
150 | # CONFIG_HOTPLUG is not set | ||
151 | CONFIG_KOBJECT_UEVENT=y | ||
152 | # CONFIG_IKCONFIG is not set | 150 | # CONFIG_IKCONFIG is not set |
153 | CONFIG_INITRAMFS_SOURCE="" | 151 | CONFIG_INITRAMFS_SOURCE="" |
154 | CONFIG_EMBEDDED=y | 152 | CONFIG_EMBEDDED=y |
155 | CONFIG_KALLSYMS=y | 153 | CONFIG_KALLSYMS=y |
156 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 154 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
155 | # CONFIG_HOTPLUG is not set | ||
157 | CONFIG_PRINTK=y | 156 | CONFIG_PRINTK=y |
158 | # CONFIG_BUG is not set | 157 | # CONFIG_BUG is not set |
158 | CONFIG_ELF_CORE=y | ||
159 | # CONFIG_BASE_FULL is not set | 159 | # CONFIG_BASE_FULL is not set |
160 | # CONFIG_FUTEX is not set | 160 | # CONFIG_FUTEX is not set |
161 | # CONFIG_EPOLL is not set | 161 | # CONFIG_EPOLL is not set |
162 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
163 | # CONFIG_SHMEM is not set | 162 | # CONFIG_SHMEM is not set |
164 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 163 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
165 | CONFIG_CC_ALIGN_LABELS=0 | 164 | CONFIG_CC_ALIGN_LABELS=0 |
166 | CONFIG_CC_ALIGN_LOOPS=0 | 165 | CONFIG_CC_ALIGN_LOOPS=0 |
167 | CONFIG_CC_ALIGN_JUMPS=0 | 166 | CONFIG_CC_ALIGN_JUMPS=0 |
167 | CONFIG_SLAB=y | ||
168 | CONFIG_TINY_SHMEM=y | 168 | CONFIG_TINY_SHMEM=y |
169 | CONFIG_BASE_SMALL=1 | 169 | CONFIG_BASE_SMALL=1 |
170 | # CONFIG_SLOB is not set | ||
170 | 171 | ||
171 | # | 172 | # |
172 | # Loadable module support | 173 | # Loadable module support |
@@ -266,11 +267,7 @@ CONFIG_TCP_CONG_BIC=y | |||
266 | # CONFIG_HAMRADIO is not set | 267 | # CONFIG_HAMRADIO is not set |
267 | # CONFIG_IRDA is not set | 268 | # CONFIG_IRDA is not set |
268 | # CONFIG_BT is not set | 269 | # CONFIG_BT is not set |
269 | CONFIG_IEEE80211=y | 270 | # CONFIG_IEEE80211 is not set |
270 | # CONFIG_IEEE80211_DEBUG is not set | ||
271 | CONFIG_IEEE80211_CRYPT_WEP=y | ||
272 | CONFIG_IEEE80211_CRYPT_CCMP=y | ||
273 | CONFIG_IEEE80211_CRYPT_TKIP=y | ||
274 | 271 | ||
275 | # | 272 | # |
276 | # Device Drivers | 273 | # Device Drivers |
@@ -323,7 +320,7 @@ CONFIG_BLK_DEV_RAM_COUNT=16 | |||
323 | # | 320 | # |
324 | # SCSI device support | 321 | # SCSI device support |
325 | # | 322 | # |
326 | CONFIG_RAID_ATTRS=y | 323 | # CONFIG_RAID_ATTRS is not set |
327 | # CONFIG_SCSI is not set | 324 | # CONFIG_SCSI is not set |
328 | 325 | ||
329 | # | 326 | # |
@@ -366,24 +363,16 @@ CONFIG_NETDEVICES=y | |||
366 | # | 363 | # |
367 | # PHY device support | 364 | # PHY device support |
368 | # | 365 | # |
369 | CONFIG_PHYLIB=y | 366 | # CONFIG_PHYLIB is not set |
370 | |||
371 | # | ||
372 | # MII PHY device drivers | ||
373 | # | ||
374 | CONFIG_MARVELL_PHY=y | ||
375 | CONFIG_DAVICOM_PHY=y | ||
376 | CONFIG_QSEMI_PHY=y | ||
377 | CONFIG_LXT_PHY=y | ||
378 | CONFIG_CICADA_PHY=y | ||
379 | 367 | ||
380 | # | 368 | # |
381 | # Ethernet (10 or 100Mbit) | 369 | # Ethernet (10 or 100Mbit) |
382 | # | 370 | # |
383 | CONFIG_NET_ETHERNET=y | 371 | CONFIG_NET_ETHERNET=y |
384 | CONFIG_MII=y | 372 | # CONFIG_MII is not set |
385 | # CONFIG_NET_VENDOR_3COM is not set | 373 | # CONFIG_NET_VENDOR_3COM is not set |
386 | # CONFIG_NET_VENDOR_SMC is not set | 374 | # CONFIG_NET_VENDOR_SMC is not set |
375 | # CONFIG_DM9000 is not set | ||
387 | # CONFIG_NET_VENDOR_RACAL is not set | 376 | # CONFIG_NET_VENDOR_RACAL is not set |
388 | # CONFIG_DEPCA is not set | 377 | # CONFIG_DEPCA is not set |
389 | # CONFIG_HP100 is not set | 378 | # CONFIG_HP100 is not set |
@@ -479,6 +468,7 @@ CONFIG_HW_CONSOLE=y | |||
479 | CONFIG_SERIAL_8250=y | 468 | CONFIG_SERIAL_8250=y |
480 | CONFIG_SERIAL_8250_CONSOLE=y | 469 | CONFIG_SERIAL_8250_CONSOLE=y |
481 | CONFIG_SERIAL_8250_NR_UARTS=4 | 470 | CONFIG_SERIAL_8250_NR_UARTS=4 |
471 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
482 | # CONFIG_SERIAL_8250_EXTENDED is not set | 472 | # CONFIG_SERIAL_8250_EXTENDED is not set |
483 | 473 | ||
484 | # | 474 | # |
@@ -518,6 +508,12 @@ CONFIG_SERIAL_CORE_CONSOLE=y | |||
518 | # CONFIG_I2C is not set | 508 | # CONFIG_I2C is not set |
519 | 509 | ||
520 | # | 510 | # |
511 | # SPI support | ||
512 | # | ||
513 | # CONFIG_SPI is not set | ||
514 | # CONFIG_SPI_MASTER is not set | ||
515 | |||
516 | # | ||
521 | # Dallas's 1-wire bus | 517 | # Dallas's 1-wire bus |
522 | # | 518 | # |
523 | # CONFIG_W1 is not set | 519 | # CONFIG_W1 is not set |
@@ -592,11 +588,14 @@ CONFIG_DUMMY_CONSOLE=y | |||
592 | # | 588 | # |
593 | 589 | ||
594 | # | 590 | # |
591 | # EDAC - error detection and reporting (RAS) | ||
592 | # | ||
593 | |||
594 | # | ||
595 | # File systems | 595 | # File systems |
596 | # | 596 | # |
597 | # CONFIG_EXT2_FS is not set | 597 | # CONFIG_EXT2_FS is not set |
598 | # CONFIG_EXT3_FS is not set | 598 | # CONFIG_EXT3_FS is not set |
599 | # CONFIG_JBD is not set | ||
600 | # CONFIG_REISERFS_FS is not set | 599 | # CONFIG_REISERFS_FS is not set |
601 | # CONFIG_JFS_FS is not set | 600 | # CONFIG_JFS_FS is not set |
602 | # CONFIG_FS_POSIX_ACL is not set | 601 | # CONFIG_FS_POSIX_ACL is not set |
@@ -677,6 +676,7 @@ CONFIG_MSDOS_PARTITION=y | |||
677 | # Kernel hacking | 676 | # Kernel hacking |
678 | # | 677 | # |
679 | # CONFIG_PRINTK_TIME is not set | 678 | # CONFIG_PRINTK_TIME is not set |
679 | # CONFIG_MAGIC_SYSRQ is not set | ||
680 | # CONFIG_DEBUG_KERNEL is not set | 680 | # CONFIG_DEBUG_KERNEL is not set |
681 | CONFIG_LOG_BUF_SHIFT=14 | 681 | CONFIG_LOG_BUF_SHIFT=14 |
682 | CONFIG_CROSSCOMPILE=y | 682 | CONFIG_CROSSCOMPILE=y |
@@ -690,31 +690,7 @@ CONFIG_CMDLINE="console=ttyS0 debug ip=172.20.0.2:172.20.0.1::255.255.0.0" | |||
690 | # | 690 | # |
691 | # Cryptographic options | 691 | # Cryptographic options |
692 | # | 692 | # |
693 | CONFIG_CRYPTO=y | 693 | # CONFIG_CRYPTO is not set |
694 | CONFIG_CRYPTO_HMAC=y | ||
695 | CONFIG_CRYPTO_NULL=y | ||
696 | CONFIG_CRYPTO_MD4=y | ||
697 | CONFIG_CRYPTO_MD5=y | ||
698 | CONFIG_CRYPTO_SHA1=y | ||
699 | CONFIG_CRYPTO_SHA256=y | ||
700 | CONFIG_CRYPTO_SHA512=y | ||
701 | CONFIG_CRYPTO_WP512=y | ||
702 | CONFIG_CRYPTO_TGR192=y | ||
703 | CONFIG_CRYPTO_DES=y | ||
704 | CONFIG_CRYPTO_BLOWFISH=y | ||
705 | CONFIG_CRYPTO_TWOFISH=y | ||
706 | CONFIG_CRYPTO_SERPENT=y | ||
707 | CONFIG_CRYPTO_AES=y | ||
708 | CONFIG_CRYPTO_CAST5=y | ||
709 | CONFIG_CRYPTO_CAST6=y | ||
710 | CONFIG_CRYPTO_TEA=y | ||
711 | CONFIG_CRYPTO_ARC4=y | ||
712 | CONFIG_CRYPTO_KHAZAD=y | ||
713 | CONFIG_CRYPTO_ANUBIS=y | ||
714 | CONFIG_CRYPTO_DEFLATE=y | ||
715 | CONFIG_CRYPTO_MICHAEL_MIC=y | ||
716 | CONFIG_CRYPTO_CRC32C=y | ||
717 | # CONFIG_CRYPTO_TEST is not set | ||
718 | 694 | ||
719 | # | 695 | # |
720 | # Hardware crypto devices | 696 | # Hardware crypto devices |
@@ -724,8 +700,6 @@ CONFIG_CRYPTO_CRC32C=y | |||
724 | # Library routines | 700 | # Library routines |
725 | # | 701 | # |
726 | # CONFIG_CRC_CCITT is not set | 702 | # CONFIG_CRC_CCITT is not set |
727 | CONFIG_CRC16=y | 703 | # CONFIG_CRC16 is not set |
728 | CONFIG_CRC32=y | 704 | CONFIG_CRC32=y |
729 | CONFIG_LIBCRC32C=y | 705 | # CONFIG_LIBCRC32C is not set |
730 | CONFIG_ZLIB_INFLATE=y | ||
731 | CONFIG_ZLIB_DEFLATE=y | ||
diff --git a/arch/mips/ddb5xxx/ddb5074/setup.c b/arch/mips/ddb5xxx/ddb5074/setup.c index 11535be265b9..91456b068c2e 100644 --- a/arch/mips/ddb5xxx/ddb5074/setup.c +++ b/arch/mips/ddb5xxx/ddb5074/setup.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/ide.h> | 14 | #include <linux/ide.h> |
15 | #include <linux/ioport.h> | 15 | #include <linux/ioport.h> |
16 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
17 | #include <linux/pm.h> | ||
17 | 18 | ||
18 | #include <asm/addrspace.h> | 19 | #include <asm/addrspace.h> |
19 | #include <asm/bcache.h> | 20 | #include <asm/bcache.h> |
@@ -95,7 +96,7 @@ void __init plat_setup(void) | |||
95 | 96 | ||
96 | _machine_restart = ddb_machine_restart; | 97 | _machine_restart = ddb_machine_restart; |
97 | _machine_halt = ddb_machine_halt; | 98 | _machine_halt = ddb_machine_halt; |
98 | _machine_power_off = ddb_machine_power_off; | 99 | pm_power_off = ddb_machine_power_off; |
99 | 100 | ||
100 | ddb_out32(DDB_BAR0, 0); | 101 | ddb_out32(DDB_BAR0, 0); |
101 | 102 | ||
diff --git a/arch/mips/ddb5xxx/ddb5476/setup.c b/arch/mips/ddb5xxx/ddb5476/setup.c index f4e480a74edf..c902adef5942 100644 --- a/arch/mips/ddb5xxx/ddb5476/setup.c +++ b/arch/mips/ddb5xxx/ddb5476/setup.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
14 | #include <linux/pm.h> | ||
14 | 15 | ||
15 | #include <asm/addrspace.h> | 16 | #include <asm/addrspace.h> |
16 | #include <asm/bcache.h> | 17 | #include <asm/bcache.h> |
@@ -133,7 +134,7 @@ void __init plat_setup(void) | |||
133 | 134 | ||
134 | _machine_restart = ddb_machine_restart; | 135 | _machine_restart = ddb_machine_restart; |
135 | _machine_halt = ddb_machine_halt; | 136 | _machine_halt = ddb_machine_halt; |
136 | _machine_power_off = ddb_machine_power_off; | 137 | pm_power_off = ddb_machine_power_off; |
137 | 138 | ||
138 | /* request io port/mem resources */ | 139 | /* request io port/mem resources */ |
139 | if (request_resource(&ioport_resource, &ddb5476_ioport.dma1) || | 140 | if (request_resource(&ioport_resource, &ddb5476_ioport.dma1) || |
diff --git a/arch/mips/ddb5xxx/ddb5477/setup.c b/arch/mips/ddb5xxx/ddb5477/setup.c index 81163353c4a8..2f566034cc44 100644 --- a/arch/mips/ddb5xxx/ddb5477/setup.c +++ b/arch/mips/ddb5xxx/ddb5477/setup.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/major.h> | 26 | #include <linux/major.h> |
27 | #include <linux/kdev_t.h> | 27 | #include <linux/kdev_t.h> |
28 | #include <linux/root_dev.h> | 28 | #include <linux/root_dev.h> |
29 | #include <linux/pm.h> | ||
29 | 30 | ||
30 | #include <asm/cpu.h> | 31 | #include <asm/cpu.h> |
31 | #include <asm/bootinfo.h> | 32 | #include <asm/bootinfo.h> |
@@ -182,7 +183,7 @@ void __init plat_setup(void) | |||
182 | 183 | ||
183 | _machine_restart = ddb_machine_restart; | 184 | _machine_restart = ddb_machine_restart; |
184 | _machine_halt = ddb_machine_halt; | 185 | _machine_halt = ddb_machine_halt; |
185 | _machine_power_off = ddb_machine_power_off; | 186 | pm_power_off = ddb_machine_power_off; |
186 | 187 | ||
187 | /* setup resource limits */ | 188 | /* setup resource limits */ |
188 | ioport_resource.end = DDB_PCI0_IO_SIZE + DDB_PCI1_IO_SIZE - 1; | 189 | ioport_resource.end = DDB_PCI0_IO_SIZE + DDB_PCI1_IO_SIZE - 1; |
diff --git a/arch/mips/dec/setup.c b/arch/mips/dec/setup.c index 9ef54fe1feaa..7c1ca8f6330e 100644 --- a/arch/mips/dec/setup.c +++ b/arch/mips/dec/setup.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/pm.h> | ||
20 | 21 | ||
21 | #include <asm/bootinfo.h> | 22 | #include <asm/bootinfo.h> |
22 | #include <asm/cpu.h> | 23 | #include <asm/cpu.h> |
@@ -158,7 +159,7 @@ void __init plat_setup(void) | |||
158 | 159 | ||
159 | _machine_restart = dec_machine_restart; | 160 | _machine_restart = dec_machine_restart; |
160 | _machine_halt = dec_machine_halt; | 161 | _machine_halt = dec_machine_halt; |
161 | _machine_power_off = dec_machine_power_off; | 162 | pm_power_off = dec_machine_power_off; |
162 | 163 | ||
163 | ioport_resource.start = ~0UL; | 164 | ioport_resource.start = ~0UL; |
164 | ioport_resource.end = 0UL; | 165 | ioport_resource.end = 0UL; |
diff --git a/arch/mips/gt64120/ev64120/setup.c b/arch/mips/gt64120/ev64120/setup.c index 98b5a96cc039..6d859d1e7a2d 100644 --- a/arch/mips/gt64120/ev64120/setup.c +++ b/arch/mips/gt64120/ev64120/setup.c | |||
@@ -34,6 +34,8 @@ | |||
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
36 | #include <linux/timex.h> | 36 | #include <linux/timex.h> |
37 | #include <linux/pm.h> | ||
38 | |||
37 | #include <asm/bootinfo.h> | 39 | #include <asm/bootinfo.h> |
38 | #include <asm/page.h> | 40 | #include <asm/page.h> |
39 | #include <asm/io.h> | 41 | #include <asm/io.h> |
@@ -73,7 +75,7 @@ void __init plat_setup(void) | |||
73 | { | 75 | { |
74 | _machine_restart = galileo_machine_restart; | 76 | _machine_restart = galileo_machine_restart; |
75 | _machine_halt = galileo_machine_halt; | 77 | _machine_halt = galileo_machine_halt; |
76 | _machine_power_off = galileo_machine_power_off; | 78 | pm_power_off = galileo_machine_power_off; |
77 | 79 | ||
78 | board_time_init = gt64120_time_init; | 80 | board_time_init = gt64120_time_init; |
79 | set_io_port_base(KSEG1); | 81 | set_io_port_base(KSEG1); |
diff --git a/arch/mips/gt64120/momenco_ocelot/setup.c b/arch/mips/gt64120/momenco_ocelot/setup.c index 0d07c33112d0..20b65d3d2151 100644 --- a/arch/mips/gt64120/momenco_ocelot/setup.c +++ b/arch/mips/gt64120/momenco_ocelot/setup.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * BRIEF MODULE DESCRIPTION | 4 | * BRIEF MODULE DESCRIPTION |
5 | * Momentum Computer Ocelot (CP7000) - board dependent boot routines | 5 | * Momentum Computer Ocelot (CP7000) - board dependent boot routines |
6 | * | 6 | * |
7 | * Copyright (C) 1996, 1997, 2001 Ralf Baechle | 7 | * Copyright (C) 1996, 1997, 2001, 06 Ralf Baechle (ralf@linux-mips.org) |
8 | * Copyright (C) 2000 RidgeRun, Inc. | 8 | * Copyright (C) 2000 RidgeRun, Inc. |
9 | * Copyright (C) 2001 Red Hat, Inc. | 9 | * Copyright (C) 2001 Red Hat, Inc. |
10 | * Copyright (C) 2002 Momentum Computer | 10 | * Copyright (C) 2002 Momentum Computer |
@@ -47,6 +47,8 @@ | |||
47 | #include <linux/pci.h> | 47 | #include <linux/pci.h> |
48 | #include <linux/timex.h> | 48 | #include <linux/timex.h> |
49 | #include <linux/vmalloc.h> | 49 | #include <linux/vmalloc.h> |
50 | #include <linux/pm.h> | ||
51 | |||
50 | #include <asm/time.h> | 52 | #include <asm/time.h> |
51 | #include <asm/bootinfo.h> | 53 | #include <asm/bootinfo.h> |
52 | #include <asm/page.h> | 54 | #include <asm/page.h> |
@@ -159,7 +161,7 @@ void __init plat_setup(void) | |||
159 | 161 | ||
160 | _machine_restart = momenco_ocelot_restart; | 162 | _machine_restart = momenco_ocelot_restart; |
161 | _machine_halt = momenco_ocelot_halt; | 163 | _machine_halt = momenco_ocelot_halt; |
162 | _machine_power_off = momenco_ocelot_power_off; | 164 | pm_power_off = momenco_ocelot_power_off; |
163 | 165 | ||
164 | /* | 166 | /* |
165 | * initrd_start = (ulong)ocelot_initrd_start; | 167 | * initrd_start = (ulong)ocelot_initrd_start; |
diff --git a/arch/mips/ite-boards/generic/it8172_setup.c b/arch/mips/ite-boards/generic/it8172_setup.c index 062429dd7ca0..fc73c8d69df7 100644 --- a/arch/mips/ite-boards/generic/it8172_setup.c +++ b/arch/mips/ite-boards/generic/it8172_setup.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/major.h> | 34 | #include <linux/major.h> |
35 | #include <linux/kdev_t.h> | 35 | #include <linux/kdev_t.h> |
36 | #include <linux/root_dev.h> | 36 | #include <linux/root_dev.h> |
37 | #include <linux/pm.h> | ||
37 | 38 | ||
38 | #include <asm/cpu.h> | 39 | #include <asm/cpu.h> |
39 | #include <asm/time.h> | 40 | #include <asm/time.h> |
@@ -125,7 +126,7 @@ void __init plat_setup(void) | |||
125 | 126 | ||
126 | _machine_restart = it8172_restart; | 127 | _machine_restart = it8172_restart; |
127 | _machine_halt = it8172_halt; | 128 | _machine_halt = it8172_halt; |
128 | _machine_power_off = it8172_power_off; | 129 | pm_power_off = it8172_power_off; |
129 | 130 | ||
130 | /* | 131 | /* |
131 | * IO/MEM resources. | 132 | * IO/MEM resources. |
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c index 044df9d4ab7c..4036dc434551 100644 --- a/arch/mips/jazz/setup.c +++ b/arch/mips/jazz/setup.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/console.h> | 19 | #include <linux/console.h> |
20 | #include <linux/fb.h> | 20 | #include <linux/fb.h> |
21 | #include <linux/ide.h> | 21 | #include <linux/ide.h> |
22 | #include <linux/pm.h> | ||
23 | |||
22 | #include <asm/bootinfo.h> | 24 | #include <asm/bootinfo.h> |
23 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
24 | #include <asm/jazz.h> | 26 | #include <asm/jazz.h> |
@@ -79,7 +81,7 @@ void __init plat_setup(void) | |||
79 | 81 | ||
80 | _machine_restart = jazz_machine_restart; | 82 | _machine_restart = jazz_machine_restart; |
81 | _machine_halt = jazz_machine_halt; | 83 | _machine_halt = jazz_machine_halt; |
82 | _machine_power_off = jazz_machine_power_off; | 84 | pm_power_off = jazz_machine_power_off; |
83 | 85 | ||
84 | #warning "Somebody should check if screen_info is ok for Jazz." | 86 | #warning "Somebody should check if screen_info is ok for Jazz." |
85 | 87 | ||
diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c index 4763957df8fc..9359cc413494 100644 --- a/arch/mips/jmr3927/rbhma3100/setup.c +++ b/arch/mips/jmr3927/rbhma3100/setup.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/ioport.h> | 44 | #include <linux/ioport.h> |
45 | #include <linux/param.h> /* for HZ */ | 45 | #include <linux/param.h> /* for HZ */ |
46 | #include <linux/delay.h> | 46 | #include <linux/delay.h> |
47 | #include <linux/pm.h> | ||
47 | #ifdef CONFIG_SERIAL_TXX9 | 48 | #ifdef CONFIG_SERIAL_TXX9 |
48 | #include <linux/tty.h> | 49 | #include <linux/tty.h> |
49 | #include <linux/serial.h> | 50 | #include <linux/serial.h> |
@@ -211,7 +212,7 @@ void __init plat_setup(void) | |||
211 | 212 | ||
212 | _machine_restart = jmr3927_machine_restart; | 213 | _machine_restart = jmr3927_machine_restart; |
213 | _machine_halt = jmr3927_machine_halt; | 214 | _machine_halt = jmr3927_machine_halt; |
214 | _machine_power_off = jmr3927_machine_power_off; | 215 | pm_power_off = jmr3927_machine_power_off; |
215 | 216 | ||
216 | /* | 217 | /* |
217 | * IO/MEM resources. | 218 | * IO/MEM resources. |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index fac48ad27b34..292f8b243a5e 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -2,8 +2,8 @@ | |||
2 | * Processor capabilities determination functions. | 2 | * Processor capabilities determination functions. |
3 | * | 3 | * |
4 | * Copyright (C) xxxx the Anonymous | 4 | * Copyright (C) xxxx the Anonymous |
5 | * Copyright (C) 1994 - 2006 Ralf Baechle | ||
5 | * Copyright (C) 2003, 2004 Maciej W. Rozycki | 6 | * Copyright (C) 2003, 2004 Maciej W. Rozycki |
6 | * Copyright (C) 1994 - 2003 Ralf Baechle | ||
7 | * Copyright (C) 2001, 2004 MIPS Inc. | 7 | * Copyright (C) 2001, 2004 MIPS Inc. |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
@@ -641,10 +641,9 @@ static inline void cpu_probe_sibyte(struct cpuinfo_mips *c) | |||
641 | switch (c->processor_id & 0xff00) { | 641 | switch (c->processor_id & 0xff00) { |
642 | case PRID_IMP_SB1: | 642 | case PRID_IMP_SB1: |
643 | c->cputype = CPU_SB1; | 643 | c->cputype = CPU_SB1; |
644 | #ifdef CONFIG_SB1_PASS_1_WORKAROUNDS | ||
645 | /* FPU in pass1 is known to have issues. */ | 644 | /* FPU in pass1 is known to have issues. */ |
646 | c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR); | 645 | if ((c->processor_id & 0xff) < 0x20) |
647 | #endif | 646 | c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR); |
648 | break; | 647 | break; |
649 | case PRID_IMP_SB1A: | 648 | case PRID_IMP_SB1A: |
650 | c->cputype = CPU_SB1A; | 649 | c->cputype = CPU_SB1A; |
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index aa18a8b7b380..13f22d1d0e8b 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S | |||
@@ -233,11 +233,11 @@ NESTED(except_vec_nmi, 0, sp) | |||
233 | NESTED(nmi_handler, PT_SIZE, sp) | 233 | NESTED(nmi_handler, PT_SIZE, sp) |
234 | .set push | 234 | .set push |
235 | .set noat | 235 | .set noat |
236 | .set mips3 | ||
237 | SAVE_ALL | 236 | SAVE_ALL |
238 | move a0, sp | 237 | move a0, sp |
239 | jal nmi_exception_handler | 238 | jal nmi_exception_handler |
240 | RESTORE_ALL | 239 | RESTORE_ALL |
240 | .set mips3 | ||
241 | eret | 241 | eret |
242 | .set pop | 242 | .set pop |
243 | END(nmi_handler) | 243 | END(nmi_handler) |
diff --git a/arch/mips/kernel/ptrace32.c b/arch/mips/kernel/ptrace32.c index 0c82b25d8c6d..0d5cf97af727 100644 --- a/arch/mips/kernel/ptrace32.c +++ b/arch/mips/kernel/ptrace32.c | |||
@@ -88,7 +88,7 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) | |||
88 | ret = -EIO; | 88 | ret = -EIO; |
89 | if (copied != sizeof(tmp)) | 89 | if (copied != sizeof(tmp)) |
90 | break; | 90 | break; |
91 | ret = put_user(tmp, (unsigned int *) (unsigned long) data); | 91 | ret = put_user(tmp, (unsigned int __user *) (unsigned long) data); |
92 | break; | 92 | break; |
93 | } | 93 | } |
94 | 94 | ||
@@ -174,8 +174,10 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) | |||
174 | case FPC_EIR: { /* implementation / version register */ | 174 | case FPC_EIR: { /* implementation / version register */ |
175 | unsigned int flags; | 175 | unsigned int flags; |
176 | 176 | ||
177 | if (!cpu_has_fpu) | 177 | if (!cpu_has_fpu) { |
178 | tmp = 0; | ||
178 | break; | 179 | break; |
180 | } | ||
179 | 181 | ||
180 | preempt_disable(); | 182 | preempt_disable(); |
181 | if (cpu_has_mipsmt) { | 183 | if (cpu_has_mipsmt) { |
@@ -194,15 +196,18 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) | |||
194 | preempt_enable(); | 196 | preempt_enable(); |
195 | break; | 197 | break; |
196 | } | 198 | } |
197 | case DSP_BASE ... DSP_BASE + 5: | 199 | case DSP_BASE ... DSP_BASE + 5: { |
200 | dspreg_t *dregs; | ||
201 | |||
198 | if (!cpu_has_dsp) { | 202 | if (!cpu_has_dsp) { |
199 | tmp = 0; | 203 | tmp = 0; |
200 | ret = -EIO; | 204 | ret = -EIO; |
201 | goto out_tsk; | 205 | goto out_tsk; |
202 | } | 206 | } |
203 | dspreg_t *dregs = __get_dsp_regs(child); | 207 | dregs = __get_dsp_regs(child); |
204 | tmp = (unsigned long) (dregs[addr - DSP_BASE]); | 208 | tmp = (unsigned long) (dregs[addr - DSP_BASE]); |
205 | break; | 209 | break; |
210 | } | ||
206 | case DSP_CONTROL: | 211 | case DSP_CONTROL: |
207 | if (!cpu_has_dsp) { | 212 | if (!cpu_has_dsp) { |
208 | tmp = 0; | 213 | tmp = 0; |
@@ -216,7 +221,7 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) | |||
216 | ret = -EIO; | 221 | ret = -EIO; |
217 | goto out_tsk; | 222 | goto out_tsk; |
218 | } | 223 | } |
219 | ret = put_user(tmp, (unsigned *) (unsigned long) data); | 224 | ret = put_user(tmp, (unsigned __user *) (unsigned long) data); |
220 | break; | 225 | break; |
221 | } | 226 | } |
222 | 227 | ||
@@ -304,15 +309,18 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) | |||
304 | else | 309 | else |
305 | child->thread.fpu.soft.fcr31 = data; | 310 | child->thread.fpu.soft.fcr31 = data; |
306 | break; | 311 | break; |
307 | case DSP_BASE ... DSP_BASE + 5: | 312 | case DSP_BASE ... DSP_BASE + 5: { |
313 | dspreg_t *dregs; | ||
314 | |||
308 | if (!cpu_has_dsp) { | 315 | if (!cpu_has_dsp) { |
309 | ret = -EIO; | 316 | ret = -EIO; |
310 | break; | 317 | break; |
311 | } | 318 | } |
312 | 319 | ||
313 | dspreg_t *dregs = __get_dsp_regs(child); | 320 | dregs = __get_dsp_regs(child); |
314 | dregs[addr - DSP_BASE] = data; | 321 | dregs[addr - DSP_BASE] = data; |
315 | break; | 322 | break; |
323 | } | ||
316 | case DSP_CONTROL: | 324 | case DSP_CONTROL: |
317 | if (!cpu_has_dsp) { | 325 | if (!cpu_has_dsp) { |
318 | ret = -EIO; | 326 | ret = -EIO; |
diff --git a/arch/mips/kernel/reset.c b/arch/mips/kernel/reset.c index 5e37df3111ad..621037db2290 100644 --- a/arch/mips/kernel/reset.c +++ b/arch/mips/kernel/reset.c | |||
@@ -3,17 +3,16 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2001 by Ralf Baechle | 6 | * Copyright (C) 2001, 06 by Ralf Baechle (ralf@linux-mips.org) |
7 | * Copyright (C) 2001 MIPS Technologies, Inc. | 7 | * Copyright (C) 2001 MIPS Technologies, Inc. |
8 | */ | 8 | */ |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/pm.h> | ||
11 | #include <linux/types.h> | 12 | #include <linux/types.h> |
12 | #include <linux/reboot.h> | 13 | #include <linux/reboot.h> |
13 | #include <asm/reboot.h> | ||
14 | 14 | ||
15 | void (*pm_power_off)(void); | 15 | #include <asm/reboot.h> |
16 | EXPORT_SYMBOL(pm_power_off); | ||
17 | 16 | ||
18 | /* | 17 | /* |
19 | * Urgs ... Too many MIPS machines to handle this in a generic way. | 18 | * Urgs ... Too many MIPS machines to handle this in a generic way. |
@@ -22,23 +21,22 @@ EXPORT_SYMBOL(pm_power_off); | |||
22 | */ | 21 | */ |
23 | void (*_machine_restart)(char *command); | 22 | void (*_machine_restart)(char *command); |
24 | void (*_machine_halt)(void); | 23 | void (*_machine_halt)(void); |
25 | void (*_machine_power_off)(void); | 24 | void (*pm_power_off)(void); |
26 | 25 | ||
27 | void machine_restart(char *command) | 26 | void machine_restart(char *command) |
28 | { | 27 | { |
29 | _machine_restart(command); | 28 | if (_machine_restart) |
29 | _machine_restart(command); | ||
30 | } | 30 | } |
31 | 31 | ||
32 | void machine_halt(void) | 32 | void machine_halt(void) |
33 | { | 33 | { |
34 | _machine_halt(); | 34 | if (_machine_halt) |
35 | _machine_halt(); | ||
35 | } | 36 | } |
36 | 37 | ||
37 | void machine_power_off(void) | 38 | void machine_power_off(void) |
38 | { | 39 | { |
39 | if (pm_power_off) | 40 | if (pm_power_off) |
40 | pm_power_off(); | 41 | pm_power_off(); |
41 | |||
42 | _machine_power_off(); | ||
43 | } | 42 | } |
44 | |||
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c index 1d855112bac2..986a9cf23067 100644 --- a/arch/mips/kernel/rtlx.c +++ b/arch/mips/kernel/rtlx.c | |||
@@ -1,5 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved. | 2 | * Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved. |
3 | * Copyright (C) 2005, 06 Ralf Baechle (ralf@linux-mips.org) | ||
3 | * | 4 | * |
4 | * This program is free software; you can distribute it and/or modify it | 5 | * This program is free software; you can distribute it and/or modify it |
5 | * under the terms of the GNU General Public License (Version 2) as | 6 | * under the terms of the GNU General Public License (Version 2) as |
@@ -20,9 +21,12 @@ | |||
20 | #include <linux/module.h> | 21 | #include <linux/module.h> |
21 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/interrupt.h> | ||
25 | #include <linux/irq.h> | ||
23 | #include <linux/poll.h> | 26 | #include <linux/poll.h> |
24 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
25 | #include <linux/wait.h> | 28 | #include <linux/wait.h> |
29 | |||
26 | #include <asm/mipsmtregs.h> | 30 | #include <asm/mipsmtregs.h> |
27 | #include <asm/bitops.h> | 31 | #include <asm/bitops.h> |
28 | #include <asm/cpu.h> | 32 | #include <asm/cpu.h> |
diff --git a/arch/mips/kernel/signal-common.h b/arch/mips/kernel/signal-common.h index 0f66ae5838b9..0fbc492d24b4 100644 --- a/arch/mips/kernel/signal-common.h +++ b/arch/mips/kernel/signal-common.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <linux/config.h> | 11 | #include <linux/config.h> |
12 | 12 | ||
13 | static inline int | 13 | static inline int |
14 | setup_sigcontext(struct pt_regs *regs, struct sigcontext *sc) | 14 | setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) |
15 | { | 15 | { |
16 | int err = 0; | 16 | int err = 0; |
17 | 17 | ||
@@ -82,7 +82,7 @@ out: | |||
82 | } | 82 | } |
83 | 83 | ||
84 | static inline int | 84 | static inline int |
85 | restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc) | 85 | restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) |
86 | { | 86 | { |
87 | unsigned int used_math; | 87 | unsigned int used_math; |
88 | unsigned long treg; | 88 | unsigned long treg; |
@@ -157,7 +157,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc) | |||
157 | /* | 157 | /* |
158 | * Determine which stack to use.. | 158 | * Determine which stack to use.. |
159 | */ | 159 | */ |
160 | static inline void * | 160 | static inline void __user * |
161 | get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) | 161 | get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) |
162 | { | 162 | { |
163 | unsigned long sp; | 163 | unsigned long sp; |
@@ -176,7 +176,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) | |||
176 | if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags (sp) == 0)) | 176 | if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags (sp) == 0)) |
177 | sp = current->sas_ss_sp + current->sas_ss_size; | 177 | sp = current->sas_ss_sp + current->sas_ss_size; |
178 | 178 | ||
179 | return (void *)((sp - frame_size) & (ICACHE_REFILLS_WORKAROUND_WAR ? 32 : ALMASK)); | 179 | return (void __user *)((sp - frame_size) & (ICACHE_REFILLS_WORKAROUND_WAR ? 32 : ALMASK)); |
180 | } | 180 | } |
181 | 181 | ||
182 | static inline int install_sigtramp(unsigned int __user *tramp, | 182 | static inline int install_sigtramp(unsigned int __user *tramp, |
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 7d1800fe7038..aaec4785e9a6 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c | |||
@@ -199,10 +199,10 @@ save_static_function(sys_sigreturn); | |||
199 | __attribute_used__ noinline static void | 199 | __attribute_used__ noinline static void |
200 | _sys_sigreturn(nabi_no_regargs struct pt_regs regs) | 200 | _sys_sigreturn(nabi_no_regargs struct pt_regs regs) |
201 | { | 201 | { |
202 | struct sigframe *frame; | 202 | struct sigframe __user *frame; |
203 | sigset_t blocked; | 203 | sigset_t blocked; |
204 | 204 | ||
205 | frame = (struct sigframe *) regs.regs[29]; | 205 | frame = (struct sigframe __user *) regs.regs[29]; |
206 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 206 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
207 | goto badframe; | 207 | goto badframe; |
208 | if (__copy_from_user(&blocked, &frame->sf_mask, sizeof(blocked))) | 208 | if (__copy_from_user(&blocked, &frame->sf_mask, sizeof(blocked))) |
@@ -236,11 +236,11 @@ save_static_function(sys_rt_sigreturn); | |||
236 | __attribute_used__ noinline static void | 236 | __attribute_used__ noinline static void |
237 | _sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | 237 | _sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs) |
238 | { | 238 | { |
239 | struct rt_sigframe *frame; | 239 | struct rt_sigframe __user *frame; |
240 | sigset_t set; | 240 | sigset_t set; |
241 | stack_t st; | 241 | stack_t st; |
242 | 242 | ||
243 | frame = (struct rt_sigframe *) regs.regs[29]; | 243 | frame = (struct rt_sigframe __user *) regs.regs[29]; |
244 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 244 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
245 | goto badframe; | 245 | goto badframe; |
246 | if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set))) | 246 | if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set))) |
@@ -259,7 +259,7 @@ _sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
259 | goto badframe; | 259 | goto badframe; |
260 | /* It is more difficult to avoid calling this function than to | 260 | /* It is more difficult to avoid calling this function than to |
261 | call it and ignore errors. */ | 261 | call it and ignore errors. */ |
262 | do_sigaltstack(&st, NULL, regs.regs[29]); | 262 | do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]); |
263 | 263 | ||
264 | /* | 264 | /* |
265 | * Don't let your children do this ... | 265 | * Don't let your children do this ... |
@@ -279,7 +279,7 @@ badframe: | |||
279 | int setup_frame(struct k_sigaction * ka, struct pt_regs *regs, | 279 | int setup_frame(struct k_sigaction * ka, struct pt_regs *regs, |
280 | int signr, sigset_t *set) | 280 | int signr, sigset_t *set) |
281 | { | 281 | { |
282 | struct sigframe *frame; | 282 | struct sigframe __user *frame; |
283 | int err = 0; | 283 | int err = 0; |
284 | 284 | ||
285 | frame = get_sigframe(ka, regs, sizeof(*frame)); | 285 | frame = get_sigframe(ka, regs, sizeof(*frame)); |
@@ -326,7 +326,7 @@ give_sigsegv: | |||
326 | int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, | 326 | int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, |
327 | int signr, sigset_t *set, siginfo_t *info) | 327 | int signr, sigset_t *set, siginfo_t *info) |
328 | { | 328 | { |
329 | struct rt_sigframe *frame; | 329 | struct rt_sigframe __user *frame; |
330 | int err = 0; | 330 | int err = 0; |
331 | 331 | ||
332 | frame = get_sigframe(ka, regs, sizeof(*frame)); | 332 | frame = get_sigframe(ka, regs, sizeof(*frame)); |
@@ -340,7 +340,7 @@ int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, | |||
340 | 340 | ||
341 | /* Create the ucontext. */ | 341 | /* Create the ucontext. */ |
342 | err |= __put_user(0, &frame->rs_uc.uc_flags); | 342 | err |= __put_user(0, &frame->rs_uc.uc_flags); |
343 | err |= __put_user(0, &frame->rs_uc.uc_link); | 343 | err |= __put_user(NULL, &frame->rs_uc.uc_link); |
344 | err |= __put_user((void *)current->sas_ss_sp, | 344 | err |= __put_user((void *)current->sas_ss_sp, |
345 | &frame->rs_uc.uc_stack.ss_sp); | 345 | &frame->rs_uc.uc_stack.ss_sp); |
346 | err |= __put_user(sas_ss_flags(regs->regs[29]), | 346 | err |= __put_user(sas_ss_flags(regs->regs[29]), |
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 98b185bbc947..136260c8f756 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -144,7 +144,7 @@ struct ucontext32 { | |||
144 | extern void __put_sigset_unknown_nsig(void); | 144 | extern void __put_sigset_unknown_nsig(void); |
145 | extern void __get_sigset_unknown_nsig(void); | 145 | extern void __get_sigset_unknown_nsig(void); |
146 | 146 | ||
147 | static inline int put_sigset(const sigset_t *kbuf, compat_sigset_t *ubuf) | 147 | static inline int put_sigset(const sigset_t *kbuf, compat_sigset_t __user *ubuf) |
148 | { | 148 | { |
149 | int err = 0; | 149 | int err = 0; |
150 | 150 | ||
@@ -269,7 +269,7 @@ asmlinkage int sys32_sigaction(int sig, const struct sigaction32 *act, | |||
269 | if (!access_ok(VERIFY_READ, act, sizeof(*act))) | 269 | if (!access_ok(VERIFY_READ, act, sizeof(*act))) |
270 | return -EFAULT; | 270 | return -EFAULT; |
271 | err |= __get_user(handler, &act->sa_handler); | 271 | err |= __get_user(handler, &act->sa_handler); |
272 | new_ka.sa.sa_handler = (void*)(s64)handler; | 272 | new_ka.sa.sa_handler = (void __user *)(s64)handler; |
273 | err |= __get_user(new_ka.sa.sa_flags, &act->sa_flags); | 273 | err |= __get_user(new_ka.sa.sa_flags, &act->sa_flags); |
274 | err |= __get_user(mask, &act->sa_mask.sig[0]); | 274 | err |= __get_user(mask, &act->sa_mask.sig[0]); |
275 | if (err) | 275 | if (err) |
@@ -299,8 +299,8 @@ asmlinkage int sys32_sigaction(int sig, const struct sigaction32 *act, | |||
299 | 299 | ||
300 | asmlinkage int sys32_sigaltstack(nabi_no_regargs struct pt_regs regs) | 300 | asmlinkage int sys32_sigaltstack(nabi_no_regargs struct pt_regs regs) |
301 | { | 301 | { |
302 | const stack32_t *uss = (const stack32_t *) regs.regs[4]; | 302 | const stack32_t __user *uss = (const stack32_t __user *) regs.regs[4]; |
303 | stack32_t *uoss = (stack32_t *) regs.regs[5]; | 303 | stack32_t __user *uoss = (stack32_t __user *) regs.regs[5]; |
304 | unsigned long usp = regs.regs[29]; | 304 | unsigned long usp = regs.regs[29]; |
305 | stack_t kss, koss; | 305 | stack_t kss, koss; |
306 | int ret, err = 0; | 306 | int ret, err = 0; |
@@ -319,7 +319,8 @@ asmlinkage int sys32_sigaltstack(nabi_no_regargs struct pt_regs regs) | |||
319 | } | 319 | } |
320 | 320 | ||
321 | set_fs (KERNEL_DS); | 321 | set_fs (KERNEL_DS); |
322 | ret = do_sigaltstack(uss ? &kss : NULL , uoss ? &koss : NULL, usp); | 322 | ret = do_sigaltstack(uss ? (stack_t __user *)&kss : NULL, |
323 | uoss ? (stack_t __user *)&koss : NULL, usp); | ||
323 | set_fs (old_fs); | 324 | set_fs (old_fs); |
324 | 325 | ||
325 | if (!ret && uoss) { | 326 | if (!ret && uoss) { |
@@ -335,7 +336,7 @@ asmlinkage int sys32_sigaltstack(nabi_no_regargs struct pt_regs regs) | |||
335 | return ret; | 336 | return ret; |
336 | } | 337 | } |
337 | 338 | ||
338 | static int restore_sigcontext32(struct pt_regs *regs, struct sigcontext32 *sc) | 339 | static int restore_sigcontext32(struct pt_regs *regs, struct sigcontext32 __user *sc) |
339 | { | 340 | { |
340 | u32 used_math; | 341 | u32 used_math; |
341 | int err = 0; | 342 | int err = 0; |
@@ -420,7 +421,7 @@ struct rt_sigframe32 { | |||
420 | #endif | 421 | #endif |
421 | }; | 422 | }; |
422 | 423 | ||
423 | int copy_siginfo_to_user32(compat_siginfo_t *to, siginfo_t *from) | 424 | int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) |
424 | { | 425 | { |
425 | int err; | 426 | int err; |
426 | 427 | ||
@@ -455,7 +456,7 @@ int copy_siginfo_to_user32(compat_siginfo_t *to, siginfo_t *from) | |||
455 | err |= __put_user(from->si_uid, &to->si_uid); | 456 | err |= __put_user(from->si_uid, &to->si_uid); |
456 | break; | 457 | break; |
457 | case __SI_FAULT >> 16: | 458 | case __SI_FAULT >> 16: |
458 | err |= __put_user((long)from->si_addr, &to->si_addr); | 459 | err |= __put_user((unsigned long)from->si_addr, &to->si_addr); |
459 | break; | 460 | break; |
460 | case __SI_POLL >> 16: | 461 | case __SI_POLL >> 16: |
461 | err |= __put_user(from->si_band, &to->si_band); | 462 | err |= __put_user(from->si_band, &to->si_band); |
@@ -476,10 +477,10 @@ save_static_function(sys32_sigreturn); | |||
476 | __attribute_used__ noinline static void | 477 | __attribute_used__ noinline static void |
477 | _sys32_sigreturn(nabi_no_regargs struct pt_regs regs) | 478 | _sys32_sigreturn(nabi_no_regargs struct pt_regs regs) |
478 | { | 479 | { |
479 | struct sigframe *frame; | 480 | struct sigframe __user *frame; |
480 | sigset_t blocked; | 481 | sigset_t blocked; |
481 | 482 | ||
482 | frame = (struct sigframe *) regs.regs[29]; | 483 | frame = (struct sigframe __user *) regs.regs[29]; |
483 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 484 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
484 | goto badframe; | 485 | goto badframe; |
485 | if (__copy_from_user(&blocked, &frame->sf_mask, sizeof(blocked))) | 486 | if (__copy_from_user(&blocked, &frame->sf_mask, sizeof(blocked))) |
@@ -512,13 +513,13 @@ save_static_function(sys32_rt_sigreturn); | |||
512 | __attribute_used__ noinline static void | 513 | __attribute_used__ noinline static void |
513 | _sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | 514 | _sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) |
514 | { | 515 | { |
515 | struct rt_sigframe32 *frame; | 516 | struct rt_sigframe32 __user *frame; |
516 | mm_segment_t old_fs; | 517 | mm_segment_t old_fs; |
517 | sigset_t set; | 518 | sigset_t set; |
518 | stack_t st; | 519 | stack_t st; |
519 | s32 sp; | 520 | s32 sp; |
520 | 521 | ||
521 | frame = (struct rt_sigframe32 *) regs.regs[29]; | 522 | frame = (struct rt_sigframe32 __user *) regs.regs[29]; |
522 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 523 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
523 | goto badframe; | 524 | goto badframe; |
524 | if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set))) | 525 | if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set))) |
@@ -546,7 +547,7 @@ _sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
546 | call it and ignore errors. */ | 547 | call it and ignore errors. */ |
547 | old_fs = get_fs(); | 548 | old_fs = get_fs(); |
548 | set_fs (KERNEL_DS); | 549 | set_fs (KERNEL_DS); |
549 | do_sigaltstack(&st, NULL, regs.regs[29]); | 550 | do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]); |
550 | set_fs (old_fs); | 551 | set_fs (old_fs); |
551 | 552 | ||
552 | /* | 553 | /* |
@@ -564,7 +565,7 @@ badframe: | |||
564 | } | 565 | } |
565 | 566 | ||
566 | static inline int setup_sigcontext32(struct pt_regs *regs, | 567 | static inline int setup_sigcontext32(struct pt_regs *regs, |
567 | struct sigcontext32 *sc) | 568 | struct sigcontext32 __user *sc) |
568 | { | 569 | { |
569 | int err = 0; | 570 | int err = 0; |
570 | 571 | ||
@@ -623,8 +624,9 @@ out: | |||
623 | /* | 624 | /* |
624 | * Determine which stack to use.. | 625 | * Determine which stack to use.. |
625 | */ | 626 | */ |
626 | static inline void *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, | 627 | static inline void __user *get_sigframe(struct k_sigaction *ka, |
627 | size_t frame_size) | 628 | struct pt_regs *regs, |
629 | size_t frame_size) | ||
628 | { | 630 | { |
629 | unsigned long sp; | 631 | unsigned long sp; |
630 | 632 | ||
@@ -642,13 +644,13 @@ static inline void *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, | |||
642 | if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags (sp) == 0)) | 644 | if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags (sp) == 0)) |
643 | sp = current->sas_ss_sp + current->sas_ss_size; | 645 | sp = current->sas_ss_sp + current->sas_ss_size; |
644 | 646 | ||
645 | return (void *)((sp - frame_size) & ALMASK); | 647 | return (void __user *)((sp - frame_size) & ALMASK); |
646 | } | 648 | } |
647 | 649 | ||
648 | int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs, | 650 | int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs, |
649 | int signr, sigset_t *set) | 651 | int signr, sigset_t *set) |
650 | { | 652 | { |
651 | struct sigframe *frame; | 653 | struct sigframe __user *frame; |
652 | int err = 0; | 654 | int err = 0; |
653 | 655 | ||
654 | frame = get_sigframe(ka, regs, sizeof(*frame)); | 656 | frame = get_sigframe(ka, regs, sizeof(*frame)); |
@@ -702,7 +704,7 @@ give_sigsegv: | |||
702 | int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs, | 704 | int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs, |
703 | int signr, sigset_t *set, siginfo_t *info) | 705 | int signr, sigset_t *set, siginfo_t *info) |
704 | { | 706 | { |
705 | struct rt_sigframe32 *frame; | 707 | struct rt_sigframe32 __user *frame; |
706 | int err = 0; | 708 | int err = 0; |
707 | s32 sp; | 709 | s32 sp; |
708 | 710 | ||
@@ -855,7 +857,7 @@ no_signal: | |||
855 | } | 857 | } |
856 | 858 | ||
857 | asmlinkage int sys32_rt_sigaction(int sig, const struct sigaction32 *act, | 859 | asmlinkage int sys32_rt_sigaction(int sig, const struct sigaction32 *act, |
858 | struct sigaction32 *oact, | 860 | struct sigaction32 __user *oact, |
859 | unsigned int sigsetsize) | 861 | unsigned int sigsetsize) |
860 | { | 862 | { |
861 | struct k_sigaction new_sa, old_sa; | 863 | struct k_sigaction new_sa, old_sa; |
@@ -872,7 +874,7 @@ asmlinkage int sys32_rt_sigaction(int sig, const struct sigaction32 *act, | |||
872 | if (!access_ok(VERIFY_READ, act, sizeof(*act))) | 874 | if (!access_ok(VERIFY_READ, act, sizeof(*act))) |
873 | return -EFAULT; | 875 | return -EFAULT; |
874 | err |= __get_user(handler, &act->sa_handler); | 876 | err |= __get_user(handler, &act->sa_handler); |
875 | new_sa.sa.sa_handler = (void*)(s64)handler; | 877 | new_sa.sa.sa_handler = (void __user *)(s64)handler; |
876 | err |= __get_user(new_sa.sa.sa_flags, &act->sa_flags); | 878 | err |= __get_user(new_sa.sa.sa_flags, &act->sa_flags); |
877 | err |= get_sigset(&new_sa.sa.sa_mask, &act->sa_mask); | 879 | err |= get_sigset(&new_sa.sa.sa_mask, &act->sa_mask); |
878 | if (err) | 880 | if (err) |
@@ -899,7 +901,7 @@ out: | |||
899 | } | 901 | } |
900 | 902 | ||
901 | asmlinkage int sys32_rt_sigprocmask(int how, compat_sigset_t *set, | 903 | asmlinkage int sys32_rt_sigprocmask(int how, compat_sigset_t *set, |
902 | compat_sigset_t *oset, unsigned int sigsetsize) | 904 | compat_sigset_t __user *oset, unsigned int sigsetsize) |
903 | { | 905 | { |
904 | sigset_t old_set, new_set; | 906 | sigset_t old_set, new_set; |
905 | int ret; | 907 | int ret; |
@@ -909,8 +911,9 @@ asmlinkage int sys32_rt_sigprocmask(int how, compat_sigset_t *set, | |||
909 | return -EFAULT; | 911 | return -EFAULT; |
910 | 912 | ||
911 | set_fs (KERNEL_DS); | 913 | set_fs (KERNEL_DS); |
912 | ret = sys_rt_sigprocmask(how, set ? &new_set : NULL, | 914 | ret = sys_rt_sigprocmask(how, set ? (sigset_t __user *)&new_set : NULL, |
913 | oset ? &old_set : NULL, sigsetsize); | 915 | oset ? (sigset_t __user *)&old_set : NULL, |
916 | sigsetsize); | ||
914 | set_fs (old_fs); | 917 | set_fs (old_fs); |
915 | 918 | ||
916 | if (!ret && oset && put_sigset(&old_set, oset)) | 919 | if (!ret && oset && put_sigset(&old_set, oset)) |
@@ -919,7 +922,7 @@ asmlinkage int sys32_rt_sigprocmask(int how, compat_sigset_t *set, | |||
919 | return ret; | 922 | return ret; |
920 | } | 923 | } |
921 | 924 | ||
922 | asmlinkage int sys32_rt_sigpending(compat_sigset_t *uset, | 925 | asmlinkage int sys32_rt_sigpending(compat_sigset_t __user *uset, |
923 | unsigned int sigsetsize) | 926 | unsigned int sigsetsize) |
924 | { | 927 | { |
925 | int ret; | 928 | int ret; |
@@ -927,7 +930,7 @@ asmlinkage int sys32_rt_sigpending(compat_sigset_t *uset, | |||
927 | mm_segment_t old_fs = get_fs(); | 930 | mm_segment_t old_fs = get_fs(); |
928 | 931 | ||
929 | set_fs (KERNEL_DS); | 932 | set_fs (KERNEL_DS); |
930 | ret = sys_rt_sigpending(&set, sigsetsize); | 933 | ret = sys_rt_sigpending((sigset_t __user *)&set, sigsetsize); |
931 | set_fs (old_fs); | 934 | set_fs (old_fs); |
932 | 935 | ||
933 | if (!ret && put_sigset(&set, uset)) | 936 | if (!ret && put_sigset(&set, uset)) |
@@ -936,7 +939,7 @@ asmlinkage int sys32_rt_sigpending(compat_sigset_t *uset, | |||
936 | return ret; | 939 | return ret; |
937 | } | 940 | } |
938 | 941 | ||
939 | asmlinkage int sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t *uinfo) | 942 | asmlinkage int sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo) |
940 | { | 943 | { |
941 | siginfo_t info; | 944 | siginfo_t info; |
942 | int ret; | 945 | int ret; |
@@ -946,7 +949,7 @@ asmlinkage int sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t *uinfo) | |||
946 | copy_from_user (info._sifields._pad, uinfo->_sifields._pad, SI_PAD_SIZE)) | 949 | copy_from_user (info._sifields._pad, uinfo->_sifields._pad, SI_PAD_SIZE)) |
947 | return -EFAULT; | 950 | return -EFAULT; |
948 | set_fs (KERNEL_DS); | 951 | set_fs (KERNEL_DS); |
949 | ret = sys_rt_sigqueueinfo(pid, sig, &info); | 952 | ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *)&info); |
950 | set_fs (old_fs); | 953 | set_fs (old_fs); |
951 | return ret; | 954 | return ret; |
952 | } | 955 | } |
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index ec61b2670ba6..9156863c1a5d 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c | |||
@@ -48,6 +48,8 @@ | |||
48 | #define __NR_N32_rt_sigreturn 6211 | 48 | #define __NR_N32_rt_sigreturn 6211 |
49 | #define __NR_N32_restart_syscall 6214 | 49 | #define __NR_N32_restart_syscall 6214 |
50 | 50 | ||
51 | #define DEBUG_SIG 0 | ||
52 | |||
51 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 53 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
52 | 54 | ||
53 | /* IRIX compatible stack_t */ | 55 | /* IRIX compatible stack_t */ |
@@ -83,12 +85,12 @@ save_static_function(sysn32_rt_sigreturn); | |||
83 | __attribute_used__ noinline static void | 85 | __attribute_used__ noinline static void |
84 | _sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | 86 | _sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) |
85 | { | 87 | { |
86 | struct rt_sigframe_n32 *frame; | 88 | struct rt_sigframe_n32 __user *frame; |
87 | sigset_t set; | 89 | sigset_t set; |
88 | stack_t st; | 90 | stack_t st; |
89 | s32 sp; | 91 | s32 sp; |
90 | 92 | ||
91 | frame = (struct rt_sigframe_n32 *) regs.regs[29]; | 93 | frame = (struct rt_sigframe_n32 __user *) regs.regs[29]; |
92 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 94 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
93 | goto badframe; | 95 | goto badframe; |
94 | if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set))) | 96 | if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set))) |
@@ -114,7 +116,7 @@ _sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
114 | 116 | ||
115 | /* It is more difficult to avoid calling this function than to | 117 | /* It is more difficult to avoid calling this function than to |
116 | call it and ignore errors. */ | 118 | call it and ignore errors. */ |
117 | do_sigaltstack(&st, NULL, regs.regs[29]); | 119 | do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]); |
118 | 120 | ||
119 | /* | 121 | /* |
120 | * Don't let your children do this ... | 122 | * Don't let your children do this ... |
@@ -133,7 +135,7 @@ badframe: | |||
133 | int setup_rt_frame_n32(struct k_sigaction * ka, | 135 | int setup_rt_frame_n32(struct k_sigaction * ka, |
134 | struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info) | 136 | struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info) |
135 | { | 137 | { |
136 | struct rt_sigframe_n32 *frame; | 138 | struct rt_sigframe_n32 __user *frame; |
137 | int err = 0; | 139 | int err = 0; |
138 | s32 sp; | 140 | s32 sp; |
139 | 141 | ||
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 59a187956de0..c9d2b5147ca3 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -1168,7 +1168,7 @@ void __init per_cpu_trap_init(void) | |||
1168 | #endif | 1168 | #endif |
1169 | if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV) | 1169 | if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV) |
1170 | status_set |= ST0_XX; | 1170 | status_set |= ST0_XX; |
1171 | change_c0_status(ST0_CU|ST0_MX|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX, | 1171 | change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX, |
1172 | status_set); | 1172 | status_set); |
1173 | 1173 | ||
1174 | if (cpu_has_dsp) | 1174 | if (cpu_has_dsp) |
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 25cc856d8e7e..ff699dbb99f7 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/config.h> | 1 | #include <linux/config.h> |
2 | #include <asm/asm-offsets.h> | ||
2 | #include <asm-generic/vmlinux.lds.h> | 3 | #include <asm-generic/vmlinux.lds.h> |
3 | 4 | ||
4 | #undef mips /* CPP really sucks for this job */ | 5 | #undef mips /* CPP really sucks for this job */ |
@@ -64,10 +65,10 @@ SECTIONS | |||
64 | we can shorten the on-disk segment size. */ | 65 | we can shorten the on-disk segment size. */ |
65 | .sdata : { *(.sdata) } | 66 | .sdata : { *(.sdata) } |
66 | 67 | ||
67 | . = ALIGN(4096); | 68 | . = ALIGN(_PAGE_SIZE); |
68 | __nosave_begin = .; | 69 | __nosave_begin = .; |
69 | .data_nosave : { *(.data.nosave) } | 70 | .data_nosave : { *(.data.nosave) } |
70 | . = ALIGN(4096); | 71 | . = ALIGN(_PAGE_SIZE); |
71 | __nosave_end = .; | 72 | __nosave_end = .; |
72 | 73 | ||
73 | . = ALIGN(32); | 74 | . = ALIGN(32); |
@@ -76,7 +77,7 @@ SECTIONS | |||
76 | _edata = .; /* End of data section */ | 77 | _edata = .; /* End of data section */ |
77 | 78 | ||
78 | /* will be freed after init */ | 79 | /* will be freed after init */ |
79 | . = ALIGN(4096); /* Init code and data */ | 80 | . = ALIGN(_PAGE_SIZE); /* Init code and data */ |
80 | __init_begin = .; | 81 | __init_begin = .; |
81 | .init.text : { | 82 | .init.text : { |
82 | _sinittext = .; | 83 | _sinittext = .; |
@@ -105,7 +106,7 @@ SECTIONS | |||
105 | .con_initcall.init : { *(.con_initcall.init) } | 106 | .con_initcall.init : { *(.con_initcall.init) } |
106 | __con_initcall_end = .; | 107 | __con_initcall_end = .; |
107 | SECURITY_INIT | 108 | SECURITY_INIT |
108 | . = ALIGN(4096); | 109 | . = ALIGN(_PAGE_SIZE); |
109 | __initramfs_start = .; | 110 | __initramfs_start = .; |
110 | .init.ramfs : { *(.init.ramfs) } | 111 | .init.ramfs : { *(.init.ramfs) } |
111 | __initramfs_end = .; | 112 | __initramfs_end = .; |
@@ -113,7 +114,7 @@ SECTIONS | |||
113 | __per_cpu_start = .; | 114 | __per_cpu_start = .; |
114 | .data.percpu : { *(.data.percpu) } | 115 | .data.percpu : { *(.data.percpu) } |
115 | __per_cpu_end = .; | 116 | __per_cpu_end = .; |
116 | . = ALIGN(4096); | 117 | . = ALIGN(_PAGE_SIZE); |
117 | __init_end = .; | 118 | __init_end = .; |
118 | /* freed after init ends here */ | 119 | /* freed after init ends here */ |
119 | 120 | ||
diff --git a/arch/mips/lasat/reset.c b/arch/mips/lasat/reset.c index 8d7d7a454f9a..181bf68175fc 100644 --- a/arch/mips/lasat/reset.c +++ b/arch/mips/lasat/reset.c | |||
@@ -19,9 +19,12 @@ | |||
19 | */ | 19 | */ |
20 | #include <linux/config.h> | 20 | #include <linux/config.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/pm.h> | ||
23 | |||
22 | #include <asm/reboot.h> | 24 | #include <asm/reboot.h> |
23 | #include <asm/system.h> | 25 | #include <asm/system.h> |
24 | #include <asm/lasat/lasat.h> | 26 | #include <asm/lasat/lasat.h> |
27 | |||
25 | #include "picvue.h" | 28 | #include "picvue.h" |
26 | #include "prom.h" | 29 | #include "prom.h" |
27 | 30 | ||
@@ -63,5 +66,5 @@ void lasat_reboot_setup(void) | |||
63 | { | 66 | { |
64 | _machine_restart = lasat_machine_restart; | 67 | _machine_restart = lasat_machine_restart; |
65 | _machine_halt = lasat_machine_halt; | 68 | _machine_halt = lasat_machine_halt; |
66 | _machine_power_off = lasat_machine_halt; | 69 | pm_power_off = lasat_machine_halt; |
67 | } | 70 | } |
diff --git a/arch/mips/lib-32/dump_tlb.c b/arch/mips/lib-32/dump_tlb.c index 46519f4331eb..c49a925d0169 100644 --- a/arch/mips/lib-32/dump_tlb.c +++ b/arch/mips/lib-32/dump_tlb.c | |||
@@ -158,29 +158,26 @@ void dump_list_process(struct task_struct *t, void *address) | |||
158 | printk("task->mm == %8p\n", t->mm); | 158 | printk("task->mm == %8p\n", t->mm); |
159 | //printk("tasks->mm.pgd == %08x\n", (unsigned int) t->mm->pgd); | 159 | //printk("tasks->mm.pgd == %08x\n", (unsigned int) t->mm->pgd); |
160 | 160 | ||
161 | if (addr > KSEG0) | 161 | if (addr > KSEG0) { |
162 | page_dir = pgd_offset_k(0); | 162 | page_dir = pgd_offset_k(0); |
163 | else if (t->mm) { | ||
164 | page_dir = pgd_offset(t->mm, 0); | ||
165 | printk("page_dir == %08x\n", (unsigned int) page_dir); | ||
166 | } else | ||
167 | printk("Current thread has no mm\n"); | ||
168 | |||
169 | if (addr > KSEG0) | ||
170 | pgd = pgd_offset_k(addr); | 163 | pgd = pgd_offset_k(addr); |
171 | else if (t->mm) { | 164 | } else if (t->mm) { |
165 | page_dir = pgd_offset(t->mm, 0); | ||
172 | pgd = pgd_offset(t->mm, addr); | 166 | pgd = pgd_offset(t->mm, addr); |
173 | printk("pgd == %08x, ", (unsigned int) pgd); | 167 | } else { |
174 | pud = pud_offset(pgd, addr); | 168 | printk("Current thread has no mm\n"); |
175 | printk("pud == %08x, ", (unsigned int) pud); | 169 | return; |
170 | } | ||
171 | printk("page_dir == %08x\n", (unsigned int) page_dir); | ||
172 | printk("pgd == %08x, ", (unsigned int) pgd); | ||
173 | pud = pud_offset(pgd, addr); | ||
174 | printk("pud == %08x, ", (unsigned int) pud); | ||
176 | 175 | ||
177 | pmd = pmd_offset(pud, addr); | 176 | pmd = pmd_offset(pud, addr); |
178 | printk("pmd == %08x, ", (unsigned int) pmd); | 177 | printk("pmd == %08x, ", (unsigned int) pmd); |
179 | 178 | ||
180 | pte = pte_offset(pmd, addr); | 179 | pte = pte_offset(pmd, addr); |
181 | printk("pte == %08x, ", (unsigned int) pte); | 180 | printk("pte == %08x, ", (unsigned int) pte); |
182 | } else | ||
183 | printk("Current thread has no mm\n"); | ||
184 | 181 | ||
185 | page = *pte; | 182 | page = *pte; |
186 | #ifdef CONFIG_64BIT_PHYS_ADDR | 183 | #ifdef CONFIG_64BIT_PHYS_ADDR |
diff --git a/arch/mips/math-emu/dp_simple.c b/arch/mips/math-emu/dp_simple.c index 495c1ac94298..1c555e6c6a9f 100644 --- a/arch/mips/math-emu/dp_simple.c +++ b/arch/mips/math-emu/dp_simple.c | |||
@@ -48,16 +48,22 @@ ieee754dp ieee754dp_neg(ieee754dp x) | |||
48 | CLEARCX; | 48 | CLEARCX; |
49 | FLUSHXDP; | 49 | FLUSHXDP; |
50 | 50 | ||
51 | /* | ||
52 | * Invert the sign ALWAYS to prevent an endless recursion on | ||
53 | * pow() in libc. | ||
54 | */ | ||
55 | /* quick fix up */ | ||
56 | DPSIGN(x) ^= 1; | ||
57 | |||
51 | if (xc == IEEE754_CLASS_SNAN) { | 58 | if (xc == IEEE754_CLASS_SNAN) { |
59 | ieee754dp y = ieee754dp_indef(); | ||
52 | SETCX(IEEE754_INVALID_OPERATION); | 60 | SETCX(IEEE754_INVALID_OPERATION); |
53 | return ieee754dp_nanxcpt(ieee754dp_indef(), "neg"); | 61 | DPSIGN(y) = DPSIGN(x); |
62 | return ieee754dp_nanxcpt(y, "neg"); | ||
54 | } | 63 | } |
55 | 64 | ||
56 | if (ieee754dp_isnan(x)) /* but not infinity */ | 65 | if (ieee754dp_isnan(x)) /* but not infinity */ |
57 | return ieee754dp_nanxcpt(x, "neg", x); | 66 | return ieee754dp_nanxcpt(x, "neg", x); |
58 | |||
59 | /* quick fix up */ | ||
60 | DPSIGN(x) ^= 1; | ||
61 | return x; | 67 | return x; |
62 | } | 68 | } |
63 | 69 | ||
diff --git a/arch/mips/math-emu/sp_simple.c b/arch/mips/math-emu/sp_simple.c index c809830dffb4..770f0f4677cd 100644 --- a/arch/mips/math-emu/sp_simple.c +++ b/arch/mips/math-emu/sp_simple.c | |||
@@ -48,16 +48,22 @@ ieee754sp ieee754sp_neg(ieee754sp x) | |||
48 | CLEARCX; | 48 | CLEARCX; |
49 | FLUSHXSP; | 49 | FLUSHXSP; |
50 | 50 | ||
51 | /* | ||
52 | * Invert the sign ALWAYS to prevent an endless recursion on | ||
53 | * pow() in libc. | ||
54 | */ | ||
55 | /* quick fix up */ | ||
56 | SPSIGN(x) ^= 1; | ||
57 | |||
51 | if (xc == IEEE754_CLASS_SNAN) { | 58 | if (xc == IEEE754_CLASS_SNAN) { |
59 | ieee754sp y = ieee754sp_indef(); | ||
52 | SETCX(IEEE754_INVALID_OPERATION); | 60 | SETCX(IEEE754_INVALID_OPERATION); |
53 | return ieee754sp_nanxcpt(ieee754sp_indef(), "neg"); | 61 | SPSIGN(y) = SPSIGN(x); |
62 | return ieee754sp_nanxcpt(y, "neg"); | ||
54 | } | 63 | } |
55 | 64 | ||
56 | if (ieee754sp_isnan(x)) /* but not infinity */ | 65 | if (ieee754sp_isnan(x)) /* but not infinity */ |
57 | return ieee754sp_nanxcpt(x, "neg", x); | 66 | return ieee754sp_nanxcpt(x, "neg", x); |
58 | |||
59 | /* quick fix up */ | ||
60 | SPSIGN(x) ^= 1; | ||
61 | return x; | 67 | return x; |
62 | } | 68 | } |
63 | 69 | ||
diff --git a/arch/mips/mips-boards/generic/reset.c b/arch/mips/mips-boards/generic/reset.c index 9fdec743bd95..7213c395fb6b 100644 --- a/arch/mips/mips-boards/generic/reset.c +++ b/arch/mips/mips-boards/generic/reset.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | #include <linux/config.h> | 25 | #include <linux/config.h> |
26 | #include <linux/pm.h> | ||
26 | 27 | ||
27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
28 | #include <asm/reboot.h> | 29 | #include <asm/reboot.h> |
@@ -65,9 +66,9 @@ void mips_reboot_setup(void) | |||
65 | _machine_restart = mips_machine_restart; | 66 | _machine_restart = mips_machine_restart; |
66 | _machine_halt = mips_machine_halt; | 67 | _machine_halt = mips_machine_halt; |
67 | #if defined(CONFIG_MIPS_ATLAS) | 68 | #if defined(CONFIG_MIPS_ATLAS) |
68 | _machine_power_off = atlas_machine_power_off; | 69 | pm_power_off = atlas_machine_power_off; |
69 | #endif | 70 | #endif |
70 | #if defined(CONFIG_MIPS_MALTA) || defined(CONFIG_MIPS_SEAD) | 71 | #if defined(CONFIG_MIPS_MALTA) || defined(CONFIG_MIPS_SEAD) |
71 | _machine_power_off = mips_machine_halt; | 72 | pm_power_off = mips_machine_halt; |
72 | #endif | 73 | #endif |
73 | } | 74 | } |
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 422b55fab07a..e51c38cef88e 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -464,8 +464,8 @@ static void r4k_flush_data_cache_page(unsigned long addr) | |||
464 | } | 464 | } |
465 | 465 | ||
466 | struct flush_icache_range_args { | 466 | struct flush_icache_range_args { |
467 | unsigned long __user start; | 467 | unsigned long start; |
468 | unsigned long __user end; | 468 | unsigned long end; |
469 | }; | 469 | }; |
470 | 470 | ||
471 | static inline void local_r4k_flush_icache_range(void *args) | 471 | static inline void local_r4k_flush_icache_range(void *args) |
@@ -528,8 +528,7 @@ static inline void local_r4k_flush_icache_range(void *args) | |||
528 | } | 528 | } |
529 | } | 529 | } |
530 | 530 | ||
531 | static void r4k_flush_icache_range(unsigned long __user start, | 531 | static void r4k_flush_icache_range(unsigned long start, unsigned long end) |
532 | unsigned long __user end) | ||
533 | { | 532 | { |
534 | struct flush_icache_range_args args; | 533 | struct flush_icache_range_args args; |
535 | 534 | ||
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 314701a66b13..591c22b080e4 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c | |||
@@ -25,8 +25,7 @@ void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start, | |||
25 | unsigned long end); | 25 | unsigned long end); |
26 | void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, | 26 | void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, |
27 | unsigned long pfn); | 27 | unsigned long pfn); |
28 | void (*flush_icache_range)(unsigned long __user start, | 28 | void (*flush_icache_range)(unsigned long start, unsigned long end); |
29 | unsigned long __user end); | ||
30 | void (*flush_icache_page)(struct vm_area_struct *vma, struct page *page); | 29 | void (*flush_icache_page)(struct vm_area_struct *vma, struct page *page); |
31 | 30 | ||
32 | /* MIPS specific cache operations */ | 31 | /* MIPS specific cache operations */ |
@@ -53,7 +52,7 @@ EXPORT_SYMBOL(_dma_cache_inv); | |||
53 | * We could optimize the case where the cache argument is not BCACHE but | 52 | * We could optimize the case where the cache argument is not BCACHE but |
54 | * that seems very atypical use ... | 53 | * that seems very atypical use ... |
55 | */ | 54 | */ |
56 | asmlinkage int sys_cacheflush(unsigned long __user addr, | 55 | asmlinkage int sys_cacheflush(unsigned long addr, |
57 | unsigned long bytes, unsigned int cache) | 56 | unsigned long bytes, unsigned int cache) |
58 | { | 57 | { |
59 | if (bytes == 0) | 58 | if (bytes == 0) |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 4ee91c9a556f..0ff9a348b843 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/bootmem.h> | 24 | #include <linux/bootmem.h> |
25 | #include <linux/highmem.h> | 25 | #include <linux/highmem.h> |
26 | #include <linux/swap.h> | 26 | #include <linux/swap.h> |
27 | #include <linux/proc_fs.h> | ||
27 | 28 | ||
28 | #include <asm/bootinfo.h> | 29 | #include <asm/bootinfo.h> |
29 | #include <asm/cachectl.h> | 30 | #include <asm/cachectl.h> |
@@ -200,6 +201,11 @@ static inline int page_is_ram(unsigned long pagenr) | |||
200 | return 0; | 201 | return 0; |
201 | } | 202 | } |
202 | 203 | ||
204 | static struct kcore_list kcore_mem, kcore_vmalloc; | ||
205 | #ifdef CONFIG_64BIT | ||
206 | static struct kcore_list kcore_kseg0; | ||
207 | #endif | ||
208 | |||
203 | void __init mem_init(void) | 209 | void __init mem_init(void) |
204 | { | 210 | { |
205 | unsigned long codesize, reservedpages, datasize, initsize; | 211 | unsigned long codesize, reservedpages, datasize, initsize; |
@@ -249,6 +255,16 @@ void __init mem_init(void) | |||
249 | datasize = (unsigned long) &_edata - (unsigned long) &_etext; | 255 | datasize = (unsigned long) &_edata - (unsigned long) &_etext; |
250 | initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; | 256 | initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; |
251 | 257 | ||
258 | #ifdef CONFIG_64BIT | ||
259 | if ((unsigned long) &_text > (unsigned long) CKSEG0) | ||
260 | /* The -4 is a hack so that user tools don't have to handle | ||
261 | the overflow. */ | ||
262 | kclist_add(&kcore_kseg0, (void *) CKSEG0, 0x80000000 - 4); | ||
263 | #endif | ||
264 | kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT); | ||
265 | kclist_add(&kcore_vmalloc, (void *)VMALLOC_START, | ||
266 | VMALLOC_END-VMALLOC_START); | ||
267 | |||
252 | printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, " | 268 | printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, " |
253 | "%ldk reserved, %ldk data, %ldk init, %ldk highmem)\n", | 269 | "%ldk reserved, %ldk data, %ldk init, %ldk highmem)\n", |
254 | (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), | 270 | (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), |
diff --git a/arch/mips/momentum/jaguar_atx/setup.c b/arch/mips/momentum/jaguar_atx/setup.c index bab192ddc185..301d67226d72 100644 --- a/arch/mips/momentum/jaguar_atx/setup.c +++ b/arch/mips/momentum/jaguar_atx/setup.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/pci.h> | 50 | #include <linux/pci.h> |
51 | #include <linux/swap.h> | 51 | #include <linux/swap.h> |
52 | #include <linux/ioport.h> | 52 | #include <linux/ioport.h> |
53 | #include <linux/pm.h> | ||
53 | #include <linux/sched.h> | 54 | #include <linux/sched.h> |
54 | #include <linux/interrupt.h> | 55 | #include <linux/interrupt.h> |
55 | #include <linux/timex.h> | 56 | #include <linux/timex.h> |
@@ -365,7 +366,7 @@ void __init plat_setup(void) | |||
365 | 366 | ||
366 | _machine_restart = momenco_jaguar_restart; | 367 | _machine_restart = momenco_jaguar_restart; |
367 | _machine_halt = momenco_jaguar_halt; | 368 | _machine_halt = momenco_jaguar_halt; |
368 | _machine_power_off = momenco_jaguar_power_off; | 369 | pm_power_off = momenco_jaguar_power_off; |
369 | 370 | ||
370 | /* | 371 | /* |
371 | * initrd_start = (ulong)jaguar_initrd_start; | 372 | * initrd_start = (ulong)jaguar_initrd_start; |
diff --git a/arch/mips/momentum/ocelot_3/setup.c b/arch/mips/momentum/ocelot_3/setup.c index c9b7ff8148ec..f95677f4f06f 100644 --- a/arch/mips/momentum/ocelot_3/setup.c +++ b/arch/mips/momentum/ocelot_3/setup.c | |||
@@ -57,6 +57,8 @@ | |||
57 | #include <linux/timex.h> | 57 | #include <linux/timex.h> |
58 | #include <linux/bootmem.h> | 58 | #include <linux/bootmem.h> |
59 | #include <linux/mv643xx.h> | 59 | #include <linux/mv643xx.h> |
60 | #include <linux/pm.h> | ||
61 | |||
60 | #include <asm/time.h> | 62 | #include <asm/time.h> |
61 | #include <asm/page.h> | 63 | #include <asm/page.h> |
62 | #include <asm/bootinfo.h> | 64 | #include <asm/bootinfo.h> |
@@ -321,7 +323,7 @@ void __init plat_setup(void) | |||
321 | 323 | ||
322 | _machine_restart = momenco_ocelot_restart; | 324 | _machine_restart = momenco_ocelot_restart; |
323 | _machine_halt = momenco_ocelot_halt; | 325 | _machine_halt = momenco_ocelot_halt; |
324 | _machine_power_off = momenco_ocelot_power_off; | 326 | pm_power_off = momenco_ocelot_power_off; |
325 | 327 | ||
326 | /* Wired TLB entries */ | 328 | /* Wired TLB entries */ |
327 | setup_wired_tlb_entries(); | 329 | setup_wired_tlb_entries(); |
diff --git a/arch/mips/momentum/ocelot_c/setup.c b/arch/mips/momentum/ocelot_c/setup.c index 2755c1547473..15998d8a9341 100644 --- a/arch/mips/momentum/ocelot_c/setup.c +++ b/arch/mips/momentum/ocelot_c/setup.c | |||
@@ -51,8 +51,10 @@ | |||
51 | #include <linux/sched.h> | 51 | #include <linux/sched.h> |
52 | #include <linux/interrupt.h> | 52 | #include <linux/interrupt.h> |
53 | #include <linux/pci.h> | 53 | #include <linux/pci.h> |
54 | #include <linux/pm.h> | ||
54 | #include <linux/timex.h> | 55 | #include <linux/timex.h> |
55 | #include <linux/vmalloc.h> | 56 | #include <linux/vmalloc.h> |
57 | |||
56 | #include <asm/time.h> | 58 | #include <asm/time.h> |
57 | #include <asm/bootinfo.h> | 59 | #include <asm/bootinfo.h> |
58 | #include <asm/page.h> | 60 | #include <asm/page.h> |
@@ -236,7 +238,7 @@ void __init plat_setup(void) | |||
236 | 238 | ||
237 | _machine_restart = momenco_ocelot_restart; | 239 | _machine_restart = momenco_ocelot_restart; |
238 | _machine_halt = momenco_ocelot_halt; | 240 | _machine_halt = momenco_ocelot_halt; |
239 | _machine_power_off = momenco_ocelot_power_off; | 241 | pm_power_off = momenco_ocelot_power_off; |
240 | 242 | ||
241 | /* | 243 | /* |
242 | * initrd_start = (ulong)ocelot_initrd_start; | 244 | * initrd_start = (ulong)ocelot_initrd_start; |
diff --git a/arch/mips/momentum/ocelot_g/setup.c b/arch/mips/momentum/ocelot_g/setup.c index 6336751391c3..fed4e8eee116 100644 --- a/arch/mips/momentum/ocelot_g/setup.c +++ b/arch/mips/momentum/ocelot_g/setup.c | |||
@@ -47,8 +47,10 @@ | |||
47 | #include <linux/sched.h> | 47 | #include <linux/sched.h> |
48 | #include <linux/interrupt.h> | 48 | #include <linux/interrupt.h> |
49 | #include <linux/pci.h> | 49 | #include <linux/pci.h> |
50 | #include <linux/pm.h> | ||
50 | #include <linux/timex.h> | 51 | #include <linux/timex.h> |
51 | #include <linux/vmalloc.h> | 52 | #include <linux/vmalloc.h> |
53 | |||
52 | #include <asm/time.h> | 54 | #include <asm/time.h> |
53 | #include <asm/bootinfo.h> | 55 | #include <asm/bootinfo.h> |
54 | #include <asm/page.h> | 56 | #include <asm/page.h> |
@@ -169,7 +171,7 @@ void __init plat_setup(void) | |||
169 | 171 | ||
170 | _machine_restart = momenco_ocelot_restart; | 172 | _machine_restart = momenco_ocelot_restart; |
171 | _machine_halt = momenco_ocelot_halt; | 173 | _machine_halt = momenco_ocelot_halt; |
172 | _machine_power_off = momenco_ocelot_power_off; | 174 | pm_power_off = momenco_ocelot_power_off; |
173 | 175 | ||
174 | /* | 176 | /* |
175 | * initrd_start = (ulong)ocelot_initrd_start; | 177 | * initrd_start = (ulong)ocelot_initrd_start; |
diff --git a/arch/mips/oprofile/Makefile b/arch/mips/oprofile/Makefile index 354261d37d62..0a50aad5bbe4 100644 --- a/arch/mips/oprofile/Makefile +++ b/arch/mips/oprofile/Makefile | |||
@@ -12,4 +12,5 @@ oprofile-y := $(DRIVER_OBJS) common.o | |||
12 | 12 | ||
13 | oprofile-$(CONFIG_CPU_MIPS32) += op_model_mipsxx.o | 13 | oprofile-$(CONFIG_CPU_MIPS32) += op_model_mipsxx.o |
14 | oprofile-$(CONFIG_CPU_MIPS64) += op_model_mipsxx.o | 14 | oprofile-$(CONFIG_CPU_MIPS64) += op_model_mipsxx.o |
15 | oprofile-$(CONFIG_CPU_SB1) += op_model_mipsxx.o | ||
15 | oprofile-$(CONFIG_CPU_RM9000) += op_model_rm9000.o | 16 | oprofile-$(CONFIG_CPU_RM9000) += op_model_rm9000.o |
diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c index 53f9889b30ed..935dd851f480 100644 --- a/arch/mips/oprofile/common.c +++ b/arch/mips/oprofile/common.c | |||
@@ -79,6 +79,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
79 | case CPU_20KC: | 79 | case CPU_20KC: |
80 | case CPU_24K: | 80 | case CPU_24K: |
81 | case CPU_25KF: | 81 | case CPU_25KF: |
82 | case CPU_34K: | ||
83 | case CPU_SB1: | ||
84 | case CPU_SB1A: | ||
82 | lmodel = &op_model_mipsxx; | 85 | lmodel = &op_model_mipsxx; |
83 | break; | 86 | break; |
84 | 87 | ||
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index 1d1eee407faf..95d488ca0754 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c | |||
@@ -201,10 +201,21 @@ static int __init mipsxx_init(void) | |||
201 | op_model_mipsxx.cpu_type = "mips/25K"; | 201 | op_model_mipsxx.cpu_type = "mips/25K"; |
202 | break; | 202 | break; |
203 | 203 | ||
204 | #ifndef CONFIG_SMP | ||
205 | case CPU_34K: | ||
206 | op_model_mipsxx.cpu_type = "mips/34K"; | ||
207 | break; | ||
208 | #endif | ||
209 | |||
204 | case CPU_5KC: | 210 | case CPU_5KC: |
205 | op_model_mipsxx.cpu_type = "mips/5K"; | 211 | op_model_mipsxx.cpu_type = "mips/5K"; |
206 | break; | 212 | break; |
207 | 213 | ||
214 | case CPU_SB1: | ||
215 | case CPU_SB1A: | ||
216 | op_model_mipsxx.cpu_type = "mips/sb1"; | ||
217 | break; | ||
218 | |||
208 | default: | 219 | default: |
209 | printk(KERN_ERR "Profiling unsupported for this CPU\n"); | 220 | printk(KERN_ERR "Profiling unsupported for this CPU\n"); |
210 | 221 | ||
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile index 741e67c9195a..16205b587338 100644 --- a/arch/mips/pci/Makefile +++ b/arch/mips/pci/Makefile | |||
@@ -46,6 +46,7 @@ obj-$(CONFIG_PMC_YOSEMITE) += fixup-yosemite.o ops-titan.o ops-titan-ht.o \ | |||
46 | obj-$(CONFIG_SGI_IP27) += pci-ip27.o | 46 | obj-$(CONFIG_SGI_IP27) += pci-ip27.o |
47 | obj-$(CONFIG_SGI_IP32) += fixup-ip32.o ops-mace.o pci-ip32.o | 47 | obj-$(CONFIG_SGI_IP32) += fixup-ip32.o ops-mace.o pci-ip32.o |
48 | obj-$(CONFIG_SIBYTE_SB1250) += fixup-sb1250.o pci-sb1250.o | 48 | obj-$(CONFIG_SIBYTE_SB1250) += fixup-sb1250.o pci-sb1250.o |
49 | obj-$(CONFIG_SIBYTE_BCM112X) += fixup-sb1250.o pci-sb1250.o | ||
49 | obj-$(CONFIG_SIBYTE_BCM1x80) += pci-bcm1480.o pci-bcm1480ht.o | 50 | obj-$(CONFIG_SIBYTE_BCM1x80) += pci-bcm1480.o pci-bcm1480ht.o |
50 | obj-$(CONFIG_SNI_RM200_PCI) += fixup-sni.o ops-sni.o | 51 | obj-$(CONFIG_SNI_RM200_PCI) += fixup-sni.o ops-sni.o |
51 | obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o | 52 | obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o |
diff --git a/arch/mips/pci/fixup-cobalt.c b/arch/mips/pci/fixup-cobalt.c index 909292f50d06..75a01e764898 100644 --- a/arch/mips/pci/fixup-cobalt.c +++ b/arch/mips/pci/fixup-cobalt.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/gt64120.h> | 18 | #include <asm/gt64120.h> |
19 | 19 | ||
20 | #include <asm/cobalt/cobalt.h> | 20 | #include <asm/mach-cobalt/cobalt.h> |
21 | 21 | ||
22 | extern int cobalt_board_id; | 22 | extern int cobalt_board_id; |
23 | 23 | ||
@@ -52,7 +52,7 @@ static void qube_raq_via_bmIDE_fixup(struct pci_dev *dev) | |||
52 | pci_read_config_byte(dev, PCI_LATENCY_TIMER, <); | 52 | pci_read_config_byte(dev, PCI_LATENCY_TIMER, <); |
53 | if (lt < 64) | 53 | if (lt < 64) |
54 | pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64); | 54 | pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64); |
55 | pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 7); | 55 | pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 8); |
56 | } | 56 | } |
57 | 57 | ||
58 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, | 58 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, |
@@ -69,7 +69,7 @@ static void qube_raq_galileo_fixup(struct pci_dev *dev) | |||
69 | * host bridge. | 69 | * host bridge. |
70 | */ | 70 | */ |
71 | pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64); | 71 | pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64); |
72 | pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 7); | 72 | pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 8); |
73 | 73 | ||
74 | /* | 74 | /* |
75 | * The code described by the comment below has been removed | 75 | * The code described by the comment below has been removed |
diff --git a/arch/mips/pci/ops-gt64111.c b/arch/mips/pci/ops-gt64111.c index c1807934768d..13de45940b19 100644 --- a/arch/mips/pci/ops-gt64111.c +++ b/arch/mips/pci/ops-gt64111.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | #include <asm/gt64120.h> | 16 | #include <asm/gt64120.h> |
17 | 17 | ||
18 | #include <asm/cobalt/cobalt.h> | 18 | #include <asm/mach-cobalt/cobalt.h> |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * Device 31 on the GT64111 is used to generate PCI special | 21 | * Device 31 on the GT64111 is used to generate PCI special |
diff --git a/arch/mips/pci/pci-bcm1480.c b/arch/mips/pci/pci-bcm1480.c index f194b4e4f86a..ca975e7d32ff 100644 --- a/arch/mips/pci/pci-bcm1480.c +++ b/arch/mips/pci/pci-bcm1480.c | |||
@@ -234,11 +234,9 @@ static int __init bcm1480_pcibios_init(void) | |||
234 | 234 | ||
235 | /* turn on ExpMemEn */ | 235 | /* turn on ExpMemEn */ |
236 | cmdreg = READCFG32(CFGOFFSET(0, PCI_DEVFN(PCI_BRIDGE_DEVICE, 0), 0x40)); | 236 | cmdreg = READCFG32(CFGOFFSET(0, PCI_DEVFN(PCI_BRIDGE_DEVICE, 0), 0x40)); |
237 | printk("PCIFeatureCtrl = %x\n", cmdreg); | ||
238 | WRITECFG32(CFGOFFSET(0, PCI_DEVFN(PCI_BRIDGE_DEVICE, 0), 0x40), | 237 | WRITECFG32(CFGOFFSET(0, PCI_DEVFN(PCI_BRIDGE_DEVICE, 0), 0x40), |
239 | cmdreg | 0x10); | 238 | cmdreg | 0x10); |
240 | cmdreg = READCFG32(CFGOFFSET(0, PCI_DEVFN(PCI_BRIDGE_DEVICE, 0), 0x40)); | 239 | cmdreg = READCFG32(CFGOFFSET(0, PCI_DEVFN(PCI_BRIDGE_DEVICE, 0), 0x40)); |
241 | printk("PCIFeatureCtrl = %x\n", cmdreg); | ||
242 | 240 | ||
243 | /* | 241 | /* |
244 | * Establish mappings in KSEG2 (kernel virtual) to PCI I/O | 242 | * Establish mappings in KSEG2 (kernel virtual) to PCI I/O |
diff --git a/arch/mips/philips/pnx8550/common/setup.c b/arch/mips/philips/pnx8550/common/setup.c index ee6bf72094f6..0d8a77619391 100644 --- a/arch/mips/philips/pnx8550/common/setup.c +++ b/arch/mips/philips/pnx8550/common/setup.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/serial_ip3106.h> | 27 | #include <linux/serial_ip3106.h> |
28 | #include <linux/pm.h> | ||
28 | 29 | ||
29 | #include <asm/cpu.h> | 30 | #include <asm/cpu.h> |
30 | #include <asm/bootinfo.h> | 31 | #include <asm/bootinfo.h> |
@@ -90,7 +91,7 @@ void __init plat_setup(void) | |||
90 | 91 | ||
91 | _machine_restart = pnx8550_machine_restart; | 92 | _machine_restart = pnx8550_machine_restart; |
92 | _machine_halt = pnx8550_machine_halt; | 93 | _machine_halt = pnx8550_machine_halt; |
93 | _machine_power_off = pnx8550_machine_power_off; | 94 | pm_power_off = pnx8550_machine_power_off; |
94 | 95 | ||
95 | board_time_init = pnx8550_time_init; | 96 | board_time_init = pnx8550_time_init; |
96 | board_timer_setup = pnx8550_timer_setup; | 97 | board_timer_setup = pnx8550_timer_setup; |
diff --git a/arch/mips/pmc-sierra/yosemite/prom.c b/arch/mips/pmc-sierra/yosemite/prom.c index 555bfacf7647..165275c00cbb 100644 --- a/arch/mips/pmc-sierra/yosemite/prom.c +++ b/arch/mips/pmc-sierra/yosemite/prom.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/pm.h> | ||
16 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
17 | 18 | ||
18 | #include <asm/io.h> | 19 | #include <asm/io.h> |
@@ -92,7 +93,7 @@ void __init prom_init(void) | |||
92 | /* Callbacks for halt, restart */ | 93 | /* Callbacks for halt, restart */ |
93 | _machine_restart = (void (*)(char *)) prom_exit; | 94 | _machine_restart = (void (*)(char *)) prom_exit; |
94 | _machine_halt = prom_halt; | 95 | _machine_halt = prom_halt; |
95 | _machine_power_off = prom_halt; | 96 | pm_power_off = prom_halt; |
96 | 97 | ||
97 | debug_vectors = cv; | 98 | debug_vectors = cv; |
98 | arcs_cmdline[0] = '\0'; | 99 | arcs_cmdline[0] = '\0'; |
diff --git a/arch/mips/sgi-ip22/ip22-reset.c b/arch/mips/sgi-ip22/ip22-reset.c index 214ffd2e98a3..92a3b3c15ed3 100644 --- a/arch/mips/sgi-ip22/ip22-reset.c +++ b/arch/mips/sgi-ip22/ip22-reset.c | |||
@@ -3,8 +3,9 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1997, 1998, 2001, 2003 by Ralf Baechle | 6 | * Copyright (C) 1997, 1998, 2001, 03, 05, 06 by Ralf Baechle |
7 | */ | 7 | */ |
8 | #include <linux/linkage.h> | ||
8 | #include <linux/init.h> | 9 | #include <linux/init.h> |
9 | #include <linux/ds1286.h> | 10 | #include <linux/ds1286.h> |
10 | #include <linux/module.h> | 11 | #include <linux/module.h> |
@@ -12,6 +13,7 @@ | |||
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
13 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
14 | #include <linux/notifier.h> | 15 | #include <linux/notifier.h> |
16 | #include <linux/pm.h> | ||
15 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
16 | 18 | ||
17 | #include <asm/io.h> | 19 | #include <asm/io.h> |
@@ -41,28 +43,10 @@ static struct timer_list power_timer, blink_timer, debounce_timer, volume_timer; | |||
41 | 43 | ||
42 | #define MACHINE_PANICED 1 | 44 | #define MACHINE_PANICED 1 |
43 | #define MACHINE_SHUTTING_DOWN 2 | 45 | #define MACHINE_SHUTTING_DOWN 2 |
44 | static int machine_state = 0; | ||
45 | 46 | ||
46 | static void sgi_machine_restart(char *command) __attribute__((noreturn)); | 47 | static int machine_state; |
47 | static void sgi_machine_halt(void) __attribute__((noreturn)); | ||
48 | static void sgi_machine_power_off(void) __attribute__((noreturn)); | ||
49 | 48 | ||
50 | static void sgi_machine_restart(char *command) | 49 | static void ATTRIB_NORET sgi_machine_power_off(void) |
51 | { | ||
52 | if (machine_state & MACHINE_SHUTTING_DOWN) | ||
53 | sgi_machine_power_off(); | ||
54 | sgimc->cpuctrl0 |= SGIMC_CCTRL0_SYSINIT; | ||
55 | while (1); | ||
56 | } | ||
57 | |||
58 | static void sgi_machine_halt(void) | ||
59 | { | ||
60 | if (machine_state & MACHINE_SHUTTING_DOWN) | ||
61 | sgi_machine_power_off(); | ||
62 | ArcEnterInteractiveMode(); | ||
63 | } | ||
64 | |||
65 | static void sgi_machine_power_off(void) | ||
66 | { | 50 | { |
67 | unsigned int tmp; | 51 | unsigned int tmp; |
68 | 52 | ||
@@ -84,6 +68,21 @@ static void sgi_machine_power_off(void) | |||
84 | } | 68 | } |
85 | } | 69 | } |
86 | 70 | ||
71 | static void ATTRIB_NORET sgi_machine_restart(char *command) | ||
72 | { | ||
73 | if (machine_state & MACHINE_SHUTTING_DOWN) | ||
74 | sgi_machine_power_off(); | ||
75 | sgimc->cpuctrl0 |= SGIMC_CCTRL0_SYSINIT; | ||
76 | while (1); | ||
77 | } | ||
78 | |||
79 | static void ATTRIB_NORET sgi_machine_halt(void) | ||
80 | { | ||
81 | if (machine_state & MACHINE_SHUTTING_DOWN) | ||
82 | sgi_machine_power_off(); | ||
83 | ArcEnterInteractiveMode(); | ||
84 | } | ||
85 | |||
87 | static void power_timeout(unsigned long data) | 86 | static void power_timeout(unsigned long data) |
88 | { | 87 | { |
89 | sgi_machine_power_off(); | 88 | sgi_machine_power_off(); |
@@ -95,7 +94,7 @@ static void blink_timeout(unsigned long data) | |||
95 | sgi_ioc_reset ^= (SGIOC_RESET_LC0OFF|SGIOC_RESET_LC1OFF); | 94 | sgi_ioc_reset ^= (SGIOC_RESET_LC0OFF|SGIOC_RESET_LC1OFF); |
96 | sgioc->reset = sgi_ioc_reset; | 95 | sgioc->reset = sgi_ioc_reset; |
97 | 96 | ||
98 | mod_timer(&blink_timer, jiffies+data); | 97 | mod_timer(&blink_timer, jiffies + data); |
99 | } | 98 | } |
100 | 99 | ||
101 | static void debounce(unsigned long data) | 100 | static void debounce(unsigned long data) |
@@ -103,7 +102,7 @@ static void debounce(unsigned long data) | |||
103 | del_timer(&debounce_timer); | 102 | del_timer(&debounce_timer); |
104 | if (sgint->istat1 & SGINT_ISTAT1_PWR) { | 103 | if (sgint->istat1 & SGINT_ISTAT1_PWR) { |
105 | /* Interrupt still being sent. */ | 104 | /* Interrupt still being sent. */ |
106 | debounce_timer.expires = jiffies + 5; /* 0.05s */ | 105 | debounce_timer.expires = jiffies + (HZ / 20); /* 0.05s */ |
107 | add_timer(&debounce_timer); | 106 | add_timer(&debounce_timer); |
108 | 107 | ||
109 | sgioc->panel = SGIOC_PANEL_POWERON | SGIOC_PANEL_POWERINTR | | 108 | sgioc->panel = SGIOC_PANEL_POWERON | SGIOC_PANEL_POWERINTR | |
@@ -151,7 +150,7 @@ static inline void volume_up_button(unsigned long data) | |||
151 | indy_volume_button(1); | 150 | indy_volume_button(1); |
152 | 151 | ||
153 | if (sgint->istat1 & SGINT_ISTAT1_PWR) { | 152 | if (sgint->istat1 & SGINT_ISTAT1_PWR) { |
154 | volume_timer.expires = jiffies + 1; | 153 | volume_timer.expires = jiffies + (HZ / 100); |
155 | add_timer(&volume_timer); | 154 | add_timer(&volume_timer); |
156 | } | 155 | } |
157 | } | 156 | } |
@@ -164,7 +163,7 @@ static inline void volume_down_button(unsigned long data) | |||
164 | indy_volume_button(-1); | 163 | indy_volume_button(-1); |
165 | 164 | ||
166 | if (sgint->istat1 & SGINT_ISTAT1_PWR) { | 165 | if (sgint->istat1 & SGINT_ISTAT1_PWR) { |
167 | volume_timer.expires = jiffies + 1; | 166 | volume_timer.expires = jiffies + (HZ / 100); |
168 | add_timer(&volume_timer); | 167 | add_timer(&volume_timer); |
169 | } | 168 | } |
170 | } | 169 | } |
@@ -199,14 +198,14 @@ static irqreturn_t panel_int(int irq, void *dev_id, struct pt_regs *regs) | |||
199 | if (!(buttons & SGIOC_PANEL_VOLUPINTR)) { | 198 | if (!(buttons & SGIOC_PANEL_VOLUPINTR)) { |
200 | init_timer(&volume_timer); | 199 | init_timer(&volume_timer); |
201 | volume_timer.function = volume_up_button; | 200 | volume_timer.function = volume_up_button; |
202 | volume_timer.expires = jiffies + 1; | 201 | volume_timer.expires = jiffies + (HZ / 100); |
203 | add_timer(&volume_timer); | 202 | add_timer(&volume_timer); |
204 | } | 203 | } |
205 | /* Volume down button was pressed */ | 204 | /* Volume down button was pressed */ |
206 | if (!(buttons & SGIOC_PANEL_VOLDNINTR)) { | 205 | if (!(buttons & SGIOC_PANEL_VOLDNINTR)) { |
207 | init_timer(&volume_timer); | 206 | init_timer(&volume_timer); |
208 | volume_timer.function = volume_down_button; | 207 | volume_timer.function = volume_down_button; |
209 | volume_timer.expires = jiffies + 1; | 208 | volume_timer.expires = jiffies + (HZ / 100); |
210 | add_timer(&volume_timer); | 209 | add_timer(&volume_timer); |
211 | } | 210 | } |
212 | 211 | ||
@@ -234,7 +233,7 @@ static int __init reboot_setup(void) | |||
234 | { | 233 | { |
235 | _machine_restart = sgi_machine_restart; | 234 | _machine_restart = sgi_machine_restart; |
236 | _machine_halt = sgi_machine_halt; | 235 | _machine_halt = sgi_machine_halt; |
237 | _machine_power_off = sgi_machine_power_off; | 236 | pm_power_off = sgi_machine_power_off; |
238 | 237 | ||
239 | request_irq(SGI_PANEL_IRQ, panel_int, 0, "Front Panel", NULL); | 238 | request_irq(SGI_PANEL_IRQ, panel_int, 0, "Front Panel", NULL); |
240 | init_timer(&blink_timer); | 239 | init_timer(&blink_timer); |
diff --git a/arch/mips/sgi-ip22/ip22-setup.c b/arch/mips/sgi-ip22/ip22-setup.c index 5e59b4c8876b..7018e1833e85 100644 --- a/arch/mips/sgi-ip22/ip22-setup.c +++ b/arch/mips/sgi-ip22/ip22-setup.c | |||
@@ -56,6 +56,7 @@ extern void ip22_time_init(void) __init; | |||
56 | void __init plat_setup(void) | 56 | void __init plat_setup(void) |
57 | { | 57 | { |
58 | char *ctype; | 58 | char *ctype; |
59 | char *cserial; | ||
59 | 60 | ||
60 | board_be_init = ip22_be_init; | 61 | board_be_init = ip22_be_init; |
61 | ip22_time_init(); | 62 | ip22_time_init(); |
@@ -81,9 +82,14 @@ void __init plat_setup(void) | |||
81 | /* ARCS console environment variable is set to "g?" for | 82 | /* ARCS console environment variable is set to "g?" for |
82 | * graphics console, it is set to "d" for the first serial | 83 | * graphics console, it is set to "d" for the first serial |
83 | * line and "d2" for the second serial line. | 84 | * line and "d2" for the second serial line. |
85 | * | ||
86 | * Need to check if the case is 'g' but no keyboard: | ||
87 | * (ConsoleIn/Out = serial) | ||
84 | */ | 88 | */ |
85 | ctype = ArcGetEnvironmentVariable("console"); | 89 | ctype = ArcGetEnvironmentVariable("console"); |
86 | if (ctype && *ctype == 'd') { | 90 | cserial = ArcGetEnvironmentVariable("ConsoleOut"); |
91 | |||
92 | if ((ctype && *ctype == 'd') || (cserial && *cserial == 's')) { | ||
87 | static char options[8]; | 93 | static char options[8]; |
88 | char *baud = ArcGetEnvironmentVariable("dbaud"); | 94 | char *baud = ArcGetEnvironmentVariable("dbaud"); |
89 | if (baud) | 95 | if (baud) |
@@ -91,7 +97,7 @@ void __init plat_setup(void) | |||
91 | add_preferred_console("ttyS", *(ctype + 1) == '2' ? 1 : 0, | 97 | add_preferred_console("ttyS", *(ctype + 1) == '2' ? 1 : 0, |
92 | baud ? options : NULL); | 98 | baud ? options : NULL); |
93 | } else if (!ctype || *ctype != 'g') { | 99 | } else if (!ctype || *ctype != 'g') { |
94 | /* Use ARC if we don't want serial ('d') or Newport ('g'). */ | 100 | /* Use ARC if we don't want serial ('d') or graphics ('g'). */ |
95 | prom_flags |= PROM_FLAG_USE_AS_CONSOLE; | 101 | prom_flags |= PROM_FLAG_USE_AS_CONSOLE; |
96 | add_preferred_console("arc", 0, NULL); | 102 | add_preferred_console("arc", 0, NULL); |
97 | } | 103 | } |
diff --git a/arch/mips/sgi-ip27/ip27-reset.c b/arch/mips/sgi-ip27/ip27-reset.c index 2e16be94c78b..4322db57d3c1 100644 --- a/arch/mips/sgi-ip27/ip27-reset.c +++ b/arch/mips/sgi-ip27/ip27-reset.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Reset an IP27. | 6 | * Reset an IP27. |
7 | * | 7 | * |
8 | * Copyright (C) 1997, 1998, 1999, 2000 by Ralf Baechle | 8 | * Copyright (C) 1997, 1998, 1999, 2000, 06 by Ralf Baechle |
9 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 9 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
10 | */ | 10 | */ |
11 | #include <linux/config.h> | 11 | #include <linux/config.h> |
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
16 | #include <linux/mmzone.h> | 16 | #include <linux/mmzone.h> |
17 | #include <linux/nodemask.h> | 17 | #include <linux/nodemask.h> |
18 | #include <linux/pm.h> | ||
18 | 19 | ||
19 | #include <asm/io.h> | 20 | #include <asm/io.h> |
20 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
@@ -77,5 +78,5 @@ void ip27_reboot_setup(void) | |||
77 | { | 78 | { |
78 | _machine_restart = ip27_machine_restart; | 79 | _machine_restart = ip27_machine_restart; |
79 | _machine_halt = ip27_machine_halt; | 80 | _machine_halt = ip27_machine_halt; |
80 | _machine_power_off = ip27_machine_power_off; | 81 | pm_power_off = ip27_machine_power_off; |
81 | } | 82 | } |
diff --git a/arch/mips/sgi-ip32/ip32-reset.c b/arch/mips/sgi-ip32/ip32-reset.c index 88e1f52059ff..0c948008b023 100644 --- a/arch/mips/sgi-ip32/ip32-reset.c +++ b/arch/mips/sgi-ip32/ip32-reset.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/ds17287rtc.h> | 16 | #include <linux/ds17287rtc.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/pm.h> | ||
18 | 19 | ||
19 | #include <asm/addrspace.h> | 20 | #include <asm/addrspace.h> |
20 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
@@ -188,7 +189,7 @@ static __init int ip32_reboot_setup(void) | |||
188 | 189 | ||
189 | _machine_restart = ip32_machine_restart; | 190 | _machine_restart = ip32_machine_restart; |
190 | _machine_halt = ip32_machine_halt; | 191 | _machine_halt = ip32_machine_halt; |
191 | _machine_power_off = ip32_machine_power_off; | 192 | pm_power_off = ip32_machine_power_off; |
192 | 193 | ||
193 | init_timer(&blink_timer); | 194 | init_timer(&blink_timer); |
194 | blink_timer.function = blink_timeout; | 195 | blink_timer.function = blink_timeout; |
diff --git a/arch/mips/sibyte/cfe/setup.c b/arch/mips/sibyte/cfe/setup.c index 7a2c7a8510d4..ea308029450e 100644 --- a/arch/mips/sibyte/cfe/setup.c +++ b/arch/mips/sibyte/cfe/setup.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/blkdev.h> | 24 | #include <linux/blkdev.h> |
25 | #include <linux/bootmem.h> | 25 | #include <linux/bootmem.h> |
26 | #include <linux/pm.h> | ||
26 | #include <linux/smp.h> | 27 | #include <linux/smp.h> |
27 | 28 | ||
28 | #include <asm/bootinfo.h> | 29 | #include <asm/bootinfo.h> |
@@ -248,7 +249,7 @@ void __init prom_init(void) | |||
248 | 249 | ||
249 | _machine_restart = cfe_linux_restart; | 250 | _machine_restart = cfe_linux_restart; |
250 | _machine_halt = cfe_linux_halt; | 251 | _machine_halt = cfe_linux_halt; |
251 | _machine_power_off = cfe_linux_halt; | 252 | pm_power_off = cfe_linux_halt; |
252 | 253 | ||
253 | /* | 254 | /* |
254 | * Check if a loader was used; if NOT, the 4 arguments are | 255 | * Check if a loader was used; if NOT, the 4 arguments are |
diff --git a/arch/mips/sibyte/sb1250/prom.c b/arch/mips/sibyte/sb1250/prom.c index de62ab0f55a2..742043f8d755 100644 --- a/arch/mips/sibyte/sb1250/prom.c +++ b/arch/mips/sibyte/sb1250/prom.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/bootmem.h> | 24 | #include <linux/bootmem.h> |
25 | #include <linux/smp.h> | 25 | #include <linux/smp.h> |
26 | #include <linux/initrd.h> | 26 | #include <linux/initrd.h> |
27 | #include <linux/pm.h> | ||
27 | 28 | ||
28 | #include <asm/bootinfo.h> | 29 | #include <asm/bootinfo.h> |
29 | #include <asm/reboot.h> | 30 | #include <asm/reboot.h> |
@@ -79,7 +80,7 @@ void __init prom_init(void) | |||
79 | { | 80 | { |
80 | _machine_restart = (void (*)(char *))prom_linux_exit; | 81 | _machine_restart = (void (*)(char *))prom_linux_exit; |
81 | _machine_halt = prom_linux_exit; | 82 | _machine_halt = prom_linux_exit; |
82 | _machine_power_off = prom_linux_exit; | 83 | pm_power_off = prom_linux_exit; |
83 | 84 | ||
84 | strcpy(arcs_cmdline, "root=/dev/ram0 "); | 85 | strcpy(arcs_cmdline, "root=/dev/ram0 "); |
85 | 86 | ||
diff --git a/arch/mips/sibyte/sb1250/setup.c b/arch/mips/sibyte/sb1250/setup.c index df2e266c700c..fde4751c84fe 100644 --- a/arch/mips/sibyte/sb1250/setup.c +++ b/arch/mips/sibyte/sb1250/setup.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
17 | */ | 17 | */ |
18 | #include <linux/config.h> | 18 | #include <linux/config.h> |
19 | #include <linux/init.h> | ||
19 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
20 | #include <linux/reboot.h> | 21 | #include <linux/reboot.h> |
21 | #include <linux/string.h> | 22 | #include <linux/string.h> |
@@ -42,7 +43,7 @@ static inline int setup_bcm112x(void); | |||
42 | 43 | ||
43 | /* Setup code likely to be common to all SiByte platforms */ | 44 | /* Setup code likely to be common to all SiByte platforms */ |
44 | 45 | ||
45 | static inline int sys_rev_decode(void) | 46 | static int __init sys_rev_decode(void) |
46 | { | 47 | { |
47 | int ret = 0; | 48 | int ret = 0; |
48 | 49 | ||
@@ -74,7 +75,7 @@ static inline int sys_rev_decode(void) | |||
74 | return ret; | 75 | return ret; |
75 | } | 76 | } |
76 | 77 | ||
77 | static inline int setup_bcm1250(void) | 78 | static int __init setup_bcm1250(void) |
78 | { | 79 | { |
79 | int ret = 0; | 80 | int ret = 0; |
80 | 81 | ||
@@ -120,7 +121,7 @@ static inline int setup_bcm1250(void) | |||
120 | return ret; | 121 | return ret; |
121 | } | 122 | } |
122 | 123 | ||
123 | static inline int setup_bcm112x(void) | 124 | static int __init setup_bcm112x(void) |
124 | { | 125 | { |
125 | int ret = 0; | 126 | int ret = 0; |
126 | 127 | ||
@@ -146,7 +147,7 @@ static inline int setup_bcm112x(void) | |||
146 | return ret; | 147 | return ret; |
147 | } | 148 | } |
148 | 149 | ||
149 | void sb1250_setup(void) | 150 | void __init sb1250_setup(void) |
150 | { | 151 | { |
151 | uint64_t sys_rev; | 152 | uint64_t sys_rev; |
152 | int plldiv; | 153 | int plldiv; |
@@ -169,31 +170,42 @@ void sb1250_setup(void) | |||
169 | soc_str, pass_str, zbbus_mhz * 2, sb1_pass); | 170 | soc_str, pass_str, zbbus_mhz * 2, sb1_pass); |
170 | prom_printf("Board type: %s\n", get_system_type()); | 171 | prom_printf("Board type: %s\n", get_system_type()); |
171 | 172 | ||
172 | switch(war_pass) { | 173 | switch (war_pass) { |
173 | case K_SYS_REVISION_BCM1250_PASS1: | 174 | case K_SYS_REVISION_BCM1250_PASS1: |
174 | #ifndef CONFIG_SB1_PASS_1_WORKAROUNDS | 175 | #ifndef CONFIG_SB1_PASS_1_WORKAROUNDS |
175 | prom_printf("@@@@ This is a BCM1250 A0-A2 (Pass 1) board, and the kernel doesn't have the proper workarounds compiled in. @@@@\n"); | 176 | prom_printf("@@@@ This is a BCM1250 A0-A2 (Pass 1) board, " |
177 | "and the kernel doesn't have the proper " | ||
178 | "workarounds compiled in. @@@@\n"); | ||
176 | bad_config = 1; | 179 | bad_config = 1; |
177 | #endif | 180 | #endif |
178 | break; | 181 | break; |
179 | case K_SYS_REVISION_BCM1250_PASS2: | 182 | case K_SYS_REVISION_BCM1250_PASS2: |
180 | /* Pass 2 - easiest as default for now - so many numbers */ | 183 | /* Pass 2 - easiest as default for now - so many numbers */ |
181 | #if !defined(CONFIG_SB1_PASS_2_WORKAROUNDS) || !defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) | 184 | #if !defined(CONFIG_SB1_PASS_2_WORKAROUNDS) || \ |
182 | prom_printf("@@@@ This is a BCM1250 A3-A10 board, and the kernel doesn't have the proper workarounds compiled in. @@@@\n"); | 185 | !defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) |
186 | prom_printf("@@@@ This is a BCM1250 A3-A10 board, and the " | ||
187 | "kernel doesn't have the proper workarounds " | ||
188 | "compiled in. @@@@\n"); | ||
183 | bad_config = 1; | 189 | bad_config = 1; |
184 | #endif | 190 | #endif |
185 | #ifdef CONFIG_CPU_HAS_PREFETCH | 191 | #ifdef CONFIG_CPU_HAS_PREFETCH |
186 | prom_printf("@@@@ Prefetches may be enabled in this kernel, but are buggy on this board. @@@@\n"); | 192 | prom_printf("@@@@ Prefetches may be enabled in this kernel, " |
193 | "but are buggy on this board. @@@@\n"); | ||
187 | bad_config = 1; | 194 | bad_config = 1; |
188 | #endif | 195 | #endif |
189 | break; | 196 | break; |
190 | case K_SYS_REVISION_BCM1250_PASS2_2: | 197 | case K_SYS_REVISION_BCM1250_PASS2_2: |
191 | #ifndef CONFIG_SB1_PASS_2_WORKAROUNDS | 198 | #ifndef CONFIG_SB1_PASS_2_WORKAROUNDS |
192 | prom_printf("@@@@ This is a BCM1250 B1/B2. board, and the kernel doesn't have the proper workarounds compiled in. @@@@\n"); | 199 | prom_printf("@@@@ This is a BCM1250 B1/B2. board, and the " |
200 | "kernel doesn't have the proper workarounds " | ||
201 | "compiled in. @@@@\n"); | ||
193 | bad_config = 1; | 202 | bad_config = 1; |
194 | #endif | 203 | #endif |
195 | #if defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) || !defined(CONFIG_CPU_HAS_PREFETCH) | 204 | #if defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) || \ |
196 | prom_printf("@@@@ This is a BCM1250 B1/B2, but the kernel is conservatively configured for an 'A' stepping. @@@@\n"); | 205 | !defined(CONFIG_CPU_HAS_PREFETCH) |
206 | prom_printf("@@@@ This is a BCM1250 B1/B2, but the kernel is " | ||
207 | "conservatively configured for an 'A' stepping. " | ||
208 | "@@@@\n"); | ||
197 | #endif | 209 | #endif |
198 | break; | 210 | break; |
199 | default: | 211 | default: |
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c index 262c85680709..1141fcd13a59 100644 --- a/arch/mips/sni/setup.c +++ b/arch/mips/sni/setup.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * License. See the file "COPYING" in the main directory of this archive | 5 | * License. See the file "COPYING" in the main directory of this archive |
6 | * for more details. | 6 | * for more details. |
7 | * | 7 | * |
8 | * Copyright (C) 1996, 97, 98, 2000, 03, 04 Ralf Baechle (ralf@linux-mips.org) | 8 | * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org) |
9 | */ | 9 | */ |
10 | #include <linux/config.h> | 10 | #include <linux/config.h> |
11 | #include <linux/eisa.h> | 11 | #include <linux/eisa.h> |
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/mc146818rtc.h> | 17 | #include <linux/mc146818rtc.h> |
18 | #include <linux/pm.h> | ||
18 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
19 | #include <linux/console.h> | 20 | #include <linux/console.h> |
20 | #include <linux/fb.h> | 21 | #include <linux/fb.h> |
@@ -189,7 +190,7 @@ void __init plat_setup(void) | |||
189 | 190 | ||
190 | _machine_restart = sni_machine_restart; | 191 | _machine_restart = sni_machine_restart; |
191 | _machine_halt = sni_machine_halt; | 192 | _machine_halt = sni_machine_halt; |
192 | _machine_power_off = sni_machine_power_off; | 193 | pm_power_off = sni_machine_power_off; |
193 | 194 | ||
194 | sni_display_setup(); | 195 | sni_display_setup(); |
195 | 196 | ||
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c index e4d095d3e192..e19e2be70f76 100644 --- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c +++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c | |||
@@ -60,7 +60,6 @@ void __init prom_init_cmdline(void) | |||
60 | 60 | ||
61 | void __init prom_init(void) | 61 | void __init prom_init(void) |
62 | { | 62 | { |
63 | const char* toshiba_name_list[] = GROUP_TOSHIBA_NAMES; | ||
64 | extern int tx4927_get_mem_size(void); | 63 | extern int tx4927_get_mem_size(void); |
65 | extern char* toshiba_name; | 64 | extern char* toshiba_name; |
66 | int msize; | 65 | int msize; |
@@ -69,12 +68,13 @@ void __init prom_init(void) | |||
69 | 68 | ||
70 | mips_machgroup = MACH_GROUP_TOSHIBA; | 69 | mips_machgroup = MACH_GROUP_TOSHIBA; |
71 | 70 | ||
72 | if ((read_c0_prid() & 0xff) == PRID_REV_TX4927) | 71 | if ((read_c0_prid() & 0xff) == PRID_REV_TX4927) { |
73 | mips_machtype = MACH_TOSHIBA_RBTX4927; | 72 | mips_machtype = MACH_TOSHIBA_RBTX4927; |
74 | else | 73 | toshiba_name = "TX4927"; |
74 | } else { | ||
75 | mips_machtype = MACH_TOSHIBA_RBTX4937; | 75 | mips_machtype = MACH_TOSHIBA_RBTX4937; |
76 | 76 | toshiba_name = "TX4937"; | |
77 | toshiba_name = toshiba_name_list[mips_machtype]; | 77 | } |
78 | 78 | ||
79 | msize = tx4927_get_mem_size(); | 79 | msize = tx4927_get_mem_size(); |
80 | add_memory_region(0, msize << 20, BOOT_MEM_RAM); | 80 | add_memory_region(0, msize << 20, BOOT_MEM_RAM); |
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c index 990fcb294bab..2ad6401d2af4 100644 --- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c +++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c | |||
@@ -53,6 +53,8 @@ | |||
53 | #include <linux/interrupt.h> | 53 | #include <linux/interrupt.h> |
54 | #include <linux/pci.h> | 54 | #include <linux/pci.h> |
55 | #include <linux/timex.h> | 55 | #include <linux/timex.h> |
56 | #include <linux/pm.h> | ||
57 | |||
56 | #include <asm/bootinfo.h> | 58 | #include <asm/bootinfo.h> |
57 | #include <asm/page.h> | 59 | #include <asm/page.h> |
58 | #include <asm/io.h> | 60 | #include <asm/io.h> |
@@ -537,19 +539,10 @@ void tx4927_pci_setup(void) | |||
537 | TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_PCI2, | 539 | TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_PCI2, |
538 | "0x%08lx=mips_io_port_base", | 540 | "0x%08lx=mips_io_port_base", |
539 | mips_io_port_base); | 541 | mips_io_port_base); |
540 | |||
541 | TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_PCI2, | ||
542 | "setup pci_io_resource to 0x%08lx 0x%08lx\n", | ||
543 | pci_io_resource.start, | ||
544 | pci_io_resource.end); | ||
545 | TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_PCI2, | ||
546 | "setup pci_mem_resource to 0x%08lx 0x%08lx\n", | ||
547 | pci_mem_resource.start, | ||
548 | pci_mem_resource.end); | ||
549 | |||
550 | if (!called) { | 542 | if (!called) { |
551 | printk | 543 | printk |
552 | ("TX4927 PCIC -- DID:%04x VID:%04x RID:%02x Arbiter:%s\n", | 544 | ("%s PCIC -- DID:%04x VID:%04x RID:%02x Arbiter:%s\n", |
545 | toshiba_name, | ||
553 | (unsigned short) (tx4927_pcicptr->pciid >> 16), | 546 | (unsigned short) (tx4927_pcicptr->pciid >> 16), |
554 | (unsigned short) (tx4927_pcicptr->pciid & 0xffff), | 547 | (unsigned short) (tx4927_pcicptr->pciid & 0xffff), |
555 | (unsigned short) (tx4927_pcicptr->pciccrev & 0xff), | 548 | (unsigned short) (tx4927_pcicptr->pciccrev & 0xff), |
@@ -562,21 +555,52 @@ void tx4927_pci_setup(void) | |||
562 | (tx4927_ccfgptr->ccfg & TX4927_CCFG_PCI66) ? " PCI66" : ""); | 555 | (tx4927_ccfgptr->ccfg & TX4927_CCFG_PCI66) ? " PCI66" : ""); |
563 | if (tx4927_ccfgptr->pcfg & TX4927_PCFG_PCICLKEN_ALL) { | 556 | if (tx4927_ccfgptr->pcfg & TX4927_PCFG_PCICLKEN_ALL) { |
564 | int pciclk = 0; | 557 | int pciclk = 0; |
565 | switch ((unsigned long) tx4927_ccfgptr-> | 558 | if (mips_machtype == MACH_TOSHIBA_RBTX4937) |
566 | ccfg & TX4927_CCFG_PCIDIVMODE_MASK) { | 559 | switch ((unsigned long) tx4927_ccfgptr-> |
567 | case TX4927_CCFG_PCIDIVMODE_2_5: | 560 | ccfg & TX4937_CCFG_PCIDIVMODE_MASK) { |
568 | pciclk = tx4927_cpu_clock * 2 / 5; | 561 | case TX4937_CCFG_PCIDIVMODE_4: |
569 | break; | 562 | pciclk = tx4927_cpu_clock / 4; |
570 | case TX4927_CCFG_PCIDIVMODE_3: | 563 | break; |
571 | pciclk = tx4927_cpu_clock / 3; | 564 | case TX4937_CCFG_PCIDIVMODE_4_5: |
572 | break; | 565 | pciclk = tx4927_cpu_clock * 2 / 9; |
573 | case TX4927_CCFG_PCIDIVMODE_5: | 566 | break; |
574 | pciclk = tx4927_cpu_clock / 5; | 567 | case TX4937_CCFG_PCIDIVMODE_5: |
575 | break; | 568 | pciclk = tx4927_cpu_clock / 5; |
576 | case TX4927_CCFG_PCIDIVMODE_6: | 569 | break; |
577 | pciclk = tx4927_cpu_clock / 6; | 570 | case TX4937_CCFG_PCIDIVMODE_5_5: |
578 | break; | 571 | pciclk = tx4927_cpu_clock * 2 / 11; |
579 | } | 572 | break; |
573 | case TX4937_CCFG_PCIDIVMODE_8: | ||
574 | pciclk = tx4927_cpu_clock / 8; | ||
575 | break; | ||
576 | case TX4937_CCFG_PCIDIVMODE_9: | ||
577 | pciclk = tx4927_cpu_clock / 9; | ||
578 | break; | ||
579 | case TX4937_CCFG_PCIDIVMODE_10: | ||
580 | pciclk = tx4927_cpu_clock / 10; | ||
581 | break; | ||
582 | case TX4937_CCFG_PCIDIVMODE_11: | ||
583 | pciclk = tx4927_cpu_clock / 11; | ||
584 | break; | ||
585 | } | ||
586 | |||
587 | else | ||
588 | switch ((unsigned long) tx4927_ccfgptr-> | ||
589 | ccfg & TX4927_CCFG_PCIDIVMODE_MASK) { | ||
590 | case TX4927_CCFG_PCIDIVMODE_2_5: | ||
591 | pciclk = tx4927_cpu_clock * 2 / 5; | ||
592 | break; | ||
593 | case TX4927_CCFG_PCIDIVMODE_3: | ||
594 | pciclk = tx4927_cpu_clock / 3; | ||
595 | break; | ||
596 | case TX4927_CCFG_PCIDIVMODE_5: | ||
597 | pciclk = tx4927_cpu_clock / 5; | ||
598 | break; | ||
599 | case TX4927_CCFG_PCIDIVMODE_6: | ||
600 | pciclk = tx4927_cpu_clock / 6; | ||
601 | break; | ||
602 | } | ||
603 | |||
580 | printk("Internal(%dMHz)", pciclk / 1000000); | 604 | printk("Internal(%dMHz)", pciclk / 1000000); |
581 | } else { | 605 | } else { |
582 | int pciclk = 0; | 606 | int pciclk = 0; |
@@ -814,24 +838,40 @@ void __init toshiba_rbtx4927_setup(void) | |||
814 | ":ResetRoutines\n"); | 838 | ":ResetRoutines\n"); |
815 | _machine_restart = toshiba_rbtx4927_restart; | 839 | _machine_restart = toshiba_rbtx4927_restart; |
816 | _machine_halt = toshiba_rbtx4927_halt; | 840 | _machine_halt = toshiba_rbtx4927_halt; |
817 | _machine_power_off = toshiba_rbtx4927_power_off; | 841 | pm_power_off = toshiba_rbtx4927_power_off; |
818 | 842 | ||
819 | #ifdef CONFIG_PCI | 843 | #ifdef CONFIG_PCI |
820 | 844 | ||
821 | /* PCIC */ | 845 | /* PCIC */ |
822 | /* | 846 | /* |
823 | * ASSUMPTION: PCIDIVMODE is configured for PCI 33MHz or 66MHz. | 847 | * ASSUMPTION: PCIDIVMODE is configured for PCI 33MHz or 66MHz. |
824 | * PCIDIVMODE[12:11]'s initial value are given by S9[4:3] (ON:0, OFF:1). | 848 | * |
849 | * For TX4927: | ||
850 | * PCIDIVMODE[12:11]'s initial value is given by S9[4:3] (ON:0, OFF:1). | ||
825 | * CPU 166MHz: PCI 66MHz : PCIDIVMODE: 00 (1/2.5) | 851 | * CPU 166MHz: PCI 66MHz : PCIDIVMODE: 00 (1/2.5) |
826 | * CPU 200MHz: PCI 66MHz : PCIDIVMODE: 01 (1/3) | 852 | * CPU 200MHz: PCI 66MHz : PCIDIVMODE: 01 (1/3) |
827 | * CPU 166MHz: PCI 33MHz : PCIDIVMODE: 10 (1/5) | 853 | * CPU 166MHz: PCI 33MHz : PCIDIVMODE: 10 (1/5) |
828 | * CPU 200MHz: PCI 33MHz : PCIDIVMODE: 11 (1/6) | 854 | * CPU 200MHz: PCI 33MHz : PCIDIVMODE: 11 (1/6) |
829 | * i.e. S9[3]: ON (83MHz), OFF (100MHz) | 855 | * i.e. S9[3]: ON (83MHz), OFF (100MHz) |
856 | * | ||
857 | * For TX4937: | ||
858 | * PCIDIVMODE[12:11]'s initial value is given by S1[5:4] (ON:0, OFF:1) | ||
859 | * PCIDIVMODE[10] is 0. | ||
860 | * CPU 266MHz: PCI 33MHz : PCIDIVMODE: 000 (1/8) | ||
861 | * CPU 266MHz: PCI 66MHz : PCIDIVMODE: 001 (1/4) | ||
862 | * CPU 300MHz: PCI 33MHz : PCIDIVMODE: 010 (1/9) | ||
863 | * CPU 300MHz: PCI 66MHz : PCIDIVMODE: 011 (1/4.5) | ||
864 | * CPU 333MHz: PCI 33MHz : PCIDIVMODE: 100 (1/10) | ||
865 | * CPU 333MHz: PCI 66MHz : PCIDIVMODE: 101 (1/5) | ||
866 | * | ||
830 | */ | 867 | */ |
831 | TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_PCI1, | 868 | TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_PCI1, |
832 | "ccfg is %lx, DIV is %x\n", | 869 | "ccfg is %lx, PCIDIVMODE is %x\n", |
833 | (unsigned long) tx4927_ccfgptr-> | 870 | (unsigned long) tx4927_ccfgptr->ccfg, |
834 | ccfg, TX4927_CCFG_PCIDIVMODE_MASK); | 871 | (unsigned long) tx4927_ccfgptr->ccfg & |
872 | (mips_machtype == MACH_TOSHIBA_RBTX4937 ? | ||
873 | TX4937_CCFG_PCIDIVMODE_MASK : | ||
874 | TX4927_CCFG_PCIDIVMODE_MASK)); | ||
835 | 875 | ||
836 | TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_PCI1, | 876 | TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_PCI1, |
837 | "PCI66 mode is %lx, PCI mode is %lx, pci arb is %lx\n", | 877 | "PCI66 mode is %lx, PCI mode is %lx, pci arb is %lx\n", |
@@ -842,20 +882,30 @@ void __init toshiba_rbtx4927_setup(void) | |||
842 | (unsigned long) tx4927_ccfgptr-> | 882 | (unsigned long) tx4927_ccfgptr-> |
843 | ccfg & TX4927_CCFG_PCIXARB); | 883 | ccfg & TX4927_CCFG_PCIXARB); |
844 | 884 | ||
845 | TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_PCI1, | 885 | if (mips_machtype == MACH_TOSHIBA_RBTX4937) |
846 | "PCIDIVMODE is %lx\n", | 886 | switch ((unsigned long)tx4927_ccfgptr-> |
847 | (unsigned long) tx4927_ccfgptr-> | 887 | ccfg & TX4937_CCFG_PCIDIVMODE_MASK) { |
848 | ccfg & TX4927_CCFG_PCIDIVMODE_MASK); | 888 | case TX4937_CCFG_PCIDIVMODE_8: |
849 | 889 | case TX4937_CCFG_PCIDIVMODE_4: | |
850 | switch ((unsigned long) tx4927_ccfgptr-> | 890 | tx4927_cpu_clock = 266666666; /* 266MHz */ |
851 | ccfg & TX4927_CCFG_PCIDIVMODE_MASK) { | 891 | break; |
852 | case TX4927_CCFG_PCIDIVMODE_2_5: | 892 | case TX4937_CCFG_PCIDIVMODE_9: |
853 | case TX4927_CCFG_PCIDIVMODE_5: | 893 | case TX4937_CCFG_PCIDIVMODE_4_5: |
854 | tx4927_cpu_clock = 166000000; /* 166MHz */ | 894 | tx4927_cpu_clock = 300000000; /* 300MHz */ |
855 | break; | 895 | break; |
856 | default: | 896 | default: |
857 | tx4927_cpu_clock = 200000000; /* 200MHz */ | 897 | tx4927_cpu_clock = 333333333; /* 333MHz */ |
858 | } | 898 | } |
899 | else | ||
900 | switch ((unsigned long)tx4927_ccfgptr-> | ||
901 | ccfg & TX4927_CCFG_PCIDIVMODE_MASK) { | ||
902 | case TX4927_CCFG_PCIDIVMODE_2_5: | ||
903 | case TX4927_CCFG_PCIDIVMODE_5: | ||
904 | tx4927_cpu_clock = 166666666; /* 166MHz */ | ||
905 | break; | ||
906 | default: | ||
907 | tx4927_cpu_clock = 200000000; /* 200MHz */ | ||
908 | } | ||
859 | 909 | ||
860 | /* CCFG */ | 910 | /* CCFG */ |
861 | /* enable Timeout BusError */ | 911 | /* enable Timeout BusError */ |
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/setup.c b/arch/mips/tx4938/toshiba_rbtx4938/setup.c index 9f1dcc8ca5a3..5c7ace982a49 100644 --- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c +++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/console.h> | 21 | #include <linux/console.h> |
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/pm.h> | ||
24 | |||
23 | #include <asm/wbflush.h> | 25 | #include <asm/wbflush.h> |
24 | #include <asm/reboot.h> | 26 | #include <asm/reboot.h> |
25 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
@@ -1003,7 +1005,7 @@ void __init toshiba_rbtx4938_setup(void) | |||
1003 | 1005 | ||
1004 | _machine_restart = rbtx4938_machine_restart; | 1006 | _machine_restart = rbtx4938_machine_restart; |
1005 | _machine_halt = rbtx4938_machine_halt; | 1007 | _machine_halt = rbtx4938_machine_halt; |
1006 | _machine_power_off = rbtx4938_machine_power_off; | 1008 | pm_power_off = rbtx4938_machine_power_off; |
1007 | 1009 | ||
1008 | *rbtx4938_led_ptr = 0xff; | 1010 | *rbtx4938_led_ptr = 0xff; |
1009 | printk("RBTX4938 --- FPGA(Rev %02x)", *rbtx4938_fpga_rev_ptr); | 1011 | printk("RBTX4938 --- FPGA(Rev %02x)", *rbtx4938_fpga_rev_ptr); |
diff --git a/arch/mips/vr41xx/common/pmu.c b/arch/mips/vr41xx/common/pmu.c index 02bf4f7d06ba..5e469796413f 100644 --- a/arch/mips/vr41xx/common/pmu.c +++ b/arch/mips/vr41xx/common/pmu.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/ioport.h> | 22 | #include <linux/ioport.h> |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/pm.h> | ||
24 | #include <linux/smp.h> | 25 | #include <linux/smp.h> |
25 | #include <linux/types.h> | 26 | #include <linux/types.h> |
26 | 27 | ||
@@ -114,7 +115,7 @@ static int __init vr41xx_pmu_init(void) | |||
114 | 115 | ||
115 | _machine_restart = vr41xx_restart; | 116 | _machine_restart = vr41xx_restart; |
116 | _machine_halt = vr41xx_halt; | 117 | _machine_halt = vr41xx_halt; |
117 | _machine_power_off = vr41xx_power_off; | 118 | pm_power_off = vr41xx_power_off; |
118 | 119 | ||
119 | return 0; | 120 | return 0; |
120 | } | 121 | } |