iommu/tegra: smmu: debugfs for TLB/PTC statistics
authorHiroshi Doyu <hdoyu@nvidia.com>
Thu, 2 Aug 2012 08:46:40 +0000 (11:46 +0300)
committerJoerg Roedel <joerg.roedel@amd.com>
Fri, 3 Aug 2012 15:53:55 +0000 (17:53 +0200)
Add debugfs entries to collect TLB/PTC statistics.

  $ echo "reset" > /sys/kernel/debug/smmu/mc/{tlb,ptc}
  $ echo "on" > /sys/kernel/debug/smmu/mc/{tlb,ptc}
  $ echo "off" > /sys/kernel/debug/smmu/mc/{tlb,ptc}
  $ cat /sys/kernel/debug/smmu/mc/{tlb,ptc}
  hit:0014910c miss:00014d22

  The above format is:
  hit:<HIT count><SPC>miss:<MISS count><SPC><CR+LF>

  fscanf(fp, "hit:%lx miss:%lx", &hit, &miss);

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>

No differences found