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
732 stw r10,_CCR(r1)732 stw r10,_CCR(r1)
733 stw r1,KSP(r3) /* Set old stack pointer */733 stw r1,KSP(r3) /* Set old stack pointer */
734 734
735 kuap_check r2, r4735 kuap_check r2, r0
736#ifdef CONFIG_SMP736#ifdef CONFIG_SMP
737 /* We need a sync somewhere here to make sure that if the737 /* We need a sync somewhere here to make sure that if the
738 * previous task gets rescheduled on another CPU, it sees all738 * 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
534 lsizep = of_get_property(np, propnames[3], NULL);534 lsizep = of_get_property(np, propnames[3], NULL);
535 if (bsizep == NULL)535 if (bsizep == NULL)
536 bsizep = lsizep;536 bsizep = lsizep;
537 if (lsizep == NULL)
538 lsizep = bsizep;
537 if (lsizep != NULL)539 if (lsizep != NULL)
538 lsize = be32_to_cpu(*lsizep);540 lsize = be32_to_cpu(*lsizep);
539 if (bsizep != NULL)541 if (bsizep != NULL)
arch/powerpc/mm/nohash/8xx.c+3−0
@@ -185,6 +185,7 @@ void mmu_mark_initmem_nx(void) · 184 unmodified lines
185 mmu_mapin_ram_chunk(etext8, einittext8, PAGE_KERNEL);185 mmu_mapin_ram_chunk(etext8, einittext8, PAGE_KERNEL);
186 }186 }
187 }187 }
188 _tlbil_all();
188}189}
189 190
190#ifdef CONFIG_STRICT_KERNEL_RWX191#ifdef CONFIG_STRICT_KERNEL_RWX
@@ -199,6 +200,8 @@ void mmu_mark_rodata_ro(void) · 8 unmodified lines
199 ~(LARGE_PAGE_SIZE_8M - 1)));200 ~(LARGE_PAGE_SIZE_8M - 1)));
200 mmu_patch_addis(&patch__dtlbmiss_romem_top, -__pa(_sinittext));201 mmu_patch_addis(&patch__dtlbmiss_romem_top, -__pa(_sinittext));
201 202
203 _tlbil_all();
204
202 /* Update page tables for PTDUMP and BDI */205 /* Update page tables for PTDUMP and BDI */
203 mmu_mapin_ram_chunk(0, sinittext, __pgprot(0));206 mmu_mapin_ram_chunk(0, sinittext, __pgprot(0));
204 mmu_mapin_ram_chunk(0, etext, PAGE_KERNEL_ROX);207 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
397 397
398config PPC_KUAP_DEBUG398config PPC_KUAP_DEBUG
399 bool "Extra debugging for Kernel Userspace Access Protection"399 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)
401 help401 help
402 Add extra debugging for Kernel Userspace Access Protection (KUAP)402 Add extra debugging for Kernel Userspace Access Protection (KUAP)
403 If you're unsure, say N.403 If you're unsure, say N.
lib/mpi/longlong.h+17−17
@@ -722,22 +722,22 @@ do { \ · 721 unmodified lines
722do { \722do { \
723 if (__builtin_constant_p(bh) && (bh) == 0) \723 if (__builtin_constant_p(bh) && (bh) == 0) \
724 __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \724 __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \
725 : "=r" ((USItype)(sh)), \725 : "=r" (sh), \
726 "=&r" ((USItype)(sl)) \726 "=&r" (sl) \
727 : "%r" ((USItype)(ah)), \727 : "%r" ((USItype)(ah)), \
728 "%r" ((USItype)(al)), \728 "%r" ((USItype)(al)), \
729 "rI" ((USItype)(bl))); \729 "rI" ((USItype)(bl))); \
730 else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \730 else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \
731 __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \731 __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
732 : "=r" ((USItype)(sh)), \732 : "=r" (sh), \
733 "=&r" ((USItype)(sl)) \733 "=&r" (sl) \
734 : "%r" ((USItype)(ah)), \734 : "%r" ((USItype)(ah)), \
735 "%r" ((USItype)(al)), \735 "%r" ((USItype)(al)), \
736 "rI" ((USItype)(bl))); \736 "rI" ((USItype)(bl))); \
737 else \737 else \
738 __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \738 __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \
739 : "=r" ((USItype)(sh)), \739 : "=r" (sh), \
740 "=&r" ((USItype)(sl)) \740 "=&r" (sl) \
741 : "%r" ((USItype)(ah)), \741 : "%r" ((USItype)(ah)), \
742 "r" ((USItype)(bh)), \742 "r" ((USItype)(bh)), \
743 "%r" ((USItype)(al)), \743 "%r" ((USItype)(al)), \
@@ -747,36 +747,36 @@ do { \ · 3 unmodified lines
747do { \747do { \
748 if (__builtin_constant_p(ah) && (ah) == 0) \748 if (__builtin_constant_p(ah) && (ah) == 0) \
749 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \749 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \
750 : "=r" ((USItype)(sh)), \750 : "=r" (sh), \
751 "=&r" ((USItype)(sl)) \751 "=&r" (sl) \
752 : "r" ((USItype)(bh)), \752 : "r" ((USItype)(bh)), \
753 "rI" ((USItype)(al)), \753 "rI" ((USItype)(al)), \
754 "r" ((USItype)(bl))); \754 "r" ((USItype)(bl))); \
755 else if (__builtin_constant_p(ah) && (ah) == ~(USItype) 0) \755 else if (__builtin_constant_p(ah) && (ah) == ~(USItype) 0) \
756 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \756 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
757 : "=r" ((USItype)(sh)), \757 : "=r" (sh), \
758 "=&r" ((USItype)(sl)) \758 "=&r" (sl) \
759 : "r" ((USItype)(bh)), \759 : "r" ((USItype)(bh)), \
760 "rI" ((USItype)(al)), \760 "rI" ((USItype)(al)), \
761 "r" ((USItype)(bl))); \761 "r" ((USItype)(bl))); \
762 else if (__builtin_constant_p(bh) && (bh) == 0) \762 else if (__builtin_constant_p(bh) && (bh) == 0) \
763 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \763 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \
764 : "=r" ((USItype)(sh)), \764 : "=r" (sh), \
765 "=&r" ((USItype)(sl)) \765 "=&r" (sl) \
766 : "r" ((USItype)(ah)), \766 : "r" ((USItype)(ah)), \
767 "rI" ((USItype)(al)), \767 "rI" ((USItype)(al)), \
768 "r" ((USItype)(bl))); \768 "r" ((USItype)(bl))); \
769 else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \769 else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \
770 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \770 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
771 : "=r" ((USItype)(sh)), \771 : "=r" (sh), \
772 "=&r" ((USItype)(sl)) \772 "=&r" (sl) \
773 : "r" ((USItype)(ah)), \773 : "r" ((USItype)(ah)), \
774 "rI" ((USItype)(al)), \774 "rI" ((USItype)(al)), \
775 "r" ((USItype)(bl))); \775 "r" ((USItype)(bl))); \
776 else \776 else \
777 __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \777 __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \
778 : "=r" ((USItype)(sh)), \778 : "=r" (sh), \
779 "=&r" ((USItype)(sl)) \779 "=&r" (sl) \
780 : "r" ((USItype)(ah)), \780 : "r" ((USItype)(ah)), \
781 "r" ((USItype)(bh)), \781 "r" ((USItype)(bh)), \
782 "rI" ((USItype)(al)), \782 "rI" ((USItype)(al)), \
@@ -787,7 +787,7 @@ do { \ · 4 unmodified lines
787do { \787do { \
788 USItype __m0 = (m0), __m1 = (m1); \788 USItype __m0 = (m0), __m1 = (m1); \
789 __asm__ ("mulhwu %0,%1,%2" \789 __asm__ ("mulhwu %0,%1,%2" \
790 : "=r" ((USItype) ph) \790 : "=r" (ph) \
791 : "%r" (__m0), \791 : "%r" (__m0), \
792 "r" (__m1)); \792 "r" (__m1)); \
793 (pl) = __m0 * __m1; \793 (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