Skip to content

Commit

Permalink
Merge tag 'fixes-2024-04-08' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/rppt/memblock

Pull memblock fixes from Mike Rapoport:
 "Fix build errors in memblock tests:

   - add stubs to functions that calls to them were recently added to
     memblock but they were missing in tests

   - update gfp_types.h to include bits.h so that BIT() definitions
     won't depend on other includes"

* tag 'fixes-2024-04-08' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
  memblock tests: fix undefined reference to `BIT'
  memblock tests: fix undefined reference to `panic'
  memblock tests: fix undefined reference to `early_pfn_to_nid'
  • Loading branch information
Linus Torvalds committed Apr 8, 2024
2 parents fec50db + 592447f commit 4f0a8fe
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/linux/gfp_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#ifndef __LINUX_GFP_TYPES_H
#define __LINUX_GFP_TYPES_H

#include <linux/bits.h>

/* The typedef is in types.h but we want the documentation here */
#if 0
/**
Expand Down
1 change: 1 addition & 0 deletions tools/include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <linux/build_bug.h>
#include <linux/compiler.h>
#include <linux/math.h>
#include <linux/panic.h>
#include <endian.h>
#include <byteswap.h>

Expand Down
5 changes: 5 additions & 0 deletions tools/include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ static inline void totalram_pages_add(long count)
{
}

static inline int early_pfn_to_nid(unsigned long pfn)
{
return 0;
}

#endif
19 changes: 19 additions & 0 deletions tools/include/linux/panic.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _TOOLS_LINUX_PANIC_H
#define _TOOLS_LINUX_PANIC_H

#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>

static inline void panic(const char *fmt, ...)
{
va_list argp;

va_start(argp, fmt);
vfprintf(stderr, fmt, argp);
va_end(argp);
exit(-1);
}

#endif

0 comments on commit 4f0a8fe

Please sign in to comment.