0f2fe153bc
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 |
||
---|---|---|
.. | ||
_inttypes.h | ||
_limits.h | ||
_stdint.h | ||
_types.h | ||
asi.h | ||
asm.h | ||
asmacros.h | ||
atomic.h | ||
bus_common.h | ||
bus_memio.h | ||
bus_pio.h | ||
bus_private.h | ||
bus.h | ||
cache.h | ||
ccr.h | ||
clock.h | ||
cpu.h | ||
cpufunc.h | ||
critical.h | ||
db_machdep.h | ||
eeprom.h | ||
elf.h | ||
endian.h | ||
exec.h | ||
float.h | ||
floatingpoint.h | ||
fp.h | ||
frame.h | ||
fsr.h | ||
gdb_machdep.h | ||
idprom.h | ||
ieee.h | ||
ieeefp.h | ||
in_cksum.h | ||
instr.h | ||
intr_machdep.h | ||
iommureg.h | ||
iommuvar.h | ||
kdb.h | ||
kerneldump.h | ||
ktr.h | ||
limits.h | ||
lsu.h | ||
md_var.h | ||
memdev.h | ||
metadata.h | ||
mutex.h | ||
nexusvar.h | ||
ofw_bus.h | ||
ofw_machdep.h | ||
ofw_mem.h | ||
ofw_nexus.h | ||
ofw_upa.h | ||
param.h | ||
pcb.h | ||
pcpu.h | ||
pmap.h | ||
proc.h | ||
profile.h | ||
pstate.h | ||
ptrace.h | ||
reg.h | ||
reloc.h | ||
resource.h | ||
runq.h | ||
sc_machdep.h | ||
setjmp.h | ||
sf_buf.h | ||
sigframe.h | ||
signal.h | ||
smp.h | ||
stdarg.h | ||
sysarch.h | ||
tick.h | ||
tlb.h | ||
trap.h | ||
tsb.h | ||
tstate.h | ||
tte.h | ||
ucontext.h | ||
upa.h | ||
utrap.h | ||
varargs.h | ||
ver.h | ||
vmparam.h | ||
watch.h | ||
wstate.h |