From: Jin Dongming <jin.dongming@np.css.fujitsu.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: "H.Peter Anvin" <hpa@zytor.com>,
LKLM <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Huang Ying <ying.huang@intel.com>,
Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Subject: Re: [PATCH] x86, mce: cleanup initcall of debugfs for mce
Date: Wed, 05 Aug 2009 18:01:02 +0900 [thread overview]
Message-ID: <4A794A4E.2060802@np.css.fujitsu.com> (raw)
In-Reply-To: <4A77FCCC.7040608@linux.intel.com>
Andi Kleen wrote:
>
> Sorry but I think it's better to have an own initcall per file,
> that makes everything more self contained and easier to read.
>
> -Andi
>
Thank you for your comment.
That's OK, but this patch is also used for resolving compile error
without CONFIG_DEBUG_FS. Then how about this patch?
Best regards,
Jin Dongming
===
[PATCH] x86,mce: Add ifdef for severities_debugfs_init()
This patch is made based on the v5 patches of Huangying for mce.
Before using this patch, please apply the patches of Huangying.
The patches' URLs of Huangying are listed as following:
1.x86: MCE: Support specifying context for software mce injection
URL: http://marc.info/?l=linux-kernel&m=124900459100786&w=2
2.x86: MCE: Support specifying raise mode for software MCE injection
URL: http://marc.info/?l=linux-kernel&m=124900459100795&w=2
3.x86: MCE: Move debugfs mce dir creating to mce.c
URL: http://marc.info/?l=linux-kernel&m=124900459100790&w=2
4.x86: MCE: Fake panic support for MCE testing
URL: http://marc.info/?l=linux-kernel&m=124900453800724&w=2
When the kernel is compiled without CONFIG_DEBUG_FS, compiler could
not find out mce_get_debugfs_dir() which is used by
severities_debugfs_init() and output the error message.
This version is based x86-tip/mce.
Signed-off-by: Jin Dongming <jin.dongming@np.css.fujitsu.com>
Reviewed-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
---
arch/x86/kernel/cpu/mcheck/mce-internal.h | 3 +++
arch/x86/kernel/cpu/mcheck/mce-severity.c | 2 ++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce-internal.h b/arch/x86/kernel/cpu/mcheck/mce-internal.h
index 32996f9..58b01d4 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-internal.h
+++ b/arch/x86/kernel/cpu/mcheck/mce-internal.h
@@ -22,7 +22,10 @@ struct mce_bank {
};
int mce_severity(struct mce *a, int tolerant, char **msg);
+
+#ifdef CONFIG_DEBUG_FS
struct dentry *mce_get_debugfs_dir(void);
+#endif
extern int mce_ser;
diff --git a/arch/x86/kernel/cpu/mcheck/mce-severity.c b/arch/x86/kernel/cpu/mcheck/mce-severity.c
index bc35a07..8a85dd1 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-severity.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-severity.c
@@ -139,6 +139,7 @@ int mce_severity(struct mce *a, int tolerant, char **msg)
}
}
+#ifdef CONFIG_DEBUG_FS
static void *s_start(struct seq_file *f, loff_t *pos)
{
if (*pos >= ARRAY_SIZE(severities))
@@ -212,3 +213,4 @@ err_out:
return -ENOMEM;
}
late_initcall(severities_debugfs_init);
+#endif
--
1.6.2.2
next prev parent reply other threads:[~2009-08-05 9:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-04 6:01 [PATCH] x86, mce: cleanup initcall of debugfs for mce Jin Dongming
2009-08-04 9:18 ` Andi Kleen
2009-08-05 9:01 ` Jin Dongming [this message]
2009-08-05 12:48 ` Andi Kleen
2009-08-06 0:22 ` Hidetoshi Seto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A794A4E.2060802@np.css.fujitsu.com \
--to=jin.dongming@np.css.fujitsu.com \
--cc=ak@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kaneshige.kenji@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox