]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
parisc: Show MPE/iX model string at bootup
authorHelge Deller <deller@gmx.de>
Fri, 21 Oct 2022 08:03:52 +0000 (10:03 +0200)
committerHelge Deller <deller@gmx.de>
Mon, 19 Dec 2022 15:08:52 +0000 (16:08 +0100)
Some (mostly 64-bit machines) machines allow to run MPE/iX and report the MPE
model string via firmware call. Enhance the pdc_model_sysmodel() function to
report that model string.
Note that some 32-bit machines like the B160L wrongly report success for the
firmware call, so include a check to prevent showing wrong info.

Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/include/asm/pdc.h
arch/parisc/kernel/firmware.c
arch/parisc/kernel/processor.c

index fcbcf9a96c1112d39de10868cab3ac544a5b161e..40793bef8429fc74b680ae54da3f4174f074f706 100644 (file)
@@ -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);
index b31775928bb02b8fa7b48c93630ff2570edb6f94..4dfe1f49c5c8b2ffd884b0b806afb7b7b77bb89f 100644 (file)
@@ -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) {
index dddaaa6e7a825d445735b0b63fafe9cce5f6f20f..ba07e760d3c762f1251c3d23b865ef9875723ea1 100644 (file)
@@ -272,10 +272,15 @@ 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;
+       if (pdc_model_sysmodel(OS_ID_MPEXL, serial_no) == PDC_OK &&
+               serial_no[0])
+               pr_info("MPE/iX model name: %s\n", serial_no);
+
        dump_stack_set_arch_desc("%s", boot_cpu_data.pdc.sys_model_name);
 
        boot_cpu_data.hversion =  boot_cpu_data.pdc.model.hversion;