remarkable-linux/include
Steven Rostedt 08f6fba503 ftrace/x86: Add separate function to save regs
Add a way to have different functions calling different trampolines.
If a ftrace_ops wants regs saved on the return, then have only the
functions with ops registered to save regs. Functions registered by
other ops would not be affected, unless the functions overlap.

If one ftrace_ops registered functions A, B and C and another ops
registered fucntions to save regs on A, and D, then only functions
A and D would be saving regs. Function B and C would work as normal.
Although A is registered by both ops: normal and saves regs; this is fine
as saving the regs is needed to satisfy one of the ops that calls it
but the regs are ignored by the other ops function.

x86_64 implements the full regs saving, and i386 just passes a NULL
for regs to satisfy the ftrace_ops passing. Where an arch must supply
both regs and ftrace_ops parameters, even if regs is just NULL.

It is OK for an arch to pass NULL regs. All function trace users that
require regs passing must add the flag FTRACE_OPS_FL_SAVE_REGS when
registering the ftrace_ops. If the arch does not support saving regs
then the ftrace_ops will fail to register. The flag
FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED may be set that will prevent the
ftrace_ops from failing to register. In this case, the handler may
either check if regs is not NULL or check if ARCH_SUPPORTS_FTRACE_SAVE_REGS.
If the arch supports passing regs it will set this macro and pass regs
for ops that request them. All other archs will just pass NULL.

Link: Link: http://lkml.kernel.org/r/20120711195745.107705970@goodmis.org

Cc: Alexander van Heukelum <heukelum@fastmail.fm>
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-07-19 13:20:03 -04:00
..
acpi ACPI: fix acpi_bus.h build warnings when ACPI is not enabled 2012-06-04 00:29:11 -04:00
asm-generic mm: cma: fix condition check when setting global cma area 2012-07-06 12:02:04 +02:00
crypto
drm drm: drop comment about this header being autogenerated. 2012-06-22 11:04:55 +01:00
keys KEYS: Permit in-place link replacement in keyring list 2012-05-11 10:56:56 +01:00
linux ftrace/x86: Add separate function to save regs 2012-07-19 13:20:03 -04:00
math-emu
media [media] patch for Asus My Cinema PS3-100 (1043:48cd) 2012-05-20 16:05:02 -03:00
memory ddr: add LPDDR2 data from JESD209-2 2012-05-02 00:04:06 -07:00
misc
mtd UBI: amend commentaries WRT dtype 2012-05-20 20:25:59 +03:00
net ipvs: fix oops on NAT reply in br_nf context 2012-07-17 12:00:46 +02:00
pcmcia
rdma Merge branches 'core', 'cxgb4', 'ipath', 'iser', 'lockdep', 'mlx4', 'nes', 'ocrdma', 'qib' and 'raw-qp' into for-linus 2012-05-21 09:00:47 -07:00
rxrpc
scsi [SCSI] libsas: fix taskfile corruption in sas_ata_qc_fill_rtf 2012-07-08 09:49:14 +01:00
sound Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-06-25 14:53:09 -07:00
target target: Add TFO->put_session() caller for HW fabric session shutdown 2012-06-12 19:33:05 -07:00
trace Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/core 2012-07-06 11:12:17 +02:00
video fbdev updates for 3.5 2012-06-01 16:57:51 -07:00
xen xen: do not map the same GSI twice in PVHVM guests. 2012-05-21 14:11:36 -04:00
Kbuild