All of lore.kernel.org
 help / color / mirror / Atom feed
* incoming
@ 2021-04-16 22:45 Andrew Morton
  2021-04-16 22:45 ` [patch 01/12] mm: eliminate "expecting prototype" kernel-doc warnings Andrew Morton
                   ` (11 more replies)
  0 siblings, 12 replies; 19+ messages in thread
From: Andrew Morton @ 2021-04-16 22:45 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-mm, mm-commits

12 patches, based on 06c2aac4014c38247256fe49c61b7f55890271e7.

Subsystems affected by this patch series:

  mm/documentation
  mm/kasan
  csky
  ia64
  mm/pagemap
  gcov
  lib

Subsystem: mm/documentation

    Randy Dunlap <rdunlap@infradead.org>:
      mm: eliminate "expecting prototype" kernel-doc warnings

Subsystem: mm/kasan

    Arnd Bergmann <arnd@arndb.de>:
      kasan: fix hwasan build for gcc

    Walter Wu <walter-zh.wu@mediatek.com>:
      kasan: remove redundant config option

Subsystem: csky

    Randy Dunlap <rdunlap@infradead.org>:
      csky: change a Kconfig symbol name to fix e1000 build error

Subsystem: ia64

    Randy Dunlap <rdunlap@infradead.org>:
      ia64: remove duplicate entries in generic_defconfig
      ia64: fix discontig.c section mismatches

    John Paul Adrian Glaubitz <glaubitz () physik ! fu-berlin ! de>:
      ia64: tools: remove inclusion of ia64-specific version of errno.h header

    John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>:
      ia64: tools: remove duplicate definition of ia64_mf() on ia64

Subsystem: mm/pagemap

    Zack Rusin <zackr@vmware.com>:
      mm/mapping_dirty_helpers: guard hugepage pud's usage

    Christophe Leroy <christophe.leroy@csgroup.eu>:
      mm: ptdump: fix build failure

Subsystem: gcov

    Johannes Berg <johannes.berg@intel.com>:
      gcov: clang: fix clang-11+ build

Subsystem: lib

    Randy Dunlap <rdunlap@infradead.org>:
      lib: remove "expecting prototype" kernel-doc warnings

 arch/arm64/kernel/sleep.S             |    2 +-
 arch/csky/Kconfig                     |    2 +-
 arch/csky/include/asm/page.h          |    2 +-
 arch/ia64/configs/generic_defconfig   |    2 --
 arch/ia64/mm/discontig.c              |    6 +++---
 arch/x86/kernel/acpi/wakeup_64.S      |    2 +-
 include/linux/kasan.h                 |    2 +-
 kernel/gcov/clang.c                   |    2 +-
 lib/Kconfig.kasan                     |    9 ++-------
 lib/earlycpio.c                       |    4 ++--
 lib/lru_cache.c                       |    3 ++-
 lib/parman.c                          |    4 ++--
 lib/radix-tree.c                      |   11 ++++++-----
 mm/kasan/common.c                     |    2 +-
 mm/kasan/kasan.h                      |    2 +-
 mm/kasan/report_generic.c             |    2 +-
 mm/mapping_dirty_helpers.c            |    2 ++
 mm/mmu_gather.c                       |   29 +++++++++++++++++++----------
 mm/oom_kill.c                         |    2 +-
 mm/ptdump.c                           |    2 +-
 mm/shuffle.c                          |    4 ++--
 scripts/Makefile.kasan                |   22 ++++++++++++++--------
 security/Kconfig.hardening            |    4 ++--
 tools/arch/ia64/include/asm/barrier.h |    3 ---
 tools/include/uapi/asm/errno.h        |    2 --
 25 files changed, 67 insertions(+), 60 deletions(-)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 01/12] mm: eliminate "expecting prototype" kernel-doc warnings
  2021-04-16 22:45 incoming Andrew Morton
@ 2021-04-16 22:45 ` Andrew Morton
  2021-04-16 22:45 ` [patch 02/12] kasan: fix hwasan build for gcc Andrew Morton
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Andrew Morton @ 2021-04-16 22:45 UTC (permalink / raw)
  To: akpm, linux-mm, mm-commits, rdunlap, torvalds, willy

From: Randy Dunlap <rdunlap@infradead.org>
Subject: mm: eliminate "expecting prototype" kernel-doc warnings

Fix stray kernel-doc warnings in mm/ due to mis-typed or missing function
names.

Quietens these kernel-doc warnings:

../mm/mmu_gather.c:264: warning: expecting prototype for tlb_gather_mmu(). Prototype was for __tlb_gather_mmu() instead
../mm/oom_kill.c:180: warning: expecting prototype for Check whether unreclaimable slab amount is greater than(). Prototype was for should_dump_unreclaim_slab() instead
../mm/shuffle.c:155: warning: expecting prototype for shuffle_free_memory(). Prototype was for __shuffle_free_memory() instead

Link: https://lkml.kernel.org/r/20210411210642.11362-1-rdunlap@infradead.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/mmu_gather.c |   29 +++++++++++++++++++----------
 mm/oom_kill.c   |    2 +-
 mm/shuffle.c    |    4 ++--
 3 files changed, 22 insertions(+), 13 deletions(-)

--- a/mm/mmu_gather.c~mm-eliminate-expecting-prototype-kernel-doc-warnings
+++ a/mm/mmu_gather.c
@@ -249,16 +249,6 @@ void tlb_flush_mmu(struct mmu_gather *tl
 	tlb_flush_mmu_free(tlb);
 }
 
-/**
- * tlb_gather_mmu - initialize an mmu_gather structure for page-table tear-down
- * @tlb: the mmu_gather structure to initialize
- * @mm: the mm_struct of the target address space
- * @fullmm: @mm is without users and we're going to destroy the full address
- *	    space (exit/execve)
- *
- * Called to initialize an (on-stack) mmu_gather structure for page-table
- * tear-down from @mm.
- */
 static void __tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm,
 			     bool fullmm)
 {
@@ -283,11 +273,30 @@ static void __tlb_gather_mmu(struct mmu_
 	inc_tlb_flush_pending(tlb->mm);
 }
 
+/**
+ * tlb_gather_mmu - initialize an mmu_gather structure for page-table tear-down
+ * @tlb: the mmu_gather structure to initialize
+ * @mm: the mm_struct of the target address space
+ *
+ * Called to initialize an (on-stack) mmu_gather structure for page-table
+ * tear-down from @mm.
+ */
 void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm)
 {
 	__tlb_gather_mmu(tlb, mm, false);
 }
 
+/**
+ * tlb_gather_mmu_fullmm - initialize an mmu_gather structure for page-table tear-down
+ * @tlb: the mmu_gather structure to initialize
+ * @mm: the mm_struct of the target address space
+ *
+ * In this case, @mm is without users and we're going to destroy the
+ * full address space (exit/execve).
+ *
+ * Called to initialize an (on-stack) mmu_gather structure for page-table
+ * tear-down from @mm.
+ */
 void tlb_gather_mmu_fullmm(struct mmu_gather *tlb, struct mm_struct *mm)
 {
 	__tlb_gather_mmu(tlb, mm, true);
--- a/mm/oom_kill.c~mm-eliminate-expecting-prototype-kernel-doc-warnings
+++ a/mm/oom_kill.c
@@ -170,7 +170,7 @@ static bool oom_unkillable_task(struct t
 	return false;
 }
 
-/**
+/*
  * Check whether unreclaimable slab amount is greater than
  * all user memory(LRU pages).
  * dump_unreclaimable_slab() could help in the case that
--- a/mm/shuffle.c~mm-eliminate-expecting-prototype-kernel-doc-warnings
+++ a/mm/shuffle.c
@@ -147,8 +147,8 @@ void __meminit __shuffle_zone(struct zon
 	spin_unlock_irqrestore(&z->lock, flags);
 }
 
-/**
- * shuffle_free_memory - reduce the predictability of the page allocator
+/*
+ * __shuffle_free_memory - reduce the predictability of the page allocator
  * @pgdat: node page data
  */
 void __meminit __shuffle_free_memory(pg_data_t *pgdat)
_

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 02/12] kasan: fix hwasan build for gcc
  2021-04-16 22:45 incoming Andrew Morton
  2021-04-16 22:45 ` [patch 01/12] mm: eliminate "expecting prototype" kernel-doc warnings Andrew Morton
@ 2021-04-16 22:45 ` Andrew Morton
  2021-04-16 22:46 ` [patch 03/12] kasan: remove redundant config option Andrew Morton
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Andrew Morton @ 2021-04-16 22:45 UTC (permalink / raw)
  To: akpm, andreyknvl, arnd, dvyukov, elver, glider, linux-mm,
	masahiroy, michal.lkml, mm-commits, nathan, ndesaulniers,
	ryabinin.a.a, torvalds

From: Arnd Bergmann <arnd@arndb.de>
Subject: kasan: fix hwasan build for gcc

gcc-11 adds support for -fsanitize=kernel-hwaddress, so it becomes
possible to enable CONFIG_KASAN_SW_TAGS.

Unfortunately this fails to build at the moment, because the corresponding
command line arguments use llvm specific syntax.

Change it to use the cc-param macro instead, which works on both clang and
gcc.

[elver@google.com: fixup for "kasan: fix hwasan build for gcc"]
  Link: https://lkml.kernel.org/r/YHQZVfVVLE/LDK2v@elver.google.com
Link: https://lkml.kernel.org/r/20210323124112.1229772-1-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Marco Elver <elver@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Acked-by: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 scripts/Makefile.kasan |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- a/scripts/Makefile.kasan~kasan-fix-hwasan-build-for-gcc
+++ a/scripts/Makefile.kasan
@@ -2,6 +2,8 @@
 CFLAGS_KASAN_NOSANITIZE := -fno-builtin
 KASAN_SHADOW_OFFSET ?= $(CONFIG_KASAN_SHADOW_OFFSET)
 
+cc-param = $(call cc-option, -mllvm -$(1), $(call cc-option, --param $(1)))
+
 ifdef CONFIG_KASAN_GENERIC
 
 ifdef CONFIG_KASAN_INLINE
@@ -12,8 +14,6 @@ endif
 
 CFLAGS_KASAN_MINIMAL := -fsanitize=kernel-address
 
-cc-param = $(call cc-option, -mllvm -$(1), $(call cc-option, --param $(1)))
-
 # -fasan-shadow-offset fails without -fsanitize
 CFLAGS_KASAN_SHADOW := $(call cc-option, -fsanitize=kernel-address \
 			-fasan-shadow-offset=$(KASAN_SHADOW_OFFSET), \
@@ -36,14 +36,14 @@ endif # CONFIG_KASAN_GENERIC
 ifdef CONFIG_KASAN_SW_TAGS
 
 ifdef CONFIG_KASAN_INLINE
-    instrumentation_flags := -mllvm -hwasan-mapping-offset=$(KASAN_SHADOW_OFFSET)
+    instrumentation_flags := $(call cc-param,hwasan-mapping-offset=$(KASAN_SHADOW_OFFSET))
 else
-    instrumentation_flags := -mllvm -hwasan-instrument-with-calls=1
+    instrumentation_flags := $(call cc-param,hwasan-instrument-with-calls=1)
 endif
 
 CFLAGS_KASAN := -fsanitize=kernel-hwaddress \
-		-mllvm -hwasan-instrument-stack=$(CONFIG_KASAN_STACK) \
-		-mllvm -hwasan-use-short-granules=0 \
+		$(call cc-param,hwasan-instrument-stack=$(CONFIG_KASAN_STACK)) \
+		$(call cc-param,hwasan-use-short-granules=0) \
 		$(instrumentation_flags)
 
 endif # CONFIG_KASAN_SW_TAGS
_

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 03/12] kasan: remove redundant config option
  2021-04-16 22:45 incoming Andrew Morton
  2021-04-16 22:45 ` [patch 01/12] mm: eliminate "expecting prototype" kernel-doc warnings Andrew Morton
  2021-04-16 22:45 ` [patch 02/12] kasan: fix hwasan build for gcc Andrew Morton
@ 2021-04-16 22:46 ` Andrew Morton
  2021-04-16 22:46 ` [patch 04/12] csky: change a Kconfig symbol name to fix e1000 build error Andrew Morton
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Andrew Morton @ 2021-04-16 22:46 UTC (permalink / raw)
  To: akpm, andreyknvl, arnd, dvyukov, glider, linux-mm, mm-commits,
	natechancellor, ryabinin.a.a, stable, torvalds, walter-zh.wu

From: Walter Wu <walter-zh.wu@mediatek.com>
Subject: kasan: remove redundant config option

CONFIG_KASAN_STACK and CONFIG_KASAN_STACK_ENABLE both enable KASAN stack
instrumentation, but we should only need one config, so that we remove
CONFIG_KASAN_STACK_ENABLE and make CONFIG_KASAN_STACK workable.  see [1].

When enable KASAN stack instrumentation, then for gcc we could do no
prompt and default value y, and for clang prompt and default value n.

This patch fixes the following compilation warning:

include/linux/kasan.h:333:30: warning: 'CONFIG_KASAN_STACK' is not defined, evaluates to 0 [-Wundef]

[1]: https://bugzilla.kernel.org/show_bug.cgi?id=210221

[akpm@linux-foundation.org: fix merge snafu]
Link: https://lkml.kernel.org/r/20210226012531.29231-1-walter-zh.wu@mediatek.com
Fixes: d9b571c885a8 ("kasan: fix KASAN_STACK dependency for HW_TAGS")
Signed-off-by: Walter Wu <walter-zh.wu@mediatek.com>
Suggested-by: Dmitry Vyukov <dvyukov@google.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Andrey Konovalov <andreyknvl@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/arm64/kernel/sleep.S        |    2 +-
 arch/x86/kernel/acpi/wakeup_64.S |    2 +-
 include/linux/kasan.h            |    2 +-
 lib/Kconfig.kasan                |    9 ++-------
 mm/kasan/common.c                |    2 +-
 mm/kasan/kasan.h                 |    2 +-
 mm/kasan/report_generic.c        |    2 +-
 scripts/Makefile.kasan           |   10 ++++++++--
 security/Kconfig.hardening       |    4 ++--
 9 files changed, 18 insertions(+), 17 deletions(-)

--- a/arch/arm64/kernel/sleep.S~kasan-remove-redundant-config-option
+++ a/arch/arm64/kernel/sleep.S
@@ -134,7 +134,7 @@ SYM_FUNC_START(_cpu_resume)
 	 */
 	bl	cpu_do_resume
 
-#if defined(CONFIG_KASAN) && CONFIG_KASAN_STACK
+#if defined(CONFIG_KASAN) && defined(CONFIG_KASAN_STACK)
 	mov	x0, sp
 	bl	kasan_unpoison_task_stack_below
 #endif
--- a/arch/x86/kernel/acpi/wakeup_64.S~kasan-remove-redundant-config-option
+++ a/arch/x86/kernel/acpi/wakeup_64.S
@@ -115,7 +115,7 @@ SYM_FUNC_START(do_suspend_lowlevel)
 	movq	pt_regs_r14(%rax), %r14
 	movq	pt_regs_r15(%rax), %r15
 
-#if defined(CONFIG_KASAN) && CONFIG_KASAN_STACK
+#if defined(CONFIG_KASAN) && defined(CONFIG_KASAN_STACK)
 	/*
 	 * The suspend path may have poisoned some areas deeper in the stack,
 	 * which we now need to unpoison.
--- a/include/linux/kasan.h~kasan-remove-redundant-config-option
+++ a/include/linux/kasan.h
@@ -330,7 +330,7 @@ static inline bool kasan_check_byte(cons
 
 #endif /* CONFIG_KASAN */
 
-#if defined(CONFIG_KASAN) && CONFIG_KASAN_STACK
+#if defined(CONFIG_KASAN) && defined(CONFIG_KASAN_STACK)
 void kasan_unpoison_task_stack(struct task_struct *task);
 #else
 static inline void kasan_unpoison_task_stack(struct task_struct *task) {}
--- a/lib/Kconfig.kasan~kasan-remove-redundant-config-option
+++ a/lib/Kconfig.kasan
@@ -138,9 +138,10 @@ config KASAN_INLINE
 
 endchoice
 
-config KASAN_STACK_ENABLE
+config KASAN_STACK
 	bool "Enable stack instrumentation (unsafe)" if CC_IS_CLANG && !COMPILE_TEST
 	depends on KASAN_GENERIC || KASAN_SW_TAGS
+	default y if CC_IS_GCC
 	help
 	  The LLVM stack address sanitizer has a know problem that
 	  causes excessive stack usage in a lot of functions, see
@@ -154,12 +155,6 @@ config KASAN_STACK_ENABLE
 	  CONFIG_COMPILE_TEST.	On gcc it is assumed to always be safe
 	  to use and enabled by default.
 
-config KASAN_STACK
-	int
-	depends on KASAN_GENERIC || KASAN_SW_TAGS
-	default 1 if KASAN_STACK_ENABLE || CC_IS_GCC
-	default 0
-
 config KASAN_SW_TAGS_IDENTIFY
 	bool "Enable memory corruption identification"
 	depends on KASAN_SW_TAGS
--- a/mm/kasan/common.c~kasan-remove-redundant-config-option
+++ a/mm/kasan/common.c
@@ -63,7 +63,7 @@ void __kasan_unpoison_range(const void *
 	kasan_unpoison(address, size);
 }
 
-#if CONFIG_KASAN_STACK
+#ifdef CONFIG_KASAN_STACK
 /* Unpoison the entire stack for a task. */
 void kasan_unpoison_task_stack(struct task_struct *task)
 {
--- a/mm/kasan/kasan.h~kasan-remove-redundant-config-option
+++ a/mm/kasan/kasan.h
@@ -231,7 +231,7 @@ void *kasan_find_first_bad_addr(void *ad
 const char *kasan_get_bug_type(struct kasan_access_info *info);
 void kasan_metadata_fetch_row(char *buffer, void *row);
 
-#if defined(CONFIG_KASAN_GENERIC) && CONFIG_KASAN_STACK
+#if defined(CONFIG_KASAN_GENERIC) && defined(CONFIG_KASAN_STACK)
 void kasan_print_address_stack_frame(const void *addr);
 #else
 static inline void kasan_print_address_stack_frame(const void *addr) { }
--- a/mm/kasan/report_generic.c~kasan-remove-redundant-config-option
+++ a/mm/kasan/report_generic.c
@@ -128,7 +128,7 @@ void kasan_metadata_fetch_row(char *buff
 	memcpy(buffer, kasan_mem_to_shadow(row), META_BYTES_PER_ROW);
 }
 
-#if CONFIG_KASAN_STACK
+#ifdef CONFIG_KASAN_STACK
 static bool __must_check tokenize_frame_descr(const char **frame_descr,
 					      char *token, size_t max_tok_len,
 					      unsigned long *value)
--- a/scripts/Makefile.kasan~kasan-remove-redundant-config-option
+++ a/scripts/Makefile.kasan
@@ -4,6 +4,12 @@ KASAN_SHADOW_OFFSET ?= $(CONFIG_KASAN_SH
 
 cc-param = $(call cc-option, -mllvm -$(1), $(call cc-option, --param $(1)))
 
+ifdef CONFIG_KASAN_STACK
+	stack_enable := 1
+else
+	stack_enable := 0
+endif
+
 ifdef CONFIG_KASAN_GENERIC
 
 ifdef CONFIG_KASAN_INLINE
@@ -27,7 +33,7 @@ else
 	CFLAGS_KASAN := $(CFLAGS_KASAN_SHADOW) \
 	 $(call cc-param,asan-globals=1) \
 	 $(call cc-param,asan-instrumentation-with-call-threshold=$(call_threshold)) \
-	 $(call cc-param,asan-stack=$(CONFIG_KASAN_STACK)) \
+	 $(call cc-param,asan-stack=$(stack_enable)) \
 	 $(call cc-param,asan-instrument-allocas=1)
 endif
 
@@ -42,7 +48,7 @@ else
 endif
 
 CFLAGS_KASAN := -fsanitize=kernel-hwaddress \
-		$(call cc-param,hwasan-instrument-stack=$(CONFIG_KASAN_STACK)) \
+		$(call cc-param,hwasan-instrument-stack=$(stack_enable)) \
 		$(call cc-param,hwasan-use-short-granules=0) \
 		$(instrumentation_flags)
 
--- a/security/Kconfig.hardening~kasan-remove-redundant-config-option
+++ a/security/Kconfig.hardening
@@ -64,7 +64,7 @@ choice
 	config GCC_PLUGIN_STRUCTLEAK_BYREF
 		bool "zero-init structs passed by reference (strong)"
 		depends on GCC_PLUGINS
-		depends on !(KASAN && KASAN_STACK=1)
+		depends on !(KASAN && KASAN_STACK)
 		select GCC_PLUGIN_STRUCTLEAK
 		help
 		  Zero-initialize any structures on the stack that may
@@ -82,7 +82,7 @@ choice
 	config GCC_PLUGIN_STRUCTLEAK_BYREF_ALL
 		bool "zero-init anything passed by reference (very strong)"
 		depends on GCC_PLUGINS
-		depends on !(KASAN && KASAN_STACK=1)
+		depends on !(KASAN && KASAN_STACK)
 		select GCC_PLUGIN_STRUCTLEAK
 		help
 		  Zero-initialize any stack variables that may be passed
_

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 04/12] csky: change a Kconfig symbol name to fix e1000 build error
  2021-04-16 22:45 incoming Andrew Morton
                   ` (2 preceding siblings ...)
  2021-04-16 22:46 ` [patch 03/12] kasan: remove redundant config option Andrew Morton
@ 2021-04-16 22:46 ` Andrew Morton
  2021-04-17  0:45     ` Guo Ren
  2021-04-16 22:46 ` [patch 05/12] ia64: remove duplicate entries in generic_defconfig Andrew Morton
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 19+ messages in thread
From: Andrew Morton @ 2021-04-16 22:46 UTC (permalink / raw)
  To: akpm, guoren, jesse.brandeburg, linux-mm, lkp, mm-commits,
	rdunlap, torvalds

From: Randy Dunlap <rdunlap@infradead.org>
Subject: csky: change a Kconfig symbol name to fix e1000 build error

e1000's #define of CONFIG_RAM_BASE conflicts with a Kconfig symbol in
arch/csky/Kconfig.

The symbol in e1000 has been around longer, so change arch/csky/ to use
DRAM_BASE instead of RAM_BASE to remove the conflict.  (although e1000 is
also a 2-line change)

Link: https://lkml.kernel.org/r/20210411055335.7111-1-rdunlap@infradead.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Acked-by: Guo Ren <guoren@kernel.org>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/csky/Kconfig            |    2 +-
 arch/csky/include/asm/page.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/arch/csky/include/asm/page.h~csky-change-a-kconfig-symbol-name-to-fix-e1000-build-error
+++ a/arch/csky/include/asm/page.h
@@ -28,7 +28,7 @@
 #define SSEG_SIZE	0x20000000
 #define LOWMEM_LIMIT	(SSEG_SIZE * 2)
 
-#define PHYS_OFFSET_OFFSET (CONFIG_RAM_BASE & (SSEG_SIZE - 1))
+#define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))
 
 #ifndef __ASSEMBLY__
 
--- a/arch/csky/Kconfig~csky-change-a-kconfig-symbol-name-to-fix-e1000-build-error
+++ a/arch/csky/Kconfig
@@ -314,7 +314,7 @@ config FORCE_MAX_ZONEORDER
 	int "Maximum zone order"
 	default "11"
 
-config RAM_BASE
+config DRAM_BASE
 	hex "DRAM start addr (the same with memory-section in dts)"
 	default 0x0
 
_

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 05/12] ia64: remove duplicate entries in generic_defconfig
  2021-04-16 22:45 incoming Andrew Morton
                   ` (3 preceding siblings ...)
  2021-04-16 22:46 ` [patch 04/12] csky: change a Kconfig symbol name to fix e1000 build error Andrew Morton
@ 2021-04-16 22:46 ` Andrew Morton
  2021-04-16 22:46 ` [patch 06/12] ia64: fix discontig.c section mismatches Andrew Morton
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Andrew Morton @ 2021-04-16 22:46 UTC (permalink / raw)
  To: akpm, fenghua.yu, geert, hch, linux-mm, mm-commits, rdunlap,
	tony.luck, torvalds

From: Randy Dunlap <rdunlap@infradead.org>
Subject: ia64: remove duplicate entries in generic_defconfig

Fix ia64 generic_defconfig duplicate entries, as warned by:

  + arch/ia64/configs/generic_defconfig: warning: override: reassigning to symbol ATA:  => 58
  + arch/ia64/configs/generic_defconfig: warning: override: reassigning to symbol ATA_PIIX:  => 59

These 2 symbols still have the same value as in the removed lines.

Link: https://lkml.kernel.org/r/20210411020255.18052-1-rdunlap@infradead.org
Fixes: c331649e6371 ("ia64: Use libata instead of the legacy ide driver in defconfigs")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/ia64/configs/generic_defconfig |    2 --
 1 file changed, 2 deletions(-)

--- a/arch/ia64/configs/generic_defconfig~ia64-remove-duplicate-entries-in-generic_defconfig
+++ a/arch/ia64/configs/generic_defconfig
@@ -55,8 +55,6 @@ CONFIG_CHR_DEV_SG=m
 CONFIG_SCSI_FC_ATTRS=y
 CONFIG_SCSI_SYM53C8XX_2=y
 CONFIG_SCSI_QLOGIC_1280=y
-CONFIG_ATA=y
-CONFIG_ATA_PIIX=y
 CONFIG_SATA_VITESSE=y
 CONFIG_MD=y
 CONFIG_BLK_DEV_MD=m
_

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 06/12] ia64: fix discontig.c section mismatches
  2021-04-16 22:45 incoming Andrew Morton
                   ` (4 preceding siblings ...)
  2021-04-16 22:46 ` [patch 05/12] ia64: remove duplicate entries in generic_defconfig Andrew Morton
@ 2021-04-16 22:46 ` Andrew Morton
  2021-04-16 22:46 ` [patch 07/12] ia64: tools: remove inclusion of ia64-specific version of errno.h header Andrew Morton
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Andrew Morton @ 2021-04-16 22:46 UTC (permalink / raw)
  To: akpm, linux-mm, mm-commits, rdunlap, rppt, torvalds

From: Randy Dunlap <rdunlap@infradead.org>
Subject: ia64: fix discontig.c section mismatches

Fix IA64 discontig.c Section mismatch warnings.

When CONFIG_SPARSEMEM=y and CONFIG_MEMORY_HOTPLUG=y, the functions
computer_pernodesize() and scatter_node_data() should not be marked
as __meminit because they are needed after init, on any memory
hotplug event. Also, early_nr_cpus_node() is called by
compute_pernodesize(), so early_nr_cpus_node() cannot be __meminit either.

WARNING: modpost: vmlinux.o(.text.unlikely+0x1612): Section mismatch in reference from the function arch_alloc_nodedata() to the function .meminit.text:compute_pernodesize()
The function arch_alloc_nodedata() references
the function __meminit compute_pernodesize().
This is often because arch_alloc_nodedata lacks a __meminit
annotation or the annotation of compute_pernodesize is wrong.

WARNING: modpost: vmlinux.o(.text.unlikely+0x1692): Section mismatch in reference from the function arch_refresh_nodedata() to the function .meminit.text:scatter_node_data()
The function arch_refresh_nodedata() references
the function __meminit scatter_node_data().
This is often because arch_refresh_nodedata lacks a __meminit
annotation or the annotation of scatter_node_data is wrong.

WARNING: modpost: vmlinux.o(.text.unlikely+0x1502): Section mismatch in reference from the function compute_pernodesize() to the function .meminit.text:early_nr_cpus_node()
The function compute_pernodesize() references
the function __meminit early_nr_cpus_node().
This is often because compute_pernodesize lacks a __meminit
annotation or the annotation of early_nr_cpus_node is wrong.

Link: https://lkml.kernel.org/r/20210411001201.3069-1-rdunlap@infradead.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Mike Rapoport <rppt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/ia64/mm/discontig.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/arch/ia64/mm/discontig.c~ia64-fix-discontigc-section-mismatches
+++ a/arch/ia64/mm/discontig.c
@@ -95,7 +95,7 @@ static int __init build_node_maps(unsign
  * acpi_boot_init() (which builds the node_to_cpu_mask array) hasn't been
  * called yet.  Note that node 0 will also count all non-existent cpus.
  */
-static int __meminit early_nr_cpus_node(int node)
+static int early_nr_cpus_node(int node)
 {
 	int cpu, n = 0;
 
@@ -110,7 +110,7 @@ static int __meminit early_nr_cpus_node(
  * compute_pernodesize - compute size of pernode data
  * @node: the node id.
  */
-static unsigned long __meminit compute_pernodesize(int node)
+static unsigned long compute_pernodesize(int node)
 {
 	unsigned long pernodesize = 0, cpus;
 
@@ -367,7 +367,7 @@ static void __init reserve_pernode_space
 	}
 }
 
-static void __meminit scatter_node_data(void)
+static void scatter_node_data(void)
 {
 	pg_data_t **dst;
 	int node;
_

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 07/12] ia64: tools: remove inclusion of ia64-specific version of errno.h header
  2021-04-16 22:45 incoming Andrew Morton
                   ` (5 preceding siblings ...)
  2021-04-16 22:46 ` [patch 06/12] ia64: fix discontig.c section mismatches Andrew Morton
@ 2021-04-16 22:46 ` Andrew Morton
  2021-04-16 22:46 ` [patch 08/12] ia64: tools: remove duplicate definition of ia64_mf() on ia64 Andrew Morton
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Andrew Morton @ 2021-04-16 22:46 UTC (permalink / raw)
  To: akpm, glaubitz, linux-mm, mm-commits, torvalds

From: John Paul Adrian Glaubitz <glaubitz () physik ! fu-berlin ! de>
Subject: ia64: tools: remove inclusion of ia64-specific version of errno.h header

There is no longer an ia64-specific version of the errno.h header below
arch/ia64/include/uapi/asm/, so trying to build tools/bpf fails with:

  CC       /usr/src/linux/tools/bpf/bpftool/btf_dumper.o
In file included from /usr/src/linux/tools/include/linux/err.h:8,
                 from btf_dumper.c:11:
/usr/src/linux/tools/include/uapi/asm/errno.h:13:10: fatal error: ../../../arch/ia64/include/uapi/asm/errno.h: No such file or directory
   13 | #include "../../../arch/ia64/include/uapi/asm/errno.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Thus, just remove the inclusion of the ia64-specific errno.h so that
the build will use the generic errno.h header on this target which was
used there anyway as the ia64-specific errno.h was just a wrapper for
the generic header.

Fixes: c25f867ddd00 ("ia64: remove unneeded uapi asm-generic wrappers")
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/include/uapi/asm/errno.h |    2 --
 1 file changed, 2 deletions(-)

--- a/tools/include/uapi/asm/errno.h~ia64-tools-remove-inclusion-of-ia64-specific-version-of-errnoh-header
+++ a/tools/include/uapi/asm/errno.h
@@ -9,8 +9,6 @@
 #include "../../../arch/alpha/include/uapi/asm/errno.h"
 #elif defined(__mips__)
 #include "../../../arch/mips/include/uapi/asm/errno.h"
-#elif defined(__ia64__)
-#include "../../../arch/ia64/include/uapi/asm/errno.h"
 #elif defined(__xtensa__)
 #include "../../../arch/xtensa/include/uapi/asm/errno.h"
 #else
_

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 08/12] ia64: tools: remove duplicate definition of ia64_mf() on ia64
  2021-04-16 22:45 incoming Andrew Morton
                   ` (6 preceding siblings ...)
  2021-04-16 22:46 ` [patch 07/12] ia64: tools: remove inclusion of ia64-specific version of errno.h header Andrew Morton
@ 2021-04-16 22:46 ` Andrew Morton
  2021-04-16 22:46 ` [patch 09/12] mm/mapping_dirty_helpers: guard hugepage pud's usage Andrew Morton
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Andrew Morton @ 2021-04-16 22:46 UTC (permalink / raw)
  To: akpm, glaubitz, linux-mm, mm-commits, torvalds

From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Subject: ia64: tools: remove duplicate definition of ia64_mf() on ia64

The ia64_mf() macro defined in tools/arch/ia64/include/asm/barrier.h is
already defined in <asm/gcc_intrin.h> on ia64 which causes libbpf failing
to build:

  CC       /usr/src/linux/tools/bpf/bpftool//libbpf/staticobjs/libbpf.o
In file included from /usr/src/linux/tools/include/asm/barrier.h:24,
                 from /usr/src/linux/tools/include/linux/ring_buffer.h:4,
                 from libbpf.c:37:
/usr/src/linux/tools/include/asm/../../arch/ia64/include/asm/barrier.h:43: error: "ia64_mf" redefined [-Werror]
   43 | #define ia64_mf()       asm volatile ("mf" ::: "memory")
      |
In file included from /usr/include/ia64-linux-gnu/asm/intrinsics.h:20,
                 from /usr/include/ia64-linux-gnu/asm/swab.h:11,
                 from /usr/include/linux/swab.h:8,
                 from /usr/include/linux/byteorder/little_endian.h:13,
                 from /usr/include/ia64-linux-gnu/asm/byteorder.h:5,
                 from /usr/src/linux/tools/include/uapi/linux/perf_event.h:20,
                 from libbpf.c:36:
/usr/include/ia64-linux-gnu/asm/gcc_intrin.h:382: note: this is the location of the previous definition
  382 | #define ia64_mf() __asm__ volatile ("mf" ::: "memory")
      |
cc1: all warnings being treated as errors

Thus, remove the definition from tools/arch/ia64/include/asm/barrier.h.

Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/arch/ia64/include/asm/barrier.h |    3 ---
 1 file changed, 3 deletions(-)

--- a/tools/arch/ia64/include/asm/barrier.h~ia64-tools-remove-duplicate-definition-of-ia64_mf-on-ia64
+++ a/tools/arch/ia64/include/asm/barrier.h
@@ -39,9 +39,6 @@
  * sequential memory pages only.
  */
 
-/* XXX From arch/ia64/include/uapi/asm/gcc_intrin.h */
-#define ia64_mf()       asm volatile ("mf" ::: "memory")
-
 #define mb()		ia64_mf()
 #define rmb()		mb()
 #define wmb()		mb()
_

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 09/12] mm/mapping_dirty_helpers: guard hugepage pud's usage
  2021-04-16 22:45 incoming Andrew Morton
                   ` (7 preceding siblings ...)
  2021-04-16 22:46 ` [patch 08/12] ia64: tools: remove duplicate definition of ia64_mf() on ia64 Andrew Morton
@ 2021-04-16 22:46 ` Andrew Morton
  2021-04-16 22:46 ` [patch 10/12] mm: ptdump: fix build failure Andrew Morton
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Andrew Morton @ 2021-04-16 22:46 UTC (permalink / raw)
  To: akpm, linux-mm, mm-commits, thomas_os, torvalds, zackr

From: Zack Rusin <zackr@vmware.com>
Subject: mm/mapping_dirty_helpers: guard hugepage pud's usage

Mapping dirty helpers have, so far, been only used on X86, but a port of
vmwgfx to ARM64 exposed a problem which results in a compilation error on
ARM64 systems:

mm/mapping_dirty_helpers.c: In function `wp_clean_pud_entry':
mm/mapping_dirty_helpers.c:172:32: error: implicit declaration of function `pud_dirty'; did you mean `pmd_dirty'? [-Werror=implicit-function-declaration]

This is due to the fact that mapping_dirty_helpers code assumes that
pud_dirty is always defined, which is not the case for architectures that
don't define CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD.

ARM64 arch is a little inconsistent when it comes to PUD hugepage helpers,
e.g.  it defines pud_young but not pud_dirty but regardless of that the
core kernel code shouldn't assume that any of the PUD hugepage helpers are
available unless CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD is defined. 
This prevents compilation errors whenever one of the drivers is ported to
new architectures.

Link: https://lkml.kernel.org/r/20210409165151.694574-1-zackr@vmware.com
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Thomas Hellstrm (Intel) <thomas_os@shipmail.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/mapping_dirty_helpers.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/mm/mapping_dirty_helpers.c~mm-mapping_dirty_helpers-guard-hugepage-puds-usage
+++ a/mm/mapping_dirty_helpers.c
@@ -165,10 +165,12 @@ static int wp_clean_pud_entry(pud_t *pud
 		return 0;
 	}
 
+#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
 	/* Huge pud */
 	walk->action = ACTION_CONTINUE;
 	if (pud_trans_huge(pudval) || pud_devmap(pudval))
 		WARN_ON(pud_write(pudval) || pud_dirty(pudval));
+#endif
 
 	return 0;
 }
_

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 10/12] mm: ptdump: fix build failure
  2021-04-16 22:45 incoming Andrew Morton
                   ` (8 preceding siblings ...)
  2021-04-16 22:46 ` [patch 09/12] mm/mapping_dirty_helpers: guard hugepage pud's usage Andrew Morton
@ 2021-04-16 22:46 ` Andrew Morton
  2021-04-16 22:46 ` [patch 11/12] gcov: clang: fix clang-11+ build Andrew Morton
  2021-04-16 22:46 ` [patch 12/12] lib: remove "expecting prototype" kernel-doc warnings Andrew Morton
  11 siblings, 0 replies; 19+ messages in thread
From: Andrew Morton @ 2021-04-16 22:46 UTC (permalink / raw)
  To: akpm, christophe.leroy, linux-mm, mm-commits, steven.price, torvalds

From: Christophe Leroy <christophe.leroy@csgroup.eu>
Subject: mm: ptdump: fix build failure

	  CC      mm/ptdump.o
	In file included from <command-line>:
	mm/ptdump.c: In function 'ptdump_pte_entry':
	././include/linux/compiler_types.h:320:38: error: call to '__compiletime_assert_207' declared with attribute error: Unsupported access size for {READ,WRITE}_ONCE().
	  320 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
	      |                                      ^
	././include/linux/compiler_types.h:301:4: note: in definition of macro '__compiletime_assert'
	  301 |    prefix ## suffix();    \
	      |    ^~~~~~
	././include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
	  320 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
	      |  ^~~~~~~~~~~~~~~~~~~
	./include/asm-generic/rwonce.h:36:2: note: in expansion of macro 'compiletime_assert'
	   36 |  compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
	      |  ^~~~~~~~~~~~~~~~~~
	./include/asm-generic/rwonce.h:49:2: note: in expansion of macro 'compiletime_assert_rwonce_type'
	   49 |  compiletime_assert_rwonce_type(x);    \
	      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	mm/ptdump.c:114:14: note: in expansion of macro 'READ_ONCE'
	  114 |  pte_t val = READ_ONCE(*pte);
	      |              ^~~~~~~~~
	make[2]: *** [mm/ptdump.o] Error 1

READ_ONCE() cannot be used for reading PTEs.  Use ptep_get() instead.  See
commit 481e980a7c19 ("mm: Allow arches to provide ptep_get()") and commit
c0e1c8c22beb ("powerpc/8xx: Provide ptep_get() with 16k pages") for
details.

Link: https://lkml.kernel.org/r/912b349e2bcaa88939904815ca0af945740c6bd4.1618478922.git.christophe.leroy@csgroup.eu
Fixes: 30d621f6723b ("mm: add generic ptdump")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Steven Price <steven.price@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/ptdump.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/ptdump.c~mm-ptdump-fix-build-failure
+++ a/mm/ptdump.c
@@ -111,7 +111,7 @@ static int ptdump_pte_entry(pte_t *pte,
 			    unsigned long next, struct mm_walk *walk)
 {
 	struct ptdump_state *st = walk->private;
-	pte_t val = READ_ONCE(*pte);
+	pte_t val = ptep_get(pte);
 
 	if (st->effective_prot)
 		st->effective_prot(st, 4, pte_val(val));
_

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 11/12] gcov: clang: fix clang-11+ build
  2021-04-16 22:45 incoming Andrew Morton
                   ` (9 preceding siblings ...)
  2021-04-16 22:46 ` [patch 10/12] mm: ptdump: fix build failure Andrew Morton
@ 2021-04-16 22:46 ` Andrew Morton
  2021-04-19 21:36   ` Nathan Chancellor
  2021-04-16 22:46 ` [patch 12/12] lib: remove "expecting prototype" kernel-doc warnings Andrew Morton
  11 siblings, 1 reply; 19+ messages in thread
From: Andrew Morton @ 2021-04-16 22:46 UTC (permalink / raw)
  To: akpm, johannes.berg, linux-mm, mm-commits, ndesaulniers, torvalds

From: Johannes Berg <johannes.berg@intel.com>
Subject: gcov: clang: fix clang-11+ build

With clang-11+, the code is broken due to my kvmalloc() conversion (which
predated the clang-11 support code) leaving one vmalloc() in place.  Fix
that.

Link: https://lkml.kernel.org/r/20210412214210.6e1ecca9cdc5.I24459763acf0591d5e6b31c7e3a59890d802f79c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/gcov/clang.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/gcov/clang.c~gcov-clang-fix-clang-11-build
+++ a/kernel/gcov/clang.c
@@ -369,7 +369,7 @@ static struct gcov_fn_info *gcov_fn_info
 	INIT_LIST_HEAD(&fn_dup->head);
 
 	cv_size = fn->num_counters * sizeof(fn->counters[0]);
-	fn_dup->counters = vmalloc(cv_size);
+	fn_dup->counters = kvmalloc(cv_size, GFP_KERNEL);
 	if (!fn_dup->counters) {
 		kfree(fn_dup);
 		return NULL;
_

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [patch 12/12] lib: remove "expecting prototype" kernel-doc warnings
  2021-04-16 22:45 incoming Andrew Morton
                   ` (10 preceding siblings ...)
  2021-04-16 22:46 ` [patch 11/12] gcov: clang: fix clang-11+ build Andrew Morton
@ 2021-04-16 22:46 ` Andrew Morton
  11 siblings, 0 replies; 19+ messages in thread
From: Andrew Morton @ 2021-04-16 22:46 UTC (permalink / raw)
  To: akpm, jiri, lars.ellenberg, linux-mm, mm-commits,
	philipp.reisner, rdunlap, torvalds, willy

From: Randy Dunlap <rdunlap@infradead.org>
Subject: lib: remove "expecting prototype" kernel-doc warnings

Fix various kernel-doc warnings in lib/ due to missing or
erroneous function names.
Add kernel-doc for some function parameters that was missing.
Use kernel-doc "Return:" notation in earlycpio.c.

Quietens the following warnings:

../lib/earlycpio.c:61: warning: expecting prototype for cpio_data find_cpio_data(). Prototype was for find_cpio_data() instead

../lib/lru_cache.c:640: warning: expecting prototype for lc_dump(). Prototype was for lc_seq_dump_details() instead
lru_cache.c:90: warning: Function parameter or member 'cache' not described in 'lc_create'

../lib/parman.c:368: warning: expecting prototype for parman_item_del(). Prototype was for parman_item_remove() instead
parman.c:309: warning: Excess function parameter 'prority' description in 'parman_prio_init'

../lib/radix-tree.c:703: warning: expecting prototype for __radix_tree_insert(). Prototype was for radix_tree_insert() instead
radix-tree.c:180: warning: Excess function parameter 'addr' description in 'radix_tree_find_next_bit'
radix-tree.c:180: warning: Excess function parameter 'size' description in 'radix_tree_find_next_bit'
radix-tree.c:931: warning: Function parameter or member 'iter' not described in 'radix_tree_iter_replace'

Link: https://lkml.kernel.org/r/20210411221756.15461-1-rdunlap@infradead.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: Jiri Pirko <jiri@nvidia.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/earlycpio.c  |    4 ++--
 lib/lru_cache.c  |    3 ++-
 lib/parman.c     |    4 ++--
 lib/radix-tree.c |   11 ++++++-----
 4 files changed, 12 insertions(+), 10 deletions(-)

--- a/lib/earlycpio.c~lib-remove-expecting-prototype-kernel-doc-warnings
+++ a/lib/earlycpio.c
@@ -40,7 +40,7 @@ enum cpio_fields {
 };
 
 /**
- * cpio_data find_cpio_data - Search for files in an uncompressed cpio
+ * find_cpio_data - Search for files in an uncompressed cpio
  * @path:       The directory to search for, including a slash at the end
  * @data:       Pointer to the cpio archive or a header inside
  * @len:        Remaining length of the cpio based on data pointer
@@ -49,7 +49,7 @@ enum cpio_fields {
  *              matching file itself. It can be used to iterate through the cpio
  *              to find all files inside of a directory path.
  *
- * @return:     struct cpio_data containing the address, length and
+ * Return:      &struct cpio_data containing the address, length and
  *              filename (with the directory path cut off) of the found file.
  *              If you search for a filename and not for files in a directory,
  *              pass the absolute path of the filename in the cpio and make sure
--- a/lib/lru_cache.c~lib-remove-expecting-prototype-kernel-doc-warnings
+++ a/lib/lru_cache.c
@@ -76,6 +76,7 @@ int lc_try_lock(struct lru_cache *lc)
 /**
  * lc_create - prepares to track objects in an active set
  * @name: descriptive name only used in lc_seq_printf_stats and lc_seq_dump_details
+ * @cache: cache root pointer
  * @max_pending_changes: maximum changes to accumulate until a transaction is required
  * @e_count: number of elements allowed to be active simultaneously
  * @e_size: size of the tracked objects
@@ -627,7 +628,7 @@ void lc_set(struct lru_cache *lc, unsign
 }
 
 /**
- * lc_dump - Dump a complete LRU cache to seq in textual form.
+ * lc_seq_dump_details - Dump a complete LRU cache to seq in textual form.
  * @lc: the lru cache to operate on
  * @seq: the &struct seq_file pointer to seq_printf into
  * @utext: user supplied additional "heading" or other info
--- a/lib/parman.c~lib-remove-expecting-prototype-kernel-doc-warnings
+++ a/lib/parman.c
@@ -297,7 +297,7 @@ EXPORT_SYMBOL(parman_destroy);
  * parman_prio_init - initializes a parman priority chunk
  * @parman:	parman instance
  * @prio:	parman prio structure to be initialized
- * @prority:	desired priority of the chunk
+ * @priority:	desired priority of the chunk
  *
  * Note: all locking must be provided by the caller.
  *
@@ -356,7 +356,7 @@ int parman_item_add(struct parman *parma
 EXPORT_SYMBOL(parman_item_add);
 
 /**
- * parman_item_del - deletes parman item
+ * parman_item_remove - deletes parman item
  * @parman:	parman instance
  * @prio:	parman prio instance to delete the item from
  * @item:	parman item instance
--- a/lib/radix-tree.c~lib-remove-expecting-prototype-kernel-doc-warnings
+++ a/lib/radix-tree.c
@@ -166,9 +166,9 @@ static inline void all_tag_set(struct ra
 /**
  * radix_tree_find_next_bit - find the next set bit in a memory region
  *
- * @addr: The address to base the search on
- * @size: The bitmap size in bits
- * @offset: The bitnumber to start searching at
+ * @node: where to begin the search
+ * @tag: the tag index
+ * @offset: the bitnumber to start searching at
  *
  * Unrollable variant of find_next_bit() for constant size arrays.
  * Tail bits starting from size to roundup(size, BITS_PER_LONG) must be zero.
@@ -461,7 +461,7 @@ out:
 
 /**
  *	radix_tree_shrink    -    shrink radix tree to minimum height
- *	@root		radix tree root
+ *	@root:		radix tree root
  */
 static inline bool radix_tree_shrink(struct radix_tree_root *root)
 {
@@ -691,7 +691,7 @@ static inline int insert_entries(struct
 }
 
 /**
- *	__radix_tree_insert    -    insert into a radix tree
+ *	radix_tree_insert    -    insert into a radix tree
  *	@root:		radix tree root
  *	@index:		index key
  *	@item:		item to insert
@@ -919,6 +919,7 @@ EXPORT_SYMBOL(radix_tree_replace_slot);
 /**
  * radix_tree_iter_replace - replace item in a slot
  * @root:	radix tree root
+ * @iter:	iterator state
  * @slot:	pointer to slot
  * @item:	new item to store in the slot.
  *
_

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch 04/12] csky: change a Kconfig symbol name to fix e1000 build error
  2021-04-16 22:46 ` [patch 04/12] csky: change a Kconfig symbol name to fix e1000 build error Andrew Morton
@ 2021-04-17  0:45     ` Guo Ren
  0 siblings, 0 replies; 19+ messages in thread
From: Guo Ren @ 2021-04-17  0:45 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jesse Brandeburg, Linux-MM, kbuild test robot, mm-commits,
	Randy Dunlap, Linus Torvalds

Looks good to me, I'll approve it in my linux-next tree.

On Sat, Apr 17, 2021 at 6:46 AM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> From: Randy Dunlap <rdunlap@infradead.org>
> Subject: csky: change a Kconfig symbol name to fix e1000 build error
>
> e1000's #define of CONFIG_RAM_BASE conflicts with a Kconfig symbol in
> arch/csky/Kconfig.
>
> The symbol in e1000 has been around longer, so change arch/csky/ to use
> DRAM_BASE instead of RAM_BASE to remove the conflict.  (although e1000 is
> also a 2-line change)
>
> Link: https://lkml.kernel.org/r/20210411055335.7111-1-rdunlap@infradead.org
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Acked-by: Guo Ren <guoren@kernel.org>
> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
>  arch/csky/Kconfig            |    2 +-
>  arch/csky/include/asm/page.h |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> --- a/arch/csky/include/asm/page.h~csky-change-a-kconfig-symbol-name-to-fix-e1000-build-error
> +++ a/arch/csky/include/asm/page.h
> @@ -28,7 +28,7 @@
>  #define SSEG_SIZE      0x20000000
>  #define LOWMEM_LIMIT   (SSEG_SIZE * 2)
>
> -#define PHYS_OFFSET_OFFSET (CONFIG_RAM_BASE & (SSEG_SIZE - 1))
> +#define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))
>
>  #ifndef __ASSEMBLY__
>
> --- a/arch/csky/Kconfig~csky-change-a-kconfig-symbol-name-to-fix-e1000-build-error
> +++ a/arch/csky/Kconfig
> @@ -314,7 +314,7 @@ config FORCE_MAX_ZONEORDER
>         int "Maximum zone order"
>         default "11"
>
> -config RAM_BASE
> +config DRAM_BASE
>         hex "DRAM start addr (the same with memory-section in dts)"
>         default 0x0
>
> _



-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch 04/12] csky: change a Kconfig symbol name to fix e1000 build error
@ 2021-04-17  0:45     ` Guo Ren
  0 siblings, 0 replies; 19+ messages in thread
From: Guo Ren @ 2021-04-17  0:45 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jesse Brandeburg, Linux-MM, kbuild test robot, mm-commits,
	Randy Dunlap, Linus Torvalds

Looks good to me, I'll approve it in my linux-next tree.

On Sat, Apr 17, 2021 at 6:46 AM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> From: Randy Dunlap <rdunlap@infradead.org>
> Subject: csky: change a Kconfig symbol name to fix e1000 build error
>
> e1000's #define of CONFIG_RAM_BASE conflicts with a Kconfig symbol in
> arch/csky/Kconfig.
>
> The symbol in e1000 has been around longer, so change arch/csky/ to use
> DRAM_BASE instead of RAM_BASE to remove the conflict.  (although e1000 is
> also a 2-line change)
>
> Link: https://lkml.kernel.org/r/20210411055335.7111-1-rdunlap@infradead.org
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Acked-by: Guo Ren <guoren@kernel.org>
> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
>  arch/csky/Kconfig            |    2 +-
>  arch/csky/include/asm/page.h |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> --- a/arch/csky/include/asm/page.h~csky-change-a-kconfig-symbol-name-to-fix-e1000-build-error
> +++ a/arch/csky/include/asm/page.h
> @@ -28,7 +28,7 @@
>  #define SSEG_SIZE      0x20000000
>  #define LOWMEM_LIMIT   (SSEG_SIZE * 2)
>
> -#define PHYS_OFFSET_OFFSET (CONFIG_RAM_BASE & (SSEG_SIZE - 1))
> +#define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))
>
>  #ifndef __ASSEMBLY__
>
> --- a/arch/csky/Kconfig~csky-change-a-kconfig-symbol-name-to-fix-e1000-build-error
> +++ a/arch/csky/Kconfig
> @@ -314,7 +314,7 @@ config FORCE_MAX_ZONEORDER
>         int "Maximum zone order"
>         default "11"
>
> -config RAM_BASE
> +config DRAM_BASE
>         hex "DRAM start addr (the same with memory-section in dts)"
>         default 0x0
>
> _



-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch 11/12] gcov: clang: fix clang-11+ build
  2021-04-16 22:46 ` [patch 11/12] gcov: clang: fix clang-11+ build Andrew Morton
@ 2021-04-19 21:36   ` Nathan Chancellor
  2021-04-19 22:12       ` Linus Torvalds
  0 siblings, 1 reply; 19+ messages in thread
From: Nathan Chancellor @ 2021-04-19 21:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, johannes.berg, linux-mm, mm-commits, ndesaulniers, torvalds

On Fri, Apr 16, 2021 at 03:46:23PM -0700, Andrew Morton wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> Subject: gcov: clang: fix clang-11+ build
> 
> With clang-11+, the code is broken due to my kvmalloc() conversion (which
> predated the clang-11 support code) leaving one vmalloc() in place.  Fix
> that.
> 
> Link: https://lkml.kernel.org/r/20210412214210.6e1ecca9cdc5.I24459763acf0591d5e6b31c7e3a59890d802f79c@changeid
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> Tested-by: Nick Desaulniers <ndesaulniers@google.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  kernel/gcov/clang.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/kernel/gcov/clang.c~gcov-clang-fix-clang-11-build
> +++ a/kernel/gcov/clang.c
> @@ -369,7 +369,7 @@ static struct gcov_fn_info *gcov_fn_info
>  	INIT_LIST_HEAD(&fn_dup->head);
>  
>  	cv_size = fn->num_counters * sizeof(fn->counters[0]);
> -	fn_dup->counters = vmalloc(cv_size);
> +	fn_dup->counters = kvmalloc(cv_size, GFP_KERNEL);
>  	if (!fn_dup->counters) {
>  		kfree(fn_dup);
>  		return NULL;
> _

This should not have been merged into mainline by itself. It was a fix
for "gcov: use kvmalloc()", which is still in -mm/-next. Merging it
alone has now broken the build:

https://github.com/ClangBuiltLinux/continuous-integration2/runs/2384465683?check_suite_focus=true

Could it please be reverted in mainline then added as a fix patch for
the patch that is still in -mm:

https://www.ozlabs.org/~akpm/mmotm/broken-out/gcov-use-kvmalloc.patch

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch 11/12] gcov: clang: fix clang-11+ build
  2021-04-19 21:36   ` Nathan Chancellor
@ 2021-04-19 22:12       ` Linus Torvalds
  0 siblings, 0 replies; 19+ messages in thread
From: Linus Torvalds @ 2021-04-19 22:12 UTC (permalink / raw)
  To: Nathan Chancellor, stable, Sasha Levin
  Cc: Linux Kernel Mailing List, Andrew Morton, johannes.berg,
	Linux-MM, mm-commits, Nick Desaulniers

On Mon, Apr 19, 2021 at 2:37 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> This should not have been merged into mainline by itself. It was a fix
> for "gcov: use kvmalloc()", which is still in -mm/-next. Merging it
> alone has now broken the build:
>
> https://github.com/ClangBuiltLinux/continuous-integration2/runs/2384465683?check_suite_focus=true
>
> Could it please be reverted in mainline [..]

Now reverted in my tree.

Sasha and stable cc'd too, since it was apparently auto-selected there..

           Linus

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch 11/12] gcov: clang: fix clang-11+ build
@ 2021-04-19 22:12       ` Linus Torvalds
  0 siblings, 0 replies; 19+ messages in thread
From: Linus Torvalds @ 2021-04-19 22:12 UTC (permalink / raw)
  To: Nathan Chancellor, stable, Sasha Levin
  Cc: Linux Kernel Mailing List, Andrew Morton, johannes.berg,
	Linux-MM, mm-commits, Nick Desaulniers

On Mon, Apr 19, 2021 at 2:37 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> This should not have been merged into mainline by itself. It was a fix
> for "gcov: use kvmalloc()", which is still in -mm/-next. Merging it
> alone has now broken the build:
>
> https://github.com/ClangBuiltLinux/continuous-integration2/runs/2384465683?check_suite_focus=true
>
> Could it please be reverted in mainline [..]

Now reverted in my tree.

Sasha and stable cc'd too, since it was apparently auto-selected there..

           Linus


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [patch 11/12] gcov: clang: fix clang-11+ build
  2021-04-19 22:12       ` Linus Torvalds
  (?)
@ 2021-04-20 14:12       ` Sasha Levin
  -1 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2021-04-20 14:12 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Nathan Chancellor, stable, Linux Kernel Mailing List,
	Andrew Morton, johannes.berg, Linux-MM, mm-commits,
	Nick Desaulniers

On Mon, Apr 19, 2021 at 03:12:26PM -0700, Linus Torvalds wrote:
>On Mon, Apr 19, 2021 at 2:37 PM Nathan Chancellor <nathan@kernel.org> wrote:
>>
>> This should not have been merged into mainline by itself. It was a fix
>> for "gcov: use kvmalloc()", which is still in -mm/-next. Merging it
>> alone has now broken the build:
>>
>> https://github.com/ClangBuiltLinux/continuous-integration2/runs/2384465683?check_suite_focus=true
>>
>> Could it please be reverted in mainline [..]
>
>Now reverted in my tree.
>
>Sasha and stable cc'd too, since it was apparently auto-selected there..

I'll drop it from my queue, thanks!

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-04-20 14:12 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 22:45 incoming Andrew Morton
2021-04-16 22:45 ` [patch 01/12] mm: eliminate "expecting prototype" kernel-doc warnings Andrew Morton
2021-04-16 22:45 ` [patch 02/12] kasan: fix hwasan build for gcc Andrew Morton
2021-04-16 22:46 ` [patch 03/12] kasan: remove redundant config option Andrew Morton
2021-04-16 22:46 ` [patch 04/12] csky: change a Kconfig symbol name to fix e1000 build error Andrew Morton
2021-04-17  0:45   ` Guo Ren
2021-04-17  0:45     ` Guo Ren
2021-04-16 22:46 ` [patch 05/12] ia64: remove duplicate entries in generic_defconfig Andrew Morton
2021-04-16 22:46 ` [patch 06/12] ia64: fix discontig.c section mismatches Andrew Morton
2021-04-16 22:46 ` [patch 07/12] ia64: tools: remove inclusion of ia64-specific version of errno.h header Andrew Morton
2021-04-16 22:46 ` [patch 08/12] ia64: tools: remove duplicate definition of ia64_mf() on ia64 Andrew Morton
2021-04-16 22:46 ` [patch 09/12] mm/mapping_dirty_helpers: guard hugepage pud's usage Andrew Morton
2021-04-16 22:46 ` [patch 10/12] mm: ptdump: fix build failure Andrew Morton
2021-04-16 22:46 ` [patch 11/12] gcov: clang: fix clang-11+ build Andrew Morton
2021-04-19 21:36   ` Nathan Chancellor
2021-04-19 22:12     ` Linus Torvalds
2021-04-19 22:12       ` Linus Torvalds
2021-04-20 14:12       ` Sasha Levin
2021-04-16 22:46 ` [patch 12/12] lib: remove "expecting prototype" kernel-doc warnings Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.