public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Tobias Diedrich <ranma+xen@tdiedrich.de>,
	xen-users@lists.xensource.com, linux-kernel@vger.kernel.org
Subject: Re: 3.0.0-rc2: Xen: powernow-k8: Kernel panic - not syncing: Attempted to kill init!
Date: Wed, 15 Jun 2011 08:38:47 -0400	[thread overview]
Message-ID: <20110615123847.GA5512@dumpdata.com> (raw)
In-Reply-To: <20110614212827.GH7417@yumi.tdiedrich.de>

On Tue, Jun 14, 2011 at 11:28:27PM +0200, Tobias Diedrich wrote:
> Konrad Rzeszutek Wilk wrote:
> > On Tue, Jun 14, 2011 at 03:46:34PM +0200, Tobias Diedrich wrote:
> > > [    5.740826] powernow-k8: fid 0x2 (1000 MHz), vid 0x12
> > > [    5.740941] powernow-k8: fid 0xa (1800 MHz), vid 0xa
> > > [    5.741057] powernow-k8: fid 0xc (2000 MHz), vid 0x8
> > > [    5.741170] powernow-k8: fid 0xe (2200 MHz), vid 0x8
> > > [    5.741304] cpufreq_stats_create_table: policy->cur is 800000
> > > [    5.741475] last_index set to -1 in cpufreq_stats_create_table!
> > > 
> > > I think policy->cur used here probably set in powernowk8_cpu_init.
> > 
> > Yup, and there is not much that can be done there. Lets try this patch
> 
> Thanks, this works fine for suppressing the crash.

OK, can you do one more test? Can you reboot the kernel without Xen
and see whether the baremetal kernel still works? Wouldn't want to
cause a regression.

Is it OK if I stick Reported-by/Tested-by: Tobias .. on the patches
for upstream submission?

> 
> > diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
> > index 2368e38..7e4a664 100644
> > --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
> > +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
> > @@ -1079,8 +1079,10 @@ static int transition_frequency_fidvid(struct powernow_k8_data *data,
> >  	}
> >  
> >  	res = transition_fid_vid(data, fid, vid);
> > -	freqs.new = find_khz_freq_from_fid(data->currfid);
> > +	if (res)
> > +		return res;
> >  
> > +	freqs.new = find_khz_freq_from_fid(data->currfid);
> >  	for_each_cpu(i, data->available_cores) {
> >  		freqs.cpu = i;
> >  		cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
> > @@ -1112,6 +1114,9 @@ static int transition_frequency_pstate(struct powernow_k8_data *data,
> >  	}
> >  
> >  	res = transition_pstate(data, pstate);
> > +	if (res)
> > +		return res;
> > +
> >  	freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate);
> >  
> >  	for_each_cpu(i, data->available_cores) {
> > diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
> > index 4f1b8de..0ecb1e2 100644
> > --- a/drivers/cpufreq/cpufreq_stats.c
> > +++ b/drivers/cpufreq/cpufreq_stats.c
> > @@ -298,11 +298,13 @@ static int cpufreq_stat_notifier_trans(struct notifier_block *nb,
> >  	old_index = stat->last_index;
> >  	new_index = freq_table_get_index(stat, freq->new);
> >  
> > -	cpufreq_stats_update(freq->cpu);
> > -	if (old_index == new_index)
> > +	/* We can't do stat->time_in_state[-1]= .. */
> > +	if (old_index == -1 || new_index == -1)
> >  		return 0;
> >  
> > -	if (old_index == -1 || new_index == -1)
> > +	cpufreq_stats_update(freq->cpu);
> > +
> > +	if (old_index == new_index)
> >  		return 0;
> >  
> >  	spin_lock(&cpufreq_stats_lock);
> 
> -- 
> Tobias						PGP: http://8ef7ddba.uguu.de
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2011-06-15 12:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-13 20:26 3.0.0-rc2: Xen: powernow-k8: Kernel panic - not syncing: Attempted to kill init! Tobias Diedrich
2011-06-13 21:51 ` Konrad Rzeszutek Wilk
2011-06-13 23:52   ` Tobias Diedrich
2011-06-14  0:13     ` Tobias Diedrich
2011-06-14  1:34       ` Konrad Rzeszutek Wilk
2011-06-14 13:46         ` Tobias Diedrich
2011-06-14 17:59           ` Konrad Rzeszutek Wilk
2011-06-14 21:28             ` Tobias Diedrich
2011-06-15 12:38               ` Konrad Rzeszutek Wilk [this message]
2011-06-15 14:16                 ` Tobias Diedrich

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=20110615123847.GA5512@dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ranma+xen@tdiedrich.de \
    --cc=xen-users@lists.xensource.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