freebsd-skq/sys/arm/include
Marcel Moolenaar 0f2fe153bc Move the kernel-specific logic to adjust frompc from MI to MD. For
these two reasons:
1. On ia64 a function pointer does not hold the address of the first
   instruction of a functions implementation. It holds the address
   of a function descriptor. Hence the user(), btrap(), eintr() and
   bintr() prototypes are wrong for getting the actual code address.
2. The logic forces interrupt, trap and exception entry points to
   be layed-out contiguously. This can not be achieved on ia64 and is
   generally just bad programming.

The MCOUNT_FROMPC_USER macro is used to set the frompc argument to
some kernel address which represents any frompc that falls outside
the kernel text range. The macro can expand to ~0U to bail out in
that case.
The MCOUNT_FROMPC_INTR macro is used to set the frompc argument to
some kernel address to represent a call to a trap or interrupt
handler. This to avoid that the trap or interrupt handler appear to
be called from everywhere in the call graph. The macro can expand
to ~0U to prevent adjusting frompc. Note that the argument is selfpc,
not frompc.

This commit defines the macros on all architectures equivalently to
the original code in sys/libkern/mcount.c. People can take it from
here...

Compile-tested on: alpha, amd64, i386, ia64 and sparc64
Boot-tested on: i386
2004-08-27 19:42:35 +00:00
..
_inttypes.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
_limits.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
_stdint.h <stdint.h> should define WINT_M{AX,IN} independent from whether WCHAR_MIN is 2004-05-18 16:04:57 +00:00
_types.h Define __double_t and __float_t. 2004-05-04 22:16:29 +00:00
armreg.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
asm.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
asmacros.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
atomic.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
blockio.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
bootconfig.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
bus_memio.h Import bus_memio.h and bus_pio.h for arm. 2004-07-12 21:18:30 +00:00
bus_pio.h Import bus_memio.h and bus_pio.h for arm. 2004-07-12 21:18:30 +00:00
bus.h Nuke bus_space_mmap(), as it does not exist in FreeBSD. 2004-06-17 17:51:48 +00:00
clock.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
cpu.h Instead of calling ia32_pause() conditionally on __i386__ or __amd64__ 2004-08-03 18:44:27 +00:00
cpuconf.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
cpufunc.h Nuke disable_intr() and enable_intr(), as it already exists elsewhere. 2004-07-20 22:38:46 +00:00
critical.h Correct typo in prior commit: s/cd/td/ 2004-07-27 19:44:08 +00:00
db_machdep.h Update to kdb. 2004-07-12 21:25:01 +00:00
disassem.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
elf.h Add the Elf32_Auxinfo declaretion. 2004-05-04 22:21:36 +00:00
endian.h *blush* 2004-08-02 12:24:18 +00:00
exec.h
fiq.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
float.h Make FLT_ROUNDS correctly reflect the dynamic rounding mode. 2004-07-19 08:17:25 +00:00
floatingpoint.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
fp.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
frame.h Remove the kbd_trap() declaration. 2004-07-12 21:24:21 +00:00
ieee.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
ieeefp.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
in_cksum.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
intr.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
katelib.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
kdb.h Import a kdb.h for arm, which contains stubs right now. 2004-07-12 21:17:51 +00:00
limits.h Remove advertising clause from University of California Regent's license, 2004-04-05 21:29:41 +00:00
machdep.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
md_var.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
metadata.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
mutex.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
param.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
pcb.h Do not declare curpcb. 2004-07-21 22:04:32 +00:00
pcpu.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
pmap.h Define pmap_page_is_mapped(). 2004-07-21 22:02:48 +00:00
proc.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
profile.h Move the kernel-specific logic to adjust frompc from MI to MD. For 2004-08-27 19:42:35 +00:00
psl.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
pte.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
ptrace.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
reg.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
reloc.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
resource.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
runq.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
setjmp.h Protect setjmp.h with #ifndef _MACHINE_SETJMP_H_. 2004-07-12 21:23:58 +00:00
sf_buf.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
sigframe.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
signal.h Don't declare osigset_t, as it is done in sys/_sigset.h. 2004-05-04 22:38:22 +00:00
smp.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
stdarg.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
swi.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
trap.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
ucontext.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
undefined.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
utrap.h Import FreeBSD/arm kernel bits. 2004-05-14 11:46:45 +00:00
vmparam.h Fix comments. 2004-08-02 12:23:53 +00:00