• Petr Tesarik's avatar
    swiotlb: Omit total_used and used_hiwater if !CONFIG_DEBUG_FS · ec274aff
    Petr Tesarik authored
    The tracking of used_hiwater adds an atomic operation to the hot
    path. This is acceptable only when debugging the kernel. To make
    sure that the fields can never be used by mistake, do not even
    include them in struct io_tlb_mem if CONFIG_DEBUG_FS is not set.
    
    The build fails after doing that. To fix it, it is necessary to
    remove all code specific to debugfs and instead provide a stub
    implementation of swiotlb_create_debugfs_files(). As a bonus, this
    change allows to remove one __maybe_unused attribute.
    Signed-off-by: default avatarPetr Tesarik <petr.tesarik.ext@huawei.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    ec274aff
swiotlb.c 30.6 KB