console/parisc: Fix STI console on 64-bit only machines
Subsystems (2)
Helge Deller
maintainerPATCH v2 1/1 console/parisc: Fix STI console on 64-bit only machines
Fix the STI console to be able to execute either the 64-bit STI ROM code or the 32-bit STI ROM code.
This is necessary on 64-bit only machines (e.g. C8000 workstation) which otherwise won't show the STI text console on HP graphic cards like Visualize-FX5/FX10/FXe.
When calling 32-bit code from a 64-bit kernel one may need to copy contents on the CPU stack from high memory down below the 4GB limit.
Signed-off-by Helge Deller <[email protected]>
---
v2: Forward-ported to apply cleanly on drm-misc-next git tree
arch/parisc/include/asm/pdc.h +2 -2
@@ -88,8 +88,8 @@ int pdc_iodc_print(const unsigned char *str, unsigned count);void pdc_emergency_unlock (void );int pdc_sti_call (unsigned long func,unsigned long flags, -unsigned long inptr,unsigned long outputr, -unsigned long glob_cfg); +unsigned long inptr,unsigned long outputr, +unsigned long glob_cfg,int do_call64);int __pdc_cpu_rendezvous (void );void pdc_cpu_rendezvous_lock (void );
arch/parisc/kernel/firmware.c +14 -7
@@ -1389,17 +1389,24 @@ int pdc_iodc_getc(void) }int pdc_sti_call (unsigned long func,unsigned long flags, -unsigned long inptr,unsigned long outputr, -unsigned long glob_cfg) +unsigned long inptr,unsigned long outputr, +unsigned long glob_cfg,int do_call64) { -int retval; +int retval =0 ;unsigned long irqflags; -spin_lock_irqsave (&pdc_lock, irqflags); - retval =real32_call (func, flags, inptr, outputr, glob_cfg); -spin_unlock_irqrestore (&pdc_lock, irqflags); +spin_lock_irqsave (&pdc_lock, irqflags); +if (IS_ENABLED (CONFIG_64BIT ) && do_call64) { +#ifdef CONFIG_64BIT + retval =real64_call (func, flags, inptr, outputr, glob_cfg); +#else +WARN_ON (1 ); +#endif + }else + retval =real32_call (func, flags, inptr, outputr, glob_cfg); +spin_unlock_irqrestore (&pdc_lock, irqflags); -return retval; +return retval; }EXPORT_SYMBOL (pdc_sti_call);
drivers/video/fbdev/stifb.c +2 -2
@@ -71,9 +71,9 @@#include <video/sticore.h> -/* REGION_BASE(fb_info, index) returns the virtual address for region <index> */ +/* REGION_BASE(fb_info, index) returns the physical address for region <index> */ #define REGION_BASE (fb_info, index) \ - F_EXTEND(fb_info->sti->glob_cfg->region_ptrs[index]) + F_EXTEND(fb_info->sti->regions_phys[index])#define NGLEDEVDEPROM_CRT_REGION 1
drivers/video/sticore.c +101 -53
310 lines not on this page · raw message
include/video/sticore.h +21 -21
146 lines not on this page · raw message