Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'for-5.19/parisc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull more parisc architecture updates from Helge Deller:
"A fix to prevent crash at bootup if CONFIG_SCHED_MC is enabled, and
add auto-detection of primary graphics card for framebuffer driver"

* tag 'for-5.19/parisc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc/stifb: Keep track of hardware path of graphics card
parisc/stifb: Implement fb_is_primary_device()
parisc: fix a crash with multicore scheduler

+38 -28
+4
arch/parisc/include/asm/fb.h
··· 12 12 pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; 13 13 } 14 14 15 + #if defined(CONFIG_STI_CONSOLE) || defined(CONFIG_FB_STI) 16 + int fb_is_primary_device(struct fb_info *info); 17 + #else 15 18 static inline int fb_is_primary_device(struct fb_info *info) 16 19 { 17 20 return 0; 18 21 } 22 + #endif 19 23 20 24 #endif /* _ASM_FB_H_ */
-2
arch/parisc/kernel/processor.c
··· 327 327 set_firmware_width(); 328 328 ret = pdc_coproc_cfg(&coproc_cfg); 329 329 330 - store_cpu_topology(cpunum); 331 - 332 330 if(ret >= 0 && coproc_cfg.ccr_functional) { 333 331 mtctl(coproc_cfg.ccr_functional, 10); /* 10 == Coprocessor Control Reg */ 334 332
+1 -15
arch/parisc/kernel/topology.c
··· 20 20 21 21 static DEFINE_PER_CPU(struct cpu, cpu_devices); 22 22 23 - static int dualcores_found; 24 - 25 23 /* 26 24 * store_cpu_topology is called at boot when only one cpu is running 27 25 * and with the mutex cpu_hotplug.lock locked, when several cpus have booted, ··· 58 60 if (p->cpu_loc) { 59 61 cpuid_topo->core_id++; 60 62 cpuid_topo->package_id = cpu_topology[cpu].package_id; 61 - dualcores_found = 1; 62 63 continue; 63 64 } 64 65 } ··· 77 80 cpu_topology[cpuid].package_id); 78 81 } 79 82 80 - static struct sched_domain_topology_level parisc_mc_topology[] = { 81 - #ifdef CONFIG_SCHED_MC 82 - { cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) }, 83 - #endif 84 - 85 - { cpu_cpu_mask, SD_INIT_NAME(DIE) }, 86 - { NULL, }, 87 - }; 88 - 89 83 /* 90 84 * init_cpu_topology is called at boot when only one cpu is running 91 85 * which prevent simultaneous write access to cpu_topology array 92 86 */ 93 87 void __init init_cpu_topology(void) 94 88 { 95 - /* Set scheduler topology descriptor */ 96 - if (dualcores_found) 97 - set_sched_topology(parisc_mc_topology); 89 + reset_cpu_topology(); 98 90 }
+4 -1
drivers/video/console/sticon.c
··· 46 46 #include <linux/slab.h> 47 47 #include <linux/font.h> 48 48 #include <linux/crc32.h> 49 + #include <linux/fb.h> 49 50 50 51 #include <asm/io.h> 51 52 ··· 393 392 for (i = 0; i < MAX_NR_CONSOLES; i++) 394 393 font_data[i] = STI_DEF_FONT; 395 394 396 - pr_info("sticon: Initializing STI text console.\n"); 395 + pr_info("sticon: Initializing STI text console on %s at [%s]\n", 396 + sticon_sti->sti_data->inq_outptr.dev_name, 397 + sticon_sti->pa_path); 397 398 console_lock(); 398 399 err = do_take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1, 399 400 PAGE0->mem_cons.cl_class != CL_DUPLEX);
+24 -8
drivers/video/console/sticore.c
··· 30 30 #include <asm/pdc.h> 31 31 #include <asm/cacheflush.h> 32 32 #include <asm/grfioctl.h> 33 + #include <asm/fb.h> 33 34 34 35 #include "../fbdev/sticore.h" 35 36 36 - #define STI_DRIVERVERSION "Version 0.9b" 37 + #define STI_DRIVERVERSION "Version 0.9c" 37 38 38 39 static struct sti_struct *default_sti __read_mostly; 39 40 ··· 503 502 if (!fbfont) 504 503 return NULL; 505 504 506 - pr_info("STI selected %ux%u framebuffer font %s for sticon\n", 505 + pr_info(" using %ux%u framebuffer font %s\n", 507 506 fbfont->width, fbfont->height, fbfont->name); 508 507 509 508 bpc = ((fbfont->width+7)/8) * fbfont->height; ··· 968 967 969 968 static void sticore_check_for_default_sti(struct sti_struct *sti, char *path) 970 969 { 970 + pr_info(" located at [%s]\n", sti->pa_path); 971 971 if (strcmp (path, default_sti_path) == 0) 972 972 default_sti = sti; 973 973 } ··· 980 978 */ 981 979 static int __init sticore_pa_init(struct parisc_device *dev) 982 980 { 983 - char pa_path[21]; 984 981 struct sti_struct *sti = NULL; 985 982 int hpa = dev->hpa.start; 986 983 ··· 992 991 if (!sti) 993 992 return 1; 994 993 995 - print_pa_hwpath(dev, pa_path); 996 - sticore_check_for_default_sti(sti, pa_path); 994 + print_pa_hwpath(dev, sti->pa_path); 995 + sticore_check_for_default_sti(sti, sti->pa_path); 997 996 return 0; 998 997 } 999 998 ··· 1029 1028 1030 1029 sti = sti_try_rom_generic(rom_base, fb_base, pd); 1031 1030 if (sti) { 1032 - char pa_path[30]; 1033 - print_pci_hwpath(pd, pa_path); 1034 - sticore_check_for_default_sti(sti, pa_path); 1031 + print_pci_hwpath(pd, sti->pa_path); 1032 + sticore_check_for_default_sti(sti, sti->pa_path); 1035 1033 } 1036 1034 1037 1035 if (!sti) { ··· 1147 1147 1148 1148 return ret; 1149 1149 } 1150 + 1151 + /* check if given fb_info is the primary device */ 1152 + int fb_is_primary_device(struct fb_info *info) 1153 + { 1154 + struct sti_struct *sti; 1155 + 1156 + sti = sti_get_rom(0); 1157 + 1158 + /* if no built-in graphics card found, allow any fb driver as default */ 1159 + if (!sti) 1160 + return true; 1161 + 1162 + /* return true if it's the default built-in framebuffer driver */ 1163 + return (sti->info == info); 1164 + } 1165 + EXPORT_SYMBOL(fb_is_primary_device); 1150 1166 1151 1167 MODULE_AUTHOR("Philipp Rumpf, Helge Deller, Thomas Bogendoerfer"); 1152 1168 MODULE_DESCRIPTION("Core STI driver for HP's NGLE series graphics cards in HP PARISC machines");
+3
drivers/video/fbdev/sticore.h
··· 370 370 371 371 /* pointer to all internal data */ 372 372 struct sti_all_data *sti_data; 373 + 374 + /* pa_path of this device */ 375 + char pa_path[24]; 373 376 }; 374 377 375 378
+2 -2
drivers/video/fbdev/stifb.c
··· 1358 1358 goto out_err3; 1359 1359 } 1360 1360 1361 + /* save for primary gfx device detection & unregister_framebuffer() */ 1362 + sti->info = info; 1361 1363 if (register_framebuffer(&fb->info) < 0) 1362 1364 goto out_err4; 1363 - 1364 - sti->info = info; /* save for unregister_framebuffer() */ 1365 1365 1366 1366 fb_info(&fb->info, "%s %dx%d-%d frame buffer device, %s, id: %04x, mmio: 0x%04lx\n", 1367 1367 fix->id,