From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Ingo Molnar <mingo@elte.hu>, x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH -tip] x86: cpu_debug.c prepare report if files are inappropriate or CPU is not supported
Date: Tue, 14 Apr 2009 21:37:20 +0530 [thread overview]
Message-ID: <1239725240.2966.4.camel@ht.satnam> (raw)
This will prepare the report to update cpu_debug.
If files are inappropriate or CPU is not supported.
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
arch/x86/kernel/cpu/cpu_debug.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/cpu/cpu_debug.c b/arch/x86/kernel/cpu/cpu_debug.c
index 46e29ab..33fde75 100644
--- a/arch/x86/kernel/cpu/cpu_debug.c
+++ b/arch/x86/kernel/cpu/cpu_debug.c
@@ -30,6 +30,8 @@
#include <asm/apic.h>
#include <asm/desc.h>
+#define EMAIL "<linux-kernel@vger.kernel.org>, <jaswinderrajput@gmail.com>"
+
static DEFINE_PER_CPU(struct cpu_cpuX_base, cpu_arr[CPU_REG_ALL_BIT]);
static DEFINE_PER_CPU(struct cpu_private *, priv_arr[MAX_CPU_FILES]);
static DEFINE_PER_CPU(unsigned, cpu_modelflag);
@@ -838,6 +840,17 @@ static int cpu_init_allreg(unsigned cpu, struct dentry *dentry)
return err;
}
+/*
+ * Prepare report for LKML and maintainer if files count are inappropriate
+ * Or CPU is not supported
+ */
+static void send_report(int files, struct cpuinfo_x86 *cpui)
+{
+ WARN_ONCE(1, "Please report \"cpu_debug files %d for %x:%x:%x:%x\" to"
+ " %s\n", files, cpui->x86_vendor, cpui->x86, cpui->x86_model,
+ cpui->x86_mask, EMAIL);
+}
+
static int cpu_init_cpu(void)
{
struct dentry *cpu_dentry = NULL;
@@ -861,9 +874,13 @@ static int cpu_init_cpu(void)
pr_info("cpu%d(%d) debug files %d\n",
cpu, nr_cpu_ids, per_cpu(cpu_priv_count, cpu));
+ if (!per_cpu(cpu_modelflag, cpu))
+ send_report(per_cpu(cpu_priv_count, cpu), cpui);
+
if (per_cpu(cpu_priv_count, cpu) > MAX_CPU_FILES) {
pr_err("Register files count %d exceeds limit %d\n",
per_cpu(cpu_priv_count, cpu), MAX_CPU_FILES);
+ send_report(per_cpu(cpu_priv_count, cpu), cpui);
per_cpu(cpu_priv_count, cpu) = MAX_CPU_FILES;
err = -ENFILE;
}
--
1.6.0.6
next reply other threads:[~2009-04-14 16:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-14 16:07 Jaswinder Singh Rajput [this message]
2009-04-14 16:50 ` [PATCH -tip] x86: cpu_debug.c prepare report if files are inappropriate or CPU is not supported Ingo Molnar
2009-04-14 17:01 ` Jaswinder Singh Rajput
2009-04-14 18:42 ` Ingo Molnar
2009-04-14 18:54 ` Jaswinder Singh Rajput
2009-04-14 19:02 ` Alan Cox
2009-04-14 19:16 ` Ingo Molnar
2009-04-15 5:34 ` Jaswinder Singh Rajput
2009-04-15 10:17 ` Ingo Molnar
2009-06-05 17:57 ` Jaswinder Singh Rajput
2009-06-06 10:21 ` Jaswinder Singh Rajput
2009-06-07 10:20 ` Ingo Molnar
2009-06-07 12:16 ` [tip:x86/cpu] x86: cpu_debug: Remove model information to reduce encoding-decoding tip-bot for Jaswinder Singh Rajput
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=1239725240.2966.4.camel@ht.satnam \
--to=jaswinder@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@kernel.org \
/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