From patchwork Wed Mar 8 16:22:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: afzal mohammed X-Patchwork-Id: 9611527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4F4D560417 for ; Wed, 8 Mar 2017 16:23:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DC3828601 for ; Wed, 8 Mar 2017 16:23:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6275F2861D; Wed, 8 Mar 2017 16:23:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6A6F928601 for ; Wed, 8 Mar 2017 16:23:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=moNeYPhmXx7PvE+xhPZvQSTSYVBdVrsenBTO4TCznRg=; b=qwlo3DpIDzAxW/ 3OWaQIdgVuGveRH1Prosok+mYTjDN4ZLu5r4t98enzriB9GHDYyQEbftjBLjnHM3gPtOjBKcFwMs7 50gLdlSsGYEOUwiwtmFa+uGcOCbmBVSI72sJ3IpquuTWak92/2R2WDWxKdX5BqrYA953E5MGuWZCE d7Q/ROQ6BjsA3PC4rFQ2ol0l6yAiuudmfWMxx8c9qHPN21ciUP4nSUl7nyqB7y21FU/6HuYFCk3YW 0c4aQ5FLPlGZrrarCFcYDLESCPcMhcjADzn3XiWAqwhmvQrGV9PlBU9WBOtQeMFl6jYZCUsHgDJyN fnVeWGKP7s+Yy+wjHsog==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cleNU-0006LS-Il; Wed, 08 Mar 2017 16:23:52 +0000 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cleN6-0006Io-3s for linux-arm-kernel@lists.infradead.org; Wed, 08 Mar 2017 16:23:29 +0000 Received: by mail-pg0-x241.google.com with SMTP id 187so3852078pgb.2 for ; Wed, 08 Mar 2017 08:23:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=p9NiM+73TnDJXS5DMlqmnGEJSVarbfR/DYLefNFx8oo=; b=iNayiKIM1E8xmXzGzpLn5d6E30z0pwI9GgHHLMeTeTiAp5YbucnPUKsrlXtUAIkb6v Cvq22r2bZecbfRTlAVySU5fDXNdZ/IynqwPm5scPnsm/Vi8ld2e6Ey7ZQ1C42YykUG7b Na+H8Wz8jJ1bFxAiIh33+Hyl7SWiguuUQ7vmlcn2TFwrAjDWdvdSWM7UW1ssUO7havHi 2wTRjJ58AkLb6hM1VlyLPvb61aQoPIH+CpPmCda3Ht8D/vfGPOLN5syIcRCuaTXKuCwC nCt++e1ikETE21QJw6XmjNWTh2X9ZE2F8ikugFL+3BEPQvJAKMoSemIUYJBkK5sJ0BDm SqNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=p9NiM+73TnDJXS5DMlqmnGEJSVarbfR/DYLefNFx8oo=; b=A+hMm6lS5Xr7we9ydOKFsOEYFWVMTyX88o43nCm2/GntdgLJTRf4pc0tXpTtwEVfRM kXRNXT8RyUWOKHeSZcAwcbnGiWoLC2UP16ra7wsgwbOT0xE7Z42Mr2ho0QpWAzFvTdFj DoRhvxtoX9DFUVWDDJld5elMWpNWH8GZSg6B6Y4elaV4mJoennAWt1jJaSTzhRQs9+m+ mB1X8QVjMIPB4S7D8LxbpGqM/WygF7uWM6eW5koVpOYqQknSaXNDvkbHZADeALmq8ckN sh36gsuO6DXyH4NFU+Zwe7ks9MsGJjpwHu4zfxMtreqiPHPcfi9UUTB/M5izjNV1TahA 3HpA== X-Gm-Message-State: AMke39nkRej+BVq1zBKovuNUhhrWYRLN4KdD4327coK3oOpTPYChJhBTbYsO1uqtTkNAWA== X-Received: by 10.84.143.195 with SMTP id 61mr10030926plz.46.1488990186396; Wed, 08 Mar 2017 08:23:06 -0800 (PST) Received: from localhost ([49.203.213.240]) by smtp.gmail.com with ESMTPSA id l71sm7274545pga.7.2017.03.08.08.23.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Mar 2017 08:23:05 -0800 (PST) Date: Wed, 8 Mar 2017 21:52:58 +0530 From: afzal mohammed To: Greg Ungerer Subject: Re: [PATCH v2 2/4] ARM: nommu: dynamic exception base address setting Message-ID: <20170308162258.GA3515@afzalpc> References: <314159a7-b664-1256-647d-c05880ad7710@uclinux.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <314159a7-b664-1256-647d-c05880ad7710@uclinux.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170308_082328_217456_74FA0512 X-CRM114-Status: GOOD ( 13.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Murzin , linux@armlinux.org.uk, "linux-arm-kernel@lists.infradead.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Greg, Was standing on one leg & hoping that nothing breaks, knocked down, On Wed, Mar 08, 2017 at 01:21:36PM +1000, Greg Ungerer wrote: > This patch (which is in mainline now as commit f8300a0b5d) breaks > my patch series to support running the Versatile QEMU target with > a nommu configured linux kernel. Sorry > > + return !!cpuid_feature_extract(CPUID_EXT_PFR1, 4); > > The problem is here. This ends up generating the asm code: > > 2ebacc: ee103f31 mrc 15, 0, r3, cr0, cr1, {1} Thanks for finding the root cause i have in mind the diff at the end (need to recheck it's correctness), saw your response that Vladimir's fix works for you, either (if this works) way, let's fix ASAP. Regards afzal ---8<--- diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index 3b5c7aaf9c76..081562f5436e 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c @@ -303,7 +303,9 @@ static inline void set_vbar(unsigned long val) */ static inline bool security_extensions_enabled(void) { - return !!cpuid_feature_extract(CPUID_EXT_PFR1, 4); + if ((read_cpuid_id() & 0x000F0000) == 0x000F0000) + return !!cpuid_feature_extract(CPUID_EXT_PFR1, 4); + return 0; } static unsigned long __init setup_vectors_base(void)