Re: [PATCH 1/3] ARM: Create an ARM debugfs root.

Tony Lindgren
2008-04-22T19:18:30Z

* Hiroshi DOYU <Hiroshi.DOYU@nokia.com> [080422 00:17]:
> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> ---
> arch/arm/kernel/setup.c | 14 ++++++++++++++
> include/asm-arm/system.h | 2 ++
> 2 files changed, 16 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index b7b0720..1b1e6e4 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -24,6 +24,7 @@
> #include <linux/interrupt.h>
> #include <linux/smp.h>
> #include <linux/fs.h>
> +#include <linux/debugfs.h>
>
> #include <asm/cpu.h>
> #include <asm/elf.h>
> @@ -1007,3 +1008,16 @@ const struct seq_operations cpuinfo_op = {
> .stop = c_stop,
> .show = c_show
> };
> +
> +#ifdef CONFIG_DEBUG_FS
> +struct dentry *arm_debugfs_root;
> +static int __init arm_debugfs_init(void)
> +{
> + arm_debugfs_root = debugfs_create_dir("arm", NULL);
> + if (IS_ERR(arm_debugfs_root))
> + return PTR_ERR(arm_debugfs_root);
> +
> + return 0;
> +}
> +arch_initcall(arm_debugfs_init);
> +#endif
> diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
> index 6335de9..a6be185 100644
> --- a/include/asm-arm/system.h
> +++ b/include/asm-arm/system.h
> @@ -378,6 +378,8 @@ extern void enable_hlt(void);
> #include <asm-generic/cmpxchg.h>
> #endif
>
> +extern struct dentry *arm_debugfs_root;
> +
> #endif /* __ASSEMBLY__ */
>
> #define arch_align_stack(x) (x)
> --
> 1.5.5.rc2.6.gf58d

This one should be discussed first on the linux-arm-kernel list.

Tony