History

Merge tag 'powerpc-5.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman: - One important fix for a bug in the way we find the cache-line size from the device tree, which was leading to the wrong size being reported to userspace on some platforms. - A fix for 8xx STRICT_KERNEL_RWX which was leaving TLB entries around leading to a window at boot when the strict mapping wasn't enforced. - A fix to enable our KUAP (kernel user access prevention) debugging on PPC32. - A build fix for clang in lib/mpi. Thanks to: Chris Packham, Christophe Leroy, Nathan Chancellor, Qian Cai. * tag 'powerpc-5.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: lib/mpi: Fix building for powerpc with clang powerpc/mm: Fix CONFIG_PPC_KUAP_DEBUG on PPC32 powerpc/8xx: Fix STRICT_KERNEL_RWX startup test failure powerpc/setup_64: Set cache-line-size based on cache-block-size

Linus Torvalds committed 6 years ago

Commit 670bcd72 parents 5879288 5990cde5 files · +24 −19Browse files

Unified · Split

5 files
  1. arch/powerpc/kernel/entry_32.S +1 −1
  2. arch/powerpc/kernel/setup_64.c +2 −0
  3. arch/powerpc/mm/nohash/8xx.c +3 −0
  4. arch/powerpc/platforms/Kconfig.cputype +1 −1
  5. lib/mpi/longlong.h +17 −17
arch/powerpc/kernel/entry_32.S+1−1
@@ -732,7 +732,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_SPE) · 731 unmodified lines
732732 stw r10,_CCR(r1)
733733 stw r1,KSP(r3) /* Set old stack pointer */
734734
735− kuap_check r2, r4
735+ kuap_check r2, r0
736736 #ifdef CONFIG_SMP
737737 /* We need a sync somewhere here to make sure that if the
738738 * previous task gets rescheduled on another CPU, it sees all
arch/powerpc/kernel/setup_64.c+2−0
@@ -534,6 +534,8 @@ static bool __init parse_cache_info(struct device_node *np, · 533 unmodified lines
534534 lsizep = of_get_property(np, propnames[3], NULL);
535535 if (bsizep == NULL)
536536 bsizep = lsizep;
537+ if (lsizep == NULL)
538+ lsizep = bsizep;
537539 if (lsizep != NULL)
538540 lsize = be32_to_cpu(*lsizep);
539541 if (bsizep != NULL)
arch/powerpc/mm/nohash/8xx.c+3−0
@@ -185,6 +185,7 @@ void mmu_mark_initmem_nx(void) · 184 unmodified lines
185185 mmu_mapin_ram_chunk(etext8, einittext8, PAGE_KERNEL);
186186 }
187187 }
188+ _tlbil_all();
188189 }
189190
190191 #ifdef CONFIG_STRICT_KERNEL_RWX
@@ -199,6 +200,8 @@ void mmu_mark_rodata_ro(void) · 8 unmodified lines
199200 ~(LARGE_PAGE_SIZE_8M - 1)));
200201 mmu_patch_addis(&patch__dtlbmiss_romem_top, -__pa(_sinittext));
201202
203+ _tlbil_all();
204+
202205 /* Update page tables for PTDUMP and BDI */
203206 mmu_mapin_ram_chunk(0, sinittext, __pgprot(0));
204207 mmu_mapin_ram_chunk(0, etext, PAGE_KERNEL_ROX);
arch/powerpc/platforms/Kconfig.cputype+1−1
@@ -397,7 +397,7 @@ config PPC_KUAP · 396 unmodified lines
397397
398398 config PPC_KUAP_DEBUG
399399 bool "Extra debugging for Kernel Userspace Access Protection"
400− depends on PPC_KUAP && (PPC_RADIX_MMU || PPC_32)
400+ depends on PPC_KUAP && (PPC_RADIX_MMU || PPC32)
401401 help
402402 Add extra debugging for Kernel Userspace Access Protection (KUAP)
403403 If you're unsure, say N.
lib/mpi/longlong.h+17−17
@@ -722,22 +722,22 @@ do { \ · 721 unmodified lines
722722 do { \
723723 if (__builtin_constant_p(bh) && (bh) == 0) \
724724 __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \
725− : "=r" ((USItype)(sh)), \
726− "=&r" ((USItype)(sl)) \
725+ : "=r" (sh), \
726+ "=&r" (sl) \
727727 : "%r" ((USItype)(ah)), \
728728 "%r" ((USItype)(al)), \
729729 "rI" ((USItype)(bl))); \
730730 else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \
731731 __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
732− : "=r" ((USItype)(sh)), \
733− "=&r" ((USItype)(sl)) \
732+ : "=r" (sh), \
733+ "=&r" (sl) \
734734 : "%r" ((USItype)(ah)), \
735735 "%r" ((USItype)(al)), \
736736 "rI" ((USItype)(bl))); \
737737 else \
738738 __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \
739− : "=r" ((USItype)(sh)), \
740− "=&r" ((USItype)(sl)) \
739+ : "=r" (sh), \
740+ "=&r" (sl) \
741741 : "%r" ((USItype)(ah)), \
742742 "r" ((USItype)(bh)), \
743743 "%r" ((USItype)(al)), \
@@ -747,36 +747,36 @@ do { \ · 3 unmodified lines
747747 do { \
748748 if (__builtin_constant_p(ah) && (ah) == 0) \
749749 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \
750− : "=r" ((USItype)(sh)), \
751− "=&r" ((USItype)(sl)) \
750+ : "=r" (sh), \
751+ "=&r" (sl) \
752752 : "r" ((USItype)(bh)), \
753753 "rI" ((USItype)(al)), \
754754 "r" ((USItype)(bl))); \
755755 else if (__builtin_constant_p(ah) && (ah) == ~(USItype) 0) \
756756 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
757− : "=r" ((USItype)(sh)), \
758− "=&r" ((USItype)(sl)) \
757+ : "=r" (sh), \
758+ "=&r" (sl) \
759759 : "r" ((USItype)(bh)), \
760760 "rI" ((USItype)(al)), \
761761 "r" ((USItype)(bl))); \
762762 else if (__builtin_constant_p(bh) && (bh) == 0) \
763763 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \
764− : "=r" ((USItype)(sh)), \
765− "=&r" ((USItype)(sl)) \
764+ : "=r" (sh), \
765+ "=&r" (sl) \
766766 : "r" ((USItype)(ah)), \
767767 "rI" ((USItype)(al)), \
768768 "r" ((USItype)(bl))); \
769769 else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \
770770 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
771− : "=r" ((USItype)(sh)), \
772− "=&r" ((USItype)(sl)) \
771+ : "=r" (sh), \
772+ "=&r" (sl) \
773773 : "r" ((USItype)(ah)), \
774774 "rI" ((USItype)(al)), \
775775 "r" ((USItype)(bl))); \
776776 else \
777777 __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \
778− : "=r" ((USItype)(sh)), \
779− "=&r" ((USItype)(sl)) \
778+ : "=r" (sh), \
779+ "=&r" (sl) \
780780 : "r" ((USItype)(ah)), \
781781 "r" ((USItype)(bh)), \
782782 "rI" ((USItype)(al)), \
@@ -787,7 +787,7 @@ do { \ · 4 unmodified lines
787787 do { \
788788 USItype __m0 = (m0), __m1 = (m1); \
789789 __asm__ ("mulhwu %0,%1,%2" \
790− : "=r" ((USItype) ph) \
790+ : "=r" (ph) \
791791 : "%r" (__m0), \
792792 "r" (__m1)); \
793793 (pl) = __m0 * __m1; \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t