Skip to contentSkip to conversation

parisc: Show MPE model string at bootup

PATCH New Helge Deller 1 participant 1 message Oct 21, 2022 PA-RISC architecture

lore
Share & tools
lore

Helge Deller

author maintainer
#0 lore raw

PATCH 1/1 parisc: Show MPE model string at bootup

If the machine supports running MPE, firmware provides the MPE specific model name.

---
 arch/parisc/include/asm/pdc.h  | 2 +-
 arch/parisc/kernel/firmware.c  | 4 ++--
 arch/parisc/kernel/processor.c | 8 ++++++--
 3 files changed, 9 insertions(+), 5 deletions(-)
arch/parisc/include/asm/pdc.h +1 -1
index fcbcf9a96c11..40793bef8429 100644
@@ -37,7 +37,7 @@ int pdc_system_map_find_mods(struct pdc_system_map_mod_info *pdc_mod_info,
 int pdc_system_map_find_addrs(struct pdc_system_map_addr_info *pdc_addr_info,
 			      long mod_index, long addr_index);
 int pdc_model_info(struct pdc_model *model);
-int pdc_model_sysmodel(char *name);
+int pdc_model_sysmodel(unsigned int os_id, char *name);
 int pdc_model_cpuid(unsigned long *cpu_id);
 int pdc_model_versions(unsigned long *versions, int id);
 int pdc_model_capabilities(unsigned long *capabilities);
arch/parisc/kernel/firmware.c +2 -2
index 6a7e315bcc2e..543497342a80 100644
@@ -527,14 +527,14 @@ int pdc_model_info(struct pdc_model *model)
  * Using OS_ID_HPUX will return the equivalent of the 'modelname' command
  * on HP/UX.
  */
-int pdc_model_sysmodel(char *name)
+int pdc_model_sysmodel(unsigned int os_id, char *name)
 {
         int retval;
 	unsigned long flags;
 
         spin_lock_irqsave(&pdc_lock, flags);
         retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_SYSMODEL, __pa(pdc_result),
-                              OS_ID_HPUX, __pa(name));
+                              os_id, __pa(name));
         convert_to_wide(pdc_result);
 
         if (retval == PDC_OK) {
arch/parisc/kernel/processor.c +6 -2
index dddaaa6e7a82..0031b8b7c5aa 100644
@@ -272,10 +272,14 @@ void __init collect_boot_cpu_data(void)
 		printk(KERN_INFO "capabilities 0x%lx\n",
 			boot_cpu_data.pdc.capabilities);
 
-	if (pdc_model_sysmodel(boot_cpu_data.pdc.sys_model_name) == PDC_OK)
-		printk(KERN_INFO "model %s\n",
+	if (pdc_model_sysmodel(OS_ID_HPUX, boot_cpu_data.pdc.sys_model_name) == PDC_OK)
+		pr_info("HP-UX model name: %s\n",
 			boot_cpu_data.pdc.sys_model_name);
 
+	serial_no[0] = 0;
+	pdc_model_sysmodel(OS_ID_MPEXL, serial_no);
+	pr_info("MPEXL model name: %s\n", serial_no[0] ? serial_no : "n/a");
+
 	dump_stack_set_arch_desc("%s", boot_cpu_data.pdc.sys_model_name);
 
 	boot_cpu_data.hversion =  boot_cpu_data.pdc.model.hversion;

--
2.37.3