Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75dcfc1d authored by Paul Burton's avatar Paul Burton Committed by Ralf Baechle
Browse files

MIPS: Declare mips_debugfs_dir in a header



We have many extern declarations of mips_debugfs_dir through arch/mips/
in various C files. Unify them by declaring mips_debugfs_dir in a
header, including it in each affected C file & removing the duplicate
declarations.

Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-kernel@vger.kernel.org
Cc: Joe Perches <joe@perches.com>
Cc: Jaedon Shin <jaedon.shin@gmail.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: David Daney <david.daney@cavium.com>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: James Cowgill <James.Cowgill@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/11181/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 4d035516
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 Imagination Technologies
 *
 * 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.
 */

#ifndef __MIPS_ASM_DEBUG_H__
#define __MIPS_ASM_DEBUG_H__

#include <linux/dcache.h>

/*
 * mips_debugfs_dir corresponds to the "mips" directory at the top level
 * of the DebugFS hierarchy. MIPS-specific DebugFS entires should be
 * placed beneath this directory.
 */
extern struct dentry *mips_debugfs_dir;

#endif /* __MIPS_ASM_DEBUG_H__ */
+1 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include <asm/asm.h>
#include <asm/branch.h>
#include <asm/break.h>
#include <asm/debug.h>
#include <asm/fpu.h>
#include <asm/fpu_emulator.h>
#include <asm/inst.h>
@@ -2363,7 +2364,6 @@ static const struct file_operations mipsr2_clear_fops = {

static int __init mipsr2_init_debugfs(void)
{
	extern struct dentry	*mips_debugfs_dir;
	struct dentry		*mipsr2_emul;

	if (!mips_debugfs_dir)
+1 −1
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <asm/cpu.h>
#include <asm/debug.h>
#include <asm/mipsregs.h>

static void build_segment_config(char *str, unsigned int cfg)
@@ -91,7 +92,6 @@ static const struct file_operations segments_fops = {

static int __init segments_info(void)
{
	extern struct dentry *mips_debugfs_dir;
	struct dentry *segments;

	if (cpu_has_segments) {
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#include <asm/cache.h>
#include <asm/cdmm.h>
#include <asm/cpu.h>
#include <asm/debug.h>
#include <asm/sections.h>
#include <asm/setup.h>
#include <asm/smp-ops.h>
+1 −3
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
#include <linux/debugfs.h>
#include <linux/export.h>
#include <linux/spinlock.h>

#include <asm/debug.h>

static int ss_get(void *data, u64 *val)
{
@@ -115,8 +115,6 @@ static int multi_get(void *data, u64 *val)

DEFINE_SIMPLE_ATTRIBUTE(fops_multi, multi_get, NULL, "%llu\n");


extern struct dentry *mips_debugfs_dir;
static int __init spinlock_test(void)
{
	struct dentry *d;
Loading