From: Peter Zijlstra <peterz@infradead.org>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
"H. Peter Anvin" <hpa@zytor.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Viresh Kumar <viresh.kumar@linaro.org>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
cpufreq@vger.kernel.org
Subject: Re: linux-next: build failure after merge of the tip tree
Date: Thu, 16 Jan 2014 13:14:15 +0100 [thread overview]
Message-ID: <20140116121415.GP31570@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.LRH.2.02.1401141629520.19206@file01.intranet.prod.int.rdu2.redhat.com>
On Tue, Jan 14, 2014 at 04:43:43PM -0500, Mikulas Patocka wrote:
> > @@ -200,7 +201,9 @@ static void speedstep_set_state(unsigned int state)
> > if (retry) {
> > pr_debug("retry %u, previous result %u, waiting...\n",
> > retry, result);
> > + local_irq_restore(flags);
>
> ^^^ this is wrong, because the function speedstep_set_state may already be
> called with interrupts disabled from speedstep_get_freqs. So, you need to
> enable interrupts unconditionally, even if they were disabled at the
> beginning of the function speedstep_set_state.
>
> I know it's dirty to enable interrupts in a function that was called with
> disabled interrupts, but here it must be so (you could rewrite
> speedstep_get_freqs to not disable interrupts if you want to avoid this
> dirtiness).
Egads; I think you had better, this is vile beyond reason.
> > mdelay(retry * 50);
> > + local_irq_save(flags);
> > }
> > retry++;
> > __asm__ __volatile__(
> > @@ -217,6 +220,7 @@ static void speedstep_set_state(unsigned int state)
> >
> > /* enable IRQs */
> > local_irq_restore(flags);
> > + preempt_enable();
> >
> > if (new_state == state)
> > pr_debug("change to %u MHz succeeded after %u tries "
>
> You need also preempt_disable/enable in speedstep_get_freqs.
Argh I see, this is really horrid.
Anyway, its Rafael's call, its his subsystem he gets to fix it when it
explodes.
/me shudders
next prev parent reply other threads:[~2014-01-16 12:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140114142627.537a702607e703c6eff63640@canb.auug.org.au>
[not found] ` <20140114141406.GD7572@laptop.programming.kicks-ass.net>
[not found] ` <alpine.LRH.2.02.1401141400030.19206@file01.intranet.prod.int.rdu2.redhat.com>
[not found] ` <20140114200547.GM7572@laptop.programming.kicks-ass.net>
2014-01-14 21:43 ` linux-next: build failure after merge of the tip tree Mikulas Patocka
2014-01-14 22:03 ` Rafael J. Wysocki
2014-01-14 21:52 ` Mikulas Patocka
2014-01-14 22:18 ` Rafael J. Wysocki
2014-01-16 12:14 ` Peter Zijlstra [this message]
2014-01-16 19:33 ` [PATCH] speedstep: clean up interrupt disabling (was: linux-next: build failure after merge of the tip tree) Mikulas Patocka
2014-01-17 1:21 ` Rafael J. Wysocki
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=20140116121415.GP31570@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=cpufreq@vger.kernel.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mpatocka@redhat.com \
--cc=rjw@rjwysocki.net \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
--cc=viresh.kumar@linaro.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