From mboxrd@z Thu Jan 1 00:00:00 1970 From: "tiejun.chen" Subject: Re: [v1][PATCH 1/1] KVM: PPC: disable preemption when using hard_irq_disable() Date: Tue, 16 Jul 2013 10:15:35 +0800 Message-ID: <51E4ACC7.1030306@windriver.com> References: <1373651433.8183.276@snotra> <1373670311.19894.213.camel@pasglop> <51E35C50.6050901@windriver.com> <1373909248.8183.303@snotra> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: Benjamin Herrenschmidt , Alexander Graf , "" , " list" To: Scott Wood Return-path: In-Reply-To: <1373909248.8183.303@snotra> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 07/16/2013 01:27 AM, Scott Wood wrote: > On 07/14/2013 09:20:00 PM, tiejun.chen wrote: >> On 07/13/2013 07:05 AM, Benjamin Herrenschmidt wrote: >>> On Fri, 2013-07-12 at 12:50 -0500, Scott Wood wrote: >>>> >>>> [1] SOFT_DISABLE_INTS seems an odd name for something that updates the >>>> software state to be consistent with interrupts being *hard* disabled. >>>> I can sort of see the logic in it, but it's confusing when first >>>> encountered. From the name it looks like all it would do is set >>>> soft_enabled to 1. >>> >>> It's indeed odd. Also worse when we use DISABLE_INTS which is just a >>> macro on top of SOFT_DISABLE_INTS :-) >>> >>> I've been wanting to change the macro name for a while now and never >>> got to it. Patch welcome :-) >>> >> >> What about SOFT_IRQ_DISABLE? > > What is semantically different about that from SOFT_DISABLE_INTS? > >> This is close to name hard_irq_disable() :) > > Except that one says "soft" and the other says "hard". :-) Yes, I want to leave as SOFT_IRQ_DISABLE and close to hard_irq_disable() just since I think the irq state is always needed to be reconciled when we disable soft irq. So maybe we shouldn't necessarily underline to sync the software state here as I understand. But looks you also agree with that name, RECONCILE_IRQ_STATE, Ben mentioned previously. So I'd like to turn back :) > >> And then remove all DISABLE_INTS as well? > > You mean opencode WHATEVER_WE_CALL_IT(r3,r4) everwhere? Why? > OOPS :-P Tiejun