From patchwork Fri Jul 18 14:00:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 33855 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3C60520CA0 for ; Fri, 18 Jul 2014 14:02:50 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id at20sf34102730iec.3 for ; Fri, 18 Jul 2014 07:02:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=cnV027H61+U6sSsS+wVMxSZvNOb1Ym87t/dbA+wjCbY=; b=ei4kFXvOFRTR118Aa0lXNgn4AvDDrWRmFnslwy2zmX3/g+M2ojHWik6kKKWuIci7WN CCHvA+60BoDVA2glfzZOKgWoJxBteVgAuN2q5wOIX9vaafS89/yA8lbBzq8a1v9oc+5g gMZJLiGjpwcJ2Kf0WjV57FDdsVOudI/hks8HG9jMGsNLK+8rNmRZ7l0t/bPaPqJ+WtY0 Dpsa5eZVPFjlkHk4uRywkeGPvz+06oqbja+MuV4omBC58UAojDOAj3Ow8FldOoOVD/40 8xo6uUHAkp4I1mlYevNk8SEeD7Db3zDRjzy+OgeqTyuDO/2x51jIb3QeZe2puG2hNOZN 1VKw== X-Gm-Message-State: ALoCoQl9MP15gz9a+3QUypcbihHMiycR1p2HyiF4lsqFiXmh3GQFsAiW38bPonJTCgsaI9wW/VRz X-Received: by 10.42.177.5 with SMTP id bg5mr2471911icb.27.1405692169808; Fri, 18 Jul 2014 07:02:49 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.199 with SMTP id t65ls627161qgd.93.gmail; Fri, 18 Jul 2014 07:02:49 -0700 (PDT) X-Received: by 10.220.251.134 with SMTP id ms6mr6317495vcb.10.1405692169683; Fri, 18 Jul 2014 07:02:49 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id r4si5777295vdr.12.2014.07.18.07.02.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jul 2014 07:02:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so7344046vcb.29 for ; Fri, 18 Jul 2014 07:02:48 -0700 (PDT) X-Received: by 10.52.37.81 with SMTP id w17mr3362587vdj.95.1405692168141; Fri, 18 Jul 2014 07:02:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp13773vcb; Fri, 18 Jul 2014 07:02:47 -0700 (PDT) X-Received: by 10.68.164.100 with SMTP id yp4mr5344172pbb.136.1405692167070; Fri, 18 Jul 2014 07:02:47 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ak7si6116793pad.1.2014.07.18.07.02.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jul 2014 07:02:47 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X88j7-0005JN-O5; Fri, 18 Jul 2014 14:01:33 +0000 Received: from mail-wi0-f171.google.com ([209.85.212.171]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X88it-0004x6-QO for linux-arm-kernel@lists.infradead.org; Fri, 18 Jul 2014 14:01:20 +0000 Received: by mail-wi0-f171.google.com with SMTP id hi2so923995wib.4 for ; Fri, 18 Jul 2014 07:00:56 -0700 (PDT) X-Received: by 10.180.211.134 with SMTP id nc6mr8240268wic.44.1405692055650; Fri, 18 Jul 2014 07:00:55 -0700 (PDT) Received: from mohikan.mushroom.smurfnet.nu (cpc4-cmbg17-2-0-cust71.5-4.cable.virginm.net. [86.14.224.72]) by mx.google.com with ESMTPSA id ft17sm14465308wjc.14.2014.07.18.07.00.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jul 2014 07:00:54 -0700 (PDT) From: Leif Lindholm To: linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, linux@arm.linux.org.uk Subject: [PATCH 2/7] arm: add new asm macro update_sctlr Date: Fri, 18 Jul 2014 15:00:48 +0100 Message-Id: <1405692053-7514-3-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1405692053-7514-1-git-send-email-leif.lindholm@linaro.org> References: <1405692053-7514-1-git-send-email-leif.lindholm@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140718_070120_013803_BDBDE3F7 X-CRM114-Status: UNSURE ( 8.49 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.171 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.212.171 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: roy.franz@linaro.org, matt.fleming@intel.com, ard.biesheuvel@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 A new macro for setting/clearing bits in the SCTLR. Signed-off-by: Leif Lindholm Suggested-by: Will Deacon Acked-by: Will Deacon --- arch/arm/include/asm/assembler.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 57f0584..c0cabba 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h @@ -425,4 +425,18 @@ THUMB( orr \reg , \reg , #PSR_T_BIT ) #endif .endm +#ifdef CONFIG_CPU_CP15 +/* Macro for setting/clearing bits in sctlr */ + .macro update_sctlr, tmp:req, set=, clear= + mrc p15, 0, \tmp, c1, c0, 0 + .ifnc \set, + orr \tmp, \tmp, \set + .endif + .ifnc \clear, + bic \tmp, \tmp, \clear + .endif + mcr p15, 0, \tmp, c1, c0, 0 + .endm +#endif + #endif /* __ASM_ASSEMBLER_H__ */