|
| 1 | +s390: Add z17 elf platform |
| 2 | + |
| 3 | +jira LE-3587 |
| 4 | +Rebuild_History Non-Buildable kernel-4.18.0-553.62.1.el8_10 |
| 5 | +commit-author Vasily Gorbik < [email protected]> |
| 6 | +commit 8231a0e632405a03018034848d3c4620d7ba1dca |
| 7 | +Empty-Commit: Cherry-Pick Conflicts during history rebuild. |
| 8 | +Will be included in final tarball splat. Ref for failed cherry-pick at: |
| 9 | +ciq/ciq_backports/kernel-4.18.0-553.62.1.el8_10/8231a0e6.failed |
| 10 | + |
| 11 | +Add detection for machine types 0x9175 and 0x9176 and set ELF platform |
| 12 | +name to z17. |
| 13 | + |
| 14 | + Reviewed-by: Heiko Carstens < [email protected]> |
| 15 | + Signed-off-by: Vasily Gorbik < [email protected]> |
| 16 | + Signed-off-by: Heiko Carstens < [email protected]> |
| 17 | +(cherry picked from commit 8231a0e632405a03018034848d3c4620d7ba1dca) |
| 18 | + Signed-off-by: Jonathan Maple < [email protected]> |
| 19 | + |
| 20 | +# Conflicts: |
| 21 | +# arch/s390/kernel/processor.c |
| 22 | +diff --cc arch/s390/kernel/processor.c |
| 23 | +index 3f62e2fcb90a,80b1f7a29f11..000000000000 |
| 24 | +--- a/arch/s390/kernel/processor.c |
| 25 | ++++ b/arch/s390/kernel/processor.c |
| 26 | +@@@ -151,6 -179,153 +151,156 @@@ static void show_cpu_summary(struct seq |
| 27 | + } |
| 28 | + } |
| 29 | + |
| 30 | +++<<<<<<< HEAD |
| 31 | +++======= |
| 32 | ++ static int __init setup_hwcaps(void) |
| 33 | ++ { |
| 34 | ++ /* instructions named N3, "backported" to esa-mode */ |
| 35 | ++ elf_hwcap |= HWCAP_ESAN3; |
| 36 | ++ |
| 37 | ++ /* z/Architecture mode active */ |
| 38 | ++ elf_hwcap |= HWCAP_ZARCH; |
| 39 | ++ |
| 40 | ++ /* store-facility-list-extended */ |
| 41 | ++ if (test_facility(7)) |
| 42 | ++ elf_hwcap |= HWCAP_STFLE; |
| 43 | ++ |
| 44 | ++ /* message-security assist */ |
| 45 | ++ if (test_facility(17)) |
| 46 | ++ elf_hwcap |= HWCAP_MSA; |
| 47 | ++ |
| 48 | ++ /* long-displacement */ |
| 49 | ++ if (test_facility(19)) |
| 50 | ++ elf_hwcap |= HWCAP_LDISP; |
| 51 | ++ |
| 52 | ++ /* extended-immediate */ |
| 53 | ++ elf_hwcap |= HWCAP_EIMM; |
| 54 | ++ |
| 55 | ++ /* extended-translation facility 3 enhancement */ |
| 56 | ++ if (test_facility(22) && test_facility(30)) |
| 57 | ++ elf_hwcap |= HWCAP_ETF3EH; |
| 58 | ++ |
| 59 | ++ /* decimal floating point & perform floating point operation */ |
| 60 | ++ if (test_facility(42) && test_facility(44)) |
| 61 | ++ elf_hwcap |= HWCAP_DFP; |
| 62 | ++ |
| 63 | ++ /* huge page support */ |
| 64 | ++ if (cpu_has_edat1()) |
| 65 | ++ elf_hwcap |= HWCAP_HPAGE; |
| 66 | ++ |
| 67 | ++ /* 64-bit register support for 31-bit processes */ |
| 68 | ++ elf_hwcap |= HWCAP_HIGH_GPRS; |
| 69 | ++ |
| 70 | ++ /* transactional execution */ |
| 71 | ++ if (machine_has_tx()) |
| 72 | ++ elf_hwcap |= HWCAP_TE; |
| 73 | ++ |
| 74 | ++ /* vector */ |
| 75 | ++ if (test_facility(129)) { |
| 76 | ++ elf_hwcap |= HWCAP_VXRS; |
| 77 | ++ if (test_facility(134)) |
| 78 | ++ elf_hwcap |= HWCAP_VXRS_BCD; |
| 79 | ++ if (test_facility(135)) |
| 80 | ++ elf_hwcap |= HWCAP_VXRS_EXT; |
| 81 | ++ if (test_facility(148)) |
| 82 | ++ elf_hwcap |= HWCAP_VXRS_EXT2; |
| 83 | ++ if (test_facility(152)) |
| 84 | ++ elf_hwcap |= HWCAP_VXRS_PDE; |
| 85 | ++ if (test_facility(192)) |
| 86 | ++ elf_hwcap |= HWCAP_VXRS_PDE2; |
| 87 | ++ } |
| 88 | ++ |
| 89 | ++ if (test_facility(150)) |
| 90 | ++ elf_hwcap |= HWCAP_SORT; |
| 91 | ++ |
| 92 | ++ if (test_facility(151)) |
| 93 | ++ elf_hwcap |= HWCAP_DFLT; |
| 94 | ++ |
| 95 | ++ if (test_facility(165)) |
| 96 | ++ elf_hwcap |= HWCAP_NNPA; |
| 97 | ++ |
| 98 | ++ /* guarded storage */ |
| 99 | ++ if (cpu_has_gs()) |
| 100 | ++ elf_hwcap |= HWCAP_GS; |
| 101 | ++ |
| 102 | ++ if (test_machine_feature(MFEATURE_PCI_MIO)) |
| 103 | ++ elf_hwcap |= HWCAP_PCI_MIO; |
| 104 | ++ |
| 105 | ++ /* virtualization support */ |
| 106 | ++ if (sclp.has_sief2) |
| 107 | ++ elf_hwcap |= HWCAP_SIE; |
| 108 | ++ |
| 109 | ++ return 0; |
| 110 | ++ } |
| 111 | ++ arch_initcall(setup_hwcaps); |
| 112 | ++ |
| 113 | ++ static int __init setup_elf_platform(void) |
| 114 | ++ { |
| 115 | ++ struct cpuid cpu_id; |
| 116 | ++ |
| 117 | ++ get_cpu_id(&cpu_id); |
| 118 | ++ add_device_randomness(&cpu_id, sizeof(cpu_id)); |
| 119 | ++ switch (cpu_id.machine) { |
| 120 | ++ default: /* Use "z10" as default. */ |
| 121 | ++ strcpy(elf_platform, "z10"); |
| 122 | ++ break; |
| 123 | ++ case 0x2817: |
| 124 | ++ case 0x2818: |
| 125 | ++ strcpy(elf_platform, "z196"); |
| 126 | ++ break; |
| 127 | ++ case 0x2827: |
| 128 | ++ case 0x2828: |
| 129 | ++ strcpy(elf_platform, "zEC12"); |
| 130 | ++ break; |
| 131 | ++ case 0x2964: |
| 132 | ++ case 0x2965: |
| 133 | ++ strcpy(elf_platform, "z13"); |
| 134 | ++ break; |
| 135 | ++ case 0x3906: |
| 136 | ++ case 0x3907: |
| 137 | ++ strcpy(elf_platform, "z14"); |
| 138 | ++ break; |
| 139 | ++ case 0x8561: |
| 140 | ++ case 0x8562: |
| 141 | ++ strcpy(elf_platform, "z15"); |
| 142 | ++ break; |
| 143 | ++ case 0x3931: |
| 144 | ++ case 0x3932: |
| 145 | ++ strcpy(elf_platform, "z16"); |
| 146 | ++ break; |
| 147 | ++ case 0x9175: |
| 148 | ++ case 0x9176: |
| 149 | ++ strcpy(elf_platform, "z17"); |
| 150 | ++ break; |
| 151 | ++ } |
| 152 | ++ return 0; |
| 153 | ++ } |
| 154 | ++ arch_initcall(setup_elf_platform); |
| 155 | ++ |
| 156 | ++ static void show_cpu_topology(struct seq_file *m, unsigned long n) |
| 157 | ++ { |
| 158 | ++ #ifdef CONFIG_SCHED_TOPOLOGY |
| 159 | ++ seq_printf(m, "physical id : %d\n", topology_physical_package_id(n)); |
| 160 | ++ seq_printf(m, "core id : %d\n", topology_core_id(n)); |
| 161 | ++ seq_printf(m, "book id : %d\n", topology_book_id(n)); |
| 162 | ++ seq_printf(m, "drawer id : %d\n", topology_drawer_id(n)); |
| 163 | ++ seq_printf(m, "dedicated : %d\n", topology_cpu_dedicated(n)); |
| 164 | ++ seq_printf(m, "address : %d\n", smp_cpu_get_cpu_address(n)); |
| 165 | ++ seq_printf(m, "siblings : %d\n", cpumask_weight(topology_core_cpumask(n))); |
| 166 | ++ seq_printf(m, "cpu cores : %d\n", topology_booted_cores(n)); |
| 167 | ++ #endif /* CONFIG_SCHED_TOPOLOGY */ |
| 168 | ++ } |
| 169 | ++ |
| 170 | ++ static void show_cpu_ids(struct seq_file *m, unsigned long n) |
| 171 | ++ { |
| 172 | ++ struct cpuid *id = &per_cpu(cpu_info.cpu_id, n); |
| 173 | ++ |
| 174 | ++ seq_printf(m, "version : %02X\n", id->version); |
| 175 | ++ seq_printf(m, "identification : %06X\n", id->ident); |
| 176 | ++ seq_printf(m, "machine : %04X\n", id->machine); |
| 177 | ++ } |
| 178 | ++ |
| 179 | +++>>>>>>> 8231a0e63240 (s390: Add z17 elf platform) |
| 180 | + static void show_cpu_mhz(struct seq_file *m, unsigned long n) |
| 181 | + { |
| 182 | + struct cpu_info *c = per_cpu_ptr(&cpu_info, n); |
| 183 | +* Unmerged path arch/s390/kernel/processor.c |
0 commit comments