Skip to content

Commit 051ea72

Browse files
committed
Merge tag 'fixes-2025-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
Pull memblock fix from Mike Rapoport: "Fix build of memblock test. Add missing stubs for mutex and free_reserved_area() to memblock tests" * tag 'fixes-2025-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: memblock tests: Fix mutex related build error
2 parents 7cdabaf + ed471e1 commit 051ea72

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

tools/testing/memblock/internal.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,10 @@ static inline void accept_memory(phys_addr_t start, unsigned long size)
2424
{
2525
}
2626

27+
static inline unsigned long free_reserved_area(void *start, void *end,
28+
int poison, const char *s)
29+
{
30+
return 0;
31+
}
32+
2733
#endif

tools/testing/memblock/linux/mutex.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _MUTEX_H
3+
#define _MUTEX_H
4+
5+
#define DEFINE_MUTEX(name) int name
6+
7+
static inline void dummy_mutex_guard(int *name)
8+
{
9+
}
10+
11+
#define guard(mutex) \
12+
dummy_##mutex##_guard
13+
14+
#endif /* _MUTEX_H */

0 commit comments

Comments
 (0)