• Suzuki K Poulose's avatar
    coresight: Add support for TMC ETR SG unit · 260ec24b
    Suzuki K Poulose authored
    This patch adds support for setting up an SG table used by the
    TMC ETR inbuilt SG unit. The TMC ETR uses 4K page sized tables
    to hold pointers to the 4K data pages with the last entry in a
    table pointing to the next table with the entries, by kind of
    chaining. The 2 LSBs determine the type of the table entry, to
    one of :
    
     Normal - Points to a 4KB data page.
     Last   - Points to a 4KB data page, but is the last entry in the
              page table.
     Link   - Points to another 4KB table page with pointers to data.
    
    The code takes care of handling the system page size which could
    be different than 4K. So we could end up putting multiple ETR
    SG tables in a single system page, vice versa for the data pages.
    
    Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
    Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
    Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    260ec24b
coresight-tmc-etr.c 23 KB