Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/page_alloc: Revert pahole zero-sized workaround

Commit dbbee9d5cd83 ("mm/page_alloc: convert per-cpu list protection to
local_lock") folded in a workaround patch for pahole that was unable to
deal with zero-sized percpu structures.

A superior workaround is achieved with commit a0b8200d06ad ("kbuild:
skip per-CPU BTF generation for pahole v1.18-v1.21").

This patch reverts the dummy field and the pahole version check.

Fixes: dbbee9d5cd83 ("mm/page_alloc: convert per-cpu list protection to local_lock")
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Mel Gorman and committed by
Linus Torvalds
6bce2443 1e16624d

-14
-3
lib/Kconfig.debug
··· 324 324 config PAHOLE_HAS_SPLIT_BTF 325 325 def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'` -ge "119") 326 326 327 - config PAHOLE_HAS_ZEROSIZE_PERCPU_SUPPORT 328 - def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'` -ge "122") 329 - 330 327 config DEBUG_INFO_BTF_MODULES 331 328 def_bool y 332 329 depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF
-11
mm/page_alloc.c
··· 124 124 125 125 struct pagesets { 126 126 local_lock_t lock; 127 - #if defined(CONFIG_DEBUG_INFO_BTF) && \ 128 - !defined(CONFIG_DEBUG_LOCK_ALLOC) && \ 129 - !defined(CONFIG_PAHOLE_HAS_ZEROSIZE_PERCPU_SUPPORT) 130 - /* 131 - * pahole 1.21 and earlier gets confused by zero-sized per-CPU 132 - * variables and produces invalid BTF. Ensure that 133 - * sizeof(struct pagesets) != 0 for older versions of pahole. 134 - */ 135 - char __pahole_hack; 136 - #warning "pahole too old to support zero-sized struct pagesets" 137 - #endif 138 127 }; 139 128 static DEFINE_PER_CPU(struct pagesets, pagesets) = { 140 129 .lock = INIT_LOCAL_LOCK(lock),