diff options
author | David S. Miller <davem@davemloft.net> | 2017-08-10 15:11:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-10 15:11:16 -0400 |
commit | 3b2b69efeca734b78bc85fd02253b0465bb2bec7 (patch) | |
tree | 57fd8b5b0e9c04f24f5f9ec70ceb0a706cecfb47 /arch/sparc | |
parent | 2e2d5d767c9ddb2b10d74f2c20a257101c7070eb (diff) | |
parent | 26273939ace935dd7553b31d279eab30b40f7b9a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Mainline had UFO fixes, but UFO is removed in net-next so we
take the HEAD hunks.
Minor context conflict in bcmsysport statistics bug fix.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/spitfire.h | 16 | ||||
-rw-r--r-- | arch/sparc/kernel/cpu.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/cpumap.c | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/head_64.S | 22 | ||||
-rw-r--r-- | arch/sparc/kernel/setup_64.c | 15 | ||||
-rw-r--r-- | arch/sparc/mm/init_64.c | 14 |
6 files changed, 63 insertions, 11 deletions
diff --git a/arch/sparc/include/asm/spitfire.h b/arch/sparc/include/asm/spitfire.h index 1d8321c827a8..1b1286d05069 100644 --- a/arch/sparc/include/asm/spitfire.h +++ b/arch/sparc/include/asm/spitfire.h | |||
@@ -47,10 +47,26 @@ | |||
47 | #define SUN4V_CHIP_NIAGARA5 0x05 | 47 | #define SUN4V_CHIP_NIAGARA5 0x05 |
48 | #define SUN4V_CHIP_SPARC_M6 0x06 | 48 | #define SUN4V_CHIP_SPARC_M6 0x06 |
49 | #define SUN4V_CHIP_SPARC_M7 0x07 | 49 | #define SUN4V_CHIP_SPARC_M7 0x07 |
50 | #define SUN4V_CHIP_SPARC_M8 0x08 | ||
50 | #define SUN4V_CHIP_SPARC64X 0x8a | 51 | #define SUN4V_CHIP_SPARC64X 0x8a |
51 | #define SUN4V_CHIP_SPARC_SN 0x8b | 52 | #define SUN4V_CHIP_SPARC_SN 0x8b |
52 | #define SUN4V_CHIP_UNKNOWN 0xff | 53 | #define SUN4V_CHIP_UNKNOWN 0xff |
53 | 54 | ||
55 | /* | ||
56 | * The following CPU_ID_xxx constants are used | ||
57 | * to identify the CPU type in the setup phase | ||
58 | * (see head_64.S) | ||
59 | */ | ||
60 | #define CPU_ID_NIAGARA1 ('1') | ||
61 | #define CPU_ID_NIAGARA2 ('2') | ||
62 | #define CPU_ID_NIAGARA3 ('3') | ||
63 | #define CPU_ID_NIAGARA4 ('4') | ||
64 | #define CPU_ID_NIAGARA5 ('5') | ||
65 | #define CPU_ID_M6 ('6') | ||
66 | #define CPU_ID_M7 ('7') | ||
67 | #define CPU_ID_M8 ('8') | ||
68 | #define CPU_ID_SONOMA1 ('N') | ||
69 | |||
54 | #ifndef __ASSEMBLY__ | 70 | #ifndef __ASSEMBLY__ |
55 | 71 | ||
56 | enum ultra_tlb_layout { | 72 | enum ultra_tlb_layout { |
diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c index 493e023a468a..ef4f18f7a674 100644 --- a/arch/sparc/kernel/cpu.c +++ b/arch/sparc/kernel/cpu.c | |||
@@ -506,6 +506,12 @@ static void __init sun4v_cpu_probe(void) | |||
506 | sparc_pmu_type = "sparc-m7"; | 506 | sparc_pmu_type = "sparc-m7"; |
507 | break; | 507 | break; |
508 | 508 | ||
509 | case SUN4V_CHIP_SPARC_M8: | ||
510 | sparc_cpu_type = "SPARC-M8"; | ||
511 | sparc_fpu_type = "SPARC-M8 integrated FPU"; | ||
512 | sparc_pmu_type = "sparc-m8"; | ||
513 | break; | ||
514 | |||
509 | case SUN4V_CHIP_SPARC_SN: | 515 | case SUN4V_CHIP_SPARC_SN: |
510 | sparc_cpu_type = "SPARC-SN"; | 516 | sparc_cpu_type = "SPARC-SN"; |
511 | sparc_fpu_type = "SPARC-SN integrated FPU"; | 517 | sparc_fpu_type = "SPARC-SN integrated FPU"; |
diff --git a/arch/sparc/kernel/cpumap.c b/arch/sparc/kernel/cpumap.c index 45c820e1cba5..90d550bbfeef 100644 --- a/arch/sparc/kernel/cpumap.c +++ b/arch/sparc/kernel/cpumap.c | |||
@@ -328,6 +328,7 @@ static int iterate_cpu(struct cpuinfo_tree *t, unsigned int root_index) | |||
328 | case SUN4V_CHIP_NIAGARA5: | 328 | case SUN4V_CHIP_NIAGARA5: |
329 | case SUN4V_CHIP_SPARC_M6: | 329 | case SUN4V_CHIP_SPARC_M6: |
330 | case SUN4V_CHIP_SPARC_M7: | 330 | case SUN4V_CHIP_SPARC_M7: |
331 | case SUN4V_CHIP_SPARC_M8: | ||
331 | case SUN4V_CHIP_SPARC_SN: | 332 | case SUN4V_CHIP_SPARC_SN: |
332 | case SUN4V_CHIP_SPARC64X: | 333 | case SUN4V_CHIP_SPARC64X: |
333 | rover_inc_table = niagara_iterate_method; | 334 | rover_inc_table = niagara_iterate_method; |
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S index 41a407328667..78e0211753d2 100644 --- a/arch/sparc/kernel/head_64.S +++ b/arch/sparc/kernel/head_64.S | |||
@@ -424,22 +424,25 @@ EXPORT_SYMBOL(sun4v_chip_type) | |||
424 | nop | 424 | nop |
425 | 425 | ||
426 | 70: ldub [%g1 + 7], %g2 | 426 | 70: ldub [%g1 + 7], %g2 |
427 | cmp %g2, '3' | 427 | cmp %g2, CPU_ID_NIAGARA3 |
428 | be,pt %xcc, 5f | 428 | be,pt %xcc, 5f |
429 | mov SUN4V_CHIP_NIAGARA3, %g4 | 429 | mov SUN4V_CHIP_NIAGARA3, %g4 |
430 | cmp %g2, '4' | 430 | cmp %g2, CPU_ID_NIAGARA4 |
431 | be,pt %xcc, 5f | 431 | be,pt %xcc, 5f |
432 | mov SUN4V_CHIP_NIAGARA4, %g4 | 432 | mov SUN4V_CHIP_NIAGARA4, %g4 |
433 | cmp %g2, '5' | 433 | cmp %g2, CPU_ID_NIAGARA5 |
434 | be,pt %xcc, 5f | 434 | be,pt %xcc, 5f |
435 | mov SUN4V_CHIP_NIAGARA5, %g4 | 435 | mov SUN4V_CHIP_NIAGARA5, %g4 |
436 | cmp %g2, '6' | 436 | cmp %g2, CPU_ID_M6 |
437 | be,pt %xcc, 5f | 437 | be,pt %xcc, 5f |
438 | mov SUN4V_CHIP_SPARC_M6, %g4 | 438 | mov SUN4V_CHIP_SPARC_M6, %g4 |
439 | cmp %g2, '7' | 439 | cmp %g2, CPU_ID_M7 |
440 | be,pt %xcc, 5f | 440 | be,pt %xcc, 5f |
441 | mov SUN4V_CHIP_SPARC_M7, %g4 | 441 | mov SUN4V_CHIP_SPARC_M7, %g4 |
442 | cmp %g2, 'N' | 442 | cmp %g2, CPU_ID_M8 |
443 | be,pt %xcc, 5f | ||
444 | mov SUN4V_CHIP_SPARC_M8, %g4 | ||
445 | cmp %g2, CPU_ID_SONOMA1 | ||
443 | be,pt %xcc, 5f | 446 | be,pt %xcc, 5f |
444 | mov SUN4V_CHIP_SPARC_SN, %g4 | 447 | mov SUN4V_CHIP_SPARC_SN, %g4 |
445 | ba,pt %xcc, 49f | 448 | ba,pt %xcc, 49f |
@@ -448,10 +451,10 @@ EXPORT_SYMBOL(sun4v_chip_type) | |||
448 | 91: sethi %hi(prom_cpu_compatible), %g1 | 451 | 91: sethi %hi(prom_cpu_compatible), %g1 |
449 | or %g1, %lo(prom_cpu_compatible), %g1 | 452 | or %g1, %lo(prom_cpu_compatible), %g1 |
450 | ldub [%g1 + 17], %g2 | 453 | ldub [%g1 + 17], %g2 |
451 | cmp %g2, '1' | 454 | cmp %g2, CPU_ID_NIAGARA1 |
452 | be,pt %xcc, 5f | 455 | be,pt %xcc, 5f |
453 | mov SUN4V_CHIP_NIAGARA1, %g4 | 456 | mov SUN4V_CHIP_NIAGARA1, %g4 |
454 | cmp %g2, '2' | 457 | cmp %g2, CPU_ID_NIAGARA2 |
455 | be,pt %xcc, 5f | 458 | be,pt %xcc, 5f |
456 | mov SUN4V_CHIP_NIAGARA2, %g4 | 459 | mov SUN4V_CHIP_NIAGARA2, %g4 |
457 | 460 | ||
@@ -602,6 +605,9 @@ niagara_tlb_fixup: | |||
602 | cmp %g1, SUN4V_CHIP_SPARC_M7 | 605 | cmp %g1, SUN4V_CHIP_SPARC_M7 |
603 | be,pt %xcc, niagara4_patch | 606 | be,pt %xcc, niagara4_patch |
604 | nop | 607 | nop |
608 | cmp %g1, SUN4V_CHIP_SPARC_M8 | ||
609 | be,pt %xcc, niagara4_patch | ||
610 | nop | ||
605 | cmp %g1, SUN4V_CHIP_SPARC_SN | 611 | cmp %g1, SUN4V_CHIP_SPARC_SN |
606 | be,pt %xcc, niagara4_patch | 612 | be,pt %xcc, niagara4_patch |
607 | nop | 613 | nop |
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index 4d9c3e13c150..150ee7d4b059 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c | |||
@@ -288,10 +288,17 @@ static void __init sun4v_patch(void) | |||
288 | 288 | ||
289 | sun4v_patch_2insn_range(&__sun4v_2insn_patch, | 289 | sun4v_patch_2insn_range(&__sun4v_2insn_patch, |
290 | &__sun4v_2insn_patch_end); | 290 | &__sun4v_2insn_patch_end); |
291 | if (sun4v_chip_type == SUN4V_CHIP_SPARC_M7 || | 291 | |
292 | sun4v_chip_type == SUN4V_CHIP_SPARC_SN) | 292 | switch (sun4v_chip_type) { |
293 | case SUN4V_CHIP_SPARC_M7: | ||
294 | case SUN4V_CHIP_SPARC_M8: | ||
295 | case SUN4V_CHIP_SPARC_SN: | ||
293 | sun_m7_patch_2insn_range(&__sun_m7_2insn_patch, | 296 | sun_m7_patch_2insn_range(&__sun_m7_2insn_patch, |
294 | &__sun_m7_2insn_patch_end); | 297 | &__sun_m7_2insn_patch_end); |
298 | break; | ||
299 | default: | ||
300 | break; | ||
301 | } | ||
295 | 302 | ||
296 | sun4v_hvapi_init(); | 303 | sun4v_hvapi_init(); |
297 | } | 304 | } |
@@ -529,6 +536,7 @@ static void __init init_sparc64_elf_hwcap(void) | |||
529 | sun4v_chip_type == SUN4V_CHIP_NIAGARA5 || | 536 | sun4v_chip_type == SUN4V_CHIP_NIAGARA5 || |
530 | sun4v_chip_type == SUN4V_CHIP_SPARC_M6 || | 537 | sun4v_chip_type == SUN4V_CHIP_SPARC_M6 || |
531 | sun4v_chip_type == SUN4V_CHIP_SPARC_M7 || | 538 | sun4v_chip_type == SUN4V_CHIP_SPARC_M7 || |
539 | sun4v_chip_type == SUN4V_CHIP_SPARC_M8 || | ||
532 | sun4v_chip_type == SUN4V_CHIP_SPARC_SN || | 540 | sun4v_chip_type == SUN4V_CHIP_SPARC_SN || |
533 | sun4v_chip_type == SUN4V_CHIP_SPARC64X) | 541 | sun4v_chip_type == SUN4V_CHIP_SPARC64X) |
534 | cap |= HWCAP_SPARC_BLKINIT; | 542 | cap |= HWCAP_SPARC_BLKINIT; |
@@ -538,6 +546,7 @@ static void __init init_sparc64_elf_hwcap(void) | |||
538 | sun4v_chip_type == SUN4V_CHIP_NIAGARA5 || | 546 | sun4v_chip_type == SUN4V_CHIP_NIAGARA5 || |
539 | sun4v_chip_type == SUN4V_CHIP_SPARC_M6 || | 547 | sun4v_chip_type == SUN4V_CHIP_SPARC_M6 || |
540 | sun4v_chip_type == SUN4V_CHIP_SPARC_M7 || | 548 | sun4v_chip_type == SUN4V_CHIP_SPARC_M7 || |
549 | sun4v_chip_type == SUN4V_CHIP_SPARC_M8 || | ||
541 | sun4v_chip_type == SUN4V_CHIP_SPARC_SN || | 550 | sun4v_chip_type == SUN4V_CHIP_SPARC_SN || |
542 | sun4v_chip_type == SUN4V_CHIP_SPARC64X) | 551 | sun4v_chip_type == SUN4V_CHIP_SPARC64X) |
543 | cap |= HWCAP_SPARC_N2; | 552 | cap |= HWCAP_SPARC_N2; |
@@ -568,6 +577,7 @@ static void __init init_sparc64_elf_hwcap(void) | |||
568 | sun4v_chip_type == SUN4V_CHIP_NIAGARA5 || | 577 | sun4v_chip_type == SUN4V_CHIP_NIAGARA5 || |
569 | sun4v_chip_type == SUN4V_CHIP_SPARC_M6 || | 578 | sun4v_chip_type == SUN4V_CHIP_SPARC_M6 || |
570 | sun4v_chip_type == SUN4V_CHIP_SPARC_M7 || | 579 | sun4v_chip_type == SUN4V_CHIP_SPARC_M7 || |
580 | sun4v_chip_type == SUN4V_CHIP_SPARC_M8 || | ||
571 | sun4v_chip_type == SUN4V_CHIP_SPARC_SN || | 581 | sun4v_chip_type == SUN4V_CHIP_SPARC_SN || |
572 | sun4v_chip_type == SUN4V_CHIP_SPARC64X) | 582 | sun4v_chip_type == SUN4V_CHIP_SPARC64X) |
573 | cap |= (AV_SPARC_VIS | AV_SPARC_VIS2 | | 583 | cap |= (AV_SPARC_VIS | AV_SPARC_VIS2 | |
@@ -578,6 +588,7 @@ static void __init init_sparc64_elf_hwcap(void) | |||
578 | sun4v_chip_type == SUN4V_CHIP_NIAGARA5 || | 588 | sun4v_chip_type == SUN4V_CHIP_NIAGARA5 || |
579 | sun4v_chip_type == SUN4V_CHIP_SPARC_M6 || | 589 | sun4v_chip_type == SUN4V_CHIP_SPARC_M6 || |
580 | sun4v_chip_type == SUN4V_CHIP_SPARC_M7 || | 590 | sun4v_chip_type == SUN4V_CHIP_SPARC_M7 || |
591 | sun4v_chip_type == SUN4V_CHIP_SPARC_M8 || | ||
581 | sun4v_chip_type == SUN4V_CHIP_SPARC_SN || | 592 | sun4v_chip_type == SUN4V_CHIP_SPARC_SN || |
582 | sun4v_chip_type == SUN4V_CHIP_SPARC64X) | 593 | sun4v_chip_type == SUN4V_CHIP_SPARC64X) |
583 | cap |= (AV_SPARC_VIS3 | AV_SPARC_HPC | | 594 | cap |= (AV_SPARC_VIS3 | AV_SPARC_HPC | |
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index fed73f14aa49..afa0099f3748 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -1944,12 +1944,22 @@ static void __init setup_page_offset(void) | |||
1944 | break; | 1944 | break; |
1945 | case SUN4V_CHIP_SPARC_M7: | 1945 | case SUN4V_CHIP_SPARC_M7: |
1946 | case SUN4V_CHIP_SPARC_SN: | 1946 | case SUN4V_CHIP_SPARC_SN: |
1947 | default: | ||
1948 | /* M7 and later support 52-bit virtual addresses. */ | 1947 | /* M7 and later support 52-bit virtual addresses. */ |
1949 | sparc64_va_hole_top = 0xfff8000000000000UL; | 1948 | sparc64_va_hole_top = 0xfff8000000000000UL; |
1950 | sparc64_va_hole_bottom = 0x0008000000000000UL; | 1949 | sparc64_va_hole_bottom = 0x0008000000000000UL; |
1951 | max_phys_bits = 49; | 1950 | max_phys_bits = 49; |
1952 | break; | 1951 | break; |
1952 | case SUN4V_CHIP_SPARC_M8: | ||
1953 | default: | ||
1954 | /* M8 and later support 54-bit virtual addresses. | ||
1955 | * However, restricting M8 and above VA bits to 53 | ||
1956 | * as 4-level page table cannot support more than | ||
1957 | * 53 VA bits. | ||
1958 | */ | ||
1959 | sparc64_va_hole_top = 0xfff0000000000000UL; | ||
1960 | sparc64_va_hole_bottom = 0x0010000000000000UL; | ||
1961 | max_phys_bits = 51; | ||
1962 | break; | ||
1953 | } | 1963 | } |
1954 | } | 1964 | } |
1955 | 1965 | ||
@@ -2161,6 +2171,7 @@ static void __init sun4v_linear_pte_xor_finalize(void) | |||
2161 | */ | 2171 | */ |
2162 | switch (sun4v_chip_type) { | 2172 | switch (sun4v_chip_type) { |
2163 | case SUN4V_CHIP_SPARC_M7: | 2173 | case SUN4V_CHIP_SPARC_M7: |
2174 | case SUN4V_CHIP_SPARC_M8: | ||
2164 | case SUN4V_CHIP_SPARC_SN: | 2175 | case SUN4V_CHIP_SPARC_SN: |
2165 | pagecv_flag = 0x00; | 2176 | pagecv_flag = 0x00; |
2166 | break; | 2177 | break; |
@@ -2313,6 +2324,7 @@ void __init paging_init(void) | |||
2313 | */ | 2324 | */ |
2314 | switch (sun4v_chip_type) { | 2325 | switch (sun4v_chip_type) { |
2315 | case SUN4V_CHIP_SPARC_M7: | 2326 | case SUN4V_CHIP_SPARC_M7: |
2327 | case SUN4V_CHIP_SPARC_M8: | ||
2316 | case SUN4V_CHIP_SPARC_SN: | 2328 | case SUN4V_CHIP_SPARC_SN: |
2317 | page_cache4v_flag = _PAGE_CP_4V; | 2329 | page_cache4v_flag = _PAGE_CP_4V; |
2318 | break; | 2330 | break; |