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

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull parisc updates from Helge Deller:

- Add missing cacheflush() syscall

- Fix STI console on 64-bit-only machines

- Move kernel debug options to Kconfig.debug

- Lots of warning fixes in arch/parisc/ and drivers/parisc/ when
compiled with W=1

- Enable some more graphics drivers in refreshed defconfigs

* tag 'parisc-for-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: (29 commits)
parisc: Refresh defconfigs
parisc: irq: Add irq-related function declarations
parisc: Move init function declarations into header file
parisc: dino: Make dino_init() returning void
parisc: lba_pci: Mark two variables __maybe_unused
parisc: unaligned: Include header file to avoid missing prototype warnings
parisc: signal: Mark do_notify_resume() and sys_rt_sigreturn() asmlinkage
parisc: unwind: Mark start and stop variables __maybe_unused
parisc: init: Drop unused variable end_paddr
parisc: traps: Mark functions static
parisc: processor: Fix kdoc for init_cpu_profiler()
parisc: sys_parisc: parisc_personality() is called from asm code
parisc: ccio-dma: Fix kdoc and compiler warnings
parisc: pdc_stable: Fix kdoc and compiler warnings
parisc: pci-dma: Make pcxl_alloc_range() static
parisc: Mark image_size __maybe_unused in perf_write()
parisc: module: Mark symindex __maybe_unused
parisc: pdc_chassis: Fix kdoc warnings
parisc: firmware: Fix kdoc warnings
parisc: drivers: Fix kdoc warnings
...

+485 -252
+1 -11
arch/parisc/Kconfig
··· 304 304 for handling hard and soft interrupts. This can help avoid 305 305 overflowing the process kernel stacks. 306 306 307 - config TLB_PTLOCK 308 - bool "Use page table locks in TLB fault handler" 309 - depends on SMP 310 - default n 311 - help 312 - Select this option to enable page table locking in the TLB 313 - fault handler. This ensures that page table entries are 314 - updated consistently on SMP machines at the expense of some 315 - loss in performance. 316 - 317 307 config HOTPLUG_CPU 318 308 bool 319 309 default y if SMP ··· 336 346 int "Maximum number of CPUs (2-32)" 337 347 range 2 32 338 348 depends on SMP 339 - default "4" if 64BIT 349 + default "8" if 64BIT 340 350 default "16" 341 351 342 352 config KEXEC
+11
arch/parisc/Kconfig.debug
··· 10 10 spinlock debugging you should choose the DEBUG_SPINLOCK option 11 11 which will detect unitialized spinlocks too. 12 12 If unsure say Y here. 13 + 14 + config TLB_PTLOCK 15 + bool "Use page table locks in TLB fault handler" 16 + depends on SMP 17 + default n 18 + help 19 + Select this option to enable page table locking in the TLB 20 + fault handler. This ensures that page table entries are 21 + updated consistently on SMP machines at the expense of some 22 + loss in performance. 23 +
+45 -9
arch/parisc/configs/generic-32bit_defconfig
··· 82 82 # CONFIG_NET_VENDOR_AMD is not set 83 83 # CONFIG_NET_VENDOR_ATHEROS is not set 84 84 # CONFIG_NET_VENDOR_BROADCOM is not set 85 - # CONFIG_NET_VENDOR_BROCADE is not set 86 85 # CONFIG_NET_VENDOR_CHELSIO is not set 87 86 # CONFIG_NET_VENDOR_CISCO is not set 88 87 CONFIG_NET_TULIP=y ··· 96 97 # CONFIG_NET_VENDOR_NVIDIA is not set 97 98 # CONFIG_NET_VENDOR_OKI is not set 98 99 # CONFIG_NET_VENDOR_QLOGIC is not set 100 + # CONFIG_NET_VENDOR_BROCADE is not set 99 101 # CONFIG_NET_VENDOR_RDC is not set 100 102 # CONFIG_NET_VENDOR_REALTEK is not set 101 103 # CONFIG_NET_VENDOR_SEEQ is not set ··· 129 129 CONFIG_PPDEV=m 130 130 # CONFIG_HW_RANDOM is not set 131 131 CONFIG_I2C=y 132 - # CONFIG_HWMON is not set 132 + CONFIG_HWMON=m 133 + CONFIG_DRM=m 134 + CONFIG_DRM_DP_CEC=y 135 + # CONFIG_DRM_I2C_CH7006 is not set 136 + # CONFIG_DRM_I2C_SIL164 is not set 137 + CONFIG_DRM_RADEON=m 138 + CONFIG_DRM_NOUVEAU=m 139 + # CONFIG_DRM_NOUVEAU_BACKLIGHT is not set 140 + CONFIG_DRM_VGEM=m 141 + CONFIG_DRM_UDL=m 142 + CONFIG_DRM_MGAG200=m 133 143 CONFIG_FB=y 134 144 CONFIG_FB_FOREIGN_ENDIAN=y 135 - CONFIG_FB_MODE_HELPERS=y 145 + CONFIG_FB_PM2=m 146 + CONFIG_FB_PM2_FIFO_DISCONNECT=y 147 + CONFIG_FB_NVIDIA=m 148 + CONFIG_FB_NVIDIA_I2C=y 149 + # CONFIG_FB_NVIDIA_BACKLIGHT is not set 150 + CONFIG_FB_RIVA=m 151 + CONFIG_FB_RIVA_I2C=y 152 + # CONFIG_FB_RIVA_BACKLIGHT is not set 136 153 CONFIG_FB_MATROX=m 154 + CONFIG_FB_MATROX_MILLENIUM=y 155 + CONFIG_FB_MATROX_MYSTIQUE=y 137 156 CONFIG_FB_MATROX_G=y 157 + CONFIG_FB_MATROX_I2C=m 158 + CONFIG_FB_MATROX_MAVEN=m 159 + CONFIG_FB_ATY128=m 160 + # CONFIG_FB_ATY128_BACKLIGHT is not set 161 + CONFIG_FB_ATY=m 162 + CONFIG_FB_ATY_CT=y 163 + CONFIG_FB_ATY_GX=y 164 + # CONFIG_FB_ATY_BACKLIGHT is not set 165 + CONFIG_FB_S3=m 166 + CONFIG_FB_SAVAGE=m 167 + CONFIG_FB_SAVAGE_I2C=y 168 + CONFIG_FB_SAVAGE_ACCEL=y 169 + CONFIG_FB_SIS=m 170 + CONFIG_FB_SIS_300=y 171 + CONFIG_FB_SIS_315=y 138 172 CONFIG_FB_VOODOO1=m 173 + CONFIG_FB_TRIDENT=m 174 + CONFIG_FB_SMSCUFX=m 175 + CONFIG_FB_UDL=m 139 176 CONFIG_DUMMY_CONSOLE_COLUMNS=128 140 177 CONFIG_DUMMY_CONSOLE_ROWS=48 141 178 CONFIG_FRAMEBUFFER_CONSOLE=y 142 - CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y 143 179 CONFIG_LOGO=y 144 180 # CONFIG_LOGO_LINUX_MONO is not set 145 181 # CONFIG_LOGO_LINUX_VGA16 is not set ··· 252 216 CONFIG_CIFS_POSIX=y 253 217 # CONFIG_CIFS_DEBUG is not set 254 218 CONFIG_CRYPTO_TEST=m 255 - CONFIG_CRYPTO_HMAC=y 256 - CONFIG_CRYPTO_MD5=y 257 - CONFIG_CRYPTO_MICHAEL_MIC=m 258 - CONFIG_CRYPTO_SHA1=y 259 - CONFIG_CRYPTO_WP512=m 260 219 CONFIG_CRYPTO_BLOWFISH=m 261 220 CONFIG_CRYPTO_CAST5=m 262 221 CONFIG_CRYPTO_CAST6=m 263 222 CONFIG_CRYPTO_DES=y 264 223 CONFIG_CRYPTO_SERPENT=m 265 224 CONFIG_CRYPTO_TWOFISH=m 225 + CONFIG_CRYPTO_HMAC=y 226 + CONFIG_CRYPTO_MD5=y 227 + CONFIG_CRYPTO_MICHAEL_MIC=m 228 + CONFIG_CRYPTO_SHA1=y 229 + CONFIG_CRYPTO_WP512=m 266 230 CONFIG_CRYPTO_DEFLATE=y 267 231 CONFIG_CRC_CCITT=m 268 232 CONFIG_CRC_T10DIF=y
+38 -9
arch/parisc/configs/generic-64bit_defconfig
··· 20 20 CONFIG_RELAY=y 21 21 CONFIG_BLK_DEV_INITRD=y 22 22 CONFIG_CC_OPTIMIZE_FOR_SIZE=y 23 - # CONFIG_COMPAT_BRK is not set 24 - CONFIG_PA8X00=y 25 - CONFIG_64BIT=y 26 23 CONFIG_SMP=y 27 24 CONFIG_HPPB=y 28 25 CONFIG_IOMMU_CCIO=y ··· 34 37 CONFIG_MODVERSIONS=y 35 38 CONFIG_BLK_DEV_INTEGRITY=y 36 39 CONFIG_BINFMT_MISC=m 40 + # CONFIG_COMPAT_BRK is not set 37 41 # CONFIG_COMPACTION is not set 38 42 CONFIG_MEMORY_FAILURE=y 39 43 CONFIG_NET=y ··· 101 103 # CONFIG_NET_VENDOR_AMD is not set 102 104 # CONFIG_NET_VENDOR_ATHEROS is not set 103 105 # CONFIG_NET_VENDOR_BROADCOM is not set 104 - # CONFIG_NET_VENDOR_BROCADE is not set 105 106 # CONFIG_NET_VENDOR_CHELSIO is not set 106 107 # CONFIG_NET_VENDOR_CISCO is not set 107 108 CONFIG_NET_TULIP=y ··· 118 121 # CONFIG_NET_VENDOR_OKI is not set 119 122 CONFIG_QLA3XXX=m 120 123 CONFIG_QLCNIC=m 124 + # CONFIG_NET_VENDOR_BROCADE is not set 121 125 # CONFIG_NET_VENDOR_RDC is not set 122 126 # CONFIG_NET_VENDOR_REALTEK is not set 123 127 # CONFIG_NET_VENDOR_SEEQ is not set ··· 184 186 CONFIG_SOFT_WATCHDOG=m 185 187 CONFIG_SSB=m 186 188 CONFIG_SSB_DRIVER_PCICORE=y 187 - CONFIG_HTC_PASIC3=m 188 189 CONFIG_LPC_SCH=m 189 190 CONFIG_MFD_SM501=m 190 191 CONFIG_REGULATOR=y ··· 193 196 CONFIG_AGP=y 194 197 CONFIG_AGP_PARISC=y 195 198 CONFIG_DRM=y 199 + # CONFIG_DRM_I2C_CH7006 is not set 200 + # CONFIG_DRM_I2C_SIL164 is not set 196 201 CONFIG_DRM_RADEON=y 202 + CONFIG_DRM_NOUVEAU=m 203 + # CONFIG_DRM_NOUVEAU_BACKLIGHT is not set 204 + CONFIG_DRM_MGAG200=m 197 205 CONFIG_FB=y 198 - CONFIG_FB_MATROX=y 206 + CONFIG_FB_PM2=m 207 + CONFIG_FB_PM2_FIFO_DISCONNECT=y 208 + CONFIG_FB_NVIDIA=m 209 + CONFIG_FB_NVIDIA_I2C=y 210 + # CONFIG_FB_NVIDIA_BACKLIGHT is not set 211 + CONFIG_FB_RIVA=m 212 + CONFIG_FB_RIVA_I2C=y 213 + # CONFIG_FB_RIVA_BACKLIGHT is not set 214 + CONFIG_FB_MATROX=m 215 + CONFIG_FB_MATROX_MILLENIUM=y 199 216 CONFIG_FB_MATROX_MYSTIQUE=y 200 217 CONFIG_FB_MATROX_G=y 201 - CONFIG_FB_MATROX_I2C=y 202 - CONFIG_FB_MATROX_MAVEN=y 218 + CONFIG_FB_MATROX_I2C=m 219 + CONFIG_FB_MATROX_MAVEN=m 203 220 CONFIG_FB_RADEON=y 221 + # CONFIG_FB_RADEON_BACKLIGHT is not set 222 + CONFIG_FB_ATY128=m 223 + # CONFIG_FB_ATY128_BACKLIGHT is not set 224 + CONFIG_FB_ATY=m 225 + CONFIG_FB_ATY_CT=y 226 + CONFIG_FB_ATY_GX=y 227 + # CONFIG_FB_ATY_BACKLIGHT is not set 228 + CONFIG_FB_S3=m 229 + CONFIG_FB_SAVAGE=m 230 + CONFIG_FB_SAVAGE_I2C=y 231 + CONFIG_FB_SAVAGE_ACCEL=y 232 + CONFIG_FB_SIS=m 233 + CONFIG_FB_SIS_300=y 234 + CONFIG_FB_SIS_315=y 235 + CONFIG_FB_VOODOO1=m 236 + CONFIG_FB_TRIDENT=m 237 + CONFIG_FB_SMSCUFX=m 238 + CONFIG_FB_UDL=m 204 239 CONFIG_LOGO=y 205 240 # CONFIG_LOGO_LINUX_CLUT224 is not set 206 241 CONFIG_HIDRAW=y ··· 286 257 CONFIG_NLS_ISO8859_2=m 287 258 CONFIG_NLS_UTF8=m 288 259 CONFIG_CRYPTO_MANAGER=y 260 + CONFIG_CRYPTO_FCRYPT=m 289 261 CONFIG_CRYPTO_ECB=m 290 262 CONFIG_CRYPTO_PCBC=m 291 263 CONFIG_CRYPTO_MD4=m 292 264 CONFIG_CRYPTO_MD5=y 293 265 CONFIG_CRYPTO_MICHAEL_MIC=m 294 - CONFIG_CRYPTO_FCRYPT=m 295 266 CONFIG_CRYPTO_DEFLATE=m 296 267 # CONFIG_CRYPTO_HW is not set 297 268 CONFIG_CRC_CCITT=m
+5
arch/parisc/include/asm/irqflags.h
··· 31 31 32 32 static inline void arch_local_irq_restore(unsigned long flags) 33 33 { 34 + /* warn if IRQs are on although they should be off */ 35 + if (IS_ENABLED(CONFIG_LIGHTWEIGHT_SPINLOCK_CHECK)) 36 + if (arch_local_save_flags() & PSW_I) 37 + asm volatile("break 6,6\n"); /* SPINLOCK_BREAK_INSN */ 38 + 34 39 asm volatile("mtsm %0" : : "r" (flags) : "memory"); 35 40 } 36 41
+2 -2
arch/parisc/include/asm/pdc.h
··· 88 88 89 89 void pdc_emergency_unlock(void); 90 90 int pdc_sti_call(unsigned long func, unsigned long flags, 91 - unsigned long inptr, unsigned long outputr, 92 - unsigned long glob_cfg); 91 + unsigned long inptr, unsigned long outputr, 92 + unsigned long glob_cfg, int do_call64); 93 93 94 94 int __pdc_cpu_rendezvous(void); 95 95 void pdc_cpu_rendezvous_lock(void);
+35
arch/parisc/include/asm/processor.h
··· 11 11 12 12 #ifndef __ASSEMBLY__ 13 13 #include <linux/threads.h> 14 + #include <linux/irqreturn.h> 14 15 15 16 #include <asm/assembly.h> 16 17 #include <asm/prefetch.h> ··· 292 291 extern void toc_handler(void); 293 292 extern unsigned int toc_handler_size; 294 293 extern unsigned int toc_handler_csum; 294 + extern void do_cpu_irq_mask(struct pt_regs *); 295 + extern irqreturn_t timer_interrupt(int, void *); 296 + extern irqreturn_t ipi_interrupt(int, void *); 297 + 298 + /* called from assembly code: */ 299 + extern void start_parisc(void); 300 + extern void smp_callin(unsigned long); 301 + extern void sys_rt_sigreturn(struct pt_regs *, int); 302 + extern void do_notify_resume(struct pt_regs *, long); 303 + extern long do_syscall_trace_enter(struct pt_regs *); 304 + extern void do_syscall_trace_exit(struct pt_regs *); 305 + 306 + /* CPU startup and info */ 307 + struct seq_file; 308 + extern void early_trap_init(void); 309 + extern void collect_boot_cpu_data(void); 310 + extern int show_cpuinfo (struct seq_file *m, void *v); 311 + 312 + /* driver code in driver/parisc */ 313 + extern void gsc_init(void); 314 + extern void processor_init(void); 315 + extern void ccio_init(void); 316 + extern void hppb_init(void); 317 + extern void dino_init(void); 318 + extern void iosapic_init(void); 319 + extern void lba_init(void); 320 + extern void sba_init(void); 321 + extern void parisc_eisa_init(void); 322 + struct parisc_device; 323 + struct resource; 324 + extern void sba_distributed_lmmio(struct parisc_device *, struct resource *); 325 + extern void sba_directed_lmmio(struct parisc_device *, struct resource *); 326 + extern void lba_set_iregs(struct parisc_device *lba, u32 ibase, u32 imask); 327 + extern void ccio_cujo20_fixup(struct parisc_device *dev, u32 iovp); 295 328 296 329 #endif /* __ASSEMBLY__ */ 297 330
+12
arch/parisc/include/uapi/asm/cachectl.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 + #ifndef _ASM_CACHECTL 3 + #define _ASM_CACHECTL 4 + 5 + /* 6 + * Options for cacheflush system call 7 + */ 8 + #define ICACHE (1<<0) /* flush instruction cache */ 9 + #define DCACHE (1<<1) /* writeback and flush data cache */ 10 + #define BCACHE (ICACHE|DCACHE) /* flush both caches */ 11 + 12 + #endif /* _ASM_CACHECTL */
+4 -5
arch/parisc/kernel/audit.c
··· 40 40 41 41 int audit_classify_syscall(int abi, unsigned syscall) 42 42 { 43 - #ifdef CONFIG_COMPAT 44 - extern int parisc32_classify_syscall(unsigned); 45 - if (abi == AUDIT_ARCH_PARISC) 46 - return parisc32_classify_syscall(syscall); 47 - #endif 48 43 switch (syscall) { 49 44 case __NR_open: 50 45 return AUDITSC_OPEN; ··· 50 55 case __NR_openat2: 51 56 return AUDITSC_OPENAT2; 52 57 default: 58 + #ifdef CONFIG_COMPAT 59 + if (abi == AUDIT_ARCH_PARISC) 60 + return AUDITSC_COMPAT; 61 + #endif 53 62 return AUDITSC_NATIVE; 54 63 } 55 64 }
+49
arch/parisc/kernel/cache.c
··· 19 19 #include <linux/pagemap.h> 20 20 #include <linux/sched.h> 21 21 #include <linux/sched/mm.h> 22 + #include <linux/syscalls.h> 22 23 #include <asm/pdc.h> 23 24 #include <asm/cache.h> 24 25 #include <asm/cacheflush.h> ··· 29 28 #include <asm/sections.h> 30 29 #include <asm/shmparam.h> 31 30 #include <asm/mmu_context.h> 31 + #include <asm/cachectl.h> 32 32 33 33 int split_tlb __ro_after_init; 34 34 int dcache_stride __ro_after_init; ··· 792 790 flush_tlb_kernel_range(start, end); 793 791 } 794 792 EXPORT_SYMBOL(invalidate_kernel_vmap_range); 793 + 794 + 795 + SYSCALL_DEFINE3(cacheflush, unsigned long, addr, unsigned long, bytes, 796 + unsigned int, cache) 797 + { 798 + unsigned long start, end; 799 + ASM_EXCEPTIONTABLE_VAR(error); 800 + 801 + if (bytes == 0) 802 + return 0; 803 + if (!access_ok((void __user *) addr, bytes)) 804 + return -EFAULT; 805 + 806 + end = addr + bytes; 807 + 808 + if (cache & DCACHE) { 809 + start = addr; 810 + __asm__ __volatile__ ( 811 + #ifdef CONFIG_64BIT 812 + "1: cmpb,*<<,n %0,%2,1b\n" 813 + #else 814 + "1: cmpb,<<,n %0,%2,1b\n" 815 + #endif 816 + " fic,m %3(%4,%0)\n" 817 + "2: sync\n" 818 + ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 2b) 819 + : "+r" (start), "+r" (error) 820 + : "r" (end), "r" (dcache_stride), "i" (SR_USER)); 821 + } 822 + 823 + if (cache & ICACHE && error == 0) { 824 + start = addr; 825 + __asm__ __volatile__ ( 826 + #ifdef CONFIG_64BIT 827 + "1: cmpb,*<<,n %0,%2,1b\n" 828 + #else 829 + "1: cmpb,<<,n %0,%2,1b\n" 830 + #endif 831 + " fdc,m %3(%4,%0)\n" 832 + "2: sync\n" 833 + ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 2b) 834 + : "+r" (start), "+r" (error) 835 + : "r" (end), "r" (icache_stride), "i" (SR_USER)); 836 + } 837 + 838 + return error; 839 + }
-16
arch/parisc/kernel/compat_audit.c
··· 26 26 #include <asm-generic/audit_signal.h> 27 27 ~0U 28 28 }; 29 - 30 - int parisc32_classify_syscall(unsigned syscall) 31 - { 32 - switch (syscall) { 33 - case __NR_open: 34 - return AUDITSC_OPEN; 35 - case __NR_openat: 36 - return AUDITSC_OPENAT; 37 - case __NR_execve: 38 - return AUDITSC_EXECVE; 39 - case __NR_openat2: 40 - return AUDITSC_OPENAT2; 41 - default: 42 - return AUDITSC_COMPAT; 43 - } 44 - }
+17 -16
arch/parisc/kernel/drivers.c
··· 4 4 * 5 5 * Copyright (c) 1999 The Puffin Group 6 6 * Copyright (c) 2001 Matthew Wilcox for Hewlett Packard 7 - * Copyright (c) 2001 Helge Deller <deller@gmx.de> 7 + * Copyright (c) 2001-2023 Helge Deller <deller@gmx.de> 8 8 * Copyright (c) 2001,2002 Ryan Bradetich 9 9 * Copyright (c) 2004-2005 Thibaut VARENE <varenet@parisc-linux.org> 10 10 * ··· 74 74 } 75 75 76 76 /** 77 - * for_each_padev - Iterate over all devices in the tree 78 - * @fn: Function to call for each device. 79 - * @data: Data to pass to the called function. 77 + * for_each_padev - Iterate over all devices in the tree 78 + * @fn: Function to call for each device. 79 + * @data: Data to pass to the called function. 80 80 * 81 - * This performs a depth-first traversal of the tree, calling the 82 - * function passed for each node. It calls the function for parents 83 - * before children. 81 + * This performs a depth-first traversal of the tree, calling the 82 + * function passed for each node. It calls the function for parents 83 + * before children. 84 84 */ 85 85 86 86 static int for_each_padev(int (*fn)(struct device *, void *), void * data) ··· 280 280 281 281 /** 282 282 * find_pa_parent_type - Find a parent of a specific type 283 - * @dev: The device to start searching from 283 + * @padev: The device to start searching from 284 284 * @type: The device type to search for. 285 285 * 286 286 * Walks up the device tree looking for a device of the specified type. ··· 344 344 345 345 /** 346 346 * print_pa_hwpath - Returns hardware path for PA devices 347 - * dev: The device to return the path for 348 - * output: Pointer to a previously-allocated array to place the path in. 347 + * @dev: The device to return the path for 348 + * @output: Pointer to a previously-allocated array to place the path in. 349 349 * 350 350 * This function fills in the output array with a human-readable path 351 351 * to a PA device. This string is compatible with that used by PDC, and ··· 379 379 380 380 /** 381 381 * print_pci_hwpath - Returns hardware path for PCI devices 382 - * dev: The device to return the path for 383 - * output: Pointer to a previously-allocated array to place the path in. 382 + * @dev: The device to return the path for 383 + * @output: Pointer to a previously-allocated array to place the path in. 384 384 * 385 385 * This function fills in the output array with a human-readable path 386 386 * to a PCI device. This string is compatible with that used by PDC, and ··· 415 415 dev_set_name(&padev->dev, name); 416 416 } 417 417 418 - struct parisc_device * __init create_tree_node(char id, struct device *parent) 418 + static struct parisc_device * __init create_tree_node(char id, 419 + struct device *parent) 419 420 { 420 421 struct parisc_device *dev = kzalloc(sizeof(*dev), GFP_KERNEL); 421 422 if (!dev) ··· 742 741 }; 743 742 744 743 if (device_for_each_child(parent, &recurse_data, descend_children)) 745 - /* nothing */; 744 + { /* nothing */ }; 746 745 747 746 return d.dev; 748 747 } ··· 772 771 773 772 /** 774 773 * device_to_hwpath - Populates the hwpath corresponding to the given device. 775 - * @param dev the target device 776 - * @param path pointer to a previously allocated hwpath struct to be filled in 774 + * @dev: the target device 775 + * @path: pointer to a previously allocated hwpath struct to be filled in 777 776 */ 778 777 void device_to_hwpath(struct device *dev, struct hardware_path *path) 779 778 {
+36 -25
arch/parisc/kernel/firmware.c
··· 134 134 135 135 /** 136 136 * convert_to_wide - Convert the return buffer addresses into kernel addresses. 137 - * @address: The return buffer from PDC. 137 + * @addr: The return buffer from PDC. 138 138 * 139 139 * This function is used to convert the return buffer addresses retrieved from PDC 140 140 * into kernel addresses when the PDC address size and kernel address size are ··· 160 160 161 161 ret = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES, 162 162 __pa(pdc_result), 0); 163 + if (ret < 0) 164 + return; 163 165 convert_to_wide(pdc_result); 164 166 if (pdc_result[0] != NARROW_FIRMWARE) 165 167 parisc_narrow_firmware = 0; ··· 257 255 258 256 /** 259 257 * pdc_chassis_info - Return chassis information. 260 - * @result: The return buffer. 261 258 * @chassis_info: The memory buffer address. 259 + * @led_info: The size of the memory buffer address. 262 260 * @len: The size of the memory buffer address. 263 261 * 264 262 * An HVERSION dependent call for returning the chassis information. ··· 282 280 283 281 /** 284 282 * pdc_pat_chassis_send_log - Sends a PDC PAT CHASSIS log message. 285 - * @retval: -1 on error, 0 on success. Other value are PDC errors 283 + * @state: state of the machine 284 + * @data: value for that state 286 285 * 287 286 * Must be correctly formatted or expect system crash 288 287 */ ··· 306 303 307 304 /** 308 305 * pdc_chassis_disp - Updates chassis code 309 - * @retval: -1 on error, 0 on success 306 + * @disp: value to show on display 310 307 */ 311 308 int pdc_chassis_disp(unsigned long disp) 312 309 { ··· 321 318 } 322 319 323 320 /** 324 - * pdc_cpu_rendenzvous - Stop currently executing CPU 325 - * @retval: -1 on error, 0 on success 321 + * __pdc_cpu_rendezvous - Stop currently executing CPU and do not return. 326 322 */ 327 323 int __pdc_cpu_rendezvous(void) 328 324 { ··· 349 347 350 348 /** 351 349 * pdc_pat_get_PDC_entrypoint - Get PDC entry point for current CPU 352 - * @retval: -1 on error, 0 on success 350 + * @pdc_entry: pointer to where the PDC entry point should be stored 353 351 */ 354 352 int pdc_pat_get_PDC_entrypoint(unsigned long *pdc_entry) 355 353 { ··· 371 369 } 372 370 /** 373 371 * pdc_chassis_warn - Fetches chassis warnings 374 - * @retval: -1 on error, 0 on success 372 + * @warn: The warning value to be shown 375 373 */ 376 374 int pdc_chassis_warn(unsigned long *warn) 377 375 { ··· 523 521 524 522 /** 525 523 * pdc_model_sysmodel - Get the system model name. 524 + * @os_id: The operating system ID asked for (an OS_ID_* value) 526 525 * @name: A char array of at least 81 characters. 527 526 * 528 527 * Get system model name from PDC ROM (e.g. 9000/715 or 9000/778/B160L). ··· 552 549 553 550 /** 554 551 * pdc_model_versions - Identify the version number of each processor. 555 - * @cpu_id: The return buffer. 552 + * @versions: The return buffer. 556 553 * @id: The id of the processor to check. 557 554 * 558 555 * Returns the version number for each processor component. ··· 999 996 1000 997 /** 1001 998 * pdc_pci_config_read - read PCI config space. 1002 - * @hpa token from PDC to indicate which PCI device 1003 - * @pci_addr configuration space address to read from 999 + * @hpa: Token from PDC to indicate which PCI device 1000 + * @cfg_addr: Configuration space address to read from 1004 1001 * 1005 1002 * Read PCI Configuration space *before* linux PCI subsystem is running. 1006 1003 */ ··· 1022 1019 1023 1020 /** 1024 1021 * pdc_pci_config_write - read PCI config space. 1025 - * @hpa token from PDC to indicate which PCI device 1026 - * @pci_addr configuration space address to write 1027 - * @val value we want in the 32-bit register 1022 + * @hpa: Token from PDC to indicate which PCI device 1023 + * @cfg_addr: Configuration space address to write 1024 + * @val: Value we want in the 32-bit register 1028 1025 * 1029 1026 * Write PCI Configuration space *before* linux PCI subsystem is running. 1030 1027 */ ··· 1392 1389 } 1393 1390 1394 1391 int pdc_sti_call(unsigned long func, unsigned long flags, 1395 - unsigned long inptr, unsigned long outputr, 1396 - unsigned long glob_cfg) 1392 + unsigned long inptr, unsigned long outputr, 1393 + unsigned long glob_cfg, int do_call64) 1397 1394 { 1398 - int retval; 1395 + int retval = 0; 1399 1396 unsigned long irqflags; 1400 1397 1401 - spin_lock_irqsave(&pdc_lock, irqflags); 1402 - retval = real32_call(func, flags, inptr, outputr, glob_cfg); 1403 - spin_unlock_irqrestore(&pdc_lock, irqflags); 1398 + spin_lock_irqsave(&pdc_lock, irqflags); 1399 + if (IS_ENABLED(CONFIG_64BIT) && do_call64) { 1400 + #ifdef CONFIG_64BIT 1401 + retval = real64_call(func, flags, inptr, outputr, glob_cfg); 1402 + #else 1403 + WARN_ON(1); 1404 + #endif 1405 + } else { 1406 + retval = real32_call(func, flags, inptr, outputr, glob_cfg); 1407 + } 1408 + spin_unlock_irqrestore(&pdc_lock, irqflags); 1404 1409 1405 - return retval; 1410 + return retval; 1406 1411 } 1407 1412 EXPORT_SYMBOL(pdc_sti_call); 1408 1413 ··· 1560 1549 1561 1550 /** 1562 1551 * pdc_pat_pd_get_addr_map - Retrieve information about memory address ranges. 1563 - * @actlen: The return buffer. 1552 + * @actual_len: The return buffer. 1564 1553 * @mem_addr: Pointer to the memory buffer. 1565 1554 * @count: The number of bytes to read from the buffer. 1566 1555 * @offset: The offset with respect to the beginning of the buffer. ··· 1583 1572 } 1584 1573 1585 1574 /** 1586 - * pdc_pat_pd_get_PDC_interface_revisions - Retrieve PDC interface revisions. 1575 + * pdc_pat_pd_get_pdc_revisions - Retrieve PDC interface revisions. 1587 1576 * @legacy_rev: The legacy revision. 1588 1577 * @pat_rev: The PAT revision. 1589 1578 * @pdc_cap: The PDC capabilities. ··· 1638 1627 * pdc_pat_io_pci_cfg_write - Retrieve information about memory address ranges. 1639 1628 * @pci_addr: PCI configuration space address for which the write request is being made. 1640 1629 * @pci_size: Size of write in bytes. Valid values are 1, 2, and 4. 1641 - * @value: Pointer to 1, 2, or 4 byte value in low order end of argument to be 1630 + * @val: Pointer to 1, 2, or 4 byte value in low order end of argument to be 1642 1631 * written to PCI Config space. 1643 1632 * 1644 1633 */ ··· 1656 1645 } 1657 1646 1658 1647 /** 1659 - * pdc_pat_mem_pdc_info - Retrieve information about page deallocation table 1648 + * pdc_pat_mem_pdt_info - Retrieve information about page deallocation table 1660 1649 * @rinfo: memory pdt information 1661 1650 * 1662 1651 */
+1 -4
arch/parisc/kernel/irq.c
··· 24 24 25 25 #undef PARISC_IRQ_CR16_COUNTS 26 26 27 - extern irqreturn_t timer_interrupt(int, void *); 28 - extern irqreturn_t ipi_interrupt(int, void *); 29 - 30 27 #define EIEM_MASK(irq) (1UL<<(CPU_IRQ_MAX - irq)) 31 28 32 29 /* Bits in EIEM correlate with cpu_irq_action[]. ··· 486 489 #endif /* CONFIG_IRQSTACKS */ 487 490 488 491 /* ONLY called from entry.S:intr_extint() */ 489 - void do_cpu_irq_mask(struct pt_regs *regs) 492 + asmlinkage void do_cpu_irq_mask(struct pt_regs *regs) 490 493 { 491 494 struct pt_regs *old_regs; 492 495 unsigned long eirr_val;
+1 -1
arch/parisc/kernel/module.c
··· 845 845 const char *strtab = NULL; 846 846 const Elf_Shdr *s; 847 847 char *secstrings; 848 - int symindex = -1; 848 + int symindex __maybe_unused = -1; 849 849 Elf_Sym *newptr, *oldptr; 850 850 Elf_Shdr *symhdr = NULL; 851 851 #ifdef DEBUG
+1 -1
arch/parisc/kernel/pci-dma.c
··· 245 245 PCXL_SEARCH_LOOP(idx, mask, size); \ 246 246 } 247 247 248 - unsigned long 248 + static unsigned long 249 249 pcxl_alloc_range(size_t size) 250 250 { 251 251 int res_idx;
+11 -6
arch/parisc/kernel/pdc_chassis.c
··· 40 40 41 41 /** 42 42 * pdc_chassis_setup() - Enable/disable pdc_chassis code at boot time. 43 - * @str configuration param: 0 to disable chassis log 43 + * @str: configuration param: 0 to disable chassis log 44 44 * @return 1 45 45 */ 46 46 ··· 55 55 56 56 /** 57 57 * pdc_chassis_checkold() - Checks for old PDC_CHASSIS compatibility 58 - * @pdc_chassis_old: 1 if old pdc chassis style 59 58 * 60 59 * Currently, only E class and A180 are known to work with this. 61 60 * Inspired by Christoph Plattner ··· 79 80 80 81 /** 81 82 * pdc_chassis_panic_event() - Called by the panic handler. 83 + * @this: unused 84 + * @event: unused 85 + * @ptr: unused 82 86 * 83 87 * As soon as a panic occurs, we should inform the PDC. 84 88 */ ··· 90 88 unsigned long event, void *ptr) 91 89 { 92 90 pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC); 93 - return NOTIFY_DONE; 91 + return NOTIFY_DONE; 94 92 } 95 93 96 94 ··· 101 99 102 100 103 101 /** 104 - * parisc_reboot_event() - Called by the reboot handler. 102 + * pdc_chassis_reboot_event() - Called by the reboot handler. 103 + * @this: unused 104 + * @event: unused 105 + * @ptr: unused 105 106 * 106 107 * As soon as a reboot occurs, we should inform the PDC. 107 108 */ ··· 113 108 unsigned long event, void *ptr) 114 109 { 115 110 pdc_chassis_send_status(PDC_CHASSIS_DIRECT_SHUTDOWN); 116 - return NOTIFY_DONE; 111 + return NOTIFY_DONE; 117 112 } 118 113 119 114 ··· 153 148 /** 154 149 * pdc_chassis_send_status() - Sends a predefined message to the chassis, 155 150 * and changes the front panel LEDs according to the new system state 156 - * @retval: PDC call return value. 151 + * @message: Type of message, one of PDC_CHASSIS_DIRECT_* values. 157 152 * 158 153 * Only machines with 64 bits PDC PAT and those reported in 159 154 * pdc_chassis_checkold() are supported atm.
+1
arch/parisc/kernel/pdt.c
··· 23 23 #include <asm/pdc.h> 24 24 #include <asm/pdcpat.h> 25 25 #include <asm/sections.h> 26 + #include <asm/pgtable.h> 26 27 27 28 enum pdt_access_type { 28 29 PDT_NONE,
+1 -1
arch/parisc/kernel/perf.c
··· 288 288 static ssize_t perf_write(struct file *file, const char __user *buf, 289 289 size_t count, loff_t *ppos) 290 290 { 291 - size_t image_size; 291 + size_t image_size __maybe_unused; 292 292 uint32_t image_type; 293 293 uint32_t interface_type; 294 294 uint32_t test;
+1 -1
arch/parisc/kernel/processor.c
··· 58 58 */ 59 59 60 60 /** 61 - * init_cpu_profiler - enable/setup per cpu profiling hooks. 61 + * init_percpu_prof - enable/setup per cpu profiling hooks. 62 62 * @cpunum: The processor instance. 63 63 * 64 64 * FIXME: doesn't do much yet...
+3 -20
arch/parisc/kernel/setup.c
··· 45 45 struct proc_dir_entry * proc_gsc_root __read_mostly = NULL; 46 46 struct proc_dir_entry * proc_mckinley_root __read_mostly = NULL; 47 47 48 - void __init setup_cmdline(char **cmdline_p) 48 + static void __init setup_cmdline(char **cmdline_p) 49 49 { 50 50 extern unsigned int boot_args[]; 51 51 char *p; ··· 86 86 } 87 87 88 88 #ifdef CONFIG_PA11 89 - void __init dma_ops_init(void) 89 + static void __init dma_ops_init(void) 90 90 { 91 91 switch (boot_cpu_data.cpu_type) { 92 92 case pcx: ··· 105 105 } 106 106 } 107 107 #endif 108 - 109 - extern void collect_boot_cpu_data(void); 110 108 111 109 void __init setup_arch(char **cmdline_p) 112 110 { ··· 165 167 166 168 /* 167 169 * Display CPU info for all CPUs. 168 - * for parisc this is in processor.c 169 170 */ 170 - extern int show_cpuinfo (struct seq_file *m, void *v); 171 - 172 171 static void * 173 172 c_start (struct seq_file *m, loff_t *pos) 174 173 { ··· 290 295 return 0; 291 296 } 292 297 293 - extern void gsc_init(void); 294 - extern void processor_init(void); 295 - extern void ccio_init(void); 296 - extern void hppb_init(void); 297 - extern void dino_init(void); 298 - extern void iosapic_init(void); 299 - extern void lba_init(void); 300 - extern void sba_init(void); 301 - extern void eisa_init(void); 302 - 303 298 static int __init parisc_init(void) 304 299 { 305 300 u32 osid = (OS_ID_LINUX << 16); ··· 355 370 gsc_init(); 356 371 #endif 357 372 #ifdef CONFIG_EISA 358 - eisa_init(); 373 + parisc_eisa_init(); 359 374 #endif 360 375 361 376 #if defined(CONFIG_HPPB) ··· 376 391 377 392 void __init start_parisc(void) 378 393 { 379 - extern void early_trap_init(void); 380 - 381 394 int ret, cpunum; 382 395 struct pdc_coproc_cfg coproc_cfg; 383 396
+5 -5
arch/parisc/kernel/signal.c
··· 73 73 return err; 74 74 } 75 75 76 - void 76 + asmlinkage void 77 77 sys_rt_sigreturn(struct pt_regs *regs, int in_syscall) 78 78 { 79 79 struct rt_sigframe __user *frame; ··· 176 176 } 177 177 178 178 static long 179 - setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, int in_syscall) 179 + setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, long in_syscall) 180 180 181 181 { 182 182 unsigned long flags = 0; ··· 211 211 212 212 static long 213 213 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs, 214 - int in_syscall) 214 + long in_syscall) 215 215 { 216 216 struct rt_sigframe __user *frame; 217 217 unsigned long rp, usp; ··· 380 380 */ 381 381 382 382 static void 383 - handle_signal(struct ksignal *ksig, struct pt_regs *regs, int in_syscall) 383 + handle_signal(struct ksignal *ksig, struct pt_regs *regs, long in_syscall) 384 384 { 385 385 int ret; 386 386 sigset_t *oldset = sigmask_to_save(); ··· 578 578 restore_saved_sigmask(); 579 579 } 580 580 581 - void do_notify_resume(struct pt_regs *regs, long in_syscall) 581 + asmlinkage void do_notify_resume(struct pt_regs *regs, long in_syscall) 582 582 { 583 583 if (test_thread_flag(TIF_SIGPENDING) || 584 584 test_thread_flag(TIF_NOTIFY_SIGNAL))
+2 -1
arch/parisc/kernel/sys_parisc.c
··· 24 24 #include <linux/personality.h> 25 25 #include <linux/random.h> 26 26 #include <linux/compat.h> 27 + #include <linux/elf-randomize.h> 27 28 28 29 /* 29 30 * Construct an artificial page offset for the mapping based on the physical ··· 340 339 ((u64)lenhi << 32) | lenlo); 341 340 } 342 341 343 - long parisc_personality(unsigned long personality) 342 + asmlinkage long parisc_personality(unsigned long personality) 344 343 { 345 344 long err; 346 345
+1
arch/parisc/kernel/syscalls/syscall.tbl
··· 400 400 353 common pkey_free sys_pkey_free 401 401 354 common rseq sys_rseq 402 402 355 common kexec_file_load sys_kexec_file_load sys_kexec_file_load 403 + 356 common cacheflush sys_cacheflush 403 404 # up to 402 is unassigned and reserved for arch specific syscalls 404 405 403 32 clock_gettime64 sys_clock_gettime sys_clock_gettime 405 406 404 32 clock_settime64 sys_clock_settime sys_clock_settime
+2 -5
arch/parisc/kernel/traps.c
··· 338 338 void (*cpu_lpmc) (int code, struct pt_regs *regs) __read_mostly = default_trap; 339 339 340 340 341 - void transfer_pim_to_trap_frame(struct pt_regs *regs) 341 + static void transfer_pim_to_trap_frame(struct pt_regs *regs) 342 342 { 343 343 register int i; 344 344 extern unsigned int hpmc_pim_data[]; ··· 800 800 } 801 801 802 802 803 - void __init initialize_ivt(const void *iva) 803 + static void __init initialize_ivt(const void *iva) 804 804 { 805 805 extern const u32 os_hpmc[]; 806 806 807 807 int i; 808 808 u32 check = 0; 809 809 u32 *ivap; 810 - u32 *hpmcp; 811 810 u32 instr; 812 811 813 812 if (strcmp((const char *)iva, "cows can fly")) ··· 838 839 839 840 /* Setup IVA and compute checksum for HPMC handler */ 840 841 ivap[6] = (u32)__pa(os_hpmc); 841 - 842 - hpmcp = (u32 *)os_hpmc; 843 842 844 843 for (i=0; i<8; i++) 845 844 check += ivap[i];
+1
arch/parisc/kernel/unaligned.c
··· 11 11 #include <linux/signal.h> 12 12 #include <linux/ratelimit.h> 13 13 #include <linux/uaccess.h> 14 + #include <asm/unaligned.h> 14 15 #include <asm/hardirq.h> 15 16 #include <asm/traps.h> 16 17
+3 -2
arch/parisc/kernel/unwind.c
··· 24 24 #include <asm/unwind.h> 25 25 #include <asm/switch_to.h> 26 26 #include <asm/sections.h> 27 + #include <asm/ftrace.h> 27 28 28 29 /* #define DEBUG 1 */ 29 30 #ifdef DEBUG 30 31 #define dbg(x...) pr_debug(x) 31 32 #else 32 - #define dbg(x...) 33 + #define dbg(x...) do { } while (0) 33 34 #endif 34 35 35 36 #define KERNEL_START (KERNEL_BINARY_TEXT_START) ··· 180 179 /* Called from setup_arch to import the kernel unwind info */ 181 180 int __init unwind_init(void) 182 181 { 183 - long start, stop; 182 + long start __maybe_unused, stop __maybe_unused; 184 183 register unsigned long gp __asm__ ("r27"); 185 184 186 185 start = (long)&__start___unwind[0];
-2
arch/parisc/mm/init.c
··· 626 626 627 627 for (range = 0; range < npmem_ranges; range++) { 628 628 unsigned long start_paddr; 629 - unsigned long end_paddr; 630 629 unsigned long size; 631 630 632 631 start_paddr = pmem_ranges[range].start_pfn << PAGE_SHIFT; 633 632 size = pmem_ranges[range].pages << PAGE_SHIFT; 634 - end_paddr = start_paddr + size; 635 633 636 634 map_pages((unsigned long)__va(start_paddr), start_paddr, 637 635 size, PAGE_KERNEL, 0);
+12 -6
drivers/parisc/ccio-dma.c
··· 97 97 #define DBG_RUN_SG(x...) 98 98 #endif 99 99 100 - #define CCIO_INLINE inline 101 100 #define WRITE_U32(value, addr) __raw_writel(value, addr) 102 101 #define READ_U32(addr) __raw_readl(addr) 103 102 ··· 329 330 /** 330 331 * ccio_alloc_range - Allocate pages in the ioc's resource map. 331 332 * @ioc: The I/O Controller. 332 - * @pages_needed: The requested number of pages to be mapped into the 333 + * @dev: The PCI device. 334 + * @size: The requested number of bytes to be mapped into the 333 335 * I/O Pdir... 334 336 * 335 337 * This function searches the resource map of the ioc to locate a range ··· 552 552 * (Load Coherence Index) instruction. The 8 bits used for the virtual 553 553 * index are bits 12:19 of the value returned by LCI. 554 554 */ 555 - static void CCIO_INLINE 555 + static void 556 556 ccio_io_pdir_entry(u64 *pdir_ptr, space_t sid, unsigned long vba, 557 557 unsigned long hints) 558 558 { ··· 623 623 * 624 624 * FIXME: Can we change the byte_cnt to pages_mapped? 625 625 */ 626 - static CCIO_INLINE void 626 + static void 627 627 ccio_clear_io_tlb(struct ioc *ioc, dma_addr_t iovp, size_t byte_cnt) 628 628 { 629 629 u32 chain_size = 1 << ioc->chainid_shift; ··· 656 656 * 657 657 * FIXME: Can we change byte_cnt to pages_mapped? 658 658 */ 659 - static CCIO_INLINE void 659 + static void 660 660 ccio_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) 661 661 { 662 662 u32 iovp = (u32)CCIO_IOVP(iova); ··· 795 795 /** 796 796 * ccio_unmap_page - Unmap an address range from the IOMMU. 797 797 * @dev: The PCI device. 798 - * @addr: The start address of the DMA region. 798 + * @iova: The start address of the DMA region. 799 799 * @size: The length of the DMA region. 800 800 * @direction: The direction of the DMA transaction (to/from device). 801 + * @attrs: attributes 801 802 */ 802 803 static void 803 804 ccio_unmap_page(struct device *dev, dma_addr_t iova, size_t size, ··· 839 838 * @dev: The PCI device. 840 839 * @size: The length of the DMA region. 841 840 * @dma_handle: The DMA address handed back to the device (not the cpu). 841 + * @flag: allocation flags 842 + * @attrs: attributes 842 843 * 843 844 * This function implements the pci_alloc_consistent function. 844 845 */ ··· 875 872 * @size: The length of the DMA region. 876 873 * @cpu_addr: The cpu address returned from the ccio_alloc_consistent. 877 874 * @dma_handle: The device address returned from the ccio_alloc_consistent. 875 + * @attrs: attributes 878 876 * 879 877 * This function implements the pci_free_consistent function. 880 878 */ ··· 905 901 * @sglist: The scatter/gather list to be mapped in the IOMMU. 906 902 * @nents: The number of entries in the scatter/gather list. 907 903 * @direction: The direction of the DMA transaction (to/from device). 904 + * @attrs: attributes 908 905 * 909 906 * This function implements the pci_map_sg function. 910 907 */ ··· 985 980 * @sglist: The scatter/gather list to be unmapped from the IOMMU. 986 981 * @nents: The number of entries in the scatter/gather list. 987 982 * @direction: The direction of the DMA transaction (to/from device). 983 + * @attrs: attributes 988 984 * 989 985 * This function implements the pci_unmap_sg function. 990 986 */
+1 -4
drivers/parisc/dino.c
··· 924 924 "2.0" 925 925 }; 926 926 927 - void ccio_cujo20_fixup(struct parisc_device *dev, u32 iovp); 928 - 929 927 /* 930 928 ** Determine if dino should claim this chip (return 0) or not (return 1). 931 929 ** If so, initialize the chip appropriately (card-mode vs bridge mode). ··· 1084 1086 * This is the only routine which is NOT static. 1085 1087 * Must be called exactly once before pci_init(). 1086 1088 */ 1087 - int __init dino_init(void) 1089 + void __init dino_init(void) 1088 1090 { 1089 1091 register_parisc_driver(&dino_driver); 1090 - return 0; 1091 1092 } 1092 1093
+1 -1
drivers/parisc/eisa.c
··· 400 400 .probe = eisa_probe, 401 401 }; 402 402 403 - void __init eisa_init(void) 403 + void __init parisc_eisa_init(void) 404 404 { 405 405 register_parisc_driver(&eisa_driver); 406 406 }
+2 -6
drivers/parisc/lba_pci.c
··· 404 404 static void 405 405 lba_wr_cfg(struct lba_device *d, u32 tok, u8 reg, u32 data, u32 size) 406 406 { 407 - int error = 0; 407 + int error __maybe_unused = 0; 408 408 u32 arb_mask = 0; 409 409 u32 error_config = 0; 410 410 u32 status_control = 0; ··· 1018 1018 lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev) 1019 1019 { 1020 1020 unsigned long bytecnt; 1021 - long io_count; 1021 + long io_count __maybe_unused; 1022 1022 long status; /* PDC return status */ 1023 1023 long pa_count; 1024 1024 pdc_pat_cell_mod_maddr_block_t *pa_pdc_cell; /* PA_VIEW */ ··· 1162 1162 #define lba_pat_port_ops lba_astro_port_ops 1163 1163 #define lba_pat_resources(pa_dev, lba_dev) 1164 1164 #endif /* CONFIG_64BIT */ 1165 - 1166 - 1167 - extern void sba_distributed_lmmio(struct parisc_device *, struct resource *); 1168 - extern void sba_directed_lmmio(struct parisc_device *, struct resource *); 1169 1165 1170 1166 1171 1167 static void
+35 -1
drivers/parisc/pdc_stable.c
··· 509 509 510 510 /** 511 511 * pdcs_size_read - Stable Storage size output. 512 + * @kobj: The kobject used to share data with userspace. 513 + * @attr: The kobject attributes. 512 514 * @buf: The output buffer to write to. 513 515 */ 514 516 static ssize_t pdcs_size_read(struct kobject *kobj, ··· 530 528 531 529 /** 532 530 * pdcs_auto_read - Stable Storage autoboot/search flag output. 531 + * @kobj: The kobject used to share data with userspace. 532 + * @attr: The kobject attributes. 533 533 * @buf: The output buffer to write to. 534 534 * @knob: The PF_AUTOBOOT or PF_AUTOSEARCH flag 535 535 */ ··· 558 554 559 555 /** 560 556 * pdcs_autoboot_read - Stable Storage autoboot flag output. 557 + * @kobj: The kobject used to share data with userspace. 558 + * @attr: The kobject attributes. 561 559 * @buf: The output buffer to write to. 562 560 */ 563 561 static ssize_t pdcs_autoboot_read(struct kobject *kobj, ··· 570 564 571 565 /** 572 566 * pdcs_autosearch_read - Stable Storage autoboot flag output. 567 + * @kobj: The kobject used to share data with userspace. 568 + * @attr: The kobject attributes. 573 569 * @buf: The output buffer to write to. 574 570 */ 575 571 static ssize_t pdcs_autosearch_read(struct kobject *kobj, ··· 582 574 583 575 /** 584 576 * pdcs_timer_read - Stable Storage timer count output (in seconds). 577 + * @kobj: The kobject used to share data with userspace. 578 + * @attr: The kobject attributes. 585 579 * @buf: The output buffer to write to. 586 580 * 587 581 * The value of the timer field correponds to a number of seconds in powers of 2. ··· 611 601 612 602 /** 613 603 * pdcs_osid_read - Stable Storage OS ID register output. 604 + * @kobj: The kobject used to share data with userspace. 605 + * @attr: The kobject attributes. 614 606 * @buf: The output buffer to write to. 615 607 */ 616 608 static ssize_t pdcs_osid_read(struct kobject *kobj, ··· 631 619 632 620 /** 633 621 * pdcs_osdep1_read - Stable Storage OS-Dependent data area 1 output. 622 + * @kobj: The kobject used to share data with userspace. 623 + * @attr: The kobject attributes. 634 624 * @buf: The output buffer to write to. 635 625 * 636 626 * This can hold 16 bytes of OS-Dependent data. ··· 659 645 660 646 /** 661 647 * pdcs_diagnostic_read - Stable Storage Diagnostic register output. 648 + * @kobj: The kobject used to share data with userspace. 649 + * @attr: The kobject attributes. 662 650 * @buf: The output buffer to write to. 663 651 * 664 652 * I have NFC how to interpret the content of that register ;-). ··· 685 669 686 670 /** 687 671 * pdcs_fastsize_read - Stable Storage FastSize register output. 672 + * @kobj: The kobject used to share data with userspace. 673 + * @attr: The kobject attributes. 688 674 * @buf: The output buffer to write to. 689 675 * 690 676 * This register holds the amount of system RAM to be tested during boot sequence. ··· 715 697 716 698 /** 717 699 * pdcs_osdep2_read - Stable Storage OS-Dependent data area 2 output. 700 + * @kobj: The kobject used to share data with userspace. 701 + * @attr: The kobject attributes. 718 702 * @buf: The output buffer to write to. 719 703 * 720 704 * This can hold pdcs_size - 224 bytes of OS-Dependent data, when available. ··· 749 729 750 730 /** 751 731 * pdcs_auto_write - This function handles autoboot/search flag modifying. 732 + * @kobj: The kobject used to share data with userspace. 733 + * @attr: The kobject attributes. 752 734 * @buf: The input buffer to read from. 753 735 * @count: The number of bytes to be read. 754 736 * @knob: The PF_AUTOBOOT or PF_AUTOSEARCH flag ··· 823 801 824 802 /** 825 803 * pdcs_autoboot_write - This function handles autoboot flag modifying. 804 + * @kobj: The kobject used to share data with userspace. 805 + * @attr: The kobject attributes. 826 806 * @buf: The input buffer to read from. 827 807 * @count: The number of bytes to be read. 828 808 * ··· 841 817 842 818 /** 843 819 * pdcs_autosearch_write - This function handles autosearch flag modifying. 820 + * @kobj: The kobject used to share data with userspace. 821 + * @attr: The kobject attributes. 844 822 * @buf: The input buffer to read from. 845 823 * @count: The number of bytes to be read. 846 824 * ··· 859 833 860 834 /** 861 835 * pdcs_osdep1_write - Stable Storage OS-Dependent data area 1 input. 836 + * @kobj: The kobject used to share data with userspace. 837 + * @attr: The kobject attributes. 862 838 * @buf: The input buffer to read from. 863 839 * @count: The number of bytes to be read. 864 840 * ··· 898 870 899 871 /** 900 872 * pdcs_osdep2_write - Stable Storage OS-Dependent data area 2 input. 873 + * @kobj: The kobject used to share data with userspace. 874 + * @attr: The kobject attributes. 901 875 * @buf: The input buffer to read from. 902 876 * @count: The number of bytes to be read. 903 877 * ··· 1053 1023 static int __init 1054 1024 pdc_stable_init(void) 1055 1025 { 1056 - int rc = 0, error = 0; 1026 + int rc = 0, error; 1057 1027 u32 result; 1058 1028 1059 1029 /* find the size of the stable storage */ ··· 1082 1052 1083 1053 /* Don't forget the root entries */ 1084 1054 error = sysfs_create_group(stable_kobj, &pdcs_attr_group); 1055 + if (error) { 1056 + rc = -ENOMEM; 1057 + goto fail_ksetreg; 1058 + } 1085 1059 1086 1060 /* register the paths kset as a child of the stable kset */ 1087 1061 paths_kset = kset_create_and_add("paths", NULL, stable_kobj);
+18 -14
drivers/parisc/sba_iommu.c
··· 95 95 #define DBG_RES(x...) 96 96 #endif 97 97 98 - #define SBA_INLINE __inline__ 99 - 100 98 #define DEFAULT_DMA_HINT_REG 0 101 99 102 100 struct sba_device *sba_list; ··· 330 332 /** 331 333 * sba_search_bitmap - find free space in IO PDIR resource bitmap 332 334 * @ioc: IO MMU structure which owns the pdir we are interested in. 335 + * @dev: device to query the bitmap for 333 336 * @bits_wanted: number of entries we need. 334 337 * 335 338 * Find consecutive free bits in resource bitmap. 336 339 * Each bit represents one entry in the IO Pdir. 337 340 * Cool perf optimization: search for log2(size) bits at a time. 338 341 */ 339 - static SBA_INLINE unsigned long 342 + static unsigned long 340 343 sba_search_bitmap(struct ioc *ioc, struct device *dev, 341 344 unsigned long bits_wanted) 342 345 { ··· 430 431 /** 431 432 * sba_alloc_range - find free bits and mark them in IO PDIR resource bitmap 432 433 * @ioc: IO MMU structure which owns the pdir we are interested in. 434 + * @dev: device for which pages should be alloced 433 435 * @size: number of bytes to create a mapping for 434 436 * 435 437 * Given a size, find consecutive unmarked and then mark those bits in the ··· 490 490 * 491 491 * clear bits in the ioc's resource map 492 492 */ 493 - static SBA_INLINE void 493 + static void 494 494 sba_free_range(struct ioc *ioc, dma_addr_t iova, size_t size) 495 495 { 496 496 unsigned long iovp = SBA_IOVP(ioc, iova); ··· 568 568 * IOMMU uses little endian for the pdir. 569 569 */ 570 570 571 - static void SBA_INLINE 571 + static void 572 572 sba_io_pdir_entry(u64 *pdir_ptr, space_t sid, unsigned long vba, 573 573 unsigned long hint) 574 574 { ··· 609 609 * must be a power of 2. The "Cool perf optimization" in the 610 610 * allocation routine helps keep that true. 611 611 */ 612 - static SBA_INLINE void 612 + static void 613 613 sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) 614 614 { 615 615 u32 iovp = (u32) SBA_IOVP(ioc,iova); ··· 793 793 * @iova: IOVA of driver buffer previously mapped. 794 794 * @size: number of bytes mapped in driver buffer. 795 795 * @direction: R/W or both. 796 + * @attrs: attributes 796 797 * 797 798 * See Documentation/core-api/dma-api-howto.rst 798 799 */ ··· 873 872 * @hwdev: instance of PCI owned by the driver that's asking. 874 873 * @size: number of bytes mapped in driver buffer. 875 874 * @dma_handle: IOVA of new buffer. 875 + * @gfp: allocation flags 876 + * @attrs: attributes 876 877 * 877 878 * See Documentation/core-api/dma-api-howto.rst 878 879 */ ··· 905 902 * @hwdev: instance of PCI owned by the driver that's asking. 906 903 * @size: number of bytes mapped in driver buffer. 907 904 * @vaddr: virtual address IOVA of "consistent" buffer. 908 - * @dma_handler: IO virtual address of "consistent" buffer. 905 + * @dma_handle: IO virtual address of "consistent" buffer. 906 + * @attrs: attributes 909 907 * 910 908 * See Documentation/core-api/dma-api-howto.rst 911 909 */ ··· 942 938 * @sglist: array of buffer/length pairs 943 939 * @nents: number of entries in list 944 940 * @direction: R/W or both. 941 + * @attrs: attributes 945 942 * 946 943 * See Documentation/core-api/dma-api-howto.rst 947 944 */ ··· 951 946 enum dma_data_direction direction, unsigned long attrs) 952 947 { 953 948 struct ioc *ioc; 954 - int coalesced, filled = 0; 949 + int filled = 0; 955 950 unsigned long flags; 956 951 957 952 DBG_RUN_SG("%s() START %d entries\n", __func__, nents); ··· 990 985 ** w/o this association, we wouldn't have coherent DMA! 991 986 ** Access to the virtual address is what forces a two pass algorithm. 992 987 */ 993 - coalesced = iommu_coalesce_chunks(ioc, dev, sglist, nents, sba_alloc_range); 988 + iommu_coalesce_chunks(ioc, dev, sglist, nents, sba_alloc_range); 994 989 995 990 /* 996 991 ** Program the I/O Pdir ··· 1027 1022 * @sglist: array of buffer/length pairs 1028 1023 * @nents: number of entries in list 1029 1024 * @direction: R/W or both. 1025 + * @attrs: attributes 1030 1026 * 1031 1027 * See Documentation/core-api/dma-api-howto.rst 1032 1028 */ ··· 1235 1229 1236 1230 static int setup_ibase_imask_callback(struct device *dev, void *data) 1237 1231 { 1238 - /* lba_set_iregs() is in drivers/parisc/lba_pci.c */ 1239 - extern void lba_set_iregs(struct parisc_device *, u32, u32); 1240 1232 struct parisc_device *lba = to_parisc_device(dev); 1241 1233 struct ibase_data_struct *ibd = data; 1242 1234 int rope_num = (lba->hpa.start >> 13) & 0xf; ··· 1996 1992 1997 1993 /** 1998 1994 * sba_get_iommu - Assign the iommu pointer for the pci bus controller. 1999 - * @dev: The parisc device. 1995 + * @pci_hba: The parisc device. 2000 1996 * 2001 1997 * Returns the appropriate IOMMU data for the given parisc PCI controller. 2002 1998 * This is cached and used later for PCI DMA Mapping. ··· 2016 2012 2017 2013 /** 2018 2014 * sba_directed_lmmio - return first directed LMMIO range routed to rope 2019 - * @pa_dev: The parisc device. 2015 + * @pci_hba: The parisc device. 2020 2016 * @r: resource PCI host controller wants start/end fields assigned. 2021 2017 * 2022 2018 * For the given parisc PCI controller, determine if any direct ranges ··· 2058 2054 2059 2055 /** 2060 2056 * sba_distributed_lmmio - return portion of distributed LMMIO range 2061 - * @pa_dev: The parisc device. 2057 + * @pci_hba: The parisc device. 2062 2058 * @r: resource PCI host controller wants start/end fields assigned. 2063 2059 * 2064 2060 * For the given parisc PCI controller, return portion of distributed LMMIO
+2 -2
drivers/video/fbdev/stifb.c
··· 71 71 72 72 #include <video/sticore.h> 73 73 74 - /* REGION_BASE(fb_info, index) returns the virtual address for region <index> */ 74 + /* REGION_BASE(fb_info, index) returns the physical address for region <index> */ 75 75 #define REGION_BASE(fb_info, index) \ 76 - F_EXTEND(fb_info->sti->glob_cfg->region_ptrs[index]) 76 + F_EXTEND(fb_info->sti->regions_phys[index]) 77 77 78 78 #define NGLEDEVDEPROM_CRT_REGION 1 79 79
+104 -55
drivers/video/sticore.c
··· 4 4 * core code for console driver using HP's STI firmware 5 5 * 6 6 * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org> 7 - * Copyright (C) 2001-2020 Helge Deller <deller@gmx.de> 7 + * Copyright (C) 2001-2023 Helge Deller <deller@gmx.de> 8 8 * Copyright (C) 2001-2002 Thomas Bogendoerfer <tsbogend@alpha.franken.de> 9 9 * 10 10 * TODO: ··· 41 41 static int num_sti_roms __read_mostly; 42 42 static struct sti_struct *sti_roms[MAX_STI_ROMS] __read_mostly; 43 43 44 + static void *store_sti_val(struct sti_struct *sti, void *ptr, unsigned long val) 45 + { 46 + u32 *ptr32 = ptr; 47 + 48 + if (IS_ENABLED(CONFIG_64BIT) && sti->do_call64) { 49 + /* used for 64-bit STI ROM */ 50 + unsigned long *ptr64 = ptr; 51 + 52 + ptr64 = PTR_ALIGN(ptr64, sizeof(void *)); 53 + *ptr64++ = val; 54 + return ptr64; 55 + } 56 + 57 + /* used for 32-bit STI ROM */ 58 + *ptr32++ = val; 59 + return ptr32; 60 + } 61 + 62 + #define store_sti_ptr(sti, dest, ptr) \ 63 + store_sti_val(sti, dest, STI_PTR(ptr)) 44 64 45 65 /* The colour indices used by STI are 46 66 * 0 - Black ··· 107 87 memset(inptr, 0, sizeof(*inptr)); 108 88 inptr->text_planes = 3; /* # of text planes (max 3 for STI) */ 109 89 memset(inptr_ext, 0, sizeof(*inptr_ext)); 110 - inptr->ext_ptr = STI_PTR(inptr_ext); 90 + store_sti_ptr(sti, &inptr->ext_ptr, inptr_ext); 111 91 outptr->errno = 0; 112 92 113 93 ret = sti_call(sti, sti->init_graph, &default_init_flags, inptr, ··· 138 118 unsigned long flags; 139 119 s32 ret; 140 120 141 - outptr->ext_ptr = STI_PTR(&sti->sti_data->inq_outptr_ext); 121 + store_sti_ptr(sti, &outptr->ext_ptr, &sti->sti_data->inq_outptr_ext); 142 122 143 123 do { 144 124 spin_lock_irqsave(&sti->lock, flags); ··· 158 138 sti_putc(struct sti_struct *sti, int c, int y, int x, 159 139 struct sti_cooked_font *font) 160 140 { 161 - struct sti_font_inptr *inptr = &sti->sti_data->font_inptr; 141 + struct sti_font_inptr *inptr; 162 142 struct sti_font_inptr inptr_default = { 163 - .font_start_addr = STI_PTR(font->raw), 143 + .font_start_addr = (void *)STI_PTR(font->raw), 164 144 .index = c_index(sti, c), 165 145 .fg_color = c_fg(sti, c), 166 146 .bg_color = c_bg(sti, c), ··· 173 153 174 154 do { 175 155 spin_lock_irqsave(&sti->lock, flags); 176 - *inptr = inptr_default; 156 + inptr = &inptr_default; 157 + if (IS_ENABLED(CONFIG_64BIT) && !sti->do_call64) { 158 + /* copy below 4G if calling 32-bit on LP64 kernel */ 159 + inptr = &sti->sti_data->font_inptr; 160 + *inptr = inptr_default; 161 + /* skip first 4 bytes for 32-bit STI call */ 162 + inptr = (void *)(((unsigned long)inptr) + sizeof(u32)); 163 + } 177 164 ret = sti_call(sti, sti->font_unpmv, &default_font_flags, 178 165 inptr, outptr, sti->glob_cfg); 179 166 spin_unlock_irqrestore(&sti->lock, flags); ··· 197 170 sti_set(struct sti_struct *sti, int src_y, int src_x, 198 171 int height, int width, u8 color) 199 172 { 200 - struct sti_blkmv_inptr *inptr = &sti->sti_data->blkmv_inptr; 173 + struct sti_blkmv_inptr *inptr; 201 174 struct sti_blkmv_inptr inptr_default = { 202 175 .fg_color = color, 203 176 .bg_color = color, ··· 214 187 215 188 do { 216 189 spin_lock_irqsave(&sti->lock, flags); 217 - *inptr = inptr_default; 190 + inptr = &inptr_default; 191 + if (IS_ENABLED(CONFIG_64BIT) && !sti->do_call64) { 192 + /* copy below 4G if calling 32-bit on LP64 kernel */ 193 + inptr = &sti->sti_data->blkmv_inptr; 194 + *inptr = inptr_default; 195 + } 218 196 ret = sti_call(sti, sti->block_move, &clear_blkmv_flags, 219 197 inptr, outptr, sti->glob_cfg); 220 198 spin_unlock_irqrestore(&sti->lock, flags); ··· 230 198 sti_clear(struct sti_struct *sti, int src_y, int src_x, 231 199 int height, int width, int c, struct sti_cooked_font *font) 232 200 { 233 - struct sti_blkmv_inptr *inptr = &sti->sti_data->blkmv_inptr; 201 + struct sti_blkmv_inptr *inptr; 234 202 struct sti_blkmv_inptr inptr_default = { 235 203 .fg_color = c_fg(sti, c), 236 204 .bg_color = c_bg(sti, c), ··· 247 215 248 216 do { 249 217 spin_lock_irqsave(&sti->lock, flags); 250 - *inptr = inptr_default; 218 + inptr = &inptr_default; 219 + if (IS_ENABLED(CONFIG_64BIT) && !sti->do_call64) { 220 + /* copy below 4G if calling 32-bit on LP64 kernel */ 221 + inptr = &sti->sti_data->blkmv_inptr; 222 + *inptr = inptr_default; 223 + } 251 224 ret = sti_call(sti, sti->block_move, &clear_blkmv_flags, 252 225 inptr, outptr, sti->glob_cfg); 253 226 spin_unlock_irqrestore(&sti->lock, flags); ··· 268 231 int dst_y, int dst_x, int height, int width, 269 232 struct sti_cooked_font *font) 270 233 { 271 - struct sti_blkmv_inptr *inptr = &sti->sti_data->blkmv_inptr; 234 + struct sti_blkmv_inptr *inptr; 272 235 struct sti_blkmv_inptr inptr_default = { 273 236 .src_x = src_x * font->width, 274 237 .src_y = src_y * font->height, ··· 283 246 284 247 do { 285 248 spin_lock_irqsave(&sti->lock, flags); 286 - *inptr = inptr_default; 249 + inptr = &inptr_default; 250 + if (IS_ENABLED(CONFIG_64BIT) && !sti->do_call64) { 251 + /* copy below 4G if calling 32-bit on LP64 kernel */ 252 + inptr = &sti->sti_data->blkmv_inptr; 253 + *inptr = inptr_default; 254 + } 287 255 ret = sti_call(sti, sti->block_move, &default_blkmv_flags, 288 256 inptr, outptr, sti->glob_cfg); 289 257 spin_unlock_irqrestore(&sti->lock, flags); ··· 401 359 402 360 403 361 404 - static void sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, 405 - unsigned int sti_mem_request) 362 + static void sti_dump_globcfg(struct sti_struct *sti) 406 363 { 407 - struct sti_glob_cfg_ext *cfg; 364 + struct sti_glob_cfg *glob_cfg = sti->glob_cfg; 365 + struct sti_glob_cfg_ext *cfg = &sti->sti_data->glob_cfg_ext; 408 366 409 367 pr_debug("%d text planes\n" 410 368 "%4d x %4d screen resolution\n" 411 369 "%4d x %4d offscreen\n" 412 - "%4d x %4d layout\n" 413 - "regions at %08x %08x %08x %08x\n" 414 - "regions at %08x %08x %08x %08x\n" 415 - "reent_lvl %d\n" 416 - "save_addr %08x\n", 370 + "%4d x %4d layout\n", 417 371 glob_cfg->text_planes, 418 372 glob_cfg->onscreen_x, glob_cfg->onscreen_y, 419 373 glob_cfg->offscreen_x, glob_cfg->offscreen_y, 420 - glob_cfg->total_x, glob_cfg->total_y, 421 - glob_cfg->region_ptrs[0], glob_cfg->region_ptrs[1], 422 - glob_cfg->region_ptrs[2], glob_cfg->region_ptrs[3], 423 - glob_cfg->region_ptrs[4], glob_cfg->region_ptrs[5], 424 - glob_cfg->region_ptrs[6], glob_cfg->region_ptrs[7], 425 - glob_cfg->reent_lvl, 426 - glob_cfg->save_addr); 374 + glob_cfg->total_x, glob_cfg->total_y); 427 375 428 376 /* dump extended cfg */ 429 - cfg = PTR_STI((unsigned long)glob_cfg->ext_ptr); 430 377 pr_debug("monitor %d\n" 431 378 "in friendly mode: %d\n" 432 379 "power consumption %d watts\n" 433 380 "freq ref %d\n" 434 - "sti_mem_addr %08x (size=%d bytes)\n", 381 + "sti_mem_addr %px (size=%d bytes)\n", 435 382 cfg->curr_mon, 436 383 cfg->friendly_boot, 437 384 cfg->power, 438 385 cfg->freq_ref, 439 - cfg->sti_mem_addr, sti_mem_request); 386 + cfg->sti_mem_addr, sti->sti_mem_request); 440 387 } 441 388 442 389 static void sti_dump_outptr(struct sti_struct *sti) ··· 445 414 { 446 415 struct sti_glob_cfg *glob_cfg; 447 416 struct sti_glob_cfg_ext *glob_cfg_ext; 448 - void *save_addr; 417 + void *save_addr, *ptr; 449 418 void *sti_mem_addr; 450 419 int i, size; 451 420 ··· 463 432 save_addr = &sti->sti_data->save_addr; 464 433 sti_mem_addr = &sti->sti_data->sti_mem_addr; 465 434 466 - glob_cfg->ext_ptr = STI_PTR(glob_cfg_ext); 467 - glob_cfg->save_addr = STI_PTR(save_addr); 468 - for (i=0; i<8; i++) { 435 + for (i = 0; i < STI_REGION_MAX; i++) { 469 436 unsigned long newhpa, len; 470 437 471 438 if (sti->pd) { ··· 486 457 REGION_OFFSET_TO_PHYS(sti->regions[i], newhpa); 487 458 488 459 len = sti->regions[i].region_desc.length * 4096; 489 - if (len) 490 - glob_cfg->region_ptrs[i] = sti->regions_phys[i]; 491 460 492 - pr_debug("region #%d: phys %08lx, region_ptr %08x, len=%lukB, " 461 + pr_debug("region #%d: phys %08lx, len=%lukB, " 493 462 "btlb=%d, sysonly=%d, cache=%d, last=%d\n", 494 - i, sti->regions_phys[i], glob_cfg->region_ptrs[i], 495 - len/1024, 463 + i, sti->regions_phys[i], len / 1024, 496 464 sti->regions[i].region_desc.btlb, 497 465 sti->regions[i].region_desc.sys_only, 498 466 sti->regions[i].region_desc.cache, ··· 500 474 break; 501 475 } 502 476 503 - if (++i<8 && sti->regions[i].region) 504 - pr_warn("future ptr (0x%8x) not yet supported !\n", 505 - sti->regions[i].region); 477 + ptr = &glob_cfg->region_ptrs; 478 + for (i = 0; i < STI_REGION_MAX; i++) 479 + ptr = store_sti_val(sti, ptr, sti->regions_phys[i]); 506 480 507 - glob_cfg_ext->sti_mem_addr = STI_PTR(sti_mem_addr); 481 + *(s32 *)ptr = 0; /* set reent_lvl */ 482 + ptr += sizeof(s32); 483 + ptr = store_sti_ptr(sti, ptr, save_addr); 484 + ptr = store_sti_ptr(sti, ptr, glob_cfg_ext); 485 + 486 + store_sti_ptr(sti, &glob_cfg_ext->sti_mem_addr, sti_mem_addr); 508 487 509 488 sti->glob_cfg = glob_cfg; 510 489 ··· 833 802 raw->alt_code_type == ALT_CODE_TYPE_PA_RISC_64 834 803 ? "and 64 " : ""); 835 804 836 - sti->font_unpmv = address + (raw->font_unpmv & 0x03ffffff); 837 - sti->block_move = address + (raw->block_move & 0x03ffffff); 838 - sti->init_graph = address + (raw->init_graph & 0x03ffffff); 839 - sti->inq_conf = address + (raw->inq_conf & 0x03ffffff); 805 + if (IS_ENABLED(CONFIG_64BIT) && 806 + raw->alt_code_type == ALT_CODE_TYPE_PA_RISC_64) { 807 + sti->do_call64 = 1; 808 + sti->font_unpmv = address + (raw->font_unp_addr & 0x03ffffff); 809 + sti->block_move = address + (raw->block_move_addr & 0x03ffffff); 810 + sti->init_graph = address + (raw->init_graph_addr & 0x03ffffff); 811 + sti->inq_conf = address + (raw->inq_conf_addr & 0x03ffffff); 812 + } else { 813 + sti->font_unpmv = address + (raw->font_unpmv & 0x03ffffff); 814 + sti->block_move = address + (raw->block_move & 0x03ffffff); 815 + sti->init_graph = address + (raw->init_graph & 0x03ffffff); 816 + sti->inq_conf = address + (raw->inq_conf & 0x03ffffff); 817 + } 840 818 841 819 sti->rom = cooked; 842 820 sti->rom->raw = raw; ··· 858 818 sti_font_convert_bytemode(sti, sti->font); 859 819 sti_dump_font(sti->font); 860 820 821 + pr_info(" using %d-bit STI ROM functions\n", 822 + (IS_ENABLED(CONFIG_64BIT) && sti->do_call64) ? 64 : 32); 823 + 861 824 sti->sti_mem_request = raw->sti_mem_req; 825 + pr_debug(" mem_request = %d, reentsize %d\n", 826 + sti->sti_mem_request, raw->reentsize); 827 + 862 828 sti->graphics_id[0] = raw->graphics_id[0]; 863 829 sti->graphics_id[1] = raw->graphics_id[1]; 864 830 ··· 922 876 spin_lock_init(&sti->lock); 923 877 924 878 test_rom: 925 - /* if we can't read the ROM, bail out early. Not being able 926 - * to read the hpa is okay, for romless sti */ 927 - if (pdc_add_valid(address)) 879 + /* pdc_add_valid() works only on 32-bit kernels */ 880 + if ((!IS_ENABLED(CONFIG_64BIT) || 881 + (boot_cpu_data.pdc.capabilities & PDC_MODEL_OS32)) && 882 + pdc_add_valid(address)) { 928 883 goto out_err; 884 + } 929 885 930 886 sig = gsc_readl(address); 931 887 ··· 997 949 goto out_err; 998 950 999 951 sti_inq_conf(sti); 1000 - sti_dump_globcfg(sti->glob_cfg, sti->sti_mem_request); 952 + sti_dump_globcfg(sti); 1001 953 sti_dump_outptr(sti); 1002 954 1003 955 pr_info(" graphics card name: %s\n", ··· 1183 1135 unsigned long _glob_cfg = STI_PTR(glob_cfg); 1184 1136 int ret; 1185 1137 1186 - #ifdef CONFIG_64BIT 1187 1138 /* Check for overflow when using 32bit STI on 64bit kernel. */ 1188 - if (WARN_ONCE(_flags>>32 || _inptr>>32 || _outptr>>32 || _glob_cfg>>32, 1139 + if (WARN_ONCE(IS_ENABLED(CONFIG_64BIT) && !sti->do_call64 && 1140 + (upper_32_bits(_flags) || upper_32_bits(_inptr) || 1141 + upper_32_bits(_outptr) || upper_32_bits(_glob_cfg)), 1189 1142 "Out of 32bit-range pointers!")) 1190 1143 return -1; 1191 - #endif 1192 1144 1193 - ret = pdc_sti_call(func, _flags, _inptr, _outptr, _glob_cfg); 1145 + ret = pdc_sti_call(func, _flags, _inptr, _outptr, _glob_cfg, 1146 + sti->do_call64); 1194 1147 1195 1148 return ret; 1196 1149 }
+21 -21
include/video/sticore.h
··· 39 39 #define STI_WAIT 1 40 40 41 41 #define STI_PTR(p) ( virt_to_phys(p) ) 42 - #define PTR_STI(p) ( phys_to_virt((unsigned long)p) ) 43 42 44 43 #define sti_onscreen_x(sti) (sti->glob_cfg->onscreen_x) 45 44 #define sti_onscreen_y(sti) (sti->glob_cfg->onscreen_y) ··· 77 78 u8 friendly_boot; /* in friendly boot mode */ 78 79 s16 power; /* power calculation (in Watts) */ 79 80 s32 freq_ref; /* frequency reference */ 80 - u32 sti_mem_addr; /* pointer to global sti memory (size=sti_mem_request) */ 81 - u32 future_ptr; /* pointer to future data */ 81 + u32 *sti_mem_addr; /* pointer to global sti memory (size=sti_mem_request) */ 82 + u32 *future_ptr; /* pointer to future data */ 82 83 }; 83 84 84 85 struct sti_glob_cfg { ··· 89 90 s16 offscreen_y; /* offset height in pixels */ 90 91 s16 total_x; /* frame buffer width in pixels */ 91 92 s16 total_y; /* frame buffer height in pixels */ 92 - u32 region_ptrs[STI_REGION_MAX]; /* region pointers */ 93 + u32 *region_ptrs[STI_REGION_MAX]; /* region pointers */ 93 94 s32 reent_lvl; /* storage for reentry level value */ 94 - u32 save_addr; /* where to save or restore reentrant state */ 95 - u32 ext_ptr; /* pointer to extended glob_cfg data structure */ 95 + u32 *save_addr; /* where to save or restore reentrant state */ 96 + u32 *ext_ptr; /* pointer to extended glob_cfg data structure */ 96 97 }; 97 98 98 99 ··· 118 119 u32 caller_kernel : 1; /* set only by kernel for each call */ 119 120 u32 caller_other : 1; /* set only by non-[BR/K] caller */ 120 121 u32 pad : 14; /* pad to word boundary */ 121 - u32 future_ptr; /* pointer to future data */ 122 + u32 *future_ptr; /* pointer to future data */ 122 123 }; 123 124 124 125 struct sti_init_inptr_ext { 125 126 u8 config_mon_type; /* configure to monitor type */ 126 127 u8 pad[1]; /* pad to word boundary */ 127 128 u16 inflight_data; /* inflight data possible on PCI */ 128 - u32 future_ptr; /* pointer to future data */ 129 + u32 *future_ptr; /* pointer to future data */ 129 130 }; 130 131 131 132 struct sti_init_inptr { 132 133 s32 text_planes; /* number of planes to use for text */ 133 - u32 ext_ptr; /* pointer to extended init_graph inptr data structure*/ 134 + u32 *ext_ptr; /* pointer to extended init_graph inptr data structure*/ 134 135 }; 135 136 136 137 137 138 struct sti_init_outptr { 138 139 s32 errno; /* error number on failure */ 139 140 s32 text_planes; /* number of planes used for text */ 140 - u32 future_ptr; /* pointer to future data */ 141 + u32 *future_ptr; /* pointer to future data */ 141 142 }; 142 143 143 144 ··· 147 148 struct sti_conf_flags { 148 149 u32 wait : 1; /* should routine idle wait or not */ 149 150 u32 pad : 31; /* pad to word boundary */ 150 - u32 future_ptr; /* pointer to future data */ 151 + u32 *future_ptr; /* pointer to future data */ 151 152 }; 152 153 153 154 struct sti_conf_inptr { 154 - u32 future_ptr; /* pointer to future data */ 155 + u32 *future_ptr; /* pointer to future data */ 155 156 }; 156 157 157 158 struct sti_conf_outptr_ext { 158 159 u32 crt_config[3]; /* hardware specific X11/OGL information */ 159 160 u32 crt_hdw[3]; 160 - u32 future_ptr; 161 + u32 *future_ptr; 161 162 }; 162 163 163 164 struct sti_conf_outptr { ··· 173 174 s32 planes; /* number of fb planes in system */ 174 175 u8 dev_name[STI_DEV_NAME_LENGTH]; /* null terminated product name */ 175 176 u32 attributes; /* flags denoting attributes */ 176 - u32 ext_ptr; /* pointer to future data */ 177 + u32 *ext_ptr; /* pointer to future data */ 177 178 }; 178 179 179 180 struct sti_rom { ··· 257 258 /* STI font printing function structs */ 258 259 259 260 struct sti_font_inptr { 260 - u32 font_start_addr; /* address of font start */ 261 + u32 *font_start_addr; /* address of font start */ 261 262 s16 index; /* index into font table of character */ 262 263 u8 fg_color; /* foreground color of character */ 263 264 u8 bg_color; /* background color of character */ 264 265 s16 dest_x; /* X location of character upper left */ 265 266 s16 dest_y; /* Y location of character upper left */ 266 - u32 future_ptr; /* pointer to future data */ 267 + u32 *future_ptr; /* pointer to future data */ 267 268 }; 268 269 269 270 struct sti_font_flags { 270 271 u32 wait : 1; /* should routine idle wait or not */ 271 272 u32 non_text : 1; /* font unpack/move in non_text planes =1, text =0 */ 272 273 u32 pad : 30; /* pad to word boundary */ 273 - u32 future_ptr; /* pointer to future data */ 274 + u32 *future_ptr; /* pointer to future data */ 274 275 }; 275 276 276 277 struct sti_font_outptr { 277 278 s32 errno; /* error number on failure */ 278 - u32 future_ptr; /* pointer to future data */ 279 + u32 *future_ptr; /* pointer to future data */ 279 280 }; 280 281 281 282 /* STI blockmove structs */ ··· 286 287 u32 clear : 1; /* clear during move? */ 287 288 u32 non_text : 1; /* block move in non_text planes =1, text =0 */ 288 289 u32 pad : 28; /* pad to word boundary */ 289 - u32 future_ptr; /* pointer to future data */ 290 + u32 *future_ptr; /* pointer to future data */ 290 291 }; 291 292 292 293 struct sti_blkmv_inptr { ··· 298 299 s16 dest_y; /* dest upper left pixel y location */ 299 300 s16 width; /* block width in pixels */ 300 301 s16 height; /* block height in pixels */ 301 - u32 future_ptr; /* pointer to future data */ 302 + u32 *future_ptr; /* pointer to future data */ 302 303 }; 303 304 304 305 struct sti_blkmv_outptr { 305 306 s32 errno; /* error number on failure */ 306 - u32 future_ptr; /* pointer to future data */ 307 + u32 *future_ptr; /* pointer to future data */ 307 308 }; 308 309 309 310 ··· 350 351 unsigned long block_move; 351 352 unsigned long init_graph; 352 353 unsigned long inq_conf; 354 + int do_call64; /* call 64-bit code */ 353 355 354 356 /* all following fields are initialized by the generic routines */ 355 357 int text_planes;