]> www.infradead.org Git - users/jedix/linux-maple.git/commit
proc: sparc64 ADI version tag debugging interface
authorEric Snowberg <eric.snowberg@oracle.com>
Fri, 12 May 2017 20:31:42 +0000 (13:31 -0700)
committerAllen Pais <allen.pais@oracle.com>
Tue, 18 Jul 2017 12:25:00 +0000 (17:55 +0530)
commit53be87fe042b1130e585d2ce6560ffa1372a94fc
tree061f8496bbf1f72abb3cc09bd62ff1490e45549e
parentec408e852f74f497b56115ff0eca346d64ff7d85
proc: sparc64 ADI version tag debugging interface

To facilitate user space ADI debugging there needs to be a way for a
debugger to get/set ADI version tags in a target process. This is
accomplished with a new /proc/<pid>/adi/tags interface.  This new interface
maps linearly to the address space of the target process at a ratio
of 1:adi_blksz.  A read (or write) of offset K in the file returns
(or modifies) the ADI version tag stored in the cacheline containing
address K * adi_blksz, encoded as 1 version per byte.

Pseudocode example:

        unsigned char vers[2];
        long long addr = 0x20000;

        fd = open(â\80\9c/proc/pid/adi/tagsâ\80\9d, O_RDONLY);
        addr /= adi_blksz();
        rv = pread64(fd, &vers, 2, addr);
        /*
         * vers[0] gets version from address 0x20000,
         * vers[1] gets version from address 0x20000 + adi_blksz()
         */

Orabug: 26051178

Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com>
arch/sparc/include/asm/adi_64.h
fs/proc/Makefile
fs/proc/adi.c [new file with mode: 0644]
fs/proc/adi.h [new file with mode: 0644]
fs/proc/base.c