From: Guenter Roeck <guenter.roeck@ericsson.com>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>,
Andi Kleen <ak@linux.intel.com>,
Jean Delvare <khali@linux-fr.org>,
"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] hwmon: coretemp: fix oops on cpu unplug
Date: Mon, 30 Apr 2012 09:59:24 -0700 [thread overview]
Message-ID: <1335805164.2351.116.camel@groeck-laptop> (raw)
In-Reply-To: <20120430161941.GA3167@otc-wbsnb-06>
On Mon, 2012-04-30 at 12:19 -0400, Kirill A. Shutemov wrote:
> On Mon, Apr 30, 2012 at 08:28:10AM -0700, Guenter Roeck wrote:
> > Hi,
> >
> > good catch. Couple of problems, though.
> >
> > First, what number of cores are we talking about ? We should probably
> > increase NUM_REAL_CORES as well. Long term, we should get rid of the
> > dependency to prevent that problem from happening again, but that is a
> > different issue.
>
> It triggered by another bug. Cores on my 10-core processor have ids 0, 1,
> 2, 8, 9, 16, 17, 18, 24, 25. :-/
> No need to change NUM_REAL_CORES at the moment.
>
The problem, though, is that core_data[] is indexed by the core ID. So,
NUM_REAL_CORES is a bit misleading. It should probably be named
NUM_CORE_ID or something similar.
> > Second, we'll need the same code in get_core_online(). Otherwise the
> > platform device can be created for the new core (if the core is
> > re-enabled) but will never be deleted.
>
> It has already handled in create_core_data().
>
... which is called from coretemp_add_core(), which does not return an
error. Besides, it is called after the call to coretemp_device_add().
As a result, the platform device for the unsupported core(s) will be
created, even if the core is not supported. I just don't think that is a
good idea.
Besides, if you'd have the check in get_core_online(), you would not
even hit the problem in put_core_offline(), since the platform device
would not exist and the function would bail out because of that.
Thanks,
Guenter
next prev parent reply other threads:[~2012-04-30 17:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-30 13:18 Kirill A. Shutemov
2012-04-30 15:28 ` Guenter Roeck
2012-04-30 16:19 ` Kirill A. Shutemov
2012-04-30 16:59 ` Guenter Roeck [this message]
2012-05-01 15:20 ` Guenter Roeck
2012-05-01 21:00 ` Kirill A. Shutemov
2012-05-01 21:25 ` Guenter Roeck
2012-05-02 15:10 ` [PATCH] hwmon: coretemp: use list instead of fixed size array for temp data Kirill A. Shutemov
2012-05-03 5:29 ` [lm-sensors] " R, Durgadoss
2012-05-03 10:04 ` Kirill A. Shutemov
2012-05-03 11:18 ` [PATCH, v2] " Kirill A. Shutemov
2012-05-04 5:41 ` Guenter Roeck
2012-05-04 6:46 ` Kirill A. Shutemov
2012-05-04 13:34 ` Guenter Roeck
2012-05-04 13:42 ` Kirill A. Shutemov
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=1335805164.2351.116.camel@groeck-laptop \
--to=guenter.roeck@ericsson.com \
--cc=ak@linux.intel.com \
--cc=fenghua.yu@intel.com \
--cc=khali@linux-fr.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.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
all inboxes | Powered by JetHome®