diff options
Diffstat (limited to 'arch')
34 files changed, 369 insertions, 189 deletions
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c index b5d387ef37e1..bff7ddd06a52 100644 --- a/arch/arm/mach-s3c2440/mach-anubis.c +++ b/arch/arm/mach-s3c2440/mach-anubis.c | |||
@@ -76,8 +76,8 @@ static struct map_desc anubis_iodesc[] __initdata = { | |||
76 | .length = SZ_4K, | 76 | .length = SZ_4K, |
77 | .type = MT_DEVICE, | 77 | .type = MT_DEVICE, |
78 | }, { | 78 | }, { |
79 | .virtual = (u32)ANUBIS_VA_CTRL2, | 79 | .virtual = (u32)ANUBIS_VA_IDREG, |
80 | .pfn = __phys_to_pfn(ANUBIS_PA_CTRL2), | 80 | .pfn = __phys_to_pfn(ANUBIS_PA_IDREG), |
81 | .length = SZ_4K, | 81 | .length = SZ_4K, |
82 | .type = MT_DEVICE, | 82 | .type = MT_DEVICE, |
83 | }, | 83 | }, |
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c index 4d6c7a574c1a..15811601f03d 100644 --- a/arch/arm/mach-s3c2440/mach-osiris.c +++ b/arch/arm/mach-s3c2440/mach-osiris.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/timer.h> | 16 | #include <linux/timer.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/device.h> | 18 | #include <linux/device.h> |
19 | #include <linux/sysdev.h> | ||
19 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
20 | 21 | ||
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
@@ -65,6 +66,11 @@ static struct map_desc osiris_iodesc[] __initdata = { | |||
65 | /* CPLD control registers */ | 66 | /* CPLD control registers */ |
66 | 67 | ||
67 | { | 68 | { |
69 | .virtual = (u32)OSIRIS_VA_CTRL0, | ||
70 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL0), | ||
71 | .length = SZ_16K, | ||
72 | .type = MT_DEVICE, | ||
73 | }, { | ||
68 | .virtual = (u32)OSIRIS_VA_CTRL1, | 74 | .virtual = (u32)OSIRIS_VA_CTRL1, |
69 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL1), | 75 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL1), |
70 | .length = SZ_16K, | 76 | .length = SZ_16K, |
@@ -74,6 +80,11 @@ static struct map_desc osiris_iodesc[] __initdata = { | |||
74 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL2), | 80 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL2), |
75 | .length = SZ_16K, | 81 | .length = SZ_16K, |
76 | .type = MT_DEVICE, | 82 | .type = MT_DEVICE, |
83 | }, { | ||
84 | .virtual = (u32)OSIRIS_VA_IDREG, | ||
85 | .pfn = __phys_to_pfn(OSIRIS_PA_IDREG), | ||
86 | .length = SZ_16K, | ||
87 | .type = MT_DEVICE, | ||
77 | }, | 88 | }, |
78 | }; | 89 | }; |
79 | 90 | ||
@@ -195,13 +206,13 @@ static void osiris_nand_select(struct s3c2410_nand_set *set, int slot) | |||
195 | pr_debug("osiris_nand: selecting slot %d (set %p,%p)\n", | 206 | pr_debug("osiris_nand: selecting slot %d (set %p,%p)\n", |
196 | slot, set, set->nr_map); | 207 | slot, set, set->nr_map); |
197 | 208 | ||
198 | tmp = __raw_readb(OSIRIS_VA_CTRL1); | 209 | tmp = __raw_readb(OSIRIS_VA_CTRL0); |
199 | tmp &= ~OSIRIS_CTRL1_NANDSEL; | 210 | tmp &= ~OSIRIS_CTRL0_NANDSEL; |
200 | tmp |= slot; | 211 | tmp |= slot; |
201 | 212 | ||
202 | pr_debug("osiris_nand: ctrl1 now %02x\n", tmp); | 213 | pr_debug("osiris_nand: ctrl0 now %02x\n", tmp); |
203 | 214 | ||
204 | __raw_writeb(tmp, OSIRIS_VA_CTRL1); | 215 | __raw_writeb(tmp, OSIRIS_VA_CTRL0); |
205 | } | 216 | } |
206 | 217 | ||
207 | static struct s3c2410_platform_nand osiris_nand_info = { | 218 | static struct s3c2410_platform_nand osiris_nand_info = { |
@@ -235,10 +246,45 @@ static struct platform_device osiris_pcmcia = { | |||
235 | .resource = osiris_pcmcia_resource, | 246 | .resource = osiris_pcmcia_resource, |
236 | }; | 247 | }; |
237 | 248 | ||
249 | /* Osiris power management device */ | ||
250 | |||
251 | #ifdef CONFIG_PM | ||
252 | static unsigned char pm_osiris_ctrl0; | ||
253 | |||
254 | static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state) | ||
255 | { | ||
256 | pm_osiris_ctrl0 = __raw_readb(OSIRIS_VA_CTRL0); | ||
257 | return 0; | ||
258 | } | ||
259 | |||
260 | static int osiris_pm_resume(struct sys_device *sd) | ||
261 | { | ||
262 | if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8) | ||
263 | __raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1); | ||
264 | |||
265 | return 0; | ||
266 | } | ||
267 | |||
268 | #else | ||
269 | #define osiris_pm_suspend NULL | ||
270 | #define osiris_pm_resume NULL | ||
271 | #endif | ||
272 | |||
273 | static struct sysdev_class osiris_pm_sysclass = { | ||
274 | set_kset_name("mach-osiris"), | ||
275 | .suspend = osiris_pm_suspend, | ||
276 | .resume = osiris_pm_resume, | ||
277 | }; | ||
278 | |||
279 | static struct sys_device osiris_pm_sysdev = { | ||
280 | .cls = &osiris_pm_sysclass, | ||
281 | }; | ||
282 | |||
238 | /* Standard Osiris devices */ | 283 | /* Standard Osiris devices */ |
239 | 284 | ||
240 | static struct platform_device *osiris_devices[] __initdata = { | 285 | static struct platform_device *osiris_devices[] __initdata = { |
241 | &s3c_device_i2c, | 286 | &s3c_device_i2c, |
287 | &s3c_device_wdt, | ||
242 | &s3c_device_nand, | 288 | &s3c_device_nand, |
243 | &osiris_pcmcia, | 289 | &osiris_pcmcia, |
244 | }; | 290 | }; |
@@ -288,6 +334,9 @@ static void __init osiris_map_io(void) | |||
288 | 334 | ||
289 | static void __init osiris_init(void) | 335 | static void __init osiris_init(void) |
290 | { | 336 | { |
337 | sysdev_class_register(&osiris_pm_sysclass); | ||
338 | sysdev_register(&osiris_pm_sysdev); | ||
339 | |||
291 | platform_add_devices(osiris_devices, ARRAY_SIZE(osiris_devices)); | 340 | platform_add_devices(osiris_devices, ARRAY_SIZE(osiris_devices)); |
292 | }; | 341 | }; |
293 | 342 | ||
@@ -299,5 +348,6 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS") | |||
299 | .map_io = osiris_map_io, | 348 | .map_io = osiris_map_io, |
300 | .init_machine = osiris_init, | 349 | .init_machine = osiris_init, |
301 | .init_irq = s3c24xx_init_irq, | 350 | .init_irq = s3c24xx_init_irq, |
351 | .init_machine = osiris_init, | ||
302 | .timer = &s3c24xx_timer, | 352 | .timer = &s3c24xx_timer, |
303 | MACHINE_END | 353 | MACHINE_END |
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S index ca2a5ad19ea6..806ce26d5243 100644 --- a/arch/arm/vfp/entry.S +++ b/arch/arm/vfp/entry.S | |||
@@ -29,6 +29,10 @@ do_vfp: | |||
29 | add r10, r10, #TI_VFPSTATE @ r10 = workspace | 29 | add r10, r10, #TI_VFPSTATE @ r10 = workspace |
30 | ldr pc, [r4] @ call VFP entry point | 30 | ldr pc, [r4] @ call VFP entry point |
31 | 31 | ||
32 | ENTRY(vfp_null_entry) | ||
33 | mov pc, lr | ||
34 | ENDPROC(vfp_null_entry) | ||
35 | |||
32 | .LCvfp: | 36 | .LCvfp: |
33 | .word vfp_vector | 37 | .word vfp_vector |
34 | 38 | ||
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index f1e5951dc721..1106b5f9cf19 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -26,8 +26,9 @@ | |||
26 | */ | 26 | */ |
27 | void vfp_testing_entry(void); | 27 | void vfp_testing_entry(void); |
28 | void vfp_support_entry(void); | 28 | void vfp_support_entry(void); |
29 | void vfp_null_entry(void); | ||
29 | 30 | ||
30 | void (*vfp_vector)(void) = vfp_testing_entry; | 31 | void (*vfp_vector)(void) = vfp_null_entry; |
31 | union vfp_state *last_VFP_context[NR_CPUS]; | 32 | union vfp_state *last_VFP_context[NR_CPUS]; |
32 | 33 | ||
33 | /* | 34 | /* |
@@ -321,8 +322,10 @@ static int __init vfp_init(void) | |||
321 | * The handler is already setup to just log calls, so | 322 | * The handler is already setup to just log calls, so |
322 | * we just need to read the VFPSID register. | 323 | * we just need to read the VFPSID register. |
323 | */ | 324 | */ |
325 | vfp_vector = vfp_testing_entry; | ||
324 | vfpsid = fmrx(FPSID); | 326 | vfpsid = fmrx(FPSID); |
325 | barrier(); | 327 | barrier(); |
328 | vfp_vector = vfp_null_entry; | ||
326 | 329 | ||
327 | printk(KERN_INFO "VFP support v0.3: "); | 330 | printk(KERN_INFO "VFP support v0.3: "); |
328 | if (VFP_arch) { | 331 | if (VFP_arch) { |
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c index d86e15776779..f2042e6466a4 100644 --- a/arch/parisc/hpux/fs.c +++ b/arch/parisc/hpux/fs.c | |||
@@ -21,6 +21,7 @@ | |||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/kernel.h> | ||
24 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
25 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
26 | #include <linux/file.h> | 27 | #include <linux/file.h> |
@@ -69,7 +70,6 @@ struct getdents_callback { | |||
69 | }; | 70 | }; |
70 | 71 | ||
71 | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) | 72 | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) |
72 | #define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1)) | ||
73 | 73 | ||
74 | static int filldir(void * __buf, const char * name, int namlen, loff_t offset, | 74 | static int filldir(void * __buf, const char * name, int namlen, loff_t offset, |
75 | u64 ino, unsigned d_type) | 75 | u64 ino, unsigned d_type) |
@@ -77,7 +77,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, | |||
77 | struct hpux_dirent __user * dirent; | 77 | struct hpux_dirent __user * dirent; |
78 | struct getdents_callback * buf = (struct getdents_callback *) __buf; | 78 | struct getdents_callback * buf = (struct getdents_callback *) __buf; |
79 | ino_t d_ino; | 79 | ino_t d_ino; |
80 | int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); | 80 | int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, sizeof(long)); |
81 | 81 | ||
82 | buf->error = -EINVAL; /* only used if we fail.. */ | 82 | buf->error = -EINVAL; /* only used if we fail.. */ |
83 | if (reclen > buf->count) | 83 | if (reclen > buf->count) |
@@ -102,7 +102,6 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, | |||
102 | } | 102 | } |
103 | 103 | ||
104 | #undef NAME_OFFSET | 104 | #undef NAME_OFFSET |
105 | #undef ROUND_UP | ||
106 | 105 | ||
107 | int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count) | 106 | int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count) |
108 | { | 107 | { |
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 8474f9e5ca10..42598abf4576 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -954,21 +954,6 @@ intr_return: | |||
954 | /* NOTE: Need to enable interrupts incase we schedule. */ | 954 | /* NOTE: Need to enable interrupts incase we schedule. */ |
955 | ssm PSW_SM_I, %r0 | 955 | ssm PSW_SM_I, %r0 |
956 | 956 | ||
957 | /* Check for software interrupts */ | ||
958 | |||
959 | .import irq_stat,data | ||
960 | |||
961 | load32 irq_stat,%r19 | ||
962 | #ifdef CONFIG_SMP | ||
963 | mfctl %cr30,%r1 | ||
964 | ldw TI_CPU(%r1),%r1 /* get cpu # - int */ | ||
965 | /* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) amount | ||
966 | ** irq_stat[] is defined using ____cacheline_aligned. | ||
967 | */ | ||
968 | SHLREG %r1,L1_CACHE_SHIFT,%r20 | ||
969 | add %r19,%r20,%r19 /* now have &irq_stat[smp_processor_id()] */ | ||
970 | #endif /* CONFIG_SMP */ | ||
971 | |||
972 | intr_check_resched: | 957 | intr_check_resched: |
973 | 958 | ||
974 | /* check for reschedule */ | 959 | /* check for reschedule */ |
@@ -2034,10 +2019,9 @@ ENTRY(syscall_exit) | |||
2034 | STREG %r28,TASK_PT_GR28(%r1) | 2019 | STREG %r28,TASK_PT_GR28(%r1) |
2035 | 2020 | ||
2036 | #ifdef CONFIG_HPUX | 2021 | #ifdef CONFIG_HPUX |
2037 | |||
2038 | /* <linux/personality.h> cannot be easily included */ | 2022 | /* <linux/personality.h> cannot be easily included */ |
2039 | #define PER_HPUX 0x10 | 2023 | #define PER_HPUX 0x10 |
2040 | LDREG TASK_PERSONALITY(%r1),%r19 | 2024 | ldw TASK_PERSONALITY(%r1),%r19 |
2041 | 2025 | ||
2042 | /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */ | 2026 | /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */ |
2043 | ldo -PER_HPUX(%r19), %r19 | 2027 | ldo -PER_HPUX(%r19), %r19 |
@@ -2055,24 +2039,6 @@ ENTRY(syscall_exit) | |||
2055 | */ | 2039 | */ |
2056 | loadgp | 2040 | loadgp |
2057 | 2041 | ||
2058 | syscall_check_bh: | ||
2059 | |||
2060 | /* Check for software interrupts */ | ||
2061 | |||
2062 | .import irq_stat,data | ||
2063 | |||
2064 | load32 irq_stat,%r19 | ||
2065 | |||
2066 | #ifdef CONFIG_SMP | ||
2067 | /* sched.h: int processor */ | ||
2068 | /* %r26 is used as scratch register to index into irq_stat[] */ | ||
2069 | ldw TI_CPU-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r26 /* cpu # */ | ||
2070 | |||
2071 | /* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) bits */ | ||
2072 | SHLREG %r26,L1_CACHE_SHIFT,%r20 | ||
2073 | add %r19,%r20,%r19 /* now have &irq_stat[smp_processor_id()] */ | ||
2074 | #endif /* CONFIG_SMP */ | ||
2075 | |||
2076 | syscall_check_resched: | 2042 | syscall_check_resched: |
2077 | 2043 | ||
2078 | /* check for reschedule */ | 2044 | /* check for reschedule */ |
@@ -2114,7 +2080,7 @@ syscall_restore: | |||
2114 | /* Are we being ptraced? */ | 2080 | /* Are we being ptraced? */ |
2115 | LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 | 2081 | LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 |
2116 | 2082 | ||
2117 | LDREG TASK_PTRACE(%r1), %r19 | 2083 | ldw TASK_PTRACE(%r1), %r19 |
2118 | bb,< %r19,31,syscall_restore_rfi | 2084 | bb,< %r19,31,syscall_restore_rfi |
2119 | nop | 2085 | nop |
2120 | 2086 | ||
@@ -2244,7 +2210,7 @@ syscall_do_resched: | |||
2244 | #else | 2210 | #else |
2245 | nop | 2211 | nop |
2246 | #endif | 2212 | #endif |
2247 | b syscall_check_bh /* if resched, we start over again */ | 2213 | b syscall_check_resched /* if resched, we start over again */ |
2248 | nop | 2214 | nop |
2249 | ENDPROC(syscall_exit) | 2215 | ENDPROC(syscall_exit) |
2250 | 2216 | ||
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 39dc835bf89e..fd6552c4c08c 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c | |||
@@ -634,7 +634,7 @@ EXPORT_SYMBOL(pdc_lan_station_id); | |||
634 | * pdc_stable_read - Read data from Stable Storage. | 634 | * pdc_stable_read - Read data from Stable Storage. |
635 | * @staddr: Stable Storage address to access. | 635 | * @staddr: Stable Storage address to access. |
636 | * @memaddr: The memory address where Stable Storage data shall be copied. | 636 | * @memaddr: The memory address where Stable Storage data shall be copied. |
637 | * @count: number of bytes to transfert. count is multiple of 4. | 637 | * @count: number of bytes to transfer. count is multiple of 4. |
638 | * | 638 | * |
639 | * This PDC call reads from the Stable Storage address supplied in staddr | 639 | * This PDC call reads from the Stable Storage address supplied in staddr |
640 | * and copies count bytes to the memory address memaddr. | 640 | * and copies count bytes to the memory address memaddr. |
@@ -660,7 +660,7 @@ EXPORT_SYMBOL(pdc_stable_read); | |||
660 | * pdc_stable_write - Write data to Stable Storage. | 660 | * pdc_stable_write - Write data to Stable Storage. |
661 | * @staddr: Stable Storage address to access. | 661 | * @staddr: Stable Storage address to access. |
662 | * @memaddr: The memory address where Stable Storage data shall be read from. | 662 | * @memaddr: The memory address where Stable Storage data shall be read from. |
663 | * @count: number of bytes to transfert. count is multiple of 4. | 663 | * @count: number of bytes to transfer. count is multiple of 4. |
664 | * | 664 | * |
665 | * This PDC call reads count bytes from the supplied memaddr address, | 665 | * This PDC call reads count bytes from the supplied memaddr address, |
666 | * and copies count bytes to the Stable Storage address staddr. | 666 | * and copies count bytes to the Stable Storage address staddr. |
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c index 18ba4cb9159b..04848b2b381c 100644 --- a/arch/parisc/kernel/hardware.c +++ b/arch/parisc/kernel/hardware.c | |||
@@ -38,7 +38,7 @@ | |||
38 | * so don't reference this table after starting the init process | 38 | * so don't reference this table after starting the init process |
39 | */ | 39 | */ |
40 | 40 | ||
41 | static struct hp_hardware hp_hardware_list[] __initdata = { | 41 | static struct hp_hardware hp_hardware_list[] __devinitdata = { |
42 | {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, | 42 | {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, |
43 | {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, | 43 | {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, |
44 | {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, | 44 | {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, |
@@ -1219,7 +1219,7 @@ static struct hp_cpu_type_mask { | |||
1219 | unsigned short model; | 1219 | unsigned short model; |
1220 | unsigned short mask; | 1220 | unsigned short mask; |
1221 | enum cpu_type cpu; | 1221 | enum cpu_type cpu; |
1222 | } hp_cpu_type_mask_list[] __initdata = { | 1222 | } hp_cpu_type_mask_list[] __devinitdata = { |
1223 | 1223 | ||
1224 | { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ | 1224 | { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ |
1225 | { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ | 1225 | { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ |
@@ -1296,10 +1296,11 @@ static struct hp_cpu_type_mask { | |||
1296 | { 0x05f0, 0x0ff0, pcxw2 }, /* 0x05f0 - 0x05ff */ | 1296 | { 0x05f0, 0x0ff0, pcxw2 }, /* 0x05f0 - 0x05ff */ |
1297 | { 0x0600, 0x0fe0, pcxl }, /* 0x0600 - 0x061f */ | 1297 | { 0x0600, 0x0fe0, pcxl }, /* 0x0600 - 0x061f */ |
1298 | { 0x0880, 0x0ff0, mako }, /* 0x0880 - 0x088f */ | 1298 | { 0x0880, 0x0ff0, mako }, /* 0x0880 - 0x088f */ |
1299 | { 0x0890, 0x0ff0, mako2 }, /* 0x0890 - 0x089f */ | ||
1299 | { 0x0000, 0x0000, pcx } /* terminate table */ | 1300 | { 0x0000, 0x0000, pcx } /* terminate table */ |
1300 | }; | 1301 | }; |
1301 | 1302 | ||
1302 | char *cpu_name_version[][2] = { | 1303 | const char * const cpu_name_version[][2] = { |
1303 | [pcx] = { "PA7000 (PCX)", "1.0" }, | 1304 | [pcx] = { "PA7000 (PCX)", "1.0" }, |
1304 | [pcxs] = { "PA7000 (PCX-S)", "1.1a" }, | 1305 | [pcxs] = { "PA7000 (PCX-S)", "1.1a" }, |
1305 | [pcxt] = { "PA7100 (PCX-T)", "1.1b" }, | 1306 | [pcxt] = { "PA7100 (PCX-T)", "1.1b" }, |
@@ -1311,10 +1312,11 @@ char *cpu_name_version[][2] = { | |||
1311 | [pcxw] = { "PA8500 (PCX-W)", "2.0" }, | 1312 | [pcxw] = { "PA8500 (PCX-W)", "2.0" }, |
1312 | [pcxw_] = { "PA8600 (PCX-W+)", "2.0" }, | 1313 | [pcxw_] = { "PA8600 (PCX-W+)", "2.0" }, |
1313 | [pcxw2] = { "PA8700 (PCX-W2)", "2.0" }, | 1314 | [pcxw2] = { "PA8700 (PCX-W2)", "2.0" }, |
1314 | [mako] = { "PA8800 (Mako)", "2.0" } | 1315 | [mako] = { "PA8800 (Mako)", "2.0" }, |
1316 | [mako2] = { "PA8900 (Shortfin)", "2.0" } | ||
1315 | }; | 1317 | }; |
1316 | 1318 | ||
1317 | const char * __init | 1319 | const char * __devinit |
1318 | parisc_hardware_description(struct parisc_device_id *id) | 1320 | parisc_hardware_description(struct parisc_device_id *id) |
1319 | { | 1321 | { |
1320 | struct hp_hardware *listptr; | 1322 | struct hp_hardware *listptr; |
@@ -1353,7 +1355,7 @@ parisc_hardware_description(struct parisc_device_id *id) | |||
1353 | 1355 | ||
1354 | 1356 | ||
1355 | /* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */ | 1357 | /* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */ |
1356 | enum cpu_type __init | 1358 | enum cpu_type __cpuinit |
1357 | parisc_get_cpu_type(unsigned long hversion) | 1359 | parisc_get_cpu_type(unsigned long hversion) |
1358 | { | 1360 | { |
1359 | struct hp_cpu_type_mask *ptr; | 1361 | struct hp_cpu_type_mask *ptr; |
diff --git a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S index d8baa158d8a0..43b41df0b541 100644 --- a/arch/parisc/kernel/hpmc.S +++ b/arch/parisc/kernel/hpmc.S | |||
@@ -295,8 +295,5 @@ os_hpmc_6: | |||
295 | b . | 295 | b . |
296 | nop | 296 | nop |
297 | ENDPROC(os_hpmc) | 297 | ENDPROC(os_hpmc) |
298 | 298 | ENTRY(os_hpmc_end) /* this label used to compute os_hpmc checksum */ | |
299 | /* this label used to compute os_hpmc checksum */ | ||
300 | ENTRY(os_hpmc_end) | ||
301 | |||
302 | nop | 299 | nop |
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index c5c9125dacec..76ce5e3b0050 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c | |||
@@ -46,14 +46,10 @@ extern irqreturn_t ipi_interrupt(int, void *); | |||
46 | static volatile unsigned long cpu_eiem = 0; | 46 | static volatile unsigned long cpu_eiem = 0; |
47 | 47 | ||
48 | /* | 48 | /* |
49 | ** ack bitmap ... habitually set to 1, but reset to zero | 49 | ** local ACK bitmap ... habitually set to 1, but reset to zero |
50 | ** between ->ack() and ->end() of the interrupt to prevent | 50 | ** between ->ack() and ->end() of the interrupt to prevent |
51 | ** re-interruption of a processing interrupt. | 51 | ** re-interruption of a processing interrupt. |
52 | */ | 52 | */ |
53 | static volatile unsigned long global_ack_eiem = ~0UL; | ||
54 | /* | ||
55 | ** Local bitmap, same as above but for per-cpu interrupts | ||
56 | */ | ||
57 | static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL; | 53 | static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL; |
58 | 54 | ||
59 | static void cpu_disable_irq(unsigned int irq) | 55 | static void cpu_disable_irq(unsigned int irq) |
@@ -94,13 +90,11 @@ void cpu_ack_irq(unsigned int irq) | |||
94 | int cpu = smp_processor_id(); | 90 | int cpu = smp_processor_id(); |
95 | 91 | ||
96 | /* Clear in EIEM so we can no longer process */ | 92 | /* Clear in EIEM so we can no longer process */ |
97 | if (CHECK_IRQ_PER_CPU(irq_desc[irq].status)) | 93 | per_cpu(local_ack_eiem, cpu) &= ~mask; |
98 | per_cpu(local_ack_eiem, cpu) &= ~mask; | ||
99 | else | ||
100 | global_ack_eiem &= ~mask; | ||
101 | 94 | ||
102 | /* disable the interrupt */ | 95 | /* disable the interrupt */ |
103 | set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); | 96 | set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu)); |
97 | |||
104 | /* and now ack it */ | 98 | /* and now ack it */ |
105 | mtctl(mask, 23); | 99 | mtctl(mask, 23); |
106 | } | 100 | } |
@@ -111,13 +105,10 @@ void cpu_end_irq(unsigned int irq) | |||
111 | int cpu = smp_processor_id(); | 105 | int cpu = smp_processor_id(); |
112 | 106 | ||
113 | /* set it in the eiems---it's no longer in process */ | 107 | /* set it in the eiems---it's no longer in process */ |
114 | if (CHECK_IRQ_PER_CPU(irq_desc[irq].status)) | 108 | per_cpu(local_ack_eiem, cpu) |= mask; |
115 | per_cpu(local_ack_eiem, cpu) |= mask; | ||
116 | else | ||
117 | global_ack_eiem |= mask; | ||
118 | 109 | ||
119 | /* enable the interrupt */ | 110 | /* enable the interrupt */ |
120 | set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); | 111 | set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu)); |
121 | } | 112 | } |
122 | 113 | ||
123 | #ifdef CONFIG_SMP | 114 | #ifdef CONFIG_SMP |
@@ -354,8 +345,7 @@ void do_cpu_irq_mask(struct pt_regs *regs) | |||
354 | local_irq_disable(); | 345 | local_irq_disable(); |
355 | irq_enter(); | 346 | irq_enter(); |
356 | 347 | ||
357 | eirr_val = mfctl(23) & cpu_eiem & global_ack_eiem & | 348 | eirr_val = mfctl(23) & cpu_eiem & per_cpu(local_ack_eiem, cpu); |
358 | per_cpu(local_ack_eiem, cpu); | ||
359 | if (!eirr_val) | 349 | if (!eirr_val) |
360 | goto set_out; | 350 | goto set_out; |
361 | irq = eirr_to_irq(eirr_val); | 351 | irq = eirr_to_irq(eirr_val); |
@@ -381,7 +371,7 @@ void do_cpu_irq_mask(struct pt_regs *regs) | |||
381 | return; | 371 | return; |
382 | 372 | ||
383 | set_out: | 373 | set_out: |
384 | set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); | 374 | set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu)); |
385 | goto out; | 375 | goto out; |
386 | } | 376 | } |
387 | 377 | ||
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c index 0c3aecb85a5c..23c1388df1f5 100644 --- a/arch/parisc/kernel/pci-dma.c +++ b/arch/parisc/kernel/pci-dma.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/proc_fs.h> | 23 | #include <linux/proc_fs.h> |
24 | #include <linux/seq_file.h> | ||
24 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
25 | #include <linux/string.h> | 26 | #include <linux/string.h> |
26 | #include <linux/types.h> | 27 | #include <linux/types.h> |
@@ -34,7 +35,6 @@ | |||
34 | #include <asm/tlbflush.h> /* for purge_tlb_*() macros */ | 35 | #include <asm/tlbflush.h> /* for purge_tlb_*() macros */ |
35 | 36 | ||
36 | static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL; | 37 | static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL; |
37 | static int pcxl_proc_info(char *buffer, char **start, off_t offset, int length); | ||
38 | static unsigned long pcxl_used_bytes __read_mostly = 0; | 38 | static unsigned long pcxl_used_bytes __read_mostly = 0; |
39 | static unsigned long pcxl_used_pages __read_mostly = 0; | 39 | static unsigned long pcxl_used_pages __read_mostly = 0; |
40 | 40 | ||
@@ -330,6 +330,54 @@ pcxl_free_range(unsigned long vaddr, size_t size) | |||
330 | dump_resmap(); | 330 | dump_resmap(); |
331 | } | 331 | } |
332 | 332 | ||
333 | static int proc_pcxl_dma_show(struct seq_file *m, void *v) | ||
334 | { | ||
335 | #if 0 | ||
336 | u_long i = 0; | ||
337 | unsigned long *res_ptr = (u_long *)pcxl_res_map; | ||
338 | #endif | ||
339 | unsigned long total_pages = pcxl_res_size << 3; /* 8 bits per byte */ | ||
340 | |||
341 | seq_printf(m, "\nDMA Mapping Area size : %d bytes (%ld pages)\n", | ||
342 | PCXL_DMA_MAP_SIZE, total_pages); | ||
343 | |||
344 | seq_printf(m, "Resource bitmap : %d bytes\n", pcxl_res_size); | ||
345 | |||
346 | seq_puts(m, " total: free: used: % used:\n"); | ||
347 | seq_printf(m, "blocks %8d %8ld %8ld %8ld%%\n", pcxl_res_size, | ||
348 | pcxl_res_size - pcxl_used_bytes, pcxl_used_bytes, | ||
349 | (pcxl_used_bytes * 100) / pcxl_res_size); | ||
350 | |||
351 | seq_printf(m, "pages %8ld %8ld %8ld %8ld%%\n", total_pages, | ||
352 | total_pages - pcxl_used_pages, pcxl_used_pages, | ||
353 | (pcxl_used_pages * 100 / total_pages)); | ||
354 | |||
355 | #if 0 | ||
356 | seq_puts(m, "\nResource bitmap:"); | ||
357 | |||
358 | for(; i < (pcxl_res_size / sizeof(u_long)); ++i, ++res_ptr) { | ||
359 | if ((i & 7) == 0) | ||
360 | seq_puts(m,"\n "); | ||
361 | seq_printf(m, "%s %08lx", buf, *res_ptr); | ||
362 | } | ||
363 | #endif | ||
364 | seq_putc(m, '\n'); | ||
365 | return 0; | ||
366 | } | ||
367 | |||
368 | static int proc_pcxl_dma_open(struct inode *inode, struct file *file) | ||
369 | { | ||
370 | return single_open(file, proc_pcxl_dma_show, NULL); | ||
371 | } | ||
372 | |||
373 | static const struct file_operations proc_pcxl_dma_ops = { | ||
374 | .owner = THIS_MODULE, | ||
375 | .open = proc_pcxl_dma_open, | ||
376 | .read = seq_read, | ||
377 | .llseek = seq_lseek, | ||
378 | .release = single_release, | ||
379 | }; | ||
380 | |||
333 | static int __init | 381 | static int __init |
334 | pcxl_dma_init(void) | 382 | pcxl_dma_init(void) |
335 | { | 383 | { |
@@ -348,9 +396,10 @@ pcxl_dma_init(void) | |||
348 | "pcxl_dma_init: Unable to create gsc /proc dir entry\n"); | 396 | "pcxl_dma_init: Unable to create gsc /proc dir entry\n"); |
349 | else { | 397 | else { |
350 | struct proc_dir_entry* ent; | 398 | struct proc_dir_entry* ent; |
351 | ent = create_proc_info_entry("pcxl_dma", 0, | 399 | ent = create_proc_entry("pcxl_dma", 0, proc_gsc_root); |
352 | proc_gsc_root, pcxl_proc_info); | 400 | if (ent) |
353 | if (!ent) | 401 | ent->proc_fops = &proc_pcxl_dma_ops; |
402 | else | ||
354 | printk(KERN_WARNING | 403 | printk(KERN_WARNING |
355 | "pci-dma.c: Unable to create pcxl_dma /proc entry.\n"); | 404 | "pci-dma.c: Unable to create pcxl_dma /proc entry.\n"); |
356 | } | 405 | } |
@@ -551,40 +600,3 @@ struct hppa_dma_ops pcx_dma_ops = { | |||
551 | .dma_sync_sg_for_cpu = pa11_dma_sync_sg_for_cpu, | 600 | .dma_sync_sg_for_cpu = pa11_dma_sync_sg_for_cpu, |
552 | .dma_sync_sg_for_device = pa11_dma_sync_sg_for_device, | 601 | .dma_sync_sg_for_device = pa11_dma_sync_sg_for_device, |
553 | }; | 602 | }; |
554 | |||
555 | |||
556 | static int pcxl_proc_info(char *buf, char **start, off_t offset, int len) | ||
557 | { | ||
558 | #if 0 | ||
559 | u_long i = 0; | ||
560 | unsigned long *res_ptr = (u_long *)pcxl_res_map; | ||
561 | #endif | ||
562 | unsigned long total_pages = pcxl_res_size << 3; /* 8 bits per byte */ | ||
563 | |||
564 | sprintf(buf, "\nDMA Mapping Area size : %d bytes (%ld pages)\n", | ||
565 | PCXL_DMA_MAP_SIZE, total_pages); | ||
566 | |||
567 | sprintf(buf, "%sResource bitmap : %d bytes\n", buf, pcxl_res_size); | ||
568 | |||
569 | strcat(buf, " total: free: used: % used:\n"); | ||
570 | sprintf(buf, "%sblocks %8d %8ld %8ld %8ld%%\n", buf, pcxl_res_size, | ||
571 | pcxl_res_size - pcxl_used_bytes, pcxl_used_bytes, | ||
572 | (pcxl_used_bytes * 100) / pcxl_res_size); | ||
573 | |||
574 | sprintf(buf, "%spages %8ld %8ld %8ld %8ld%%\n", buf, total_pages, | ||
575 | total_pages - pcxl_used_pages, pcxl_used_pages, | ||
576 | (pcxl_used_pages * 100 / total_pages)); | ||
577 | |||
578 | #if 0 | ||
579 | strcat(buf, "\nResource bitmap:"); | ||
580 | |||
581 | for(; i < (pcxl_res_size / sizeof(u_long)); ++i, ++res_ptr) { | ||
582 | if ((i & 7) == 0) | ||
583 | strcat(buf,"\n "); | ||
584 | sprintf(buf, "%s %08lx", buf, *res_ptr); | ||
585 | } | ||
586 | #endif | ||
587 | strcat(buf, "\n"); | ||
588 | return strlen(buf); | ||
589 | } | ||
590 | |||
diff --git a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c index a46bc62b643e..89d6d5ad44b5 100644 --- a/arch/parisc/kernel/perf.c +++ b/arch/parisc/kernel/perf.c | |||
@@ -171,7 +171,7 @@ static const uint64_t perf_bitmasks[] = { | |||
171 | 171 | ||
172 | /* | 172 | /* |
173 | * Write control bitmasks for Pa-8700 processor given | 173 | * Write control bitmasks for Pa-8700 processor given |
174 | * somethings have changed slightly. | 174 | * some things have changed slightly. |
175 | */ | 175 | */ |
176 | static const uint64_t perf_bitmasks_piranha[] = { | 176 | static const uint64_t perf_bitmasks_piranha[] = { |
177 | 0x0000000000000000ul, /* first dbl word must be zero */ | 177 | 0x0000000000000000ul, /* first dbl word must be zero */ |
@@ -511,10 +511,12 @@ static int __init perf_init(void) | |||
511 | } else if (boot_cpu_data.cpu_type == pcxw || | 511 | } else if (boot_cpu_data.cpu_type == pcxw || |
512 | boot_cpu_data.cpu_type == pcxw_ || | 512 | boot_cpu_data.cpu_type == pcxw_ || |
513 | boot_cpu_data.cpu_type == pcxw2 || | 513 | boot_cpu_data.cpu_type == pcxw2 || |
514 | boot_cpu_data.cpu_type == mako) { | 514 | boot_cpu_data.cpu_type == mako || |
515 | boot_cpu_data.cpu_type == mako2) { | ||
515 | perf_processor_interface = CUDA_INTF; | 516 | perf_processor_interface = CUDA_INTF; |
516 | if (boot_cpu_data.cpu_type == pcxw2 || | 517 | if (boot_cpu_data.cpu_type == pcxw2 || |
517 | boot_cpu_data.cpu_type == mako) | 518 | boot_cpu_data.cpu_type == mako || |
519 | boot_cpu_data.cpu_type == mako2) | ||
518 | bitmask_array = perf_bitmasks_piranha; | 520 | bitmask_array = perf_bitmasks_piranha; |
519 | } else { | 521 | } else { |
520 | perf_processor_interface = UNKNOWN_INTF; | 522 | perf_processor_interface = UNKNOWN_INTF; |
@@ -574,27 +576,27 @@ static int perf_stop_counters(uint32_t *raddr) | |||
574 | if (!perf_rdr_read_ubuf(16, userbuf)) | 576 | if (!perf_rdr_read_ubuf(16, userbuf)) |
575 | return -13; | 577 | return -13; |
576 | 578 | ||
577 | /* Counter0 is bits 1398 thru 1429 */ | 579 | /* Counter0 is bits 1398 to 1429 */ |
578 | tmp64 = (userbuf[21] << 22) & 0x00000000ffc00000; | 580 | tmp64 = (userbuf[21] << 22) & 0x00000000ffc00000; |
579 | tmp64 |= (userbuf[22] >> 42) & 0x00000000003fffff; | 581 | tmp64 |= (userbuf[22] >> 42) & 0x00000000003fffff; |
580 | /* OR sticky0 (bit 1430) to counter0 bit 32 */ | 582 | /* OR sticky0 (bit 1430) to counter0 bit 32 */ |
581 | tmp64 |= (userbuf[22] >> 10) & 0x0000000080000000; | 583 | tmp64 |= (userbuf[22] >> 10) & 0x0000000080000000; |
582 | raddr[0] = (uint32_t)tmp64; | 584 | raddr[0] = (uint32_t)tmp64; |
583 | 585 | ||
584 | /* Counter1 is bits 1431 thru 1462 */ | 586 | /* Counter1 is bits 1431 to 1462 */ |
585 | tmp64 = (userbuf[22] >> 9) & 0x00000000ffffffff; | 587 | tmp64 = (userbuf[22] >> 9) & 0x00000000ffffffff; |
586 | /* OR sticky1 (bit 1463) to counter1 bit 32 */ | 588 | /* OR sticky1 (bit 1463) to counter1 bit 32 */ |
587 | tmp64 |= (userbuf[22] << 23) & 0x0000000080000000; | 589 | tmp64 |= (userbuf[22] << 23) & 0x0000000080000000; |
588 | raddr[1] = (uint32_t)tmp64; | 590 | raddr[1] = (uint32_t)tmp64; |
589 | 591 | ||
590 | /* Counter2 is bits 1464 thru 1495 */ | 592 | /* Counter2 is bits 1464 to 1495 */ |
591 | tmp64 = (userbuf[22] << 24) & 0x00000000ff000000; | 593 | tmp64 = (userbuf[22] << 24) & 0x00000000ff000000; |
592 | tmp64 |= (userbuf[23] >> 40) & 0x0000000000ffffff; | 594 | tmp64 |= (userbuf[23] >> 40) & 0x0000000000ffffff; |
593 | /* OR sticky2 (bit 1496) to counter2 bit 32 */ | 595 | /* OR sticky2 (bit 1496) to counter2 bit 32 */ |
594 | tmp64 |= (userbuf[23] >> 8) & 0x0000000080000000; | 596 | tmp64 |= (userbuf[23] >> 8) & 0x0000000080000000; |
595 | raddr[2] = (uint32_t)tmp64; | 597 | raddr[2] = (uint32_t)tmp64; |
596 | 598 | ||
597 | /* Counter3 is bits 1497 thru 1528 */ | 599 | /* Counter3 is bits 1497 to 1528 */ |
598 | tmp64 = (userbuf[23] >> 7) & 0x00000000ffffffff; | 600 | tmp64 = (userbuf[23] >> 7) & 0x00000000ffffffff; |
599 | /* OR sticky3 (bit 1529) to counter3 bit 32 */ | 601 | /* OR sticky3 (bit 1529) to counter3 bit 32 */ |
600 | tmp64 |= (userbuf[23] << 25) & 0x0000000080000000; | 602 | tmp64 |= (userbuf[23] << 25) & 0x0000000080000000; |
@@ -616,7 +618,7 @@ static int perf_stop_counters(uint32_t *raddr) | |||
616 | userbuf[23] = 0; | 618 | userbuf[23] = 0; |
617 | 619 | ||
618 | /* | 620 | /* |
619 | * Write back the zero'ed bytes + the image given | 621 | * Write back the zeroed bytes + the image given |
620 | * the read was destructive. | 622 | * the read was destructive. |
621 | */ | 623 | */ |
622 | perf_rdr_write(16, userbuf); | 624 | perf_rdr_write(16, userbuf); |
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 0dd3847f494c..355664812b83 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -381,6 +381,10 @@ get_wchan(struct task_struct *p) | |||
381 | struct unwind_frame_info info; | 381 | struct unwind_frame_info info; |
382 | unsigned long ip; | 382 | unsigned long ip; |
383 | int count = 0; | 383 | int count = 0; |
384 | |||
385 | if (!p || p == current || p->state == TASK_RUNNING) | ||
386 | return 0; | ||
387 | |||
384 | /* | 388 | /* |
385 | * These bracket the sleeping functions.. | 389 | * These bracket the sleeping functions.. |
386 | */ | 390 | */ |
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index 566226d78bc9..549f5484342c 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c | |||
@@ -63,7 +63,7 @@ extern int update_cr16_clocksource(void); /* from time.c */ | |||
63 | ** will call register_parisc_driver(&cpu_driver) before calling do_inventory(). | 63 | ** will call register_parisc_driver(&cpu_driver) before calling do_inventory(). |
64 | ** | 64 | ** |
65 | ** The goal of consolidating CPU initialization into one place is | 65 | ** The goal of consolidating CPU initialization into one place is |
66 | ** to make sure all CPU's get initialized the same way. | 66 | ** to make sure all CPUs get initialized the same way. |
67 | ** The code path not shared is how PDC hands control of the CPU to the OS. | 67 | ** The code path not shared is how PDC hands control of the CPU to the OS. |
68 | ** The initialization of OS data structures is the same (done below). | 68 | ** The initialization of OS data structures is the same (done below). |
69 | */ | 69 | */ |
@@ -76,7 +76,7 @@ extern int update_cr16_clocksource(void); /* from time.c */ | |||
76 | * (return 1). If so, initialize the chip and tell other partners in crime | 76 | * (return 1). If so, initialize the chip and tell other partners in crime |
77 | * they have work to do. | 77 | * they have work to do. |
78 | */ | 78 | */ |
79 | static int __init processor_probe(struct parisc_device *dev) | 79 | static int __cpuinit processor_probe(struct parisc_device *dev) |
80 | { | 80 | { |
81 | unsigned long txn_addr; | 81 | unsigned long txn_addr; |
82 | unsigned long cpuid; | 82 | unsigned long cpuid; |
@@ -166,7 +166,7 @@ static int __init processor_probe(struct parisc_device *dev) | |||
166 | #endif | 166 | #endif |
167 | 167 | ||
168 | /* | 168 | /* |
169 | ** CONFIG_SMP: init_smp_config() will attempt to get CPU's into | 169 | ** CONFIG_SMP: init_smp_config() will attempt to get CPUs into |
170 | ** OS control. RENDEZVOUS is the default state - see mem_set above. | 170 | ** OS control. RENDEZVOUS is the default state - see mem_set above. |
171 | ** p->state = STATE_RENDEZVOUS; | 171 | ** p->state = STATE_RENDEZVOUS; |
172 | */ | 172 | */ |
@@ -334,7 +334,7 @@ int __init init_per_cpu(int cpunum) | |||
334 | } | 334 | } |
335 | 335 | ||
336 | /* | 336 | /* |
337 | * Display cpu info for all cpu's. | 337 | * Display CPU info for all CPUs. |
338 | */ | 338 | */ |
339 | int | 339 | int |
340 | show_cpuinfo (struct seq_file *m, void *v) | 340 | show_cpuinfo (struct seq_file *m, void *v) |
@@ -381,19 +381,19 @@ show_cpuinfo (struct seq_file *m, void *v) | |||
381 | return 0; | 381 | return 0; |
382 | } | 382 | } |
383 | 383 | ||
384 | static struct parisc_device_id processor_tbl[] __read_mostly = { | 384 | static const struct parisc_device_id processor_tbl[] = { |
385 | { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID }, | 385 | { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID }, |
386 | { 0, } | 386 | { 0, } |
387 | }; | 387 | }; |
388 | 388 | ||
389 | static struct parisc_driver cpu_driver __read_mostly = { | 389 | static struct parisc_driver cpu_driver = { |
390 | .name = "CPU", | 390 | .name = "CPU", |
391 | .id_table = processor_tbl, | 391 | .id_table = processor_tbl, |
392 | .probe = processor_probe | 392 | .probe = processor_probe |
393 | }; | 393 | }; |
394 | 394 | ||
395 | /** | 395 | /** |
396 | * processor_init - Processor initalization procedure. | 396 | * processor_init - Processor initialization procedure. |
397 | * | 397 | * |
398 | * Register this driver. | 398 | * Register this driver. |
399 | */ | 399 | */ |
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c index 9818919571fd..c44b8c51f5d1 100644 --- a/arch/parisc/kernel/setup.c +++ b/arch/parisc/kernel/setup.c | |||
@@ -45,7 +45,7 @@ | |||
45 | #include <asm/io.h> | 45 | #include <asm/io.h> |
46 | #include <asm/setup.h> | 46 | #include <asm/setup.h> |
47 | 47 | ||
48 | char __initdata command_line[COMMAND_LINE_SIZE]; | 48 | static char __initdata command_line[COMMAND_LINE_SIZE]; |
49 | 49 | ||
50 | /* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */ | 50 | /* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */ |
51 | struct proc_dir_entry * proc_runway_root __read_mostly = NULL; | 51 | struct proc_dir_entry * proc_runway_root __read_mostly = NULL; |
@@ -162,7 +162,7 @@ void __init setup_arch(char **cmdline_p) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | /* | 164 | /* |
165 | * Display cpu info for all cpu's. | 165 | * Display CPU info for all CPUs. |
166 | * for parisc this is in processor.c | 166 | * for parisc this is in processor.c |
167 | */ | 167 | */ |
168 | extern int show_cpuinfo (struct seq_file *m, void *v); | 168 | extern int show_cpuinfo (struct seq_file *m, void *v); |
@@ -225,6 +225,7 @@ static void __init parisc_proc_mkdir(void) | |||
225 | } | 225 | } |
226 | break; | 226 | break; |
227 | case mako: | 227 | case mako: |
228 | case mako2: | ||
228 | if (NULL == proc_mckinley_root) | 229 | if (NULL == proc_mckinley_root) |
229 | { | 230 | { |
230 | proc_mckinley_root = proc_mkdir("bus/mckinley", NULL); | 231 | proc_mckinley_root = proc_mkdir("bus/mckinley", NULL); |
diff --git a/arch/parisc/kernel/signal32.h b/arch/parisc/kernel/signal32.h index e39b38a67a87..c7800846422c 100644 --- a/arch/parisc/kernel/signal32.h +++ b/arch/parisc/kernel/signal32.h | |||
@@ -113,7 +113,7 @@ int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from); | |||
113 | /* In a deft move of uber-hackery, we decide to carry the top half of all | 113 | /* In a deft move of uber-hackery, we decide to carry the top half of all |
114 | * 64-bit registers in a non-portable, non-ABI, hidden structure. | 114 | * 64-bit registers in a non-portable, non-ABI, hidden structure. |
115 | * Userspace can read the hidden structure if it *wants* but is never | 115 | * Userspace can read the hidden structure if it *wants* but is never |
116 | * guaranteed to be in the same place. Infact the uc_sigmask from the | 116 | * guaranteed to be in the same place. In fact the uc_sigmask from the |
117 | * ucontext_t structure may push the hidden register file downards | 117 | * ucontext_t structure may push the hidden register file downards |
118 | */ | 118 | */ |
119 | struct compat_regfile { | 119 | struct compat_regfile { |
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 6ba9257fdb7f..04c7e1d36cea 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -8,7 +8,7 @@ | |||
8 | ** Lots of stuff stolen from arch/alpha/kernel/smp.c | 8 | ** Lots of stuff stolen from arch/alpha/kernel/smp.c |
9 | ** ...and then parisc stole from arch/ia64/kernel/smp.c. Thanks David! :^) | 9 | ** ...and then parisc stole from arch/ia64/kernel/smp.c. Thanks David! :^) |
10 | ** | 10 | ** |
11 | ** Thanks to John Curry and Ullas Ponnadi. I learned alot from their work. | 11 | ** Thanks to John Curry and Ullas Ponnadi. I learned a lot from their work. |
12 | ** -grant (1/12/2001) | 12 | ** -grant (1/12/2001) |
13 | ** | 13 | ** |
14 | ** This program is free software; you can redistribute it and/or modify | 14 | ** This program is free software; you can redistribute it and/or modify |
@@ -419,7 +419,7 @@ smp_cpu_init(int cpunum) | |||
419 | BUG(); | 419 | BUG(); |
420 | enter_lazy_tlb(&init_mm, current); | 420 | enter_lazy_tlb(&init_mm, current); |
421 | 421 | ||
422 | init_IRQ(); /* make sure no IRQ's are enabled or pending */ | 422 | init_IRQ(); /* make sure no IRQs are enabled or pending */ |
423 | start_cpu_itimer(); | 423 | start_cpu_itimer(); |
424 | } | 424 | } |
425 | 425 | ||
@@ -461,7 +461,7 @@ void __init smp_callin(void) | |||
461 | /* | 461 | /* |
462 | * Bring one cpu online. | 462 | * Bring one cpu online. |
463 | */ | 463 | */ |
464 | int __init smp_boot_one_cpu(int cpuid) | 464 | int __cpuinit smp_boot_one_cpu(int cpuid) |
465 | { | 465 | { |
466 | struct task_struct *idle; | 466 | struct task_struct *idle; |
467 | long timeout; | 467 | long timeout; |
@@ -552,7 +552,7 @@ void __devinit smp_prepare_boot_cpu(void) | |||
552 | 552 | ||
553 | /* | 553 | /* |
554 | ** inventory.c:do_inventory() hasn't yet been run and thus we | 554 | ** inventory.c:do_inventory() hasn't yet been run and thus we |
555 | ** don't 'discover' the additional CPU's until later. | 555 | ** don't 'discover' the additional CPUs until later. |
556 | */ | 556 | */ |
557 | void __init smp_prepare_cpus(unsigned int max_cpus) | 557 | void __init smp_prepare_cpus(unsigned int max_cpus) |
558 | { | 558 | { |
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c index ce3245f87fdd..bb23ff71c28e 100644 --- a/arch/parisc/kernel/sys_parisc32.c +++ b/arch/parisc/kernel/sys_parisc32.c | |||
@@ -311,14 +311,13 @@ struct readdir32_callback { | |||
311 | int count; | 311 | int count; |
312 | }; | 312 | }; |
313 | 313 | ||
314 | #define ROUND_UP(x,a) ((__typeof__(x))(((unsigned long)(x) + ((a) - 1)) & ~((a) - 1))) | ||
315 | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) | 314 | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) |
316 | static int filldir32 (void *__buf, const char *name, int namlen, | 315 | static int filldir32 (void *__buf, const char *name, int namlen, |
317 | loff_t offset, u64 ino, unsigned int d_type) | 316 | loff_t offset, u64 ino, unsigned int d_type) |
318 | { | 317 | { |
319 | struct linux32_dirent __user * dirent; | 318 | struct linux32_dirent __user * dirent; |
320 | struct getdents32_callback * buf = (struct getdents32_callback *) __buf; | 319 | struct getdents32_callback * buf = (struct getdents32_callback *) __buf; |
321 | int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1, 4); | 320 | int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, 4); |
322 | u32 d_ino; | 321 | u32 d_ino; |
323 | 322 | ||
324 | buf->error = -EINVAL; /* only used if we fail.. */ | 323 | buf->error = -EINVAL; /* only used if we fail.. */ |
@@ -350,6 +349,10 @@ sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count) | |||
350 | struct getdents32_callback buf; | 349 | struct getdents32_callback buf; |
351 | int error; | 350 | int error; |
352 | 351 | ||
352 | error = -EFAULT; | ||
353 | if (!access_ok(VERIFY_WRITE, dirent, count)) | ||
354 | goto out; | ||
355 | |||
353 | error = -EBADF; | 356 | error = -EBADF; |
354 | file = fget(fd); | 357 | file = fget(fd); |
355 | if (!file) | 358 | if (!file) |
@@ -366,8 +369,10 @@ sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count) | |||
366 | error = buf.error; | 369 | error = buf.error; |
367 | lastdirent = buf.previous; | 370 | lastdirent = buf.previous; |
368 | if (lastdirent) { | 371 | if (lastdirent) { |
369 | put_user(file->f_pos, &lastdirent->d_off); | 372 | if (put_user(file->f_pos, &lastdirent->d_off)) |
370 | error = count - buf.count; | 373 | error = -EFAULT; |
374 | else | ||
375 | error = count - buf.count; | ||
371 | } | 376 | } |
372 | 377 | ||
373 | out_putf: | 378 | out_putf: |
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 10859f53e94f..56f6231cb863 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S | |||
@@ -181,7 +181,7 @@ linux_gateway_entry: | |||
181 | /* Are we being ptraced? */ | 181 | /* Are we being ptraced? */ |
182 | mfctl %cr30, %r1 | 182 | mfctl %cr30, %r1 |
183 | LDREG TI_TASK(%r1),%r1 | 183 | LDREG TI_TASK(%r1),%r1 |
184 | LDREG TASK_PTRACE(%r1), %r1 | 184 | ldw TASK_PTRACE(%r1), %r1 |
185 | bb,<,n %r1,31,.Ltracesys | 185 | bb,<,n %r1,31,.Ltracesys |
186 | 186 | ||
187 | /* Note! We cannot use the syscall table that is mapped | 187 | /* Note! We cannot use the syscall table that is mapped |
@@ -198,7 +198,7 @@ linux_gateway_entry: | |||
198 | ldil L%sys_call_table, %r1 | 198 | ldil L%sys_call_table, %r1 |
199 | ldo R%sys_call_table(%r1), %r19 | 199 | ldo R%sys_call_table(%r1), %r19 |
200 | #endif | 200 | #endif |
201 | comiclr,>>= __NR_Linux_syscalls, %r20, %r0 | 201 | comiclr,>> __NR_Linux_syscalls, %r20, %r0 |
202 | b,n .Lsyscall_nosys | 202 | b,n .Lsyscall_nosys |
203 | 203 | ||
204 | LDREGX %r20(%r19), %r19 | 204 | LDREGX %r20(%r19), %r19 |
@@ -501,7 +501,7 @@ lws_compare_and_swap: | |||
501 | shlw %r20, 4, %r20 | 501 | shlw %r20, 4, %r20 |
502 | add %r20, %r28, %r20 | 502 | add %r20, %r28, %r20 |
503 | 503 | ||
504 | # ifdef ENABLE_LWS_DEBUG | 504 | # if ENABLE_LWS_DEBUG |
505 | /* | 505 | /* |
506 | DEBUG, check for deadlock! | 506 | DEBUG, check for deadlock! |
507 | If the thread register values are the same | 507 | If the thread register values are the same |
@@ -550,7 +550,7 @@ cas_wouldblock: | |||
550 | perspective | 550 | perspective |
551 | */ | 551 | */ |
552 | cas_action: | 552 | cas_action: |
553 | #if defined CONFIG_SMP && defined ENABLE_LWS_DEBUG | 553 | #if defined CONFIG_SMP && ENABLE_LWS_DEBUG |
554 | /* DEBUG */ | 554 | /* DEBUG */ |
555 | mfctl %cr27, %r1 | 555 | mfctl %cr27, %r1 |
556 | stw %r1, 4(%sr2,%r20) | 556 | stw %r1, 4(%sr2,%r20) |
@@ -562,7 +562,7 @@ cas_action: | |||
562 | #ifdef CONFIG_SMP | 562 | #ifdef CONFIG_SMP |
563 | /* Free lock */ | 563 | /* Free lock */ |
564 | stw %r20, 0(%sr2,%r20) | 564 | stw %r20, 0(%sr2,%r20) |
565 | # ifdef ENABLE_LWS_DEBUG | 565 | # if ENABLE_LWS_DEBUG |
566 | /* Clear thread register indicator */ | 566 | /* Clear thread register indicator */ |
567 | stw %r0, 4(%sr2,%r20) | 567 | stw %r0, 4(%sr2,%r20) |
568 | # endif | 568 | # endif |
@@ -576,7 +576,7 @@ cas_action: | |||
576 | #ifdef CONFIG_SMP | 576 | #ifdef CONFIG_SMP |
577 | /* Free lock */ | 577 | /* Free lock */ |
578 | stw %r20, 0(%sr2,%r20) | 578 | stw %r20, 0(%sr2,%r20) |
579 | # ifdef ENABLE_LWS_DEBUG | 579 | # if ENABLE_LWS_DEBUG |
580 | stw %r0, 4(%sr2,%r20) | 580 | stw %r0, 4(%sr2,%r20) |
581 | # endif | 581 | # endif |
582 | #endif | 582 | #endif |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 8bf87e5d9c37..627f3c28ad8c 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -30,11 +30,6 @@ | |||
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #undef ENTRY_SAME | ||
34 | #undef ENTRY_DIFF | ||
35 | #undef ENTRY_UHOH | ||
36 | #undef ENTRY_COMP | ||
37 | #undef ENTRY_OURS | ||
38 | #if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT) | 33 | #if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT) |
39 | /* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and | 34 | /* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and |
40 | * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific | 35 | * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific |
@@ -405,5 +400,16 @@ | |||
405 | ENTRY_SAME(epoll_pwait) | 400 | ENTRY_SAME(epoll_pwait) |
406 | ENTRY_COMP(statfs64) | 401 | ENTRY_COMP(statfs64) |
407 | ENTRY_COMP(fstatfs64) | 402 | ENTRY_COMP(fstatfs64) |
403 | ENTRY_COMP(kexec_load) /* 300 */ | ||
404 | ENTRY_COMP(utimensat) | ||
405 | ENTRY_COMP(signalfd) | ||
406 | ENTRY_COMP(timerfd) | ||
407 | ENTRY_SAME(eventfd) | ||
408 | |||
408 | /* Nothing yet */ | 409 | /* Nothing yet */ |
409 | 410 | ||
411 | #undef ENTRY_SAME | ||
412 | #undef ENTRY_DIFF | ||
413 | #undef ENTRY_UHOH | ||
414 | #undef ENTRY_COMP | ||
415 | #undef ENTRY_OURS | ||
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index 07a991aa9b0c..8b3062a5c812 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c | |||
@@ -191,7 +191,7 @@ int update_cr16_clocksource(void) | |||
191 | { | 191 | { |
192 | int change = 0; | 192 | int change = 0; |
193 | 193 | ||
194 | /* since the cr16 cycle counters are not syncronized across CPUs, | 194 | /* since the cr16 cycle counters are not synchronized across CPUs, |
195 | we'll check if we should switch to a safe clocksource: */ | 195 | we'll check if we should switch to a safe clocksource: */ |
196 | if (clocksource_cr16.rating != 0 && num_online_cpus() > 1) { | 196 | if (clocksource_cr16.rating != 0 && num_online_cpus() > 1) { |
197 | clocksource_change_rating(&clocksource_cr16, 0); | 197 | clocksource_change_rating(&clocksource_cr16, 0); |
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 745ff741490a..c3ec9f1ec0f3 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c | |||
@@ -615,7 +615,7 @@ void handle_interruption(int code, struct pt_regs *regs) | |||
615 | 615 | ||
616 | case 13: | 616 | case 13: |
617 | /* Conditional Trap | 617 | /* Conditional Trap |
618 | The condition succees in an instruction which traps | 618 | The condition succeeds in an instruction which traps |
619 | on condition */ | 619 | on condition */ |
620 | if(user_mode(regs)){ | 620 | if(user_mode(regs)){ |
621 | si.si_signo = SIGFPE; | 621 | si.si_signo = SIGFPE; |
@@ -802,13 +802,14 @@ void handle_interruption(int code, struct pt_regs *regs) | |||
802 | 802 | ||
803 | int __init check_ivt(void *iva) | 803 | int __init check_ivt(void *iva) |
804 | { | 804 | { |
805 | extern const u32 os_hpmc[]; | ||
806 | extern const u32 os_hpmc_end[]; | ||
807 | |||
805 | int i; | 808 | int i; |
806 | u32 check = 0; | 809 | u32 check = 0; |
807 | u32 *ivap; | 810 | u32 *ivap; |
808 | u32 *hpmcp; | 811 | u32 *hpmcp; |
809 | u32 length; | 812 | u32 length; |
810 | extern void os_hpmc(void); | ||
811 | extern void os_hpmc_end(void); | ||
812 | 813 | ||
813 | if (strcmp((char *)iva, "cows can fly")) | 814 | if (strcmp((char *)iva, "cows can fly")) |
814 | return -1; | 815 | return -1; |
@@ -820,7 +821,7 @@ int __init check_ivt(void *iva) | |||
820 | 821 | ||
821 | /* Compute Checksum for HPMC handler */ | 822 | /* Compute Checksum for HPMC handler */ |
822 | 823 | ||
823 | length = (u32)((unsigned long)os_hpmc_end - (unsigned long)os_hpmc); | 824 | length = os_hpmc_end - os_hpmc; |
824 | ivap[7] = length; | 825 | ivap[7] = length; |
825 | 826 | ||
826 | hpmcp = (u32 *)os_hpmc; | 827 | hpmcp = (u32 *)os_hpmc; |
diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c index 89c03707eccc..e70f57e27643 100644 --- a/arch/parisc/kernel/unwind.c +++ b/arch/parisc/kernel/unwind.c | |||
@@ -216,8 +216,10 @@ static void unwind_frame_regs(struct unwind_frame_info *info) | |||
216 | /* Handle some frequent special cases.... */ | 216 | /* Handle some frequent special cases.... */ |
217 | { | 217 | { |
218 | char symname[KSYM_NAME_LEN+1]; | 218 | char symname[KSYM_NAME_LEN+1]; |
219 | char *modname; | ||
219 | 220 | ||
220 | kallsyms_lookup(info->ip, NULL, NULL, NULL, symname); | 221 | kallsyms_lookup(info->ip, NULL, NULL, &modname, |
222 | symname); | ||
221 | 223 | ||
222 | dbg("info->ip = 0x%lx, name = %s\n", info->ip, symname); | 224 | dbg("info->ip = 0x%lx, name = %s\n", info->ip, symname); |
223 | 225 | ||
diff --git a/arch/parisc/math-emu/dbl_float.h b/arch/parisc/math-emu/dbl_float.h index 1570e2e0a327..0c2fa9a951b3 100644 --- a/arch/parisc/math-emu/dbl_float.h +++ b/arch/parisc/math-emu/dbl_float.h | |||
@@ -22,7 +22,7 @@ | |||
22 | PA header file -- do not include this header file for non-PA builds. | 22 | PA header file -- do not include this header file for non-PA builds. |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | /* 32-bit word grabing functions */ | 25 | /* 32-bit word grabbing functions */ |
26 | #define Dbl_firstword(value) Dallp1(value) | 26 | #define Dbl_firstword(value) Dallp1(value) |
27 | #define Dbl_secondword(value) Dallp2(value) | 27 | #define Dbl_secondword(value) Dallp2(value) |
28 | #define Dbl_thirdword(value) dummy_location | 28 | #define Dbl_thirdword(value) dummy_location |
@@ -37,7 +37,7 @@ | |||
37 | #define Dbl_allp1(object) Dallp1(object) | 37 | #define Dbl_allp1(object) Dallp1(object) |
38 | #define Dbl_allp2(object) Dallp2(object) | 38 | #define Dbl_allp2(object) Dallp2(object) |
39 | 39 | ||
40 | /* dbl_and_signs ands the sign bits of each argument and puts the result | 40 | /* dbl_and_signs ANDs the sign bits of each argument and puts the result |
41 | * into the first argument. dbl_or_signs ors those same sign bits */ | 41 | * into the first argument. dbl_or_signs ors those same sign bits */ |
42 | #define Dbl_and_signs( src1dst, src2) \ | 42 | #define Dbl_and_signs( src1dst, src2) \ |
43 | Dallp1(src1dst) = (Dallp1(src2)|~((unsigned int)1<<31)) & Dallp1(src1dst) | 43 | Dallp1(src1dst) = (Dallp1(src2)|~((unsigned int)1<<31)) & Dallp1(src1dst) |
diff --git a/arch/parisc/math-emu/dfsqrt.c b/arch/parisc/math-emu/dfsqrt.c index b6ed1066f1e4..9542c6d281a5 100644 --- a/arch/parisc/math-emu/dfsqrt.c +++ b/arch/parisc/math-emu/dfsqrt.c | |||
@@ -76,7 +76,7 @@ dbl_fsqrt( | |||
76 | } | 76 | } |
77 | /* | 77 | /* |
78 | * Return quiet NaN or positive infinity. | 78 | * Return quiet NaN or positive infinity. |
79 | * Fall thru to negative test if negative infinity. | 79 | * Fall through to negative test if negative infinity. |
80 | */ | 80 | */ |
81 | if (Dbl_iszero_sign(srcp1) || | 81 | if (Dbl_iszero_sign(srcp1) || |
82 | Dbl_isnotzero_mantissa(srcp1,srcp2)) { | 82 | Dbl_isnotzero_mantissa(srcp1,srcp2)) { |
diff --git a/arch/parisc/math-emu/sfsqrt.c b/arch/parisc/math-emu/sfsqrt.c index cd3f6db1f6fb..4657a12c9107 100644 --- a/arch/parisc/math-emu/sfsqrt.c +++ b/arch/parisc/math-emu/sfsqrt.c | |||
@@ -76,7 +76,7 @@ sgl_fsqrt( | |||
76 | } | 76 | } |
77 | /* | 77 | /* |
78 | * Return quiet NaN or positive infinity. | 78 | * Return quiet NaN or positive infinity. |
79 | * Fall thru to negative test if negative infinity. | 79 | * Fall through to negative test if negative infinity. |
80 | */ | 80 | */ |
81 | if (Sgl_iszero_sign(src) || Sgl_isnotzero_mantissa(src)) { | 81 | if (Sgl_iszero_sign(src) || Sgl_isnotzero_mantissa(src)) { |
82 | *dstptr = src; | 82 | *dstptr = src; |
diff --git a/arch/parisc/math-emu/sgl_float.h b/arch/parisc/math-emu/sgl_float.h index 82519a5c2ba5..4ee4cc95e4bf 100644 --- a/arch/parisc/math-emu/sgl_float.h +++ b/arch/parisc/math-emu/sgl_float.h | |||
@@ -23,7 +23,7 @@ | |||
23 | PA header file -- do not include this header file for non-PA builds. | 23 | PA header file -- do not include this header file for non-PA builds. |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | /* 32-bit word grabing functions */ | 26 | /* 32-bit word grabbing functions */ |
27 | #define Sgl_firstword(value) Sall(value) | 27 | #define Sgl_firstword(value) Sall(value) |
28 | #define Sgl_secondword(value) dummy_location | 28 | #define Sgl_secondword(value) dummy_location |
29 | #define Sgl_thirdword(value) dummy_location | 29 | #define Sgl_thirdword(value) dummy_location |
@@ -36,7 +36,7 @@ | |||
36 | #define Sgl_exponentmantissa(object) Sexponentmantissa(object) | 36 | #define Sgl_exponentmantissa(object) Sexponentmantissa(object) |
37 | #define Sgl_all(object) Sall(object) | 37 | #define Sgl_all(object) Sall(object) |
38 | 38 | ||
39 | /* sgl_and_signs ands the sign bits of each argument and puts the result | 39 | /* sgl_and_signs ANDs the sign bits of each argument and puts the result |
40 | * into the first argument. sgl_or_signs ors those same sign bits */ | 40 | * into the first argument. sgl_or_signs ors those same sign bits */ |
41 | #define Sgl_and_signs( src1dst, src2) \ | 41 | #define Sgl_and_signs( src1dst, src2) \ |
42 | Sall(src1dst) = (Sall(src2)|~((unsigned int)1<<31)) & Sall(src1dst) | 42 | Sall(src1dst) = (Sall(src2)|~((unsigned int)1<<31)) & Sall(src1dst) |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 75ea9f2a8a41..e724b362c49a 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -890,7 +890,7 @@ void __init paging_init(void) | |||
890 | #ifdef CONFIG_PA20 | 890 | #ifdef CONFIG_PA20 |
891 | 891 | ||
892 | /* | 892 | /* |
893 | * Currently, all PA20 chips have 18 bit protection id's, which is the | 893 | * Currently, all PA20 chips have 18 bit protection IDs, which is the |
894 | * limiting factor (space ids are 32 bits). | 894 | * limiting factor (space ids are 32 bits). |
895 | */ | 895 | */ |
896 | 896 | ||
@@ -899,10 +899,10 @@ void __init paging_init(void) | |||
899 | #else | 899 | #else |
900 | 900 | ||
901 | /* | 901 | /* |
902 | * Currently we have a one-to-one relationship between space id's and | 902 | * Currently we have a one-to-one relationship between space IDs and |
903 | * protection id's. Older parisc chips (PCXS, PCXT, PCXL, PCXL2) only | 903 | * protection IDs. Older parisc chips (PCXS, PCXT, PCXL, PCXL2) only |
904 | * support 15 bit protection id's, so that is the limiting factor. | 904 | * support 15 bit protection IDs, so that is the limiting factor. |
905 | * PCXT' has 18 bit protection id's, but only 16 bit spaceids, so it's | 905 | * PCXT' has 18 bit protection IDs, but only 16 bit spaceids, so it's |
906 | * probably not worth the effort for a special case here. | 906 | * probably not worth the effort for a special case here. |
907 | */ | 907 | */ |
908 | 908 | ||
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c index 87703df87509..cbca1df8bc60 100644 --- a/arch/powerpc/kernel/udbg.c +++ b/arch/powerpc/kernel/udbg.c | |||
@@ -151,12 +151,18 @@ static struct console udbg_console = { | |||
151 | 151 | ||
152 | static int early_console_initialized; | 152 | static int early_console_initialized; |
153 | 153 | ||
154 | /* called by setup_system */ | 154 | /* |
155 | * Called by setup_system after ppc_md->probe and ppc_md->early_init. | ||
156 | * Call it again after setting udbg_putc in ppc_md->setup_arch. | ||
157 | */ | ||
155 | void register_early_udbg_console(void) | 158 | void register_early_udbg_console(void) |
156 | { | 159 | { |
157 | if (early_console_initialized) | 160 | if (early_console_initialized) |
158 | return; | 161 | return; |
159 | 162 | ||
163 | if (!udbg_putc) | ||
164 | return; | ||
165 | |||
160 | if (strstr(boot_command_line, "udbg-immortal")) { | 166 | if (strstr(boot_command_line, "udbg-immortal")) { |
161 | printk(KERN_INFO "early console immortal !\n"); | 167 | printk(KERN_INFO "early console immortal !\n"); |
162 | udbg_console.flags &= ~CON_BOOT; | 168 | udbg_console.flags &= ~CON_BOOT; |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 07b1c4ec428d..956571526a57 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -363,8 +363,19 @@ static void __init pmac_setup_arch(void) | |||
363 | smp_ops = &core99_smp_ops; | 363 | smp_ops = &core99_smp_ops; |
364 | } | 364 | } |
365 | #ifdef CONFIG_PPC32 | 365 | #ifdef CONFIG_PPC32 |
366 | else | 366 | else { |
367 | /* | ||
368 | * We have to set bits in cpu_possible_map here since the | ||
369 | * secondary CPU(s) aren't in the device tree, and | ||
370 | * setup_per_cpu_areas only allocates per-cpu data for | ||
371 | * CPUs in the cpu_possible_map. | ||
372 | */ | ||
373 | int cpu; | ||
374 | |||
375 | for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu) | ||
376 | cpu_set(cpu, cpu_possible_map); | ||
367 | smp_ops = &psurge_smp_ops; | 377 | smp_ops = &psurge_smp_ops; |
378 | } | ||
368 | #endif | 379 | #endif |
369 | #endif /* CONFIG_SMP */ | 380 | #endif /* CONFIG_SMP */ |
370 | 381 | ||
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 686ed82bde79..cb2d894541c6 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -317,7 +317,6 @@ static int __init smp_psurge_probe(void) | |||
317 | ncpus = NR_CPUS; | 317 | ncpus = NR_CPUS; |
318 | for (i = 1; i < ncpus ; ++i) { | 318 | for (i = 1; i < ncpus ; ++i) { |
319 | cpu_set(i, cpu_present_map); | 319 | cpu_set(i, cpu_present_map); |
320 | cpu_set(i, cpu_possible_map); | ||
321 | set_hard_smp_processor_id(i, i); | 320 | set_hard_smp_processor_id(i, i); |
322 | } | 321 | } |
323 | 322 | ||
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 7d1a11822a1e..8059531bf0ac 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -2357,8 +2357,9 @@ sun4v_ldc_unmap: | |||
2357 | nop | 2357 | nop |
2358 | .size sun4v_ldc_unmap, .-sun4v_ldc_unmap | 2358 | .size sun4v_ldc_unmap, .-sun4v_ldc_unmap |
2359 | 2359 | ||
2360 | /* %o0: cookie | 2360 | /* %o0: channel |
2361 | * %o1: mte_cookie | 2361 | * %o1: cookie |
2362 | * %o2: mte_cookie | ||
2362 | * | 2363 | * |
2363 | * returns %o0: status | 2364 | * returns %o0: status |
2364 | */ | 2365 | */ |
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index a36f8dd0c021..e60d283f60bc 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* $Id: irq.c,v 1.114 2002/01/11 08:45:38 davem Exp $ | 1 | /* irq.c: UltraSparc IRQ handling/init/registry. |
2 | * irq.c: UltraSparc IRQ handling/init/registry. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1997, 2007 David S. Miller (davem@davemloft.net) |
5 | * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) |
6 | * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) | 5 | * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) |
7 | */ | 6 | */ |
@@ -43,6 +42,7 @@ | |||
43 | #include <asm/cpudata.h> | 42 | #include <asm/cpudata.h> |
44 | #include <asm/auxio.h> | 43 | #include <asm/auxio.h> |
45 | #include <asm/head.h> | 44 | #include <asm/head.h> |
45 | #include <asm/hypervisor.h> | ||
46 | 46 | ||
47 | /* UPA nodes send interrupt packet to UltraSparc with first data reg | 47 | /* UPA nodes send interrupt packet to UltraSparc with first data reg |
48 | * value low 5 (7 on Starfire) bits holding the IRQ identifier being | 48 | * value low 5 (7 on Starfire) bits holding the IRQ identifier being |
@@ -380,6 +380,76 @@ static void sun4v_irq_end(unsigned int virt_irq) | |||
380 | } | 380 | } |
381 | } | 381 | } |
382 | 382 | ||
383 | static void sun4v_virq_enable(unsigned int virt_irq) | ||
384 | { | ||
385 | struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); | ||
386 | unsigned int ino = bucket - &ivector_table[0]; | ||
387 | |||
388 | if (likely(bucket)) { | ||
389 | unsigned long cpuid, dev_handle, dev_ino; | ||
390 | int err; | ||
391 | |||
392 | cpuid = irq_choose_cpu(virt_irq); | ||
393 | |||
394 | dev_handle = ino & IMAP_IGN; | ||
395 | dev_ino = ino & IMAP_INO; | ||
396 | |||
397 | err = sun4v_vintr_set_target(dev_handle, dev_ino, cpuid); | ||
398 | if (err != HV_EOK) | ||
399 | printk("sun4v_vintr_set_target(%lx,%lx,%lu): " | ||
400 | "err(%d)\n", | ||
401 | dev_handle, dev_ino, cpuid, err); | ||
402 | err = sun4v_vintr_set_state(dev_handle, dev_ino, | ||
403 | HV_INTR_ENABLED); | ||
404 | if (err != HV_EOK) | ||
405 | printk("sun4v_vintr_set_state(%lx,%lx," | ||
406 | "HV_INTR_ENABLED): err(%d)\n", | ||
407 | dev_handle, dev_ino, err); | ||
408 | } | ||
409 | } | ||
410 | |||
411 | static void sun4v_virq_disable(unsigned int virt_irq) | ||
412 | { | ||
413 | struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); | ||
414 | unsigned int ino = bucket - &ivector_table[0]; | ||
415 | |||
416 | if (likely(bucket)) { | ||
417 | unsigned long dev_handle, dev_ino; | ||
418 | int err; | ||
419 | |||
420 | dev_handle = ino & IMAP_IGN; | ||
421 | dev_ino = ino & IMAP_INO; | ||
422 | |||
423 | err = sun4v_vintr_set_state(dev_handle, dev_ino, | ||
424 | HV_INTR_DISABLED); | ||
425 | if (err != HV_EOK) | ||
426 | printk("sun4v_vintr_set_state(%lx,%lx," | ||
427 | "HV_INTR_DISABLED): err(%d)\n", | ||
428 | dev_handle, dev_ino, err); | ||
429 | } | ||
430 | } | ||
431 | |||
432 | static void sun4v_virq_end(unsigned int virt_irq) | ||
433 | { | ||
434 | struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); | ||
435 | unsigned int ino = bucket - &ivector_table[0]; | ||
436 | |||
437 | if (likely(bucket)) { | ||
438 | unsigned long dev_handle, dev_ino; | ||
439 | int err; | ||
440 | |||
441 | dev_handle = ino & IMAP_IGN; | ||
442 | dev_ino = ino & IMAP_INO; | ||
443 | |||
444 | err = sun4v_vintr_set_state(dev_handle, dev_ino, | ||
445 | HV_INTR_STATE_IDLE); | ||
446 | if (err != HV_EOK) | ||
447 | printk("sun4v_vintr_set_state(%lx,%lx," | ||
448 | "HV_INTR_STATE_IDLE): err(%d)\n", | ||
449 | dev_handle, dev_ino, err); | ||
450 | } | ||
451 | } | ||
452 | |||
383 | static void run_pre_handler(unsigned int virt_irq) | 453 | static void run_pre_handler(unsigned int virt_irq) |
384 | { | 454 | { |
385 | struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); | 455 | struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); |
@@ -434,6 +504,21 @@ static struct irq_chip sun4v_msi = { | |||
434 | }; | 504 | }; |
435 | #endif | 505 | #endif |
436 | 506 | ||
507 | static struct irq_chip sun4v_virq = { | ||
508 | .typename = "vsun4v", | ||
509 | .enable = sun4v_virq_enable, | ||
510 | .disable = sun4v_virq_disable, | ||
511 | .end = sun4v_virq_end, | ||
512 | }; | ||
513 | |||
514 | static struct irq_chip sun4v_virq_ack = { | ||
515 | .typename = "vsun4v+ack", | ||
516 | .enable = sun4v_virq_enable, | ||
517 | .disable = sun4v_virq_disable, | ||
518 | .ack = run_pre_handler, | ||
519 | .end = sun4v_virq_end, | ||
520 | }; | ||
521 | |||
437 | void irq_install_pre_handler(int virt_irq, | 522 | void irq_install_pre_handler(int virt_irq, |
438 | void (*func)(unsigned int, void *, void *), | 523 | void (*func)(unsigned int, void *, void *), |
439 | void *arg1, void *arg2) | 524 | void *arg1, void *arg2) |
@@ -447,7 +532,8 @@ void irq_install_pre_handler(int virt_irq, | |||
447 | 532 | ||
448 | chip = get_irq_chip(virt_irq); | 533 | chip = get_irq_chip(virt_irq); |
449 | if (chip == &sun4u_irq_ack || | 534 | if (chip == &sun4u_irq_ack || |
450 | chip == &sun4v_irq_ack | 535 | chip == &sun4v_irq_ack || |
536 | chip == &sun4v_virq_ack | ||
451 | #ifdef CONFIG_PCI_MSI | 537 | #ifdef CONFIG_PCI_MSI |
452 | || chip == &sun4v_msi | 538 | || chip == &sun4v_msi |
453 | #endif | 539 | #endif |
@@ -455,7 +541,9 @@ void irq_install_pre_handler(int virt_irq, | |||
455 | return; | 541 | return; |
456 | 542 | ||
457 | chip = (chip == &sun4u_irq ? | 543 | chip = (chip == &sun4u_irq ? |
458 | &sun4u_irq_ack : &sun4v_irq_ack); | 544 | &sun4u_irq_ack : |
545 | (chip == &sun4v_irq ? | ||
546 | &sun4v_irq_ack : &sun4v_virq_ack)); | ||
459 | set_irq_chip(virt_irq, chip); | 547 | set_irq_chip(virt_irq, chip); |
460 | } | 548 | } |
461 | 549 | ||
@@ -492,19 +580,18 @@ out: | |||
492 | return bucket->virt_irq; | 580 | return bucket->virt_irq; |
493 | } | 581 | } |
494 | 582 | ||
495 | unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino) | 583 | static unsigned int sun4v_build_common(unsigned long sysino, |
584 | struct irq_chip *chip) | ||
496 | { | 585 | { |
497 | struct ino_bucket *bucket; | 586 | struct ino_bucket *bucket; |
498 | struct irq_handler_data *data; | 587 | struct irq_handler_data *data; |
499 | unsigned long sysino; | ||
500 | 588 | ||
501 | BUG_ON(tlb_type != hypervisor); | 589 | BUG_ON(tlb_type != hypervisor); |
502 | 590 | ||
503 | sysino = sun4v_devino_to_sysino(devhandle, devino); | ||
504 | bucket = &ivector_table[sysino]; | 591 | bucket = &ivector_table[sysino]; |
505 | if (!bucket->virt_irq) { | 592 | if (!bucket->virt_irq) { |
506 | bucket->virt_irq = virt_irq_alloc(__irq(bucket)); | 593 | bucket->virt_irq = virt_irq_alloc(__irq(bucket)); |
507 | set_irq_chip(bucket->virt_irq, &sun4v_irq); | 594 | set_irq_chip(bucket->virt_irq, chip); |
508 | } | 595 | } |
509 | 596 | ||
510 | data = get_irq_chip_data(bucket->virt_irq); | 597 | data = get_irq_chip_data(bucket->virt_irq); |
@@ -529,6 +616,32 @@ out: | |||
529 | return bucket->virt_irq; | 616 | return bucket->virt_irq; |
530 | } | 617 | } |
531 | 618 | ||
619 | unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino) | ||
620 | { | ||
621 | unsigned long sysino = sun4v_devino_to_sysino(devhandle, devino); | ||
622 | |||
623 | return sun4v_build_common(sysino, &sun4v_irq); | ||
624 | } | ||
625 | |||
626 | unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) | ||
627 | { | ||
628 | unsigned long sysino, hv_err; | ||
629 | |||
630 | BUG_ON(devhandle & ~IMAP_IGN); | ||
631 | BUG_ON(devino & ~IMAP_INO); | ||
632 | |||
633 | sysino = devhandle | devino; | ||
634 | |||
635 | hv_err = sun4v_vintr_set_cookie(devhandle, devino, sysino); | ||
636 | if (hv_err) { | ||
637 | prom_printf("IRQ: Fatal, cannot set cookie for [%x:%x] " | ||
638 | "err=%lu\n", devhandle, devino, hv_err); | ||
639 | prom_halt(); | ||
640 | } | ||
641 | |||
642 | return sun4v_build_common(sysino, &sun4v_virq); | ||
643 | } | ||
644 | |||
532 | #ifdef CONFIG_PCI_MSI | 645 | #ifdef CONFIG_PCI_MSI |
533 | unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, | 646 | unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, |
534 | unsigned int msi_start, unsigned int msi_end) | 647 | unsigned int msi_start, unsigned int msi_end) |
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c index f974fefc3ebc..4249214608af 100644 --- a/arch/sparc64/kernel/pci_common.c +++ b/arch/sparc64/kernel/pci_common.c | |||
@@ -291,8 +291,9 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm) | |||
291 | 291 | ||
292 | for (i = 0; i < num_pbm_ranges; i++) { | 292 | for (i = 0; i < num_pbm_ranges; i++) { |
293 | const struct linux_prom_pci_ranges *pr = &pbm_ranges[i]; | 293 | const struct linux_prom_pci_ranges *pr = &pbm_ranges[i]; |
294 | unsigned long a; | 294 | unsigned long a, size; |
295 | u32 parent_phys_hi, parent_phys_lo; | 295 | u32 parent_phys_hi, parent_phys_lo; |
296 | u32 size_hi, size_lo; | ||
296 | int type; | 297 | int type; |
297 | 298 | ||
298 | parent_phys_hi = pr->parent_phys_hi; | 299 | parent_phys_hi = pr->parent_phys_hi; |
@@ -300,9 +301,14 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm) | |||
300 | if (tlb_type == hypervisor) | 301 | if (tlb_type == hypervisor) |
301 | parent_phys_hi &= 0x0fffffff; | 302 | parent_phys_hi &= 0x0fffffff; |
302 | 303 | ||
304 | size_hi = pr->size_hi; | ||
305 | size_lo = pr->size_lo; | ||
306 | |||
303 | type = (pr->child_phys_hi >> 24) & 0x3; | 307 | type = (pr->child_phys_hi >> 24) & 0x3; |
304 | a = (((unsigned long)parent_phys_hi << 32UL) | | 308 | a = (((unsigned long)parent_phys_hi << 32UL) | |
305 | ((unsigned long)parent_phys_lo << 0UL)); | 309 | ((unsigned long)parent_phys_lo << 0UL)); |
310 | size = (((unsigned long)size_hi << 32UL) | | ||
311 | ((unsigned long)size_lo << 0UL)); | ||
306 | 312 | ||
307 | switch (type) { | 313 | switch (type) { |
308 | case 0: | 314 | case 0: |
@@ -313,7 +319,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm) | |||
313 | case 1: | 319 | case 1: |
314 | /* 16-bit IO space, 16MB */ | 320 | /* 16-bit IO space, 16MB */ |
315 | pbm->io_space.start = a; | 321 | pbm->io_space.start = a; |
316 | pbm->io_space.end = a + ((16UL*1024UL*1024UL) - 1UL); | 322 | pbm->io_space.end = a + size - 1UL; |
317 | pbm->io_space.flags = IORESOURCE_IO; | 323 | pbm->io_space.flags = IORESOURCE_IO; |
318 | saw_io = 1; | 324 | saw_io = 1; |
319 | break; | 325 | break; |
@@ -321,7 +327,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm) | |||
321 | case 2: | 327 | case 2: |
322 | /* 32-bit MEM space, 2GB */ | 328 | /* 32-bit MEM space, 2GB */ |
323 | pbm->mem_space.start = a; | 329 | pbm->mem_space.start = a; |
324 | pbm->mem_space.end = a + (0x80000000UL - 1UL); | 330 | pbm->mem_space.end = a + size - 1UL; |
325 | pbm->mem_space.flags = IORESOURCE_MEM; | 331 | pbm->mem_space.flags = IORESOURCE_MEM; |
326 | saw_mem = 1; | 332 | saw_mem = 1; |
327 | break; | 333 | break; |