From a29cc9a34bac9ea5146592493272585bdf8333e0 Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Sun, 28 Jul 2013 18:44:17 +0000 Subject: [PATCH] Revert r253748,253749 This WIP should not have been committed yet. Pointyhat to: avg --- lib/libc/powerpc/gen/syncicache.c | 1 + lib/libc/powerpc64/gen/syncicache.c | 1 + libexec/rtld-elf/powerpc/reloc.c | 1 + libexec/rtld-elf/powerpc64/reloc.c | 1 + sbin/adjkerntz/adjkerntz.c | 1 + share/examples/perfmon/perfmon.c | 1 + sys/amd64/include/cpu.h | 3 +-- sys/arm/include/cpu.h | 5 ++--- sys/i386/include/cpu.h | 3 +-- sys/ia64/include/cpu.h | 4 ++-- sys/mips/include/cpu.h | 5 ++--- sys/powerpc/include/cpu.h | 3 --- sys/sparc64/include/cpu.h | 4 ++-- tools/tools/vhba/vhba.h | 1 + usr.bin/w/w.c | 1 + 15 files changed, 18 insertions(+), 17 deletions(-) diff --git a/lib/libc/powerpc/gen/syncicache.c b/lib/libc/powerpc/gen/syncicache.c index b8b4a16e6257..434dcec63416 100644 --- a/lib/libc/powerpc/gen/syncicache.c +++ b/lib/libc/powerpc/gen/syncicache.c @@ -44,6 +44,7 @@ static const char rcsid[] = #endif #include +#include #include #ifdef _STANDALONE diff --git a/lib/libc/powerpc64/gen/syncicache.c b/lib/libc/powerpc64/gen/syncicache.c index 3fe6e1a1350a..1267c9fcc366 100644 --- a/lib/libc/powerpc64/gen/syncicache.c +++ b/lib/libc/powerpc64/gen/syncicache.c @@ -44,6 +44,7 @@ static const char rcsid[] = #endif #include +#include #include #ifdef _STANDALONE diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index 2dd27c7ae581..838cfe6f5157 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include diff --git a/libexec/rtld-elf/powerpc64/reloc.c b/libexec/rtld-elf/powerpc64/reloc.c index 74725a043059..fb5325f23dc0 100644 --- a/libexec/rtld-elf/powerpc64/reloc.c +++ b/libexec/rtld-elf/powerpc64/reloc.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include "debug.h" diff --git a/sbin/adjkerntz/adjkerntz.c b/sbin/adjkerntz/adjkerntz.c index 34514478a990..c42379d71915 100644 --- a/sbin/adjkerntz/adjkerntz.c +++ b/sbin/adjkerntz/adjkerntz.c @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "pathnames.h" diff --git a/share/examples/perfmon/perfmon.c b/share/examples/perfmon/perfmon.c index 97283a22679a..edac9bd857aa 100644 --- a/share/examples/perfmon/perfmon.c +++ b/share/examples/perfmon/perfmon.c @@ -32,6 +32,7 @@ #include #include +#include #include #include diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h index 98b439f8afa5..1c2871f6dc10 100644 --- a/sys/amd64/include/cpu.h +++ b/sys/amd64/include/cpu.h @@ -36,8 +36,6 @@ #ifndef _MACHINE_CPU_H_ #define _MACHINE_CPU_H_ -#ifdef _KERNEL - /* * Definitions unique to i386 cpu support. */ @@ -55,6 +53,7 @@ (ISPL((framep)->tf_cs) == SEL_UPL) #define TRAPF_PC(framep) ((framep)->tf_rip) +#ifdef _KERNEL extern char btext[]; extern char etext[]; diff --git a/sys/arm/include/cpu.h b/sys/arm/include/cpu.h index 4091002ad9d5..9dae977c27fc 100644 --- a/sys/arm/include/cpu.h +++ b/sys/arm/include/cpu.h @@ -6,11 +6,10 @@ #include -#ifdef _KERNEL - void cpu_halt(void); void swi_vm(void *); +#ifdef _KERNEL static __inline uint64_t get_cyclecount(void) { @@ -20,6 +19,7 @@ get_cyclecount(void) return ((uint64_t)bt.sec << 56 | bt.frac >> 8); } +#endif #define TRAPF_USERMODE(frame) ((frame->tf_spsr & PSR_MODE) == PSR_USR32_MODE) @@ -50,5 +50,4 @@ void *initarm(struct arm_boot_params *); extern char btext[]; extern char etext[]; int badaddr_read(void *, size_t, void *); -#endif #endif /* !MACHINE_CPU_H */ diff --git a/sys/i386/include/cpu.h b/sys/i386/include/cpu.h index c2e08a080e61..5bc9f5c04c11 100644 --- a/sys/i386/include/cpu.h +++ b/sys/i386/include/cpu.h @@ -43,8 +43,6 @@ #include #include -#ifdef _KERNEL - #define cpu_exec(p) /* nothing */ #define cpu_swapin(p) /* nothing */ #define cpu_getstack(td) ((td)->td_frame->tf_esp) @@ -55,6 +53,7 @@ ((ISPL((framep)->tf_cs) == SEL_UPL) || ((framep)->tf_eflags & PSL_VM)) #define TRAPF_PC(framep) ((framep)->tf_eip) +#ifdef _KERNEL extern char btext[]; extern char etext[]; diff --git a/sys/ia64/include/cpu.h b/sys/ia64/include/cpu.h index 35af76686782..9d7a936097a8 100644 --- a/sys/ia64/include/cpu.h +++ b/sys/ia64/include/cpu.h @@ -44,12 +44,12 @@ #include -#ifdef _KERNEL - #define TRAPF_PC(tf) ((tf)->tf_special.iip) #define TRAPF_CPL(tf) ((tf)->tf_special.psr & IA64_PSR_CPL) #define TRAPF_USERMODE(tf) (TRAPF_CPL(tf) != IA64_PSR_CPL_KERN) +#ifdef _KERNEL + #ifdef GPROF extern char btext[]; extern char etext[]; diff --git a/sys/mips/include/cpu.h b/sys/mips/include/cpu.h index ff5117a9dbf0..2691cf2c88e2 100644 --- a/sys/mips/include/cpu.h +++ b/sys/mips/include/cpu.h @@ -49,8 +49,6 @@ #include -#if defined(_KERNEL) - /* BEGIN: these are going away */ #define soft_int_mask(softintr) (1 << ((softintr) + 8)) @@ -76,7 +74,9 @@ * A machine-independent interface to the CPU's counter. */ #define get_cyclecount() mips_rd_count() +#endif /* !_LOCORE */ +#if defined(_KERNEL) && !defined(_LOCORE) extern char btext[]; extern char etext[]; @@ -85,6 +85,5 @@ void swi_vm(void *); void cpu_halt(void); void cpu_reset(void); -#endif /* !_LOCORE */ #endif /* _KERNEL */ #endif /* !_MACHINE_CPU_H_ */ diff --git a/sys/powerpc/include/cpu.h b/sys/powerpc/include/cpu.h index a2e34a0bab90..bf4db83c7dbb 100644 --- a/sys/powerpc/include/cpu.h +++ b/sys/powerpc/include/cpu.h @@ -39,8 +39,6 @@ #include #include -#ifdef _KERNEL - /* * CPU Feature Attributes * @@ -100,5 +98,4 @@ void cpu_reset(void); void fork_trampoline(void); void swi_vm(void *); -#endif /* _KERNEL */ #endif /* _MACHINE_CPU_H_ */ diff --git a/sys/sparc64/include/cpu.h b/sys/sparc64/include/cpu.h index cd235786e876..401f39bfccc6 100644 --- a/sys/sparc64/include/cpu.h +++ b/sys/sparc64/include/cpu.h @@ -40,8 +40,6 @@ #include #include -#ifdef _KERNEL - #define TRAPF_PC(tfp) ((tfp)->tf_tpc) #define TRAPF_USERMODE(tfp) (((tfp)->tf_tstate & TSTATE_PRIV) == 0) @@ -49,6 +47,8 @@ #define cpu_setstack(td, sp) ((td)->td_frame->tf_sp = (sp)) #define cpu_spinwait() /* nothing */ +#ifdef _KERNEL + extern char btext[]; extern char etext[]; diff --git a/tools/tools/vhba/vhba.h b/tools/tools/vhba/vhba.h index 2673e77fe259..c09bd000de3e 100644 --- a/tools/tools/vhba/vhba.h +++ b/tools/tools/vhba/vhba.h @@ -43,6 +43,7 @@ #include #include +#include #include #include diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index 8054bbebbb9c..1b9af5f0cc33 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -57,6 +57,7 @@ static const char sccsid[] = "@(#)w.c 8.4 (Berkeley) 4/16/94"; #include #include +#include #include #include #include