cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

ptdump_debugfs.c (498B)


      1// SPDX-License-Identifier: GPL-2.0
      2#include <linux/debugfs.h>
      3#include <linux/memory_hotplug.h>
      4#include <linux/seq_file.h>
      5
      6#include <asm/ptdump.h>
      7
      8static int ptdump_show(struct seq_file *m, void *v)
      9{
     10	struct ptdump_info *info = m->private;
     11
     12	get_online_mems();
     13	ptdump_walk(m, info);
     14	put_online_mems();
     15	return 0;
     16}
     17DEFINE_SHOW_ATTRIBUTE(ptdump);
     18
     19void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name)
     20{
     21	debugfs_create_file(name, 0400, NULL, info, &ptdump_fops);
     22}