linux/arch
Steven Rostedt 31e889098a ftrace: pass module struct to arch dynamic ftrace functions
Impact: allow archs more flexibility on dynamic ftrace implementations

Dynamic ftrace has largly been developed on x86. Since x86 does not
have the same limitations as other architectures, the ftrace interaction
between the generic code and the architecture specific code was not
flexible enough to handle some of the issues that other architectures
have.

Most notably, module trampolines. Due to the limited branch distance
that archs make in calling kernel core code from modules, the module
load code must create a trampoline to jump to what will make the
larger jump into core kernel code.

The problem arises when this happens to a call to mcount. Ftrace checks
all code before modifying it and makes sure the current code is what
it expects. Right now, there is not enough information to handle modifying
module trampolines.

This patch changes the API between generic dynamic ftrace code and
the arch dependent code. There is now two functions for modifying code:

  ftrace_make_nop(mod, rec, addr) - convert the code at rec->ip into
       a nop, where the original text is calling addr. (mod is the
       module struct if called by module init)

  ftrace_make_caller(rec, addr) - convert the code rec->ip that should
       be a nop into a caller to addr.

The record "rec" now has a new field called "arch" where the architecture
can add any special attributes to each call site record.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-11-16 07:36:02 +01:00
..
alpha Merge branch 'v28-range-hrtimers-for-linus-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-10-23 10:53:02 -07:00
arm Merge branch 'omap-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2008-11-06 18:07:03 +00:00
avr32 Merge branches 'boards' and 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6 2008-10-23 15:24:10 +02:00
blackfin container freezer: implement freezer cgroup subsystem 2008-10-20 08:52:34 -07:00
cris [CRIS] Remove links from CRIS build 2008-10-31 23:37:57 +01:00
frv container freezer: implement freezer cgroup subsystem 2008-10-20 08:52:34 -07:00
h8300 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb 2008-10-23 08:20:34 -07:00
ia64 [IA64] Reserve elfcorehdr memory in CONFIG_CRASH_DUMP 2008-11-07 09:51:55 -08:00
m32r Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile 2008-10-23 10:05:40 -07:00
m68k proc: move /proc/stram to m68k-specific code 2008-10-23 14:25:35 +04:00
m68knommu container freezer: implement freezer cgroup subsystem 2008-10-20 08:52:34 -07:00
mips CHAR: Delete old and now unused M48T35 RTC driver for SGI IP27. 2008-10-30 14:44:35 +00:00
mn10300 mn10300: use bcd2bin/bin2bcd 2008-10-20 08:52:41 -07:00
parisc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2008-10-23 10:22:40 -07:00
powerpc powerpc: Update desktop/server defconfigs 2008-11-11 19:42:30 +11:00
s390 [S390] s390: Fix build for !CONFIG_S390_GUEST + CONFIG_VIRTIO_CONSOLE 2008-10-28 11:12:06 +01:00
sh ftrace: fix hardirq header for non ftrace archs 2008-11-03 11:03:43 +01:00
sparc Revert "sparc: correct section of current_pc()" 2008-11-10 12:33:30 -08:00
sparc64 sparc64: Update defconfig. 2008-11-10 12:35:29 -08:00
um Merge git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev 2008-10-23 10:23:07 -07:00
x86 ftrace: pass module struct to arch dynamic ftrace functions 2008-11-16 07:36:02 +01:00
xtensa Merge git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6 2008-10-23 09:16:56 -07:00
.gitignore
Kconfig Change UTF8 chars in Kconfig help text about Oprofile AMD barcelona 2008-10-27 19:15:39 +01:00