Skip to content

Commit 6bce244

Browse files
gormanmtorvalds
authored andcommitted
mm/page_alloc: Revert pahole zero-sized workaround
Commit dbbee9d ("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 a0b8200 ("kbuild: skip per-CPU BTF generation for pahole v1.18-v1.21"). This patch reverts the dummy field and the pahole version check. Fixes: dbbee9d ("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>
1 parent 1e16624 commit 6bce244

2 files changed

Lines changed: 0 additions & 14 deletions

File tree

lib/Kconfig.debug

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,6 @@ config DEBUG_INFO_BTF
324324
config PAHOLE_HAS_SPLIT_BTF
325325
def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'` -ge "119")
326326

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-
330327
config DEBUG_INFO_BTF_MODULES
331328
def_bool y
332329
depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF

mm/page_alloc.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,6 @@ static DEFINE_MUTEX(pcp_batch_high_lock);
124124

125125
struct pagesets {
126126
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
138127
};
139128
static DEFINE_PER_CPU(struct pagesets, pagesets) = {
140129
.lock = INIT_LOCAL_LOCK(lock),

0 commit comments

Comments
 (0)