From ac97ccbab571dee4efcf34fd7c152e42ae2f341f Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Thu, 18 Jan 2018 11:21:03 +0000 Subject: [PATCH] Fix compilation with gcc. etext is already declared in machine/cpu.h, move kernphys declaration there too. Based on the patch by: bde MFC after: 13 days --- sys/amd64/amd64/pmap.c | 2 -- sys/amd64/include/cpu.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 837953e2d17d..d645be318679 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -7562,8 +7562,6 @@ pmap_pti_free_page(vm_page_t m) return (true); } -extern char kernphys[], etext[]; - static void pmap_pti_init(void) { diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h index 80cf80408308..58662ad9800c 100644 --- a/sys/amd64/include/cpu.h +++ b/sys/amd64/include/cpu.h @@ -70,6 +70,7 @@ struct cpu_ops { extern struct cpu_ops cpu_ops; extern char btext[]; extern char etext[]; +extern char kernphys[]; /* Resume hook for VMM. */ extern void (*vmm_resume_p)(void);