Home Home > GIT Browse > vanilla
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2018-04-26 22:41:34 +0200
committerJiri Kosina <jkosina@suse.cz>2018-04-26 22:41:34 +0200
commit5e830e8397050e2b02ab3283c42f54d5bd0ad72c (patch)
tree831d3fb102f74b57afed7ffb0ce003c25e1d4372
parent100c95890a03f4de10d27ea920caff283ec67f62 (diff)
parent6368307920f3644e348c01125fa59e7adc2d026e (diff)
Merge remote-tracking branch 'origin/users/msuchanek/SLE15/for-next' into SLE15
Pull ppc/radix and fips module updates from Michal Suchanek
-rw-r--r--config/ppc64le/default4
-rw-r--r--patches.arch/powerpc-64s-idle-Fix-restore-of-AMOR-on-POWER9-after.patch39
-rw-r--r--patches.arch/powerpc-mm-Add-a-CONFIG-option-to-choose-if-radix-is.patch81
-rw-r--r--patches.arch/powerpc-mm-radix-Fix-always-false-comparison-against.patch41
-rw-r--r--patches.arch/powerpc-mm-radix-Fix-checkstops-caused-by-invalid-tl.patch79
-rw-r--r--patches.arch/powerpc-mm-radix-Parse-disable_radix-commandline-cor.patch39
-rw-r--r--patches.arch/powerpc-mm-radix-Update-command-line-parsing-for-dis.patch75
-rw-r--r--patches.arch/powerpc-mm-radix-Update-pte-fragment-count-from-16-t.patch125
-rw-r--r--patches.arch/powerpc-xive-Fix-wrong-xmon-output-caused-by-typo.patch32
-rw-r--r--rpm/kernel-binary.spec.in3
-rw-r--r--rpm/kernel-source.spec.in1
-rw-r--r--rpm/modules.fips65
-rw-r--r--series.conf8
13 files changed, 590 insertions, 2 deletions
diff --git a/config/ppc64le/default b/config/ppc64le/default
index ce38f7978c..bcb25a7752 100644
--- a/config/ppc64le/default
+++ b/config/ppc64le/default
@@ -17,6 +17,7 @@ CONFIG_ALTIVEC=y
CONFIG_VSX=y
CONFIG_PPC_STD_MMU=y
CONFIG_PPC_RADIX_MMU=y
+CONFIG_PPC_RADIX_MMU_DEFAULT=y
CONFIG_PPC_MM_SLICES=y
CONFIG_PPC_HAVE_PMU_SUPPORT=y
CONFIG_PPC_PERF_CTRS=y
@@ -4451,6 +4452,7 @@ CONFIG_REISERFS_FS_SECURITY=y
CONFIG_XFS_FS=m
CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y
+# CONFIG_XFS_RT is not set
# CONFIG_XFS_WARN is not set
# CONFIG_XFS_DEBUG is not set
CONFIG_GFS2_FS=m
@@ -5056,7 +5058,6 @@ CONFIG_BOOTX_TEXT=y
# CONFIG_PPC_EARLY_DEBUG is not set
# CONFIG_FAIL_IOMMU is not set
# CONFIG_PPC_PTDUMP is not set
-# CONFIG_PPC_DEBUG_RFI is not set
#
# Security options
@@ -5347,4 +5348,3 @@ CONFIG_SUSE_PATCHLEVEL=0
CONFIG_SUSE_AUXRELEASE=0
CONFIG_SUSE_KERNEL_SUPPORTED=y
# CONFIG_SUSE_KERNEL_RELEASE is not set
-# CONFIG_XFS_RT is not set
diff --git a/patches.arch/powerpc-64s-idle-Fix-restore-of-AMOR-on-POWER9-after.patch b/patches.arch/powerpc-64s-idle-Fix-restore-of-AMOR-on-POWER9-after.patch
new file mode 100644
index 0000000000..12b57e3512
--- /dev/null
+++ b/patches.arch/powerpc-64s-idle-Fix-restore-of-AMOR-on-POWER9-after.patch
@@ -0,0 +1,39 @@
+From c1b25a17d24925b0961c319cfc3fd7e1dc778914 Mon Sep 17 00:00:00 2001
+From: Nicholas Piggin <npiggin@gmail.com>
+Date: Thu, 5 Apr 2018 16:10:00 +1000
+Subject: [PATCH] powerpc/64s/idle: Fix restore of AMOR on POWER9 after deep
+ sleep
+
+References: bsc#1055186, fate#323286
+Patch-mainline: v4.17-rc1
+Git-commit: c1b25a17d24925b0961c319cfc3fd7e1dc778914
+
+POWER8 restores AMOR when waking from deep sleep, but POWER9 does not,
+because it does not go through the subcore restore.
+
+Have POWER9 restore it in core restore.
+
+Fixes: ee97b6b99f42 ("powerpc/mm/radix: Setup AMOR in HV mode to allow key 0")
+Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/kernel/idle_book3s.S | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S
+index e5cb3eedb564..79d005445c6c 100644
+--- a/arch/powerpc/kernel/idle_book3s.S
++++ b/arch/powerpc/kernel/idle_book3s.S
+@@ -870,6 +870,8 @@ BEGIN_FTR_SECTION
+ mtspr SPRN_PTCR,r4
+ ld r4,_RPR(r1)
+ mtspr SPRN_RPR,r4
++ ld r4,_AMOR(r1)
++ mtspr SPRN_AMOR,r4
+ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
+
+ ld r4,_TSCR(r1)
+--
+2.13.6
+
diff --git a/patches.arch/powerpc-mm-Add-a-CONFIG-option-to-choose-if-radix-is.patch b/patches.arch/powerpc-mm-Add-a-CONFIG-option-to-choose-if-radix-is.patch
new file mode 100644
index 0000000000..31581b4cdf
--- /dev/null
+++ b/patches.arch/powerpc-mm-Add-a-CONFIG-option-to-choose-if-radix-is.patch
@@ -0,0 +1,81 @@
+From 02ac1be1cc226a8097642e53ccb4c094336cc03c Mon Sep 17 00:00:00 2001
+From: Michael Ellerman <mpe@ellerman.id.au>
+Date: Tue, 24 Oct 2017 17:48:49 +0200
+Subject: [PATCH] powerpc/mm: Add a CONFIG option to choose if radix is used by
+ default
+
+References: bsc#1055186, fate#323286
+Patch-mainline: v4.15-rc1
+Git-commit: 1fd6c02207107c8892219dacef01de7ced3d4ce7
+
+Currently if the hardware supports the radix MMU we will use
+it, *unless* "disable_radix" is passed on the kernel command line.
+
+However some users would like the reverse semantics. ie. The kernel
+uses the hash MMU by default, unless radix is explicitly requested on
+the command line.
+
+So add a CONFIG option to choose whether we use radix by default or
+not, and expand the disable_radix command line option to allow
+"disable_radix=no" which *enables* radix.
+
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/mm/init_64.c | 13 +++++++++++--
+ arch/powerpc/platforms/Kconfig.cputype | 13 +++++++++++++
+ 2 files changed, 24 insertions(+), 2 deletions(-)
+
+diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
+index f0030973c694..38e12d8af819 100644
+--- a/arch/powerpc/mm/init_64.c
++++ b/arch/powerpc/mm/init_64.c
+@@ -334,10 +334,19 @@ EXPORT_SYMBOL_GPL(realmode_pfn_to_page);
+ #endif /* CONFIG_SPARSEMEM_VMEMMAP/CONFIG_FLATMEM */
+
+ #ifdef CONFIG_PPC_BOOK3S_64
+-static bool disable_radix;
++static bool disable_radix = !IS_ENABLED(CONFIG_PPC_RADIX_MMU_DEFAULT);
++
+ static int __init parse_disable_radix(char *p)
+ {
+- disable_radix = true;
++ bool val;
++
++ if (strlen(p) == 0)
++ val = true;
++ else if (kstrtobool(p, &val))
++ return -EINVAL;
++
++ disable_radix = val;
++
+ return 0;
+ }
+ early_param("disable_radix", parse_disable_radix);
+diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
+index f3d219aeb50f..26c084da4c08 100644
+--- a/arch/powerpc/platforms/Kconfig.cputype
++++ b/arch/powerpc/platforms/Kconfig.cputype
+@@ -305,6 +305,19 @@ config PPC_RADIX_MMU
+ is only implemented by IBM Power9 CPUs, if you don't have one of them
+ you can probably disable this.
+
++config PPC_RADIX_MMU_DEFAULT
++ bool "Default to using the Radix MMU when possible"
++ depends on PPC_RADIX_MMU
++ default y
++ help
++ When the hardware supports the Radix MMU, default to using it unless
++ "disable_radix[=yes]" is specified on the kernel command line.
++
++ If this option is disabled, the Hash MMU will be used by default,
++ unless "disable_radix=no" is specified on the kernel command line.
++
++ If you're unsure, say Y.
++
+ config PPC_MMU_NOHASH
+ def_bool y
+ depends on !PPC_STD_MMU
+--
+2.13.6
+
diff --git a/patches.arch/powerpc-mm-radix-Fix-always-false-comparison-against.patch b/patches.arch/powerpc-mm-radix-Fix-always-false-comparison-against.patch
new file mode 100644
index 0000000000..742a9ede51
--- /dev/null
+++ b/patches.arch/powerpc-mm-radix-Fix-always-false-comparison-against.patch
@@ -0,0 +1,41 @@
+From 19e68b2aec3c0a2bd770d3c358a296a1849f308a Mon Sep 17 00:00:00 2001
+From: Mathieu Malaterre <malat@debian.org>
+Date: Thu, 22 Mar 2018 22:03:18 +0100
+Subject: [PATCH] powerpc/mm/radix: Fix always false comparison against
+ MMU_NO_CONTEXT
+
+References: bsc#1055186, fate#323286
+Patch-mainline: v4.17-rc1
+Git-commit: 19e68b2aec3c0a2bd770d3c358a296a1849f308a
+
+In commit 9690c1574268 ("powerpc/mm/radix: Fix always false comparison
+against MMU_NO_CONTEXT") an issue was discovered where `mm->context.id` was
+being truncated to an `unsigned int`, while the PID is actually an
+`unsigned long`. Update the earlier patch by fixing one remaining
+occurrence. Discovered during a compilation with W=1:
+
+ arch/powerpc/mm/tlb-radix.c:702:19: error: comparison is always false due to limited range of data type [-Werror=type-limits]
+
+Signed-off-by: Mathieu Malaterre <malat@debian.org>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/mm/tlb-radix.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
+index a8b178dd2e82..2fba6170ab3f 100644
+--- a/arch/powerpc/mm/tlb-radix.c
++++ b/arch/powerpc/mm/tlb-radix.c
+@@ -706,7 +706,7 @@ void radix__flush_tlb_pte_p9_dd1(unsigned long old_pte, struct mm_struct *mm,
+ #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
+ extern void radix_kvm_prefetch_workaround(struct mm_struct *mm)
+ {
+- unsigned int pid = mm->context.id;
++ unsigned long pid = mm->context.id;
+
+ if (unlikely(pid == MMU_NO_CONTEXT))
+ return;
+--
+2.13.6
+
diff --git a/patches.arch/powerpc-mm-radix-Fix-checkstops-caused-by-invalid-tl.patch b/patches.arch/powerpc-mm-radix-Fix-checkstops-caused-by-invalid-tl.patch
new file mode 100644
index 0000000000..046b9b0a94
--- /dev/null
+++ b/patches.arch/powerpc-mm-radix-Fix-checkstops-caused-by-invalid-tl.patch
@@ -0,0 +1,79 @@
+From 2675c13b293a007b7b7f8229514126bd23df09a7 Mon Sep 17 00:00:00 2001
+From: Michael Ellerman <mpe@ellerman.id.au>
+Date: Thu, 12 Apr 2018 11:35:55 +1000
+Subject: [PATCH] powerpc/mm/radix: Fix checkstops caused by invalid tlbiel
+
+References: bsc#1055186, fate#323286
+Patch-mainline: v4.17-rc1
+Git-commit: 2675c13b293a007b7b7f8229514126bd23df09a7
+
+In tlbiel_radix_set_isa300() we use the PPC_TLBIEL() macro to
+construct tlbiel instructions. The instruction takes 5 fields, two of
+which are registers, and the others are constants. But because it's
+constructed with inline asm the compiler doesn't know that.
+
+We got the constraint wrong on the 'r' field, using "r" tells the
+compiler to put the value in a register. The value we then get in the
+macro is the *register number*, not the value of the field.
+
+That means when we mask the register number with 0x1 we get 0 or 1
+depending on which register the compiler happens to put the constant
+in, eg:
+
+ li r10,1
+ tlbiel r8,r9,2,0,0
+
+ li r7,1
+ tlbiel r10,r6,0,0,1
+
+If we're unlucky we might generate an invalid instruction form, for
+example RIC=0, PRS=1 and R=0, tlbiel r8,r7,0,1,0, this has been
+observed to cause machine checks:
+
+ Oops: Machine check, sig: 7 [#1]
+ CPU: 24 PID: 0 Comm: swapper
+ NIP: 00000000000385f4 LR: 000000000100ed00 CTR: 000000000000007f
+ REGS: c00000000110bb40 TRAP: 0200
+ MSR: 9000000000201003 <SF,HV,ME,RI,LE> CR: 48002222 XER: 20040000
+ CFAR: 00000000000385d0 DAR: 0000000000001c00 DSISR: 00000200 SOFTE: 1
+
+If the machine check happens early in boot while we have MSR_ME=0 it
+will escalate into a checkstop and kill the box entirely.
+
+To fix it we could change the inline asm constraint to "i" which
+tells the compiler the value is a constant. But a better fix is to just
+pass a literal 1 into the macro, which bypasses any problems with inline
+asm constraints.
+
+Fixes: d4748276ae14 ("powerpc/64s: Improve local TLB flush for boot and MCE on POWER9")
+Cc: stable@vger.kernel.org # v4.16+
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/mm/tlb-radix.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
+index 2fba6170ab3f..a5d7309c2d05 100644
+--- a/arch/powerpc/mm/tlb-radix.c
++++ b/arch/powerpc/mm/tlb-radix.c
+@@ -33,13 +33,12 @@ static inline void tlbiel_radix_set_isa300(unsigned int set, unsigned int is,
+ {
+ unsigned long rb;
+ unsigned long rs;
+- unsigned int r = 1; /* radix format */
+
+ rb = (set << PPC_BITLSHIFT(51)) | (is << PPC_BITLSHIFT(53));
+ rs = ((unsigned long)pid << PPC_BITLSHIFT(31));
+
+- asm volatile(PPC_TLBIEL(%0, %1, %2, %3, %4)
+- : : "r"(rb), "r"(rs), "i"(ric), "i"(prs), "r"(r)
++ asm volatile(PPC_TLBIEL(%0, %1, %2, %3, 1)
++ : : "r"(rb), "r"(rs), "i"(ric), "i"(prs)
+ : "memory");
+ }
+
+--
+2.13.6
+
diff --git a/patches.arch/powerpc-mm-radix-Parse-disable_radix-commandline-cor.patch b/patches.arch/powerpc-mm-radix-Parse-disable_radix-commandline-cor.patch
new file mode 100644
index 0000000000..92831620d6
--- /dev/null
+++ b/patches.arch/powerpc-mm-radix-Parse-disable_radix-commandline-cor.patch
@@ -0,0 +1,39 @@
+From cec4e9b28ffbcb9ce04b9e33946c505e5ad7a295 Mon Sep 17 00:00:00 2001
+From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
+Date: Fri, 30 Mar 2018 17:39:01 +0530
+Subject: [PATCH] powerpc/mm/radix: Parse disable_radix commandline correctly.
+
+References: bsc#1055186, fate#323286
+Patch-mainline: v4.17-rc1
+Git-commit: cec4e9b28ffbcb9ce04b9e33946c505e5ad7a295
+
+kernel parameter disable_radix takes different options
+disable_radix=yes|no|1|0 or just disable_radix. When using the later
+format we get below error.
+
+ `Malformed early option 'disable_radix'`
+
+Fixes: 1fd6c0220710 ("powerpc/mm: Add a CONFIG option to choose if radix is used by default")
+Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/mm/init_64.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
+index 63470b06c502..51ce091914f9 100644
+--- a/arch/powerpc/mm/init_64.c
++++ b/arch/powerpc/mm/init_64.c
+@@ -366,7 +366,7 @@ static int __init parse_disable_radix(char *p)
+ {
+ bool val;
+
+- if (strlen(p) == 0)
++ if (!p)
+ val = true;
+ else if (kstrtobool(p, &val))
+ return -EINVAL;
+--
+2.13.6
+
diff --git a/patches.arch/powerpc-mm-radix-Update-command-line-parsing-for-dis.patch b/patches.arch/powerpc-mm-radix-Update-command-line-parsing-for-dis.patch
new file mode 100644
index 0000000000..25b055776a
--- /dev/null
+++ b/patches.arch/powerpc-mm-radix-Update-command-line-parsing-for-dis.patch
@@ -0,0 +1,75 @@
+From 7a22d6321c3da61a3778f84caa5b3a398ed019d1 Mon Sep 17 00:00:00 2001
+From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
+Date: Fri, 30 Mar 2018 17:39:02 +0530
+Subject: [PATCH] powerpc/mm/radix: Update command line parsing for
+ disable_radix
+
+References: bsc#1055186, fate#323286
+Patch-mainline: v4.17-rc1
+Git-commit: 7a22d6321c3da61a3778f84caa5b3a398ed019d1
+
+kernel parameter disable_radix takes different options
+disable_radix=yes|no|1|0 or just disable_radix.
+
+prom_init parsing is not supporting these options.
+
+Fixes: 1fd6c0220710 ("powerpc/mm: Add a CONFIG option to choose if radix is used by default")
+Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/kernel/prom_init.c | 16 +++++++++++++---
+ arch/powerpc/kernel/prom_init_check.sh | 2 +-
+ 2 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
+index e181fdea3da9..f9d6befb55a6 100644
+--- a/arch/powerpc/kernel/prom_init.c
++++ b/arch/powerpc/kernel/prom_init.c
+@@ -171,7 +171,7 @@ static unsigned long __initdata prom_tce_alloc_start;
+ static unsigned long __initdata prom_tce_alloc_end;
+ #endif
+
+-static bool __initdata prom_radix_disable;
++static bool prom_radix_disable __initdata = !IS_ENABLED(CONFIG_PPC_RADIX_MMU_DEFAULT);
+
+ struct platform_support {
+ bool hash_mmu;
+@@ -641,9 +641,19 @@ static void __init early_cmdline_parse(void)
+
+ opt = strstr(prom_cmd_line, "disable_radix");
+ if (opt) {
+- prom_debug("Radix disabled from cmdline\n");
+- prom_radix_disable = true;
++ opt += 13;
++ if (*opt && *opt == '=') {
++ bool val;
++
++ if (kstrtobool(++opt, &val))
++ prom_radix_disable = false;
++ else
++ prom_radix_disable = val;
++ } else
++ prom_radix_disable = true;
+ }
++ if (prom_radix_disable)
++ prom_debug("Radix disabled from cmdline\n");
+ }
+
+ #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV)
+diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel/prom_init_check.sh
+index 12640f7e726b..acb6b9226352 100644
+--- a/arch/powerpc/kernel/prom_init_check.sh
++++ b/arch/powerpc/kernel/prom_init_check.sh
+@@ -19,7 +19,7 @@
+ WHITELIST="add_reloc_offset __bss_start __bss_stop copy_and_flush
+ _end enter_prom memcpy memset reloc_offset __secondary_hold
+ __secondary_hold_acknowledge __secondary_hold_spinloop __start
+-strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224
++strcmp strcpy strlcpy strlen strncmp strstr kstrtobool logo_linux_clut224
+ reloc_got2 kernstart_addr memstart_addr linux_banner _stext
+ __prom_init_toc_start __prom_init_toc_end btext_setup_display TOC."
+
+--
+2.13.6
+
diff --git a/patches.arch/powerpc-mm-radix-Update-pte-fragment-count-from-16-t.patch b/patches.arch/powerpc-mm-radix-Update-pte-fragment-count-from-16-t.patch
new file mode 100644
index 0000000000..48a3086bf2
--- /dev/null
+++ b/patches.arch/powerpc-mm-radix-Update-pte-fragment-count-from-16-t.patch
@@ -0,0 +1,125 @@
+From fb4e5dbd44564077fa0267a59b45961a1fd181b6 Mon Sep 17 00:00:00 2001
+From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
+Date: Thu, 22 Mar 2018 14:13:50 +0530
+Subject: [PATCH] powerpc/mm/radix: Update pte fragment count from 16 to 256 on
+ radix
+
+References: bsc#1055186, fate#323286
+Patch-mainline: v4.17-rc1
+Git-commit: fb4e5dbd44564077fa0267a59b45961a1fd181b6
+
+With split PTL (page table lock) config, we allocate the level
+4 (leaf) page table using pte fragment framework instead of slab cache
+like other levels. This was done to enable us to have split page table
+lock at the level 4 of the page table. We use page->plt backing the
+all the level 4 pte fragment for the lock.
+
+Currently with Radix, we use only 16 fragments out of the allocated
+page. In radix each fragment is 256 bytes which means we use only 4k
+out of the allocated 64K page wasting 60k of the allocated memory.
+This was done earlier to keep it closer to hash.
+
+This patch update the pte fragment count to 256, thereby using the
+full 64K page and reducing the memory usage. Performance tests shows
+really low impact even with THP disabled. With THP disabled we will be
+contenting further less on level 4 ptl and hence the impact should be
+further low.
+
+ 256 threads:
+ without patch (10 runs of ./ebizzy -m -n 1000 -s 131072 -S 100)
+ median = 15678.5
+ stdev = 42.1209
+
+ with patch:
+ median = 15354
+ stdev = 194.743
+
+This is with THP disabled. With THP enabled the impact of the patch
+will be less.
+
+Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/include/asm/book3s/64/hash-64k.h | 10 ++++------
+ arch/powerpc/include/asm/book3s/64/radix-4k.h | 5 +++++
+ arch/powerpc/include/asm/book3s/64/radix-64k.h | 6 ++++++
+ arch/powerpc/mm/pgtable-radix.c | 8 ++------
+ 4 files changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/include/asm/book3s/64/hash-64k.h
+index eb393135d054..cc82745355b3 100644
+--- a/arch/powerpc/include/asm/book3s/64/hash-64k.h
++++ b/arch/powerpc/include/asm/book3s/64/hash-64k.h
+@@ -38,15 +38,13 @@
+ /* PTE flags to conserve for HPTE identification */
+ #define _PAGE_HPTEFLAGS (H_PAGE_BUSY | H_PAGE_HASHPTE | H_PAGE_COMBO)
+ /*
+- * we support 16 fragments per PTE page of 64K size.
+- */
+-#define H_PTE_FRAG_NR 16
+-/*
+ * We use a 2K PTE page fragment and another 2K for storing
+ * real_pte_t hash index
++ * 8 bytes per each pte entry and another 8 bytes for storing
++ * slot details.
+ */
+-#define H_PTE_FRAG_SIZE_SHIFT 12
+-#define PTE_FRAG_SIZE (1UL << PTE_FRAG_SIZE_SHIFT)
++#define H_PTE_FRAG_SIZE_SHIFT (H_PTE_INDEX_SIZE + 3 + 1)
++#define H_PTE_FRAG_NR (PAGE_SIZE >> H_PTE_FRAG_SIZE_SHIFT)
+
+ #ifndef __ASSEMBLY__
+ #include <asm/errno.h>
+diff --git a/arch/powerpc/include/asm/book3s/64/radix-4k.h b/arch/powerpc/include/asm/book3s/64/radix-4k.h
+index a61aa9cd63ec..ca366ec86310 100644
+--- a/arch/powerpc/include/asm/book3s/64/radix-4k.h
++++ b/arch/powerpc/include/asm/book3s/64/radix-4k.h
+@@ -9,5 +9,10 @@
+ #define RADIX_PMD_INDEX_SIZE 9 /* 1G huge page */
+ #define RADIX_PUD_INDEX_SIZE 9
+ #define RADIX_PGD_INDEX_SIZE 13
++/*
++ * One fragment per per page
++ */
++#define RADIX_PTE_FRAG_SIZE_SHIFT (RADIX_PTE_INDEX_SIZE + 3)
++#define RADIX_PTE_FRAG_NR (PAGE_SIZE >> RADIX_PTE_FRAG_SIZE_SHIFT)
+
+ #endif /* _ASM_POWERPC_PGTABLE_RADIX_4K_H */
+diff --git a/arch/powerpc/include/asm/book3s/64/radix-64k.h b/arch/powerpc/include/asm/book3s/64/radix-64k.h
+index c7e71ba29555..830082496876 100644
+--- a/arch/powerpc/include/asm/book3s/64/radix-64k.h
++++ b/arch/powerpc/include/asm/book3s/64/radix-64k.h
+@@ -10,4 +10,10 @@
+ #define RADIX_PUD_INDEX_SIZE 9
+ #define RADIX_PGD_INDEX_SIZE 13
+
++/*
++ * We use a 256 byte PTE page fragment in radix
++ * 8 bytes per each PTE entry.
++ */
++#define RADIX_PTE_FRAG_SIZE_SHIFT (RADIX_PTE_INDEX_SIZE + 3)
++#define RADIX_PTE_FRAG_NR (PAGE_SIZE >> RADIX_PTE_FRAG_SIZE_SHIFT)
+ #endif /* _ASM_POWERPC_PGTABLE_RADIX_64K_H */
+diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c
+index 7095384344b4..f1891e215e39 100644
+--- a/arch/powerpc/mm/pgtable-radix.c
++++ b/arch/powerpc/mm/pgtable-radix.c
+@@ -638,12 +638,8 @@ void __init radix__early_init_mmu(void)
+ #ifdef CONFIG_PCI
+ pci_io_base = ISA_IO_BASE;
+ #endif
+-
+- /*
+- * For now radix also use the same frag size
+- */
+- __pte_frag_nr = H_PTE_FRAG_NR;
+- __pte_frag_size_shift = H_PTE_FRAG_SIZE_SHIFT;
++ __pte_frag_nr = RADIX_PTE_FRAG_NR;
++ __pte_frag_size_shift = RADIX_PTE_FRAG_SIZE_SHIFT;
+
+ if (!firmware_has_feature(FW_FEATURE_LPAR)) {
+ radix_init_native();
+--
+2.13.6
+
diff --git a/patches.arch/powerpc-xive-Fix-wrong-xmon-output-caused-by-typo.patch b/patches.arch/powerpc-xive-Fix-wrong-xmon-output-caused-by-typo.patch
new file mode 100644
index 0000000000..7488a51f9d
--- /dev/null
+++ b/patches.arch/powerpc-xive-Fix-wrong-xmon-output-caused-by-typo.patch
@@ -0,0 +1,32 @@
+From 16b19f1a03f6a49618611b76818f04ea9cd15fb5 Mon Sep 17 00:00:00 2001
+From: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
+Date: Wed, 14 Mar 2018 18:01:14 +0100
+Subject: [PATCH] powerpc/xive: Fix wrong xmon output caused by typo
+
+References: bsc#1088273
+Patch-mainline: v4.17-rc1
+Git-commit: 16b19f1a03f6a49618611b76818f04ea9cd15fb5
+
+Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/sysdev/xive/common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
+index 40c06110821c..3459015092fa 100644
+--- a/arch/powerpc/sysdev/xive/common.c
++++ b/arch/powerpc/sysdev/xive/common.c
+@@ -246,7 +246,7 @@ notrace void xmon_xive_do_dump(int cpu)
+ u64 val = xive_esb_read(&xc->ipi_data, XIVE_ESB_GET);
+ xmon_printf(" IPI state: %x:%c%c\n", xc->hw_ipi,
+ val & XIVE_ESB_VAL_P ? 'P' : 'p',
+- val & XIVE_ESB_VAL_P ? 'Q' : 'q');
++ val & XIVE_ESB_VAL_Q ? 'Q' : 'q');
+ }
+ #endif
+ }
+--
+2.13.6
+
diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in
index cfa4198172..6222fd1a76 100644
--- a/rpm/kernel-binary.spec.in
+++ b/rpm/kernel-binary.spec.in
@@ -843,6 +843,9 @@ for f in %my_builddir/*-kmp-modules; do
add_dirs_to_filelist "$f" >"$f2"
done
+install -m 644 %_sourcedir/modules.fips %{buildroot}/lib/modules/%kernelrelease-%build_flavor/modules.fips
+echo /lib/modules/%kernelrelease-%build_flavor/modules.fips >> %my_builddir/kernel-base.files
+
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
# much, but it keeps rpmlint from breaking the package build. Note that we skip
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
diff --git a/rpm/kernel-source.spec.in b/rpm/kernel-source.spec.in
index 462f4c5c47..96b1463f96 100644
--- a/rpm/kernel-source.spec.in
+++ b/rpm/kernel-source.spec.in
@@ -96,6 +96,7 @@ Source73: dtb.spec.in.in
Source74: mkspec-dtb
Source75: release-projects
Source76: check-module-license
+Source78: modules.fips
Source100: config.tar.bz2
Source101: config.addon.tar.bz2
Source102: patches.arch.tar.bz2
diff --git a/rpm/modules.fips b/rpm/modules.fips
new file mode 100644
index 0000000000..82719fd191
--- /dev/null
+++ b/rpm/modules.fips
@@ -0,0 +1,65 @@
+ablk_helper
+aes_s390
+af_alg
+algif_hash
+ansi_cprng
+anubis
+arc4
+authenc
+blowfish_common
+blowfish_generic
+blowfish_x86_64
+camellia_generic
+camellia_x86_64
+cast5_generic
+cast6_generic
+cast_common
+cbc
+ccm
+cmac
+cryptd
+crypto_user
+ctr
+cts
+deflate
+des_generic
+des_s390
+drbg
+ecb
+fcrypt
+gcm
+gf128mul
+ghash_generic
+ghash_s390
+glue_helper
+khazad
+lrw
+md4
+michael_mic
+pcbc
+rmd128
+rmd160
+rmd256
+rmd320
+salsa20_generic
+salsa20_x86_64
+seed
+serpent_generic
+serpent_sse2_x86_64
+sha1_s390
+sha256_s390
+sha3_generic
+sha512_generic
+sha512_s390
+sha512_ssse3
+tcrypt
+tea
+tgr192
+twofish_common
+twofish_generic
+twofish_x86_64
+twofish_x86_64_3way
+vmac
+wp512
+xcbc
+xts
diff --git a/series.conf b/series.conf
index 5f5cc5e3ff..dfd46c8767 100644
--- a/series.conf
+++ b/series.conf
@@ -8614,6 +8614,7 @@
patches.arch/powerpc-ipic-Fix-status-get-and-status-clear.patch
patches.arch/powerpc-64-Free-up-CPU_FTR_ICSWX.patch
patches.arch/powerpc-64s-Replace-CONFIG_PPC_STD_MMU_64-with-CONFI.patch
+ patches.arch/powerpc-mm-Add-a-CONFIG-option-to-choose-if-radix-is.patch
patches.fixes/bpf-take-advantage-of-stack_depth-tracking-in-powerp.patch
patches.arch/powerpc-opal-Fix-EBUSY-bug-in-acquiring-tokens.patch
patches.arch/powerpc-Don-t-enable-FP-Altivec-if-not-checkpointed.patch
@@ -11708,6 +11709,7 @@
patches.arch/powerpc-Disable-DAWR-on-POWER9-via-CPU-feature-quirk.patch
patches.arch/powerpc-Disable-DAWR-in-the-base-POWER9-CPU-features.patch
patches.arch/powerpc-pseries-Fix-clearing-of-security-feature-fla.patch
+ patches.arch/powerpc-xive-Fix-wrong-xmon-output-caused-by-typo.patch
patches.arch/powerpc-kexec_file-Fix-error-code-when-trying-to-loa.patch
patches.arch/powerpc-64s-Add-all-POWER9-features-to-CPU_FTRS_ALWA.patch
patches.arch/powerpc-64s-Explicitly-add-vector-features-to-CPU_FT.patch
@@ -11716,16 +11718,21 @@
patches.arch/powerpc-Remove-unused-CPU_FTR_ARCH_201.patch
patches.arch/powerpc-64s-Remove-POWER4-support.patch
patches.arch/powerpc-64s-Refine-feature-sets-for-little-endian-bu.patch
+ patches.arch/powerpc-mm-radix-Fix-always-false-comparison-against.patch
patches.arch/powerpc-Don-t-write-to-DABR-on-Power8-if-DAWR-is-dis.patch
patches.arch/powerpc-Move-default-security-feature-flags.patch
patches.arch/powerpc-pseries-Restore-default-security-feature-fla.patch
patches.arch/selftests-powerpc-Fix-copyloops-build-since-Power4-a.patch
patches.arch/powerpc-powernv-Fix-SMT4-forcing-idle-code.patch
+ patches.arch/powerpc-mm-radix-Update-pte-fragment-count-from-16-t.patch
+ patches.arch/powerpc-mm-radix-Parse-disable_radix-commandline-cor.patch
+ patches.arch/powerpc-mm-radix-Update-command-line-parsing-for-dis.patch
patches.arch/powerpc-hw_breakpoint-Only-disable-hw-breakpoint-if-.patch
patches.arch/cxl-Fix-possible-deadlock-when-processing-page-fault.patch
patches.arch/powerpc-64s-Fix-dt_cpu_ftrs-to-have-restore_cpu-clea.patch
patches.arch/powerpc-64s-Fix-pkey-support-in-dt_cpu_ftrs-add-CPU_.patch
patches.arch/powerpc-64s-Fix-POWER9-DD2.2-and-above-in-cputable-f.patch
+ patches.arch/powerpc-64s-idle-Fix-restore-of-AMOR-on-POWER9-after.patch
patches.arch/s390-move-nobp-parameter-functions-to-nospec-branch..patch
patches.arch/s390-add-automatic-detection-of-the-spectre-defense.patch
patches.arch/s390-report-spectre-mitigation-via-syslog.patch
@@ -11740,6 +11747,7 @@
patches.arch/s390-crypto-Adjust-s390-aes-and-paes-cipher-prioriti.patch
patches.arch/s390-correct-nospec-auto-detection-init-order.patch
patches.apparmor/apparmor-fix-resource-audit-messages-when-auditing-peer.patch
+ patches.arch/powerpc-mm-radix-Fix-checkstops-caused-by-invalid-tl.patch
patches.arch/powerpc-64s-Fix-CPU_FTRS_ALWAYS-vs-DT-CPU-features.patch
patches.fixes/0001-sched-rt-Fix-rq-clock_update_flags-RQCF_ACT_SKIP-war.patch
patches.drivers/ibmvnic-Define-vnic_login_client_data-name-field-as-.patch