Commit dbf77fed authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Michael Ellerman

powerpc: rename powerpc_debugfs_root to arch_debugfs_dir

No functional change in this patch. arch_debugfs_dir is the generic kernel
name declared in linux/debugfs.h for arch-specific debugfs directory.
Architectures like x86/s390 already use the name. Rename powerpc
specific powerpc_debugfs_root to arch_debugfs_dir.
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210812132831.233794-2-aneesh.kumar@linux.ibm.com
parent 3e188b1a
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _ASM_POWERPC_DEBUGFS_H
#define _ASM_POWERPC_DEBUGFS_H
/*
* Copyright 2017, Michael Ellerman, IBM Corporation.
*/
#include <linux/debugfs.h>
extern struct dentry *powerpc_debugfs_root;
#endif /* _ASM_POWERPC_DEBUGFS_H */
...@@ -46,7 +46,8 @@ obj-y := cputable.o syscalls.o \ ...@@ -46,7 +46,8 @@ obj-y := cputable.o syscalls.o \
prom.o traps.o setup-common.o \ prom.o traps.o setup-common.o \
udbg.o misc.o io.o misc_$(BITS).o \ udbg.o misc.o io.o misc_$(BITS).o \
of_platform.o prom_parse.o firmware.o \ of_platform.o prom_parse.o firmware.o \
hw_breakpoint_constraints.o interrupt.o hw_breakpoint_constraints.o interrupt.o \
kdebugfs.o
obj-y += ptrace/ obj-y += ptrace/
obj-$(CONFIG_PPC64) += setup_64.o \ obj-$(CONFIG_PPC64) += setup_64.o \
paca.o nvram_64.o note.o paca.o nvram_64.o note.o
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <linux/export.h> #include <linux/export.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <asm/debugfs.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/hvcall.h> #include <asm/hvcall.h>
...@@ -101,7 +100,7 @@ static int __init dawr_force_setup(void) ...@@ -101,7 +100,7 @@ static int __init dawr_force_setup(void)
if (PVR_VER(mfspr(SPRN_PVR)) == PVR_POWER9) { if (PVR_VER(mfspr(SPRN_PVR)) == PVR_POWER9) {
/* Turn DAWR off by default, but allow admin to turn it on */ /* Turn DAWR off by default, but allow admin to turn it on */
debugfs_create_file_unsafe("dawr_enable_dangerous", 0600, debugfs_create_file_unsafe("dawr_enable_dangerous", 0600,
powerpc_debugfs_root, arch_debugfs_dir,
&dawr_force_enable, &dawr_force_enable,
&dawr_enable_fops); &dawr_enable_fops);
} }
......
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/debugfs.h>
#include <linux/atomic.h> #include <linux/atomic.h>
#include <asm/debugfs.h>
#include <asm/eeh.h> #include <asm/eeh.h>
#include <asm/eeh_event.h> #include <asm/eeh_event.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -1901,24 +1901,24 @@ static int __init eeh_init_proc(void) ...@@ -1901,24 +1901,24 @@ static int __init eeh_init_proc(void)
proc_create_single("powerpc/eeh", 0, NULL, proc_eeh_show); proc_create_single("powerpc/eeh", 0, NULL, proc_eeh_show);
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
debugfs_create_file_unsafe("eeh_enable", 0600, debugfs_create_file_unsafe("eeh_enable", 0600,
powerpc_debugfs_root, NULL, arch_debugfs_dir, NULL,
&eeh_enable_dbgfs_ops); &eeh_enable_dbgfs_ops);
debugfs_create_u32("eeh_max_freezes", 0600, debugfs_create_u32("eeh_max_freezes", 0600,
powerpc_debugfs_root, &eeh_max_freezes); arch_debugfs_dir, &eeh_max_freezes);
debugfs_create_bool("eeh_disable_recovery", 0600, debugfs_create_bool("eeh_disable_recovery", 0600,
powerpc_debugfs_root, arch_debugfs_dir,
&eeh_debugfs_no_recover); &eeh_debugfs_no_recover);
debugfs_create_file_unsafe("eeh_dev_check", 0600, debugfs_create_file_unsafe("eeh_dev_check", 0600,
powerpc_debugfs_root, NULL, arch_debugfs_dir, NULL,
&eeh_dev_check_fops); &eeh_dev_check_fops);
debugfs_create_file_unsafe("eeh_dev_break", 0600, debugfs_create_file_unsafe("eeh_dev_break", 0600,
powerpc_debugfs_root, NULL, arch_debugfs_dir, NULL,
&eeh_dev_break_fops); &eeh_dev_break_fops);
debugfs_create_file_unsafe("eeh_force_recover", 0600, debugfs_create_file_unsafe("eeh_force_recover", 0600,
powerpc_debugfs_root, NULL, arch_debugfs_dir, NULL,
&eeh_force_recover_fops); &eeh_force_recover_fops);
debugfs_create_file_unsafe("eeh_dev_can_recover", 0600, debugfs_create_file_unsafe("eeh_dev_can_recover", 0600,
powerpc_debugfs_root, NULL, arch_debugfs_dir, NULL,
&eeh_dev_can_recover_fops); &eeh_dev_can_recover_fops);
eeh_cache_debugfs_init(); eeh_cache_debugfs_init();
#endif #endif
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/atomic.h> #include <linux/atomic.h>
#include <linux/debugfs.h>
#include <asm/pci-bridge.h> #include <asm/pci-bridge.h>
#include <asm/debugfs.h>
#include <asm/ppc-pci.h> #include <asm/ppc-pci.h>
...@@ -283,6 +283,6 @@ DEFINE_SHOW_ATTRIBUTE(eeh_addr_cache); ...@@ -283,6 +283,6 @@ DEFINE_SHOW_ATTRIBUTE(eeh_addr_cache);
void eeh_cache_debugfs_init(void) void eeh_cache_debugfs_init(void)
{ {
debugfs_create_file_unsafe("eeh_address_cache", 0400, debugfs_create_file_unsafe("eeh_address_cache", 0400,
powerpc_debugfs_root, NULL, arch_debugfs_dir, NULL,
&eeh_addr_cache_fops); &eeh_addr_cache_fops);
} }
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/cma.h> #include <linux/cma.h>
#include <linux/hugetlb.h> #include <linux/hugetlb.h>
#include <linux/debugfs.h>
#include <asm/debugfs.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/fadump.h> #include <asm/fadump.h>
...@@ -1557,7 +1557,7 @@ static void fadump_init_files(void) ...@@ -1557,7 +1557,7 @@ static void fadump_init_files(void)
return; return;
} }
debugfs_create_file("fadump_region", 0444, powerpc_debugfs_root, NULL, debugfs_create_file("fadump_region", 0444, arch_debugfs_dir, NULL,
&fadump_region_fops); &fadump_region_fops);
if (fw_dump.dump_active) { if (fw_dump.dump_active) {
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/sstep.h> #include <asm/sstep.h>
#include <asm/debug.h> #include <asm/debug.h>
#include <asm/debugfs.h>
#include <asm/hvcall.h> #include <asm/hvcall.h>
#include <asm/inst.h> #include <asm/inst.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
......
// SPDX-License-Identifier: GPL-2.0
#include <linux/debugfs.h>
#include <linux/export.h>
#include <linux/init.h>
struct dentry *arch_debugfs_dir;
EXPORT_SYMBOL(arch_debugfs_dir);
static int __init arch_kdebugfs_init(void)
{
arch_debugfs_dir = debugfs_create_dir("powerpc", NULL);
return 0;
}
arch_initcall(arch_kdebugfs_init);
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
#include <linux/nospec.h> #include <linux/nospec.h>
#include <linux/prctl.h> #include <linux/prctl.h>
#include <linux/seq_buf.h> #include <linux/seq_buf.h>
#include <linux/debugfs.h>
#include <asm/asm-prototypes.h> #include <asm/asm-prototypes.h>
#include <asm/code-patching.h> #include <asm/code-patching.h>
#include <asm/debugfs.h>
#include <asm/security_features.h> #include <asm/security_features.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/inst.h> #include <asm/inst.h>
...@@ -106,7 +106,7 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_barrier_nospec, barrier_nospec_get, ...@@ -106,7 +106,7 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_barrier_nospec, barrier_nospec_get,
static __init int barrier_nospec_debugfs_init(void) static __init int barrier_nospec_debugfs_init(void)
{ {
debugfs_create_file_unsafe("barrier_nospec", 0600, debugfs_create_file_unsafe("barrier_nospec", 0600,
powerpc_debugfs_root, NULL, arch_debugfs_dir, NULL,
&fops_barrier_nospec); &fops_barrier_nospec);
return 0; return 0;
} }
...@@ -114,7 +114,7 @@ device_initcall(barrier_nospec_debugfs_init); ...@@ -114,7 +114,7 @@ device_initcall(barrier_nospec_debugfs_init);
static __init int security_feature_debugfs_init(void) static __init int security_feature_debugfs_init(void)
{ {
debugfs_create_x64("security_features", 0400, powerpc_debugfs_root, debugfs_create_x64("security_features", 0400, arch_debugfs_dir,
&powerpc_security_features); &powerpc_security_features);
return 0; return 0;
} }
...@@ -420,7 +420,7 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_stf_barrier, stf_barrier_get, stf_barrier_set, ...@@ -420,7 +420,7 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_stf_barrier, stf_barrier_get, stf_barrier_set,
static __init int stf_barrier_debugfs_init(void) static __init int stf_barrier_debugfs_init(void)
{ {
debugfs_create_file_unsafe("stf_barrier", 0600, powerpc_debugfs_root, debugfs_create_file_unsafe("stf_barrier", 0600, arch_debugfs_dir,
NULL, &fops_stf_barrier); NULL, &fops_stf_barrier);
return 0; return 0;
} }
...@@ -748,7 +748,7 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_count_cache_flush, count_cache_flush_get, ...@@ -748,7 +748,7 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_count_cache_flush, count_cache_flush_get,
static __init int count_cache_flush_debugfs_init(void) static __init int count_cache_flush_debugfs_init(void)
{ {
debugfs_create_file_unsafe("count_cache_flush", 0600, debugfs_create_file_unsafe("count_cache_flush", 0600,
powerpc_debugfs_root, NULL, arch_debugfs_dir, NULL,
&fops_count_cache_flush); &fops_count_cache_flush);
return 0; return 0;
} }
...@@ -834,9 +834,9 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_uaccess_flush, uaccess_flush_get, uaccess_flush_set ...@@ -834,9 +834,9 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_uaccess_flush, uaccess_flush_get, uaccess_flush_set
static __init int rfi_flush_debugfs_init(void) static __init int rfi_flush_debugfs_init(void)
{ {
debugfs_create_file("rfi_flush", 0600, powerpc_debugfs_root, NULL, &fops_rfi_flush); debugfs_create_file("rfi_flush", 0600, arch_debugfs_dir, NULL, &fops_rfi_flush);
debugfs_create_file("entry_flush", 0600, powerpc_debugfs_root, NULL, &fops_entry_flush); debugfs_create_file("entry_flush", 0600, arch_debugfs_dir, NULL, &fops_entry_flush);
debugfs_create_file("uaccess_flush", 0600, powerpc_debugfs_root, NULL, &fops_uaccess_flush); debugfs_create_file("uaccess_flush", 0600, arch_debugfs_dir, NULL, &fops_uaccess_flush);
return 0; return 0;
} }
device_initcall(rfi_flush_debugfs_init); device_initcall(rfi_flush_debugfs_init);
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/hugetlb.h> #include <linux/hugetlb.h>
#include <linux/pgtable.h> #include <linux/pgtable.h>
#include <asm/debugfs.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/paca.h> #include <asm/paca.h>
#include <asm/prom.h> #include <asm/prom.h>
...@@ -773,18 +772,6 @@ static int __init check_cache_coherency(void) ...@@ -773,18 +772,6 @@ static int __init check_cache_coherency(void)
late_initcall(check_cache_coherency); late_initcall(check_cache_coherency);
#endif /* CONFIG_CHECK_CACHE_COHERENCY */ #endif /* CONFIG_CHECK_CACHE_COHERENCY */
#ifdef CONFIG_DEBUG_FS
struct dentry *powerpc_debugfs_root;
EXPORT_SYMBOL(powerpc_debugfs_root);
static int powerpc_debugfs_init(void)
{
powerpc_debugfs_root = debugfs_create_dir("powerpc", NULL);
return 0;
}
arch_initcall(powerpc_debugfs_init);
#endif
void ppc_printk_progress(char *s, unsigned short hex) void ppc_printk_progress(char *s, unsigned short hex)
{ {
pr_info("%s\n", s); pr_info("%s\n", s);
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <linux/nmi.h> #include <linux/nmi.h>
#include <linux/pgtable.h> #include <linux/pgtable.h>
#include <asm/debugfs.h>
#include <asm/kvm_guest.h> #include <asm/kvm_guest.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/kdump.h> #include <asm/kdump.h>
......
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/kmsg_dump.h> #include <linux/kmsg_dump.h>
#include <linux/debugfs.h>
#include <asm/emulated_ops.h> #include <asm/emulated_ops.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/debugfs.h>
#include <asm/interrupt.h> #include <asm/interrupt.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/machdep.h> #include <asm/machdep.h>
...@@ -2267,7 +2267,7 @@ static int __init ppc_warn_emulated_init(void) ...@@ -2267,7 +2267,7 @@ static int __init ppc_warn_emulated_init(void)
struct ppc_emulated_entry *entries = (void *)&ppc_emulated; struct ppc_emulated_entry *entries = (void *)&ppc_emulated;
dir = debugfs_create_dir("emulated_instructions", dir = debugfs_create_dir("emulated_instructions",
powerpc_debugfs_root); arch_debugfs_dir);
debugfs_create_u32("do_warn", 0644, dir, &ppc_warn_emulated); debugfs_create_u32("do_warn", 0644, dir, &ppc_warn_emulated);
......
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/anon_inodes.h> #include <linux/anon_inodes.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/debugfs.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/kvm_book3s.h> #include <asm/kvm_book3s.h>
#include <asm/kvm_ppc.h> #include <asm/kvm_ppc.h>
#include <asm/hvcall.h> #include <asm/hvcall.h>
#include <asm/xics.h> #include <asm/xics.h>
#include <asm/debugfs.h>
#include <asm/time.h> #include <asm/time.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
...@@ -1024,7 +1024,7 @@ static void xics_debugfs_init(struct kvmppc_xics *xics) ...@@ -1024,7 +1024,7 @@ static void xics_debugfs_init(struct kvmppc_xics *xics)
return; return;
} }
xics->dentry = debugfs_create_file(name, 0444, powerpc_debugfs_root, xics->dentry = debugfs_create_file(name, 0444, arch_debugfs_dir,
xics, &xics_debug_fops); xics, &xics_debug_fops);
pr_debug("%s: created %s\n", __func__, name); pr_debug("%s: created %s\n", __func__, name);
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <asm/xive.h> #include <asm/xive.h>
#include <asm/xive-regs.h> #include <asm/xive-regs.h>
#include <asm/debug.h> #include <asm/debug.h>
#include <asm/debugfs.h>
#include <asm/time.h> #include <asm/time.h>
#include <asm/opal.h> #include <asm/opal.h>
...@@ -2360,7 +2359,7 @@ static void xive_debugfs_init(struct kvmppc_xive *xive) ...@@ -2360,7 +2359,7 @@ static void xive_debugfs_init(struct kvmppc_xive *xive)
return; return;
} }
xive->dentry = debugfs_create_file(name, S_IRUGO, powerpc_debugfs_root, xive->dentry = debugfs_create_file(name, S_IRUGO, arch_debugfs_dir,
xive, &xive_debug_fops); xive, &xive_debug_fops);
pr_debug("%s: created %s\n", __func__, name); pr_debug("%s: created %s\n", __func__, name);
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <asm/xive.h> #include <asm/xive.h>
#include <asm/xive-regs.h> #include <asm/xive-regs.h>
#include <asm/debug.h> #include <asm/debug.h>
#include <asm/debugfs.h>
#include <asm/opal.h> #include <asm/opal.h>
#include <linux/debugfs.h> #include <linux/debugfs.h>
...@@ -1268,7 +1267,7 @@ static void xive_native_debugfs_init(struct kvmppc_xive *xive) ...@@ -1268,7 +1267,7 @@ static void xive_native_debugfs_init(struct kvmppc_xive *xive)
return; return;
} }
xive->dentry = debugfs_create_file(name, 0444, powerpc_debugfs_root, xive->dentry = debugfs_create_file(name, 0444, arch_debugfs_dir,
xive, &xive_native_debug_fops); xive, &xive_native_debug_fops);
pr_debug("%s: created %s\n", __func__, name); pr_debug("%s: created %s\n", __func__, name);
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
#include <linux/hugetlb.h> #include <linux/hugetlb.h>
#include <linux/cpu.h> #include <linux/cpu.h>
#include <linux/pgtable.h> #include <linux/pgtable.h>
#include <linux/debugfs.h>
#include <asm/debugfs.h>
#include <asm/interrupt.h> #include <asm/interrupt.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/mmu.h> #include <asm/mmu.h>
...@@ -2072,7 +2072,7 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_hpt_order, hpt_order_get, hpt_order_set, "%llu\n") ...@@ -2072,7 +2072,7 @@ DEFINE_DEBUGFS_ATTRIBUTE(fops_hpt_order, hpt_order_get, hpt_order_set, "%llu\n")
static int __init hash64_debugfs(void) static int __init hash64_debugfs(void)
{ {
debugfs_create_file("hpt_order", 0600, powerpc_debugfs_root, NULL, debugfs_create_file("hpt_order", 0600, arch_debugfs_dir, NULL,
&fops_hpt_order); &fops_hpt_order);
return 0; return 0;
} }
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/mm_types.h> #include <linux/mm_types.h>
#include <linux/memblock.h> #include <linux/memblock.h>
#include <linux/debugfs.h>
#include <misc/cxl-base.h> #include <misc/cxl-base.h>
#include <asm/debugfs.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/tlb.h> #include <asm/tlb.h>
#include <asm/trace.h> #include <asm/trace.h>
...@@ -520,7 +520,7 @@ static int __init pgtable_debugfs_setup(void) ...@@ -520,7 +520,7 @@ static int __init pgtable_debugfs_setup(void)
* invalidated as expected. * invalidated as expected.
*/ */
debugfs_create_bool("tlbie_enabled", 0600, debugfs_create_bool("tlbie_enabled", 0600,
powerpc_debugfs_root, arch_debugfs_dir,
&tlbie_enabled); &tlbie_enabled);
return 0; return 0;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/memblock.h> #include <linux/memblock.h>
#include <linux/mmu_context.h> #include <linux/mmu_context.h>
#include <linux/sched/mm.h> #include <linux/sched/mm.h>
#include <linux/debugfs.h>
#include <asm/ppc-opcode.h> #include <asm/ppc-opcode.h>
#include <asm/tlb.h> #include <asm/tlb.h>
...@@ -17,7 +18,6 @@ ...@@ -17,7 +18,6 @@
#include <asm/trace.h> #include <asm/trace.h>
#include <asm/cputhreads.h> #include <asm/cputhreads.h>
#include <asm/plpar_wrappers.h> #include <asm/plpar_wrappers.h>
#include <asm/debugfs.h>
#include "internal.h" #include "internal.h"
...@@ -1529,9 +1529,9 @@ EXPORT_SYMBOL_GPL(do_h_rpt_invalidate_prt); ...@@ -1529,9 +1529,9 @@ EXPORT_SYMBOL_GPL(do_h_rpt_invalidate_prt);
static int __init create_tlb_single_page_flush_ceiling(void) static int __init create_tlb_single_page_flush_ceiling(void)
{ {
debugfs_create_u32("tlb_single_page_flush_ceiling", 0600, debugfs_create_u32("tlb_single_page_flush_ceiling", 0600,
powerpc_debugfs_root, &tlb_single_page_flush_ceiling); arch_debugfs_dir, &tlb_single_page_flush_ceiling);
debugfs_create_u32("tlb_local_single_page_flush_ceiling", 0600, debugfs_create_u32("tlb_local_single_page_flush_ceiling", 0600,
powerpc_debugfs_root, &tlb_local_single_page_flush_ceiling); arch_debugfs_dir, &tlb_local_single_page_flush_ceiling);
return 0; return 0;
} }
late_initcall(create_tlb_single_page_flush_ceiling); late_initcall(create_tlb_single_page_flush_ceiling);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*/ */
#include <linux/pgtable.h> #include <linux/pgtable.h>
#include <asm/debugfs.h> #include <linux/debugfs.h>
#include <asm/cpu_has_feature.h> #include <asm/cpu_has_feature.h>
#include "ptdump.h" #include "ptdump.h"
...@@ -103,7 +103,7 @@ static const struct file_operations bats_fops = { ...@@ -103,7 +103,7 @@ static const struct file_operations bats_fops = {
static int __init bats_init(void) static int __init bats_init(void)
{ {
debugfs_create_file("block_address_translation", 0400, debugfs_create_file("block_address_translation", 0400,
powerpc_debugfs_root, NULL, &bats_fops); arch_debugfs_dir, NULL, &bats_fops);
return 0; return 0;
} }
device_initcall(bats_init); device_initcall(bats_init);
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* This dumps the content of Segment Registers * This dumps the content of Segment Registers
*/ */
#include <asm/debugfs.h> #include <linux/debugfs.h>
static void seg_show(struct seq_file *m, int i) static void seg_show(struct seq_file *m, int i)
{ {
...@@ -55,7 +55,7 @@ static const struct file_operations sr_fops = { ...@@ -55,7 +55,7 @@ static const struct file_operations sr_fops = {
static int __init sr_init(void) static int __init sr_init(void)
{ {
debugfs_create_file("segment_registers", 0400, powerpc_debugfs_root, debugfs_create_file("segment_registers", 0400, arch_debugfs_dir,
NULL, &sr_fops); NULL, &sr_fops);
return 0; return 0;
} }
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
#include <linux/export.h> #include <linux/export.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/debugfs.h>
#include <asm/debugfs.h>
#include <asm/dcr.h> #include <asm/dcr.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/prom.h> #include <asm/prom.h>
...@@ -480,6 +480,6 @@ void axon_msi_debug_setup(struct device_node *dn, struct axon_msic *msic) ...@@ -480,6 +480,6 @@ void axon_msi_debug_setup(struct device_node *dn, struct axon_msic *msic)
snprintf(name, sizeof(name), "msic_%d", of_node_to_nid(dn)); snprintf(name, sizeof(name), "msic_%d", of_node_to_nid(dn));
debugfs_create_file(name, 0600, powerpc_debugfs_root, msic, &fops_msic); debugfs_create_file(name, 0600, arch_debugfs_dir, msic, &fops_msic);
} }
#endif /* DEBUG */ #endif /* DEBUG */
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <linux/memory_hotplug.h> #include <linux/memory_hotplug.h>
#include <linux/numa.h> #include <linux/numa.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/debugfs.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
/* This enables us to keep track of the memory removed from each node. */ /* This enables us to keep track of the memory removed from each node. */
...@@ -330,7 +329,7 @@ DEFINE_SIMPLE_ATTRIBUTE(memtrace_init_fops, memtrace_enable_get, ...@@ -330,7 +329,7 @@ DEFINE_SIMPLE_ATTRIBUTE(memtrace_init_fops, memtrace_enable_get,
static int memtrace_init(void) static int memtrace_init(void)
{ {
memtrace_debugfs_dir = debugfs_create_dir("memtrace", memtrace_debugfs_dir = debugfs_create_dir("memtrace",
powerpc_debugfs_root); arch_debugfs_dir);
debugfs_create_file("enable", 0600, memtrace_debugfs_dir, debugfs_create_file("enable", 0600, memtrace_debugfs_dir,
NULL, &memtrace_init_fops); NULL, &memtrace_init_fops);
......
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/crash_dump.h> #include <linux/crash_dump.h>
#include <linux/debugfs.h>
#include <asm/opal.h> #include <asm/opal.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/imc-pmu.h> #include <asm/imc-pmu.h>
#include <asm/cputhreads.h> #include <asm/cputhreads.h>
#include <asm/debugfs.h>
static struct dentry *imc_debugfs_parent; static struct dentry *imc_debugfs_parent;
...@@ -56,7 +56,7 @@ static void export_imc_mode_and_cmd(struct device_node *node, ...@@ -56,7 +56,7 @@ static void export_imc_mode_and_cmd(struct device_node *node,
u32 cb_offset; u32 cb_offset;
struct imc_mem_info *ptr = pmu_ptr->mem_info; struct imc_mem_info *ptr = pmu_ptr->mem_info;
imc_debugfs_parent = debugfs_create_dir("imc", powerpc_debugfs_root); imc_debugfs_parent = debugfs_create_dir("imc", arch_debugfs_dir);
if (of_property_read_u32(node, "cb_offset", &cb_offset)) if (of_property_read_u32(node, "cb_offset", &cb_offset))
cb_offset = IMC_CNTL_BLK_OFFSET; cb_offset = IMC_CNTL_BLK_OFFSET;
......
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
#include <linux/bug.h> #include <linux/bug.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/debugfs.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/firmware.h> #include <asm/firmware.h>
#include <asm/opal.h> #include <asm/opal.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/debugfs.h>
#include <asm/isa-bridge.h> #include <asm/isa-bridge.h>
static int opal_lpc_chip_id = -1; static int opal_lpc_chip_id = -1;
...@@ -371,7 +371,7 @@ static int opal_lpc_init_debugfs(void) ...@@ -371,7 +371,7 @@ static int opal_lpc_init_debugfs(void)
if (opal_lpc_chip_id < 0) if (opal_lpc_chip_id < 0)
return -ENODEV; return -ENODEV;
root = debugfs_create_dir("lpc", powerpc_debugfs_root); root = debugfs_create_dir("lpc", arch_debugfs_dir);
rc |= opal_lpc_debugfs_create_type(root, "io", OPAL_LPC_IO); rc |= opal_lpc_debugfs_create_type(root, "io", OPAL_LPC_IO);
rc |= opal_lpc_debugfs_create_type(root, "mem", OPAL_LPC_MEM); rc |= opal_lpc_debugfs_create_type(root, "mem", OPAL_LPC_MEM);
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/debugfs.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/firmware.h> #include <asm/firmware.h>
#include <asm/opal.h> #include <asm/opal.h>
#include <asm/debugfs.h>
#include <asm/prom.h> #include <asm/prom.h>
static u64 opal_scom_unmangle(u64 addr) static u64 opal_scom_unmangle(u64 addr)
...@@ -189,7 +189,7 @@ static int scom_debug_init(void) ...@@ -189,7 +189,7 @@ static int scom_debug_init(void)
if (!firmware_has_feature(FW_FEATURE_OPAL)) if (!firmware_has_feature(FW_FEATURE_OPAL))
return 0; return 0;
root = debugfs_create_dir("scom", powerpc_debugfs_root); root = debugfs_create_dir("scom", arch_debugfs_dir);
if (!root) if (!root)
return -1; return -1;
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/iommu.h> #include <linux/iommu.h>
#include <linux/rculist.h> #include <linux/rculist.h>
#include <linux/sizes.h> #include <linux/sizes.h>
#include <linux/debugfs.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -32,7 +33,6 @@ ...@@ -32,7 +33,6 @@
#include <asm/iommu.h> #include <asm/iommu.h>
#include <asm/tce.h> #include <asm/tce.h>
#include <asm/xics.h> #include <asm/xics.h>
#include <asm/debugfs.h>
#include <asm/firmware.h> #include <asm/firmware.h>
#include <asm/pnv-pci.h> #include <asm/pnv-pci.h>
#include <asm/mmzone.h> #include <asm/mmzone.h>
...@@ -2475,7 +2475,7 @@ static void pnv_pci_ioda_create_dbgfs(void) ...@@ -2475,7 +2475,7 @@ static void pnv_pci_ioda_create_dbgfs(void)
phb = hose->private_data; phb = hose->private_data;
sprintf(name, "PCI%04x", hose->global_number); sprintf(name, "PCI%04x", hose->global_number);
phb->dbgfs = debugfs_create_dir(name, powerpc_debugfs_root); phb->dbgfs = debugfs_create_dir(name, arch_debugfs_dir);
debugfs_create_file_unsafe("dump_diag_regs", 0200, phb->dbgfs, debugfs_create_file_unsafe("dump_diag_regs", 0200, phb->dbgfs,
phb, &pnv_pci_diag_data_fops); phb, &pnv_pci_diag_data_fops);
......
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/smp.h> #include <asm/smp.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/debugfs.h>
#include <asm/firmware.h> #include <asm/firmware.h>
#include <asm/dtl.h> #include <asm/dtl.h>
#include <asm/lppaca.h> #include <asm/lppaca.h>
#include <asm/debugfs.h>
#include <asm/plpar_wrappers.h> #include <asm/plpar_wrappers.h>
#include <asm/machdep.h> #include <asm/machdep.h>
...@@ -338,7 +338,7 @@ static int dtl_init(void) ...@@ -338,7 +338,7 @@ static int dtl_init(void)
/* set up common debugfs structure */ /* set up common debugfs structure */
dtl_dir = debugfs_create_dir("dtl", powerpc_debugfs_root); dtl_dir = debugfs_create_dir("dtl", arch_debugfs_dir);
debugfs_create_x8("dtl_event_mask", 0600, dtl_dir, &dtl_event_mask); debugfs_create_x8("dtl_event_mask", 0600, dtl_dir, &dtl_event_mask);
debugfs_create_u32("dtl_buf_entries", 0400, dtl_dir, &dtl_buf_entries); debugfs_create_u32("dtl_buf_entries", 0400, dtl_dir, &dtl_buf_entries);
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/pgtable.h> #include <linux/pgtable.h>
#include <linux/debugfs.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/mmu.h> #include <asm/mmu.h>
#include <asm/page.h> #include <asm/page.h>
...@@ -39,7 +41,6 @@ ...@@ -39,7 +41,6 @@
#include <asm/kexec.h> #include <asm/kexec.h>
#include <asm/fadump.h> #include <asm/fadump.h>
#include <asm/asm-prototypes.h> #include <asm/asm-prototypes.h>
#include <asm/debugfs.h>
#include <asm/dtl.h> #include <asm/dtl.h>
#include "pseries.h" #include "pseries.h"
...@@ -2019,7 +2020,7 @@ static int __init vpa_debugfs_init(void) ...@@ -2019,7 +2020,7 @@ static int __init vpa_debugfs_init(void)
if (!firmware_has_feature(FW_FEATURE_SPLPAR)) if (!firmware_has_feature(FW_FEATURE_SPLPAR))
return 0; return 0;
vpa_dir = debugfs_create_dir("vpa", powerpc_debugfs_root); vpa_dir = debugfs_create_dir("vpa", arch_debugfs_dir);
/* set up the per-cpu vpa file*/ /* set up the per-cpu vpa file*/
for_each_possible_cpu(i) { for_each_possible_cpu(i) {
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <linux/msi.h> #include <linux/msi.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <asm/debugfs.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/smp.h> #include <asm/smp.h>
...@@ -1769,7 +1768,7 @@ DEFINE_SHOW_ATTRIBUTE(xive_core_debug); ...@@ -1769,7 +1768,7 @@ DEFINE_SHOW_ATTRIBUTE(xive_core_debug);
int xive_core_debug_init(void) int xive_core_debug_init(void)
{ {
if (xive_enabled()) if (xive_enabled())
debugfs_create_file("xive", 0400, powerpc_debugfs_root, debugfs_create_file("xive", 0400, arch_debugfs_dir,
NULL, &xive_core_debug_fops); NULL, &xive_core_debug_fops);
return 0; return 0;
} }
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/highmem.h> #include <linux/highmem.h>
#include <linux/security.h> #include <linux/security.h>
#include <linux/debugfs.h>
#include <asm/debugfs.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/smp.h> #include <asm/smp.h>
#include <asm/string.h> #include <asm/string.h>
...@@ -4077,8 +4077,8 @@ DEFINE_SIMPLE_ATTRIBUTE(xmon_dbgfs_ops, xmon_dbgfs_get, ...@@ -4077,8 +4077,8 @@ DEFINE_SIMPLE_ATTRIBUTE(xmon_dbgfs_ops, xmon_dbgfs_get,
static int __init setup_xmon_dbgfs(void) static int __init setup_xmon_dbgfs(void)
{ {
debugfs_create_file("xmon", 0600, powerpc_debugfs_root, NULL, debugfs_create_file("xmon", 0600, arch_debugfs_dir, NULL,
&xmon_dbgfs_ops); &xmon_dbgfs_ops);
return 0; return 0;
} }
device_initcall(setup_xmon_dbgfs); device_initcall(setup_xmon_dbgfs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment