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

Merge branch 'parisc-5.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc fixes from Helge Deller:

- Fix crashes when accessing PCI devices on some machines like C240 and
J5000. The crashes were triggered because we replaced cache flushes
by nops in the alternative coding where we shouldn't for some
machines.

- Dave fixed a race in the usage of the sr1 space register when used to
load the coherence index.

- Use the hardware lpa instruction to to load the physical address of
kernel virtual addresses in the iommu driver code.

- The kernel may fail to link when CONFIG_MLONGCALLS isn't set. Solve
that by rearranging functions in the final vmlinux executeable.

- Some defconfig cleanups and removal of compiler warnings.

* 'parisc-5.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: Fix crash due alternative coding for NP iopdir_fdc bit
parisc: Use lpa instruction to load physical addresses in driver code
parisc: configs: Remove useless UEVENT_HELPER_PATH
parisc: Use implicit space register selection for loading the coherence index of I/O pdirs
parisc: Fix compiler warnings in float emulation code
parisc/slab: cleanup after /proc/slab_allocators removal
parisc: Allow building 64-bit kernel without -mlong-calls compiler option
parisc: Kconfig: remove ARCH_DISCARD_MEMBLOCK

+50 -28
+2 -2
arch/parisc/Kconfig
··· 36 36 select GENERIC_STRNCPY_FROM_USER 37 37 select SYSCTL_ARCH_UNALIGN_ALLOW 38 38 select SYSCTL_EXCEPTION_TRACE 39 - select ARCH_DISCARD_MEMBLOCK 40 39 select HAVE_MOD_ARCH_SPECIFIC 41 40 select VIRT_TO_BUS 42 41 select MODULES_USE_ELF_RELA ··· 194 195 195 196 config MLONGCALLS 196 197 bool "Enable the -mlong-calls compiler option for big kernels" 197 - default y 198 + default y if !MODULES || UBSAN || FTRACE 199 + default n 198 200 depends on PA8X00 199 201 help 200 202 If you configure the kernel to include many drivers built-in instead
-1
arch/parisc/configs/712_defconfig
··· 34 34 CONFIG_NETFILTER=y 35 35 CONFIG_LLC2=m 36 36 CONFIG_NET_PKTGEN=m 37 - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 38 37 CONFIG_DEVTMPFS=y 39 38 CONFIG_DEVTMPFS_MOUNT=y 40 39 # CONFIG_STANDALONE is not set
-1
arch/parisc/configs/a500_defconfig
··· 70 70 # CONFIG_IP_DCCP_CCID3 is not set 71 71 CONFIG_LLC2=m 72 72 CONFIG_NET_PKTGEN=m 73 - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 74 73 CONFIG_DEVTMPFS=y 75 74 CONFIG_DEVTMPFS_MOUNT=y 76 75 # CONFIG_STANDALONE is not set
-1
arch/parisc/configs/b180_defconfig
··· 24 24 CONFIG_IP_MULTICAST=y 25 25 CONFIG_IP_PNP=y 26 26 CONFIG_IP_PNP_BOOTP=y 27 - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 28 27 CONFIG_DEVTMPFS=y 29 28 CONFIG_DEVTMPFS_MOUNT=y 30 29 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
-1
arch/parisc/configs/c3000_defconfig
··· 32 32 CONFIG_IPV6_TUNNEL=m 33 33 CONFIG_NETFILTER=y 34 34 CONFIG_NET_PKTGEN=m 35 - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 36 35 CONFIG_DEVTMPFS=y 37 36 CONFIG_DEVTMPFS_MOUNT=y 38 37 # CONFIG_STANDALONE is not set
-1
arch/parisc/configs/c8000_defconfig
··· 57 57 CONFIG_TIPC=m 58 58 CONFIG_LLC2=m 59 59 CONFIG_DNS_RESOLVER=y 60 - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 61 60 CONFIG_DEVTMPFS=y 62 61 CONFIG_DEVTMPFS_MOUNT=y 63 62 # CONFIG_STANDALONE is not set
-1
arch/parisc/configs/default_defconfig
··· 44 44 CONFIG_INET6_ESP=y 45 45 CONFIG_INET6_IPCOMP=y 46 46 CONFIG_LLC2=m 47 - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 48 47 CONFIG_DEVTMPFS=y 49 48 CONFIG_DEVTMPFS_MOUNT=y 50 49 # CONFIG_STANDALONE is not set
-1
arch/parisc/configs/generic-32bit_defconfig
··· 47 47 CONFIG_INET_DIAG=m 48 48 CONFIG_LLC2=m 49 49 # CONFIG_WIRELESS is not set 50 - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 51 50 CONFIG_DEVTMPFS=y 52 51 CONFIG_DEVTMPFS_MOUNT=y 53 52 # CONFIG_STANDALONE is not set
+24
arch/parisc/include/asm/special_insns.h
··· 2 2 #ifndef __PARISC_SPECIAL_INSNS_H 3 3 #define __PARISC_SPECIAL_INSNS_H 4 4 5 + #define lpa(va) ({ \ 6 + unsigned long pa; \ 7 + __asm__ __volatile__( \ 8 + "copy %%r0,%0\n\t" \ 9 + "lpa %%r0(%1),%0" \ 10 + : "=r" (pa) \ 11 + : "r" (va) \ 12 + : "memory" \ 13 + ); \ 14 + pa; \ 15 + }) 16 + 17 + #define lpa_user(va) ({ \ 18 + unsigned long pa; \ 19 + __asm__ __volatile__( \ 20 + "copy %%r0,%0\n\t" \ 21 + "lpa %%r0(%%sr3,%1),%0" \ 22 + : "=r" (pa) \ 23 + : "r" (va) \ 24 + : "memory" \ 25 + ); \ 26 + pa; \ 27 + }) 28 + 5 29 #define mfctl(reg) ({ \ 6 30 unsigned long cr; \ 7 31 __asm__ __volatile__( \
+2 -1
arch/parisc/kernel/alternative.c
··· 56 56 * time IO-PDIR is changed in Ike/Astro. 57 57 */ 58 58 if ((cond & ALT_COND_NO_IOC_FDC) && 59 - (boot_cpu_data.pdc.capabilities & PDC_MODEL_IOPDIR_FDC)) 59 + ((boot_cpu_data.cpu_type <= pcxw_) || 60 + (boot_cpu_data.pdc.capabilities & PDC_MODEL_IOPDIR_FDC))) 60 61 continue; 61 62 62 63 /* Want to replace pdtlb by a pdtlb,l instruction? */
+14 -7
arch/parisc/kernel/vmlinux.lds.S
··· 35 35 OUTPUT_ARCH(hppa:hppa2.0w) 36 36 #endif 37 37 38 + #define EXIT_TEXT_SECTIONS() .exit.text : { EXIT_TEXT } 39 + #if !defined(CONFIG_64BIT) || defined(CONFIG_MLONGCALLS) 40 + #define MLONGCALL_KEEP(x) 41 + #define MLONGCALL_DISCARD(x) x 42 + #else 43 + #define MLONGCALL_KEEP(x) x 44 + #define MLONGCALL_DISCARD(x) 45 + #endif 46 + 38 47 ENTRY(parisc_kernel_start) 39 48 #ifndef CONFIG_64BIT 40 49 jiffies = jiffies_64 + 4; ··· 56 47 57 48 __init_begin = .; 58 49 HEAD_TEXT_SECTION 59 - INIT_TEXT_SECTION(8) 50 + MLONGCALL_DISCARD(INIT_TEXT_SECTION(8)) 60 51 61 52 . = ALIGN(PAGE_SIZE); 62 53 INIT_DATA_SECTION(PAGE_SIZE) 63 - /* we have to discard exit text and such at runtime, not link time */ 64 - .exit.text : 65 - { 66 - EXIT_TEXT 67 - } 54 + MLONGCALL_DISCARD(EXIT_TEXT_SECTIONS()) 68 55 .exit.data : 69 56 { 70 57 EXIT_DATA ··· 78 73 79 74 _text = .; /* Text and read-only data */ 80 75 _stext = .; 76 + MLONGCALL_KEEP(INIT_TEXT_SECTION(8)) 81 77 .text ALIGN(PAGE_SIZE) : { 82 78 TEXT_TEXT 79 + LOCK_TEXT 83 80 SCHED_TEXT 84 81 CPUIDLE_TEXT 85 - LOCK_TEXT 86 82 KPROBES_TEXT 87 83 IRQENTRY_TEXT 88 84 SOFTIRQENTRY_TEXT ··· 98 92 *(.lock.text) /* out-of-line lock text */ 99 93 *(.gnu.warning) 100 94 } 95 + MLONGCALL_KEEP(EXIT_TEXT_SECTIONS()) 101 96 . = ALIGN(PAGE_SIZE); 102 97 _etext = .; 103 98 /* End of text section */
+4 -4
arch/parisc/math-emu/cnv_float.h
··· 47 47 ((exponent < (SGL_P - 1)) ? \ 48 48 (Sall(sgl_value) << (SGL_EXP_LENGTH + 1 + exponent)) : FALSE) 49 49 50 - #define Int_isinexact_to_sgl(int_value) (int_value << 33 - SGL_EXP_LENGTH) 50 + #define Int_isinexact_to_sgl(int_value) ((int_value << 33 - SGL_EXP_LENGTH) != 0) 51 51 52 52 #define Sgl_roundnearest_from_int(int_value,sgl_value) \ 53 53 if (int_value & 1<<(SGL_EXP_LENGTH - 2)) /* round bit */ \ 54 - if ((int_value << 34 - SGL_EXP_LENGTH) || Slow(sgl_value)) \ 54 + if (((int_value << 34 - SGL_EXP_LENGTH) != 0) || Slow(sgl_value)) \ 55 55 Sall(sgl_value)++ 56 56 57 57 #define Dint_isinexact_to_sgl(dint_valueA,dint_valueB) \ 58 - ((Dintp1(dint_valueA) << 33 - SGL_EXP_LENGTH) || Dintp2(dint_valueB)) 58 + (((Dintp1(dint_valueA) << 33 - SGL_EXP_LENGTH) != 0) || Dintp2(dint_valueB)) 59 59 60 60 #define Sgl_roundnearest_from_dint(dint_valueA,dint_valueB,sgl_value) \ 61 61 if (Dintp1(dint_valueA) & 1<<(SGL_EXP_LENGTH - 2)) \ 62 - if ((Dintp1(dint_valueA) << 34 - SGL_EXP_LENGTH) || \ 62 + if (((Dintp1(dint_valueA) << 34 - SGL_EXP_LENGTH) != 0) || \ 63 63 Dintp2(dint_valueB) || Slow(sgl_value)) Sall(sgl_value)++ 64 64 65 65 #define Dint_isinexact_to_dbl(dint_value) \
+2 -4
drivers/parisc/ccio-dma.c
··· 562 562 /* We currently only support kernel addresses */ 563 563 BUG_ON(sid != KERNEL_SPACE); 564 564 565 - mtsp(sid,1); 566 - 567 565 /* 568 566 ** WORD 1 - low order word 569 567 ** "hints" parm includes the VALID bit! 570 568 ** "dep" clobbers the physical address offset bits as well. 571 569 */ 572 - pa = virt_to_phys(vba); 570 + pa = lpa(vba); 573 571 asm volatile("depw %1,31,12,%0" : "+r" (pa) : "r" (hints)); 574 572 ((u32 *)pdir_ptr)[1] = (u32) pa; 575 573 ··· 592 594 ** Grab virtual index [0:11] 593 595 ** Deposit virt_idx bits into I/O PDIR word 594 596 */ 595 - asm volatile ("lci %%r0(%%sr1, %1), %0" : "=r" (ci) : "r" (vba)); 597 + asm volatile ("lci %%r0(%1), %0" : "=r" (ci) : "r" (vba)); 596 598 asm volatile ("extru %1,19,12,%0" : "+r" (ci) : "r" (ci)); 597 599 asm volatile ("depw %1,15,12,%0" : "+r" (pa) : "r" (ci)); 598 600
+2 -3
drivers/parisc/sba_iommu.c
··· 569 569 u64 pa; /* physical address */ 570 570 register unsigned ci; /* coherent index */ 571 571 572 - pa = virt_to_phys(vba); 572 + pa = lpa(vba); 573 573 pa &= IOVP_MASK; 574 574 575 - mtsp(sid,1); 576 - asm("lci 0(%%sr1, %1), %0" : "=r" (ci) : "r" (vba)); 575 + asm("lci 0(%1), %0" : "=r" (ci) : "r" (vba)); 577 576 pa |= (ci >> PAGE_SHIFT) & 0xff; /* move CI (8 bits) into lowest byte */ 578 577 579 578 pa |= SBA_PDIR_VALID_BIT; /* set "valid" bit */