• Y
    hwtracing: hisi_ptt: Export available filters through sysfs · 4225101e
    Yicong Yang 提交于
    driver inclusion
    category: bugfix
    bugzilla: https://gitee.com/openeuler/kernel/issues/I7BZYX
    CVE: NA
    
    Reference: NA
    
    --------------------------------------------------------------------------
    
    From: Yicong Yang <yangyicong@hisilicon.com>
    
    The PTT can only filter the traced TLP headers by the Root Ports or the
    Requester ID of the Endpoint, which are located on the same PCIe core of
    the PTT device. The filter value used is derived from the BDF number of
    the supported Root Port or the Endpoint. It's not friendly enough for the
    users since it requires the user to be familiar enough with the platform
    and calculate the filter value manually.
    
    This patch export the available filters through sysfs. Each available
    filters is presented as an individual file with the name of the BDF
    number of the related PCIe device. The files are created under
    $(PTT PMU dir)/available_root_port_filters and
    $(PTT PMU dir)/available_requester_filters respectively. The filter
    value can be known by reading the related file.
    
    Then the users can easily know the available filters for trace and get
    the filter values without calculating.
    Reviewed-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: NYicong Yang <yangyicong@hisilicon.com>
    4225101e
sysfs-devices-hisi_ptt 5.0 KB