aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaveen Saini <naveen.kumar.saini@intel.com>2021-12-21 16:46:14 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2021-12-21 16:57:59 +0800
commit0da0b5f8a9c2eef2f5c882dc26bf5532c1a7ddbf (patch)
tree0e89639ab0b97ebcdadeda0386e5a9b4757631aa
parent0cc95e338c27c0424ff036ab550c1ff22dd2727a (diff)
downloadmeta-intel-honister.zip
meta-intel-honister.tar.gz
meta-intel-honister.tar.bz2
linux-intel/5.10: update to v5.10.78honister
Update kernel config as well. Backported patch to fix 32-bit compilation failure. 32-bit compilation failure log: build/tmp/work-shared/intel-core2-32/kernel-source/include/linux/io-mapping.h:88:16: error: implicit declaration of function '__iomap_local_pfn_prot'; did you mean '__kmap_local_pfn_prot'? [-Werror=implicit-function-declaration] | 88 | return __iomap_local_pfn_prot(PHYS_PFN(phys_addr), mapping->prot); | | ^~~~~~~~~~~~~~~~~~~~~~ | | __kmap_local_pfn_prot | build/tmp/work-shared/intel-core2-32/kernel-source/include/linux/io-mapping.h:88:16: warning: returning 'int' from a function with return type 'void *' makes pointer from integer without a cast [-Wint-conversion] | 88 | return __iomap_local_pfn_prot(PHYS_PFN(phys_addr), mapping->prot); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--recipes-kernel/linux/linux-intel/0001-io-mapping-Cleanup-atomic-iomap.patch94
-rw-r--r--recipes-kernel/linux/linux-intel_5.10.bb7
2 files changed, 98 insertions, 3 deletions
diff --git a/recipes-kernel/linux/linux-intel/0001-io-mapping-Cleanup-atomic-iomap.patch b/recipes-kernel/linux/linux-intel/0001-io-mapping-Cleanup-atomic-iomap.patch
new file mode 100644
index 0000000..e360823
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel/0001-io-mapping-Cleanup-atomic-iomap.patch
@@ -0,0 +1,94 @@
+From cc3ff5fe73139251070775308dcaadf474566b4b Mon Sep 17 00:00:00 2001
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Tue, 3 Nov 2020 10:27:32 +0100
+Subject: [PATCH] io-mapping: Cleanup atomic iomap
+
+Switch the atomic iomap implementation over to kmap_local and stick the
+preempt/pagefault mechanics into the generic code similar to the
+kmap_atomic variants.
+
+Rename the x86 map function in preparation for a non-atomic variant.
+
+Upstream-Status: Backport [https://github.com/torvalds/linux/commit/351191ad55c8a1eccaf23e4187c62056229c0779]
+
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: Linus Torvalds <torvalds@linuxfoundation.org>
+Cc: Christoph Hellwig <hch@lst.de>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Link: https://lore.kernel.org/r/20201103095858.625310005@linutronix.de
+---
+ arch/x86/include/asm/iomap.h | 9 +--------
+ arch/x86/mm/iomap_32.c | 6 ++----
+ include/linux/io-mapping.h | 8 ++++++--
+ 3 files changed, 9 insertions(+), 14 deletions(-)
+
+diff --git a/arch/x86/include/asm/iomap.h b/arch/x86/include/asm/iomap.h
+index 0be7a30fd6bc..e2de092fc38c 100644
+--- a/arch/x86/include/asm/iomap.h
++++ b/arch/x86/include/asm/iomap.h
+@@ -13,14 +13,7 @@
+ #include <asm/cacheflush.h>
+ #include <asm/tlbflush.h>
+
+-void __iomem *iomap_atomic_pfn_prot(unsigned long pfn, pgprot_t prot);
+-
+-static inline void iounmap_atomic(void __iomem *vaddr)
+-{
+- kunmap_local_indexed((void __force *)vaddr);
+- pagefault_enable();
+- preempt_enable();
+-}
++void __iomem *__iomap_local_pfn_prot(unsigned long pfn, pgprot_t prot);
+
+ int iomap_create_wc(resource_size_t base, unsigned long size, pgprot_t *prot);
+
+diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c
+index e0a40d7cc66c..9aaa756ddf21 100644
+--- a/arch/x86/mm/iomap_32.c
++++ b/arch/x86/mm/iomap_32.c
+@@ -44,7 +44,7 @@ void iomap_free(resource_size_t base, unsigned long size)
+ }
+ EXPORT_SYMBOL_GPL(iomap_free);
+
+-void __iomem *iomap_atomic_pfn_prot(unsigned long pfn, pgprot_t prot)
++void __iomem *__iomap_local_pfn_prot(unsigned long pfn, pgprot_t prot)
+ {
+ /*
+ * For non-PAT systems, translate non-WB request to UC- just in
+@@ -60,8 +60,6 @@ void __iomem *iomap_atomic_pfn_prot(unsigned long pfn, pgprot_t prot)
+ /* Filter out unsupported __PAGE_KERNEL* bits: */
+ pgprot_val(prot) &= __default_kernel_pte_mask;
+
+- preempt_disable();
+- pagefault_disable();
+ return (void __force __iomem *)__kmap_local_pfn_prot(pfn, prot);
+ }
+-EXPORT_SYMBOL_GPL(iomap_atomic_pfn_prot);
++EXPORT_SYMBOL_GPL(__iomap_local_pfn_prot);
+diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h
+index 0a1a186a43c5..e9743cfd8585 100644
+--- a/include/linux/io-mapping.h
++++ b/include/linux/io-mapping.h
+@@ -69,13 +69,17 @@ io_mapping_map_atomic_wc(struct io_mapping *mapping,
+
+ BUG_ON(offset >= mapping->size);
+ phys_addr = mapping->base + offset;
+- return iomap_atomic_pfn_prot(PHYS_PFN(phys_addr), mapping->prot);
++ preempt_disable();
++ pagefault_disable();
++ return __iomap_local_pfn_prot(PHYS_PFN(phys_addr), mapping->prot);
+ }
+
+ static inline void
+ io_mapping_unmap_atomic(void __iomem *vaddr)
+ {
+- iounmap_atomic(vaddr);
++ kunmap_local_indexed((void __force *)vaddr);
++ pagefault_enable();
++ preempt_enable();
+ }
+
+ static inline void __iomem *
+--
+2.17.1
+
diff --git a/recipes-kernel/linux/linux-intel_5.10.bb b/recipes-kernel/linux/linux-intel_5.10.bb
index 90a95db..9264c22 100644
--- a/recipes-kernel/linux/linux-intel_5.10.bb
+++ b/recipes-kernel/linux/linux-intel_5.10.bb
@@ -6,13 +6,14 @@ KMETA_BRANCH = "yocto-5.10"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
SRC_URI:append = " file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch \
+ file://0001-io-mapping-Cleanup-atomic-iomap.patch \
"
DEPENDS += "elfutils-native openssl-native util-linux-native"
-LINUX_VERSION ?= "5.10.59"
-SRCREV_machine ?= "9efba09f984bb30bd3ea01a811c500eb26356a15"
-SRCREV_meta ?= "f8afd84b117f336477846b9e22178ebefb26c08d"
+LINUX_VERSION ?= "5.10.78"
+SRCREV_machine ?= "4e8162d8163c74e46a9f0bafb860f42249702791"
+SRCREV_meta ?= "64fb693a6c11f21bab3ff9bb8dcb65a70abe05e3"
# For Crystalforest and Romley
KERNEL_MODULE_AUTOLOAD:append:core2-32-intel-common = " uio"