Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964869AbbGQKma (ORCPT ); Fri, 17 Jul 2015 06:42:30 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:33882 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964787AbbGQKm3 (ORCPT ); Fri, 17 Jul 2015 06:42:29 -0400 Subject: Re: [PATCH] arm64: alternative: Provide if/else/endif assembler macros To: Will Deacon References: <1436536130-31438-1-git-send-email-daniel.thompson@linaro.org> <20150716181929.GU26390@arm.com> Cc: Catalin Marinas , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "patches@linaro.org" , "linaro-kernel@lists.linaro.org" , John Stultz , Sumit Semwal , Christoffer Dall , Marc Zyngier , Andre Przywara From: Daniel Thompson Message-ID: <55A8DC12.2060904@linaro.org> Date: Fri, 17 Jul 2015 11:42:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <20150716181929.GU26390@arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1673 Lines: 47 On 16/07/15 19:19, Will Deacon wrote: >> Notes: >> To be honest these if not/else/endif macros are simply more readable >> than the original macro and that might be enough to justify them on >> their own. However below is an example that is needlessly hard to >> write without them because ICC_PMR_EL1 is a C pre-processor macro. >> >> .macro disable_irq, tmp >> mov \tmp, #ICC_PMR_EL1_MASKED >> alternative_if_not ARM64_HAS_SYSREG_GIC_CPUIF >> msr daifset, #2 >> alternative_else >> msr_s ICC_PMR_EL1, \tmp >> alternative_endif >> .endm >> >> The new macros have received a fair degree of testing because I have >> based my (not published since March) pseudo-NMI patch set on them. > > After some consideration, I think I prefer your suggestion over what we > currently have in mainline. However, there are a bunch of patches that > are candidates for 4.3 which will conflict horribly with this. > > Would you be able to: > > (1) Split this up so that you have a patch introducing the new macro, > then a patch converting entry.S and cache.S then a separate one > for kvm/hyp.S? > > (2) Keep alternative_insn around for the moment > > (3) Once the dust has settled for 4.3, we can see how easy the old > macro is to remove > > Sound ok to you? Absolutely fine. I will get the split out patches posted soon. Daniel. -- 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/