]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Make old_rsp available to kernel modules.
authorKris Van Hees <kris.van.hees@oracle.com>
Mon, 22 Jul 2013 12:19:29 +0000 (08:19 -0400)
committerKris Van Hees <kris.van.hees@oracle.com>
Mon, 22 Jul 2013 12:19:29 +0000 (08:19 -0400)
In order to get access to the RSP value during system call and trap processing,
code needs access to the old_rsp per-cpu variable.  Since we use this from a
kernel module, it needs to be exported (it is only accessible through macros -
there isn't an accessor function exported anywhere for it).

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
dtrace/dtrace_isa.c

index c611aab6e3ad7affe32c739547b34d2b815095de..698904f9faa9900e5e1d42270d5feeb2e248f656 100644 (file)
@@ -314,7 +314,7 @@ void dtrace_getufpstack(uint64_t *pcstack, uint64_t *fpstack,
                        int pcstack_limit)
 {
        struct task_struct      *p = current;
-       unsigned long           *sp = (unsigned long *)p->thread.usersp;
+       unsigned long           *sp = (unsigned long *)this_cpu_read(old_rsp);
        unsigned long           *bos = (unsigned long *)p->mm->start_stack;
        struct vm_area_struct   *stack_vma = find_vma(p->mm, p->thread.usersp);