Skip to content

Commit

Permalink
powerpc: Create asm/debugfs.h and move powerpc_debugfs_root there
Browse files Browse the repository at this point in the history
powerpc_debugfs_root is the dentry representing the root of the
"powerpc" directory tree in debugfs.

Currently it sits in asm/debug.h, a long with some other things that
have "debug" in the name, but are otherwise unrelated.

Pull it out into a separate header, which also includes linux/debugfs.h,
and convert all the users to include debugfs.h instead of debug.h.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
mpe committed Apr 10, 2017
1 parent abfe802 commit 7644d58
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 24 deletions.
2 changes: 0 additions & 2 deletions arch/powerpc/include/asm/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

struct pt_regs;

extern struct dentry *powerpc_debugfs_root;

#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC_CORE)

extern int (*__debugger)(struct pt_regs *regs);
Expand Down
17 changes: 17 additions & 0 deletions arch/powerpc/include/asm/debugfs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#ifndef _ASM_POWERPC_DEBUGFS_H
#define _ASM_POWERPC_DEBUGFS_H

/*
* Copyright 2017, Michael Ellerman, IBM Corporation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/

#include <linux/debugfs.h>

extern struct dentry *powerpc_debugfs_root;

#endif /* _ASM_POWERPC_DEBUGFS_H */
3 changes: 1 addition & 2 deletions arch/powerpc/kernel/eeh.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
*/

#include <linux/delay.h>
#include <linux/debugfs.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/list.h>
Expand All @@ -37,7 +36,7 @@
#include <linux/of.h>

#include <linux/atomic.h>
#include <asm/debug.h>
#include <asm/debugfs.h>
#include <asm/eeh.h>
#include <asm/eeh_event.h>
#include <asm/io.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/fadump.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
#include <linux/string.h>
#include <linux/memblock.h>
#include <linux/delay.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/crash_dump.h>
#include <linux/kobject.h>
#include <linux/sysfs.h>

#include <asm/debugfs.h>
#include <asm/page.h>
#include <asm/prom.h>
#include <asm/rtas.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/setup-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
#include <linux/unistd.h>
#include <linux/serial.h>
#include <linux/serial_8250.h>
#include <linux/debugfs.h>
#include <linux/percpu.h>
#include <linux/memblock.h>
#include <linux/of_platform.h>
#include <linux/hugetlb.h>
#include <asm/debugfs.h>
#include <asm/io.h>
#include <asm/paca.h>
#include <asm/prom.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
#include <linux/backlight.h>
#include <linux/bug.h>
#include <linux/kdebug.h>
#include <linux/debugfs.h>
#include <linux/ratelimit.h>
#include <linux/context_tracking.h>

#include <asm/emulated_ops.h>
#include <asm/pgtable.h>
#include <linux/uaccess.h>
#include <asm/debugfs.h>
#include <asm/io.h>
#include <asm/machdep.h>
#include <asm/rtas.h>
Expand Down
3 changes: 1 addition & 2 deletions arch/powerpc/kvm/book3s_xics.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
#include <asm/kvm_ppc.h>
#include <asm/hvcall.h>
#include <asm/xics.h>
#include <asm/debug.h>
#include <asm/debugfs.h>
#include <asm/time.h>

#include <linux/debugfs.h>
#include <linux/seq_file.h>

#include "book3s_xics.h"
Expand Down
3 changes: 1 addition & 2 deletions arch/powerpc/mm/hash_utils_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
#include <linux/memblock.h>
#include <linux/context_tracking.h>
#include <linux/libfdt.h>
#include <linux/debugfs.h>

#include <asm/debug.h>
#include <asm/debugfs.h>
#include <asm/processor.h>
#include <asm/pgtable.h>
#include <asm/mmu.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/cell/axon_msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#include <linux/msi.h>
#include <linux/export.h>
#include <linux/of_platform.h>
#include <linux/debugfs.h>
#include <linux/slab.h>

#include <asm/debugfs.h>
#include <asm/dcr.h>
#include <asm/machdep.h>
#include <asm/prom.h>
Expand Down
3 changes: 1 addition & 2 deletions arch/powerpc/platforms/powernv/opal-lpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/bug.h>
#include <linux/debugfs.h>
#include <linux/io.h>
#include <linux/slab.h>

Expand All @@ -21,7 +20,7 @@
#include <asm/opal.h>
#include <asm/prom.h>
#include <linux/uaccess.h>
#include <asm/debug.h>
#include <asm/debugfs.h>
#include <asm/isa-bridge.h>

static int opal_lpc_chip_id = -1;
Expand Down
3 changes: 1 addition & 2 deletions arch/powerpc/platforms/powernv/pci-ioda.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/crash_dump.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/string.h>
#include <linux/init.h>
Expand All @@ -38,7 +37,7 @@
#include <asm/iommu.h>
#include <asm/tce.h>
#include <asm/xics.h>
#include <asm/debug.h>
#include <asm/debugfs.h>
#include <asm/firmware.h>
#include <asm/pnv-pci.h>
#include <asm/mmzone.h>
Expand Down
3 changes: 1 addition & 2 deletions arch/powerpc/platforms/pseries/dtl.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@
*/

#include <linux/slab.h>
#include <linux/debugfs.h>
#include <linux/spinlock.h>
#include <asm/smp.h>
#include <linux/uaccess.h>
#include <asm/firmware.h>
#include <asm/lppaca.h>
#include <asm/debug.h>
#include <asm/debugfs.h>
#include <asm/plpar_wrappers.h>
#include <asm/machdep.h>

Expand Down
3 changes: 1 addition & 2 deletions arch/powerpc/sysdev/scom.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
*/

#include <linux/kernel.h>
#include <linux/debugfs.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <asm/debug.h>
#include <asm/debugfs.h>
#include <asm/prom.h>
#include <asm/scom.h>
#include <linux/uaccess.h>
Expand Down
5 changes: 1 addition & 4 deletions arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@
#include <linux/nmi.h>
#include <linux/ctype.h>

#ifdef CONFIG_DEBUG_FS
#include <linux/debugfs.h>
#endif

#include <asm/debugfs.h>
#include <asm/ptrace.h>
#include <asm/string.h>
#include <asm/prom.h>
Expand Down

0 comments on commit 7644d58

Please sign in to comment.