diff options
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/cpu.c | 12 | ||||
-rw-r--r-- | arch/sparc/kernel/cpumap.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/head_64.S | 25 | ||||
-rw-r--r-- | arch/sparc/kernel/process_32.c | 3 | ||||
-rw-r--r-- | arch/sparc/kernel/process_64.c | 3 | ||||
-rw-r--r-- | arch/sparc/kernel/setup_32.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/setup_64.c | 18 |
7 files changed, 51 insertions, 14 deletions
diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c index 9810fd881058..ba9b1cec4e6b 100644 --- a/arch/sparc/kernel/cpu.c +++ b/arch/sparc/kernel/cpu.c | |||
@@ -481,6 +481,18 @@ static void __init sun4v_cpu_probe(void) | |||
481 | sparc_pmu_type = "niagara3"; | 481 | sparc_pmu_type = "niagara3"; |
482 | break; | 482 | break; |
483 | 483 | ||
484 | case SUN4V_CHIP_NIAGARA4: | ||
485 | sparc_cpu_type = "UltraSparc T4 (Niagara4)"; | ||
486 | sparc_fpu_type = "UltraSparc T4 integrated FPU"; | ||
487 | sparc_pmu_type = "niagara4"; | ||
488 | break; | ||
489 | |||
490 | case SUN4V_CHIP_NIAGARA5: | ||
491 | sparc_cpu_type = "UltraSparc T5 (Niagara5)"; | ||
492 | sparc_fpu_type = "UltraSparc T5 integrated FPU"; | ||
493 | sparc_pmu_type = "niagara5"; | ||
494 | break; | ||
495 | |||
484 | default: | 496 | default: |
485 | printk(KERN_WARNING "CPU: Unknown sun4v cpu type [%s]\n", | 497 | printk(KERN_WARNING "CPU: Unknown sun4v cpu type [%s]\n", |
486 | prom_cpu_compatible); | 498 | prom_cpu_compatible); |
diff --git a/arch/sparc/kernel/cpumap.c b/arch/sparc/kernel/cpumap.c index 4197e8d62d4c..9323eafccb93 100644 --- a/arch/sparc/kernel/cpumap.c +++ b/arch/sparc/kernel/cpumap.c | |||
@@ -325,6 +325,8 @@ static int iterate_cpu(struct cpuinfo_tree *t, unsigned int root_index) | |||
325 | case SUN4V_CHIP_NIAGARA1: | 325 | case SUN4V_CHIP_NIAGARA1: |
326 | case SUN4V_CHIP_NIAGARA2: | 326 | case SUN4V_CHIP_NIAGARA2: |
327 | case SUN4V_CHIP_NIAGARA3: | 327 | case SUN4V_CHIP_NIAGARA3: |
328 | case SUN4V_CHIP_NIAGARA4: | ||
329 | case SUN4V_CHIP_NIAGARA5: | ||
328 | rover_inc_table = niagara_iterate_method; | 330 | rover_inc_table = niagara_iterate_method; |
329 | break; | 331 | break; |
330 | default: | 332 | default: |
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S index 0eac1b2fc53d..0d810c2f1d00 100644 --- a/arch/sparc/kernel/head_64.S +++ b/arch/sparc/kernel/head_64.S | |||
@@ -133,7 +133,7 @@ prom_sun4v_name: | |||
133 | prom_niagara_prefix: | 133 | prom_niagara_prefix: |
134 | .asciz "SUNW,UltraSPARC-T" | 134 | .asciz "SUNW,UltraSPARC-T" |
135 | prom_sparc_prefix: | 135 | prom_sparc_prefix: |
136 | .asciz "SPARC-T" | 136 | .asciz "SPARC-" |
137 | .align 4 | 137 | .align 4 |
138 | prom_root_compatible: | 138 | prom_root_compatible: |
139 | .skip 64 | 139 | .skip 64 |
@@ -396,7 +396,7 @@ sun4v_chip_type: | |||
396 | or %g1, %lo(prom_cpu_compatible), %g1 | 396 | or %g1, %lo(prom_cpu_compatible), %g1 |
397 | sethi %hi(prom_sparc_prefix), %g7 | 397 | sethi %hi(prom_sparc_prefix), %g7 |
398 | or %g7, %lo(prom_sparc_prefix), %g7 | 398 | or %g7, %lo(prom_sparc_prefix), %g7 |
399 | mov 7, %g3 | 399 | mov 6, %g3 |
400 | 90: ldub [%g7], %g2 | 400 | 90: ldub [%g7], %g2 |
401 | ldub [%g1], %g4 | 401 | ldub [%g1], %g4 |
402 | cmp %g2, %g4 | 402 | cmp %g2, %g4 |
@@ -408,10 +408,23 @@ sun4v_chip_type: | |||
408 | 408 | ||
409 | sethi %hi(prom_cpu_compatible), %g1 | 409 | sethi %hi(prom_cpu_compatible), %g1 |
410 | or %g1, %lo(prom_cpu_compatible), %g1 | 410 | or %g1, %lo(prom_cpu_compatible), %g1 |
411 | ldub [%g1 + 7], %g2 | 411 | ldub [%g1 + 6], %g2 |
412 | cmp %g2, 'T' | ||
413 | be,pt %xcc, 70f | ||
414 | cmp %g2, 'M' | ||
415 | bne,pn %xcc, 4f | ||
416 | nop | ||
417 | |||
418 | 70: ldub [%g1 + 7], %g2 | ||
412 | cmp %g2, '3' | 419 | cmp %g2, '3' |
413 | be,pt %xcc, 5f | 420 | be,pt %xcc, 5f |
414 | mov SUN4V_CHIP_NIAGARA3, %g4 | 421 | mov SUN4V_CHIP_NIAGARA3, %g4 |
422 | cmp %g2, '4' | ||
423 | be,pt %xcc, 5f | ||
424 | mov SUN4V_CHIP_NIAGARA4, %g4 | ||
425 | cmp %g2, '5' | ||
426 | be,pt %xcc, 5f | ||
427 | mov SUN4V_CHIP_NIAGARA5, %g4 | ||
415 | ba,pt %xcc, 4f | 428 | ba,pt %xcc, 4f |
416 | nop | 429 | nop |
417 | 430 | ||
@@ -545,6 +558,12 @@ niagara_tlb_fixup: | |||
545 | cmp %g1, SUN4V_CHIP_NIAGARA3 | 558 | cmp %g1, SUN4V_CHIP_NIAGARA3 |
546 | be,pt %xcc, niagara2_patch | 559 | be,pt %xcc, niagara2_patch |
547 | nop | 560 | nop |
561 | cmp %g1, SUN4V_CHIP_NIAGARA4 | ||
562 | be,pt %xcc, niagara2_patch | ||
563 | nop | ||
564 | cmp %g1, SUN4V_CHIP_NIAGARA5 | ||
565 | be,pt %xcc, niagara2_patch | ||
566 | nop | ||
548 | 567 | ||
549 | call generic_patch_copyops | 568 | call generic_patch_copyops |
550 | nop | 569 | nop |
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c index c8cc461ff75f..f793742eec2b 100644 --- a/arch/sparc/kernel/process_32.c +++ b/arch/sparc/kernel/process_32.c | |||
@@ -380,8 +380,7 @@ void flush_thread(void) | |||
380 | #endif | 380 | #endif |
381 | } | 381 | } |
382 | 382 | ||
383 | /* Now, this task is no longer a kernel thread. */ | 383 | /* This task is no longer a kernel thread. */ |
384 | current->thread.current_ds = USER_DS; | ||
385 | if (current->thread.flags & SPARC_FLAG_KTHREAD) { | 384 | if (current->thread.flags & SPARC_FLAG_KTHREAD) { |
386 | current->thread.flags &= ~SPARC_FLAG_KTHREAD; | 385 | current->thread.flags &= ~SPARC_FLAG_KTHREAD; |
387 | 386 | ||
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c index c158a95ec664..d959cd0a4aa4 100644 --- a/arch/sparc/kernel/process_64.c +++ b/arch/sparc/kernel/process_64.c | |||
@@ -368,9 +368,6 @@ void flush_thread(void) | |||
368 | 368 | ||
369 | /* Clear FPU register state. */ | 369 | /* Clear FPU register state. */ |
370 | t->fpsaved[0] = 0; | 370 | t->fpsaved[0] = 0; |
371 | |||
372 | if (get_thread_current_ds() != ASI_AIUS) | ||
373 | set_fs(USER_DS); | ||
374 | } | 371 | } |
375 | 372 | ||
376 | /* It's a bit more tricky when 64-bit tasks are involved... */ | 373 | /* It's a bit more tricky when 64-bit tasks are involved... */ |
diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c index d26e1f6c717a..3e3e2914c70b 100644 --- a/arch/sparc/kernel/setup_32.c +++ b/arch/sparc/kernel/setup_32.c | |||
@@ -137,7 +137,7 @@ static void __init process_switch(char c) | |||
137 | prom_halt(); | 137 | prom_halt(); |
138 | break; | 138 | break; |
139 | case 'p': | 139 | case 'p': |
140 | /* Just ignore, this behavior is now the default. */ | 140 | prom_early_console.flags &= ~CON_BOOT; |
141 | break; | 141 | break; |
142 | default: | 142 | default: |
143 | printk("Unknown boot switch (-%c)\n", c); | 143 | printk("Unknown boot switch (-%c)\n", c); |
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index 3c5bb784214f..c965595aa7e9 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c | |||
@@ -106,7 +106,7 @@ static void __init process_switch(char c) | |||
106 | prom_halt(); | 106 | prom_halt(); |
107 | break; | 107 | break; |
108 | case 'p': | 108 | case 'p': |
109 | /* Just ignore, this behavior is now the default. */ | 109 | prom_early_console.flags &= ~CON_BOOT; |
110 | break; | 110 | break; |
111 | case 'P': | 111 | case 'P': |
112 | /* Force UltraSPARC-III P-Cache on. */ | 112 | /* Force UltraSPARC-III P-Cache on. */ |
@@ -425,10 +425,14 @@ static void __init init_sparc64_elf_hwcap(void) | |||
425 | else if (tlb_type == hypervisor) { | 425 | else if (tlb_type == hypervisor) { |
426 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1 || | 426 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1 || |
427 | sun4v_chip_type == SUN4V_CHIP_NIAGARA2 || | 427 | sun4v_chip_type == SUN4V_CHIP_NIAGARA2 || |
428 | sun4v_chip_type == SUN4V_CHIP_NIAGARA3) | 428 | sun4v_chip_type == SUN4V_CHIP_NIAGARA3 || |
429 | sun4v_chip_type == SUN4V_CHIP_NIAGARA4 || | ||
430 | sun4v_chip_type == SUN4V_CHIP_NIAGARA5) | ||
429 | cap |= HWCAP_SPARC_BLKINIT; | 431 | cap |= HWCAP_SPARC_BLKINIT; |
430 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA2 || | 432 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA2 || |
431 | sun4v_chip_type == SUN4V_CHIP_NIAGARA3) | 433 | sun4v_chip_type == SUN4V_CHIP_NIAGARA3 || |
434 | sun4v_chip_type == SUN4V_CHIP_NIAGARA4 || | ||
435 | sun4v_chip_type == SUN4V_CHIP_NIAGARA5) | ||
432 | cap |= HWCAP_SPARC_N2; | 436 | cap |= HWCAP_SPARC_N2; |
433 | } | 437 | } |
434 | 438 | ||
@@ -452,11 +456,15 @@ static void __init init_sparc64_elf_hwcap(void) | |||
452 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1) | 456 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1) |
453 | cap |= AV_SPARC_ASI_BLK_INIT; | 457 | cap |= AV_SPARC_ASI_BLK_INIT; |
454 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA2 || | 458 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA2 || |
455 | sun4v_chip_type == SUN4V_CHIP_NIAGARA3) | 459 | sun4v_chip_type == SUN4V_CHIP_NIAGARA3 || |
460 | sun4v_chip_type == SUN4V_CHIP_NIAGARA4 || | ||
461 | sun4v_chip_type == SUN4V_CHIP_NIAGARA5) | ||
456 | cap |= (AV_SPARC_VIS | AV_SPARC_VIS2 | | 462 | cap |= (AV_SPARC_VIS | AV_SPARC_VIS2 | |
457 | AV_SPARC_ASI_BLK_INIT | | 463 | AV_SPARC_ASI_BLK_INIT | |
458 | AV_SPARC_POPC); | 464 | AV_SPARC_POPC); |
459 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA3) | 465 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA3 || |
466 | sun4v_chip_type == SUN4V_CHIP_NIAGARA4 || | ||
467 | sun4v_chip_type == SUN4V_CHIP_NIAGARA5) | ||
460 | cap |= (AV_SPARC_VIS3 | AV_SPARC_HPC | | 468 | cap |= (AV_SPARC_VIS3 | AV_SPARC_HPC | |
461 | AV_SPARC_FMAF); | 469 | AV_SPARC_FMAF); |
462 | } | 470 | } |