Skip to content

Commit 722315a

Browse files
Gu Yuchenopsiff
authored andcommitted
sw64: fix the compilation error when CONFIG_DEBUG_VIRTUAL is enabled
Compiling with CONFIG_DEBUG_VIRTUAL=y caused the following error: implicit declaration of function 'phys_addr_valid' This commit fixes the compilation error. Signed-off-by: Gu Yuchen <guyuchen@wxiat.com> Reviewed-by: He Sheng <hesheng@wxiat.com> Signed-off-by: Gu Zitao <guzitao@wxiat.com>
1 parent 0a4118d commit 722315a

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

arch/sw_64/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
DEFINE_PER_CPU(unsigned long, hard_node_id) = { 0 };
4747
static DEFINE_PER_CPU(struct cpu, cpu_devices);
4848

49-
static inline int phys_addr_valid(unsigned long addr)
49+
inline int phys_addr_valid(unsigned long addr)
5050
{
5151
/*
5252
* At this point memory probe has not been done such that max_pfn

arch/sw_64/mm/physaddr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <linux/mm.h>
55
#include <asm/page.h>
66

7+
extern int phys_addr_valid(unsigned long);
78
unsigned long __phys_addr(unsigned long addr)
89
{
910
VIRTUAL_BUG_ON(addr < PAGE_OFFSET);

0 commit comments

Comments
 (0)