diff options
Diffstat (limited to 'arch')
94 files changed, 2378 insertions, 663 deletions
diff --git a/arch/.gitignore b/arch/.gitignore new file mode 100644 index 000000000000..741468920320 --- /dev/null +++ b/arch/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | i386 | ||
2 | x86_64 | ||
diff --git a/arch/alpha/math-emu/math.c b/arch/alpha/math-emu/math.c index ae79dd970b02..58c2669a1dd4 100644 --- a/arch/alpha/math-emu/math.c +++ b/arch/alpha/math-emu/math.c | |||
@@ -225,7 +225,7 @@ alpha_fp_emul (unsigned long pc) | |||
225 | FP_UNPACK_SP(SB, &vb); | 225 | FP_UNPACK_SP(SB, &vb); |
226 | DR_c = DB_c; | 226 | DR_c = DB_c; |
227 | DR_s = DB_s; | 227 | DR_s = DB_s; |
228 | DR_e = DB_e; | 228 | DR_e = DB_e + (1024 - 128); |
229 | DR_f = SB_f << (52 - 23); | 229 | DR_f = SB_f << (52 - 23); |
230 | goto pack_d; | 230 | goto pack_d; |
231 | } | 231 | } |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c4de2d4664d7..a04f507e7f2c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1072,11 +1072,13 @@ source "drivers/rtc/Kconfig" | |||
1072 | 1072 | ||
1073 | source "drivers/dma/Kconfig" | 1073 | source "drivers/dma/Kconfig" |
1074 | 1074 | ||
1075 | source "drivers/dca/Kconfig" | ||
1076 | |||
1075 | endmenu | 1077 | endmenu |
1076 | 1078 | ||
1077 | source "fs/Kconfig" | 1079 | source "fs/Kconfig" |
1078 | 1080 | ||
1079 | source "kernel/Kconfig.instrumentation" | 1081 | source "arch/arm/Kconfig.instrumentation" |
1080 | 1082 | ||
1081 | source "arch/arm/Kconfig.debug" | 1083 | source "arch/arm/Kconfig.debug" |
1082 | 1084 | ||
diff --git a/arch/arm/Kconfig.instrumentation b/arch/arm/Kconfig.instrumentation new file mode 100644 index 000000000000..63b8c6d5606a --- /dev/null +++ b/arch/arm/Kconfig.instrumentation | |||
@@ -0,0 +1,52 @@ | |||
1 | menuconfig INSTRUMENTATION | ||
2 | bool "Instrumentation Support" | ||
3 | default y | ||
4 | ---help--- | ||
5 | Say Y here to get to see options related to performance measurement, | ||
6 | system-wide debugging, and testing. This option alone does not add any | ||
7 | kernel code. | ||
8 | |||
9 | If you say N, all options in this submenu will be skipped and | ||
10 | disabled. If you're trying to debug the kernel itself, go see the | ||
11 | Kernel Hacking menu. | ||
12 | |||
13 | if INSTRUMENTATION | ||
14 | |||
15 | config PROFILING | ||
16 | bool "Profiling support (EXPERIMENTAL)" | ||
17 | help | ||
18 | Say Y here to enable the extended profiling support mechanisms used | ||
19 | by profilers such as OProfile. | ||
20 | |||
21 | config OPROFILE | ||
22 | tristate "OProfile system profiling (EXPERIMENTAL)" | ||
23 | depends on PROFILING && !UML | ||
24 | help | ||
25 | OProfile is a profiling system capable of profiling the | ||
26 | whole system, include the kernel, kernel modules, libraries, | ||
27 | and applications. | ||
28 | |||
29 | If unsure, say N. | ||
30 | |||
31 | config OPROFILE_ARMV6 | ||
32 | bool | ||
33 | depends on OPROFILE && CPU_V6 && !SMP | ||
34 | default y | ||
35 | select OPROFILE_ARM11_CORE | ||
36 | |||
37 | config OPROFILE_MPCORE | ||
38 | bool | ||
39 | depends on OPROFILE && CPU_V6 && SMP | ||
40 | default y | ||
41 | select OPROFILE_ARM11_CORE | ||
42 | |||
43 | config OPROFILE_ARM11_CORE | ||
44 | bool | ||
45 | |||
46 | config MARKERS | ||
47 | bool "Activate markers" | ||
48 | help | ||
49 | Place an empty function call at each marker site. Can be | ||
50 | dynamically changed for a probe function. | ||
51 | |||
52 | endif # INSTRUMENTATION | ||
diff --git a/arch/arm/mach-at91/board-ek.c b/arch/arm/mach-at91/board-ek.c index d05b1b2be9fb..53a5ef9e72ee 100644 --- a/arch/arm/mach-at91/board-ek.c +++ b/arch/arm/mach-at91/board-ek.c | |||
@@ -109,6 +109,15 @@ static struct spi_board_info ek_spi_devices[] = { | |||
109 | #endif | 109 | #endif |
110 | }; | 110 | }; |
111 | 111 | ||
112 | static struct i2c_board_info __initdata ek_i2c_devices[] = { | ||
113 | { | ||
114 | I2C_BOARD_INFO("ics1523", 0x26), | ||
115 | }, | ||
116 | { | ||
117 | I2C_BOARD_INFO("dac3550", 0x4d), | ||
118 | } | ||
119 | }; | ||
120 | |||
112 | #define EK_FLASH_BASE AT91_CHIPSELECT_0 | 121 | #define EK_FLASH_BASE AT91_CHIPSELECT_0 |
113 | #define EK_FLASH_SIZE 0x200000 | 122 | #define EK_FLASH_SIZE 0x200000 |
114 | 123 | ||
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index f65baa95986e..d5f6ea14fc7b 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -40,31 +40,29 @@ static int fsample_keymap[] = { | |||
40 | KEY(0,1,KEY_RIGHT), | 40 | KEY(0,1,KEY_RIGHT), |
41 | KEY(0,2,KEY_LEFT), | 41 | KEY(0,2,KEY_LEFT), |
42 | KEY(0,3,KEY_DOWN), | 42 | KEY(0,3,KEY_DOWN), |
43 | KEY(0,4,KEY_CENTER), | 43 | KEY(0,4,KEY_ENTER), |
44 | KEY(0,5,KEY_0_5), | 44 | KEY(1,0,KEY_F10), |
45 | KEY(1,0,KEY_SOFT2), | ||
46 | KEY(1,1,KEY_SEND), | 45 | KEY(1,1,KEY_SEND), |
47 | KEY(1,2,KEY_END), | 46 | KEY(1,2,KEY_END), |
48 | KEY(1,3,KEY_VOLUMEDOWN), | 47 | KEY(1,3,KEY_VOLUMEDOWN), |
49 | KEY(1,4,KEY_VOLUMEUP), | 48 | KEY(1,4,KEY_VOLUMEUP), |
50 | KEY(1,5,KEY_RECORD), | 49 | KEY(1,5,KEY_RECORD), |
51 | KEY(2,0,KEY_SOFT1), | 50 | KEY(2,0,KEY_F9), |
52 | KEY(2,1,KEY_3), | 51 | KEY(2,1,KEY_3), |
53 | KEY(2,2,KEY_6), | 52 | KEY(2,2,KEY_6), |
54 | KEY(2,3,KEY_9), | 53 | KEY(2,3,KEY_9), |
55 | KEY(2,4,KEY_SHARP), | 54 | KEY(2,4,KEY_KPDOT), |
56 | KEY(2,5,KEY_2_5), | ||
57 | KEY(3,0,KEY_BACK), | 55 | KEY(3,0,KEY_BACK), |
58 | KEY(3,1,KEY_2), | 56 | KEY(3,1,KEY_2), |
59 | KEY(3,2,KEY_5), | 57 | KEY(3,2,KEY_5), |
60 | KEY(3,3,KEY_8), | 58 | KEY(3,3,KEY_8), |
61 | KEY(3,4,KEY_0), | 59 | KEY(3,4,KEY_0), |
62 | KEY(3,5,KEY_HEADSETHOOK), | 60 | KEY(3,5,KEY_KPSLASH), |
63 | KEY(4,0,KEY_HOME), | 61 | KEY(4,0,KEY_HOME), |
64 | KEY(4,1,KEY_1), | 62 | KEY(4,1,KEY_1), |
65 | KEY(4,2,KEY_4), | 63 | KEY(4,2,KEY_4), |
66 | KEY(4,3,KEY_7), | 64 | KEY(4,3,KEY_7), |
67 | KEY(4,4,KEY_STAR), | 65 | KEY(4,4,KEY_KPASTERISK), |
68 | KEY(4,5,KEY_POWER), | 66 | KEY(4,5,KEY_POWER), |
69 | 0 | 67 | 0 |
70 | }; | 68 | }; |
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 22db19a53647..182a98a9df4c 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
@@ -36,8 +36,6 @@ | |||
36 | #include <asm/arch/omapfb.h> | 36 | #include <asm/arch/omapfb.h> |
37 | #include <asm/arch/lcd_mipid.h> | 37 | #include <asm/arch/lcd_mipid.h> |
38 | 38 | ||
39 | #include "../plat-omap/dsp/dsp_common.h" | ||
40 | |||
41 | #define ADS7846_PENDOWN_GPIO 15 | 39 | #define ADS7846_PENDOWN_GPIO 15 |
42 | 40 | ||
43 | static void __init omap_nokia770_init_irq(void) | 41 | static void __init omap_nokia770_init_irq(void) |
@@ -318,6 +316,8 @@ static __init int omap_dsp_init(void) | |||
318 | out: | 316 | out: |
319 | return ret; | 317 | return ret; |
320 | } | 318 | } |
319 | #else | ||
320 | #define omap_dsp_init() do {} while (0) | ||
321 | #endif /* CONFIG_OMAP_DSP */ | 321 | #endif /* CONFIG_OMAP_DSP */ |
322 | 322 | ||
323 | static void __init omap_nokia770_init(void) | 323 | static void __init omap_nokia770_init(void) |
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 1d5c8d509722..e44437e10eef 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -39,31 +39,29 @@ static int p2_keymap[] = { | |||
39 | KEY(0,1,KEY_RIGHT), | 39 | KEY(0,1,KEY_RIGHT), |
40 | KEY(0,2,KEY_LEFT), | 40 | KEY(0,2,KEY_LEFT), |
41 | KEY(0,3,KEY_DOWN), | 41 | KEY(0,3,KEY_DOWN), |
42 | KEY(0,4,KEY_CENTER), | 42 | KEY(0,4,KEY_ENTER), |
43 | KEY(0,5,KEY_0_5), | 43 | KEY(1,0,KEY_F10), |
44 | KEY(1,0,KEY_SOFT2), | ||
45 | KEY(1,1,KEY_SEND), | 44 | KEY(1,1,KEY_SEND), |
46 | KEY(1,2,KEY_END), | 45 | KEY(1,2,KEY_END), |
47 | KEY(1,3,KEY_VOLUMEDOWN), | 46 | KEY(1,3,KEY_VOLUMEDOWN), |
48 | KEY(1,4,KEY_VOLUMEUP), | 47 | KEY(1,4,KEY_VOLUMEUP), |
49 | KEY(1,5,KEY_RECORD), | 48 | KEY(1,5,KEY_RECORD), |
50 | KEY(2,0,KEY_SOFT1), | 49 | KEY(2,0,KEY_F9), |
51 | KEY(2,1,KEY_3), | 50 | KEY(2,1,KEY_3), |
52 | KEY(2,2,KEY_6), | 51 | KEY(2,2,KEY_6), |
53 | KEY(2,3,KEY_9), | 52 | KEY(2,3,KEY_9), |
54 | KEY(2,4,KEY_SHARP), | 53 | KEY(2,4,KEY_KPDOT), |
55 | KEY(2,5,KEY_2_5), | ||
56 | KEY(3,0,KEY_BACK), | 54 | KEY(3,0,KEY_BACK), |
57 | KEY(3,1,KEY_2), | 55 | KEY(3,1,KEY_2), |
58 | KEY(3,2,KEY_5), | 56 | KEY(3,2,KEY_5), |
59 | KEY(3,3,KEY_8), | 57 | KEY(3,3,KEY_8), |
60 | KEY(3,4,KEY_0), | 58 | KEY(3,4,KEY_0), |
61 | KEY(3,5,KEY_HEADSETHOOK), | 59 | KEY(3,5,KEY_KPSLASH), |
62 | KEY(4,0,KEY_HOME), | 60 | KEY(4,0,KEY_HOME), |
63 | KEY(4,1,KEY_1), | 61 | KEY(4,1,KEY_1), |
64 | KEY(4,2,KEY_4), | 62 | KEY(4,2,KEY_4), |
65 | KEY(4,3,KEY_7), | 63 | KEY(4,3,KEY_7), |
66 | KEY(4,4,KEY_STAR), | 64 | KEY(4,4,KEY_KPASTERISK), |
67 | KEY(4,5,KEY_POWER), | 65 | KEY(4,5,KEY_POWER), |
68 | 0 | 66 | 0 |
69 | }; | 67 | }; |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index dcd81f8d0833..9732d5d9466b 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -178,13 +178,19 @@ static void pxa25x_cpu_pm_save(unsigned long *sleep_save) | |||
178 | SAVE(GAFR1_L); SAVE(GAFR1_U); | 178 | SAVE(GAFR1_L); SAVE(GAFR1_U); |
179 | SAVE(GAFR2_L); SAVE(GAFR2_U); | 179 | SAVE(GAFR2_L); SAVE(GAFR2_U); |
180 | 180 | ||
181 | SAVE(ICMR); | 181 | SAVE(ICMR); ICMR = 0; |
182 | SAVE(CKEN); | 182 | SAVE(CKEN); |
183 | SAVE(PSTR); | 183 | SAVE(PSTR); |
184 | |||
185 | /* Clear GPIO transition detect bits */ | ||
186 | GEDR0 = GEDR0; GEDR1 = GEDR1; GEDR2 = GEDR2; | ||
184 | } | 187 | } |
185 | 188 | ||
186 | static void pxa25x_cpu_pm_restore(unsigned long *sleep_save) | 189 | static void pxa25x_cpu_pm_restore(unsigned long *sleep_save) |
187 | { | 190 | { |
191 | /* ensure not to come back here if it wasn't intended */ | ||
192 | PSPR = 0; | ||
193 | |||
188 | /* restore registers */ | 194 | /* restore registers */ |
189 | RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2); | 195 | RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2); |
190 | RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2); | 196 | RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2); |
@@ -195,7 +201,12 @@ static void pxa25x_cpu_pm_restore(unsigned long *sleep_save) | |||
195 | RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2); | 201 | RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2); |
196 | RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); | 202 | RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); |
197 | 203 | ||
204 | PSSR = PSSR_RDH | PSSR_PH; | ||
205 | |||
198 | RESTORE(CKEN); | 206 | RESTORE(CKEN); |
207 | |||
208 | ICLR = 0; | ||
209 | ICCR = 1; | ||
199 | RESTORE(ICMR); | 210 | RESTORE(ICMR); |
200 | RESTORE(PSTR); | 211 | RESTORE(PSTR); |
201 | } | 212 | } |
diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S index aff71fec618a..d0447723b73a 100644 --- a/arch/arm/mach-pxa/sleep.S +++ b/arch/arm/mach-pxa/sleep.S | |||
@@ -43,11 +43,11 @@ pxa_cpu_save_cp: | |||
43 | pxa_cpu_save_sp: | 43 | pxa_cpu_save_sp: |
44 | @ preserve phys address of stack | 44 | @ preserve phys address of stack |
45 | mov r0, sp | 45 | mov r0, sp |
46 | mov r2, lr | 46 | str lr, [sp, #-4]! |
47 | bl sleep_phys_sp | 47 | bl sleep_phys_sp |
48 | ldr r1, =sleep_save_sp | 48 | ldr r1, =sleep_save_sp |
49 | str r0, [r1] | 49 | str r0, [r1] |
50 | mov pc, r2 | 50 | ldr pc, [sp], #4 |
51 | 51 | ||
52 | /* | 52 | /* |
53 | * pxa27x_cpu_suspend() | 53 | * pxa27x_cpu_suspend() |
@@ -270,5 +270,3 @@ resume_after_mmu: | |||
270 | mar acc0, r2, r3 | 270 | mar acc0, r2, r3 |
271 | #endif | 271 | #endif |
272 | ldmfd sp!, {r4 - r12, pc} @ return to caller | 272 | ldmfd sp!, {r4 - r12, pc} @ return to caller |
273 | |||
274 | |||
diff --git a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h index 54a2ad6d9ca2..791d0238c68f 100644 --- a/arch/arm/vfp/vfp.h +++ b/arch/arm/vfp/vfp.h | |||
@@ -361,10 +361,12 @@ u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand); | |||
361 | * OP_SCALAR - this operation always operates in scalar mode | 361 | * OP_SCALAR - this operation always operates in scalar mode |
362 | * OP_SD - the instruction exceptionally writes to a single precision result. | 362 | * OP_SD - the instruction exceptionally writes to a single precision result. |
363 | * OP_DD - the instruction exceptionally writes to a double precision result. | 363 | * OP_DD - the instruction exceptionally writes to a double precision result. |
364 | * OP_SM - the instruction exceptionally reads from a single precision operand. | ||
364 | */ | 365 | */ |
365 | #define OP_SCALAR (1 << 0) | 366 | #define OP_SCALAR (1 << 0) |
366 | #define OP_SD (1 << 1) | 367 | #define OP_SD (1 << 1) |
367 | #define OP_DD (1 << 1) | 368 | #define OP_DD (1 << 1) |
369 | #define OP_SM (1 << 2) | ||
368 | 370 | ||
369 | struct op { | 371 | struct op { |
370 | u32 (* const fn)(int dd, int dn, int dm, u32 fpscr); | 372 | u32 (* const fn)(int dd, int dn, int dm, u32 fpscr); |
diff --git a/arch/arm/vfp/vfpdouble.c b/arch/arm/vfp/vfpdouble.c index 190a09ad18eb..6cac43bd1d86 100644 --- a/arch/arm/vfp/vfpdouble.c +++ b/arch/arm/vfp/vfpdouble.c | |||
@@ -668,8 +668,8 @@ static struct op fops_ext[32] = { | |||
668 | [FEXT_TO_IDX(FEXT_FCMPZ)] = { vfp_double_fcmpz, OP_SCALAR }, | 668 | [FEXT_TO_IDX(FEXT_FCMPZ)] = { vfp_double_fcmpz, OP_SCALAR }, |
669 | [FEXT_TO_IDX(FEXT_FCMPEZ)] = { vfp_double_fcmpez, OP_SCALAR }, | 669 | [FEXT_TO_IDX(FEXT_FCMPEZ)] = { vfp_double_fcmpez, OP_SCALAR }, |
670 | [FEXT_TO_IDX(FEXT_FCVT)] = { vfp_double_fcvts, OP_SCALAR|OP_SD }, | 670 | [FEXT_TO_IDX(FEXT_FCVT)] = { vfp_double_fcvts, OP_SCALAR|OP_SD }, |
671 | [FEXT_TO_IDX(FEXT_FUITO)] = { vfp_double_fuito, OP_SCALAR }, | 671 | [FEXT_TO_IDX(FEXT_FUITO)] = { vfp_double_fuito, OP_SCALAR|OP_SM }, |
672 | [FEXT_TO_IDX(FEXT_FSITO)] = { vfp_double_fsito, OP_SCALAR }, | 672 | [FEXT_TO_IDX(FEXT_FSITO)] = { vfp_double_fsito, OP_SCALAR|OP_SM }, |
673 | [FEXT_TO_IDX(FEXT_FTOUI)] = { vfp_double_ftoui, OP_SCALAR|OP_SD }, | 673 | [FEXT_TO_IDX(FEXT_FTOUI)] = { vfp_double_ftoui, OP_SCALAR|OP_SD }, |
674 | [FEXT_TO_IDX(FEXT_FTOUIZ)] = { vfp_double_ftouiz, OP_SCALAR|OP_SD }, | 674 | [FEXT_TO_IDX(FEXT_FTOUIZ)] = { vfp_double_ftouiz, OP_SCALAR|OP_SD }, |
675 | [FEXT_TO_IDX(FEXT_FTOSI)] = { vfp_double_ftosi, OP_SCALAR|OP_SD }, | 675 | [FEXT_TO_IDX(FEXT_FTOSI)] = { vfp_double_ftosi, OP_SCALAR|OP_SD }, |
@@ -1128,7 +1128,7 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr) | |||
1128 | u32 exceptions = 0; | 1128 | u32 exceptions = 0; |
1129 | unsigned int dest; | 1129 | unsigned int dest; |
1130 | unsigned int dn = vfp_get_dn(inst); | 1130 | unsigned int dn = vfp_get_dn(inst); |
1131 | unsigned int dm = vfp_get_dm(inst); | 1131 | unsigned int dm; |
1132 | unsigned int vecitr, veclen, vecstride; | 1132 | unsigned int vecitr, veclen, vecstride; |
1133 | struct op *fop; | 1133 | struct op *fop; |
1134 | 1134 | ||
@@ -1146,6 +1146,14 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr) | |||
1146 | dest = vfp_get_dd(inst); | 1146 | dest = vfp_get_dd(inst); |
1147 | 1147 | ||
1148 | /* | 1148 | /* |
1149 | * f[us]ito takes a sN operand, not a dN operand. | ||
1150 | */ | ||
1151 | if (fop->flags & OP_SM) | ||
1152 | dm = vfp_get_sm(inst); | ||
1153 | else | ||
1154 | dm = vfp_get_dm(inst); | ||
1155 | |||
1156 | /* | ||
1149 | * If destination bank is zero, vector length is always '1'. | 1157 | * If destination bank is zero, vector length is always '1'. |
1150 | * ARM DDI0100F C5.1.3, C5.3.2. | 1158 | * ARM DDI0100F C5.1.3, C5.3.2. |
1151 | */ | 1159 | */ |
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 2a3a7ea5958c..25232ba08119 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -65,6 +65,10 @@ config GENERIC_CALIBRATE_DELAY | |||
65 | bool | 65 | bool |
66 | default y | 66 | default y |
67 | 67 | ||
68 | config HARDWARE_PM | ||
69 | def_bool y | ||
70 | depends on OPROFILE | ||
71 | |||
68 | source "init/Kconfig" | 72 | source "init/Kconfig" |
69 | source "kernel/Kconfig.preempt" | 73 | source "kernel/Kconfig.preempt" |
70 | 74 | ||
diff --git a/arch/cris/arch-v10/drivers/ds1302.c b/arch/cris/arch-v10/drivers/ds1302.c index 88eff7f54ea6..1d1936a18133 100644 --- a/arch/cris/arch-v10/drivers/ds1302.c +++ b/arch/cris/arch-v10/drivers/ds1302.c | |||
@@ -6,136 +6,9 @@ | |||
6 | *! | 6 | *! |
7 | *! Functions exported: ds1302_readreg, ds1302_writereg, ds1302_init | 7 | *! Functions exported: ds1302_readreg, ds1302_writereg, ds1302_init |
8 | *! | 8 | *! |
9 | *! $Log: ds1302.c,v $ | ||
10 | *! Revision 1.18 2005/01/24 09:11:26 mikaelam | ||
11 | *! Minor changes to get DS1302 RTC chip driver to work | ||
12 | *! | ||
13 | *! Revision 1.17 2005/01/05 06:11:22 starvik | ||
14 | *! No need to do local_irq_disable after local_irq_save. | ||
15 | *! | ||
16 | *! Revision 1.16 2004/12/13 12:21:52 starvik | ||
17 | *! Added I/O and DMA allocators from Linux 2.4 | ||
18 | *! | ||
19 | *! Revision 1.14 2004/08/24 06:48:43 starvik | ||
20 | *! Whitespace cleanup | ||
21 | *! | ||
22 | *! Revision 1.13 2004/05/28 09:26:59 starvik | ||
23 | *! Modified I2C initialization to work in 2.6. | ||
24 | *! | ||
25 | *! Revision 1.12 2004/05/14 07:58:03 starvik | ||
26 | *! Merge of changes from 2.4 | ||
27 | *! | ||
28 | *! Revision 1.10 2004/02/04 09:25:12 starvik | ||
29 | *! Merge of Linux 2.6.2 | ||
30 | *! | ||
31 | *! Revision 1.9 2003/07/04 08:27:37 starvik | ||
32 | *! Merge of Linux 2.5.74 | ||
33 | *! | ||
34 | *! Revision 1.8 2003/04/09 05:20:47 starvik | ||
35 | *! Merge of Linux 2.5.67 | ||
36 | *! | ||
37 | *! Revision 1.6 2003/01/09 14:42:51 starvik | ||
38 | *! Merge of Linux 2.5.55 | ||
39 | *! | ||
40 | *! Revision 1.4 2002/12/11 13:13:57 starvik | ||
41 | *! Added arch/ to v10 specific includes | ||
42 | *! Added fix from Linux 2.4 in serial.c (flush_to_flip_buffer) | ||
43 | *! | ||
44 | *! Revision 1.3 2002/11/20 11:56:10 starvik | ||
45 | *! Merge of Linux 2.5.48 | ||
46 | *! | ||
47 | *! Revision 1.2 2002/11/18 13:16:06 starvik | ||
48 | *! Linux 2.5 port of latest 2.4 drivers | ||
49 | *! | ||
50 | *! Revision 1.15 2002/10/11 16:14:33 johana | ||
51 | *! Added CONFIG_ETRAX_DS1302_TRICKLE_CHARGE and initial setting of the | ||
52 | *! trcklecharge register. | ||
53 | *! | ||
54 | *! Revision 1.14 2002/10/10 12:15:38 magnusmn | ||
55 | *! Added support for having the RST signal on bit g0 | ||
56 | *! | ||
57 | *! Revision 1.13 2002/05/29 15:16:08 johana | ||
58 | *! Removed unused variables. | ||
59 | *! | ||
60 | *! Revision 1.12 2002/04/10 15:35:25 johana | ||
61 | *! Moved probe function closer to init function and marked it __init. | ||
62 | *! | ||
63 | *! Revision 1.11 2001/06/14 12:35:52 jonashg | ||
64 | *! The ATA hack is back. It is unfortunately the only way to set g27 to output. | ||
65 | *! | ||
66 | *! Revision 1.9 2001/06/14 10:00:14 jonashg | ||
67 | *! No need for tempudelay to be inline anymore (had to adjust the usec to | ||
68 | *! loops conversion because of this to make it slow enough to be a udelay). | ||
69 | *! | ||
70 | *! Revision 1.8 2001/06/14 08:06:32 jonashg | ||
71 | *! Made tempudelay delay usecs (well, just a tad more). | ||
72 | *! | ||
73 | *! Revision 1.7 2001/06/13 14:18:11 jonashg | ||
74 | *! Only allow processes with SYS_TIME capability to set time and charge. | ||
75 | *! | ||
76 | *! Revision 1.6 2001/06/12 15:22:07 jonashg | ||
77 | *! * Made init function __init. | ||
78 | *! * Parameter to out_byte() is unsigned char. | ||
79 | *! * The magic number 42 has got a name. | ||
80 | *! * Removed comment about /proc (nothing is exported there). | ||
81 | *! | ||
82 | *! Revision 1.5 2001/06/12 14:35:13 jonashg | ||
83 | *! Gave the module a name and added it to printk's. | ||
84 | *! | ||
85 | *! Revision 1.4 2001/05/31 14:53:40 jonashg | ||
86 | *! Made tempudelay() inline so that the watchdog doesn't reset (see | ||
87 | *! function comment). | ||
88 | *! | ||
89 | *! Revision 1.3 2001/03/26 16:03:06 bjornw | ||
90 | *! Needs linux/config.h | ||
91 | *! | ||
92 | *! Revision 1.2 2001/03/20 19:42:00 bjornw | ||
93 | *! Use the ETRAX prefix on the DS1302 options | ||
94 | *! | ||
95 | *! Revision 1.1 2001/03/20 09:13:50 magnusmn | ||
96 | *! Linux 2.4 port | ||
97 | *! | ||
98 | *! Revision 1.10 2000/07/05 15:38:23 bjornw | ||
99 | *! Dont update kernel time when a RTC_SET_TIME is done | ||
100 | *! | ||
101 | *! Revision 1.9 2000/03/02 15:42:59 macce | ||
102 | *! * Hack to make RTC work on all 2100/2400 | ||
103 | *! | ||
104 | *! Revision 1.8 2000/02/23 16:59:18 torbjore | ||
105 | *! added setup of R_GEN_CONFIG when RTC is connected to the generic port. | ||
106 | *! | ||
107 | *! Revision 1.7 2000/01/17 15:51:43 johana | ||
108 | *! Added RTC_SET_CHARGE ioctl to enable trickle charger. | ||
109 | *! | ||
110 | *! Revision 1.6 1999/10/27 13:19:47 bjornw | ||
111 | *! Added update_xtime_from_cmos which reads back the updated RTC into the kernel. | ||
112 | *! /dev/rtc calls it now. | ||
113 | *! | ||
114 | *! Revision 1.5 1999/10/27 12:39:37 bjornw | ||
115 | *! Disabled superuser check. Anyone can now set the time. | ||
116 | *! | ||
117 | *! Revision 1.4 1999/09/02 13:27:46 pkj | ||
118 | *! Added shadow for R_PORT_PB_CONFIG. | ||
119 | *! Renamed port_g_shadow to port_g_data_shadow. | ||
120 | *! | ||
121 | *! Revision 1.3 1999/09/02 08:28:06 pkj | ||
122 | *! Made it possible to select either port PB or the generic port for the RST | ||
123 | *! signal line to the DS1302 RTC. | ||
124 | *! Also make sure the RST bit is configured as output on Port PB (if used). | ||
125 | *! | ||
126 | *! Revision 1.2 1999/09/01 14:47:20 bjornw | ||
127 | *! Added support for /dev/rtc operations with ioctl RD_TIME and SET_TIME to read | ||
128 | *! and set the date. Register as major 121. | ||
129 | *! | ||
130 | *! Revision 1.1 1999/09/01 09:45:29 bjornw | ||
131 | *! Implemented a DS1302 RTC driver. | ||
132 | *! | ||
133 | *! | ||
134 | *! --------------------------------------------------------------------------- | 9 | *! --------------------------------------------------------------------------- |
135 | *! | 10 | *! |
136 | *! (C) Copyright 1999, 2000, 2001, 2002, 2003, 2004 Axis Communications AB, LUND, SWEDEN | 11 | *! (C) Copyright 1999-2007 Axis Communications AB, LUND, SWEDEN |
137 | *! | ||
138 | *! $Id: ds1302.c,v 1.18 2005/01/24 09:11:26 mikaelam Exp $ | ||
139 | *! | 12 | *! |
140 | *!***************************************************************************/ | 13 | *!***************************************************************************/ |
141 | 14 | ||
@@ -156,6 +29,8 @@ | |||
156 | #include <asm/rtc.h> | 29 | #include <asm/rtc.h> |
157 | #include <asm/arch/io_interface_mux.h> | 30 | #include <asm/arch/io_interface_mux.h> |
158 | 31 | ||
32 | #include "i2c.h" | ||
33 | |||
159 | #define RTC_MAJOR_NR 121 /* local major, change later */ | 34 | #define RTC_MAJOR_NR 121 /* local major, change later */ |
160 | 35 | ||
161 | static const char ds1302_name[] = "ds1302"; | 36 | static const char ds1302_name[] = "ds1302"; |
diff --git a/arch/cris/arch-v10/kernel/io_interface_mux.c b/arch/cris/arch-v10/kernel/io_interface_mux.c index 3a9114e89edf..f3b327d4ed9c 100644 --- a/arch/cris/arch-v10/kernel/io_interface_mux.c +++ b/arch/cris/arch-v10/kernel/io_interface_mux.c | |||
@@ -392,6 +392,7 @@ int cris_request_io_interface(enum cris_io_interface ioif, const char *device_id | |||
392 | if (((interfaces[ioif].gpio_g_in & gpio_in_pins) != interfaces[ioif].gpio_g_in) || | 392 | if (((interfaces[ioif].gpio_g_in & gpio_in_pins) != interfaces[ioif].gpio_g_in) || |
393 | ((interfaces[ioif].gpio_g_out & gpio_out_pins) != interfaces[ioif].gpio_g_out) || | 393 | ((interfaces[ioif].gpio_g_out & gpio_out_pins) != interfaces[ioif].gpio_g_out) || |
394 | ((interfaces[ioif].gpio_b & gpio_pb_pins) != interfaces[ioif].gpio_b)) { | 394 | ((interfaces[ioif].gpio_b & gpio_pb_pins) != interfaces[ioif].gpio_b)) { |
395 | local_irq_restore(flags); | ||
395 | printk(KERN_CRIT "cris_request_io_interface: Could not get required pins for interface %u\n", | 396 | printk(KERN_CRIT "cris_request_io_interface: Could not get required pins for interface %u\n", |
396 | ioif); | 397 | ioif); |
397 | return -EBUSY; | 398 | return -EBUSY; |
diff --git a/arch/cris/arch-v10/kernel/signal.c b/arch/cris/arch-v10/kernel/signal.c index 41d4a5f93284..b6be705c2a3e 100644 --- a/arch/cris/arch-v10/kernel/signal.c +++ b/arch/cris/arch-v10/kernel/signal.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Ideas also taken from arch/arm. | 8 | * Ideas also taken from arch/arm. |
9 | * | 9 | * |
10 | * Copyright (C) 2000, 2001 Axis Communications AB | 10 | * Copyright (C) 2000-2007 Axis Communications AB |
11 | * | 11 | * |
12 | * Authors: Bjorn Wesen (bjornw@axis.com) | 12 | * Authors: Bjorn Wesen (bjornw@axis.com) |
13 | * | 13 | * |
@@ -40,84 +40,30 @@ | |||
40 | */ | 40 | */ |
41 | #define RESTART_CRIS_SYS(regs) regs->r10 = regs->orig_r10; regs->irp -= 2; | 41 | #define RESTART_CRIS_SYS(regs) regs->r10 = regs->orig_r10; regs->irp -= 2; |
42 | 42 | ||
43 | int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs); | 43 | void do_signal(int canrestart, struct pt_regs *regs); |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * Atomically swap in the new signal mask, and wait for a signal. Define | 46 | * Atomically swap in the new signal mask, and wait for a signal. Define |
47 | * dummy arguments to be able to reach the regs argument. (Note that this | 47 | * dummy arguments to be able to reach the regs argument. (Note that this |
48 | * arrangement relies on old_sigset_t occupying one register.) | 48 | * arrangement relies on old_sigset_t occupying one register.) |
49 | */ | 49 | */ |
50 | int | 50 | int sys_sigsuspend(old_sigset_t mask, long r11, long r12, long r13, long mof, |
51 | sys_sigsuspend(old_sigset_t mask, long r11, long r12, long r13, long mof, | 51 | long srp, struct pt_regs *regs) |
52 | long srp, struct pt_regs *regs) | ||
53 | { | 52 | { |
54 | sigset_t saveset; | ||
55 | |||
56 | mask &= _BLOCKABLE; | 53 | mask &= _BLOCKABLE; |
57 | spin_lock_irq(¤t->sighand->siglock); | 54 | spin_lock_irq(¤t->sighand->siglock); |
58 | saveset = current->blocked; | 55 | current->saved_sigmask = current->blocked; |
59 | siginitset(¤t->blocked, mask); | 56 | siginitset(¤t->blocked, mask); |
60 | recalc_sigpending(); | 57 | recalc_sigpending(); |
61 | spin_unlock_irq(¤t->sighand->siglock); | 58 | spin_unlock_irq(¤t->sighand->siglock); |
62 | 59 | current->state = TASK_INTERRUPTIBLE; | |
63 | regs->r10 = -EINTR; | 60 | schedule(); |
64 | while (1) { | 61 | set_thread_flag(TIF_RESTORE_SIGMASK); |
65 | current->state = TASK_INTERRUPTIBLE; | 62 | return -ERESTARTNOHAND; |
66 | schedule(); | ||
67 | if (do_signal(0, &saveset, regs)) | ||
68 | /* We will get here twice: once to call the signal | ||
69 | handler, then again to return from the | ||
70 | sigsuspend system call. When calling the | ||
71 | signal handler, R10 holds the signal number as | ||
72 | set through do_signal. The sigsuspend call | ||
73 | will return with the restored value set above; | ||
74 | always -EINTR. */ | ||
75 | return regs->r10; | ||
76 | } | ||
77 | } | 63 | } |
78 | 64 | ||
79 | /* Define dummy arguments to be able to reach the regs argument. (Note that | 65 | int sys_sigaction(int sig, const struct old_sigaction __user *act, |
80 | * this arrangement relies on size_t occupying one register.) | 66 | struct old_sigaction *oact) |
81 | */ | ||
82 | int | ||
83 | sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, long r12, long r13, | ||
84 | long mof, long srp, struct pt_regs *regs) | ||
85 | { | ||
86 | sigset_t saveset, newset; | ||
87 | |||
88 | /* XXX: Don't preclude handling different sized sigset_t's. */ | ||
89 | if (sigsetsize != sizeof(sigset_t)) | ||
90 | return -EINVAL; | ||
91 | |||
92 | if (copy_from_user(&newset, unewset, sizeof(newset))) | ||
93 | return -EFAULT; | ||
94 | sigdelsetmask(&newset, ~_BLOCKABLE); | ||
95 | |||
96 | spin_lock_irq(¤t->sighand->siglock); | ||
97 | saveset = current->blocked; | ||
98 | current->blocked = newset; | ||
99 | recalc_sigpending(); | ||
100 | spin_unlock_irq(¤t->sighand->siglock); | ||
101 | |||
102 | regs->r10 = -EINTR; | ||
103 | while (1) { | ||
104 | current->state = TASK_INTERRUPTIBLE; | ||
105 | schedule(); | ||
106 | if (do_signal(0, &saveset, regs)) | ||
107 | /* We will get here twice: once to call the signal | ||
108 | handler, then again to return from the | ||
109 | sigsuspend system call. When calling the | ||
110 | signal handler, R10 holds the signal number as | ||
111 | set through do_signal. The sigsuspend call | ||
112 | will return with the restored value set above; | ||
113 | always -EINTR. */ | ||
114 | return regs->r10; | ||
115 | } | ||
116 | } | ||
117 | |||
118 | int | ||
119 | sys_sigaction(int sig, const struct old_sigaction __user *act, | ||
120 | struct old_sigaction *oact) | ||
121 | { | 67 | { |
122 | struct k_sigaction new_ka, old_ka; | 68 | struct k_sigaction new_ka, old_ka; |
123 | int ret; | 69 | int ret; |
@@ -147,8 +93,7 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
147 | return ret; | 93 | return ret; |
148 | } | 94 | } |
149 | 95 | ||
150 | int | 96 | int sys_sigaltstack(const stack_t *uss, stack_t __user *uoss) |
151 | sys_sigaltstack(const stack_t *uss, stack_t __user *uoss) | ||
152 | { | 97 | { |
153 | return do_sigaltstack(uss, uoss, rdusp()); | 98 | return do_sigaltstack(uss, uoss, rdusp()); |
154 | } | 99 | } |
@@ -205,7 +150,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) | |||
205 | 150 | ||
206 | /* TODO: the other ports use regs->orig_XX to disable syscall checks | 151 | /* TODO: the other ports use regs->orig_XX to disable syscall checks |
207 | * after this completes, but we don't use that mechanism. maybe we can | 152 | * after this completes, but we don't use that mechanism. maybe we can |
208 | * use it now ? | 153 | * use it now ? |
209 | */ | 154 | */ |
210 | 155 | ||
211 | return err; | 156 | return err; |
@@ -216,7 +161,7 @@ badframe: | |||
216 | 161 | ||
217 | /* Define dummy arguments to be able to reach the regs argument. */ | 162 | /* Define dummy arguments to be able to reach the regs argument. */ |
218 | 163 | ||
219 | asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof, | 164 | asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof, |
220 | long srp, struct pt_regs *regs) | 165 | long srp, struct pt_regs *regs) |
221 | { | 166 | { |
222 | struct sigframe __user *frame = (struct sigframe *)rdusp(); | 167 | struct sigframe __user *frame = (struct sigframe *)rdusp(); |
@@ -243,7 +188,7 @@ asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof, | |||
243 | current->blocked = set; | 188 | current->blocked = set; |
244 | recalc_sigpending(); | 189 | recalc_sigpending(); |
245 | spin_unlock_irq(¤t->sighand->siglock); | 190 | spin_unlock_irq(¤t->sighand->siglock); |
246 | 191 | ||
247 | if (restore_sigcontext(regs, &frame->sc)) | 192 | if (restore_sigcontext(regs, &frame->sc)) |
248 | goto badframe; | 193 | goto badframe; |
249 | 194 | ||
@@ -254,11 +199,11 @@ asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof, | |||
254 | badframe: | 199 | badframe: |
255 | force_sig(SIGSEGV, current); | 200 | force_sig(SIGSEGV, current); |
256 | return 0; | 201 | return 0; |
257 | } | 202 | } |
258 | 203 | ||
259 | /* Define dummy arguments to be able to reach the regs argument. */ | 204 | /* Define dummy arguments to be able to reach the regs argument. */ |
260 | 205 | ||
261 | asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13, | 206 | asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13, |
262 | long mof, long srp, struct pt_regs *regs) | 207 | long mof, long srp, struct pt_regs *regs) |
263 | { | 208 | { |
264 | struct rt_sigframe __user *frame = (struct rt_sigframe *)rdusp(); | 209 | struct rt_sigframe __user *frame = (struct rt_sigframe *)rdusp(); |
@@ -282,7 +227,7 @@ asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13, | |||
282 | current->blocked = set; | 227 | current->blocked = set; |
283 | recalc_sigpending(); | 228 | recalc_sigpending(); |
284 | spin_unlock_irq(¤t->sighand->siglock); | 229 | spin_unlock_irq(¤t->sighand->siglock); |
285 | 230 | ||
286 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) | 231 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) |
287 | goto badframe; | 232 | goto badframe; |
288 | 233 | ||
@@ -294,14 +239,14 @@ asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13, | |||
294 | badframe: | 239 | badframe: |
295 | force_sig(SIGSEGV, current); | 240 | force_sig(SIGSEGV, current); |
296 | return 0; | 241 | return 0; |
297 | } | 242 | } |
298 | 243 | ||
299 | /* | 244 | /* |
300 | * Set up a signal frame. | 245 | * Set up a signal frame. |
301 | */ | 246 | */ |
302 | 247 | ||
303 | static int | 248 | static int setup_sigcontext(struct sigcontext __user *sc, |
304 | setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, unsigned long mask) | 249 | struct pt_regs *regs, unsigned long mask) |
305 | { | 250 | { |
306 | int err = 0; | 251 | int err = 0; |
307 | unsigned long usp = rdusp(); | 252 | unsigned long usp = rdusp(); |
@@ -324,10 +269,11 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, unsigned lo | |||
324 | return err; | 269 | return err; |
325 | } | 270 | } |
326 | 271 | ||
327 | /* figure out where we want to put the new signal frame - usually on the stack */ | 272 | /* Figure out where we want to put the new signal frame |
273 | * - usually on the stack. */ | ||
328 | 274 | ||
329 | static inline void __user * | 275 | static inline void __user * |
330 | get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size) | 276 | get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) |
331 | { | 277 | { |
332 | unsigned long sp = rdusp(); | 278 | unsigned long sp = rdusp(); |
333 | 279 | ||
@@ -345,15 +291,15 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size) | |||
345 | } | 291 | } |
346 | 292 | ||
347 | /* grab and setup a signal frame. | 293 | /* grab and setup a signal frame. |
348 | * | 294 | * |
349 | * basically we stack a lot of state info, and arrange for the | 295 | * basically we stack a lot of state info, and arrange for the |
350 | * user-mode program to return to the kernel using either a | 296 | * user-mode program to return to the kernel using either a |
351 | * trampoline which performs the syscall sigreturn, or a provided | 297 | * trampoline which performs the syscall sigreturn, or a provided |
352 | * user-mode trampoline. | 298 | * user-mode trampoline. |
353 | */ | 299 | */ |
354 | 300 | ||
355 | static void setup_frame(int sig, struct k_sigaction *ka, | 301 | static int setup_frame(int sig, struct k_sigaction *ka, |
356 | sigset_t *set, struct pt_regs * regs) | 302 | sigset_t *set, struct pt_regs *regs) |
357 | { | 303 | { |
358 | struct sigframe __user *frame; | 304 | struct sigframe __user *frame; |
359 | unsigned long return_ip; | 305 | unsigned long return_ip; |
@@ -401,14 +347,15 @@ static void setup_frame(int sig, struct k_sigaction *ka, | |||
401 | 347 | ||
402 | wrusp((unsigned long)frame); | 348 | wrusp((unsigned long)frame); |
403 | 349 | ||
404 | return; | 350 | return 0; |
405 | 351 | ||
406 | give_sigsegv: | 352 | give_sigsegv: |
407 | force_sigsegv(sig, current); | 353 | force_sigsegv(sig, current); |
354 | return -EFAULT; | ||
408 | } | 355 | } |
409 | 356 | ||
410 | static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | 357 | static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, |
411 | sigset_t *set, struct pt_regs * regs) | 358 | sigset_t *set, struct pt_regs *regs) |
412 | { | 359 | { |
413 | struct rt_sigframe __user *frame; | 360 | struct rt_sigframe __user *frame; |
414 | unsigned long return_ip; | 361 | unsigned long return_ip; |
@@ -443,9 +390,10 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
443 | /* trampoline - the desired return ip is the retcode itself */ | 390 | /* trampoline - the desired return ip is the retcode itself */ |
444 | return_ip = (unsigned long)&frame->retcode; | 391 | return_ip = (unsigned long)&frame->retcode; |
445 | /* This is movu.w __NR_rt_sigreturn, r9; break 13; */ | 392 | /* This is movu.w __NR_rt_sigreturn, r9; break 13; */ |
446 | err |= __put_user(0x9c5f, (short __user*)(frame->retcode+0)); | 393 | err |= __put_user(0x9c5f, (short __user *)(frame->retcode+0)); |
447 | err |= __put_user(__NR_rt_sigreturn, (short __user*)(frame->retcode+2)); | 394 | err |= __put_user(__NR_rt_sigreturn, |
448 | err |= __put_user(0xe93d, (short __user*)(frame->retcode+4)); | 395 | (short __user *)(frame->retcode+2)); |
396 | err |= __put_user(0xe93d, (short __user *)(frame->retcode+4)); | ||
449 | } | 397 | } |
450 | 398 | ||
451 | if (err) | 399 | if (err) |
@@ -455,73 +403,81 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
455 | 403 | ||
456 | /* Set up registers for signal handler */ | 404 | /* Set up registers for signal handler */ |
457 | 405 | ||
458 | regs->irp = (unsigned long) ka->sa.sa_handler; /* what we enter NOW */ | 406 | /* What we enter NOW */ |
459 | regs->srp = return_ip; /* what we enter LATER */ | 407 | regs->irp = (unsigned long) ka->sa.sa_handler; |
460 | regs->r10 = sig; /* first argument is signo */ | 408 | /* What we enter LATER */ |
461 | regs->r11 = (unsigned long) &frame->info; /* second argument is (siginfo_t *) */ | 409 | regs->srp = return_ip; |
462 | regs->r12 = 0; /* third argument is unused */ | 410 | /* First argument is signo */ |
463 | 411 | regs->r10 = sig; | |
464 | /* actually move the usp to reflect the stacked frame */ | 412 | /* Second argument is (siginfo_t *) */ |
465 | 413 | regs->r11 = (unsigned long)&frame->info; | |
414 | /* Third argument is unused */ | ||
415 | regs->r12 = 0; | ||
416 | |||
417 | /* Actually move the usp to reflect the stacked frame */ | ||
466 | wrusp((unsigned long)frame); | 418 | wrusp((unsigned long)frame); |
467 | 419 | ||
468 | return; | 420 | return 0; |
469 | 421 | ||
470 | give_sigsegv: | 422 | give_sigsegv: |
471 | force_sigsegv(sig, current); | 423 | force_sigsegv(sig, current); |
424 | return -EFAULT; | ||
472 | } | 425 | } |
473 | 426 | ||
474 | /* | 427 | /* |
475 | * OK, we're invoking a handler | 428 | * OK, we're invoking a handler |
476 | */ | 429 | */ |
477 | 430 | ||
478 | static inline void | 431 | static inline int handle_signal(int canrestart, unsigned long sig, |
479 | handle_signal(int canrestart, unsigned long sig, | 432 | siginfo_t *info, struct k_sigaction *ka, |
480 | siginfo_t *info, struct k_sigaction *ka, | 433 | sigset_t *oldset, struct pt_regs *regs) |
481 | sigset_t *oldset, struct pt_regs * regs) | ||
482 | { | 434 | { |
435 | int ret; | ||
436 | |||
483 | /* Are we from a system call? */ | 437 | /* Are we from a system call? */ |
484 | if (canrestart) { | 438 | if (canrestart) { |
485 | /* If so, check system call restarting.. */ | 439 | /* If so, check system call restarting.. */ |
486 | switch (regs->r10) { | 440 | switch (regs->r10) { |
487 | case -ERESTART_RESTARTBLOCK: | 441 | case -ERESTART_RESTARTBLOCK: |
488 | case -ERESTARTNOHAND: | 442 | case -ERESTARTNOHAND: |
489 | /* ERESTARTNOHAND means that the syscall should only be | 443 | /* ERESTARTNOHAND means that the syscall should |
490 | restarted if there was no handler for the signal, and since | 444 | * only be restarted if there was no handler for |
491 | we only get here if there is a handler, we don't restart */ | 445 | * the signal, and since we only get here if there |
446 | * is a handler, we don't restart */ | ||
447 | regs->r10 = -EINTR; | ||
448 | break; | ||
449 | case -ERESTARTSYS: | ||
450 | /* ERESTARTSYS means to restart the syscall if | ||
451 | * there is no handler or the handler was | ||
452 | * registered with SA_RESTART */ | ||
453 | if (!(ka->sa.sa_flags & SA_RESTART)) { | ||
492 | regs->r10 = -EINTR; | 454 | regs->r10 = -EINTR; |
493 | break; | 455 | break; |
494 | 456 | } | |
495 | case -ERESTARTSYS: | 457 | /* fallthrough */ |
496 | /* ERESTARTSYS means to restart the syscall if there is no | 458 | case -ERESTARTNOINTR: |
497 | handler or the handler was registered with SA_RESTART */ | 459 | /* ERESTARTNOINTR means that the syscall should |
498 | if (!(ka->sa.sa_flags & SA_RESTART)) { | 460 | * be called again after the signal handler returns. */ |
499 | regs->r10 = -EINTR; | 461 | RESTART_CRIS_SYS(regs); |
500 | break; | ||
501 | } | ||
502 | /* fallthrough */ | ||
503 | case -ERESTARTNOINTR: | ||
504 | /* ERESTARTNOINTR means that the syscall should be called again | ||
505 | after the signal handler returns. */ | ||
506 | RESTART_CRIS_SYS(regs); | ||
507 | } | 462 | } |
508 | } | 463 | } |
509 | 464 | ||
510 | /* Set up the stack frame */ | 465 | /* Set up the stack frame */ |
511 | if (ka->sa.sa_flags & SA_SIGINFO) | 466 | if (ka->sa.sa_flags & SA_SIGINFO) |
512 | setup_rt_frame(sig, ka, info, oldset, regs); | 467 | ret = setup_rt_frame(sig, ka, info, oldset, regs); |
513 | else | 468 | else |
514 | setup_frame(sig, ka, oldset, regs); | 469 | ret = setup_frame(sig, ka, oldset, regs); |
515 | 470 | ||
516 | if (ka->sa.sa_flags & SA_ONESHOT) | 471 | if (ret == 0) { |
517 | ka->sa.sa_handler = SIG_DFL; | 472 | spin_lock_irq(¤t->sighand->siglock); |
518 | 473 | sigorsets(¤t->blocked, ¤t->blocked, | |
519 | spin_lock_irq(¤t->sighand->siglock); | 474 | &ka->sa.sa_mask); |
520 | sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); | 475 | if (!(ka->sa.sa_flags & SA_NODEFER)) |
521 | if (!(ka->sa.sa_flags & SA_NODEFER)) | 476 | sigaddset(¤t->blocked, sig); |
522 | sigaddset(¤t->blocked,sig); | 477 | recalc_sigpending(); |
523 | recalc_sigpending(); | 478 | spin_unlock_irq(¤t->sighand->siglock); |
524 | spin_unlock_irq(¤t->sighand->siglock); | 479 | } |
480 | return ret; | ||
525 | } | 481 | } |
526 | 482 | ||
527 | /* | 483 | /* |
@@ -536,11 +492,12 @@ handle_signal(int canrestart, unsigned long sig, | |||
536 | * mode below. | 492 | * mode below. |
537 | */ | 493 | */ |
538 | 494 | ||
539 | int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs) | 495 | void do_signal(int canrestart, struct pt_regs *regs) |
540 | { | 496 | { |
541 | siginfo_t info; | 497 | siginfo_t info; |
542 | int signr; | 498 | int signr; |
543 | struct k_sigaction ka; | 499 | struct k_sigaction ka; |
500 | sigset_t *oldset; | ||
544 | 501 | ||
545 | /* | 502 | /* |
546 | * We want the common case to go fast, which | 503 | * We want the common case to go fast, which |
@@ -549,16 +506,26 @@ int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs) | |||
549 | * if so. | 506 | * if so. |
550 | */ | 507 | */ |
551 | if (!user_mode(regs)) | 508 | if (!user_mode(regs)) |
552 | return 1; | 509 | return; |
553 | 510 | ||
554 | if (!oldset) | 511 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) |
512 | oldset = ¤t->saved_sigmask; | ||
513 | else | ||
555 | oldset = ¤t->blocked; | 514 | oldset = ¤t->blocked; |
556 | 515 | ||
557 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 516 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
558 | if (signr > 0) { | 517 | if (signr > 0) { |
559 | /* Whee! Actually deliver the signal. */ | 518 | /* Whee! Actually deliver the signal. */ |
560 | handle_signal(canrestart, signr, &info, &ka, oldset, regs); | 519 | if (handle_signal(canrestart, signr, &info, &ka, |
561 | return 1; | 520 | oldset, regs)) { |
521 | /* a signal was successfully delivered; the saved | ||
522 | * sigmask will have been stored in the signal frame, | ||
523 | * and will be restored by sigreturn, so we can simply | ||
524 | * clear the TIF_RESTORE_SIGMASK flag */ | ||
525 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
526 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
527 | } | ||
528 | return; | ||
562 | } | 529 | } |
563 | 530 | ||
564 | /* Did we come from a system call? */ | 531 | /* Did we come from a system call? */ |
@@ -569,10 +536,16 @@ int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs) | |||
569 | regs->r10 == -ERESTARTNOINTR) { | 536 | regs->r10 == -ERESTARTNOINTR) { |
570 | RESTART_CRIS_SYS(regs); | 537 | RESTART_CRIS_SYS(regs); |
571 | } | 538 | } |
572 | if (regs->r10 == -ERESTART_RESTARTBLOCK){ | 539 | if (regs->r10 == -ERESTART_RESTARTBLOCK) { |
573 | regs->r10 = __NR_restart_syscall; | 540 | regs->r10 = __NR_restart_syscall; |
574 | regs->irp -= 2; | 541 | regs->irp -= 2; |
575 | } | 542 | } |
576 | } | 543 | } |
577 | return 0; | 544 | |
545 | /* if there's no signal to deliver, we just put the saved sigmask | ||
546 | * back */ | ||
547 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { | ||
548 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
549 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | ||
550 | } | ||
578 | } | 551 | } |
diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c index 5976f6199c47..9310a7b476e9 100644 --- a/arch/cris/arch-v10/kernel/time.c +++ b/arch/cris/arch-v10/kernel/time.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/swap.h> | 13 | #include <linux/swap.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/vmstat.h> | ||
16 | #include <asm/arch/svinto.h> | 17 | #include <asm/arch/svinto.h> |
17 | #include <asm/types.h> | 18 | #include <asm/types.h> |
18 | #include <asm/signal.h> | 19 | #include <asm/signal.h> |
diff --git a/arch/cris/arch-v10/vmlinux.lds.S b/arch/cris/arch-v10/vmlinux.lds.S index 9859d49d088b..97a7876ed681 100644 --- a/arch/cris/arch-v10/vmlinux.lds.S +++ b/arch/cris/arch-v10/vmlinux.lds.S | |||
@@ -9,7 +9,8 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm-generic/vmlinux.lds.h> | 11 | #include <asm-generic/vmlinux.lds.h> |
12 | 12 | #include <asm/page.h> | |
13 | |||
13 | jiffies = jiffies_64; | 14 | jiffies = jiffies_64; |
14 | SECTIONS | 15 | SECTIONS |
15 | { | 16 | { |
@@ -23,7 +24,7 @@ SECTIONS | |||
23 | _stext = .; | 24 | _stext = .; |
24 | __stext = .; | 25 | __stext = .; |
25 | .text : { | 26 | .text : { |
26 | *(.text) | 27 | TEXT_TEXT |
27 | SCHED_TEXT | 28 | SCHED_TEXT |
28 | LOCK_TEXT | 29 | LOCK_TEXT |
29 | *(.fixup) | 30 | *(.fixup) |
@@ -49,10 +50,10 @@ SECTIONS | |||
49 | __edata = . ; /* End of data section */ | 50 | __edata = . ; /* End of data section */ |
50 | _edata = . ; | 51 | _edata = . ; |
51 | 52 | ||
52 | . = ALIGN(8192); /* init_task and stack, must be aligned */ | 53 | . = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned */ |
53 | .data.init_task : { *(.data.init_task) } | 54 | .data.init_task : { *(.data.init_task) } |
54 | 55 | ||
55 | . = ALIGN(8192); /* Init code and data */ | 56 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
56 | __init_begin = .; | 57 | __init_begin = .; |
57 | .init.text : { | 58 | .init.text : { |
58 | _sinittext = .; | 59 | _sinittext = .; |
@@ -66,13 +67,7 @@ SECTIONS | |||
66 | __setup_end = .; | 67 | __setup_end = .; |
67 | .initcall.init : { | 68 | .initcall.init : { |
68 | __initcall_start = .; | 69 | __initcall_start = .; |
69 | *(.initcall1.init); | 70 | INITCALLS |
70 | *(.initcall2.init); | ||
71 | *(.initcall3.init); | ||
72 | *(.initcall4.init); | ||
73 | *(.initcall5.init); | ||
74 | *(.initcall6.init); | ||
75 | *(.initcall7.init); | ||
76 | __initcall_end = .; | 71 | __initcall_end = .; |
77 | } | 72 | } |
78 | 73 | ||
@@ -88,16 +83,18 @@ SECTIONS | |||
88 | __initramfs_start = .; | 83 | __initramfs_start = .; |
89 | *(.init.ramfs) | 84 | *(.init.ramfs) |
90 | __initramfs_end = .; | 85 | __initramfs_end = .; |
91 | /* We fill to the next page, so we can discard all init | ||
92 | pages without needing to consider what payload might be | ||
93 | appended to the kernel image. */ | ||
94 | FILL (0); | ||
95 | . = ALIGN (8192); | ||
96 | } | 86 | } |
97 | #endif | 87 | #endif |
98 | |||
99 | __vmlinux_end = .; /* last address of the physical file */ | 88 | __vmlinux_end = .; /* last address of the physical file */ |
100 | __init_end = .; | 89 | |
90 | /* | ||
91 | * We fill to the next page, so we can discard all init | ||
92 | * pages without needing to consider what payload might be | ||
93 | * appended to the kernel image. | ||
94 | */ | ||
95 | . = ALIGN(PAGE_SIZE); | ||
96 | |||
97 | __init_end = .; | ||
101 | 98 | ||
102 | __data_end = . ; /* Move to _edata ? */ | 99 | __data_end = . ; /* Move to _edata ? */ |
103 | __bss_start = .; /* BSS */ | 100 | __bss_start = .; /* BSS */ |
diff --git a/arch/ia64/kernel/unaligned.c b/arch/ia64/kernel/unaligned.c index 2173de9fe917..f6a1aeb742b3 100644 --- a/arch/ia64/kernel/unaligned.c +++ b/arch/ia64/kernel/unaligned.c | |||
@@ -1488,16 +1488,19 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs) | |||
1488 | case LDFA_OP: | 1488 | case LDFA_OP: |
1489 | case LDFCCLR_OP: | 1489 | case LDFCCLR_OP: |
1490 | case LDFCNC_OP: | 1490 | case LDFCNC_OP: |
1491 | case LDF_IMM_OP: | ||
1492 | case LDFA_IMM_OP: | ||
1493 | case LDFCCLR_IMM_OP: | ||
1494 | case LDFCNC_IMM_OP: | ||
1495 | if (u.insn.x) | 1491 | if (u.insn.x) |
1496 | ret = emulate_load_floatpair(ifa, u.insn, regs); | 1492 | ret = emulate_load_floatpair(ifa, u.insn, regs); |
1497 | else | 1493 | else |
1498 | ret = emulate_load_float(ifa, u.insn, regs); | 1494 | ret = emulate_load_float(ifa, u.insn, regs); |
1499 | break; | 1495 | break; |
1500 | 1496 | ||
1497 | case LDF_IMM_OP: | ||
1498 | case LDFA_IMM_OP: | ||
1499 | case LDFCCLR_IMM_OP: | ||
1500 | case LDFCNC_IMM_OP: | ||
1501 | ret = emulate_load_float(ifa, u.insn, regs); | ||
1502 | break; | ||
1503 | |||
1501 | case STF_OP: | 1504 | case STF_OP: |
1502 | case STF_IMM_OP: | 1505 | case STF_IMM_OP: |
1503 | ret = emulate_store_float(ifa, u.insn, regs); | 1506 | ret = emulate_store_float(ifa, u.insn, regs); |
diff --git a/arch/ia64/sn/kernel/xp_nofault.S b/arch/ia64/sn/kernel/xp_nofault.S index 54e8973b6e99..98e7c7dbfdd8 100644 --- a/arch/ia64/sn/kernel/xp_nofault.S +++ b/arch/ia64/sn/kernel/xp_nofault.S | |||
@@ -3,7 +3,7 @@ | |||
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) 2004-2005 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (c) 2004-2007 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | 9 | ||
@@ -14,6 +14,11 @@ | |||
14 | * PIO read fails, the MCA handler will force the error to look | 14 | * PIO read fails, the MCA handler will force the error to look |
15 | * corrected and vector to the xp_error_PIOR which will return an error. | 15 | * corrected and vector to the xp_error_PIOR which will return an error. |
16 | * | 16 | * |
17 | * The definition of "consumption" and the time it takes for an MCA | ||
18 | * to surface is processor implementation specific. This code | ||
19 | * is sufficient on Itanium through the Montvale processor family. | ||
20 | * It may need to be adjusted for future processor implementations. | ||
21 | * | ||
17 | * extern int xp_nofault_PIOR(void *remote_register); | 22 | * extern int xp_nofault_PIOR(void *remote_register); |
18 | */ | 23 | */ |
19 | 24 | ||
@@ -22,11 +27,10 @@ xp_nofault_PIOR: | |||
22 | mov r8=r0 // Stage a success return value | 27 | mov r8=r0 // Stage a success return value |
23 | ld8.acq r9=[r32];; // PIO Read the specified register | 28 | ld8.acq r9=[r32];; // PIO Read the specified register |
24 | adds r9=1,r9;; // Add to force consumption | 29 | adds r9=1,r9;; // Add to force consumption |
25 | or r9=r9,r9;; // Or to force consumption | 30 | srlz.i;; // Allow time for MCA to surface |
26 | br.ret.sptk.many b0;; // Return success | 31 | br.ret.sptk.many b0;; // Return success |
27 | 32 | ||
28 | .global xp_error_PIOR | 33 | .global xp_error_PIOR |
29 | xp_error_PIOR: | 34 | xp_error_PIOR: |
30 | mov r8=1 // Return value of 1 | 35 | mov r8=1 // Return value of 1 |
31 | br.ret.sptk.many b0;; // Return failure | 36 | br.ret.sptk.many b0;; // Return failure |
32 | |||
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index c6fc405a6c8e..b22c043b6ef8 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -59,6 +59,8 @@ config BCM47XX | |||
59 | select SYS_SUPPORTS_LITTLE_ENDIAN | 59 | select SYS_SUPPORTS_LITTLE_ENDIAN |
60 | select SSB | 60 | select SSB |
61 | select SSB_DRIVER_MIPS | 61 | select SSB_DRIVER_MIPS |
62 | select SSB_DRIVER_EXTIF | ||
63 | select SSB_PCICORE_HOSTMODE if PCI | ||
62 | select GENERIC_GPIO | 64 | select GENERIC_GPIO |
63 | select SYS_HAS_EARLY_PRINTK | 65 | select SYS_HAS_EARLY_PRINTK |
64 | select CFE | 66 | select CFE |
@@ -992,8 +994,6 @@ config BOOT_ELF64 | |||
992 | 994 | ||
993 | menu "CPU selection" | 995 | menu "CPU selection" |
994 | 996 | ||
995 | source "kernel/time/Kconfig" | ||
996 | |||
997 | choice | 997 | choice |
998 | prompt "CPU type" | 998 | prompt "CPU type" |
999 | default CPU_R4X00 | 999 | default CPU_R4X00 |
@@ -1768,6 +1768,8 @@ config NR_CPUS | |||
1768 | performance should round up your number of processors to the next | 1768 | performance should round up your number of processors to the next |
1769 | power of two. | 1769 | power of two. |
1770 | 1770 | ||
1771 | source "kernel/time/Kconfig" | ||
1772 | |||
1771 | # | 1773 | # |
1772 | # Timer Interrupt Frequency Configuration | 1774 | # Timer Interrupt Frequency Configuration |
1773 | # | 1775 | # |
diff --git a/arch/mips/au1000/common/pci.c b/arch/mips/au1000/common/pci.c index 6fa70a36a250..ce771487567d 100644 --- a/arch/mips/au1000/common/pci.c +++ b/arch/mips/au1000/common/pci.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * BRIEF MODULE DESCRIPTION | 2 | * BRIEF MODULE DESCRIPTION |
3 | * Alchemy/AMD Au1x00 pci support. | 3 | * Alchemy/AMD Au1x00 PCI support. |
4 | * | 4 | * |
5 | * Copyright 2001,2002,2003 MontaVista Software Inc. | 5 | * Copyright 2001-2003, 2007 MontaVista Software Inc. |
6 | * Author: MontaVista Software, Inc. | 6 | * Author: MontaVista Software, Inc. |
7 | * ppopov@mvista.com or source@mvista.com | 7 | * ppopov@mvista.com or source@mvista.com |
8 | * | 8 | * |
@@ -66,6 +66,8 @@ static unsigned long virt_io_addr; | |||
66 | 66 | ||
67 | static int __init au1x_pci_setup(void) | 67 | static int __init au1x_pci_setup(void) |
68 | { | 68 | { |
69 | extern void au1x_pci_cfg_init(void); | ||
70 | |||
69 | #if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550) | 71 | #if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550) |
70 | virt_io_addr = (unsigned long)ioremap(Au1500_PCI_IO_START, | 72 | virt_io_addr = (unsigned long)ioremap(Au1500_PCI_IO_START, |
71 | Au1500_PCI_IO_END - Au1500_PCI_IO_START + 1); | 73 | Au1500_PCI_IO_END - Au1500_PCI_IO_START + 1); |
@@ -94,6 +96,8 @@ static int __init au1x_pci_setup(void) | |||
94 | set_io_port_base(virt_io_addr); | 96 | set_io_port_base(virt_io_addr); |
95 | #endif | 97 | #endif |
96 | 98 | ||
99 | au1x_pci_cfg_init(); | ||
100 | |||
97 | register_pci_controller(&au1x_controller); | 101 | register_pci_controller(&au1x_controller); |
98 | return 0; | 102 | return 0; |
99 | } | 103 | } |
diff --git a/arch/mips/cobalt/console.c b/arch/mips/cobalt/console.c index db330e811025..d1ba701c9dd1 100644 --- a/arch/mips/cobalt/console.c +++ b/arch/mips/cobalt/console.c | |||
@@ -4,10 +4,15 @@ | |||
4 | #include <linux/io.h> | 4 | #include <linux/io.h> |
5 | #include <linux/serial_reg.h> | 5 | #include <linux/serial_reg.h> |
6 | 6 | ||
7 | #include <cobalt.h> | ||
8 | |||
7 | #define UART_BASE ((void __iomem *)CKSEG1ADDR(0x1c800000)) | 9 | #define UART_BASE ((void __iomem *)CKSEG1ADDR(0x1c800000)) |
8 | 10 | ||
9 | void prom_putchar(char c) | 11 | void prom_putchar(char c) |
10 | { | 12 | { |
13 | if (cobalt_board_id <= COBALT_BRD_ID_QUBE1) | ||
14 | return; | ||
15 | |||
11 | while (!(readb(UART_BASE + UART_LSR) & UART_LSR_THRE)) | 16 | while (!(readb(UART_BASE + UART_LSR) & UART_LSR_THRE)) |
12 | ; | 17 | ; |
13 | 18 | ||
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index 236768731063..50be56c9e9ef 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S | |||
@@ -136,7 +136,8 @@ EXPORT(_stext) | |||
136 | * kernel load address. This is needed because this platform does | 136 | * kernel load address. This is needed because this platform does |
137 | * not have a ELF loader yet. | 137 | * not have a ELF loader yet. |
138 | */ | 138 | */ |
139 | __INIT | 139 | FEXPORT(__kernel_entry) |
140 | j kernel_entry | ||
140 | #endif | 141 | #endif |
141 | 142 | ||
142 | __INIT_REFOK | 143 | __INIT_REFOK |
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 7f6ddcb5d485..f8a535afce39 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -269,7 +269,7 @@ static void __init bootmem_init(void) | |||
269 | 269 | ||
270 | static void __init bootmem_init(void) | 270 | static void __init bootmem_init(void) |
271 | { | 271 | { |
272 | unsigned long init_begin, reserved_end; | 272 | unsigned long reserved_end; |
273 | unsigned long mapstart = ~0UL; | 273 | unsigned long mapstart = ~0UL; |
274 | unsigned long bootmap_size; | 274 | unsigned long bootmap_size; |
275 | int i; | 275 | int i; |
@@ -344,7 +344,6 @@ static void __init bootmem_init(void) | |||
344 | min_low_pfn, max_low_pfn); | 344 | min_low_pfn, max_low_pfn); |
345 | 345 | ||
346 | 346 | ||
347 | init_begin = PFN_UP(__pa_symbol(&__init_begin)); | ||
348 | for (i = 0; i < boot_mem_map.nr_map; i++) { | 347 | for (i = 0; i < boot_mem_map.nr_map; i++) { |
349 | unsigned long start, end; | 348 | unsigned long start, end; |
350 | 349 | ||
@@ -352,8 +351,8 @@ static void __init bootmem_init(void) | |||
352 | end = PFN_DOWN(boot_mem_map.map[i].addr | 351 | end = PFN_DOWN(boot_mem_map.map[i].addr |
353 | + boot_mem_map.map[i].size); | 352 | + boot_mem_map.map[i].size); |
354 | 353 | ||
355 | if (start <= init_begin) | 354 | if (start <= min_low_pfn) |
356 | start = init_begin; | 355 | start = min_low_pfn; |
357 | if (start >= end) | 356 | if (start >= end) |
358 | continue; | 357 | continue; |
359 | 358 | ||
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 1ecfbb7eba6c..2995be1ab3ca 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -147,9 +147,9 @@ static __init int cpu_has_mfc0_count_bug(void) | |||
147 | return 1; | 147 | return 1; |
148 | 148 | ||
149 | /* | 149 | /* |
150 | * I don't have erratas for newer R4400 so be paranoid. | 150 | * we assume newer revisions are ok |
151 | */ | 151 | */ |
152 | return 1; | 152 | return 0; |
153 | } | 153 | } |
154 | 154 | ||
155 | return 0; | 155 | return 0; |
diff --git a/arch/mips/lasat/image/Makefile b/arch/mips/lasat/image/Makefile index 5332449ec040..460626b6d62f 100644 --- a/arch/mips/lasat/image/Makefile +++ b/arch/mips/lasat/image/Makefile | |||
@@ -12,11 +12,11 @@ endif | |||
12 | 12 | ||
13 | MKLASATIMG = mklasatimg | 13 | MKLASATIMG = mklasatimg |
14 | MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200 | 14 | MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200 |
15 | KERNEL_IMAGE = $(TOPDIR)/vmlinux | 15 | KERNEL_IMAGE = vmlinux |
16 | KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ ) | 16 | KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ ) |
17 | KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ ) | 17 | KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ ) |
18 | 18 | ||
19 | LDSCRIPT= -L$(obj) -Tromscript.normal | 19 | LDSCRIPT= -L$(srctree)/$(src) -Tromscript.normal |
20 | 20 | ||
21 | HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ | 21 | HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ |
22 | -D_kernel_entry=0x$(KERNEL_ENTRY) \ | 22 | -D_kernel_entry=0x$(KERNEL_ENTRY) \ |
@@ -24,7 +24,7 @@ HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ | |||
24 | -D TIMESTAMP=$(shell date +%s) | 24 | -D TIMESTAMP=$(shell date +%s) |
25 | 25 | ||
26 | $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE) | 26 | $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE) |
27 | $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $< | 27 | $(CC) -fno-pic $(HEAD_DEFINES) $(LINUXINCLUDE) -c -o $@ $< |
28 | 28 | ||
29 | OBJECTS = head.o kImage.o | 29 | OBJECTS = head.o kImage.o |
30 | 30 | ||
diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c index 2c5c27c8e86d..dc272c188233 100644 --- a/arch/mips/mips-boards/generic/memory.c +++ b/arch/mips/mips-boards/generic/memory.c | |||
@@ -169,7 +169,6 @@ void __init prom_meminit(void) | |||
169 | 169 | ||
170 | void __init prom_free_prom_memory(void) | 170 | void __init prom_free_prom_memory(void) |
171 | { | 171 | { |
172 | #if 0 /* for now ... */ | ||
173 | unsigned long addr; | 172 | unsigned long addr; |
174 | int i; | 173 | int i; |
175 | 174 | ||
@@ -181,5 +180,4 @@ void __init prom_free_prom_memory(void) | |||
181 | free_init_pages("prom memory", | 180 | free_init_pages("prom memory", |
182 | addr, addr + boot_mem_map.map[i].size); | 181 | addr, addr + boot_mem_map.map[i].size); |
183 | } | 182 | } |
184 | #endif | ||
185 | } | 183 | } |
diff --git a/arch/mips/mips-boards/generic/reset.c b/arch/mips/mips-boards/generic/reset.c index 7a1bb51f81ee..583d468d98a9 100644 --- a/arch/mips/mips-boards/generic/reset.c +++ b/arch/mips/mips-boards/generic/reset.c | |||
@@ -39,16 +39,18 @@ static void atlas_machine_power_off(void); | |||
39 | 39 | ||
40 | static void mips_machine_restart(char *command) | 40 | static void mips_machine_restart(char *command) |
41 | { | 41 | { |
42 | unsigned int __iomem *softres_reg = ioremap(SOFTRES_REG, sizeof(unsigned int)); | 42 | unsigned int __iomem *softres_reg = |
43 | ioremap(SOFTRES_REG, sizeof(unsigned int)); | ||
43 | 44 | ||
44 | writew(GORESET, softres_reg); | 45 | __raw_writel(GORESET, softres_reg); |
45 | } | 46 | } |
46 | 47 | ||
47 | static void mips_machine_halt(void) | 48 | static void mips_machine_halt(void) |
48 | { | 49 | { |
49 | unsigned int __iomem *softres_reg = ioremap(SOFTRES_REG, sizeof(unsigned int)); | 50 | unsigned int __iomem *softres_reg = |
51 | ioremap(SOFTRES_REG, sizeof(unsigned int)); | ||
50 | 52 | ||
51 | writew(GORESET, softres_reg); | 53 | __raw_writel(GORESET, softres_reg); |
52 | } | 54 | } |
53 | 55 | ||
54 | #if defined(CONFIG_MIPS_ATLAS) | 56 | #if defined(CONFIG_MIPS_ATLAS) |
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c index 9a2636e56243..bc43a5c2224d 100644 --- a/arch/mips/mips-boards/malta/malta_setup.c +++ b/arch/mips/mips-boards/malta/malta_setup.c | |||
@@ -149,7 +149,7 @@ void __init plat_mem_setup(void) | |||
149 | /* Check PCI clock */ | 149 | /* Check PCI clock */ |
150 | { | 150 | { |
151 | unsigned int __iomem *jmpr_p = (unsigned int *) ioremap(MALTA_JMPRS_REG, sizeof(unsigned int)); | 151 | unsigned int __iomem *jmpr_p = (unsigned int *) ioremap(MALTA_JMPRS_REG, sizeof(unsigned int)); |
152 | int jmpr = (readw(jmpr_p) >> 2) & 0x07; | 152 | int jmpr = (__raw_readl(jmpr_p) >> 2) & 0x07; |
153 | static const int pciclocks[] __initdata = { | 153 | static const int pciclocks[] __initdata = { |
154 | 33, 20, 25, 30, 12, 16, 37, 10 | 154 | 33, 20, 25, 30, 12, 16, 37, 10 |
155 | }; | 155 | }; |
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index ae76795685cc..810535dd091b 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
@@ -45,7 +45,7 @@ static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp) | |||
45 | /* ignore region specifiers */ | 45 | /* ignore region specifiers */ |
46 | gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); | 46 | gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); |
47 | 47 | ||
48 | #ifdef CONFIG_ZONE_DMA32 | 48 | #ifdef CONFIG_ZONE_DMA |
49 | if (dev == NULL) | 49 | if (dev == NULL) |
50 | gfp |= __GFP_DMA; | 50 | gfp |= __GFP_DMA; |
51 | else if (dev->coherent_dma_mask < DMA_BIT_MASK(24)) | 51 | else if (dev->coherent_dma_mask < DMA_BIT_MASK(24)) |
diff --git a/arch/mips/pci/fixup-cobalt.c b/arch/mips/pci/fixup-cobalt.c index f7df1142912b..9553b14002dd 100644 --- a/arch/mips/pci/fixup-cobalt.c +++ b/arch/mips/pci/fixup-cobalt.c | |||
@@ -177,7 +177,7 @@ static char irq_tab_raq2[] __initdata = { | |||
177 | 177 | ||
178 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 178 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
179 | { | 179 | { |
180 | if (cobalt_board_id < COBALT_BRD_ID_QUBE2) | 180 | if (cobalt_board_id <= COBALT_BRD_ID_QUBE1) |
181 | return irq_tab_qube1[slot]; | 181 | return irq_tab_qube1[slot]; |
182 | 182 | ||
183 | if (cobalt_board_id == COBALT_BRD_ID_RAQ2) | 183 | if (cobalt_board_id == COBALT_BRD_ID_RAQ2) |
diff --git a/arch/mips/pci/ops-au1000.c b/arch/mips/pci/ops-au1000.c index 6b29904acf45..1314bd58f036 100644 --- a/arch/mips/pci/ops-au1000.c +++ b/arch/mips/pci/ops-au1000.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * BRIEF MODULE DESCRIPTION | 2 | * BRIEF MODULE DESCRIPTION |
3 | * Alchemy/AMD Au1x00 pci support. | 3 | * Alchemy/AMD Au1x00 PCI support. |
4 | * | 4 | * |
5 | * Copyright 2001,2002,2003 MontaVista Software Inc. | 5 | * Copyright 2001-2003, 2007 MontaVista Software Inc. |
6 | * Author: MontaVista Software, Inc. | 6 | * Author: MontaVista Software, Inc. |
7 | * ppopov@mvista.com or source@mvista.com | 7 | * ppopov@mvista.com or source@mvista.com |
8 | * | 8 | * |
@@ -69,10 +69,27 @@ void mod_wired_entry(int entry, unsigned long entrylo0, | |||
69 | write_c0_pagemask(old_pagemask); | 69 | write_c0_pagemask(old_pagemask); |
70 | } | 70 | } |
71 | 71 | ||
72 | struct vm_struct *pci_cfg_vm; | 72 | static struct vm_struct *pci_cfg_vm; |
73 | static int pci_cfg_wired_entry; | 73 | static int pci_cfg_wired_entry; |
74 | static int first_cfg = 1; | 74 | static unsigned long last_entryLo0, last_entryLo1; |
75 | unsigned long last_entryLo0, last_entryLo1; | 75 | |
76 | /* | ||
77 | * We can't ioremap the entire pci config space because it's too large. | ||
78 | * Nor can we call ioremap dynamically because some device drivers use | ||
79 | * the PCI config routines from within interrupt handlers and that | ||
80 | * becomes a problem in get_vm_area(). We use one wired TLB to handle | ||
81 | * all config accesses for all busses. | ||
82 | */ | ||
83 | void __init au1x_pci_cfg_init(void) | ||
84 | { | ||
85 | /* Reserve a wired entry for PCI config accesses */ | ||
86 | pci_cfg_vm = get_vm_area(0x2000, VM_IOREMAP); | ||
87 | if (!pci_cfg_vm) | ||
88 | panic(KERN_ERR "PCI unable to get vm area\n"); | ||
89 | pci_cfg_wired_entry = read_c0_wired(); | ||
90 | add_wired_entry(0, 0, (unsigned long)pci_cfg_vm->addr, PM_4K); | ||
91 | last_entryLo0 = last_entryLo1 = 0xffffffff; | ||
92 | } | ||
76 | 93 | ||
77 | static int config_access(unsigned char access_type, struct pci_bus *bus, | 94 | static int config_access(unsigned char access_type, struct pci_bus *bus, |
78 | unsigned int dev_fn, unsigned char where, | 95 | unsigned int dev_fn, unsigned char where, |
@@ -97,27 +114,6 @@ static int config_access(unsigned char access_type, struct pci_bus *bus, | |||
97 | Au1500_PCI_STATCMD); | 114 | Au1500_PCI_STATCMD); |
98 | au_sync_udelay(1); | 115 | au_sync_udelay(1); |
99 | 116 | ||
100 | /* | ||
101 | * We can't ioremap the entire pci config space because it's | ||
102 | * too large. Nor can we call ioremap dynamically because some | ||
103 | * device drivers use the pci config routines from within | ||
104 | * interrupt handlers and that becomes a problem in get_vm_area(). | ||
105 | * We use one wired tlb to handle all config accesses for all | ||
106 | * busses. To improve performance, if the current device | ||
107 | * is the same as the last device accessed, we don't touch the | ||
108 | * tlb. | ||
109 | */ | ||
110 | if (first_cfg) { | ||
111 | /* reserve a wired entry for pci config accesses */ | ||
112 | first_cfg = 0; | ||
113 | pci_cfg_vm = get_vm_area(0x2000, VM_IOREMAP); | ||
114 | if (!pci_cfg_vm) | ||
115 | panic(KERN_ERR "PCI unable to get vm area\n"); | ||
116 | pci_cfg_wired_entry = read_c0_wired(); | ||
117 | add_wired_entry(0, 0, (unsigned long)pci_cfg_vm->addr, PM_4K); | ||
118 | last_entryLo0 = last_entryLo1 = 0xffffffff; | ||
119 | } | ||
120 | |||
121 | /* Allow board vendors to implement their own off-chip idsel. | 117 | /* Allow board vendors to implement their own off-chip idsel. |
122 | * If it doesn't succeed, may as well bail out at this point. | 118 | * If it doesn't succeed, may as well bail out at this point. |
123 | */ | 119 | */ |
@@ -144,9 +140,12 @@ static int config_access(unsigned char access_type, struct pci_bus *bus, | |||
144 | /* page boundary */ | 140 | /* page boundary */ |
145 | cfg_base = cfg_base & PAGE_MASK; | 141 | cfg_base = cfg_base & PAGE_MASK; |
146 | 142 | ||
143 | /* | ||
144 | * To improve performance, if the current device is the same as | ||
145 | * the last device accessed, we don't touch the TLB. | ||
146 | */ | ||
147 | entryLo0 = (6 << 26) | (cfg_base >> 6) | (2 << 3) | 7; | 147 | entryLo0 = (6 << 26) | (cfg_base >> 6) | (2 << 3) | 7; |
148 | entryLo1 = (6 << 26) | (cfg_base >> 6) | (0x1000 >> 6) | (2 << 3) | 7; | 148 | entryLo1 = (6 << 26) | (cfg_base >> 6) | (0x1000 >> 6) | (2 << 3) | 7; |
149 | |||
150 | if ((entryLo0 != last_entryLo0) || (entryLo1 != last_entryLo1)) { | 149 | if ((entryLo0 != last_entryLo0) || (entryLo1 != last_entryLo1)) { |
151 | mod_wired_entry(pci_cfg_wired_entry, entryLo0, entryLo1, | 150 | mod_wired_entry(pci_cfg_wired_entry, entryLo0, entryLo1, |
152 | (unsigned long)pci_cfg_vm->addr, PM_4K); | 151 | (unsigned long)pci_cfg_vm->addr, PM_4K); |
diff --git a/arch/mips/pci/ops-mace.c b/arch/mips/pci/ops-mace.c index fe5451449304..e95881897ec9 100644 --- a/arch/mips/pci/ops-mace.c +++ b/arch/mips/pci/ops-mace.c | |||
@@ -42,6 +42,10 @@ static int | |||
42 | mace_pci_read_config(struct pci_bus *bus, unsigned int devfn, | 42 | mace_pci_read_config(struct pci_bus *bus, unsigned int devfn, |
43 | int reg, int size, u32 *val) | 43 | int reg, int size, u32 *val) |
44 | { | 44 | { |
45 | u32 control = mace->pci.control; | ||
46 | |||
47 | /* disable master aborts interrupts during config read */ | ||
48 | mace->pci.control = control & ~MACEPCI_CONTROL_MAR_INT; | ||
45 | mace->pci.config_addr = mkaddr(bus, devfn, reg); | 49 | mace->pci.config_addr = mkaddr(bus, devfn, reg); |
46 | switch (size) { | 50 | switch (size) { |
47 | case 1: | 51 | case 1: |
@@ -54,6 +58,9 @@ mace_pci_read_config(struct pci_bus *bus, unsigned int devfn, | |||
54 | *val = mace->pci.config_data.l; | 58 | *val = mace->pci.config_data.l; |
55 | break; | 59 | break; |
56 | } | 60 | } |
61 | /* ack possible master abort */ | ||
62 | mace->pci.error &= ~MACEPCI_ERROR_MASTER_ABORT; | ||
63 | mace->pci.control = control; | ||
57 | 64 | ||
58 | DPRINTK("read%d: reg=%08x,val=%02x\n", size * 8, reg, *val); | 65 | DPRINTK("read%d: reg=%08x,val=%02x\n", size * 8, reg, *val); |
59 | 66 | ||
diff --git a/arch/mips/pci/pci-ip32.c b/arch/mips/pci/pci-ip32.c index 618ea7dbc474..532b561b4442 100644 --- a/arch/mips/pci/pci-ip32.c +++ b/arch/mips/pci/pci-ip32.c | |||
@@ -119,6 +119,7 @@ static struct pci_controller mace_pci_controller = { | |||
119 | .iommu = 0, | 119 | .iommu = 0, |
120 | .mem_offset = MACE_PCI_MEM_OFFSET, | 120 | .mem_offset = MACE_PCI_MEM_OFFSET, |
121 | .io_offset = 0, | 121 | .io_offset = 0, |
122 | .io_map_base = CKSEG1ADDR(MACEPCI_LOW_IO), | ||
122 | }; | 123 | }; |
123 | 124 | ||
124 | static int __init mace_init(void) | 125 | static int __init mace_init(void) |
@@ -135,7 +136,8 @@ static int __init mace_init(void) | |||
135 | BUG_ON(request_irq(MACE_PCI_BRIDGE_IRQ, macepci_error, 0, | 136 | BUG_ON(request_irq(MACE_PCI_BRIDGE_IRQ, macepci_error, 0, |
136 | "MACE PCI error", NULL)); | 137 | "MACE PCI error", NULL)); |
137 | 138 | ||
138 | iomem_resource = mace_pci_mem_resource; | 139 | /* extend memory resources */ |
140 | iomem_resource.end = mace_pci_mem_resource.end; | ||
139 | ioport_resource = mace_pci_io_resource; | 141 | ioport_resource = mace_pci_io_resource; |
140 | 142 | ||
141 | register_pci_controller(&mace_pci_controller); | 143 | register_pci_controller(&mace_pci_controller); |
diff --git a/arch/mips/philips/pnx8550/common/time.c b/arch/mips/philips/pnx8550/common/time.c index e818fd0f1584..6d494e0de3d9 100644 --- a/arch/mips/philips/pnx8550/common/time.c +++ b/arch/mips/philips/pnx8550/common/time.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/kernel_stat.h> | 22 | #include <linux/kernel_stat.h> |
23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/module.h> | ||
26 | 25 | ||
27 | #include <asm/bootinfo.h> | 26 | #include <asm/bootinfo.h> |
28 | #include <asm/cpu.h> | 27 | #include <asm/cpu.h> |
@@ -41,11 +40,60 @@ static cycle_t hpt_read(void) | |||
41 | return read_c0_count2(); | 40 | return read_c0_count2(); |
42 | } | 41 | } |
43 | 42 | ||
43 | static struct clocksource pnx_clocksource = { | ||
44 | .name = "pnx8xxx", | ||
45 | .rating = 200, | ||
46 | .read = hpt_read, | ||
47 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
48 | }; | ||
49 | |||
44 | static void timer_ack(void) | 50 | static void timer_ack(void) |
45 | { | 51 | { |
46 | write_c0_compare(cpj); | 52 | write_c0_compare(cpj); |
47 | } | 53 | } |
48 | 54 | ||
55 | static irqreturn_t pnx8xxx_timer_interrupt(int irq, void *dev_id) | ||
56 | { | ||
57 | struct clock_event_device *c = dev_id; | ||
58 | |||
59 | /* clear MATCH, signal the event */ | ||
60 | c->event_handler(c); | ||
61 | |||
62 | return IRQ_HANDLED; | ||
63 | } | ||
64 | |||
65 | static struct irqaction pnx8xxx_timer_irq = { | ||
66 | .handler = pnx8xxx_timer_interrupt, | ||
67 | .flags = IRQF_DISABLED | IRQF_PERCPU, | ||
68 | .name = "pnx8xxx_timer", | ||
69 | }; | ||
70 | |||
71 | static irqreturn_t monotonic_interrupt(int irq, void *dev_id) | ||
72 | { | ||
73 | /* Timer 2 clear interrupt */ | ||
74 | write_c0_compare2(-1); | ||
75 | return IRQ_HANDLED; | ||
76 | } | ||
77 | |||
78 | static struct irqaction monotonic_irqaction = { | ||
79 | .handler = monotonic_interrupt, | ||
80 | .flags = IRQF_DISABLED, | ||
81 | .name = "Monotonic timer", | ||
82 | }; | ||
83 | |||
84 | static int pnx8xxx_set_next_event(unsigned long delta, | ||
85 | struct clock_event_device *evt) | ||
86 | { | ||
87 | write_c0_compare(delta); | ||
88 | return 0; | ||
89 | } | ||
90 | |||
91 | static struct clock_event_device pnx8xxx_clockevent = { | ||
92 | .name = "pnx8xxx_clockevent", | ||
93 | .features = CLOCK_EVT_FEAT_ONESHOT, | ||
94 | .set_next_event = pnx8xxx_set_next_event, | ||
95 | }; | ||
96 | |||
49 | /* | 97 | /* |
50 | * plat_time_init() - it does the following things: | 98 | * plat_time_init() - it does the following things: |
51 | * | 99 | * |
@@ -58,11 +106,34 @@ static void timer_ack(void) | |||
58 | 106 | ||
59 | __init void plat_time_init(void) | 107 | __init void plat_time_init(void) |
60 | { | 108 | { |
109 | unsigned int configPR; | ||
61 | unsigned int n; | 110 | unsigned int n; |
62 | unsigned int m; | 111 | unsigned int m; |
63 | unsigned int p; | 112 | unsigned int p; |
64 | unsigned int pow2p; | 113 | unsigned int pow2p; |
65 | 114 | ||
115 | clockevents_register_device(&pnx8xxx_clockevent); | ||
116 | clocksource_register(&pnx_clocksource); | ||
117 | |||
118 | setup_irq(PNX8550_INT_TIMER1, &pnx8xxx_timer_irq); | ||
119 | setup_irq(PNX8550_INT_TIMER2, &monotonic_irqaction); | ||
120 | |||
121 | /* Timer 1 start */ | ||
122 | configPR = read_c0_config7(); | ||
123 | configPR &= ~0x00000008; | ||
124 | write_c0_config7(configPR); | ||
125 | |||
126 | /* Timer 2 start */ | ||
127 | configPR = read_c0_config7(); | ||
128 | configPR &= ~0x00000010; | ||
129 | write_c0_config7(configPR); | ||
130 | |||
131 | /* Timer 3 stop */ | ||
132 | configPR = read_c0_config7(); | ||
133 | configPR |= 0x00000020; | ||
134 | write_c0_config7(configPR); | ||
135 | |||
136 | |||
66 | /* PLL0 sets MIPS clock (PLL1 <=> TM1, PLL6 <=> TM2, PLL5 <=> mem) */ | 137 | /* PLL0 sets MIPS clock (PLL1 <=> TM1, PLL6 <=> TM2, PLL5 <=> mem) */ |
67 | /* (but only if CLK_MIPS_CTL select value [bits 3:1] is 1: FIXME) */ | 138 | /* (but only if CLK_MIPS_CTL select value [bits 3:1] is 1: FIXME) */ |
68 | 139 | ||
@@ -87,42 +158,6 @@ __init void plat_time_init(void) | |||
87 | write_c0_count2(0); | 158 | write_c0_count2(0); |
88 | write_c0_compare2(0xffffffff); | 159 | write_c0_compare2(0xffffffff); |
89 | 160 | ||
90 | clocksource_mips.read = hpt_read; | ||
91 | mips_timer_ack = timer_ack; | ||
92 | } | ||
93 | |||
94 | static irqreturn_t monotonic_interrupt(int irq, void *dev_id) | ||
95 | { | ||
96 | /* Timer 2 clear interrupt */ | ||
97 | write_c0_compare2(-1); | ||
98 | return IRQ_HANDLED; | ||
99 | } | 161 | } |
100 | 162 | ||
101 | static struct irqaction monotonic_irqaction = { | ||
102 | .handler = monotonic_interrupt, | ||
103 | .flags = IRQF_DISABLED, | ||
104 | .name = "Monotonic timer", | ||
105 | }; | ||
106 | 163 | ||
107 | void __init plat_timer_setup(struct irqaction *irq) | ||
108 | { | ||
109 | int configPR; | ||
110 | |||
111 | setup_irq(PNX8550_INT_TIMER1, irq); | ||
112 | setup_irq(PNX8550_INT_TIMER2, &monotonic_irqaction); | ||
113 | |||
114 | /* Timer 1 start */ | ||
115 | configPR = read_c0_config7(); | ||
116 | configPR &= ~0x00000008; | ||
117 | write_c0_config7(configPR); | ||
118 | |||
119 | /* Timer 2 start */ | ||
120 | configPR = read_c0_config7(); | ||
121 | configPR &= ~0x00000010; | ||
122 | write_c0_config7(configPR); | ||
123 | |||
124 | /* Timer 3 stop */ | ||
125 | configPR = read_c0_config7(); | ||
126 | configPR |= 0x00000020; | ||
127 | write_c0_config7(configPR); | ||
128 | } | ||
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c index cab7cc22ab67..b0ea0e43ba48 100644 --- a/arch/mips/sgi-ip32/ip32-irq.c +++ b/arch/mips/sgi-ip32/ip32-irq.c | |||
@@ -426,7 +426,6 @@ static void ip32_irq0(void) | |||
426 | 426 | ||
427 | crime_int = crime->istat & crime_mask; | 427 | crime_int = crime->istat & crime_mask; |
428 | irq = MACE_VID_IN1_IRQ + __ffs(crime_int); | 428 | irq = MACE_VID_IN1_IRQ + __ffs(crime_int); |
429 | crime_int = 1 << irq; | ||
430 | 429 | ||
431 | if (crime_int & CRIME_MACEISA_INT_MASK) { | 430 | if (crime_int & CRIME_MACEISA_INT_MASK) { |
432 | unsigned long mace_int = mace->perif.ctrl.istat; | 431 | unsigned long mace_int = mace->perif.ctrl.istat; |
diff --git a/arch/mips/sgi-ip32/ip32-platform.c b/arch/mips/sgi-ip32/ip32-platform.c index 77febd68fcd4..89a71f49b692 100644 --- a/arch/mips/sgi-ip32/ip32-platform.c +++ b/arch/mips/sgi-ip32/ip32-platform.c | |||
@@ -13,21 +13,22 @@ | |||
13 | #include <asm/ip32/mace.h> | 13 | #include <asm/ip32/mace.h> |
14 | #include <asm/ip32/ip32_ints.h> | 14 | #include <asm/ip32/ip32_ints.h> |
15 | 15 | ||
16 | /* | 16 | #define MACEISA_SERIAL1_OFFS offsetof(struct sgi_mace, isa.serial1) |
17 | * .iobase isn't a constant (in the sense of C) so we fill it in at runtime. | 17 | #define MACEISA_SERIAL2_OFFS offsetof(struct sgi_mace, isa.serial2) |
18 | */ | 18 | |
19 | #define MACE_PORT(int) \ | 19 | #define MACE_PORT(offset,_irq) \ |
20 | { \ | 20 | { \ |
21 | .irq = int, \ | 21 | .mapbase = MACE_BASE + offset, \ |
22 | .irq = _irq, \ | ||
22 | .uartclk = 1843200, \ | 23 | .uartclk = 1843200, \ |
23 | .iotype = UPIO_MEM, \ | 24 | .iotype = UPIO_MEM, \ |
24 | .flags = UPF_SKIP_TEST, \ | 25 | .flags = UPF_SKIP_TEST|UPF_IOREMAP, \ |
25 | .regshift = 8, \ | 26 | .regshift = 8, \ |
26 | } | 27 | } |
27 | 28 | ||
28 | static struct plat_serial8250_port uart8250_data[] = { | 29 | static struct plat_serial8250_port uart8250_data[] = { |
29 | MACE_PORT(MACEISA_SERIAL1_IRQ), | 30 | MACE_PORT(MACEISA_SERIAL1_OFFS, MACEISA_SERIAL1_IRQ), |
30 | MACE_PORT(MACEISA_SERIAL2_IRQ), | 31 | MACE_PORT(MACEISA_SERIAL2_OFFS, MACEISA_SERIAL2_IRQ), |
31 | { }, | 32 | { }, |
32 | }; | 33 | }; |
33 | 34 | ||
@@ -41,9 +42,6 @@ static struct platform_device uart8250_device = { | |||
41 | 42 | ||
42 | static int __init uart8250_init(void) | 43 | static int __init uart8250_init(void) |
43 | { | 44 | { |
44 | uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1; | ||
45 | uart8250_data[1].membase = (void __iomem *) &mace->isa.serial2; | ||
46 | |||
47 | return platform_device_register(&uart8250_device); | 45 | return platform_device_register(&uart8250_device); |
48 | } | 46 | } |
49 | 47 | ||
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/setup.c b/arch/mips/tx4938/toshiba_rbtx4938/setup.c index 4a8152375efe..632e5d201353 100644 --- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c +++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c | |||
@@ -598,8 +598,8 @@ static int __init rbtx4938_ethaddr_init(void) | |||
598 | printk(KERN_WARNING "seeprom: bad checksum.\n"); | 598 | printk(KERN_WARNING "seeprom: bad checksum.\n"); |
599 | } | 599 | } |
600 | for (i = 0; i < 2; i++) { | 600 | for (i = 0; i < 2; i++) { |
601 | unsigned int slot = TX4938_PCIC_IDSEL_AD_TO_SLOT(31 - i); | 601 | unsigned int id = |
602 | unsigned int id = (1 << 8) | PCI_DEVFN(slot, 0); /* bus 1 */ | 602 | TXX9_IRQ_BASE + (i ? TX4938_IR_ETH1 : TX4938_IR_ETH0); |
603 | struct platform_device *pdev; | 603 | struct platform_device *pdev; |
604 | if (!(tx4938_ccfgptr->pcfg & | 604 | if (!(tx4938_ccfgptr->pcfg & |
605 | (i ? TX4938_PCFG_ETH1_SEL : TX4938_PCFG_ETH0_SEL))) | 605 | (i ? TX4938_PCFG_ETH1_SEL : TX4938_PCFG_ETH0_SEL))) |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 47fe2560138c..9ae800d81f89 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -345,6 +345,14 @@ config PPC_64K_PAGES | |||
345 | while on hardware with such support, it will be used to map | 345 | while on hardware with such support, it will be used to map |
346 | normal application pages. | 346 | normal application pages. |
347 | 347 | ||
348 | config PPC_SUBPAGE_PROT | ||
349 | bool "Support setting protections for 4k subpages" | ||
350 | depends on PPC_64K_PAGES | ||
351 | help | ||
352 | This option adds support for a system call to allow user programs | ||
353 | to set access permissions (read/write, readonly, or no access) | ||
354 | on the 4k subpages of each 64k page. | ||
355 | |||
348 | config SCHED_SMT | 356 | config SCHED_SMT |
349 | bool "SMT (Hyperthreading) scheduler support" | 357 | bool "SMT (Hyperthreading) scheduler support" |
350 | depends on PPC64 && SMP | 358 | depends on PPC64 && SMP |
diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts new file mode 100644 index 000000000000..9295083d1ce9 --- /dev/null +++ b/arch/powerpc/boot/dts/cm5200.dts | |||
@@ -0,0 +1,236 @@ | |||
1 | /* | ||
2 | * CM5200 board Device Tree Source | ||
3 | * | ||
4 | * Copyright (C) 2007 Semihalf | ||
5 | * Marian Balakowicz <m8@semihalf.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | /* | ||
14 | * WARNING: Do not depend on this tree layout remaining static just yet. | ||
15 | * The MPC5200 device tree conventions are still in flux | ||
16 | * Keep an eye on the linuxppc-dev mailing list for more details | ||
17 | */ | ||
18 | |||
19 | / { | ||
20 | model = "schindler,cm5200"; | ||
21 | compatible = "schindler,cm5200"; | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <1>; | ||
24 | |||
25 | cpus { | ||
26 | #address-cells = <1>; | ||
27 | #size-cells = <0>; | ||
28 | |||
29 | PowerPC,5200@0 { | ||
30 | device_type = "cpu"; | ||
31 | reg = <0>; | ||
32 | d-cache-line-size = <20>; | ||
33 | i-cache-line-size = <20>; | ||
34 | d-cache-size = <4000>; // L1, 16K | ||
35 | i-cache-size = <4000>; // L1, 16K | ||
36 | timebase-frequency = <0>; // from bootloader | ||
37 | bus-frequency = <0>; // from bootloader | ||
38 | clock-frequency = <0>; // from bootloader | ||
39 | }; | ||
40 | }; | ||
41 | |||
42 | memory { | ||
43 | device_type = "memory"; | ||
44 | reg = <00000000 04000000>; // 64MB | ||
45 | }; | ||
46 | |||
47 | soc5200@f0000000 { | ||
48 | model = "fsl,mpc5200b"; | ||
49 | compatible = "fsl,mpc5200b"; | ||
50 | revision = ""; // from bootloader | ||
51 | device_type = "soc"; | ||
52 | ranges = <0 f0000000 0000c000>; | ||
53 | reg = <f0000000 00000100>; | ||
54 | bus-frequency = <0>; // from bootloader | ||
55 | system-frequency = <0>; // from bootloader | ||
56 | |||
57 | cdm@200 { | ||
58 | compatible = "mpc5200b-cdm","mpc5200-cdm"; | ||
59 | reg = <200 38>; | ||
60 | }; | ||
61 | |||
62 | mpc5200_pic: pic@500 { | ||
63 | // 5200 interrupts are encoded into two levels; | ||
64 | interrupt-controller; | ||
65 | #interrupt-cells = <3>; | ||
66 | compatible = "mpc5200b-pic","mpc5200-pic"; | ||
67 | reg = <500 80>; | ||
68 | }; | ||
69 | |||
70 | gpt@600 { // General Purpose Timer | ||
71 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
72 | reg = <600 10>; | ||
73 | interrupts = <1 9 0>; | ||
74 | interrupt-parent = <&mpc5200_pic>; | ||
75 | fsl,has-wdt; | ||
76 | }; | ||
77 | |||
78 | gpt@610 { // General Purpose Timer | ||
79 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
80 | reg = <610 10>; | ||
81 | interrupts = <1 a 0>; | ||
82 | interrupt-parent = <&mpc5200_pic>; | ||
83 | }; | ||
84 | |||
85 | gpt@620 { // General Purpose Timer | ||
86 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
87 | reg = <620 10>; | ||
88 | interrupts = <1 b 0>; | ||
89 | interrupt-parent = <&mpc5200_pic>; | ||
90 | }; | ||
91 | |||
92 | gpt@630 { // General Purpose Timer | ||
93 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
94 | reg = <630 10>; | ||
95 | interrupts = <1 c 0>; | ||
96 | interrupt-parent = <&mpc5200_pic>; | ||
97 | }; | ||
98 | |||
99 | gpt@640 { // General Purpose Timer | ||
100 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
101 | reg = <640 10>; | ||
102 | interrupts = <1 d 0>; | ||
103 | interrupt-parent = <&mpc5200_pic>; | ||
104 | }; | ||
105 | |||
106 | gpt@650 { // General Purpose Timer | ||
107 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
108 | reg = <650 10>; | ||
109 | interrupts = <1 e 0>; | ||
110 | interrupt-parent = <&mpc5200_pic>; | ||
111 | }; | ||
112 | |||
113 | gpt@660 { // General Purpose Timer | ||
114 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
115 | reg = <660 10>; | ||
116 | interrupts = <1 f 0>; | ||
117 | interrupt-parent = <&mpc5200_pic>; | ||
118 | }; | ||
119 | |||
120 | gpt@670 { // General Purpose Timer | ||
121 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
122 | reg = <670 10>; | ||
123 | interrupts = <1 10 0>; | ||
124 | interrupt-parent = <&mpc5200_pic>; | ||
125 | }; | ||
126 | |||
127 | rtc@800 { // Real time clock | ||
128 | compatible = "mpc5200b-rtc","mpc5200-rtc"; | ||
129 | reg = <800 100>; | ||
130 | interrupts = <1 5 0 1 6 0>; | ||
131 | interrupt-parent = <&mpc5200_pic>; | ||
132 | }; | ||
133 | |||
134 | gpio@b00 { | ||
135 | compatible = "mpc5200b-gpio","mpc5200-gpio"; | ||
136 | reg = <b00 40>; | ||
137 | interrupts = <1 7 0>; | ||
138 | interrupt-parent = <&mpc5200_pic>; | ||
139 | }; | ||
140 | |||
141 | gpio-wkup@c00 { | ||
142 | compatible = "mpc5200b-gpio-wkup","mpc5200-gpio-wkup"; | ||
143 | reg = <c00 40>; | ||
144 | interrupts = <1 8 0 0 3 0>; | ||
145 | interrupt-parent = <&mpc5200_pic>; | ||
146 | }; | ||
147 | |||
148 | spi@f00 { | ||
149 | compatible = "mpc5200b-spi","mpc5200-spi"; | ||
150 | reg = <f00 20>; | ||
151 | interrupts = <2 d 0 2 e 0>; | ||
152 | interrupt-parent = <&mpc5200_pic>; | ||
153 | }; | ||
154 | |||
155 | usb@1000 { | ||
156 | device_type = "usb-ohci-be"; | ||
157 | compatible = "mpc5200b-ohci","mpc5200-ohci","ohci-be"; | ||
158 | reg = <1000 ff>; | ||
159 | interrupts = <2 6 0>; | ||
160 | interrupt-parent = <&mpc5200_pic>; | ||
161 | }; | ||
162 | |||
163 | dma-controller@1200 { | ||
164 | compatible = "mpc5200b-bestcomm","mpc5200-bestcomm"; | ||
165 | reg = <1200 80>; | ||
166 | interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 | ||
167 | 3 4 0 3 5 0 3 6 0 3 7 0 | ||
168 | 3 8 0 3 9 0 3 a 0 3 b 0 | ||
169 | 3 c 0 3 d 0 3 e 0 3 f 0>; | ||
170 | interrupt-parent = <&mpc5200_pic>; | ||
171 | }; | ||
172 | |||
173 | xlb@1f00 { | ||
174 | compatible = "mpc5200b-xlb","mpc5200-xlb"; | ||
175 | reg = <1f00 100>; | ||
176 | }; | ||
177 | |||
178 | serial@2000 { // PSC1 | ||
179 | device_type = "serial"; | ||
180 | compatible = "mpc5200b-psc-uart","mpc5200-psc-uart"; | ||
181 | port-number = <0>; // Logical port assignment | ||
182 | reg = <2000 100>; | ||
183 | interrupts = <2 1 0>; | ||
184 | interrupt-parent = <&mpc5200_pic>; | ||
185 | }; | ||
186 | |||
187 | serial@2200 { // PSC2 | ||
188 | device_type = "serial"; | ||
189 | compatible = "mpc5200-psc-uart"; | ||
190 | port-number = <1>; // Logical port assignment | ||
191 | reg = <2200 100>; | ||
192 | interrupts = <2 2 0>; | ||
193 | interrupt-parent = <&mpc5200_pic>; | ||
194 | }; | ||
195 | |||
196 | serial@2400 { // PSC3 | ||
197 | device_type = "serial"; | ||
198 | compatible = "mpc5200-psc-uart"; | ||
199 | port-number = <2>; // Logical port assignment | ||
200 | reg = <2400 100>; | ||
201 | interrupts = <2 3 0>; | ||
202 | interrupt-parent = <&mpc5200_pic>; | ||
203 | }; | ||
204 | |||
205 | serial@2c00 { // PSC6 | ||
206 | device_type = "serial"; | ||
207 | compatible = "mpc5200b-psc-uart","mpc5200-psc-uart"; | ||
208 | port-number = <5>; // Logical port assignment | ||
209 | reg = <2c00 100>; | ||
210 | interrupts = <2 4 0>; | ||
211 | interrupt-parent = <&mpc5200_pic>; | ||
212 | }; | ||
213 | |||
214 | ethernet@3000 { | ||
215 | device_type = "network"; | ||
216 | compatible = "mpc5200b-fec","mpc5200-fec"; | ||
217 | reg = <3000 800>; | ||
218 | local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */ | ||
219 | interrupts = <2 5 0>; | ||
220 | interrupt-parent = <&mpc5200_pic>; | ||
221 | }; | ||
222 | |||
223 | i2c@3d40 { | ||
224 | compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c"; | ||
225 | reg = <3d40 40>; | ||
226 | interrupts = <2 10 0>; | ||
227 | interrupt-parent = <&mpc5200_pic>; | ||
228 | fsl5200-clocking; | ||
229 | }; | ||
230 | |||
231 | sram@8000 { | ||
232 | compatible = "mpc5200b-sram","mpc5200-sram"; | ||
233 | reg = <8000 4000>; | ||
234 | }; | ||
235 | }; | ||
236 | }; | ||
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts index 23eeeb1fc61e..e1d6f441532f 100644 --- a/arch/powerpc/boot/dts/lite5200.dts +++ b/arch/powerpc/boot/dts/lite5200.dts | |||
@@ -19,7 +19,7 @@ | |||
19 | / { | 19 | / { |
20 | model = "fsl,lite5200"; | 20 | model = "fsl,lite5200"; |
21 | // revision = "1.0"; | 21 | // revision = "1.0"; |
22 | compatible = "fsl,lite5200","generic-mpc5200"; | 22 | compatible = "fsl,lite5200"; |
23 | #address-cells = <1>; | 23 | #address-cells = <1>; |
24 | #size-cells = <1>; | 24 | #size-cells = <1>; |
25 | 25 | ||
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts index f94e073de9a7..3e06f58a0a71 100644 --- a/arch/powerpc/boot/dts/lite5200b.dts +++ b/arch/powerpc/boot/dts/lite5200b.dts | |||
@@ -19,7 +19,7 @@ | |||
19 | / { | 19 | / { |
20 | model = "fsl,lite5200b"; | 20 | model = "fsl,lite5200b"; |
21 | // revision = "1.0"; | 21 | // revision = "1.0"; |
22 | compatible = "fsl,lite5200b","generic-mpc5200"; | 22 | compatible = "fsl,lite5200b"; |
23 | #address-cells = <1>; | 23 | #address-cells = <1>; |
24 | #size-cells = <1>; | 24 | #size-cells = <1>; |
25 | 25 | ||
diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts new file mode 100644 index 000000000000..d8c316ae0a47 --- /dev/null +++ b/arch/powerpc/boot/dts/motionpro.dts | |||
@@ -0,0 +1,309 @@ | |||
1 | /* | ||
2 | * Motion-PRO board Device Tree Source | ||
3 | * | ||
4 | * Copyright (C) 2007 Semihalf | ||
5 | * Marian Balakowicz <m8@semihalf.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | /* | ||
14 | * WARNING: Do not depend on this tree layout remaining static just yet. | ||
15 | * The MPC5200 device tree conventions are still in flux | ||
16 | * Keep an eye on the linuxppc-dev mailing list for more details | ||
17 | */ | ||
18 | |||
19 | / { | ||
20 | model = "promess,motionpro"; | ||
21 | compatible = "promess,motionpro"; | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <1>; | ||
24 | |||
25 | cpus { | ||
26 | #address-cells = <1>; | ||
27 | #size-cells = <0>; | ||
28 | |||
29 | PowerPC,5200@0 { | ||
30 | device_type = "cpu"; | ||
31 | reg = <0>; | ||
32 | d-cache-line-size = <20>; | ||
33 | i-cache-line-size = <20>; | ||
34 | d-cache-size = <4000>; // L1, 16K | ||
35 | i-cache-size = <4000>; // L1, 16K | ||
36 | timebase-frequency = <0>; // from bootloader | ||
37 | bus-frequency = <0>; // from bootloader | ||
38 | clock-frequency = <0>; // from bootloader | ||
39 | }; | ||
40 | }; | ||
41 | |||
42 | memory { | ||
43 | device_type = "memory"; | ||
44 | reg = <00000000 04000000>; // 64MB | ||
45 | }; | ||
46 | |||
47 | soc5200@f0000000 { | ||
48 | model = "fsl,mpc5200b"; | ||
49 | compatible = "fsl,mpc5200b"; | ||
50 | revision = ""; // from bootloader | ||
51 | device_type = "soc"; | ||
52 | ranges = <0 f0000000 0000c000>; | ||
53 | reg = <f0000000 00000100>; | ||
54 | bus-frequency = <0>; // from bootloader | ||
55 | system-frequency = <0>; // from bootloader | ||
56 | |||
57 | cdm@200 { | ||
58 | compatible = "mpc5200b-cdm","mpc5200-cdm"; | ||
59 | reg = <200 38>; | ||
60 | }; | ||
61 | |||
62 | mpc5200_pic: pic@500 { | ||
63 | // 5200 interrupts are encoded into two levels; | ||
64 | interrupt-controller; | ||
65 | #interrupt-cells = <3>; | ||
66 | compatible = "mpc5200b-pic","mpc5200-pic"; | ||
67 | reg = <500 80>; | ||
68 | }; | ||
69 | |||
70 | gpt@600 { // General Purpose Timer | ||
71 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
72 | reg = <600 10>; | ||
73 | interrupts = <1 9 0>; | ||
74 | interrupt-parent = <&mpc5200_pic>; | ||
75 | fsl,has-wdt; | ||
76 | }; | ||
77 | |||
78 | gpt@610 { // General Purpose Timer | ||
79 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
80 | reg = <610 10>; | ||
81 | interrupts = <1 a 0>; | ||
82 | interrupt-parent = <&mpc5200_pic>; | ||
83 | }; | ||
84 | |||
85 | gpt@620 { // General Purpose Timer | ||
86 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
87 | reg = <620 10>; | ||
88 | interrupts = <1 b 0>; | ||
89 | interrupt-parent = <&mpc5200_pic>; | ||
90 | }; | ||
91 | |||
92 | gpt@630 { // General Purpose Timer | ||
93 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
94 | reg = <630 10>; | ||
95 | interrupts = <1 c 0>; | ||
96 | interrupt-parent = <&mpc5200_pic>; | ||
97 | }; | ||
98 | |||
99 | gpt@640 { // General Purpose Timer | ||
100 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
101 | reg = <640 10>; | ||
102 | interrupts = <1 d 0>; | ||
103 | interrupt-parent = <&mpc5200_pic>; | ||
104 | }; | ||
105 | |||
106 | gpt@650 { // General Purpose Timer | ||
107 | compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; | ||
108 | reg = <650 10>; | ||
109 | interrupts = <1 e 0>; | ||
110 | interrupt-parent = <&mpc5200_pic>; | ||
111 | }; | ||
112 | |||
113 | motionpro-led@660 { // Motion-PRO status LED | ||
114 | compatible = "promess,motionpro-led"; | ||
115 | label = "motionpro-statusled"; | ||
116 | reg = <660 10>; | ||
117 | interrupts = <1 f 0>; | ||
118 | interrupt-parent = <&mpc5200_pic>; | ||
119 | blink-delay = <64>; // 100 msec | ||
120 | }; | ||
121 | |||
122 | motionpro-led@670 { // Motion-PRO ready LED | ||
123 | compatible = "promess,motionpro-led"; | ||
124 | label = "motionpro-readyled"; | ||
125 | reg = <670 10>; | ||
126 | interrupts = <1 10 0>; | ||
127 | interrupt-parent = <&mpc5200_pic>; | ||
128 | }; | ||
129 | |||
130 | rtc@800 { // Real time clock | ||
131 | compatible = "mpc5200b-rtc","mpc5200-rtc"; | ||
132 | reg = <800 100>; | ||
133 | interrupts = <1 5 0 1 6 0>; | ||
134 | interrupt-parent = <&mpc5200_pic>; | ||
135 | }; | ||
136 | |||
137 | mscan@980 { | ||
138 | compatible = "mpc5200b-mscan","mpc5200-mscan"; | ||
139 | interrupts = <2 12 0>; | ||
140 | interrupt-parent = <&mpc5200_pic>; | ||
141 | reg = <980 80>; | ||
142 | }; | ||
143 | |||
144 | gpio@b00 { | ||
145 | compatible = "mpc5200b-gpio","mpc5200-gpio"; | ||
146 | reg = <b00 40>; | ||
147 | interrupts = <1 7 0>; | ||
148 | interrupt-parent = <&mpc5200_pic>; | ||
149 | }; | ||
150 | |||
151 | gpio-wkup@c00 { | ||
152 | compatible = "mpc5200b-gpio-wkup","mpc5200-gpio-wkup"; | ||
153 | reg = <c00 40>; | ||
154 | interrupts = <1 8 0 0 3 0>; | ||
155 | interrupt-parent = <&mpc5200_pic>; | ||
156 | }; | ||
157 | |||
158 | |||
159 | spi@f00 { | ||
160 | compatible = "mpc5200b-spi","mpc5200-spi"; | ||
161 | reg = <f00 20>; | ||
162 | interrupts = <2 d 0 2 e 0>; | ||
163 | interrupt-parent = <&mpc5200_pic>; | ||
164 | }; | ||
165 | |||
166 | usb@1000 { | ||
167 | compatible = "mpc5200b-ohci","mpc5200-ohci","ohci-be"; | ||
168 | reg = <1000 ff>; | ||
169 | interrupts = <2 6 0>; | ||
170 | interrupt-parent = <&mpc5200_pic>; | ||
171 | }; | ||
172 | |||
173 | dma-controller@1200 { | ||
174 | compatible = "mpc5200b-bestcomm","mpc5200-bestcomm"; | ||
175 | reg = <1200 80>; | ||
176 | interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 | ||
177 | 3 4 0 3 5 0 3 6 0 3 7 0 | ||
178 | 3 8 0 3 9 0 3 a 0 3 b 0 | ||
179 | 3 c 0 3 d 0 3 e 0 3 f 0>; | ||
180 | interrupt-parent = <&mpc5200_pic>; | ||
181 | }; | ||
182 | |||
183 | xlb@1f00 { | ||
184 | compatible = "mpc5200b-xlb","mpc5200-xlb"; | ||
185 | reg = <1f00 100>; | ||
186 | }; | ||
187 | |||
188 | serial@2000 { // PSC1 | ||
189 | device_type = "serial"; | ||
190 | compatible = "mpc5200b-psc-uart","mpc5200-psc-uart"; | ||
191 | port-number = <0>; // Logical port assignment | ||
192 | reg = <2000 100>; | ||
193 | interrupts = <2 1 0>; | ||
194 | interrupt-parent = <&mpc5200_pic>; | ||
195 | }; | ||
196 | |||
197 | // PSC2 in spi master mode | ||
198 | spi@2200 { // PSC2 | ||
199 | compatible = "mpc5200b-psc-spi","mpc5200-psc-spi"; | ||
200 | cell-index = <1>; | ||
201 | reg = <2200 100>; | ||
202 | interrupts = <2 2 0>; | ||
203 | interrupt-parent = <&mpc5200_pic>; | ||
204 | }; | ||
205 | |||
206 | // PSC5 in uart mode | ||
207 | serial@2800 { // PSC5 | ||
208 | device_type = "serial"; | ||
209 | compatible = "mpc5200b-psc-uart","mpc5200-psc-uart"; | ||
210 | port-number = <4>; // Logical port assignment | ||
211 | reg = <2800 100>; | ||
212 | interrupts = <2 c 0>; | ||
213 | interrupt-parent = <&mpc5200_pic>; | ||
214 | }; | ||
215 | |||
216 | ethernet@3000 { | ||
217 | device_type = "network"; | ||
218 | compatible = "mpc5200b-fec","mpc5200-fec"; | ||
219 | reg = <3000 800>; | ||
220 | local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */ | ||
221 | interrupts = <2 5 0>; | ||
222 | interrupt-parent = <&mpc5200_pic>; | ||
223 | }; | ||
224 | |||
225 | ata@3a00 { | ||
226 | compatible = "mpc5200b-ata","mpc5200-ata"; | ||
227 | reg = <3a00 100>; | ||
228 | interrupts = <2 7 0>; | ||
229 | interrupt-parent = <&mpc5200_pic>; | ||
230 | }; | ||
231 | |||
232 | i2c@3d40 { | ||
233 | compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c"; | ||
234 | reg = <3d40 40>; | ||
235 | interrupts = <2 10 0>; | ||
236 | interrupt-parent = <&mpc5200_pic>; | ||
237 | fsl5200-clocking; | ||
238 | }; | ||
239 | |||
240 | sram@8000 { | ||
241 | compatible = "mpc5200b-sram","mpc5200-sram"; | ||
242 | reg = <8000 4000>; | ||
243 | }; | ||
244 | }; | ||
245 | |||
246 | lpb { | ||
247 | model = "fsl,lpb"; | ||
248 | compatible = "fsl,lpb"; | ||
249 | #address-cells = <2>; | ||
250 | #size-cells = <1>; | ||
251 | ranges = <1 0 50000000 00010000 | ||
252 | 2 0 50010000 00010000 | ||
253 | 3 0 50020000 00010000>; | ||
254 | |||
255 | // 8-bit DualPort SRAM on LocalPlus Bus CS1 | ||
256 | kollmorgen@1,0 { | ||
257 | compatible = "promess,motionpro-kollmorgen"; | ||
258 | reg = <1 0 10000>; | ||
259 | interrupts = <1 1 0>; | ||
260 | interrupt-parent = <&mpc5200_pic>; | ||
261 | }; | ||
262 | |||
263 | // 8-bit board CPLD on LocalPlus Bus CS2 | ||
264 | cpld@2,0 { | ||
265 | compatible = "promess,motionpro-cpld"; | ||
266 | reg = <2 0 10000>; | ||
267 | }; | ||
268 | |||
269 | // 8-bit custom Anybus Module on LocalPlus Bus CS3 | ||
270 | anybus@3,0 { | ||
271 | compatible = "promess,motionpro-anybus"; | ||
272 | reg = <3 0 10000>; | ||
273 | }; | ||
274 | pro_module_general@3,0 { | ||
275 | compatible = "promess,pro_module_general"; | ||
276 | reg = <3 0 3>; | ||
277 | }; | ||
278 | pro_module_dio@3,800 { | ||
279 | compatible = "promess,pro_module_dio"; | ||
280 | reg = <3 800 2>; | ||
281 | }; | ||
282 | }; | ||
283 | |||
284 | pci@f0000d00 { | ||
285 | #interrupt-cells = <1>; | ||
286 | #size-cells = <2>; | ||
287 | #address-cells = <3>; | ||
288 | device_type = "pci"; | ||
289 | compatible = "mpc5200b-pci","mpc5200-pci"; | ||
290 | reg = <f0000d00 100>; | ||
291 | interrupt-map-mask = <f800 0 0 7>; | ||
292 | interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot | ||
293 | c000 0 0 2 &mpc5200_pic 1 1 3 | ||
294 | c000 0 0 3 &mpc5200_pic 1 2 3 | ||
295 | c000 0 0 4 &mpc5200_pic 1 3 3 | ||
296 | |||
297 | c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot | ||
298 | c800 0 0 2 &mpc5200_pic 1 2 3 | ||
299 | c800 0 0 3 &mpc5200_pic 1 3 3 | ||
300 | c800 0 0 4 &mpc5200_pic 0 0 3>; | ||
301 | clock-frequency = <0>; // From boot loader | ||
302 | interrupts = <2 8 0 2 9 0 2 a 0>; | ||
303 | interrupt-parent = <&mpc5200_pic>; | ||
304 | bus-range = <0 0>; | ||
305 | ranges = <42000000 0 80000000 80000000 0 20000000 | ||
306 | 02000000 0 a0000000 a0000000 0 10000000 | ||
307 | 01000000 0 00000000 b0000000 0 01000000>; | ||
308 | }; | ||
309 | }; | ||
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts new file mode 100644 index 000000000000..5017cec3d386 --- /dev/null +++ b/arch/powerpc/boot/dts/tqm5200.dts | |||
@@ -0,0 +1,184 @@ | |||
1 | /* | ||
2 | * TQM5200 board Device Tree Source | ||
3 | * | ||
4 | * Copyright (C) 2007 Semihalf | ||
5 | * Marian Balakowicz <m8@semihalf.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | /* | ||
14 | * WARNING: Do not depend on this tree layout remaining static just yet. | ||
15 | * The MPC5200 device tree conventions are still in flux | ||
16 | * Keep an eye on the linuxppc-dev mailing list for more details | ||
17 | */ | ||
18 | |||
19 | / { | ||
20 | model = "tqc,tqm5200"; | ||
21 | compatible = "tqc,tqm5200"; | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <1>; | ||
24 | |||
25 | cpus { | ||
26 | #address-cells = <1>; | ||
27 | #size-cells = <0>; | ||
28 | |||
29 | PowerPC,5200@0 { | ||
30 | device_type = "cpu"; | ||
31 | reg = <0>; | ||
32 | d-cache-line-size = <20>; | ||
33 | i-cache-line-size = <20>; | ||
34 | d-cache-size = <4000>; // L1, 16K | ||
35 | i-cache-size = <4000>; // L1, 16K | ||
36 | timebase-frequency = <0>; // from bootloader | ||
37 | bus-frequency = <0>; // from bootloader | ||
38 | clock-frequency = <0>; // from bootloader | ||
39 | }; | ||
40 | }; | ||
41 | |||
42 | memory { | ||
43 | device_type = "memory"; | ||
44 | reg = <00000000 04000000>; // 64MB | ||
45 | }; | ||
46 | |||
47 | soc5200@f0000000 { | ||
48 | model = "fsl,mpc5200"; | ||
49 | compatible = "fsl,mpc5200"; | ||
50 | revision = ""; // from bootloader | ||
51 | device_type = "soc"; | ||
52 | ranges = <0 f0000000 0000c000>; | ||
53 | reg = <f0000000 00000100>; | ||
54 | bus-frequency = <0>; // from bootloader | ||
55 | system-frequency = <0>; // from bootloader | ||
56 | |||
57 | cdm@200 { | ||
58 | compatible = "mpc5200-cdm"; | ||
59 | reg = <200 38>; | ||
60 | }; | ||
61 | |||
62 | mpc5200_pic: pic@500 { | ||
63 | // 5200 interrupts are encoded into two levels; | ||
64 | interrupt-controller; | ||
65 | #interrupt-cells = <3>; | ||
66 | compatible = "mpc5200-pic"; | ||
67 | reg = <500 80>; | ||
68 | }; | ||
69 | |||
70 | gpt@600 { // General Purpose Timer | ||
71 | compatible = "fsl,mpc5200-gpt"; | ||
72 | reg = <600 10>; | ||
73 | interrupts = <1 9 0>; | ||
74 | interrupt-parent = <&mpc5200_pic>; | ||
75 | fsl,has-wdt; | ||
76 | }; | ||
77 | |||
78 | gpio@b00 { | ||
79 | compatible = "mpc5200-gpio"; | ||
80 | reg = <b00 40>; | ||
81 | interrupts = <1 7 0>; | ||
82 | interrupt-parent = <&mpc5200_pic>; | ||
83 | }; | ||
84 | |||
85 | usb@1000 { | ||
86 | compatible = "mpc5200-ohci","ohci-be"; | ||
87 | reg = <1000 ff>; | ||
88 | interrupts = <2 6 0>; | ||
89 | interrupt-parent = <&mpc5200_pic>; | ||
90 | }; | ||
91 | |||
92 | dma-controller@1200 { | ||
93 | compatible = "mpc5200-bestcomm"; | ||
94 | reg = <1200 80>; | ||
95 | interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 | ||
96 | 3 4 0 3 5 0 3 6 0 3 7 0 | ||
97 | 3 8 0 3 9 0 3 a 0 3 b 0 | ||
98 | 3 c 0 3 d 0 3 e 0 3 f 0>; | ||
99 | interrupt-parent = <&mpc5200_pic>; | ||
100 | }; | ||
101 | |||
102 | xlb@1f00 { | ||
103 | compatible = "mpc5200-xlb"; | ||
104 | reg = <1f00 100>; | ||
105 | }; | ||
106 | |||
107 | serial@2000 { // PSC1 | ||
108 | device_type = "serial"; | ||
109 | compatible = "mpc5200-psc-uart"; | ||
110 | port-number = <0>; // Logical port assignment | ||
111 | reg = <2000 100>; | ||
112 | interrupts = <2 1 0>; | ||
113 | interrupt-parent = <&mpc5200_pic>; | ||
114 | }; | ||
115 | |||
116 | serial@2200 { // PSC2 | ||
117 | device_type = "serial"; | ||
118 | compatible = "mpc5200-psc-uart"; | ||
119 | port-number = <1>; // Logical port assignment | ||
120 | reg = <2200 100>; | ||
121 | interrupts = <2 2 0>; | ||
122 | interrupt-parent = <&mpc5200_pic>; | ||
123 | }; | ||
124 | |||
125 | serial@2400 { // PSC3 | ||
126 | device_type = "serial"; | ||
127 | compatible = "mpc5200-psc-uart"; | ||
128 | port-number = <2>; // Logical port assignment | ||
129 | reg = <2400 100>; | ||
130 | interrupts = <2 3 0>; | ||
131 | interrupt-parent = <&mpc5200_pic>; | ||
132 | }; | ||
133 | |||
134 | ethernet@3000 { | ||
135 | device_type = "network"; | ||
136 | compatible = "mpc5200-fec"; | ||
137 | reg = <3000 800>; | ||
138 | local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */ | ||
139 | interrupts = <2 5 0>; | ||
140 | interrupt-parent = <&mpc5200_pic>; | ||
141 | }; | ||
142 | |||
143 | ata@3a00 { | ||
144 | compatible = "mpc5200-ata"; | ||
145 | reg = <3a00 100>; | ||
146 | interrupts = <2 7 0>; | ||
147 | interrupt-parent = <&mpc5200_pic>; | ||
148 | }; | ||
149 | |||
150 | i2c@3d40 { | ||
151 | compatible = "mpc5200-i2c","fsl-i2c"; | ||
152 | reg = <3d40 40>; | ||
153 | interrupts = <2 10 0>; | ||
154 | interrupt-parent = <&mpc5200_pic>; | ||
155 | fsl5200-clocking; | ||
156 | }; | ||
157 | |||
158 | sram@8000 { | ||
159 | compatible = "mpc5200-sram"; | ||
160 | reg = <8000 4000>; | ||
161 | }; | ||
162 | }; | ||
163 | |||
164 | pci@f0000d00 { | ||
165 | #interrupt-cells = <1>; | ||
166 | #size-cells = <2>; | ||
167 | #address-cells = <3>; | ||
168 | device_type = "pci"; | ||
169 | compatible = "fsl,mpc5200-pci"; | ||
170 | reg = <f0000d00 100>; | ||
171 | interrupt-map-mask = <f800 0 0 7>; | ||
172 | interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 | ||
173 | c000 0 0 2 &mpc5200_pic 0 0 3 | ||
174 | c000 0 0 3 &mpc5200_pic 0 0 3 | ||
175 | c000 0 0 4 &mpc5200_pic 0 0 3>; | ||
176 | clock-frequency = <0>; // From boot loader | ||
177 | interrupts = <2 8 0 2 9 0 2 a 0>; | ||
178 | interrupt-parent = <&mpc5200_pic>; | ||
179 | bus-range = <0 0>; | ||
180 | ranges = <42000000 0 80000000 80000000 0 10000000 | ||
181 | 02000000 0 90000000 90000000 0 10000000 | ||
182 | 01000000 0 00000000 a0000000 0 01000000>; | ||
183 | }; | ||
184 | }; | ||
diff --git a/arch/powerpc/boot/flatdevtree_env.h b/arch/powerpc/boot/flatdevtree_env.h index ad0420da8921..66e0ebb1a364 100644 --- a/arch/powerpc/boot/flatdevtree_env.h +++ b/arch/powerpc/boot/flatdevtree_env.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * This file adds the header file glue so that the shared files | 2 | * This file adds the header file glue so that the shared files |
3 | * flatdevicetree.[ch] can compile and work in the powerpc bootwrapper. | 3 | * flatdevicetree.[ch] can compile and work in the powerpc bootwrapper. |
4 | * | 4 | * |
5 | * strncmp & strchr copied from <file:lib/strings.c> | 5 | * strncmp & strchr copied from <file:lib/string.c> |
6 | * Copyright (C) 1991, 1992 Linus Torvalds | 6 | * Copyright (C) 1991, 1992 Linus Torvalds |
7 | * | 7 | * |
8 | * Maintained by: Mark A. Greer <mgreer@mvista.com> | 8 | * Maintained by: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/powerpc/configs/lite5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig index 02bb7e5d8ed5..740c9f2b7de6 100644 --- a/arch/powerpc/configs/lite5200_defconfig +++ b/arch/powerpc/configs/mpc5200_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.24-rc4 | 3 | # Linux kernel version: 2.6.24-rc6 |
4 | # Thu Dec 6 16:48:24 2007 | 4 | # Fri Jan 18 14:19:54 2008 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -72,7 +72,9 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
72 | # CONFIG_IKCONFIG is not set | 72 | # CONFIG_IKCONFIG is not set |
73 | CONFIG_LOG_BUF_SHIFT=14 | 73 | CONFIG_LOG_BUF_SHIFT=14 |
74 | # CONFIG_CGROUPS is not set | 74 | # CONFIG_CGROUPS is not set |
75 | # CONFIG_FAIR_GROUP_SCHED is not set | 75 | CONFIG_FAIR_GROUP_SCHED=y |
76 | CONFIG_FAIR_USER_SCHED=y | ||
77 | # CONFIG_FAIR_CGROUP_SCHED is not set | ||
76 | CONFIG_SYSFS_DEPRECATED=y | 78 | CONFIG_SYSFS_DEPRECATED=y |
77 | # CONFIG_RELAY is not set | 79 | # CONFIG_RELAY is not set |
78 | CONFIG_BLK_DEV_INITRD=y | 80 | CONFIG_BLK_DEV_INITRD=y |
@@ -138,17 +140,22 @@ CONFIG_CLASSIC32=y | |||
138 | CONFIG_PPC_MPC52xx=y | 140 | CONFIG_PPC_MPC52xx=y |
139 | CONFIG_PPC_MPC5200=y | 141 | CONFIG_PPC_MPC5200=y |
140 | CONFIG_PPC_MPC5200_BUGFIX=y | 142 | CONFIG_PPC_MPC5200_BUGFIX=y |
141 | # CONFIG_PPC_EFIKA is not set | 143 | CONFIG_PPC_MPC5200_SIMPLE=y |
144 | CONFIG_PPC_EFIKA=y | ||
142 | CONFIG_PPC_LITE5200=y | 145 | CONFIG_PPC_LITE5200=y |
143 | # CONFIG_PPC_PMAC is not set | 146 | # CONFIG_PPC_PMAC is not set |
144 | # CONFIG_PPC_CELL is not set | 147 | # CONFIG_PPC_CELL is not set |
145 | # CONFIG_PPC_CELL_NATIVE is not set | 148 | # CONFIG_PPC_CELL_NATIVE is not set |
146 | # CONFIG_PQ2ADS is not set | 149 | # CONFIG_PQ2ADS is not set |
147 | # CONFIG_EMBEDDED6xx is not set | 150 | # CONFIG_EMBEDDED6xx is not set |
151 | CONFIG_PPC_NATIVE=y | ||
152 | # CONFIG_UDBG_RTAS_CONSOLE is not set | ||
148 | # CONFIG_MPIC is not set | 153 | # CONFIG_MPIC is not set |
149 | # CONFIG_MPIC_WEIRD is not set | 154 | # CONFIG_MPIC_WEIRD is not set |
150 | # CONFIG_PPC_I8259 is not set | 155 | # CONFIG_PPC_I8259 is not set |
151 | # CONFIG_PPC_RTAS is not set | 156 | CONFIG_PPC_RTAS=y |
157 | # CONFIG_RTAS_ERROR_LOGGING is not set | ||
158 | CONFIG_RTAS_PROC=y | ||
152 | # CONFIG_MMIO_NVRAM is not set | 159 | # CONFIG_MMIO_NVRAM is not set |
153 | # CONFIG_PPC_MPC106 is not set | 160 | # CONFIG_PPC_MPC106 is not set |
154 | # CONFIG_PPC_970_NAP is not set | 161 | # CONFIG_PPC_970_NAP is not set |
@@ -344,7 +351,82 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
344 | # CONFIG_DEBUG_DEVRES is not set | 351 | # CONFIG_DEBUG_DEVRES is not set |
345 | # CONFIG_SYS_HYPERVISOR is not set | 352 | # CONFIG_SYS_HYPERVISOR is not set |
346 | # CONFIG_CONNECTOR is not set | 353 | # CONFIG_CONNECTOR is not set |
347 | # CONFIG_MTD is not set | 354 | CONFIG_MTD=y |
355 | # CONFIG_MTD_DEBUG is not set | ||
356 | CONFIG_MTD_CONCAT=y | ||
357 | CONFIG_MTD_PARTITIONS=y | ||
358 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
359 | CONFIG_MTD_CMDLINE_PARTS=y | ||
360 | |||
361 | # | ||
362 | # User Modules And Translation Layers | ||
363 | # | ||
364 | CONFIG_MTD_CHAR=y | ||
365 | CONFIG_MTD_BLKDEVS=y | ||
366 | CONFIG_MTD_BLOCK=y | ||
367 | # CONFIG_FTL is not set | ||
368 | # CONFIG_NFTL is not set | ||
369 | # CONFIG_INFTL is not set | ||
370 | # CONFIG_RFD_FTL is not set | ||
371 | # CONFIG_SSFDC is not set | ||
372 | # CONFIG_MTD_OOPS is not set | ||
373 | |||
374 | # | ||
375 | # RAM/ROM/Flash chip drivers | ||
376 | # | ||
377 | CONFIG_MTD_CFI=y | ||
378 | # CONFIG_MTD_JEDECPROBE is not set | ||
379 | CONFIG_MTD_GEN_PROBE=y | ||
380 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
381 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
382 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
383 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
384 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
385 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
386 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
387 | CONFIG_MTD_CFI_I1=y | ||
388 | CONFIG_MTD_CFI_I2=y | ||
389 | # CONFIG_MTD_CFI_I4 is not set | ||
390 | # CONFIG_MTD_CFI_I8 is not set | ||
391 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
392 | CONFIG_MTD_CFI_AMDSTD=y | ||
393 | # CONFIG_MTD_CFI_STAA is not set | ||
394 | CONFIG_MTD_CFI_UTIL=y | ||
395 | CONFIG_MTD_RAM=y | ||
396 | CONFIG_MTD_ROM=y | ||
397 | # CONFIG_MTD_ABSENT is not set | ||
398 | |||
399 | # | ||
400 | # Mapping drivers for chip access | ||
401 | # | ||
402 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
403 | # CONFIG_MTD_PHYSMAP is not set | ||
404 | CONFIG_MTD_PHYSMAP_OF=y | ||
405 | # CONFIG_MTD_INTEL_VR_NOR is not set | ||
406 | # CONFIG_MTD_PLATRAM is not set | ||
407 | |||
408 | # | ||
409 | # Self-contained MTD device drivers | ||
410 | # | ||
411 | # CONFIG_MTD_PMC551 is not set | ||
412 | # CONFIG_MTD_SLRAM is not set | ||
413 | # CONFIG_MTD_PHRAM is not set | ||
414 | # CONFIG_MTD_MTDRAM is not set | ||
415 | # CONFIG_MTD_BLOCK2MTD is not set | ||
416 | |||
417 | # | ||
418 | # Disk-On-Chip Device Drivers | ||
419 | # | ||
420 | # CONFIG_MTD_DOC2000 is not set | ||
421 | # CONFIG_MTD_DOC2001 is not set | ||
422 | # CONFIG_MTD_DOC2001PLUS is not set | ||
423 | # CONFIG_MTD_NAND is not set | ||
424 | # CONFIG_MTD_ONENAND is not set | ||
425 | |||
426 | # | ||
427 | # UBI - Unsorted block images | ||
428 | # | ||
429 | # CONFIG_MTD_UBI is not set | ||
348 | CONFIG_OF_DEVICE=y | 430 | CONFIG_OF_DEVICE=y |
349 | # CONFIG_PARPORT is not set | 431 | # CONFIG_PARPORT is not set |
350 | CONFIG_BLK_DEV=y | 432 | CONFIG_BLK_DEV=y |
@@ -358,6 +440,7 @@ CONFIG_BLK_DEV_LOOP=y | |||
358 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 440 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
359 | # CONFIG_BLK_DEV_NBD is not set | 441 | # CONFIG_BLK_DEV_NBD is not set |
360 | # CONFIG_BLK_DEV_SX8 is not set | 442 | # CONFIG_BLK_DEV_SX8 is not set |
443 | # CONFIG_BLK_DEV_UB is not set | ||
361 | CONFIG_BLK_DEV_RAM=y | 444 | CONFIG_BLK_DEV_RAM=y |
362 | CONFIG_BLK_DEV_RAM_COUNT=16 | 445 | CONFIG_BLK_DEV_RAM_COUNT=16 |
363 | CONFIG_BLK_DEV_RAM_SIZE=32768 | 446 | CONFIG_BLK_DEV_RAM_SIZE=32768 |
@@ -377,18 +460,18 @@ CONFIG_MISC_DEVICES=y | |||
377 | # CONFIG_RAID_ATTRS is not set | 460 | # CONFIG_RAID_ATTRS is not set |
378 | CONFIG_SCSI=y | 461 | CONFIG_SCSI=y |
379 | CONFIG_SCSI_DMA=y | 462 | CONFIG_SCSI_DMA=y |
380 | # CONFIG_SCSI_TGT is not set | 463 | CONFIG_SCSI_TGT=y |
381 | # CONFIG_SCSI_NETLINK is not set | 464 | # CONFIG_SCSI_NETLINK is not set |
382 | # CONFIG_SCSI_PROC_FS is not set | 465 | CONFIG_SCSI_PROC_FS=y |
383 | 466 | ||
384 | # | 467 | # |
385 | # SCSI support type (disk, tape, CD-ROM) | 468 | # SCSI support type (disk, tape, CD-ROM) |
386 | # | 469 | # |
387 | # CONFIG_BLK_DEV_SD is not set | 470 | CONFIG_BLK_DEV_SD=y |
388 | # CONFIG_CHR_DEV_ST is not set | 471 | # CONFIG_CHR_DEV_ST is not set |
389 | # CONFIG_CHR_DEV_OSST is not set | 472 | # CONFIG_CHR_DEV_OSST is not set |
390 | # CONFIG_BLK_DEV_SR is not set | 473 | # CONFIG_BLK_DEV_SR is not set |
391 | # CONFIG_CHR_DEV_SG is not set | 474 | CONFIG_CHR_DEV_SG=y |
392 | # CONFIG_CHR_DEV_SCH is not set | 475 | # CONFIG_CHR_DEV_SCH is not set |
393 | 476 | ||
394 | # | 477 | # |
@@ -501,7 +584,8 @@ CONFIG_PATA_MPC52xx=y | |||
501 | # CONFIG_PATA_SIS is not set | 584 | # CONFIG_PATA_SIS is not set |
502 | # CONFIG_PATA_VIA is not set | 585 | # CONFIG_PATA_VIA is not set |
503 | # CONFIG_PATA_WINBOND is not set | 586 | # CONFIG_PATA_WINBOND is not set |
504 | # CONFIG_PATA_PLATFORM is not set | 587 | CONFIG_PATA_PLATFORM=y |
588 | # CONFIG_PATA_OF_PLATFORM is not set | ||
505 | # CONFIG_MD is not set | 589 | # CONFIG_MD is not set |
506 | # CONFIG_FUSION is not set | 590 | # CONFIG_FUSION is not set |
507 | 591 | ||
@@ -522,37 +606,40 @@ CONFIG_NETDEVICES=y | |||
522 | # CONFIG_VETH is not set | 606 | # CONFIG_VETH is not set |
523 | # CONFIG_IP1000 is not set | 607 | # CONFIG_IP1000 is not set |
524 | # CONFIG_ARCNET is not set | 608 | # CONFIG_ARCNET is not set |
525 | # CONFIG_NET_ETHERNET is not set | 609 | CONFIG_PHYLIB=y |
526 | CONFIG_NETDEV_1000=y | 610 | |
527 | # CONFIG_ACENIC is not set | 611 | # |
528 | # CONFIG_DL2K is not set | 612 | # MII PHY device drivers |
529 | # CONFIG_E1000 is not set | 613 | # |
530 | # CONFIG_E1000E is not set | 614 | # CONFIG_MARVELL_PHY is not set |
531 | # CONFIG_NS83820 is not set | 615 | # CONFIG_DAVICOM_PHY is not set |
532 | # CONFIG_HAMACHI is not set | 616 | # CONFIG_QSEMI_PHY is not set |
533 | # CONFIG_YELLOWFIN is not set | 617 | # CONFIG_LXT_PHY is not set |
534 | # CONFIG_R8169 is not set | 618 | # CONFIG_CICADA_PHY is not set |
535 | # CONFIG_SIS190 is not set | 619 | # CONFIG_VITESSE_PHY is not set |
536 | # CONFIG_SKGE is not set | 620 | # CONFIG_SMSC_PHY is not set |
537 | # CONFIG_SKY2 is not set | 621 | # CONFIG_BROADCOM_PHY is not set |
538 | # CONFIG_SK98LIN is not set | 622 | # CONFIG_ICPLUS_PHY is not set |
539 | # CONFIG_VIA_VELOCITY is not set | 623 | # CONFIG_FIXED_PHY is not set |
540 | # CONFIG_TIGON3 is not set | 624 | # CONFIG_MDIO_BITBANG is not set |
541 | # CONFIG_BNX2 is not set | 625 | CONFIG_NET_ETHERNET=y |
542 | # CONFIG_MV643XX_ETH is not set | 626 | # CONFIG_MII is not set |
543 | # CONFIG_QLA3XXX is not set | 627 | # CONFIG_HAPPYMEAL is not set |
544 | # CONFIG_ATL1 is not set | 628 | # CONFIG_SUNGEM is not set |
545 | CONFIG_NETDEV_10000=y | 629 | # CONFIG_CASSINI is not set |
546 | # CONFIG_CHELSIO_T1 is not set | 630 | # CONFIG_NET_VENDOR_3COM is not set |
547 | # CONFIG_CHELSIO_T3 is not set | 631 | # CONFIG_NET_TULIP is not set |
548 | # CONFIG_IXGBE is not set | 632 | # CONFIG_HP100 is not set |
549 | # CONFIG_IXGB is not set | 633 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
550 | # CONFIG_S2IO is not set | 634 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
551 | # CONFIG_MYRI10GE is not set | 635 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
552 | # CONFIG_NETXEN_NIC is not set | 636 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set |
553 | # CONFIG_NIU is not set | 637 | # CONFIG_NET_PCI is not set |
554 | # CONFIG_MLX4_CORE is not set | 638 | # CONFIG_B44 is not set |
555 | # CONFIG_TEHUTI is not set | 639 | CONFIG_FEC_MPC52xx=y |
640 | CONFIG_FEC_MPC52xx_MDIO=y | ||
641 | # CONFIG_NETDEV_1000 is not set | ||
642 | # CONFIG_NETDEV_10000 is not set | ||
556 | # CONFIG_TR is not set | 643 | # CONFIG_TR is not set |
557 | 644 | ||
558 | # | 645 | # |
@@ -560,6 +647,15 @@ CONFIG_NETDEV_10000=y | |||
560 | # | 647 | # |
561 | # CONFIG_WLAN_PRE80211 is not set | 648 | # CONFIG_WLAN_PRE80211 is not set |
562 | # CONFIG_WLAN_80211 is not set | 649 | # CONFIG_WLAN_80211 is not set |
650 | |||
651 | # | ||
652 | # USB Network Adapters | ||
653 | # | ||
654 | # CONFIG_USB_CATC is not set | ||
655 | # CONFIG_USB_KAWETH is not set | ||
656 | # CONFIG_USB_PEGASUS is not set | ||
657 | # CONFIG_USB_RTL8150 is not set | ||
658 | # CONFIG_USB_USBNET is not set | ||
563 | # CONFIG_WAN is not set | 659 | # CONFIG_WAN is not set |
564 | # CONFIG_FDDI is not set | 660 | # CONFIG_FDDI is not set |
565 | # CONFIG_HIPPI is not set | 661 | # CONFIG_HIPPI is not set |
@@ -603,21 +699,78 @@ CONFIG_SERIAL_CORE=y | |||
603 | CONFIG_SERIAL_CORE_CONSOLE=y | 699 | CONFIG_SERIAL_CORE_CONSOLE=y |
604 | CONFIG_SERIAL_MPC52xx=y | 700 | CONFIG_SERIAL_MPC52xx=y |
605 | CONFIG_SERIAL_MPC52xx_CONSOLE=y | 701 | CONFIG_SERIAL_MPC52xx_CONSOLE=y |
606 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=9600 | 702 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 |
607 | # CONFIG_SERIAL_JSM is not set | 703 | # CONFIG_SERIAL_JSM is not set |
608 | CONFIG_UNIX98_PTYS=y | 704 | CONFIG_UNIX98_PTYS=y |
609 | CONFIG_LEGACY_PTYS=y | 705 | CONFIG_LEGACY_PTYS=y |
610 | CONFIG_LEGACY_PTY_COUNT=256 | 706 | CONFIG_LEGACY_PTY_COUNT=256 |
707 | # CONFIG_HVC_RTAS is not set | ||
611 | # CONFIG_IPMI_HANDLER is not set | 708 | # CONFIG_IPMI_HANDLER is not set |
612 | # CONFIG_HW_RANDOM is not set | 709 | # CONFIG_HW_RANDOM is not set |
613 | # CONFIG_NVRAM is not set | 710 | # CONFIG_NVRAM is not set |
614 | # CONFIG_GEN_RTC is not set | 711 | CONFIG_GEN_RTC=y |
712 | # CONFIG_GEN_RTC_X is not set | ||
615 | # CONFIG_R3964 is not set | 713 | # CONFIG_R3964 is not set |
616 | # CONFIG_APPLICOM is not set | 714 | # CONFIG_APPLICOM is not set |
617 | # CONFIG_RAW_DRIVER is not set | 715 | # CONFIG_RAW_DRIVER is not set |
618 | # CONFIG_TCG_TPM is not set | 716 | # CONFIG_TCG_TPM is not set |
619 | CONFIG_DEVPORT=y | 717 | CONFIG_DEVPORT=y |
620 | # CONFIG_I2C is not set | 718 | CONFIG_I2C=y |
719 | CONFIG_I2C_BOARDINFO=y | ||
720 | CONFIG_I2C_CHARDEV=y | ||
721 | |||
722 | # | ||
723 | # I2C Algorithms | ||
724 | # | ||
725 | # CONFIG_I2C_ALGOBIT is not set | ||
726 | # CONFIG_I2C_ALGOPCF is not set | ||
727 | # CONFIG_I2C_ALGOPCA is not set | ||
728 | |||
729 | # | ||
730 | # I2C Hardware Bus support | ||
731 | # | ||
732 | # CONFIG_I2C_ALI1535 is not set | ||
733 | # CONFIG_I2C_ALI1563 is not set | ||
734 | # CONFIG_I2C_ALI15X3 is not set | ||
735 | # CONFIG_I2C_AMD756 is not set | ||
736 | # CONFIG_I2C_AMD8111 is not set | ||
737 | # CONFIG_I2C_I801 is not set | ||
738 | # CONFIG_I2C_I810 is not set | ||
739 | # CONFIG_I2C_PIIX4 is not set | ||
740 | CONFIG_I2C_MPC=y | ||
741 | # CONFIG_I2C_NFORCE2 is not set | ||
742 | # CONFIG_I2C_OCORES is not set | ||
743 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
744 | # CONFIG_I2C_PROSAVAGE is not set | ||
745 | # CONFIG_I2C_SAVAGE4 is not set | ||
746 | # CONFIG_I2C_SIMTEC is not set | ||
747 | # CONFIG_I2C_SIS5595 is not set | ||
748 | # CONFIG_I2C_SIS630 is not set | ||
749 | # CONFIG_I2C_SIS96X is not set | ||
750 | # CONFIG_I2C_TAOS_EVM is not set | ||
751 | # CONFIG_I2C_STUB is not set | ||
752 | # CONFIG_I2C_TINY_USB is not set | ||
753 | # CONFIG_I2C_VIA is not set | ||
754 | # CONFIG_I2C_VIAPRO is not set | ||
755 | # CONFIG_I2C_VOODOO3 is not set | ||
756 | |||
757 | # | ||
758 | # Miscellaneous I2C Chip support | ||
759 | # | ||
760 | # CONFIG_SENSORS_DS1337 is not set | ||
761 | # CONFIG_SENSORS_DS1374 is not set | ||
762 | # CONFIG_DS1682 is not set | ||
763 | # CONFIG_SENSORS_EEPROM is not set | ||
764 | # CONFIG_SENSORS_PCF8574 is not set | ||
765 | # CONFIG_SENSORS_PCA9539 is not set | ||
766 | # CONFIG_SENSORS_PCF8591 is not set | ||
767 | # CONFIG_SENSORS_M41T00 is not set | ||
768 | # CONFIG_SENSORS_MAX6875 is not set | ||
769 | # CONFIG_SENSORS_TSL2550 is not set | ||
770 | # CONFIG_I2C_DEBUG_CORE is not set | ||
771 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
772 | # CONFIG_I2C_DEBUG_BUS is not set | ||
773 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
621 | 774 | ||
622 | # | 775 | # |
623 | # SPI support | 776 | # SPI support |
@@ -626,8 +779,77 @@ CONFIG_DEVPORT=y | |||
626 | # CONFIG_SPI_MASTER is not set | 779 | # CONFIG_SPI_MASTER is not set |
627 | # CONFIG_W1 is not set | 780 | # CONFIG_W1 is not set |
628 | # CONFIG_POWER_SUPPLY is not set | 781 | # CONFIG_POWER_SUPPLY is not set |
629 | # CONFIG_HWMON is not set | 782 | CONFIG_HWMON=y |
630 | # CONFIG_WATCHDOG is not set | 783 | # CONFIG_HWMON_VID is not set |
784 | # CONFIG_SENSORS_AD7418 is not set | ||
785 | # CONFIG_SENSORS_ADM1021 is not set | ||
786 | # CONFIG_SENSORS_ADM1025 is not set | ||
787 | # CONFIG_SENSORS_ADM1026 is not set | ||
788 | # CONFIG_SENSORS_ADM1029 is not set | ||
789 | # CONFIG_SENSORS_ADM1031 is not set | ||
790 | # CONFIG_SENSORS_ADM9240 is not set | ||
791 | # CONFIG_SENSORS_ADT7470 is not set | ||
792 | # CONFIG_SENSORS_ATXP1 is not set | ||
793 | # CONFIG_SENSORS_DS1621 is not set | ||
794 | # CONFIG_SENSORS_I5K_AMB is not set | ||
795 | # CONFIG_SENSORS_F71805F is not set | ||
796 | # CONFIG_SENSORS_F71882FG is not set | ||
797 | # CONFIG_SENSORS_F75375S is not set | ||
798 | # CONFIG_SENSORS_GL518SM is not set | ||
799 | # CONFIG_SENSORS_GL520SM is not set | ||
800 | # CONFIG_SENSORS_IT87 is not set | ||
801 | # CONFIG_SENSORS_LM63 is not set | ||
802 | # CONFIG_SENSORS_LM75 is not set | ||
803 | # CONFIG_SENSORS_LM77 is not set | ||
804 | # CONFIG_SENSORS_LM78 is not set | ||
805 | # CONFIG_SENSORS_LM80 is not set | ||
806 | # CONFIG_SENSORS_LM83 is not set | ||
807 | # CONFIG_SENSORS_LM85 is not set | ||
808 | # CONFIG_SENSORS_LM87 is not set | ||
809 | # CONFIG_SENSORS_LM90 is not set | ||
810 | # CONFIG_SENSORS_LM92 is not set | ||
811 | # CONFIG_SENSORS_LM93 is not set | ||
812 | # CONFIG_SENSORS_MAX1619 is not set | ||
813 | # CONFIG_SENSORS_MAX6650 is not set | ||
814 | # CONFIG_SENSORS_PC87360 is not set | ||
815 | # CONFIG_SENSORS_PC87427 is not set | ||
816 | # CONFIG_SENSORS_SIS5595 is not set | ||
817 | # CONFIG_SENSORS_DME1737 is not set | ||
818 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
819 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
820 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
821 | # CONFIG_SENSORS_THMC50 is not set | ||
822 | # CONFIG_SENSORS_VIA686A is not set | ||
823 | # CONFIG_SENSORS_VT1211 is not set | ||
824 | # CONFIG_SENSORS_VT8231 is not set | ||
825 | # CONFIG_SENSORS_W83781D is not set | ||
826 | # CONFIG_SENSORS_W83791D is not set | ||
827 | # CONFIG_SENSORS_W83792D is not set | ||
828 | # CONFIG_SENSORS_W83793 is not set | ||
829 | # CONFIG_SENSORS_W83L785TS is not set | ||
830 | # CONFIG_SENSORS_W83627HF is not set | ||
831 | # CONFIG_SENSORS_W83627EHF is not set | ||
832 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
833 | CONFIG_WATCHDOG=y | ||
834 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
835 | |||
836 | # | ||
837 | # Watchdog Device Drivers | ||
838 | # | ||
839 | # CONFIG_SOFT_WATCHDOG is not set | ||
840 | # CONFIG_MPC5200_WDT is not set | ||
841 | # CONFIG_WATCHDOG_RTAS is not set | ||
842 | |||
843 | # | ||
844 | # PCI-based Watchdog Cards | ||
845 | # | ||
846 | # CONFIG_PCIPCWATCHDOG is not set | ||
847 | # CONFIG_WDTPCI is not set | ||
848 | |||
849 | # | ||
850 | # USB-based Watchdog Cards | ||
851 | # | ||
852 | # CONFIG_USBPCWATCHDOG is not set | ||
631 | 853 | ||
632 | # | 854 | # |
633 | # Sonics Silicon Backplane | 855 | # Sonics Silicon Backplane |
@@ -645,7 +867,8 @@ CONFIG_SSB_POSSIBLE=y | |||
645 | # | 867 | # |
646 | # CONFIG_VIDEO_DEV is not set | 868 | # CONFIG_VIDEO_DEV is not set |
647 | # CONFIG_DVB_CORE is not set | 869 | # CONFIG_DVB_CORE is not set |
648 | # CONFIG_DAB is not set | 870 | CONFIG_DAB=y |
871 | # CONFIG_USB_DABUSB is not set | ||
649 | 872 | ||
650 | # | 873 | # |
651 | # Graphics support | 874 | # Graphics support |
@@ -670,18 +893,125 @@ CONFIG_USB_SUPPORT=y | |||
670 | CONFIG_USB_ARCH_HAS_HCD=y | 893 | CONFIG_USB_ARCH_HAS_HCD=y |
671 | CONFIG_USB_ARCH_HAS_OHCI=y | 894 | CONFIG_USB_ARCH_HAS_OHCI=y |
672 | CONFIG_USB_ARCH_HAS_EHCI=y | 895 | CONFIG_USB_ARCH_HAS_EHCI=y |
673 | # CONFIG_USB is not set | 896 | CONFIG_USB=y |
897 | # CONFIG_USB_DEBUG is not set | ||
898 | |||
899 | # | ||
900 | # Miscellaneous USB options | ||
901 | # | ||
902 | CONFIG_USB_DEVICEFS=y | ||
903 | # CONFIG_USB_DEVICE_CLASS is not set | ||
904 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
905 | # CONFIG_USB_SUSPEND is not set | ||
906 | # CONFIG_USB_PERSIST is not set | ||
907 | # CONFIG_USB_OTG is not set | ||
908 | |||
909 | # | ||
910 | # USB Host Controller Drivers | ||
911 | # | ||
912 | # CONFIG_USB_EHCI_HCD is not set | ||
913 | # CONFIG_USB_ISP116X_HCD is not set | ||
914 | CONFIG_USB_OHCI_HCD=y | ||
915 | CONFIG_USB_OHCI_HCD_PPC_SOC=y | ||
916 | CONFIG_USB_OHCI_HCD_PPC_OF=y | ||
917 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y | ||
918 | # CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set | ||
919 | CONFIG_USB_OHCI_HCD_PCI=y | ||
920 | CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y | ||
921 | CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y | ||
922 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
923 | # CONFIG_USB_UHCI_HCD is not set | ||
924 | # CONFIG_USB_SL811_HCD is not set | ||
925 | # CONFIG_USB_R8A66597_HCD is not set | ||
926 | |||
927 | # | ||
928 | # USB Device Class drivers | ||
929 | # | ||
930 | # CONFIG_USB_ACM is not set | ||
931 | # CONFIG_USB_PRINTER is not set | ||
674 | 932 | ||
675 | # | 933 | # |
676 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 934 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
677 | # | 935 | # |
678 | 936 | ||
679 | # | 937 | # |
938 | # may also be needed; see USB_STORAGE Help for more information | ||
939 | # | ||
940 | CONFIG_USB_STORAGE=y | ||
941 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
942 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
943 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
944 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
945 | # CONFIG_USB_STORAGE_DPCM is not set | ||
946 | # CONFIG_USB_STORAGE_USBAT is not set | ||
947 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
948 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
949 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
950 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
951 | # CONFIG_USB_STORAGE_KARMA is not set | ||
952 | # CONFIG_USB_LIBUSUAL is not set | ||
953 | |||
954 | # | ||
955 | # USB Imaging devices | ||
956 | # | ||
957 | # CONFIG_USB_MDC800 is not set | ||
958 | # CONFIG_USB_MICROTEK is not set | ||
959 | CONFIG_USB_MON=y | ||
960 | |||
961 | # | ||
962 | # USB port drivers | ||
963 | # | ||
964 | |||
965 | # | ||
966 | # USB Serial Converter support | ||
967 | # | ||
968 | # CONFIG_USB_SERIAL is not set | ||
969 | |||
970 | # | ||
971 | # USB Miscellaneous drivers | ||
972 | # | ||
973 | # CONFIG_USB_EMI62 is not set | ||
974 | # CONFIG_USB_EMI26 is not set | ||
975 | # CONFIG_USB_ADUTUX is not set | ||
976 | # CONFIG_USB_AUERSWALD is not set | ||
977 | # CONFIG_USB_RIO500 is not set | ||
978 | # CONFIG_USB_LEGOTOWER is not set | ||
979 | # CONFIG_USB_LCD is not set | ||
980 | # CONFIG_USB_BERRY_CHARGE is not set | ||
981 | # CONFIG_USB_LED is not set | ||
982 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
983 | # CONFIG_USB_CYTHERM is not set | ||
984 | # CONFIG_USB_PHIDGET is not set | ||
985 | # CONFIG_USB_IDMOUSE is not set | ||
986 | # CONFIG_USB_FTDI_ELAN is not set | ||
987 | # CONFIG_USB_APPLEDISPLAY is not set | ||
988 | # CONFIG_USB_LD is not set | ||
989 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
990 | # CONFIG_USB_IOWARRIOR is not set | ||
991 | # CONFIG_USB_TEST is not set | ||
992 | |||
993 | # | ||
994 | # USB DSL modem support | ||
995 | # | ||
996 | |||
997 | # | ||
680 | # USB Gadget Support | 998 | # USB Gadget Support |
681 | # | 999 | # |
682 | # CONFIG_USB_GADGET is not set | 1000 | # CONFIG_USB_GADGET is not set |
683 | # CONFIG_MMC is not set | 1001 | # CONFIG_MMC is not set |
684 | # CONFIG_NEW_LEDS is not set | 1002 | CONFIG_NEW_LEDS=y |
1003 | CONFIG_LEDS_CLASS=y | ||
1004 | |||
1005 | # | ||
1006 | # LED drivers | ||
1007 | # | ||
1008 | |||
1009 | # | ||
1010 | # LED Triggers | ||
1011 | # | ||
1012 | CONFIG_LEDS_TRIGGERS=y | ||
1013 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
1014 | # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set | ||
685 | # CONFIG_INFINIBAND is not set | 1015 | # CONFIG_INFINIBAND is not set |
686 | # CONFIG_EDAC is not set | 1016 | # CONFIG_EDAC is not set |
687 | # CONFIG_RTC_CLASS is not set | 1017 | # CONFIG_RTC_CLASS is not set |
@@ -729,8 +1059,11 @@ CONFIG_DNOTIFY=y | |||
729 | # | 1059 | # |
730 | # DOS/FAT/NT Filesystems | 1060 | # DOS/FAT/NT Filesystems |
731 | # | 1061 | # |
732 | # CONFIG_MSDOS_FS is not set | 1062 | CONFIG_FAT_FS=y |
733 | # CONFIG_VFAT_FS is not set | 1063 | CONFIG_MSDOS_FS=y |
1064 | CONFIG_VFAT_FS=y | ||
1065 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
1066 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
734 | # CONFIG_NTFS_FS is not set | 1067 | # CONFIG_NTFS_FS is not set |
735 | 1068 | ||
736 | # | 1069 | # |
@@ -755,15 +1088,39 @@ CONFIG_TMPFS=y | |||
755 | # CONFIG_BEFS_FS is not set | 1088 | # CONFIG_BEFS_FS is not set |
756 | # CONFIG_BFS_FS is not set | 1089 | # CONFIG_BFS_FS is not set |
757 | # CONFIG_EFS_FS is not set | 1090 | # CONFIG_EFS_FS is not set |
758 | # CONFIG_CRAMFS is not set | 1091 | CONFIG_JFFS2_FS=y |
1092 | CONFIG_JFFS2_FS_DEBUG=0 | ||
1093 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
1094 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
1095 | # CONFIG_JFFS2_SUMMARY is not set | ||
1096 | # CONFIG_JFFS2_FS_XATTR is not set | ||
1097 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
1098 | CONFIG_JFFS2_ZLIB=y | ||
1099 | # CONFIG_JFFS2_LZO is not set | ||
1100 | CONFIG_JFFS2_RTIME=y | ||
1101 | # CONFIG_JFFS2_RUBIN is not set | ||
1102 | CONFIG_CRAMFS=y | ||
759 | # CONFIG_VXFS_FS is not set | 1103 | # CONFIG_VXFS_FS is not set |
760 | # CONFIG_HPFS_FS is not set | 1104 | # CONFIG_HPFS_FS is not set |
761 | # CONFIG_QNX4FS_FS is not set | 1105 | # CONFIG_QNX4FS_FS is not set |
762 | # CONFIG_SYSV_FS is not set | 1106 | # CONFIG_SYSV_FS is not set |
763 | # CONFIG_UFS_FS is not set | 1107 | # CONFIG_UFS_FS is not set |
764 | CONFIG_NETWORK_FILESYSTEMS=y | 1108 | CONFIG_NETWORK_FILESYSTEMS=y |
765 | # CONFIG_NFS_FS is not set | 1109 | CONFIG_NFS_FS=y |
1110 | CONFIG_NFS_V3=y | ||
1111 | # CONFIG_NFS_V3_ACL is not set | ||
1112 | CONFIG_NFS_V4=y | ||
1113 | # CONFIG_NFS_DIRECTIO is not set | ||
766 | # CONFIG_NFSD is not set | 1114 | # CONFIG_NFSD is not set |
1115 | CONFIG_ROOT_NFS=y | ||
1116 | CONFIG_LOCKD=y | ||
1117 | CONFIG_LOCKD_V4=y | ||
1118 | CONFIG_NFS_COMMON=y | ||
1119 | CONFIG_SUNRPC=y | ||
1120 | CONFIG_SUNRPC_GSS=y | ||
1121 | # CONFIG_SUNRPC_BIND34 is not set | ||
1122 | CONFIG_RPCSEC_GSS_KRB5=y | ||
1123 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
767 | # CONFIG_SMB_FS is not set | 1124 | # CONFIG_SMB_FS is not set |
768 | # CONFIG_CIFS is not set | 1125 | # CONFIG_CIFS is not set |
769 | # CONFIG_NCP_FS is not set | 1126 | # CONFIG_NCP_FS is not set |
@@ -775,19 +1132,61 @@ CONFIG_NETWORK_FILESYSTEMS=y | |||
775 | # | 1132 | # |
776 | # CONFIG_PARTITION_ADVANCED is not set | 1133 | # CONFIG_PARTITION_ADVANCED is not set |
777 | CONFIG_MSDOS_PARTITION=y | 1134 | CONFIG_MSDOS_PARTITION=y |
778 | # CONFIG_NLS is not set | 1135 | CONFIG_NLS=y |
1136 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1137 | CONFIG_NLS_CODEPAGE_437=y | ||
1138 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1139 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1140 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1141 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1142 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1143 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1144 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1145 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1146 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1147 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1148 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1149 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1150 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1151 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1152 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1153 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1154 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1155 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1156 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1157 | # CONFIG_NLS_ISO8859_8 is not set | ||
1158 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1159 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1160 | # CONFIG_NLS_ASCII is not set | ||
1161 | CONFIG_NLS_ISO8859_1=y | ||
1162 | # CONFIG_NLS_ISO8859_2 is not set | ||
1163 | # CONFIG_NLS_ISO8859_3 is not set | ||
1164 | # CONFIG_NLS_ISO8859_4 is not set | ||
1165 | # CONFIG_NLS_ISO8859_5 is not set | ||
1166 | # CONFIG_NLS_ISO8859_6 is not set | ||
1167 | # CONFIG_NLS_ISO8859_7 is not set | ||
1168 | # CONFIG_NLS_ISO8859_9 is not set | ||
1169 | # CONFIG_NLS_ISO8859_13 is not set | ||
1170 | # CONFIG_NLS_ISO8859_14 is not set | ||
1171 | # CONFIG_NLS_ISO8859_15 is not set | ||
1172 | # CONFIG_NLS_KOI8_R is not set | ||
1173 | # CONFIG_NLS_KOI8_U is not set | ||
1174 | # CONFIG_NLS_UTF8 is not set | ||
779 | # CONFIG_DLM is not set | 1175 | # CONFIG_DLM is not set |
780 | # CONFIG_UCC_SLOW is not set | 1176 | # CONFIG_UCC_SLOW is not set |
781 | 1177 | ||
782 | # | 1178 | # |
783 | # Library routines | 1179 | # Library routines |
784 | # | 1180 | # |
1181 | CONFIG_BITREVERSE=y | ||
785 | # CONFIG_CRC_CCITT is not set | 1182 | # CONFIG_CRC_CCITT is not set |
786 | # CONFIG_CRC16 is not set | 1183 | # CONFIG_CRC16 is not set |
787 | # CONFIG_CRC_ITU_T is not set | 1184 | # CONFIG_CRC_ITU_T is not set |
788 | # CONFIG_CRC32 is not set | 1185 | CONFIG_CRC32=y |
789 | # CONFIG_CRC7 is not set | 1186 | # CONFIG_CRC7 is not set |
790 | # CONFIG_LIBCRC32C is not set | 1187 | # CONFIG_LIBCRC32C is not set |
1188 | CONFIG_ZLIB_INFLATE=y | ||
1189 | CONFIG_ZLIB_DEFLATE=y | ||
791 | CONFIG_PLIST=y | 1190 | CONFIG_PLIST=y |
792 | CONFIG_HAS_IOMEM=y | 1191 | CONFIG_HAS_IOMEM=y |
793 | CONFIG_HAS_IOPORT=y | 1192 | CONFIG_HAS_IOPORT=y |
@@ -842,6 +1241,46 @@ CONFIG_FORCED_INLINING=y | |||
842 | # CONFIG_KEYS is not set | 1241 | # CONFIG_KEYS is not set |
843 | # CONFIG_SECURITY is not set | 1242 | # CONFIG_SECURITY is not set |
844 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1243 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
845 | # CONFIG_CRYPTO is not set | 1244 | CONFIG_CRYPTO=y |
1245 | CONFIG_CRYPTO_ALGAPI=y | ||
1246 | CONFIG_CRYPTO_BLKCIPHER=y | ||
1247 | CONFIG_CRYPTO_MANAGER=y | ||
1248 | # CONFIG_CRYPTO_HMAC is not set | ||
1249 | # CONFIG_CRYPTO_XCBC is not set | ||
1250 | # CONFIG_CRYPTO_NULL is not set | ||
1251 | # CONFIG_CRYPTO_MD4 is not set | ||
1252 | CONFIG_CRYPTO_MD5=y | ||
1253 | # CONFIG_CRYPTO_SHA1 is not set | ||
1254 | # CONFIG_CRYPTO_SHA256 is not set | ||
1255 | # CONFIG_CRYPTO_SHA512 is not set | ||
1256 | # CONFIG_CRYPTO_WP512 is not set | ||
1257 | # CONFIG_CRYPTO_TGR192 is not set | ||
1258 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1259 | # CONFIG_CRYPTO_ECB is not set | ||
1260 | CONFIG_CRYPTO_CBC=y | ||
1261 | # CONFIG_CRYPTO_PCBC is not set | ||
1262 | # CONFIG_CRYPTO_LRW is not set | ||
1263 | # CONFIG_CRYPTO_XTS is not set | ||
1264 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1265 | CONFIG_CRYPTO_DES=y | ||
1266 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1267 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1268 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1269 | # CONFIG_CRYPTO_SERPENT is not set | ||
1270 | # CONFIG_CRYPTO_AES is not set | ||
1271 | # CONFIG_CRYPTO_CAST5 is not set | ||
1272 | # CONFIG_CRYPTO_CAST6 is not set | ||
1273 | # CONFIG_CRYPTO_TEA is not set | ||
1274 | # CONFIG_CRYPTO_ARC4 is not set | ||
1275 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1276 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1277 | # CONFIG_CRYPTO_SEED is not set | ||
1278 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1279 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1280 | # CONFIG_CRYPTO_CRC32C is not set | ||
1281 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1282 | # CONFIG_CRYPTO_TEST is not set | ||
1283 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1284 | CONFIG_CRYPTO_HW=y | ||
846 | CONFIG_PPC_CLOCK=y | 1285 | CONFIG_PPC_CLOCK=y |
847 | CONFIG_PPC_LIB_RHEAP=y | 1286 | CONFIG_PPC_LIB_RHEAP=y |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index c34986835a4e..11b4f6d9ffce 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -903,6 +903,7 @@ handle_page_fault: | |||
903 | * the PTE insertion | 903 | * the PTE insertion |
904 | */ | 904 | */ |
905 | 12: bl .save_nvgprs | 905 | 12: bl .save_nvgprs |
906 | mr r5,r3 | ||
906 | addi r3,r1,STACK_FRAME_OVERHEAD | 907 | addi r3,r1,STACK_FRAME_OVERHEAD |
907 | ld r4,_DAR(r1) | 908 | ld r4,_DAR(r1) |
908 | bl .low_hash_fault | 909 | bl .low_hash_fault |
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 47c3fe55242f..a3c406aca664 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -278,6 +278,7 @@ int iommu_map_sg(struct iommu_table *tbl, struct scatterlist *sglist, | |||
278 | unsigned long flags; | 278 | unsigned long flags; |
279 | struct scatterlist *s, *outs, *segstart; | 279 | struct scatterlist *s, *outs, *segstart; |
280 | int outcount, incount, i; | 280 | int outcount, incount, i; |
281 | unsigned int align; | ||
281 | unsigned long handle; | 282 | unsigned long handle; |
282 | 283 | ||
283 | BUG_ON(direction == DMA_NONE); | 284 | BUG_ON(direction == DMA_NONE); |
@@ -309,7 +310,12 @@ int iommu_map_sg(struct iommu_table *tbl, struct scatterlist *sglist, | |||
309 | /* Allocate iommu entries for that segment */ | 310 | /* Allocate iommu entries for that segment */ |
310 | vaddr = (unsigned long) sg_virt(s); | 311 | vaddr = (unsigned long) sg_virt(s); |
311 | npages = iommu_num_pages(vaddr, slen); | 312 | npages = iommu_num_pages(vaddr, slen); |
312 | entry = iommu_range_alloc(tbl, npages, &handle, mask >> IOMMU_PAGE_SHIFT, 0); | 313 | align = 0; |
314 | if (IOMMU_PAGE_SHIFT < PAGE_SHIFT && slen >= PAGE_SIZE && | ||
315 | (vaddr & ~PAGE_MASK) == 0) | ||
316 | align = PAGE_SHIFT - IOMMU_PAGE_SHIFT; | ||
317 | entry = iommu_range_alloc(tbl, npages, &handle, | ||
318 | mask >> IOMMU_PAGE_SHIFT, align); | ||
313 | 319 | ||
314 | DBG(" - vaddr: %lx, size: %lx\n", vaddr, slen); | 320 | DBG(" - vaddr: %lx, size: %lx\n", vaddr, slen); |
315 | 321 | ||
@@ -570,7 +576,7 @@ dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, | |||
570 | { | 576 | { |
571 | dma_addr_t dma_handle = DMA_ERROR_CODE; | 577 | dma_addr_t dma_handle = DMA_ERROR_CODE; |
572 | unsigned long uaddr; | 578 | unsigned long uaddr; |
573 | unsigned int npages; | 579 | unsigned int npages, align; |
574 | 580 | ||
575 | BUG_ON(direction == DMA_NONE); | 581 | BUG_ON(direction == DMA_NONE); |
576 | 582 | ||
@@ -578,8 +584,13 @@ dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, | |||
578 | npages = iommu_num_pages(uaddr, size); | 584 | npages = iommu_num_pages(uaddr, size); |
579 | 585 | ||
580 | if (tbl) { | 586 | if (tbl) { |
587 | align = 0; | ||
588 | if (IOMMU_PAGE_SHIFT < PAGE_SHIFT && size >= PAGE_SIZE && | ||
589 | ((unsigned long)vaddr & ~PAGE_MASK) == 0) | ||
590 | align = PAGE_SHIFT - IOMMU_PAGE_SHIFT; | ||
591 | |||
581 | dma_handle = iommu_alloc(tbl, vaddr, npages, direction, | 592 | dma_handle = iommu_alloc(tbl, vaddr, npages, direction, |
582 | mask >> IOMMU_PAGE_SHIFT, 0); | 593 | mask >> IOMMU_PAGE_SHIFT, align); |
583 | if (dma_handle == DMA_ERROR_CODE) { | 594 | if (dma_handle == DMA_ERROR_CODE) { |
584 | if (printk_ratelimit()) { | 595 | if (printk_ratelimit()) { |
585 | printk(KERN_INFO "iommu_alloc failed, " | 596 | printk(KERN_INFO "iommu_alloc failed, " |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 1add6efdb315..5d89a21dd0d6 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -2216,6 +2216,45 @@ static void __init fixup_device_tree_efika(void) | |||
2216 | prom_printf("fixup_device_tree_efika: ", | 2216 | prom_printf("fixup_device_tree_efika: ", |
2217 | "skipped entry %x - setprop error\n", i); | 2217 | "skipped entry %x - setprop error\n", i); |
2218 | } | 2218 | } |
2219 | |||
2220 | /* Make sure ethernet mdio bus node exists */ | ||
2221 | node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio")); | ||
2222 | if (!PHANDLE_VALID(node)) { | ||
2223 | prom_printf("Adding Ethernet MDIO node\n"); | ||
2224 | call_prom("interpret", 1, 1, | ||
2225 | " s\" /builtin\" find-device" | ||
2226 | " new-device" | ||
2227 | " 1 encode-int s\" #address-cells\" property" | ||
2228 | " 0 encode-int s\" #size-cells\" property" | ||
2229 | " s\" mdio\" 2dup device-name device-type" | ||
2230 | " s\" mpc5200b-fec-phy\" encode-string" | ||
2231 | " s\" compatible\" property" | ||
2232 | " 0xf0003000 0x400 reg" | ||
2233 | " 0x2 encode-int" | ||
2234 | " 0x5 encode-int encode+" | ||
2235 | " 0x3 encode-int encode+" | ||
2236 | " s\" interrupts\" property" | ||
2237 | " finish-device"); | ||
2238 | }; | ||
2239 | |||
2240 | /* Make sure ethernet phy device node exist */ | ||
2241 | node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio/ethernet-phy")); | ||
2242 | if (!PHANDLE_VALID(node)) { | ||
2243 | prom_printf("Adding Ethernet PHY node\n"); | ||
2244 | call_prom("interpret", 1, 1, | ||
2245 | " s\" /builtin/mdio\" find-device" | ||
2246 | " new-device" | ||
2247 | " s\" ethernet-phy\" device-name" | ||
2248 | " 0x10 encode-int s\" reg\" property" | ||
2249 | " my-self" | ||
2250 | " ihandle>phandle" | ||
2251 | " finish-device" | ||
2252 | " s\" /builtin/ethernet\" find-device" | ||
2253 | " encode-int" | ||
2254 | " s\" phy-handle\" property" | ||
2255 | " device-end"); | ||
2256 | } | ||
2257 | |||
2219 | } | 2258 | } |
2220 | #else | 2259 | #else |
2221 | #define fixup_device_tree_efika() | 2260 | #define fixup_device_tree_efika() |
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile index 20629ae95c50..41649a5d3602 100644 --- a/arch/powerpc/mm/Makefile +++ b/arch/powerpc/mm/Makefile | |||
@@ -22,3 +22,4 @@ obj-$(CONFIG_FSL_BOOKE) += fsl_booke_mmu.o | |||
22 | obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o | 22 | obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o |
23 | obj-$(CONFIG_PPC_MM_SLICES) += slice.o | 23 | obj-$(CONFIG_PPC_MM_SLICES) += slice.o |
24 | obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o | 24 | obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o |
25 | obj-$(CONFIG_PPC_SUBPAGE_PROT) += subpage-prot.o | ||
diff --git a/arch/powerpc/mm/hash_low_64.S b/arch/powerpc/mm/hash_low_64.S index e935edd6b72b..21d248486479 100644 --- a/arch/powerpc/mm/hash_low_64.S +++ b/arch/powerpc/mm/hash_low_64.S | |||
@@ -331,7 +331,8 @@ htab_pte_insert_failure: | |||
331 | *****************************************************************************/ | 331 | *****************************************************************************/ |
332 | 332 | ||
333 | /* _hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid, | 333 | /* _hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid, |
334 | * pte_t *ptep, unsigned long trap, int local, int ssize) | 334 | * pte_t *ptep, unsigned long trap, int local, int ssize, |
335 | * int subpg_prot) | ||
335 | */ | 336 | */ |
336 | 337 | ||
337 | /* | 338 | /* |
@@ -429,12 +430,19 @@ END_FTR_SECTION_IFSET(CPU_FTR_1T_SEGMENT) | |||
429 | xor r28,r28,r0 /* hash */ | 430 | xor r28,r28,r0 /* hash */ |
430 | 431 | ||
431 | /* Convert linux PTE bits into HW equivalents */ | 432 | /* Convert linux PTE bits into HW equivalents */ |
432 | 4: andi. r3,r30,0x1fe /* Get basic set of flags */ | 433 | 4: |
433 | xori r3,r3,HPTE_R_N /* _PAGE_EXEC -> NOEXEC */ | 434 | #ifdef CONFIG_PPC_SUBPAGE_PROT |
435 | andc r10,r30,r10 | ||
436 | andi. r3,r10,0x1fe /* Get basic set of flags */ | ||
437 | rlwinm r0,r10,32-9+1,30,30 /* _PAGE_RW -> _PAGE_USER (r0) */ | ||
438 | #else | ||
439 | andi. r3,r30,0x1fe /* Get basic set of flags */ | ||
434 | rlwinm r0,r30,32-9+1,30,30 /* _PAGE_RW -> _PAGE_USER (r0) */ | 440 | rlwinm r0,r30,32-9+1,30,30 /* _PAGE_RW -> _PAGE_USER (r0) */ |
441 | #endif | ||
442 | xori r3,r3,HPTE_R_N /* _PAGE_EXEC -> NOEXEC */ | ||
435 | rlwinm r4,r30,32-7+1,30,30 /* _PAGE_DIRTY -> _PAGE_USER (r4) */ | 443 | rlwinm r4,r30,32-7+1,30,30 /* _PAGE_DIRTY -> _PAGE_USER (r4) */ |
436 | and r0,r0,r4 /* _PAGE_RW & _PAGE_DIRTY ->r0 bit 30*/ | 444 | and r0,r0,r4 /* _PAGE_RW & _PAGE_DIRTY ->r0 bit 30*/ |
437 | andc r0,r30,r0 /* r0 = pte & ~r0 */ | 445 | andc r0,r3,r0 /* r0 = pte & ~r0 */ |
438 | rlwimi r3,r0,32-1,31,31 /* Insert result into PP lsb */ | 446 | rlwimi r3,r0,32-1,31,31 /* Insert result into PP lsb */ |
439 | ori r3,r3,HPTE_R_C /* Always add "C" bit for perf. */ | 447 | ori r3,r3,HPTE_R_C /* Always add "C" bit for perf. */ |
440 | 448 | ||
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 9326a6962b42..7b4cacb0d4ba 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -637,7 +637,7 @@ unsigned int hash_page_do_lazy_icache(unsigned int pp, pte_t pte, int trap) | |||
637 | * For now this makes the whole process use 4k pages. | 637 | * For now this makes the whole process use 4k pages. |
638 | */ | 638 | */ |
639 | #ifdef CONFIG_PPC_64K_PAGES | 639 | #ifdef CONFIG_PPC_64K_PAGES |
640 | static void demote_segment_4k(struct mm_struct *mm, unsigned long addr) | 640 | void demote_segment_4k(struct mm_struct *mm, unsigned long addr) |
641 | { | 641 | { |
642 | if (mm->context.user_psize == MMU_PAGE_4K) | 642 | if (mm->context.user_psize == MMU_PAGE_4K) |
643 | return; | 643 | return; |
@@ -645,13 +645,62 @@ static void demote_segment_4k(struct mm_struct *mm, unsigned long addr) | |||
645 | #ifdef CONFIG_SPU_BASE | 645 | #ifdef CONFIG_SPU_BASE |
646 | spu_flush_all_slbs(mm); | 646 | spu_flush_all_slbs(mm); |
647 | #endif | 647 | #endif |
648 | if (get_paca()->context.user_psize != MMU_PAGE_4K) { | ||
649 | get_paca()->context = mm->context; | ||
650 | slb_flush_and_rebolt(); | ||
651 | } | ||
648 | } | 652 | } |
649 | #endif /* CONFIG_PPC_64K_PAGES */ | 653 | #endif /* CONFIG_PPC_64K_PAGES */ |
650 | 654 | ||
655 | #ifdef CONFIG_PPC_SUBPAGE_PROT | ||
656 | /* | ||
657 | * This looks up a 2-bit protection code for a 4k subpage of a 64k page. | ||
658 | * Userspace sets the subpage permissions using the subpage_prot system call. | ||
659 | * | ||
660 | * Result is 0: full permissions, _PAGE_RW: read-only, | ||
661 | * _PAGE_USER or _PAGE_USER|_PAGE_RW: no access. | ||
662 | */ | ||
663 | static int subpage_protection(pgd_t *pgdir, unsigned long ea) | ||
664 | { | ||
665 | struct subpage_prot_table *spt = pgd_subpage_prot(pgdir); | ||
666 | u32 spp = 0; | ||
667 | u32 **sbpm, *sbpp; | ||
668 | |||
669 | if (ea >= spt->maxaddr) | ||
670 | return 0; | ||
671 | if (ea < 0x100000000) { | ||
672 | /* addresses below 4GB use spt->low_prot */ | ||
673 | sbpm = spt->low_prot; | ||
674 | } else { | ||
675 | sbpm = spt->protptrs[ea >> SBP_L3_SHIFT]; | ||
676 | if (!sbpm) | ||
677 | return 0; | ||
678 | } | ||
679 | sbpp = sbpm[(ea >> SBP_L2_SHIFT) & (SBP_L2_COUNT - 1)]; | ||
680 | if (!sbpp) | ||
681 | return 0; | ||
682 | spp = sbpp[(ea >> PAGE_SHIFT) & (SBP_L1_COUNT - 1)]; | ||
683 | |||
684 | /* extract 2-bit bitfield for this 4k subpage */ | ||
685 | spp >>= 30 - 2 * ((ea >> 12) & 0xf); | ||
686 | |||
687 | /* turn 0,1,2,3 into combination of _PAGE_USER and _PAGE_RW */ | ||
688 | spp = ((spp & 2) ? _PAGE_USER : 0) | ((spp & 1) ? _PAGE_RW : 0); | ||
689 | return spp; | ||
690 | } | ||
691 | |||
692 | #else /* CONFIG_PPC_SUBPAGE_PROT */ | ||
693 | static inline int subpage_protection(pgd_t *pgdir, unsigned long ea) | ||
694 | { | ||
695 | return 0; | ||
696 | } | ||
697 | #endif | ||
698 | |||
651 | /* Result code is: | 699 | /* Result code is: |
652 | * 0 - handled | 700 | * 0 - handled |
653 | * 1 - normal page fault | 701 | * 1 - normal page fault |
654 | * -1 - critical hash insertion error | 702 | * -1 - critical hash insertion error |
703 | * -2 - access not permitted by subpage protection mechanism | ||
655 | */ | 704 | */ |
656 | int hash_page(unsigned long ea, unsigned long access, unsigned long trap) | 705 | int hash_page(unsigned long ea, unsigned long access, unsigned long trap) |
657 | { | 706 | { |
@@ -802,7 +851,14 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) | |||
802 | rc = __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize); | 851 | rc = __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize); |
803 | else | 852 | else |
804 | #endif /* CONFIG_PPC_HAS_HASH_64K */ | 853 | #endif /* CONFIG_PPC_HAS_HASH_64K */ |
805 | rc = __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize); | 854 | { |
855 | int spp = subpage_protection(pgdir, ea); | ||
856 | if (access & spp) | ||
857 | rc = -2; | ||
858 | else | ||
859 | rc = __hash_page_4K(ea, access, vsid, ptep, trap, | ||
860 | local, ssize, spp); | ||
861 | } | ||
806 | 862 | ||
807 | #ifndef CONFIG_PPC_64K_PAGES | 863 | #ifndef CONFIG_PPC_64K_PAGES |
808 | DBG_LOW(" o-pte: %016lx\n", pte_val(*ptep)); | 864 | DBG_LOW(" o-pte: %016lx\n", pte_val(*ptep)); |
@@ -874,7 +930,8 @@ void hash_preload(struct mm_struct *mm, unsigned long ea, | |||
874 | __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize); | 930 | __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize); |
875 | else | 931 | else |
876 | #endif /* CONFIG_PPC_HAS_HASH_64K */ | 932 | #endif /* CONFIG_PPC_HAS_HASH_64K */ |
877 | __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize); | 933 | __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize, |
934 | subpage_protection(pgdir, ea)); | ||
878 | 935 | ||
879 | local_irq_restore(flags); | 936 | local_irq_restore(flags); |
880 | } | 937 | } |
@@ -919,19 +976,17 @@ void flush_hash_range(unsigned long number, int local) | |||
919 | * low_hash_fault is called when we the low level hash code failed | 976 | * low_hash_fault is called when we the low level hash code failed |
920 | * to instert a PTE due to an hypervisor error | 977 | * to instert a PTE due to an hypervisor error |
921 | */ | 978 | */ |
922 | void low_hash_fault(struct pt_regs *regs, unsigned long address) | 979 | void low_hash_fault(struct pt_regs *regs, unsigned long address, int rc) |
923 | { | 980 | { |
924 | if (user_mode(regs)) { | 981 | if (user_mode(regs)) { |
925 | siginfo_t info; | 982 | #ifdef CONFIG_PPC_SUBPAGE_PROT |
926 | 983 | if (rc == -2) | |
927 | info.si_signo = SIGBUS; | 984 | _exception(SIGSEGV, regs, SEGV_ACCERR, address); |
928 | info.si_errno = 0; | 985 | else |
929 | info.si_code = BUS_ADRERR; | 986 | #endif |
930 | info.si_addr = (void __user *)address; | 987 | _exception(SIGBUS, regs, BUS_ADRERR, address); |
931 | force_sig_info(SIGBUS, &info, current); | 988 | } else |
932 | return; | 989 | bad_page_fault(regs, address, SIGBUS); |
933 | } | ||
934 | bad_page_fault(regs, address, SIGBUS); | ||
935 | } | 990 | } |
936 | 991 | ||
937 | #ifdef CONFIG_DEBUG_PAGEALLOC | 992 | #ifdef CONFIG_DEBUG_PAGEALLOC |
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index 3cf0802cd2b6..47b06bad24ad 100644 --- a/arch/powerpc/mm/slb.c +++ b/arch/powerpc/mm/slb.c | |||
@@ -295,6 +295,8 @@ void slb_initialize(void) | |||
295 | 295 | ||
296 | create_shadowed_slbe(VMALLOC_START, mmu_kernel_ssize, vflags, 1); | 296 | create_shadowed_slbe(VMALLOC_START, mmu_kernel_ssize, vflags, 1); |
297 | 297 | ||
298 | slb_shadow_clear(2); | ||
299 | |||
298 | /* We don't bolt the stack for the time being - we're in boot, | 300 | /* We don't bolt the stack for the time being - we're in boot, |
299 | * so the stack is in the bolted segment. By the time it goes | 301 | * so the stack is in the bolted segment. By the time it goes |
300 | * elsewhere, we'll call _switch() which will bolt in the new | 302 | * elsewhere, we'll call _switch() which will bolt in the new |
diff --git a/arch/powerpc/mm/subpage-prot.c b/arch/powerpc/mm/subpage-prot.c new file mode 100644 index 000000000000..4cafc0c33d0a --- /dev/null +++ b/arch/powerpc/mm/subpage-prot.c | |||
@@ -0,0 +1,213 @@ | |||
1 | /* | ||
2 | * Copyright 2007-2008 Paul Mackerras, IBM Corp. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | |||
10 | #include <linux/errno.h> | ||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/gfp.h> | ||
13 | #include <linux/slab.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/hugetlb.h> | ||
17 | |||
18 | #include <asm/pgtable.h> | ||
19 | #include <asm/uaccess.h> | ||
20 | #include <asm/tlbflush.h> | ||
21 | |||
22 | /* | ||
23 | * Free all pages allocated for subpage protection maps and pointers. | ||
24 | * Also makes sure that the subpage_prot_table structure is | ||
25 | * reinitialized for the next user. | ||
26 | */ | ||
27 | void subpage_prot_free(pgd_t *pgd) | ||
28 | { | ||
29 | struct subpage_prot_table *spt = pgd_subpage_prot(pgd); | ||
30 | unsigned long i, j, addr; | ||
31 | u32 **p; | ||
32 | |||
33 | for (i = 0; i < 4; ++i) { | ||
34 | if (spt->low_prot[i]) { | ||
35 | free_page((unsigned long)spt->low_prot[i]); | ||
36 | spt->low_prot[i] = NULL; | ||
37 | } | ||
38 | } | ||
39 | addr = 0; | ||
40 | for (i = 0; i < 2; ++i) { | ||
41 | p = spt->protptrs[i]; | ||
42 | if (!p) | ||
43 | continue; | ||
44 | spt->protptrs[i] = NULL; | ||
45 | for (j = 0; j < SBP_L2_COUNT && addr < spt->maxaddr; | ||
46 | ++j, addr += PAGE_SIZE) | ||
47 | if (p[j]) | ||
48 | free_page((unsigned long)p[j]); | ||
49 | free_page((unsigned long)p); | ||
50 | } | ||
51 | spt->maxaddr = 0; | ||
52 | } | ||
53 | |||
54 | static void hpte_flush_range(struct mm_struct *mm, unsigned long addr, | ||
55 | int npages) | ||
56 | { | ||
57 | pgd_t *pgd; | ||
58 | pud_t *pud; | ||
59 | pmd_t *pmd; | ||
60 | pte_t *pte; | ||
61 | spinlock_t *ptl; | ||
62 | |||
63 | pgd = pgd_offset(mm, addr); | ||
64 | if (pgd_none(*pgd)) | ||
65 | return; | ||
66 | pud = pud_offset(pgd, addr); | ||
67 | if (pud_none(*pud)) | ||
68 | return; | ||
69 | pmd = pmd_offset(pud, addr); | ||
70 | if (pmd_none(*pmd)) | ||
71 | return; | ||
72 | pte = pte_offset_map_lock(mm, pmd, addr, &ptl); | ||
73 | arch_enter_lazy_mmu_mode(); | ||
74 | for (; npages > 0; --npages) { | ||
75 | pte_update(mm, addr, pte, 0, 0); | ||
76 | addr += PAGE_SIZE; | ||
77 | ++pte; | ||
78 | } | ||
79 | arch_leave_lazy_mmu_mode(); | ||
80 | pte_unmap_unlock(pte - 1, ptl); | ||
81 | } | ||
82 | |||
83 | /* | ||
84 | * Clear the subpage protection map for an address range, allowing | ||
85 | * all accesses that are allowed by the pte permissions. | ||
86 | */ | ||
87 | static void subpage_prot_clear(unsigned long addr, unsigned long len) | ||
88 | { | ||
89 | struct mm_struct *mm = current->mm; | ||
90 | struct subpage_prot_table *spt = pgd_subpage_prot(mm->pgd); | ||
91 | u32 **spm, *spp; | ||
92 | int i, nw; | ||
93 | unsigned long next, limit; | ||
94 | |||
95 | down_write(&mm->mmap_sem); | ||
96 | limit = addr + len; | ||
97 | if (limit > spt->maxaddr) | ||
98 | limit = spt->maxaddr; | ||
99 | for (; addr < limit; addr = next) { | ||
100 | next = pmd_addr_end(addr, limit); | ||
101 | if (addr < 0x100000000) { | ||
102 | spm = spt->low_prot; | ||
103 | } else { | ||
104 | spm = spt->protptrs[addr >> SBP_L3_SHIFT]; | ||
105 | if (!spm) | ||
106 | continue; | ||
107 | } | ||
108 | spp = spm[(addr >> SBP_L2_SHIFT) & (SBP_L2_COUNT - 1)]; | ||
109 | if (!spp) | ||
110 | continue; | ||
111 | spp += (addr >> PAGE_SHIFT) & (SBP_L1_COUNT - 1); | ||
112 | |||
113 | i = (addr >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); | ||
114 | nw = PTRS_PER_PTE - i; | ||
115 | if (addr + (nw << PAGE_SHIFT) > next) | ||
116 | nw = (next - addr) >> PAGE_SHIFT; | ||
117 | |||
118 | memset(spp, 0, nw * sizeof(u32)); | ||
119 | |||
120 | /* now flush any existing HPTEs for the range */ | ||
121 | hpte_flush_range(mm, addr, nw); | ||
122 | } | ||
123 | up_write(&mm->mmap_sem); | ||
124 | } | ||
125 | |||
126 | /* | ||
127 | * Copy in a subpage protection map for an address range. | ||
128 | * The map has 2 bits per 4k subpage, so 32 bits per 64k page. | ||
129 | * Each 2-bit field is 0 to allow any access, 1 to prevent writes, | ||
130 | * 2 or 3 to prevent all accesses. | ||
131 | * Note that the normal page protections also apply; the subpage | ||
132 | * protection mechanism is an additional constraint, so putting 0 | ||
133 | * in a 2-bit field won't allow writes to a page that is otherwise | ||
134 | * write-protected. | ||
135 | */ | ||
136 | long sys_subpage_prot(unsigned long addr, unsigned long len, u32 __user *map) | ||
137 | { | ||
138 | struct mm_struct *mm = current->mm; | ||
139 | struct subpage_prot_table *spt = pgd_subpage_prot(mm->pgd); | ||
140 | u32 **spm, *spp; | ||
141 | int i, nw; | ||
142 | unsigned long next, limit; | ||
143 | int err; | ||
144 | |||
145 | /* Check parameters */ | ||
146 | if ((addr & ~PAGE_MASK) || (len & ~PAGE_MASK) || | ||
147 | addr >= TASK_SIZE || len >= TASK_SIZE || addr + len > TASK_SIZE) | ||
148 | return -EINVAL; | ||
149 | |||
150 | if (is_hugepage_only_range(mm, addr, len)) | ||
151 | return -EINVAL; | ||
152 | |||
153 | if (!map) { | ||
154 | /* Clear out the protection map for the address range */ | ||
155 | subpage_prot_clear(addr, len); | ||
156 | return 0; | ||
157 | } | ||
158 | |||
159 | if (!access_ok(VERIFY_READ, map, (len >> PAGE_SHIFT) * sizeof(u32))) | ||
160 | return -EFAULT; | ||
161 | |||
162 | down_write(&mm->mmap_sem); | ||
163 | for (limit = addr + len; addr < limit; addr = next) { | ||
164 | next = pmd_addr_end(addr, limit); | ||
165 | err = -ENOMEM; | ||
166 | if (addr < 0x100000000) { | ||
167 | spm = spt->low_prot; | ||
168 | } else { | ||
169 | spm = spt->protptrs[addr >> SBP_L3_SHIFT]; | ||
170 | if (!spm) { | ||
171 | spm = (u32 **)get_zeroed_page(GFP_KERNEL); | ||
172 | if (!spm) | ||
173 | goto out; | ||
174 | spt->protptrs[addr >> SBP_L3_SHIFT] = spm; | ||
175 | } | ||
176 | } | ||
177 | spm += (addr >> SBP_L2_SHIFT) & (SBP_L2_COUNT - 1); | ||
178 | spp = *spm; | ||
179 | if (!spp) { | ||
180 | spp = (u32 *)get_zeroed_page(GFP_KERNEL); | ||
181 | if (!spp) | ||
182 | goto out; | ||
183 | *spm = spp; | ||
184 | } | ||
185 | spp += (addr >> PAGE_SHIFT) & (SBP_L1_COUNT - 1); | ||
186 | |||
187 | local_irq_disable(); | ||
188 | demote_segment_4k(mm, addr); | ||
189 | local_irq_enable(); | ||
190 | |||
191 | i = (addr >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); | ||
192 | nw = PTRS_PER_PTE - i; | ||
193 | if (addr + (nw << PAGE_SHIFT) > next) | ||
194 | nw = (next - addr) >> PAGE_SHIFT; | ||
195 | |||
196 | up_write(&mm->mmap_sem); | ||
197 | err = -EFAULT; | ||
198 | if (__copy_from_user(spp, map, nw * sizeof(u32))) | ||
199 | goto out2; | ||
200 | map += nw; | ||
201 | down_write(&mm->mmap_sem); | ||
202 | |||
203 | /* now flush any existing HPTEs for the range */ | ||
204 | hpte_flush_range(mm, addr, nw); | ||
205 | } | ||
206 | if (limit > spt->maxaddr) | ||
207 | spt->maxaddr = limit; | ||
208 | err = 0; | ||
209 | out: | ||
210 | up_write(&mm->mmap_sem); | ||
211 | out2: | ||
212 | return err; | ||
213 | } | ||
diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig index 2938d4927b83..733a8063d400 100644 --- a/arch/powerpc/platforms/52xx/Kconfig +++ b/arch/powerpc/platforms/52xx/Kconfig | |||
@@ -19,6 +19,28 @@ config PPC_MPC5200_BUGFIX | |||
19 | 19 | ||
20 | It is safe to say 'Y' here | 20 | It is safe to say 'Y' here |
21 | 21 | ||
22 | config PPC_MPC5200_SIMPLE | ||
23 | bool "Generic support for simple MPC5200 based boards" | ||
24 | depends on PPC_MULTIPLATFORM && PPC32 | ||
25 | select PPC_MPC5200 | ||
26 | select DEFAULT_UIMAGE | ||
27 | select WANT_DEVICE_TREE | ||
28 | default n | ||
29 | help | ||
30 | This option enables support for a simple MPC52xx based boards which | ||
31 | do not need a custom platform specific setup. Such boards are | ||
32 | supported assuming the following: | ||
33 | |||
34 | - GPIO pins are configured by the firmware, | ||
35 | - CDM configuration (clocking) is setup correctly by firmware, | ||
36 | - if the 'fsl,has-wdt' property is present in one of the | ||
37 | gpt nodes, then it is safe to use such gpt to reset the board, | ||
38 | - PCI is supported if enabled in the kernel configuration | ||
39 | and if there is a PCI bus node defined in the device tree. | ||
40 | |||
41 | Boards that are compatible with this generic platform support | ||
42 | are: 'tqc,tqm5200', 'promess,motionpro', 'schindler,cm5200'. | ||
43 | |||
22 | config PPC_EFIKA | 44 | config PPC_EFIKA |
23 | bool "bPlan Efika 5k2. MPC5200B based computer" | 45 | bool "bPlan Efika 5k2. MPC5200B based computer" |
24 | depends on PPC_MULTIPLATFORM && PPC32 | 46 | depends on PPC_MULTIPLATFORM && PPC32 |
@@ -31,8 +53,7 @@ config PPC_EFIKA | |||
31 | config PPC_LITE5200 | 53 | config PPC_LITE5200 |
32 | bool "Freescale Lite5200 Eval Board" | 54 | bool "Freescale Lite5200 Eval Board" |
33 | depends on PPC_MULTIPLATFORM && PPC32 | 55 | depends on PPC_MULTIPLATFORM && PPC32 |
34 | select WANT_DEVICE_TREE | ||
35 | select PPC_MPC5200 | 56 | select PPC_MPC5200 |
57 | select DEFAULT_UIMAGE | ||
58 | select WANT_DEVICE_TREE | ||
36 | default n | 59 | default n |
37 | |||
38 | |||
diff --git a/arch/powerpc/platforms/52xx/Makefile b/arch/powerpc/platforms/52xx/Makefile index 307dbc178091..fe1b81bb5224 100644 --- a/arch/powerpc/platforms/52xx/Makefile +++ b/arch/powerpc/platforms/52xx/Makefile | |||
@@ -6,6 +6,7 @@ obj-y += mpc52xx_pic.o mpc52xx_common.o | |||
6 | obj-$(CONFIG_PCI) += mpc52xx_pci.o | 6 | obj-$(CONFIG_PCI) += mpc52xx_pci.o |
7 | endif | 7 | endif |
8 | 8 | ||
9 | obj-$(CONFIG_PPC_MPC5200_SIMPLE) += mpc5200_simple.o | ||
9 | obj-$(CONFIG_PPC_EFIKA) += efika.o | 10 | obj-$(CONFIG_PPC_EFIKA) += efika.o |
10 | obj-$(CONFIG_PPC_LITE5200) += lite5200.o | 11 | obj-$(CONFIG_PPC_LITE5200) += lite5200.o |
11 | 12 | ||
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c index 25d2bfa3d9dc..5a8d190f53e4 100644 --- a/arch/powerpc/platforms/52xx/lite5200.c +++ b/arch/powerpc/platforms/52xx/lite5200.c | |||
@@ -42,10 +42,13 @@ | |||
42 | static void __init | 42 | static void __init |
43 | lite5200_fix_clock_config(void) | 43 | lite5200_fix_clock_config(void) |
44 | { | 44 | { |
45 | struct device_node *np; | ||
45 | struct mpc52xx_cdm __iomem *cdm; | 46 | struct mpc52xx_cdm __iomem *cdm; |
46 | 47 | ||
47 | /* Map zones */ | 48 | /* Map zones */ |
48 | cdm = mpc52xx_find_and_map("mpc5200-cdm"); | 49 | np = of_find_compatible_node(NULL, NULL, "mpc5200-cdm"); |
50 | cdm = of_iomap(np, 0); | ||
51 | of_node_put(np); | ||
49 | if (!cdm) { | 52 | if (!cdm) { |
50 | printk(KERN_ERR "%s() failed; expect abnormal behaviour\n", | 53 | printk(KERN_ERR "%s() failed; expect abnormal behaviour\n", |
51 | __FUNCTION__); | 54 | __FUNCTION__); |
@@ -74,10 +77,13 @@ lite5200_fix_clock_config(void) | |||
74 | static void __init | 77 | static void __init |
75 | lite5200_fix_port_config(void) | 78 | lite5200_fix_port_config(void) |
76 | { | 79 | { |
80 | struct device_node *np; | ||
77 | struct mpc52xx_gpio __iomem *gpio; | 81 | struct mpc52xx_gpio __iomem *gpio; |
78 | u32 port_config; | 82 | u32 port_config; |
79 | 83 | ||
80 | gpio = mpc52xx_find_and_map("mpc5200-gpio"); | 84 | np = of_find_compatible_node(NULL, NULL, "mpc5200-gpio"); |
85 | gpio = of_iomap(np, 0); | ||
86 | of_node_put(np); | ||
81 | if (!gpio) { | 87 | if (!gpio) { |
82 | printk(KERN_ERR "%s() failed. expect abnormal behavior\n", | 88 | printk(KERN_ERR "%s() failed. expect abnormal behavior\n", |
83 | __FUNCTION__); | 89 | __FUNCTION__); |
@@ -131,10 +137,6 @@ static void lite5200_resume_finish(void __iomem *mbar) | |||
131 | 137 | ||
132 | static void __init lite5200_setup_arch(void) | 138 | static void __init lite5200_setup_arch(void) |
133 | { | 139 | { |
134 | #ifdef CONFIG_PCI | ||
135 | struct device_node *np; | ||
136 | #endif | ||
137 | |||
138 | if (ppc_md.progress) | 140 | if (ppc_md.progress) |
139 | ppc_md.progress("lite5200_setup_arch()", 0); | 141 | ppc_md.progress("lite5200_setup_arch()", 0); |
140 | 142 | ||
@@ -154,13 +156,7 @@ static void __init lite5200_setup_arch(void) | |||
154 | lite5200_pm_init(); | 156 | lite5200_pm_init(); |
155 | #endif | 157 | #endif |
156 | 158 | ||
157 | #ifdef CONFIG_PCI | 159 | mpc52xx_setup_pci(); |
158 | np = of_find_node_by_type(NULL, "pci"); | ||
159 | if (np) { | ||
160 | mpc52xx_add_bridge(np); | ||
161 | of_node_put(np); | ||
162 | } | ||
163 | #endif | ||
164 | } | 160 | } |
165 | 161 | ||
166 | /* | 162 | /* |
diff --git a/arch/powerpc/platforms/52xx/lite5200_pm.c b/arch/powerpc/platforms/52xx/lite5200_pm.c index ffa14aff5248..c3ada1e340d2 100644 --- a/arch/powerpc/platforms/52xx/lite5200_pm.c +++ b/arch/powerpc/platforms/52xx/lite5200_pm.c | |||
@@ -42,6 +42,8 @@ static int lite5200_pm_set_target(suspend_state_t state) | |||
42 | 42 | ||
43 | static int lite5200_pm_prepare(void) | 43 | static int lite5200_pm_prepare(void) |
44 | { | 44 | { |
45 | struct device_node *np; | ||
46 | |||
45 | /* deep sleep? let mpc52xx code handle that */ | 47 | /* deep sleep? let mpc52xx code handle that */ |
46 | if (lite5200_pm_target_state == PM_SUSPEND_STANDBY) | 48 | if (lite5200_pm_target_state == PM_SUSPEND_STANDBY) |
47 | return mpc52xx_pm_prepare(); | 49 | return mpc52xx_pm_prepare(); |
@@ -50,7 +52,9 @@ static int lite5200_pm_prepare(void) | |||
50 | return -EINVAL; | 52 | return -EINVAL; |
51 | 53 | ||
52 | /* map registers */ | 54 | /* map registers */ |
53 | mbar = mpc52xx_find_and_map("mpc5200"); | 55 | np = of_find_compatible_node(NULL, NULL, "mpc5200"); |
56 | mbar = of_iomap(np, 0); | ||
57 | of_node_put(np); | ||
54 | if (!mbar) { | 58 | if (!mbar) { |
55 | printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__); | 59 | printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__); |
56 | return -ENOSYS; | 60 | return -ENOSYS; |
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c new file mode 100644 index 000000000000..754aa932f595 --- /dev/null +++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c | |||
@@ -0,0 +1,85 @@ | |||
1 | /* | ||
2 | * Support for 'mpc5200-simple-platform' compatible boards. | ||
3 | * | ||
4 | * Written by Marian Balakowicz <m8@semihalf.com> | ||
5 | * Copyright (C) 2007 Semihalf | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | * Description: | ||
13 | * This code implements support for a simple MPC52xx based boards which | ||
14 | * do not need a custom platform specific setup. Such boards are | ||
15 | * supported assuming the following: | ||
16 | * | ||
17 | * - GPIO pins are configured by the firmware, | ||
18 | * - CDM configuration (clocking) is setup correctly by firmware, | ||
19 | * - if the 'fsl,has-wdt' property is present in one of the | ||
20 | * gpt nodes, then it is safe to use such gpt to reset the board, | ||
21 | * - PCI is supported if enabled in the kernel configuration | ||
22 | * and if there is a PCI bus node defined in the device tree. | ||
23 | * | ||
24 | * Boards that are compatible with this generic platform support | ||
25 | * are listed in a 'board' table. | ||
26 | */ | ||
27 | |||
28 | #undef DEBUG | ||
29 | #include <asm/time.h> | ||
30 | #include <asm/prom.h> | ||
31 | #include <asm/machdep.h> | ||
32 | #include <asm/mpc52xx.h> | ||
33 | |||
34 | /* | ||
35 | * Setup the architecture | ||
36 | */ | ||
37 | static void __init mpc5200_simple_setup_arch(void) | ||
38 | { | ||
39 | if (ppc_md.progress) | ||
40 | ppc_md.progress("mpc5200_simple_setup_arch()", 0); | ||
41 | |||
42 | /* Some mpc5200 & mpc5200b related configuration */ | ||
43 | mpc5200_setup_xlb_arbiter(); | ||
44 | |||
45 | /* Map wdt for mpc52xx_restart() */ | ||
46 | mpc52xx_map_wdt(); | ||
47 | |||
48 | mpc52xx_setup_pci(); | ||
49 | } | ||
50 | |||
51 | /* list of the supported boards */ | ||
52 | static char *board[] __initdata = { | ||
53 | "promess,motionpro", | ||
54 | "schindler,cm5200", | ||
55 | "tqc,tqm5200", | ||
56 | NULL | ||
57 | }; | ||
58 | |||
59 | /* | ||
60 | * Called very early, MMU is off, device-tree isn't unflattened | ||
61 | */ | ||
62 | static int __init mpc5200_simple_probe(void) | ||
63 | { | ||
64 | unsigned long node = of_get_flat_dt_root(); | ||
65 | int i = 0; | ||
66 | |||
67 | while (board[i]) { | ||
68 | if (of_flat_dt_is_compatible(node, board[i])) | ||
69 | break; | ||
70 | i++; | ||
71 | } | ||
72 | |||
73 | return (board[i] != NULL); | ||
74 | } | ||
75 | |||
76 | define_machine(mpc5200_simple_platform) { | ||
77 | .name = "mpc5200-simple-platform", | ||
78 | .probe = mpc5200_simple_probe, | ||
79 | .setup_arch = mpc5200_simple_setup_arch, | ||
80 | .init = mpc52xx_declare_of_platform_devices, | ||
81 | .init_IRQ = mpc52xx_init_irq, | ||
82 | .get_irq = mpc52xx_get_irq, | ||
83 | .restart = mpc52xx_restart, | ||
84 | .calibrate_decr = generic_calibrate_decr, | ||
85 | }; | ||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c index 9850685c5429..66955937be2a 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_common.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c | |||
@@ -26,45 +26,6 @@ | |||
26 | */ | 26 | */ |
27 | static volatile struct mpc52xx_gpt *mpc52xx_wdt = NULL; | 27 | static volatile struct mpc52xx_gpt *mpc52xx_wdt = NULL; |
28 | 28 | ||
29 | static void __iomem * | ||
30 | mpc52xx_map_node(struct device_node *ofn) | ||
31 | { | ||
32 | const u32 *regaddr_p; | ||
33 | u64 regaddr64, size64; | ||
34 | |||
35 | if (!ofn) | ||
36 | return NULL; | ||
37 | |||
38 | regaddr_p = of_get_address(ofn, 0, &size64, NULL); | ||
39 | if (!regaddr_p) { | ||
40 | of_node_put(ofn); | ||
41 | return NULL; | ||
42 | } | ||
43 | |||
44 | regaddr64 = of_translate_address(ofn, regaddr_p); | ||
45 | |||
46 | of_node_put(ofn); | ||
47 | |||
48 | return ioremap((u32)regaddr64, (u32)size64); | ||
49 | } | ||
50 | |||
51 | void __iomem * | ||
52 | mpc52xx_find_and_map(const char *compatible) | ||
53 | { | ||
54 | return mpc52xx_map_node( | ||
55 | of_find_compatible_node(NULL, NULL, compatible)); | ||
56 | } | ||
57 | |||
58 | EXPORT_SYMBOL(mpc52xx_find_and_map); | ||
59 | |||
60 | void __iomem * | ||
61 | mpc52xx_find_and_map_path(const char *path) | ||
62 | { | ||
63 | return mpc52xx_map_node(of_find_node_by_path(path)); | ||
64 | } | ||
65 | |||
66 | EXPORT_SYMBOL(mpc52xx_find_and_map_path); | ||
67 | |||
68 | /** | 29 | /** |
69 | * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device | 30 | * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device |
70 | * @node: device node | 31 | * @node: device node |
@@ -101,9 +62,12 @@ EXPORT_SYMBOL(mpc52xx_find_ipb_freq); | |||
101 | void __init | 62 | void __init |
102 | mpc5200_setup_xlb_arbiter(void) | 63 | mpc5200_setup_xlb_arbiter(void) |
103 | { | 64 | { |
65 | struct device_node *np; | ||
104 | struct mpc52xx_xlb __iomem *xlb; | 66 | struct mpc52xx_xlb __iomem *xlb; |
105 | 67 | ||
106 | xlb = mpc52xx_find_and_map("mpc5200-xlb"); | 68 | np = of_find_compatible_node(NULL, NULL, "mpc5200-xlb"); |
69 | xlb = of_iomap(np, 0); | ||
70 | of_node_put(np); | ||
107 | if (!xlb) { | 71 | if (!xlb) { |
108 | printk(KERN_ERR __FILE__ ": " | 72 | printk(KERN_ERR __FILE__ ": " |
109 | "Error mapping XLB in mpc52xx_setup_cpu(). " | 73 | "Error mapping XLB in mpc52xx_setup_cpu(). " |
@@ -124,11 +88,21 @@ mpc5200_setup_xlb_arbiter(void) | |||
124 | iounmap(xlb); | 88 | iounmap(xlb); |
125 | } | 89 | } |
126 | 90 | ||
91 | static struct of_device_id mpc52xx_bus_ids[] __initdata= { | ||
92 | { .compatible = "fsl,mpc5200-immr", }, | ||
93 | { .compatible = "fsl,lpb", }, | ||
94 | |||
95 | /* depreciated matches; shouldn't be used in new device trees */ | ||
96 | { .type = "builtin", .compatible = "mpc5200", }, /* efika */ | ||
97 | { .type = "soc", .compatible = "mpc5200", }, /* lite5200 */ | ||
98 | {}, | ||
99 | }; | ||
100 | |||
127 | void __init | 101 | void __init |
128 | mpc52xx_declare_of_platform_devices(void) | 102 | mpc52xx_declare_of_platform_devices(void) |
129 | { | 103 | { |
130 | /* Find every child of the SOC node and add it to of_platform */ | 104 | /* Find every child of the SOC node and add it to of_platform */ |
131 | if (of_platform_bus_probe(NULL, NULL, NULL)) | 105 | if (of_platform_bus_probe(NULL, mpc52xx_bus_ids, NULL)) |
132 | printk(KERN_ERR __FILE__ ": " | 106 | printk(KERN_ERR __FILE__ ": " |
133 | "Error while probing of_platform bus\n"); | 107 | "Error while probing of_platform bus\n"); |
134 | } | 108 | } |
@@ -146,16 +120,19 @@ mpc52xx_map_wdt(void) | |||
146 | for_each_compatible_node(np, NULL, "fsl,mpc5200-gpt") { | 120 | for_each_compatible_node(np, NULL, "fsl,mpc5200-gpt") { |
147 | has_wdt = of_get_property(np, "fsl,has-wdt", NULL); | 121 | has_wdt = of_get_property(np, "fsl,has-wdt", NULL); |
148 | if (has_wdt) { | 122 | if (has_wdt) { |
149 | mpc52xx_wdt = mpc52xx_map_node(np); | 123 | mpc52xx_wdt = of_iomap(np, 0); |
124 | of_node_put(np); | ||
150 | return; | 125 | return; |
151 | } | 126 | } |
152 | } | 127 | } |
153 | for_each_compatible_node(np, NULL, "mpc5200-gpt") { | 128 | for_each_compatible_node(np, NULL, "mpc5200-gpt") { |
154 | has_wdt = of_get_property(np, "has-wdt", NULL); | 129 | has_wdt = of_get_property(np, "has-wdt", NULL); |
155 | if (has_wdt) { | 130 | if (has_wdt) { |
156 | mpc52xx_wdt = mpc52xx_map_node(np); | 131 | mpc52xx_wdt = of_iomap(np, 0); |
132 | of_node_put(np); | ||
157 | return; | 133 | return; |
158 | } | 134 | } |
135 | |||
159 | } | 136 | } |
160 | } | 137 | } |
161 | 138 | ||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c index 262eda8659d0..4b79398b2e40 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c | |||
@@ -406,3 +406,17 @@ mpc52xx_add_bridge(struct device_node *node) | |||
406 | 406 | ||
407 | return 0; | 407 | return 0; |
408 | } | 408 | } |
409 | |||
410 | void __init mpc52xx_setup_pci(void) | ||
411 | { | ||
412 | struct device_node *pci; | ||
413 | |||
414 | pci = of_find_compatible_node(NULL, NULL, "fsl,mpc5200-pci"); | ||
415 | if (!pci) | ||
416 | pci = of_find_compatible_node(NULL, NULL, "mpc5200-pci"); | ||
417 | if (!pci) | ||
418 | return; | ||
419 | |||
420 | mpc52xx_add_bridge(pci); | ||
421 | of_node_put(pci); | ||
422 | } | ||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c index 61100f270c68..07e89876d582 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c | |||
@@ -364,16 +364,18 @@ void __init mpc52xx_init_irq(void) | |||
364 | { | 364 | { |
365 | u32 intr_ctrl; | 365 | u32 intr_ctrl; |
366 | struct device_node *picnode; | 366 | struct device_node *picnode; |
367 | struct device_node *np; | ||
367 | 368 | ||
368 | /* Remap the necessary zones */ | 369 | /* Remap the necessary zones */ |
369 | picnode = of_find_compatible_node(NULL, NULL, "mpc5200-pic"); | 370 | picnode = of_find_compatible_node(NULL, NULL, "mpc5200-pic"); |
370 | 371 | intr = of_iomap(picnode, 0); | |
371 | intr = mpc52xx_find_and_map("mpc5200-pic"); | ||
372 | if (!intr) | 372 | if (!intr) |
373 | panic(__FILE__ ": find_and_map failed on 'mpc5200-pic'. " | 373 | panic(__FILE__ ": find_and_map failed on 'mpc5200-pic'. " |
374 | "Check node !"); | 374 | "Check node !"); |
375 | 375 | ||
376 | sdma = mpc52xx_find_and_map("mpc5200-bestcomm"); | 376 | np = of_find_compatible_node(NULL, NULL, "mpc5200-bestcomm"); |
377 | sdma = of_iomap(np, 0); | ||
378 | of_node_put(np); | ||
377 | if (!sdma) | 379 | if (!sdma) |
378 | panic(__FILE__ ": find_and_map failed on 'mpc5200-bestcomm'. " | 380 | panic(__FILE__ ": find_and_map failed on 'mpc5200-bestcomm'. " |
379 | "Check node !"); | 381 | "Check node !"); |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pm.c b/arch/powerpc/platforms/52xx/mpc52xx_pm.c index 7ffa7babf254..52f027789c8f 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pm.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pm.c | |||
@@ -59,10 +59,14 @@ int mpc52xx_set_wakeup_gpio(u8 pin, u8 level) | |||
59 | 59 | ||
60 | int mpc52xx_pm_prepare(void) | 60 | int mpc52xx_pm_prepare(void) |
61 | { | 61 | { |
62 | struct device_node *np; | ||
63 | |||
62 | /* map the whole register space */ | 64 | /* map the whole register space */ |
63 | mbar = mpc52xx_find_and_map("mpc5200"); | 65 | np = of_find_compatible_node(NULL, NULL, "mpc5200"); |
66 | mbar = of_iomap(np, 0); | ||
67 | of_node_put(np); | ||
64 | if (!mbar) { | 68 | if (!mbar) { |
65 | printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__); | 69 | pr_err("mpc52xx_pm_prepare(): could not map registers\n"); |
66 | return -ENOSYS; | 70 | return -ENOSYS; |
67 | } | 71 | } |
68 | /* these offsets are from mpc5200 users manual */ | 72 | /* these offsets are from mpc5200 users manual */ |
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig index e1e2f6a43019..3a963b4a9be0 100644 --- a/arch/powerpc/platforms/cell/Kconfig +++ b/arch/powerpc/platforms/cell/Kconfig | |||
@@ -88,3 +88,8 @@ config CBE_CPUFREQ_PMI | |||
88 | but also at lower core voltage. | 88 | but also at lower core voltage. |
89 | 89 | ||
90 | endmenu | 90 | endmenu |
91 | |||
92 | config OPROFILE_CELL | ||
93 | def_bool y | ||
94 | depends on PPC_CELL_NATIVE && (OPROFILE = m || OPROFILE = y) | ||
95 | |||
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile index 3cd565a04d0a..c89964c6fb1f 100644 --- a/arch/powerpc/platforms/cell/Makefile +++ b/arch/powerpc/platforms/cell/Makefile | |||
@@ -19,6 +19,7 @@ spu-manage-$(CONFIG_PPC_CELLEB) += spu_manage.o | |||
19 | spu-manage-$(CONFIG_PPC_CELL_NATIVE) += spu_manage.o | 19 | spu-manage-$(CONFIG_PPC_CELL_NATIVE) += spu_manage.o |
20 | 20 | ||
21 | obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \ | 21 | obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \ |
22 | spu_notify.o \ | ||
22 | spu_syscalls.o spu_fault.o \ | 23 | spu_syscalls.o spu_fault.o \ |
23 | $(spu-priv1-y) \ | 24 | $(spu-priv1-y) \ |
24 | $(spu-manage-y) \ | 25 | $(spu-manage-y) \ |
diff --git a/arch/powerpc/platforms/cell/spu_notify.c b/arch/powerpc/platforms/cell/spu_notify.c new file mode 100644 index 000000000000..34d156959f39 --- /dev/null +++ b/arch/powerpc/platforms/cell/spu_notify.c | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | * Move OProfile dependencies from spufs module to the kernel so it | ||
3 | * can run on non-cell PPC. | ||
4 | * | ||
5 | * Copyright (C) IBM 2005 | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2, or (at your option) | ||
10 | * any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | */ | ||
21 | |||
22 | #undef DEBUG | ||
23 | |||
24 | #include <linux/module.h> | ||
25 | #include <asm/spu.h> | ||
26 | #include "spufs/spufs.h" | ||
27 | |||
28 | static BLOCKING_NOTIFIER_HEAD(spu_switch_notifier); | ||
29 | |||
30 | void spu_switch_notify(struct spu *spu, struct spu_context *ctx) | ||
31 | { | ||
32 | blocking_notifier_call_chain(&spu_switch_notifier, | ||
33 | ctx ? ctx->object_id : 0, spu); | ||
34 | } | ||
35 | EXPORT_SYMBOL_GPL(spu_switch_notify); | ||
36 | |||
37 | int spu_switch_event_register(struct notifier_block *n) | ||
38 | { | ||
39 | int ret; | ||
40 | ret = blocking_notifier_chain_register(&spu_switch_notifier, n); | ||
41 | if (!ret) | ||
42 | notify_spus_active(); | ||
43 | return ret; | ||
44 | } | ||
45 | EXPORT_SYMBOL_GPL(spu_switch_event_register); | ||
46 | |||
47 | int spu_switch_event_unregister(struct notifier_block *n) | ||
48 | { | ||
49 | return blocking_notifier_chain_unregister(&spu_switch_notifier, n); | ||
50 | } | ||
51 | EXPORT_SYMBOL_GPL(spu_switch_event_unregister); | ||
52 | |||
53 | void spu_set_profile_private_kref(struct spu_context *ctx, | ||
54 | struct kref *prof_info_kref, | ||
55 | void (* prof_info_release) (struct kref *kref)) | ||
56 | { | ||
57 | ctx->prof_priv_kref = prof_info_kref; | ||
58 | ctx->prof_priv_release = prof_info_release; | ||
59 | } | ||
60 | EXPORT_SYMBOL_GPL(spu_set_profile_private_kref); | ||
61 | |||
62 | void *spu_get_profile_private_kref(struct spu_context *ctx) | ||
63 | { | ||
64 | return ctx->prof_priv_kref; | ||
65 | } | ||
66 | EXPORT_SYMBOL_GPL(spu_get_profile_private_kref); | ||
67 | |||
diff --git a/arch/powerpc/platforms/cell/spu_syscalls.c b/arch/powerpc/platforms/cell/spu_syscalls.c index a9438b719fe8..75530d99eda6 100644 --- a/arch/powerpc/platforms/cell/spu_syscalls.c +++ b/arch/powerpc/platforms/cell/spu_syscalls.c | |||
@@ -145,6 +145,20 @@ int elf_coredump_extra_notes_write(struct file *file, loff_t *foffset) | |||
145 | return ret; | 145 | return ret; |
146 | } | 146 | } |
147 | 147 | ||
148 | void notify_spus_active(void) | ||
149 | { | ||
150 | struct spufs_calls *calls; | ||
151 | |||
152 | calls = spufs_calls_get(); | ||
153 | if (!calls) | ||
154 | return; | ||
155 | |||
156 | calls->notify_spus_active(); | ||
157 | spufs_calls_put(calls); | ||
158 | |||
159 | return; | ||
160 | } | ||
161 | |||
148 | int register_spu_syscalls(struct spufs_calls *calls) | 162 | int register_spu_syscalls(struct spufs_calls *calls) |
149 | { | 163 | { |
150 | if (spufs_calls) | 164 | if (spufs_calls) |
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index 237e152d31dc..133995ed5cc7 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c | |||
@@ -177,19 +177,3 @@ void spu_release_saved(struct spu_context *ctx) | |||
177 | spu_release(ctx); | 177 | spu_release(ctx); |
178 | } | 178 | } |
179 | 179 | ||
180 | void spu_set_profile_private_kref(struct spu_context *ctx, | ||
181 | struct kref *prof_info_kref, | ||
182 | void ( * prof_info_release) (struct kref *kref)) | ||
183 | { | ||
184 | ctx->prof_priv_kref = prof_info_kref; | ||
185 | ctx->prof_priv_release = prof_info_release; | ||
186 | } | ||
187 | EXPORT_SYMBOL_GPL(spu_set_profile_private_kref); | ||
188 | |||
189 | void *spu_get_profile_private_kref(struct spu_context *ctx) | ||
190 | { | ||
191 | return ctx->prof_priv_kref; | ||
192 | } | ||
193 | EXPORT_SYMBOL_GPL(spu_get_profile_private_kref); | ||
194 | |||
195 | |||
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 8c8af11b35b4..00d914232af1 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -182,15 +182,7 @@ static int node_allowed(struct spu_context *ctx, int node) | |||
182 | return rval; | 182 | return rval; |
183 | } | 183 | } |
184 | 184 | ||
185 | static BLOCKING_NOTIFIER_HEAD(spu_switch_notifier); | 185 | void do_notify_spus_active(void) |
186 | |||
187 | void spu_switch_notify(struct spu *spu, struct spu_context *ctx) | ||
188 | { | ||
189 | blocking_notifier_call_chain(&spu_switch_notifier, | ||
190 | ctx ? ctx->object_id : 0, spu); | ||
191 | } | ||
192 | |||
193 | static void notify_spus_active(void) | ||
194 | { | 186 | { |
195 | int node; | 187 | int node; |
196 | 188 | ||
@@ -217,22 +209,6 @@ static void notify_spus_active(void) | |||
217 | } | 209 | } |
218 | } | 210 | } |
219 | 211 | ||
220 | int spu_switch_event_register(struct notifier_block * n) | ||
221 | { | ||
222 | int ret; | ||
223 | ret = blocking_notifier_chain_register(&spu_switch_notifier, n); | ||
224 | if (!ret) | ||
225 | notify_spus_active(); | ||
226 | return ret; | ||
227 | } | ||
228 | EXPORT_SYMBOL_GPL(spu_switch_event_register); | ||
229 | |||
230 | int spu_switch_event_unregister(struct notifier_block * n) | ||
231 | { | ||
232 | return blocking_notifier_chain_unregister(&spu_switch_notifier, n); | ||
233 | } | ||
234 | EXPORT_SYMBOL_GPL(spu_switch_event_unregister); | ||
235 | |||
236 | /** | 212 | /** |
237 | * spu_bind_context - bind spu context to physical spu | 213 | * spu_bind_context - bind spu context to physical spu |
238 | * @spu: physical spu to bind to | 214 | * @spu: physical spu to bind to |
diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c index 2c34f7170190..430404413178 100644 --- a/arch/powerpc/platforms/cell/spufs/syscalls.c +++ b/arch/powerpc/platforms/cell/spufs/syscalls.c | |||
@@ -86,5 +86,6 @@ struct spufs_calls spufs_calls = { | |||
86 | .spu_run = do_spu_run, | 86 | .spu_run = do_spu_run, |
87 | .coredump_extra_notes_size = spufs_coredump_extra_notes_size, | 87 | .coredump_extra_notes_size = spufs_coredump_extra_notes_size, |
88 | .coredump_extra_notes_write = spufs_coredump_extra_notes_write, | 88 | .coredump_extra_notes_write = spufs_coredump_extra_notes_write, |
89 | .notify_spus_active = do_notify_spus_active, | ||
89 | .owner = THIS_MODULE, | 90 | .owner = THIS_MODULE, |
90 | }; | 91 | }; |
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c index 766685ab26f8..b9ea09d9d2fb 100644 --- a/arch/powerpc/platforms/ps3/os-area.c +++ b/arch/powerpc/platforms/ps3/os-area.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/workqueue.h> | 23 | #include <linux/workqueue.h> |
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/syscalls.h> | 25 | #include <linux/syscalls.h> |
26 | #include <linux/ctype.h> | ||
26 | 27 | ||
27 | #include <asm/lmb.h> | 28 | #include <asm/lmb.h> |
28 | 29 | ||
@@ -37,6 +38,8 @@ enum os_area_ldr_format { | |||
37 | HEADER_LDR_FORMAT_GZIP = 1, | 38 | HEADER_LDR_FORMAT_GZIP = 1, |
38 | }; | 39 | }; |
39 | 40 | ||
41 | #define OS_AREA_HEADER_MAGIC_NUM "cell_ext_os_area" | ||
42 | |||
40 | /** | 43 | /** |
41 | * struct os_area_header - os area header segment. | 44 | * struct os_area_header - os area header segment. |
42 | * @magic_num: Always 'cell_ext_os_area'. | 45 | * @magic_num: Always 'cell_ext_os_area'. |
@@ -114,13 +117,11 @@ struct os_area_params { | |||
114 | u8 _reserved_5[8]; | 117 | u8 _reserved_5[8]; |
115 | }; | 118 | }; |
116 | 119 | ||
117 | enum { | 120 | #define OS_AREA_DB_MAGIC_NUM "-db-" |
118 | OS_AREA_DB_MAGIC_NUM = 0x2d64622dU, | ||
119 | }; | ||
120 | 121 | ||
121 | /** | 122 | /** |
122 | * struct os_area_db - Shared flash memory database. | 123 | * struct os_area_db - Shared flash memory database. |
123 | * @magic_num: Always '-db-' = 0x2d64622d. | 124 | * @magic_num: Always '-db-'. |
124 | * @version: os_area_db format version number. | 125 | * @version: os_area_db format version number. |
125 | * @index_64: byte offset of the database id index for 64 bit variables. | 126 | * @index_64: byte offset of the database id index for 64 bit variables. |
126 | * @count_64: number of usable 64 bit index entries | 127 | * @count_64: number of usable 64 bit index entries |
@@ -135,7 +136,7 @@ enum { | |||
135 | */ | 136 | */ |
136 | 137 | ||
137 | struct os_area_db { | 138 | struct os_area_db { |
138 | u32 magic_num; | 139 | u8 magic_num[4]; |
139 | u16 version; | 140 | u16 version; |
140 | u16 _reserved_1; | 141 | u16 _reserved_1; |
141 | u16 index_64; | 142 | u16 index_64; |
@@ -265,12 +266,26 @@ static void __init os_area_get_property(struct device_node *node, | |||
265 | prop->name); | 266 | prop->name); |
266 | } | 267 | } |
267 | 268 | ||
269 | static void dump_field(char *s, const u8 *field, int size_of_field) | ||
270 | { | ||
271 | #if defined(DEBUG) | ||
272 | int i; | ||
273 | |||
274 | for (i = 0; i < size_of_field; i++) | ||
275 | s[i] = isprint(field[i]) ? field[i] : '.'; | ||
276 | s[i] = 0; | ||
277 | #endif | ||
278 | } | ||
279 | |||
268 | #define dump_header(_a) _dump_header(_a, __func__, __LINE__) | 280 | #define dump_header(_a) _dump_header(_a, __func__, __LINE__) |
269 | static void _dump_header(const struct os_area_header *h, const char *func, | 281 | static void _dump_header(const struct os_area_header *h, const char *func, |
270 | int line) | 282 | int line) |
271 | { | 283 | { |
284 | char str[sizeof(h->magic_num) + 1]; | ||
285 | |||
286 | dump_field(str, h->magic_num, sizeof(h->magic_num)); | ||
272 | pr_debug("%s:%d: h.magic_num: '%s'\n", func, line, | 287 | pr_debug("%s:%d: h.magic_num: '%s'\n", func, line, |
273 | h->magic_num); | 288 | str); |
274 | pr_debug("%s:%d: h.hdr_version: %u\n", func, line, | 289 | pr_debug("%s:%d: h.hdr_version: %u\n", func, line, |
275 | h->hdr_version); | 290 | h->hdr_version); |
276 | pr_debug("%s:%d: h.db_area_offset: %u\n", func, line, | 291 | pr_debug("%s:%d: h.db_area_offset: %u\n", func, line, |
@@ -311,7 +326,8 @@ static void _dump_params(const struct os_area_params *p, const char *func, | |||
311 | 326 | ||
312 | static int verify_header(const struct os_area_header *header) | 327 | static int verify_header(const struct os_area_header *header) |
313 | { | 328 | { |
314 | if (memcmp(header->magic_num, "cell_ext_os_area", 16)) { | 329 | if (memcmp(header->magic_num, OS_AREA_HEADER_MAGIC_NUM, |
330 | sizeof(header->magic_num))) { | ||
315 | pr_debug("%s:%d magic_num failed\n", __func__, __LINE__); | 331 | pr_debug("%s:%d magic_num failed\n", __func__, __LINE__); |
316 | return -1; | 332 | return -1; |
317 | } | 333 | } |
@@ -331,7 +347,8 @@ static int verify_header(const struct os_area_header *header) | |||
331 | 347 | ||
332 | static int db_verify(const struct os_area_db *db) | 348 | static int db_verify(const struct os_area_db *db) |
333 | { | 349 | { |
334 | if (db->magic_num != OS_AREA_DB_MAGIC_NUM) { | 350 | if (memcmp(db->magic_num, OS_AREA_DB_MAGIC_NUM, |
351 | sizeof(db->magic_num))) { | ||
335 | pr_debug("%s:%d magic_num failed\n", __func__, __LINE__); | 352 | pr_debug("%s:%d magic_num failed\n", __func__, __LINE__); |
336 | return -1; | 353 | return -1; |
337 | } | 354 | } |
@@ -484,8 +501,11 @@ static int db_get_rtc_diff(const struct os_area_db *db, int64_t *rtc_diff) | |||
484 | static void _dump_db(const struct os_area_db *db, const char *func, | 501 | static void _dump_db(const struct os_area_db *db, const char *func, |
485 | int line) | 502 | int line) |
486 | { | 503 | { |
504 | char str[sizeof(db->magic_num) + 1]; | ||
505 | |||
506 | dump_field(str, db->magic_num, sizeof(db->magic_num)); | ||
487 | pr_debug("%s:%d: db.magic_num: '%s'\n", func, line, | 507 | pr_debug("%s:%d: db.magic_num: '%s'\n", func, line, |
488 | (const char*)&db->magic_num); | 508 | str); |
489 | pr_debug("%s:%d: db.version: %u\n", func, line, | 509 | pr_debug("%s:%d: db.version: %u\n", func, line, |
490 | db->version); | 510 | db->version); |
491 | pr_debug("%s:%d: db.index_64: %u\n", func, line, | 511 | pr_debug("%s:%d: db.index_64: %u\n", func, line, |
@@ -516,7 +536,7 @@ static void os_area_db_init(struct os_area_db *db) | |||
516 | 536 | ||
517 | memset(db, 0, sizeof(struct os_area_db)); | 537 | memset(db, 0, sizeof(struct os_area_db)); |
518 | 538 | ||
519 | db->magic_num = OS_AREA_DB_MAGIC_NUM; | 539 | memcpy(db->magic_num, OS_AREA_DB_MAGIC_NUM, sizeof(db->magic_num)); |
520 | db->version = 1; | 540 | db->version = 1; |
521 | db->index_64 = HEADER_SIZE; | 541 | db->index_64 = HEADER_SIZE; |
522 | db->count_64 = VALUES_64_COUNT; | 542 | db->count_64 = VALUES_64_COUNT; |
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index fc48b96c81bf..412e6b42986f 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/vdso_datapage.h> | 29 | #include <asm/vdso_datapage.h> |
30 | #include <asm/pSeries_reconfig.h> | 30 | #include <asm/pSeries_reconfig.h> |
31 | #include "xics.h" | 31 | #include "xics.h" |
32 | #include "plpar_wrappers.h" | ||
32 | 33 | ||
33 | /* This version can't take the spinlock, because it never returns */ | 34 | /* This version can't take the spinlock, because it never returns */ |
34 | static struct rtas_args rtas_stop_self_args = { | 35 | static struct rtas_args rtas_stop_self_args = { |
@@ -58,6 +59,7 @@ static void pseries_mach_cpu_die(void) | |||
58 | local_irq_disable(); | 59 | local_irq_disable(); |
59 | idle_task_exit(); | 60 | idle_task_exit(); |
60 | xics_teardown_cpu(0); | 61 | xics_teardown_cpu(0); |
62 | unregister_slb_shadow(hard_smp_processor_id(), __pa(get_slb_shadow())); | ||
61 | rtas_stop_self(); | 63 | rtas_stop_self(); |
62 | /* Should never get here... */ | 64 | /* Should never get here... */ |
63 | BUG(); | 65 | BUG(); |
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c index fe562db475e9..7452269bba2a 100644 --- a/arch/sparc/kernel/ptrace.c +++ b/arch/sparc/kernel/ptrace.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * Based upon code written by Ross Biro, Linus Torvalds, Bob Manson, | 5 | * Based upon code written by Ross Biro, Linus Torvalds, Bob Manson, |
6 | * and David Mosberger. | 6 | * and David Mosberger. |
7 | * | 7 | * |
8 | * Added Linux support -miguel (weird, eh?, the orignal code was meant | 8 | * Added Linux support -miguel (weird, eh?, the original code was meant |
9 | * to emulate SunOS). | 9 | * to emulate SunOS). |
10 | */ | 10 | */ |
11 | 11 | ||
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c index 45cb7c5286d7..00b393c3a4a0 100644 --- a/arch/sparc/kernel/time.c +++ b/arch/sparc/kernel/time.c | |||
@@ -436,7 +436,14 @@ void __init time_init(void) | |||
436 | 436 | ||
437 | static inline unsigned long do_gettimeoffset(void) | 437 | static inline unsigned long do_gettimeoffset(void) |
438 | { | 438 | { |
439 | return (*master_l10_counter >> 10) & 0x1fffff; | 439 | unsigned long val = *master_l10_counter; |
440 | unsigned long usec = (val >> 10) & 0x1fffff; | ||
441 | |||
442 | /* Limit hit? */ | ||
443 | if (val & 0x80000000) | ||
444 | usec += 1000000 / HZ; | ||
445 | |||
446 | return usec; | ||
440 | } | 447 | } |
441 | 448 | ||
442 | /* Ok, my cute asm atomicity trick doesn't work anymore. | 449 | /* Ok, my cute asm atomicity trick doesn't work anymore. |
diff --git a/arch/sparc64/kernel/ktlb.S b/arch/sparc64/kernel/ktlb.S index 964527d2ffa0..cef8defcd7a9 100644 --- a/arch/sparc64/kernel/ktlb.S +++ b/arch/sparc64/kernel/ktlb.S | |||
@@ -1,6 +1,6 @@ | |||
1 | /* arch/sparc64/kernel/ktlb.S: Kernel mapping TLB miss handling. | 1 | /* arch/sparc64/kernel/ktlb.S: Kernel mapping TLB miss handling. |
2 | * | 2 | * |
3 | * Copyright (C) 1995, 1997, 2005 David S. Miller <davem@davemloft.net> | 3 | * Copyright (C) 1995, 1997, 2005, 2008 David S. Miller <davem@davemloft.net> |
4 | * Copyright (C) 1996 Eddie C. Dost (ecd@brainaid.de) | 4 | * Copyright (C) 1996 Eddie C. Dost (ecd@brainaid.de) |
5 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) | 5 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) |
6 | * Copyright (C) 1996,98,99 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 6 | * Copyright (C) 1996,98,99 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
@@ -226,6 +226,7 @@ kvmap_dtlb_load: | |||
226 | ba,pt %xcc, sun4v_dtlb_load | 226 | ba,pt %xcc, sun4v_dtlb_load |
227 | mov %g5, %g3 | 227 | mov %g5, %g3 |
228 | 228 | ||
229 | #ifdef CONFIG_SPARSEMEM_VMEMMAP | ||
229 | kvmap_vmemmap: | 230 | kvmap_vmemmap: |
230 | sub %g4, %g5, %g5 | 231 | sub %g4, %g5, %g5 |
231 | srlx %g5, 22, %g5 | 232 | srlx %g5, 22, %g5 |
@@ -234,6 +235,7 @@ kvmap_vmemmap: | |||
234 | or %g1, %lo(vmemmap_table), %g1 | 235 | or %g1, %lo(vmemmap_table), %g1 |
235 | ba,pt %xcc, kvmap_dtlb_load | 236 | ba,pt %xcc, kvmap_dtlb_load |
236 | ldx [%g1 + %g5], %g5 | 237 | ldx [%g1 + %g5], %g5 |
238 | #endif | ||
237 | 239 | ||
238 | kvmap_dtlb_nonlinear: | 240 | kvmap_dtlb_nonlinear: |
239 | /* Catch kernel NULL pointer derefs. */ | 241 | /* Catch kernel NULL pointer derefs. */ |
@@ -242,12 +244,14 @@ kvmap_dtlb_nonlinear: | |||
242 | bleu,pn %xcc, kvmap_dtlb_longpath | 244 | bleu,pn %xcc, kvmap_dtlb_longpath |
243 | nop | 245 | nop |
244 | 246 | ||
247 | #ifdef CONFIG_SPARSEMEM_VMEMMAP | ||
245 | /* Do not use the TSB for vmemmap. */ | 248 | /* Do not use the TSB for vmemmap. */ |
246 | mov (VMEMMAP_BASE >> 24), %g5 | 249 | mov (VMEMMAP_BASE >> 24), %g5 |
247 | sllx %g5, 24, %g5 | 250 | sllx %g5, 24, %g5 |
248 | cmp %g4,%g5 | 251 | cmp %g4,%g5 |
249 | bgeu,pn %xcc, kvmap_vmemmap | 252 | bgeu,pn %xcc, kvmap_vmemmap |
250 | nop | 253 | nop |
254 | #endif | ||
251 | 255 | ||
252 | KERN_TSB_LOOKUP_TL1(%g4, %g6, %g5, %g1, %g2, %g3, kvmap_dtlb_load) | 256 | KERN_TSB_LOOKUP_TL1(%g4, %g6, %g5, %g1, %g2, %g3, kvmap_dtlb_load) |
253 | 257 | ||
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index 63b3ebc0c3c2..a61c38fe75ea 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -1275,4 +1275,20 @@ int pci_dma_supported(struct pci_dev *pdev, u64 device_mask) | |||
1275 | return (device_mask & dma_addr_mask) == dma_addr_mask; | 1275 | return (device_mask & dma_addr_mask) == dma_addr_mask; |
1276 | } | 1276 | } |
1277 | 1277 | ||
1278 | void pci_resource_to_user(const struct pci_dev *pdev, int bar, | ||
1279 | const struct resource *rp, resource_size_t *start, | ||
1280 | resource_size_t *end) | ||
1281 | { | ||
1282 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; | ||
1283 | unsigned long offset; | ||
1284 | |||
1285 | if (rp->flags & IORESOURCE_IO) | ||
1286 | offset = pbm->io_space.start; | ||
1287 | else | ||
1288 | offset = pbm->mem_space.start; | ||
1289 | |||
1290 | *start = rp->start - offset; | ||
1291 | *end = rp->end - offset; | ||
1292 | } | ||
1293 | |||
1278 | #endif /* !(CONFIG_PCI) */ | 1294 | #endif /* !(CONFIG_PCI) */ |
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c index 9546ba9f5dee..e752e75cce83 100644 --- a/arch/sparc64/kernel/pci_schizo.c +++ b/arch/sparc64/kernel/pci_schizo.c | |||
@@ -850,7 +850,7 @@ static int pbm_routes_this_ino(struct pci_pbm_info *pbm, u32 ino) | |||
850 | /* How the Tomatillo IRQs are routed around is pure guesswork here. | 850 | /* How the Tomatillo IRQs are routed around is pure guesswork here. |
851 | * | 851 | * |
852 | * All the Tomatillo devices I see in prtconf dumps seem to have only | 852 | * All the Tomatillo devices I see in prtconf dumps seem to have only |
853 | * a single PCI bus unit attached to it. It would seem they are seperate | 853 | * a single PCI bus unit attached to it. It would seem they are separate |
854 | * devices because their PortID (ie. JBUS ID) values are all different | 854 | * devices because their PortID (ie. JBUS ID) values are all different |
855 | * and thus the registers are mapped to totally different locations. | 855 | * and thus the registers are mapped to totally different locations. |
856 | * | 856 | * |
diff --git a/arch/sparc64/kernel/sun4v_tlb_miss.S b/arch/sparc64/kernel/sun4v_tlb_miss.S index 9871dbb1ab42..fd9430562e0b 100644 --- a/arch/sparc64/kernel/sun4v_tlb_miss.S +++ b/arch/sparc64/kernel/sun4v_tlb_miss.S | |||
@@ -215,6 +215,7 @@ sun4v_itlb_error: | |||
215 | 215 | ||
216 | 1: ba,pt %xcc, etrap | 216 | 1: ba,pt %xcc, etrap |
217 | 2: or %g7, %lo(2b), %g7 | 217 | 2: or %g7, %lo(2b), %g7 |
218 | mov %l4, %o1 | ||
218 | call sun4v_itlb_error_report | 219 | call sun4v_itlb_error_report |
219 | add %sp, PTREGS_OFF, %o0 | 220 | add %sp, PTREGS_OFF, %o0 |
220 | 221 | ||
@@ -241,6 +242,7 @@ sun4v_dtlb_error: | |||
241 | 242 | ||
242 | 1: ba,pt %xcc, etrap | 243 | 1: ba,pt %xcc, etrap |
243 | 2: or %g7, %lo(2b), %g7 | 244 | 2: or %g7, %lo(2b), %g7 |
245 | mov %l4, %o1 | ||
244 | call sun4v_dtlb_error_report | 246 | call sun4v_dtlb_error_report |
245 | add %sp, PTREGS_OFF, %o0 | 247 | add %sp, PTREGS_OFF, %o0 |
246 | 248 | ||
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 04998388259f..2b6abf633343 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -1950,6 +1950,8 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl) | |||
1950 | printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", | 1950 | printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", |
1951 | regs->tpc, tl); | 1951 | regs->tpc, tl); |
1952 | print_symbol(KERN_EMERG "SUN4V-ITLB: TPC<%s>\n", regs->tpc); | 1952 | print_symbol(KERN_EMERG "SUN4V-ITLB: TPC<%s>\n", regs->tpc); |
1953 | printk(KERN_EMERG "SUN4V-ITLB: O7[%lx]\n", regs->u_regs[UREG_I7]); | ||
1954 | print_symbol(KERN_EMERG "SUN4V-ITLB: O7<%s>\n", regs->u_regs[UREG_I7]); | ||
1953 | printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " | 1955 | printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " |
1954 | "pte[%lx] error[%lx]\n", | 1956 | "pte[%lx] error[%lx]\n", |
1955 | sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, | 1957 | sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, |
@@ -1971,6 +1973,8 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl) | |||
1971 | printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", | 1973 | printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", |
1972 | regs->tpc, tl); | 1974 | regs->tpc, tl); |
1973 | print_symbol(KERN_EMERG "SUN4V-DTLB: TPC<%s>\n", regs->tpc); | 1975 | print_symbol(KERN_EMERG "SUN4V-DTLB: TPC<%s>\n", regs->tpc); |
1976 | printk(KERN_EMERG "SUN4V-DTLB: O7[%lx]\n", regs->u_regs[UREG_I7]); | ||
1977 | print_symbol(KERN_EMERG "SUN4V-DTLB: O7<%s>\n", regs->u_regs[UREG_I7]); | ||
1974 | printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " | 1978 | printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " |
1975 | "pte[%lx] error[%lx]\n", | 1979 | "pte[%lx] error[%lx]\n", |
1976 | sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, | 1980 | sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, |
diff --git a/arch/um/drivers/harddog_user.c b/arch/um/drivers/harddog_user.c index b56f8e0196a9..448ba59207a1 100644 --- a/arch/um/drivers/harddog_user.c +++ b/arch/um/drivers/harddog_user.c | |||
@@ -79,14 +79,14 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock) | |||
79 | n = read(in_fds[0], &c, sizeof(c)); | 79 | n = read(in_fds[0], &c, sizeof(c)); |
80 | if (n == 0) { | 80 | if (n == 0) { |
81 | printk("harddog_open - EOF on watchdog pipe\n"); | 81 | printk("harddog_open - EOF on watchdog pipe\n"); |
82 | helper_wait(pid); | 82 | helper_wait(pid, 1, NULL); |
83 | err = -EIO; | 83 | err = -EIO; |
84 | goto out_close_out; | 84 | goto out_close_out; |
85 | } | 85 | } |
86 | else if (n < 0) { | 86 | else if (n < 0) { |
87 | printk("harddog_open - read of watchdog pipe failed, " | 87 | printk("harddog_open - read of watchdog pipe failed, " |
88 | "err = %d\n", errno); | 88 | "err = %d\n", errno); |
89 | helper_wait(pid); | 89 | helper_wait(pid, 1, NULL); |
90 | err = n; | 90 | err = n; |
91 | goto out_close_out; | 91 | goto out_close_out; |
92 | } | 92 | } |
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index 17089a041028..af045ca0f653 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c | |||
@@ -2256,14 +2256,12 @@ static int __init apm_init(void) | |||
2256 | apm_info.disabled = 1; | 2256 | apm_info.disabled = 1; |
2257 | return -ENODEV; | 2257 | return -ENODEV; |
2258 | } | 2258 | } |
2259 | if (PM_IS_ACTIVE()) { | 2259 | if (pm_flags & PM_ACPI) { |
2260 | printk(KERN_NOTICE "apm: overridden by ACPI.\n"); | 2260 | printk(KERN_NOTICE "apm: overridden by ACPI.\n"); |
2261 | apm_info.disabled = 1; | 2261 | apm_info.disabled = 1; |
2262 | return -ENODEV; | 2262 | return -ENODEV; |
2263 | } | 2263 | } |
2264 | #ifdef CONFIG_PM_LEGACY | 2264 | pm_flags |= PM_APM; |
2265 | pm_active = 1; | ||
2266 | #endif | ||
2267 | 2265 | ||
2268 | /* | 2266 | /* |
2269 | * Set up a segment that references the real mode segment 0x40 | 2267 | * Set up a segment that references the real mode segment 0x40 |
@@ -2366,9 +2364,7 @@ static void __exit apm_exit(void) | |||
2366 | kthread_stop(kapmd_task); | 2364 | kthread_stop(kapmd_task); |
2367 | kapmd_task = NULL; | 2365 | kapmd_task = NULL; |
2368 | } | 2366 | } |
2369 | #ifdef CONFIG_PM_LEGACY | 2367 | pm_flags &= ~PM_APM; |
2370 | pm_active = 0; | ||
2371 | #endif | ||
2372 | } | 2368 | } |
2373 | 2369 | ||
2374 | module_init(apm_init); | 2370 | module_init(apm_init); |
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index ac0637a6d71c..fbad51fce672 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
@@ -196,7 +196,7 @@ default_entry: | |||
196 | /* Do an early initialization of the fixmap area */ | 196 | /* Do an early initialization of the fixmap area */ |
197 | movl $(swapper_pg_dir - __PAGE_OFFSET), %edx | 197 | movl $(swapper_pg_dir - __PAGE_OFFSET), %edx |
198 | movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax | 198 | movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax |
199 | addl $0x007, %eax /* 0x007 = PRESENT+RW+USER */ | 199 | addl $0x67, %eax /* 0x67 == _PAGE_TABLE */ |
200 | movl %eax, 4092(%edx) | 200 | movl %eax, 4092(%edx) |
201 | 201 | ||
202 | xorl %ebx,%ebx /* This is the boot CPU (BSP) */ | 202 | xorl %ebx,%ebx /* This is the boot CPU (BSP) */ |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 4a86ffd67ec5..2f99ee206b95 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -657,7 +657,7 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id) | |||
657 | hpet_pie_count = 0; | 657 | hpet_pie_count = 0; |
658 | } | 658 | } |
659 | 659 | ||
660 | if (hpet_rtc_flags & RTC_PIE && | 660 | if (hpet_rtc_flags & RTC_AIE && |
661 | (curr_time.tm_sec == hpet_alarm_time.tm_sec) && | 661 | (curr_time.tm_sec == hpet_alarm_time.tm_sec) && |
662 | (curr_time.tm_min == hpet_alarm_time.tm_min) && | 662 | (curr_time.tm_min == hpet_alarm_time.tm_min) && |
663 | (curr_time.tm_hour == hpet_alarm_time.tm_hour)) | 663 | (curr_time.tm_hour == hpet_alarm_time.tm_hour)) |
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index c3a565bba106..a6b1490e00c4 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -2169,14 +2169,10 @@ static inline void __init check_timer(void) | |||
2169 | { | 2169 | { |
2170 | int apic1, pin1, apic2, pin2; | 2170 | int apic1, pin1, apic2, pin2; |
2171 | int vector; | 2171 | int vector; |
2172 | unsigned int ver; | ||
2173 | unsigned long flags; | 2172 | unsigned long flags; |
2174 | 2173 | ||
2175 | local_irq_save(flags); | 2174 | local_irq_save(flags); |
2176 | 2175 | ||
2177 | ver = apic_read(APIC_LVR); | ||
2178 | ver = GET_APIC_VERSION(ver); | ||
2179 | |||
2180 | /* | 2176 | /* |
2181 | * get/set the timer IRQ vector: | 2177 | * get/set the timer IRQ vector: |
2182 | */ | 2178 | */ |
@@ -2189,15 +2185,11 @@ static inline void __init check_timer(void) | |||
2189 | * mode for the 8259A whenever interrupts are routed | 2185 | * mode for the 8259A whenever interrupts are routed |
2190 | * through I/O APICs. Also IRQ0 has to be enabled in | 2186 | * through I/O APICs. Also IRQ0 has to be enabled in |
2191 | * the 8259A which implies the virtual wire has to be | 2187 | * the 8259A which implies the virtual wire has to be |
2192 | * disabled in the local APIC. Finally timer interrupts | 2188 | * disabled in the local APIC. |
2193 | * need to be acknowledged manually in the 8259A for | ||
2194 | * timer_interrupt() and for the i82489DX when using | ||
2195 | * the NMI watchdog. | ||
2196 | */ | 2189 | */ |
2197 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); | 2190 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); |
2198 | init_8259A(1); | 2191 | init_8259A(1); |
2199 | timer_ack = !cpu_has_tsc; | 2192 | timer_ack = 1; |
2200 | timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver)); | ||
2201 | if (timer_over_8254 > 0) | 2193 | if (timer_over_8254 > 0) |
2202 | enable_8259A_irq(0); | 2194 | enable_8259A_irq(0); |
2203 | 2195 | ||
diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c index 0ab680f2d9db..3960ab7e1497 100644 --- a/arch/x86/kernel/mfgpt_32.c +++ b/arch/x86/kernel/mfgpt_32.c | |||
@@ -278,12 +278,12 @@ static int mfgpt_next_event(unsigned long delta, struct clock_event_device *evt) | |||
278 | 278 | ||
279 | static irqreturn_t mfgpt_tick(int irq, void *dev_id) | 279 | static irqreturn_t mfgpt_tick(int irq, void *dev_id) |
280 | { | 280 | { |
281 | /* Turn off the clock (and clear the event) */ | ||
282 | mfgpt_disable_timer(mfgpt_event_clock); | ||
283 | |||
281 | if (mfgpt_tick_mode == CLOCK_EVT_MODE_SHUTDOWN) | 284 | if (mfgpt_tick_mode == CLOCK_EVT_MODE_SHUTDOWN) |
282 | return IRQ_HANDLED; | 285 | return IRQ_HANDLED; |
283 | 286 | ||
284 | /* Turn off the clock */ | ||
285 | mfgpt_disable_timer(mfgpt_event_clock); | ||
286 | |||
287 | /* Clear the counter */ | 287 | /* Clear the counter */ |
288 | geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_COUNTER, 0); | 288 | geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_COUNTER, 0); |
289 | 289 | ||
@@ -319,10 +319,6 @@ static int __init mfgpt_timer_setup(void) | |||
319 | } | 319 | } |
320 | 320 | ||
321 | mfgpt_event_clock = timer; | 321 | mfgpt_event_clock = timer; |
322 | /* Set the clock scale and enable the event mode for CMP2 */ | ||
323 | val = MFGPT_SCALE | (3 << 8); | ||
324 | |||
325 | geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_SETUP, val); | ||
326 | 322 | ||
327 | /* Set up the IRQ on the MFGPT side */ | 323 | /* Set up the IRQ on the MFGPT side */ |
328 | if (geode_mfgpt_setup_irq(mfgpt_event_clock, MFGPT_CMP2, irq)) { | 324 | if (geode_mfgpt_setup_irq(mfgpt_event_clock, MFGPT_CMP2, irq)) { |
@@ -339,6 +335,11 @@ static int __init mfgpt_timer_setup(void) | |||
339 | goto err; | 335 | goto err; |
340 | } | 336 | } |
341 | 337 | ||
338 | /* Set the clock scale and enable the event mode for CMP2 */ | ||
339 | val = MFGPT_SCALE | (3 << 8); | ||
340 | |||
341 | geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_SETUP, val); | ||
342 | |||
342 | /* Set up the clock event */ | 343 | /* Set up the clock event */ |
343 | mfgpt_clockevent.mult = div_sc(MFGPT_HZ, NSEC_PER_SEC, 32); | 344 | mfgpt_clockevent.mult = div_sc(MFGPT_HZ, NSEC_PER_SEC, 32); |
344 | mfgpt_clockevent.min_delta_ns = clockevent_delta2ns(0xF, | 345 | mfgpt_clockevent.min_delta_ns = clockevent_delta2ns(0xF, |
diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c index 80ca72e5ac29..852db2906921 100644 --- a/arch/x86/kernel/nmi_32.c +++ b/arch/x86/kernel/nmi_32.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <asm/smp.h> | 26 | #include <asm/smp.h> |
27 | #include <asm/nmi.h> | 27 | #include <asm/nmi.h> |
28 | #include <asm/timer.h> | ||
29 | 28 | ||
30 | #include "mach_traps.h" | 29 | #include "mach_traps.h" |
31 | 30 | ||
@@ -84,7 +83,7 @@ static int __init check_nmi_watchdog(void) | |||
84 | 83 | ||
85 | prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); | 84 | prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); |
86 | if (!prev_nmi_count) | 85 | if (!prev_nmi_count) |
87 | goto error; | 86 | return -1; |
88 | 87 | ||
89 | printk(KERN_INFO "Testing NMI watchdog ... "); | 88 | printk(KERN_INFO "Testing NMI watchdog ... "); |
90 | 89 | ||
@@ -119,7 +118,7 @@ static int __init check_nmi_watchdog(void) | |||
119 | if (!atomic_read(&nmi_active)) { | 118 | if (!atomic_read(&nmi_active)) { |
120 | kfree(prev_nmi_count); | 119 | kfree(prev_nmi_count); |
121 | atomic_set(&nmi_active, -1); | 120 | atomic_set(&nmi_active, -1); |
122 | goto error; | 121 | return -1; |
123 | } | 122 | } |
124 | printk("OK.\n"); | 123 | printk("OK.\n"); |
125 | 124 | ||
@@ -130,10 +129,6 @@ static int __init check_nmi_watchdog(void) | |||
130 | 129 | ||
131 | kfree(prev_nmi_count); | 130 | kfree(prev_nmi_count); |
132 | return 0; | 131 | return 0; |
133 | error: | ||
134 | timer_ack = !cpu_has_tsc; | ||
135 | |||
136 | return -1; | ||
137 | } | 132 | } |
138 | /* This needs to happen later in boot so counters are working */ | 133 | /* This needs to happen later in boot so counters are working */ |
139 | late_initcall(check_nmi_watchdog); | 134 | late_initcall(check_nmi_watchdog); |
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 9663c2a74830..46d391d49de8 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -204,6 +204,10 @@ void cpu_idle(void) | |||
204 | } | 204 | } |
205 | } | 205 | } |
206 | 206 | ||
207 | static void do_nothing(void *unused) | ||
208 | { | ||
209 | } | ||
210 | |||
207 | void cpu_idle_wait(void) | 211 | void cpu_idle_wait(void) |
208 | { | 212 | { |
209 | unsigned int cpu, this_cpu = get_cpu(); | 213 | unsigned int cpu, this_cpu = get_cpu(); |
@@ -228,6 +232,13 @@ void cpu_idle_wait(void) | |||
228 | cpu_clear(cpu, map); | 232 | cpu_clear(cpu, map); |
229 | } | 233 | } |
230 | cpus_and(map, map, cpu_online_map); | 234 | cpus_and(map, map, cpu_online_map); |
235 | /* | ||
236 | * We waited 1 sec, if a CPU still did not call idle | ||
237 | * it may be because it is in idle and not waking up | ||
238 | * because it has nothing to do. | ||
239 | * Give all the remaining CPUS a kick. | ||
240 | */ | ||
241 | smp_call_function_mask(map, do_nothing, 0, 0); | ||
231 | } while (!cpus_empty(map)); | 242 | } while (!cpus_empty(map)); |
232 | 243 | ||
233 | set_cpus_allowed(current, tmp); | 244 | set_cpus_allowed(current, tmp); |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 6309b275cb9c..ab79e1dfa023 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -135,6 +135,10 @@ static void poll_idle (void) | |||
135 | cpu_relax(); | 135 | cpu_relax(); |
136 | } | 136 | } |
137 | 137 | ||
138 | static void do_nothing(void *unused) | ||
139 | { | ||
140 | } | ||
141 | |||
138 | void cpu_idle_wait(void) | 142 | void cpu_idle_wait(void) |
139 | { | 143 | { |
140 | unsigned int cpu, this_cpu = get_cpu(); | 144 | unsigned int cpu, this_cpu = get_cpu(); |
@@ -160,6 +164,13 @@ void cpu_idle_wait(void) | |||
160 | cpu_clear(cpu, map); | 164 | cpu_clear(cpu, map); |
161 | } | 165 | } |
162 | cpus_and(map, map, cpu_online_map); | 166 | cpus_and(map, map, cpu_online_map); |
167 | /* | ||
168 | * We waited 1 sec, if a CPU still did not call idle | ||
169 | * it may be because it is in idle and not waking up | ||
170 | * because it has nothing to do. | ||
171 | * Give all the remaining CPUS a kick. | ||
172 | */ | ||
173 | smp_call_function_mask(map, do_nothing, 0, 0); | ||
163 | } while (!cpus_empty(map)); | 174 | } while (!cpus_empty(map)); |
164 | 175 | ||
165 | set_cpus_allowed(current, tmp); | 176 | set_cpus_allowed(current, tmp); |
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c index 594889521da1..aaf4e1291217 100644 --- a/arch/x86/kernel/smpboot_64.c +++ b/arch/x86/kernel/smpboot_64.c | |||
@@ -141,8 +141,8 @@ static void __cpuinit smp_store_cpu_info(int id) | |||
141 | struct cpuinfo_x86 *c = &cpu_data(id); | 141 | struct cpuinfo_x86 *c = &cpu_data(id); |
142 | 142 | ||
143 | *c = boot_cpu_data; | 143 | *c = boot_cpu_data; |
144 | identify_cpu(c); | ||
145 | c->cpu_index = id; | 144 | c->cpu_index = id; |
145 | identify_cpu(c); | ||
146 | print_cpu_info(c); | 146 | print_cpu_info(c); |
147 | } | 147 | } |
148 | 148 | ||
@@ -526,7 +526,7 @@ struct create_idle { | |||
526 | int cpu; | 526 | int cpu; |
527 | }; | 527 | }; |
528 | 528 | ||
529 | void do_fork_idle(struct work_struct *work) | 529 | static void __cpuinit do_fork_idle(struct work_struct *work) |
530 | { | 530 | { |
531 | struct create_idle *c_idle = | 531 | struct create_idle *c_idle = |
532 | container_of(work, struct create_idle, work); | 532 | container_of(work, struct create_idle, work); |
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index c88bbffcaa03..02d1e1e58e81 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c | |||
@@ -541,6 +541,7 @@ fastcall void do_##name(struct pt_regs * regs, long error_code) \ | |||
541 | info.si_errno = 0; \ | 541 | info.si_errno = 0; \ |
542 | info.si_code = sicode; \ | 542 | info.si_code = sicode; \ |
543 | info.si_addr = (void __user *)siaddr; \ | 543 | info.si_addr = (void __user *)siaddr; \ |
544 | trace_hardirqs_fixup(); \ | ||
544 | if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ | 545 | if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ |
545 | == NOTIFY_STOP) \ | 546 | == NOTIFY_STOP) \ |
546 | return; \ | 547 | return; \ |
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c index d11525ad81b4..cc68b92316cd 100644 --- a/arch/x86/kernel/traps_64.c +++ b/arch/x86/kernel/traps_64.c | |||
@@ -635,6 +635,7 @@ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ | |||
635 | info.si_errno = 0; \ | 635 | info.si_errno = 0; \ |
636 | info.si_code = sicode; \ | 636 | info.si_code = sicode; \ |
637 | info.si_addr = (void __user *)siaddr; \ | 637 | info.si_addr = (void __user *)siaddr; \ |
638 | trace_hardirqs_fixup(); \ | ||
638 | if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ | 639 | if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ |
639 | == NOTIFY_STOP) \ | 640 | == NOTIFY_STOP) \ |
640 | return; \ | 641 | return; \ |
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index c7d19471261d..3c76d194fd2c 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -321,8 +321,13 @@ extern void set_highmem_pages_init(int); | |||
321 | static void __init set_highmem_pages_init(int bad_ppro) | 321 | static void __init set_highmem_pages_init(int bad_ppro) |
322 | { | 322 | { |
323 | int pfn; | 323 | int pfn; |
324 | for (pfn = highstart_pfn; pfn < highend_pfn; pfn++) | 324 | for (pfn = highstart_pfn; pfn < highend_pfn; pfn++) { |
325 | add_one_highpage_init(pfn_to_page(pfn), pfn, bad_ppro); | 325 | /* |
326 | * Holes under sparsemem might not have no mem_map[]: | ||
327 | */ | ||
328 | if (pfn_valid(pfn)) | ||
329 | add_one_highpage_init(pfn_to_page(pfn), pfn, bad_ppro); | ||
330 | } | ||
326 | totalram_pages += totalhigh_pages; | 331 | totalram_pages += totalhigh_pages; |
327 | } | 332 | } |
328 | #endif /* CONFIG_FLATMEM */ | 333 | #endif /* CONFIG_FLATMEM */ |
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 2d0eeac7251f..944bbcdd2b8d 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
@@ -380,7 +380,7 @@ static int __init ppro_init(char ** cpu_type) | |||
380 | 380 | ||
381 | if (cpu_model == 14) | 381 | if (cpu_model == 14) |
382 | *cpu_type = "i386/core"; | 382 | *cpu_type = "i386/core"; |
383 | else if (cpu_model == 15) | 383 | else if (cpu_model == 15 || cpu_model == 23) |
384 | *cpu_type = "i386/core_2"; | 384 | *cpu_type = "i386/core_2"; |
385 | else if (cpu_model > 0xd) | 385 | else if (cpu_model > 0xd) |
386 | return 0; | 386 | return 0; |